openapi: 3.0.1
info:
  title: Zuora API Reference
  description: >
    

    # Introduction

    Welcome to the reference for the Zuora REST API!


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

      * [Zuora Collect API Reference](https://www.zuora.com/developer/collect-api/)
      * [RevPro API Reference](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 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. |

    |EU Production | https://rest.eu.zuora.com |

    |EU Sandbox | https://rest.sandbox.eu.zuora.com |


    The Production endpoint provides access to your live user data. API Sandbox tenants are a good place to test code without affecting real-world data. If you would like Zuora to provision an API 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 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


    Responses and error codes are detailed in [Responses and errors](https://knowledgecenter.zuora.com/DC_Developers/C_REST_API/Responses_and_Errors "Responses and errors").


    # 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 Object Model


    The following diagram presents a high-level view of the key Zuora objects. Click the image to open it in a new tab to resize it.


    <a href="https://www.zuora.com/wp-content/uploads/2017/01/ZuoraERD.jpeg" target="_blank"><img src="https://www.zuora.com/wp-content/uploads/2017/01/ZuoraERD.jpeg" alt="Zuora Object Model Diagram"></a>


    See the following articles for information about other parts of the Zuora business object model:

      * <a href="https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/D_Invoice_Settlement_Object_Model" target="_blank">Invoice Settlement Object Model</a>
      * <a href="https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/BA_Orders_Object_Model" target="_blank">Orders Object Model</a>

    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 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`                                    |
  contact:
    email: docs@zuora.com
  version: 2020-04-08
  x-logo:
    url: https://www.zuora.com/wp-content/uploads/2016/10/zuora-dev-logo-api-ref.svg
servers:
  - url: https://rest.zuora.com/
tags:
  - name: Actions
    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: Accounting Codes
    description: ""
  - name: Accounting Periods
    description: ""
  - name: Accounts
    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: Amendments
    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: Attachments
    description: ""
  - name: Bill Run
    description: >
      Use the Bill Run call to create ad hoc bill runs and Post, Cancel, Query,
      and Delete bill runs.
  - name: Billing Documents
    description: ""
  - name: Billing Preview Run
    description: ""
  - name: Catalog
    description: ""
  - name: Charge Revenue Summaries
    description: ""
  - name: Communication Profiles
    description: ""
  - name: Connections
    description: ""
  - name: Contacts
    description: ""
  - name: Credit Balance Adjustments
    description: ""
  - name: Credit Memos
    description: ""
  - name: Custom Exchange Rates
    description: ""
  - name: Custom Object Definitions
    description: >
      **Note:** The Custom Objects is an **Early Adopter** feature for existing
      customers. We are improving the product with feedback from early adopters,
      and aim to make the feature Generally Available soon.


      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 object definitions 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.
  - name: Custom Object Records
    description: >
      **Note:** The Custom Objects is an **Early Adopter** feature for existing
      customers. We are improving the product with feedback from early adopters,
      and aim to make the feature Generally Available soon.


      With Custom Objects service, you can create, update, delete and find custom object records.



      If you use Postman, you can import the custom object records 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.
  - name: Data Queries
    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).


      **Note:** The Data Query 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).
  - name: Debit Memos
    description: ""
  - name: Describe
    description: ""
  - name: Document Properties
    description: ""
  - name: Entities
    description: ""
  - name: Entity Connections
    description: ""
  - name: Event Triggers
    description: ""
  - name: Exports
    description: ""
  - name: Features
    description: ""
  - name: Get 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: ""
  - name: Notifications
    description: ""
  - name: OAuth
    description: ""
  - name: Operations
    description: ""
  - name: Orders
    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: ""
  - name: Product Rate Plan Charge Tiers
    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 Charges
    description: ""
  - name: Product Rate Plans
    description: ""
  - name: Products
    description: ""
  - name: Quotes Document
    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: ""
  - name: Settings
    description: >
      **Note:** The Settings API is **In Development**.


      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: Subscription Product Features
    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: 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: ""
  - name: RevPro Integration
    description: >
      **Note:** You can only use the operations in this section if you have the
      Zuora Billing - RevPro Integration feature enabled.
paths:
  /v1/accounting-codes:
    get:
      tags:
        - Accounting Codes
      summary: Get all accounting codes
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_accounting"
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountingCodesType"
            application/json:
              example:
                accountingCodes:
                  - id: e20b0747478025a10147816ba1c20097
                    name: Accounts Receivable
                    type: AccountsReceivable
                    category: Assets
                    status: Active
                    createdOn: 2014-07-29 02:20:20
                    createdBy: e20b074746ec48f40147140f51e30a1a
                    updatedOn: 2014-07-29 02:20:20
                    updatedBy: e20b074746ec48f40147140f51e30a1a
                  - id: e20b0747478025a10147816ba21900a0
                    name: Discounts
                    type: SalesDiscounts
                    category: Revenue
                    status: Inactive
                    createdOn: 2014-07-29 02:20:20
                    createdBy: e20b074746ec48f40147140f51e30a1a
                    updatedOn: 2014-09-27 22:11:07
                    updatedBy: e20b074746ec48f40147140f51e30a1a
                success: true
      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:
      tags:
        - Accounting Codes
      summary: Create accounting code
      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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTAccountingCodeType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTAccountingCodeResponseType"
            application/json:
              example:
                id: 8a8081ae547aac1e01547efb61f20140
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/accounting-codes/{ac-id}/activate":
    put:
      tags:
        - Accounting Codes
      summary: Activate accounting code
      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_Entity_Ids_Single"
        - name: ac-id
          in: path
          description: ID of the accounting code you want to activate.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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:
      tags:
        - Accounting Codes
      summary: Deactivate accounting code
      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_Entity_Ids_Single"
        - name: ac-id
          in: path
          description: ID of the accounting code you want to deactivate.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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-codes/{ac-id}":
    get:
      tags:
        - Accounting Codes
      summary: Query an accounting code
      description: This reference describes how to query an accounting code through
        the REST API.
      operationId: GET_AccountingCode
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: ac-id
          in: path
          description: ID of the accounting code you want to query.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountingCodeItemType"
            application/json:
              example:
                id: 8a8081ae547aac1e01547efb61f20140
                name: CASH
                type: Cash
                category: Assets
                status: Active
                createdOn: 2016-05-04 01:23:07
                createdBy: e20b074746ec48f40147140f51e30a1a
                updatedOn: 2016-05-05 20:07:38
                updatedBy: e20b074746ec48f40147140f51e30a1a
                success: true
      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:
      tags:
        - Accounting Codes
      summary: Update an accounting code
      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_Entity_Ids_Single"
        - name: ac-id
          in: path
          description: ID of the accounting code you want to update.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTAccountingCodeType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
    delete:
      tags:
        - Accounting Codes
      summary: Delete accounting code
      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_Entity_Ids_Single"
        - name: ac-id
          in: path
          description: ID of the accounting code you want to delete.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/accounting-periods/{ap-id}/close":
    put:
      tags:
        - Accounting Periods
      summary: Close accounting period
      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_Entity_Ids_Single"
        - name: ap-id
          in: path
          description: ID of the accounting period you want to close.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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:
      tags:
        - Accounting Periods
      summary: Set accounting period to pending close
      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_Entity_Ids_Single"
        - name: ap-id
          in: path
          description: ID of the accounting period you want to set to pending close.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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:
    get:
      tags:
        - Accounting Periods
      summary: Get all accounting periods
      description: Retrieves all accounting periods on your tenant.
      operationId: GET_AllAccountingPeriods
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_accounting"
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountingPeriodsType"
            application/json:
              example:
                accountingPeriods:
                  - id: 8a8081ae5374904f01538338b66e1005
                    name: Mar 2016
                    startDate: 2016-03-01
                    endDate: 2016-03-31
                    status: Open
                    runTrialBalanceStatus: Error
                    runTrialBalanceStart: 2016-03-16 23:25:22
                    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."
                    fiscalYear: 2016
                    notes: ""
                    fileIds:
                      accountsReceivableInvoiceAgingDetailExportFileId: 8a8081ae5374904f01538340273013f3
                      accountsReceivableAccountAgingDetailExportFileId: 8a8081ae5374904f01538340274a13f4
                      revenueDetailExcelFileId: 8a8081ae5374904f0153834032e41417
                      revenueDetailCsvFileId: 8a8081ae5374904f0153834033221418
                    createdOn: 2016-03-16 23:17:25
                    createdBy: e20b074746ec48f40147140f51e30a1a
                    updatedOn: 2016-03-16 23:25:22
                    updatedBy: e20b074746ec48f40147140f51e30a1a
                  - id: 8a8081ae5374904f0153833918af1007
                    name: Apr 2016
                    startDate: 2016-04-01
                    endDate: 2016-04-30
                    status: Open
                    runTrialBalanceStatus: Error
                    runTrialBalanceStart: 2016-03-16 23:23:40
                    fiscalYear: 2016
                    notes: ""
                    fileIds:
                      accountsReceivableInvoiceAgingDetailExportFileId: 8a8081ae5374904f0153833e9a651363
                      accountsReceivableAccountAgingDetailExportFileId: 8a8081ae5374904f0153833e9a7a1364
                      revenueDetailExcelFileId: 8a8081ae5374904f0153833ea2c813ae
                      revenueDetailCsvFileId: 8a8081ae5374904f0153833ea2d613af
                    createdOn: 2016-03-16 23:17:50
                    createdBy: e20b074746ec48f40147140f51e30a1a
                    updatedOn: 2016-03-16 23:23:40
                    updatedBy: e20b074746ec48f40147140f51e30a1a
                  - id: 8a8081ae5374904f0153833e4590132d
                    name: May 2016
                    startDate: 2016-05-01
                    endDate: 2016-05-31
                    status: Open
                    runTrialBalanceStatus: Error
                    runTrialBalanceStart: 2016-05-18 01:42:30
                    fiscalYear: 2016
                    notes: ""
                    fileIds:
                      revenueDetailExcelFileId: 8a8081ae54c2eabb0154c307e27e0033
                      revenueDetailCsvFileId: 8a8081ae54c2eabb0154c307e2920034
                    createdOn: 2016-03-16 23:23:29
                    createdBy: e20b074746ec48f40147140f51e30a1a
                    updatedOn: 2016-05-18 01:42:30
                    updatedBy: e20b074746ec48f40147140f51e30a1a
                  - id: e20b0747478025a1014780e489a60002
                    name: Open-Ended
                    startDate: 2016-06-01
                    status: Open
                    runTrialBalanceStatus: Pending
                    fiscalYear: 0
                    fileIds: {}
                    createdOn: 2014-07-28 23:52:46
                    createdBy: 402881e522cf4f9b0122cf5d82860002
                    updatedOn: 2016-03-16 23:23:29
                    updatedBy: e20b074746ec48f40147140f51e30a1a
                success: true
      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:
      tags:
        - Accounting Periods
      summary: Create accounting period
      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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTAccountingPeriodType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTAccountingPeriodResponseType"
            application/json:
              example:
                id: 7b7181ae547aac1e01547efb61f20162
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/accounting-periods/{ap-id}":
    get:
      tags:
        - Accounting Periods
      summary: Get accounting period
      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_Entity_Ids_Single"
        - name: ap-id
          in: path
          description: ID of the accounting period you want to get.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountingPeriodType"
            application/json:
              example:
                id: e20b074749d2a38b0149eac2e9550aa9
                name: Oct 2014
                startDate: 2014-10-01
                endDate: 2014-10-31
                status: Closed
                runTrialBalanceStatus: Completed
                runTrialBalanceStart: 2015-09-28 00:53:13
                runTrialBalanceEnd: 2015-09-28 00:53:36
                fiscalYear: 2014
                notes: ""
                fileIds:
                  accountsReceivableInvoiceAgingDetailExportFileId: 8a8081ae5002967c015012f122f10913
                  accountsReceivableAccountAgingDetailExportFileId: 8a8081ae5002967c015012f1230e0914
                  revenueDetailExcelFileId: 8a8081ae5002967c015012f129870925
                  revenueDetailCsvFileId: 8a8081ae5002967c015012f129a10926
                  arRollForwardDetailExportFileId: 8a8081ae5002967c015012f15d7b09e2
                  fxRealizedGainAndLossDetailExportFileId: 8a8081ae5002967c015012f151a609ba
                  fxUnrealizedGainAndLossDetailExportFileId: 8a8081ae5002967c015012f150b509b8
                createdOn: 2014-11-25 22:21:22
                createdBy: e20b074746ec48f40147140f51e30a1a
                updatedOn: 2015-09-28 00:53:13
                updatedBy: e20b074746ec48f40147140f51e30a1a
                success: true
      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:
      tags:
        - Accounting Periods
      summary: Update accounting period
      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_Entity_Ids_Single"
        - name: ap-id
          in: path
          description: ID of the accounting period you want to update.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTAccountingPeriodType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
    delete:
      tags:
        - Accounting Periods
      summary: Delete accounting period
      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_Entity_Ids_Single"
        - name: ap-id
          in: path
          description: ID of the accounting period you want to delete.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/accounting-periods/{ap-id}/reopen":
    put:
      tags:
        - Accounting Periods
      summary: Re-open accounting period
      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_Entity_Ids_Single"
        - name: ap-id
          in: path
          description: ID of the accounting period that you want to re-open.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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:
      tags:
        - Accounting Periods
      summary: Run trial balance
      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_Entity_Ids_Single"
        - name: ap-id
          in: path
          description: ID of the accounting period for which you want to run a trial
            balance.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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-ba\
            lance\""
        - 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:
      tags:
        - Accounts
      summary: Create account
      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_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTAccountType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTAccountResponseType"
            application/json:
              example:
                success: true
                accountId: 402892c74c9193cd014c96bbe7c101f9
                accountNumber: A00000004
                billToContactId: 2c92c8fb68a28d180168a7ccedba1c4c
                soldToContactId: 2c92c8fb68a28d180168a7ccedc61c4e
                paymentMethodId: 402892c74c9193cd014c96bbe7d901fd
      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);
      x-codegen-request-body-name: Request
  "/v1/accounts/{account-key}":
    get:
      tags:
        - Accounts
      summary: Get account
      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_Entity_Ids_Single"
        - name: account-key
          in: path
          description: Account number or account ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountType"
            application/json:
              example:
                basicInfo:
                  id: 402892c74c9193cd014c91d35b0a0132
                  name: Test
                  accountNumber: A00000001
                  notes: ""
                  status: Active
                  crmId: ""
                  batch: Batch1
                  communicationProfileId: 303d186840e611df817c002185d714e1
                  salesRep: ""
                billingAndPayment:
                  billCycleDay: 1
                  currency: USD
                  paymentTerm: Net 30
                  paymentGateway: TestGateway
                  invoiceDeliveryPrefsPrint: false
                  invoiceDeliveryPrefsEmail: true
                  additionalEmailAddresses:
                    - contact1@example.com
                    - contact2@example.com
                metrics:
                  balance: 0
                  totalInvoiceBalance: 0
                  creditBalance: 0
                  contractedMrr: -900
                billToContact:
                  address1: ""
                  address2: ""
                  city: ""
                  fax: ""
                  firstName: Test
                  homePhone: ""
                  lastName: Test
                  mobilePhone: ""
                  nickname: ""
                  otherPhone: ""
                  personalEmail: ""
                  state: ""
                  workEmail: contact@example.com
                  workPhone: ""
                  zipCode: ""
                soldToContact:
                  address1: ""
                  address2: ""
                  city: ""
                  fax: ""
                  firstName: Test
                  homePhone: ""
                  lastName: Test
                  mobilePhone: ""
                  nickname: ""
                  otherPhone: ""
                  personalEmail: ""
                  state: ""
                  workEmail: contact@example.com
                  workPhone: ""
                  zipCode: ""
                success: true
      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:
      tags:
        - Accounts
      summary: Update account
      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; updating either one does not update the other.
      operationId: PUT_Account
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: account-key
          in: path
          description: Account number or account ID.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTAccountType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/accounts/{account-key}/summary":
    get:
      tags:
        - Accounts
      summary: Get account summary
      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_Entity_Ids_Single"
        - name: account-key
          in: path
          description: Account number or account ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountSummaryType"
            application/json:
              example:
                payments:
                  - paidInvoices:
                      - invoiceNumber: INV00000159
                        appliedPaymentAmount: 5
                        invoiceId: 2c92a09539190dbe0139190f42780012
                      - invoiceNumber: INV00000323
                        appliedPaymentAmount: 139722.1
                        invoiceId: 2c92a0953a3fa95d013a407c10a60100
                      - invoiceNumber: INV00000160
                        appliedPaymentAmount: 10521
                        invoiceId: 2c92a09739190dc60139194bcf1b0098
                    paymentNumber: P-00000075
                    status: Processed
                    effectiveDate: 2013-03-27
                    id: 2c92c8f83dabf9cf013daf3bfa0305a6
                    paymentType: Electronic
                  - paidInvoices:
                      - invoiceNumber: INV00000159
                        appliedPaymentAmount: 5
                        invoiceId: 2c92a09539190dbe0139190f42780012
                    paymentNumber: P-00000056
                    status: Processed
                    effectiveDate: 2012-08-11
                    id: 2c92a0f9391832b101391922ad5f049d
                    paymentType: Electronic
                invoices:
                  - amount: 139722.1
                    status: Posted
                    invoiceNumber: INV00000323
                    invoiceDate: 2013-02-11
                    balance: 0
                    id: 2c92a0953a3fa95d013a407c10a60100
                    dueDate: 2013-02-11
                  - amount: 10521
                    status: Posted
                    invoiceNumber: INV00000160
                    invoiceDate: 2012-08-11
                    balance: 0
                    id: 2c92a09739190dc60139194bcf1b0098
                    dueDate: 2012-08-11
                  - amount: 10
                    status: Posted
                    invoiceNumber: INV00000159
                    invoiceDate: 2012-08-11
                    balance: 0
                    id: 2c92a09539190dbe0139190f42780012
                    dueDate: 2012-08-11
                usage:
                  - unitOfMeasure: UOM
                    quantity: 10
                    startDate: 2012-02
                  - unitOfMeasure: UOM
                    quantity: 10
                    startDate: 2012-01
                basicInfo:
                  defaultPaymentMethod:
                    creditCardNumber: "************1111"
                    paymentMethodType: CreditCard
                    creditCardExpirationMonth: 10
                    creditCardExpirationYear: 2020
                    creditCardType: Visa
                    id: 2c92c8f83dabf9cf013daef12dd303b0
                  status: Active
                  lastInvoiceDate: 2013-02-11
                  lastPaymentAmount: 150248.1
                  billCycleDay: 1
                  invoiceDeliveryPrefsPrint: false
                  invoiceDeliveryPrefsEmail: true
                  additionalEmailAddresses:
                    - contact1@example.com
                    - contact2@example.com
                  name: subscribeCallYan_1
                  balance: 0
                  accountNumber: A00001115
                  id: 2c92a0f9391832b10139183e277a0042
                  currency: USD
                  lastPaymentDate: 2013-03-27
                soldToContact:
                  fax: ""
                  taxRegion: ""
                  country: United States
                  zipCode: "95135"
                  county: ""
                  lastName: Cho
                  workEmail: contact@example.com
                  state: California
                  address2: ""
                  address1: 278 Bridgeton Circle
                  firstName: Bill
                  id: 2c92a0f9391832b10139183e27940043
                  workPhone: "5555551212"
                  city: San Jose
                success: true
                subscriptions:
                  - termEndDate: 2014-02-01
                    termStartDate: 2013-02-01
                    status: Active
                    initialTerm: 12
                    autoRenew: true
                    subscriptionNumber: A-S00001081
                    subscriptionStartDate: 2013-02-01
                    id: 2c92c8f83dc4f752013dc72c24ee016d
                    ratePlans:
                      - productName: Recurring Charge
                        ratePlanName: QSF_Tier
                    termType: TERMED
                    renewalTerm: 3
                  - termEndDate: 2014-02-01
                    termStartDate: 2013-02-01
                    status: Active
                    initialTerm: 12
                    autoRenew: true
                    subscriptionNumber: A-S00001080
                    subscriptionStartDate: 2013-02-01
                    id: 2c92c8f83dc4f752013dc72bb85c0127
                    ratePlans:
                      - productName: Recurring Charge
                        ratePlanName: QSF_Tier
                    termType: TERMED
                    renewalTerm: 3
                  - termEndDate: 2014-04-01
                    termStartDate: 2013-12-01
                    status: Cancelled
                    initialTerm: 10
                    autoRenew: false
                    subscriptionNumber: A-S00001079
                    subscriptionStartDate: 2013-02-01
                    id: 2c92c8f83dc4f752013dc723fdab00d4
                    ratePlans:
                      - productName: Recurring Charge
                        ratePlanName: QSF_Tier
                    termType: TERMED
                    renewalTerm: 4
                  - termEndDate: 2012-02-11
                    termStartDate: 2011-02-11
                    status: Active
                    initialTerm: 12
                    autoRenew: false
                    subscriptionNumber: A-S00001076
                    subscriptionStartDate: 2011-02-11
                    id: 2c92c8f83db0b4b4013db4717ad000ec
                    ratePlans:
                      - productName: Recurring Charge
                        ratePlanName: Month_PerUnit
                      - productName: Recurring Charge
                        ratePlanName: Month_PerUnit
                    termType: TERMED
                    renewalTerm: 3
                  - termEndDate: 2012-02-11
                    termStartDate: 2011-02-11
                    status: Active
                    initialTerm: 12
                    autoRenew: false
                    subscriptionNumber: A-S00001075
                    subscriptionStartDate: 2011-02-11
                    id: 2c92c8f83db0b4b4013db3ab6a4d00bc
                    ratePlans:
                      - productName: Recurring Charge
                        ratePlanName: Month_PerUnit
                      - productName: Recurring Charge
                        ratePlanName: Month_PerUnit
                    termType: TERMED
                    renewalTerm: 3
                  - termEndDate: 2012-02-11
                    termStartDate: 2011-02-11
                    status: Active
                    initialTerm: 12
                    autoRenew: false
                    subscriptionNumber: A-S00001074
                    subscriptionStartDate: 2011-02-11
                    id: 2c92c8f83db0b4b4013db3aa9fbd0090
                    ratePlans:
                      - productName: Recurring Charge
                        ratePlanName: Month_PerUnit
                    termType: TERMED
                    renewalTerm: 3
                billToContact:
                  fax: ""
                  taxRegion: ""
                  country: United States
                  zipCode: "95135"
                  county: ""
                  lastName: Zou
                  workEmail: contact@example.com
                  state: California
                  address2: ""
                  address1: 1400 Bridge Pkwy
                  firstName: Cheng
                  id: 2c92a0f9391832b10139183e27940043
                  workPhone: "5555551212"
                  city: San Jose
      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/action/amend:
    post:
      tags:
        - Actions
      summary: Amend
      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_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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyActionamendResponse"
            application/json:
              example:
                results:
                  - SubscriptionId: 2c93808457d787030157e02e27e21eaa
                    TotalDeltaTcv: 360
                    AmendmentIds:
                      - 2c93808457d787030157e02e27781ea0
                    TotalDeltaMrr: 30
                    Success: true
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: amendRequest
  /v1/action/create:
    post:
      tags:
        - Actions
      summary: Create
      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.


        ### 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_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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: array
                description: ""
                items:
                  $ref: "#/components/schemas/SaveResult"
            application/json:
              example:
                - Success: true
                  Id: 2c93808457d787030157e0324aea5158
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: createRequest
  /v1/action/delete:
    post:
      tags:
        - Actions
      summary: Delete
      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_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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: array
                description: ""
                items:
                  $ref: "#/components/schemas/DeleteResult"
            application/json:
              example:
                - id: 2c93808457d787030157e031fcd34e19
                  success: true
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: deleteRequest
  /v1/action/execute:
    post:
      tags:
        - Actions
      summary: Execute
      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_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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: array
                description: ""
                items:
                  $ref: "#/components/schemas/ExecuteResult"
            application/json:
              example:
                - Success: true
                  Id: 2c93808457d787030157e031d5844c53
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: executeRequest
  /v1/action/generate:
    post:
      tags:
        - Actions
      summary: Generate
      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_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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: array
                description: ""
                items:
                  $ref: "#/components/schemas/SaveResult"
            application/json:
              example:
                - Success: true
                  Id: 2c93808457d787030157e0306cd13a86
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: generateRequest
  /v1/action/query:
    post:
      tags:
        - Actions
      summary: Query
      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_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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyActionqueryResponse"
            application/json:
              example:
                records:
                  - AdjustmentNumber: IIA-00000001
                    ServiceEndDate: 2016-10-20
                    Id: 2c93808457d787030157e0324aea5158
                    AccountingCode: Accounts Receivable
                    UpdatedDate: 2016-10-20T05:46:14.000+02:00
                    AccountId: 2c93808457d787030157e032485b5131
                    Comment: this is comments
                    InvoiceNumber: INV00000001
                    InvoiceId: 2c93808457d787030157e03248c75142
                    ServiceStartDate: 2016-10-20
                    CreatedById: 2c93808457d787030157e032283c4fb2
                    CreatedDate: 2016-10-20T05:46:14.000+02:00
                    InvoiceItemName: OneTime_Flat Fee Pricing1476935174089
                    UpdatedById: 2c93808457d787030157e032283c4fb2
                    Amount: 1.2
                    AdjustmentDate: 2016-10-20
                    SourceId: 2c93808457d787030157e03248c95144
                    SourceType: InvoiceDetail
                    Status: Processed
                    Type: Credit
                    ReferenceId: refid-1476935174845
                    ReasonCode: Standard Adjustment
                size: 1
                done: true
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: queryRequest
  /v1/action/queryMore:
    post:
      tags:
        - Actions
      summary: QueryMore
      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_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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyActionqueryMoreResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: queryMoreRequest
  /v1/action/subscribe:
    post:
      tags:
        - Actions
      summary: Subscribe
      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. 


        ## 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_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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: array
                description: ""
                items:
                  $ref: "#/components/schemas/SubscribeResult"
            application/json:
              example:
                - AccountNumber: A00000085
                  SubscriptionNumber: A-S00000213
                  InvoiceResult:
                    Invoice:
                      - InvoiceNumber: INV00000536
                        Id: 2c92c0f968e566ad0168ef36f33a0591
                  TotalTcv: 100
                  Success: true
                  TotalMrr: 0
                  AccountId: 2c92c0f968e566ad0168ef36f27d057c
                  SubscriptionId: 2c92c0f968e566ad0168ef36f29a057f
                  InvoiceNumber: INV00000536
                  InvoiceId: 2c92c0f968e566ad0168ef36f33a0591
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: subscribeRequest
  /v1/action/update:
    post:
      tags:
        - Actions
      summary: Update
      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_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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: array
                description: ""
                items:
                  $ref: "#/components/schemas/SaveResult"
            application/json:
              example:
                - Success: true
                  Id: 2c93808457d787030157e0321fdf4fab
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: updateRequest
  "/v1/amendments/{amendment-key}":
    get:
      tags:
        - Amendments
      summary: Get amendments by key
      description: Retrieves detailed information about the specified subscription
        amendment.
      operationId: GET_AmendmentsByKey
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: amendment-key
          in: path
          description: Can be the amendment ID or the amendment code.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAmendmentType"
            application/json:
              example:
                success: true
                id: 402896a9529c100a01529c30e26a0018
                code: A-AM00000002
                name: testAmendment
                type: TermsAndConditions
                description: just for test
                status: Completed
                contractEffectiveDate: 2016-02-01
                serviceActivationDate: 2016-02-01
                customerAcceptanceDate: 2016-02-01
                effectiveDate: 2016-02-01
                newSubscriptionId: 402896a9529c100a01529c311930001d
                baseSubscriptionId: 402896a9529c100a01529c2f2cc30010
                termType: TERMED
                currentTerm: 2
                currentTermPeriodType: Month
                termStartDate: 2015-12-31
                renewalSetting: RENEW_WITH_SPECIFIC_TERM
                renewalTerm: 1
                renewalTermPeriodType: Month
                autoRenew: false
                destinationAccountId: 402896a9529bc3dc01529bcba7120023
                destinationInvoiceOwnerId: 402896a9529bc3dc01529bcba7120023
      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/amendments/subscriptions/{subscription-id}":
    get:
      tags:
        - Amendments
      summary: Get amendments by subscription ID
      description: Retrieves detailed information about the amendment with the
        specified subscription.
      operationId: GET_AmendmentsBySubscriptionID
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: subscription-id
          in: path
          description: The ID of the subscription whose amendment changes you want to
            retrieve.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAmendmentType"
            application/json:
              example:
                success: true
                id: 402896a9529c100a01529c30e26a0018
                code: A-AM00000002
                name: testAmendment
                type: TermsAndConditions
                description: just for test
                status: Completed
                contractEffectiveDate: 2016-02-01
                serviceActivationDate: 2016-02-01
                customerAcceptanceDate: 2016-02-01
                effectiveDate: 2016-02-01
                newSubscriptionId: 402896a9529c100a01529c311930001d
                baseSubscriptionId: 402896a9529c100a01529c2f2cc30010
                termType: TERMED
                currentTerm: 2
                currentTermPeriodType: Month
                termStartDate: 2015-12-31
                renewalSetting: RENEW_WITH_SPECIFIC_TERM
                renewalTerm: 1
                renewalTermPeriodType: Month
                autoRenew: false
                destinationAccountId: 402896a9529bc3dc01529bcba7120023
                destinationInvoiceOwnerId: 402896a9529bc3dc01529bcba7120023
      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/attachments:
    post:
      tags:
        - Attachments
      summary: Add attachments
      description: Use the Add Attachment REST request with a multipart/form-data to
        attach a document file to an Account, a Subscription, or an Invoice.
      operationId: POST_Attachments
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: description
          in: query
          description: |
            Description of the attachment document.
          schema:
            type: string
        - name: associatedObjectType
          in: query
          description: >
            Specify one of the following values: Account, Subscription, or
            Invoice.
          required: true
          schema:
            type: string
        - name: associatedObjectKey
          in: query
          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 and Invoice, specify the id.
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - file
              properties:
                file:
                  type: string
                  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
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTAttachmentResponseType"
            application/json:
              example:
                success: true
                id: 402880ea536ff494015372a7ea17001f
                fileId: 402880ea536ff494015372a7ea12001e
      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/{object-type}/{object-key}":
    get:
      tags:
        - Attachments
      summary: View attachments list
      description: Use the View Attachment REST request to get a list of attachments
        on an account, an invoice, or a subscription.
      operationId: GET_AttachmentsList
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: object-type
          in: path
          description: |
            The type of object to list attachements for.
          required: true
          schema:
            type: string
            enum:
              - account
              - invoice
              - subscription
        - name: object-key
          in: path
          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.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAttachmentsResponseType"
            application/json:
              example:
                attachments:
                  - id: 402896b95397c169015397c2ebca0003
                    fileName: Search _ Splunk.pdf
                    fileId: 402896b95397c169015397c2ebc50002
                    fileContentType: application/pdf
                    createdOn: 2016-03-21 14:00:47
                    createdBy: 402881e522cf4f9b0122cf5d82860002
                    updatedOn: 2016-03-21 14:00:47
                    updatedBy: 402881e522cf4f9b0122cf5d82860002
                    success: true
                  - id: 8a8083e1545b706a01547316d93f4401
                    fileName: AttachTest.txt
                    description: ""
                    fileId: 8a8083e1545b706a01547316d9094400
                    fileContentType: text/plain
                    createdOn: 2016-05-02 13:09:17
                    createdBy: 4028e487327fd45a0132829ebb673ff9
                    updatedOn: 2016-05-02 13:09:17
                    updatedBy: 4028e487327fd45a0132829ebb673ff9
                success: true
      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/attachments/{attachment-id}":
    get:
      tags:
        - Attachments
      summary: View attachments
      description: Use the View Attachment REST request to retrieve information about
        an attachment document.
      operationId: GET_Attachments
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: attachment-id
          in: path
          description: Id of the attachment you want to view.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAttachmentResponseType"
            application/json:
              example:
                id: 8a8083e1545b706a01547316d93f4401
                fileName: AttachTest.txt
                description: ""
                fileId: 8a8083e1545b706a01547316d9094400
                fileContentType: text/plain
                createdOn: 2016-05-02 13:09:17
                createdBy: 4028e487327fd45a0132829ebb673ff9
                updatedOn: 2016-05-02 13:09:17
                updatedBy: 4028e487327fd45a0132829ebb673ff9
                success: true
      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:
      tags:
        - Attachments
      summary: Edit attachments
      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_Entity_Ids_Single"
        - name: attachment-id
          in: path
          description: Id of the attachment to be updated.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTAttachmentType"
        required: false
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
    delete:
      tags:
        - Attachments
      summary: Delete attachments
      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_Entity_Ids_Single"
        - name: attachment-id
          in: path
          description: Id of the attachment to be deleted.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/bill-runs/{billRunId}/emails":
    post:
      tags:
        - Bill Run
      summary: Email billing documents generated from bill run
      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_Entity_Ids_Single"
        - name: billRunId
          in: path
          description: >
            The ID of the bill run. For example,
            2c92c8f95d0c886e015d11287a8f0f8b.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTEmailBillingDocfromBillRunType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/accounts/{id}/billing-documents/generate":
    post:
      tags:
        - Billing Documents
      summary: Generate billing documents by account
      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_Entity_Ids_Single"
        - name: id
          in: path
          description: >
            The ID of the customer account that billing documents are generated
            for. For example, 8a8082e65b27f6c3015ba3e326b26419.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostGenerateBillingDocumentType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GenerateBillingDocumentResponseType"
            application/json:
              example:
                invoices:
                  - id: 402890555c33b44b015c33bfe9c70044
                  - id: 402890555c33b44b015c33bfe9d70046
                creditMemos:
                  - id: 402890555c33b44b015c33bfe947003c
                  - id: 402890555c33b44b015c33bfe93c003a
                success: true
      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);
      x-codegen-request-body-name: body
  /v1/billing-documents:
    get:
      tags:
        - Billing Documents
      summary: Get billing documents
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: accountId
          in: query
          description: >
            The ID of the customer account that the billing documents are
            associated with. 
          required: true
          schema:
            type: string
            format: uuid
        - name: documentDate
          in: query
          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.
          schema:
            type: string
            format: date
        - name: status
          in: query
          description: |
            The status of the billing document.
          schema:
            type: string
            enum:
              - Draft
              - Posted
              - Canceled
              - Error
        - name: sort
          in: query
          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
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/BillingDocumentQueryResponseElementType"
            application/json:
              example:
                documents:
                  - id: 4028905f5e4jjj015e50af9aa002d1
                    documentType: Invoice
                    documentNumber: INV-0000001
                    documentDate: 2017-10-01
                    amount: 100
                    balance: 90
                    accountId: 4028905f5e4feb38bbb50af9aa002d1
                    status: Posted
                  - id: 4028905f5e4jbbb015e50af9aa002d1
                    documentType: CreditMemo
                    documentNumber: CM-0000001
                    documentDate: 2017-09-01
                    amount: 100
                    balance: 90
                    accountId: 4028905f5e4feb38b111b50af9aa002d1
                    status: Posted
                  - id: 4028905f5e4jccc015e50af9aa002d1
                    documentType: DebitMemo
                    documentNumber: DM-0000001
                    documentDate: 2017-07-01
                    amount: 100
                    balance: 90
                    accountId: 4028905f5e4feb3833b50af9aa002d1
                    status: Posted
                success: true
      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/accounts/billing-documents/files/deletion-jobs:
    post:
      tags:
        - Billing Documents
      summary: Create job to hard delete billing document files
      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 [Get 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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTBillingDocumentFilesDeletionJobRequest"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTBillingDocumentFilesDeletionJobResponse"
            application/json:
              example:
                id: 2c92c8f83dc4f752013dc72c24ee016c
                status: Pending
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/accounts/billing-documents/files/deletion-jobs/{jobId}":
    get:
      tags:
        - Billing Documents
      summary: Get job of hard deleting billing document files
      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_Entity_Ids_Single"
        - name: jobId
          in: path
          description: The unique ID of a billing document file deletion job. For example,
            2c92c8f83dc4f752013dc72c24ee016c.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETBillingDocumentFilesDeletionJobResponse"
            application/json:
              example:
                id: 2c92c8f83dc4f752013dc72c24ee016c
                status: Pending
                success: true
      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/billing-preview-runs:
    post:
      tags:
        - Billing Preview Run
      summary: Create Billing Preview Run
      description: >
        **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/).



        Creates billing preview runs for multiple customer accounts.


        You can run up to 10 billing previews 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 10 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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostBillingPreviewRunParam"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: |
                      Returns `true` if the request was processed successfully.
                  billingPreviewRunId:
                    type: string
                    description: |
                      Id of the billing preview run.
            application/json:
              example:
                success: true
                billingPreviewRunId: 402890b757d1ec1b0157d5aa3d6802aa
      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);
      x-codegen-request-body-name: Request
  "/v1/billing-preview-runs/{billingPreviewRunId}":
    get:
      tags:
        - Billing Preview Run
      summary: Get Billing Preview Run
      description: >
        **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/). 



        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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: billingPreviewRunId
          in: path
          description: |
            Id of the billing preview run.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetBillingPreviewRunResponse"
            application/json:
              example:
                assumeRenewal: Autorenew
                batch: AllBatches
                chargeTypeToExclude: OneTime
                createdById: 4028906d58240f960158241132be0003
                createdDate: 2016-11-04 16:18:56
                endDate: 2016-11-04 16:19:00
                includingEvergreenSubscription: true
                resultFileUrl: http://localhost:8080/apps/api/file/4028906d582d21a101582e6b663c0a65
                runNumber: BPR-00000010
                startDate: 2016-11-04 16:19:00
                status: Completed
                succeededAccounts: 7
                targetDate: 2016-12-01
                totalAccounts: 7
                updatedById: 4028906d58240f960158241132be0003
                updatedDate: 2016-11-04 16:19:00
                success: true
      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/catalog/products:
    get:
      tags:
        - Catalog
      summary: Get product catalog
      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. 
      operationId: GET_Catalog
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_page"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_catalog"
        - name: zuora-version
          in: header
          description: >
            The minor version of the Zuora REST API. 


            You only need to set this parameter if you use the `productRatePlans` field.
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCatalogType"
            application/json:
              example:
                products:
                  - id: 8a8082c45aa81b51015ad5a2d07d0e89
                    sku: SKU-00000987
                    name: ABC
                    description: ""
                    category: Base Products
                    effectiveStartDate: 2017-01-01
                    effectiveEndDate: 2020-01-01
                    productRatePlans: https://rest.zuora.com/v1/rateplan/40289f466463d683016463ef8b7301a0/productRatePlan
                success: true
      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/product/{product-id}":
    get:
      tags:
        - Catalog
      summary: Get product
      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_Entity_Ids_Single"
        - name: zuora-version
          in: header
          description: >
            The minor version of the Zuora REST API. 


            You only need to set this parameter if you use the `productRatePlans` field.
          schema:
            type: string
        - name: product-id
          in: path
          description: The unique ID of the product you want to retrieve. For example,
            8a808255575bdae4015774e9602e16fe.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETProductType"
            application/json:
              example:
                id: 8a8082c45aa81b51015ad5a2d07d0e89
                sku: SKU-00000987
                name: ABC
                description: ""
                category: Base Products
                effectiveStartDate: 2017-01-01
                effectiveEndDate: 2020-01-01
                productRatePlans: https://rest.zuora.com/v1/rateplan/40289f466463d683016463ef8b7301a0/productRatePlan
                success: true
      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/{product-id}/share":
    post:
      tags:
        - Catalog
      summary: "Multi-entity: Share a product with an Entity"
      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_Entity_Ids_Single"
        - name: product-id
          in: path
          description: The unique ID of the product you want to share. For example,
            8a808255575bdae4015774e9602e16fe.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTCatalogType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/charge-revenue-summaries/{crs-number}":
    get:
      tags:
        - Charge Revenue Summaries
      summary: Get charge summary details by CRS number
      description: >
        This REST API reference describes how to retrieve 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_Entity_Ids_Single"
        - name: crs-number
          in: path
          description: |
            The charge revenue summary number.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETChargeRSDetailType"
            application/json:
              example:
                number: CRS-00000001
                recognitionRuleName: Recognize upon invoicing
                amount: 660
                undistributedUnrecognizedRevenue: 565
                recognizedRevenue: 0
                unrecognizedRevenue: 660
                currency: USD
                accountId: 2c92c0f8439770960143b2141f5a555e
                subscriptionId: 2c92c0f943977b4f0143b23487999327
                subscriptionChargeId: 2c92c0f943977b4f0143b11187ed432e
                revenueItems:
                  - accountingPeriodName: Sep'2013
                    isAccountingPeriodClosed: false
                    amount: 35
                    currency: USD
                    accountingPeriodStartDate: 2013-09-01
                    accountingPeriodEndDate: 2013-09-30
                  - accountingPeriodName: Oct'2013
                    isAccountingPeriodClosed: false
                    amount: 50
                    currency: USD
                    accountingPeriodStartDate: 2013-10-01
                    accountingPeriodEndDate: 2013-10-31
                  - accountingPeriodName: Open-Ended
                    isAccountingPeriodClosed: false
                    amount: 150
                    currency: USD
                    accountingPeriodStartDate: 2013-12-11
                success: true
      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/charge-revenue-summaries/subscription-charges/{charge-key}":
    get:
      tags:
        - Charge Revenue Summaries
      summary: Get charge summary details by charge ID
      description: >
        This REST API reference describes how to retrieve 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_Entity_Ids_Single"
        - name: charge-key
          in: path
          description: >
            ID of the subscription rate plan charge; for example,
            402892793e173340013e173b81000012.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETChargeRSDetailType"
            application/json:
              example:
                number: CRS-00000001
                recognitionRuleName: Recognize daily over time
                amount: 428
                undistributedUnrecognizedRevenue: 0
                recognizedRevenue: 0
                unrecognizedRevenue: 428
                currency: USD
                accountId: 2c92c0f9410f55ee014110a008f6791f
                subscriptionId: 2c92c0f9410f55dd014110a14aa47f09
                subscriptionChargeId: 2c92c0f9410f55dd014110b22cbc023f
                revenueItems:
                  - accountingPeriodName: May 2012
                    isAccountingPeriodClosed: false
                    amount: 100
                    currency: USD
                    accountingPeriodStartDate: 2012-05-01
                    accountingPeriodEndDate: 2012-05-31
                  - accountingPeriodName: Jun 2012
                    isAccountingPeriodClosed: false
                    amount: 92
                    currency: USD
                    accountingPeriodStartDate: 2012-06-01
                    accountingPeriodEndDate: 2012-06-30
                  - accountingPeriodName: Jul 2012
                    isAccountingPeriodClosed: false
                    amount: 0
                    currency: USD
                    accountingPeriodStartDate: 2012-07-01
                    accountingPeriodEndDate: 2012-07-31
                  - accountingPeriodName: Aug 2012
                    isAccountingPeriodClosed: false
                    amount: 85
                    currency: USD
                    accountingPeriodStartDate: 2012-08-01
                    accountingPeriodEndDate: 2012-08-31
                  - accountingPeriodName: Sep 2012
                    isAccountingPeriodClosed: false
                    amount: 85
                    currency: USD
                    accountingPeriodStartDate: 2012-09-01
                    accountingPeriodEndDate: 2012-09-30
                  - accountingPeriodName: Jan'2013
                    isAccountingPeriodClosed: false
                    amount: 80
                    currency: USD
                    accountingPeriodStartDate: 2013-01-01
                    accountingPeriodEndDate: 2013-01-31
                  - accountingPeriodName: Feb'2013
                    isAccountingPeriodClosed: false
                    amount: 5
                    currency: USD
                    accountingPeriodStartDate: 2013-02-01
                    accountingPeriodEndDate: 2013-02-28
                  - accountingPeriodName: Sep'2013
                    isAccountingPeriodClosed: false
                    amount: -7
                    currency: USD
                    accountingPeriodStartDate: 2013-09-01
                    accountingPeriodEndDate: 2013-09-30
                  - accountingPeriodName: Nov'2013
                    isAccountingPeriodClosed: false
                    amount: -12
                    currency: USD
                    accountingPeriodStartDate: 2013-11-01
                    accountingPeriodEndDate: 2013-11-30
                  - accountingPeriodName: Dec 2013
                    isAccountingPeriodClosed: false
                    amount: 0
                    currency: USD
                    accountingPeriodStartDate: 2013-12-11
                    accountingPeriodEndDate: 2014-01-10
                  - accountingPeriodName: Open-Ended
                    isAccountingPeriodClosed: false
                    amount: 0
                    currency: USD
                    accountingPeriodStartDate: 2014-03-12
                success: true
      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/connections:
    post:
      tags:
        - Connections
      summary: Establish connection to Zuora REST API service
      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_Entity_Ids_Single"
        - name: apiAccessKeyId
          in: header
          description: |
            Account username
          required: true
          schema:
            type: string
        - name: apiSecretAccessKey
          in: header
          description: |
            Account password
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: |
            Must be set to "application/json"
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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:
      tags:
        - Contacts
      summary: Scrub contact
      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"
        - name: contactId
          in: path
          description: |
            The ID of the contact that you want to scrub sensitive data from.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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:
      tags:
        - Credit Memos
      summary: Get credit memos
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        Retrieves the information about all credit memos.


        ### 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=Processed


        - /v1/creditmemos?referredInvoiceId=null&status=Draft


        - /v1/creditmemos?status=Processed&type=External&sort=+number
      operationId: GET_CreditMemos
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: accountId
          in: query
          description: |
            This parameter filters the response based on the `accountId` field. 
          schema:
            type: string
        - name: amount
          in: query
          description: |
            This parameter filters the response based on the `amount` field. 
          schema:
            type: number
            format: double
        - name: appliedAmount
          in: query
          description: >
            This parameter filters the response based on the `appliedAmount`
            field. 
          schema:
            type: number
            format: double
        - name: autoApplyUponPosting
          in: query
          description: >
            This parameter filters the response based on the
            `autoApplyUponPosting` field. 
          schema:
            type: boolean
        - name: createdById
          in: query
          description: >
            This parameter filters the response based on the `createdById`
            field. 
          schema:
            type: string
        - name: createdDate
          in: query
          description: >
            This parameter filters the response based on the `createdDate`
            field. 
          schema:
            type: string
            format: date-time
        - name: creditMemoDate
          in: query
          description: >
            This parameter filters the response based on the `creditMemoDate`
            field. 
          schema:
            type: string
            format: date
        - name: currency
          in: query
          description: |
            This parameter filters the response based on the `currency` field. 
          schema:
            type: string
        - name: excludeFromAutoApplyRules
          in: query
          description: >
            This parameter filters the response based on the
            `excludeFromAutoApplyRules` field. 
          schema:
            type: boolean
        - name: number
          in: query
          description: |
            This parameter filters the response based on the `number` field. 
          schema:
            type: string
        - name: referredInvoiceId
          in: query
          description: >
            This parameter filters the response based on the `referredInvoiceId`
            field. 
          schema:
            type: string
        - name: refundAmount
          in: query
          description: >
            This parameter filters the response based on the `refundAmount`
            field. 
          schema:
            type: number
            format: double
        - name: status
          in: query
          description: |
            This parameter filters the response based on the `status` field. 
          schema:
            type: string
            enum:
              - Draft
              - Posted
              - Canceled
              - Error
              - PendingForTax
              - Generating
              - CancelInProgress
        - name: targetDate
          in: query
          description: >
            This parameter filters the response based on the `targetDate` field. 
          schema:
            type: string
            format: date
        - name: taxAmount
          in: query
          description: |
            This parameter filters the response based on the `taxAmount` field. 
          schema:
            type: number
            format: double
        - name: totalTaxExemptAmount
          in: query
          description: >
            This parameter filters the response based on the
            `totalTaxExemptAmount` field.
          schema:
            type: number
            format: double
        - name: transferredToAccounting
          in: query
          description: >
            This parameter filters the response based on the
            `transferredToAccounting` field. 
          schema:
            type: string
            enum:
              - Processing
              - Yes
              - No
              - Error
              - Ignore
        - name: unappliedAmount
          in: query
          description: >
            This parameter filters the response based on the `unappliedAmount`
            field. 
          schema:
            type: number
            format: double
        - name: updatedById
          in: query
          description: >
            This parameter filters the response based on the `updatedById`
            field. 
          schema:
            type: string
        - name: updatedDate
          in: query
          description: >
            This parameter filters the response based on the `updatedDate` field.
          schema:
            type: string
            format: date-time
        - name: sort
          in: query
          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
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoCollectionType"
            application/json:
              example:
                creditmemos:
                  - id: 2c92c8f95bd63b94015bd7c39289112e
                    number: CM00000002
                    accountId: 2c92c8f95bd63b98015bd7ab09ef0926
                    currency: USD
                    creditMemoDate: 2017-05-05
                    status: Draft
                    amount: 23
                    taxAmount: 0
                    totalTaxExemptAmount: 0
                    unappliedAmount: 23
                    refundAmount: 0
                    appliedAmount: 0
                    comment: ""
                    source: BillRun
                    sourceId: BR-00000024
                    reasonCode: Correcting invoice error
                    createdDate: 2017-05-05 01:39:30
                    createdById: 2c92c8f95b79c9ad015b80614273052c
                    updatedDate: 2017-05-05 01:39:30
                    updatedById: 2c92c8f95b79c9ad015b80614273052c
                    latestPDFFileId: 2c92c8955bd63b6c015bd7c395e90023
                    transferredToAccounting: No
                    excludeFromAutoApplyRules: false
                    autoApplyUponPosting: false
                  - id: 2c92c8f95bd63b9d015bd7ad7fe206f9
                    number: CM00000001
                    accountId: 2c92c8f95bd63b98015bd7ab09ef0926
                    currency: USD
                    creditMemoDate: 2017-05-01
                    status: Draft
                    amount: 10
                    taxAmount: 0
                    totalTaxExemptAmount: 0
                    unappliedAmount: 10
                    refundAmount: 0
                    appliedAmount: 0
                    comment: ""
                    source: AdhocFromInvoice
                    referredInvoiceId: 2c92c8955bd63cc1015bd7c151af02ab
                    reasonCode: Correcting invoice error
                    createdDate: 2017-05-05 01:15:23
                    createdById: 2c92c8f95b79c9ad015b80614273052c
                    updatedDate: 2017-05-05 01:15:24
                    updatedById: 2c92c8f95b79c9ad015b80614273052c
                    latestPDFFileId: 2c92c8955bd63b6c015bd7ad8921001d
                    transferredToAccounting: No
                    excludeFromAutoApplyRules: false
                    autoApplyUponPosting: false
                success: true
      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:
      tags:
        - Credit Memos
      summary: Create credit memo from charge
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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.
      operationId: POST_CreditMemoFromPrpc
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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`
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CreditMemoFromChargeType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
            application/json:
              example:
                id: 402890555a87d7f5015a88c7a6830022
                number: CM00000015
                accountId: 402890555a7e9791015a7f15fe44001c
                currency: USD
                creditMemoDate: 2017-10-17
                status: Draft
                amount: 2020
                taxAmount: 0
                totalTaxExemptAmount: 0
                unappliedAmount: 2020
                refundAmount: 0
                appliedAmount: 0
                comment: the comment
                source: AdhocFromPrpc
                reasonCode: Correcting invoice error
                createdDate: 2017-03-01 15:31:10
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 15:31:10
                updatedById: 402881e522cf4f9b0122cf5d82860002
                transferredToAccounting: No
                excludeFromAutoApplyRules: false
                autoApplyUponPosting: false
                success: true
      x-code-samples:
        - lang: Curl
          source: >-
            curl -X POST -H "Authorization: Bearer
            6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type:
            application/json" -d '{
                "accountId": "402890555a7e9791015a7f15fe44001c", 
                "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", 
                "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    \"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    \"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    \"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    \"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);
      x-codegen-request-body-name: body
  "/v1/creditmemos/{creditMemoId}":
    get:
      tags:
        - Credit Memos
      summary: Get credit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        Retrieves the information about a specific credit memo.
      operationId: GET_CreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
            application/json:
              example:
                id: 402890555a7e9791015a879f064a0054
                number: CM00000012
                accountId: 402890555a7e9791015a7f15fe44001c
                currency: USD
                creditMemoDate: 2017-03-01
                status: Draft
                amount: 3.1
                taxAmount: 0.1
                totalTaxExemptAmount: 0
                unappliedAmount: 3.1
                refundAmount: 0
                appliedAmount: 0
                comment: ""
                source: API
                referredInvoiceId: 402890555a7e9791015a7f1756aa0035
                reasonCode: Correcting invoice error
                createdDate: 2017-03-01 10:07:10
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 10:08:43
                updatedById: 402881e522cf4f9b0122cf5d82860002
                latestPDFFileId: 402890555a7e9791015a879f07fb005e
                transferredToAccounting: No
                excludeFromAutoApplyRules: false
                autoApplyUponPosting: false
                success: true
      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:
      tags:
        - Credit Memos
      summary: Update credit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172. 
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTCreditMemoType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
            application/json:
              example:
                id: 4028905f5a890526015a8d73f73d0015
                number: CM00000001
                accountId: 4028905f5a87c0ff015a87d25ae90025
                currency: USD
                creditMemoDate: 2017-03-02
                status: Draft
                amount: 10.76
                taxAmount: 0.76
                totalTaxExemptAmount: 0
                unappliedAmount: 10.76
                refundAmount: 0
                appliedAmount: 0
                comment: ""
                source: AdhocFromPrpc
                referredInvoiceId: 4028905f5a87c0ff015a87d3f8f10043
                reasonCode: Correcting invoice error
                createdDate: 2017-03-02 13:17:51
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-02 13:19:00
                updatedById: 402881e522cf4f9b0122cf5d82860002
                latestPDFFileId: 4028905f5a890526015a8d7408730024
                transferredToAccounting: No
                excludeFromAutoApplyRules: true
                autoApplyUponPosting: false
                success: true
      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);
      x-codegen-request-body-name: body
    delete:
      tags:
        - Credit Memos
      summary: Delete credit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/creditmemos/{creditMemoId}/apply":
    put:
      tags:
        - Credit Memos
      summary: Apply credit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/).


        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 applying a credit memo, the total number of invoices and debit memos that the credit memo will apply to must be less than or equal to 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_Entity_Ids_Single"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ApplyCreditMemoType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
            application/json:
              example:
                id: 4028905f5a890526015a8d73f73d0015
                number: CM00000001
                accountId: 4028905f5a87c0ff015a87d25ae90025
                currency: USD
                creditMemoDate: 2017-03-02
                postedById: 402881e522cf4f9b0122cf5d82860002
                postedOn: 2017-03-02 13:21:55
                status: Posted
                amount: 10.76
                taxAmount: 0.76
                totalTaxExemptAmount: 0
                unappliedAmount: 2.66
                refundAmount: 7.1
                appliedAmount: 1
                comment: ""
                source: AdhocFromPrpc
                referredInvoiceId: 4028905f5a87c0ff015a87d3f8f10043
                reasonCode: Correcting invoice error
                createdDate: 2017-03-02 13:17:51
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-02 13:25:29
                updatedById: 402881e522cf4f9b0122cf5d82860002
                latestPDFFileId: 4028905f5a890526015a8d77af600036
                transferredToAccounting: No
                excludeFromAutoApplyRules: true
                autoApplyUponPosting: false
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/creditmemos/{creditMemoId}/cancel":
    put:
      tags:
        - Credit Memos
      summary: Cancel credit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
            application/json:
              example:
                id: 402890555a87d7f5015a88c7a6830022
                number: CM00000015
                accountId: 402890555a7e9791015a7f15fe44001c
                currency: USD
                creditMemoDate: 2017-10-17
                status: Canceled
                amount: 2020
                taxAmount: 0
                totalTaxExemptAmount: 0
                unappliedAmount: 2020
                refundAmount: 0
                appliedAmount: 0
                comment: the comment
                source: AdhocFromPrpc
                reasonCode: Correcting invoice error
                createdDate: 2017-03-01 15:31:10
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 15:36:57
                updatedById: 402881e522cf4f9b0122cf5d82860002
                cancelledOn: 2017-09-03 19:59:07
                cancelledById: 402881e522cf4f9b0122cf5d82860002
                latestPDFFileId: 402890555a87d7f5015a88c7a7a2002a
                transferredToAccounting: No
                excludeFromAutoApplyRules: false
                autoApplyUponPosting: false
                success: true
      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:
      tags:
        - Credit Memos
      summary: Email credit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: creditMemoId
          in: path
          description: >
            The ID of a posted credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostCreditMemoEmailRequestType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/creditmemos/{creditMemoId}/files":
    post:
      tags:
        - Credit Memos
      summary: Upload file for credit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        Uploads an externally generated PDF file for a credit memo that is in Draft or Posted status.


        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"
        - name: creditMemoId
          in: path
          description: >
            The ID of the credit memo that you want to upload a PDF file for.
            For example, 402890555a7e9791015a879f064a0054.
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  type: string
                  description: |
                    The PDF file to upload for the credit memo.
                  format: binary
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTUploadFileResponse"
            application/json:
              example:
                success: true
                fileId: 40289f466463d683016463ef8b7301a4
      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:
      tags:
        - Credit Memos
      summary: Get credit memo items
      description: >+
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
        - name: zuora-version
          in: header
          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`
          schema:
            type: string
        - name: amount
          in: query
          description: |
            This parameter filters the response based on the `amount` field. 
          schema:
            type: number
            format: double
        - name: appliedAmount
          in: query
          description: >
            This parameter filters the response based on the `appliedAmount`
            field.
          schema:
            type: number
            format: double
        - name: createdById
          in: query
          description: >
            This parameter filters the response based on the `createdById`
            field. 
          schema:
            type: string
        - name: createdDate
          in: query
          description: >
            This parameter filters the response based on the `createdDate`
            field. 
          schema:
            type: string
            format: date-time
        - name: id
          in: query
          description: |
            This parameter filters the response based on the `id` field. 
          schema:
            type: string
        - name: refundAmount
          in: query
          description: >
            This parameter filters the response based on the `refundAmount`
            field. 
          schema:
            type: number
            format: double
        - name: serviceEndDate
          in: query
          description: >
            This parameter filters the response based on the `serviceEndDate`
            field. 
          schema:
            type: string
            format: date
        - name: serviceStartDate
          in: query
          description: >
            This parameter filters the response based on the `serviceStartDate`
            field. 
          schema:
            type: string
            format: date
        - name: sku
          in: query
          description: |
            This parameter filters the response based on the `sku` field. 
          schema:
            type: string
        - name: skuName
          in: query
          description: |
            This parameter filters the response based on the `skuName` field. 
          schema:
            type: string
        - name: sourceItemId
          in: query
          description: >
            This parameter filters the response based on the `sourceItemId`
            field. 
          schema:
            type: string
        - name: subscriptionId
          in: query
          description: >
            This parameter filters the response based on the `subscriptionId`
            field.
          schema:
            type: string
        - name: updatedById
          in: query
          description: >
            This parameter filters the response based on the `updatedById`
            field. 
          schema:
            type: string
        - name: updatedDate
          in: query
          description: >
            This parameter filters the response based on the `updatedDate` field.
          schema:
            type: string
            format: date-time
        - name: sort
          in: query
          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
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoItemsListType"
            application/json:
              example:
                items:
                  - id: 402890555a7e9791015a879f064d0055
                    amount: 1
                    amountWithoutTax: 0
                    appliedAmount: 0
                    refundAmount: 0
                    unappliedAmount: 1
                    comment: ""
                    processingType: Charge
                    quantity: 1
                    sku: SKU-00000001
                    skuName: New Component
                    serviceStartDate: 2017-02-27
                    serviceEndDate: 2017-03-26
                    sourceItemType: InvoiceDetail
                    sourceItemId: 402890555a7e9791015a7f1756bc0037
                    createdDate: 2017-03-01 10:07:10
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 10:08:43
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    subscriptionId: 402890d25bec1155015bec35cc7c0bc7
                    unitOfMeasure: Each
                    unitPrice: 1
                    financeInformation: {}
                    taxationItems:
                      data:
                        - id: 402890555a7e9791015a87a072880062
                          taxAmount: 0.1
                          appliedAmount: 0
                          unappliedAmount: 0.1
                          refundAmount: 0
                          name: STATE TAX
                          exemptAmount: 0
                          jurisdiction: CALIFORNIA
                          locationCode: "06"
                          taxCode: ServiceTaxCode
                          taxCodeDescription: This is tax code description!
                          taxDate: 2016-09-30
                          taxRate: 0.0625
                          taxRateDescription: This is tax rate description!
                          taxRateType: Percentage
                          financeInformation:
                            onAccountAccountingCode: Check
                            onAccountAccountingCodeType: Cash
                            salesTaxPayableAccountingCode: Check
                            salesTaxPayableAccountingCodeType: Cash
                  - id: 402890555a7e9791015a879f06610056
                    amount: 2
                    amountWithoutTax: 2
                    appliedAmount: 0
                    refundAmount: 0
                    unappliedAmount: 2
                    comment: ""
                    processingType: Charge
                    quantity: 1
                    sku: SKU-00000001
                    skuName: New Component
                    serviceStartDate: 2017-02-27
                    serviceEndDate: 2017-03-26
                    sourceItemType: InvoiceDetail
                    sourceItemId: 402890555a7e9791015a7f1756bd0038
                    createdDate: 2017-03-01 10:07:10
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 10:07:10
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    subscriptionId: 402890d25bec1155015bec35cc7c0bc7
                    unitOfMeasure: Each
                    unitPrice: 2
                    financeInformation: {}
                    taxationItems:
                      data: []
                success: true
      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:
      tags:
        - Credit Memos
      summary: Get credit memo item
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/).


        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_Entity_Ids_Single"
        - name: cmitemid
          in: path
          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).
          required: true
          schema:
            type: string
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
        - name: zuora-version
          in: header
          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`
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoItemType"
            application/json:
              example:
                id: 402890555a7e9791015a879f064d0055
                amount: 1
                amountWithoutTax: 1
                appliedAmount: 0
                refundAmount: 0
                unappliedAmount: 1
                comment: ""
                processingType: Charge
                quantity: 1
                sku: SKU-00000001
                skuName: New Component
                serviceStartDate: 2017-02-27
                serviceEndDate: 2017-03-26
                sourceItemType: InvoiceDetail
                sourceItemId: 402890555a7e9791015a7f1756bc0037
                createdDate: 2017-03-01 10:07:10
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 10:08:43
                updatedById: 402881e522cf4f9b0122cf5d82860002
                subscriptionId: 402890d25bec1155015bec35cc7c0bc7
                unitOfMeasure: Each
                unitPrice: 1
                financeInformation: {}
                taxationItems:
                  data: []
                success: true
      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:
      tags:
        - Credit Memos
      summary: Get taxation items of credit memo item
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/).


        Retrieves information about the taxation items of a specific credit memo item. 
      operationId: GET_TaxationItemsOfCreditMemoItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_page"
        - name: cmitemid
          in: path
          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).
          required: true
          schema:
            type: string
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemsOfCreditMemoItemType"
            application/json:
              example:
                data:
                  - appliedAmount: 0
                    unappliedAmount: 10
                    refundAmount: 0
                    financeInformation: {}
                    id: 2c98901a68ff2680016903216a271a67
                    taxAmount: 10
                    name: taxName_0
                    exemptAmount: 10
                    jurisdiction: Jurisdiction
                    locationCode: "8"
                    taxCode: taxCode
                    taxCodeDescription: taxCodeDescription
                    taxDate: 2016-10-10
                    taxRate: 0.1
                    taxRateDescription: taxRateDescription
                    taxRateType: Percentage
                success: true
      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:
      tags:
        - Credit Memos
      summary: Get credit memo parts
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoPartsCollectionType"
            application/json:
              example:
                parts:
                  - id: 4028905f5a890526015a8d77adea0029
                    amount: 3.66
                    createdDate: 2017-03-02 13:21:55
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-02 13:21:55
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Credit Memos
      summary: Get credit memo part
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: partid
          in: path
          description: >
            The unique ID of a specific credit memo part. You can get the credit
            memo part ID from the response of [Get credit memo
            parts](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoParts).
          required: true
          schema:
            type: string
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoPartType"
            application/json:
              example:
                id: 4028905f5a890526015a8d9adeb30059
                invoiceId: 4028905f5a87c0ff015a87d3f8f10043
                amount: 1
                createdDate: 2017-03-02 14:00:21
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-02 14:00:21
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Credit Memos
      summary: Get credit memo part items
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: partid
          in: path
          description: >
            The unique ID of a specific credit memo part. You can get the credit
            memo part ID from the response of [Get credit memo
            parts](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoParts).
            .
          required: true
          schema:
            type: string
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoItemPartsCollectionType"
            application/json:
              example:
                itemParts:
                  - id: 4028905f5a890526015a8d77ae01002c
                    amount: 2.1
                    creditMemoItemId: 4028905f5a890526015a8d73f74b0016
                    createdDate: 2017-03-02 13:21:55
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-02 13:47:20
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                  - id: 4028905f5a890526015a8d77ae02002e
                    amount: 0.05
                    creditTaxItemId: 4028905f5a890526015a8d73f90c0018
                    createdDate: 2017-03-02 13:21:55
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-02 13:47:20
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                  - id: 4028905f5a890526015a8d77ae030030
                    amount: 0.51
                    creditTaxItemId: 4028905f5a890526015a8d73f90c0019
                    createdDate: 2017-03-02 13:21:55
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-02 13:21:55
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Credit Memos
      summary: Get credit memo part item
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/).


        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_Entity_Ids_Single"
        - name: partid
          in: path
          description: >
            The unique ID of a specific credit memo part. You can get the credit
            memo part ID from the response of [Get credit memo
            parts](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoParts).
          required: true
          schema:
            type: string
        - name: itempartid
          in: path
          description: >
            The unique ID of a specific credit memo part item. You can get the
            credit memo part item ID from the response of [Get credit memo part
            items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItemParts).
          required: true
          schema:
            type: string
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoItemPartType"
            application/json:
              example:
                id: 4028905f5a890526015a8d9adeb5005c
                amount: 0.9
                creditMemoItemId: 4028905f5a890526015a8d73f74b0016
                invoiceItemId: 4028905f5a87c0ff015a87d3f90c0045
                createdDate: 2017-03-02 14:00:21
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-02 14:00:21
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Credit Memos
      summary: Create credit memo PDF
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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 user permission "Regenerate PDF" enabled.
      operationId: POST_CreditMemoPDF
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of the credit memo that you want to create a PDF file
            for. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTMemoPdfResponse"
            application/json:
              example:
                success: true
      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:
      tags:
        - Credit Memos
      summary: Post credit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
            application/json:
              example:
                id: 402890555a7e9791015a879f064a0054
                number: CM00000012
                accountId: 402890555a7e9791015a7f15fe44001c
                currency: USD
                creditMemoDate: 2017-03-01
                postedById: 402881e522cf4f9b0122cf5d82860002
                postedOn: 2017-03-01 14:28:06
                status: Posted
                amount: 3.1
                taxAmount: 0.1
                totalTaxExemptAmount: 0
                unappliedAmount: 3.1
                refundAmount: 0
                appliedAmount: 0
                comment: ""
                source: API
                referredInvoiceId: 402890555a7e9791015a7f1756aa0035
                reasonCode: Correcting invoice error
                createdDate: 2017-03-01 10:07:10
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 14:28:06
                updatedById: 402881e522cf4f9b0122cf5d82860002
                transferredToAccounting: No
                excludeFromAutoApplyRules: false
                autoApplyUponPosting: false
                success: true
      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}/refunds":
    post:
      tags:
        - Credit Memos
      summary: Refund credit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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.
      operationId: POST_RefundCreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: creditmemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostNonRefRefundType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundCreditMemoType"
            application/json:
              example:
                id: 4028905f5a890526015a8d7af4280039
                number: R-00000002
                status: Processed
                type: External
                methodType: CreditCard
                accountId: 4028905f5a87c0ff015a87d25ae90025
                amount: 7.1
                refundDate: 2017-03-02
                creditMemoId: 4028905f5a890526015a8d73f73d0015
                reasonCode: Standard Refund
                gatewayState: NotSubmitted
                createdDate: 2017-03-02 13:25:29
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-02 13:25:29
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      x-code-samples:
        - lang: Curl
          source: >-
            curl -X POST -H "Authorization: Bearer
            6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type:
            application/json" -d '{
                "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('{
                "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    \"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    \"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    \"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    \"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);
      x-codegen-request-body-name: body
  "/v1/creditmemos/{creditMemoId}/taxationitems":
    post:
      tags:
        - Credit Memos
      summary: Create taxation items for credit memo
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 taxation items for a credit memo.
      operationId: POST_CM_TaxationItems
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTTaxationItemListForCMType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemListType"
            application/json:
              example:
                taxationItems:
                  - createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 10:08:43
                    exemptAmount: 0
                    id: 402890555a7e9791015a87a072880062
                    memoItemId: 402890555a7e9791015a879f064d0055
                    sourceTaxItemId: 402890555a7d4022015a7db254e200c1
                    jurisdiction: CALIFORNIA
                    locationCode: "06"
                    name: STATE TAX
                    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
                    financeInformation:
                      onAccountAccountingCode: Check
                      onAccountAccountingCodeType: Cash
                      salesTaxPayableAccountingCode: Check
                      salesTaxPayableAccountingCodeType: Cash
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/creditmemos/{creditMemoId}/unapply":
    put:
      tags:
        - Credit Memos
      summary: Unapply credit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/).


        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 unapplying a credit memo, the total number of invoices and debit memos that the credit memo will be unapplied from must be less than or equal to 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_Entity_Ids_Single"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/UnapplyCreditMemoType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
            application/json:
              example:
                id: 4028905f5a890526015a8d73f73d0015
                number: CM00000001
                accountId: 4028905f5a87c0ff015a87d25ae90025
                currency: USD
                creditMemoDate: 2017-03-02
                postedById: 402881e522cf4f9b0122cf5d82860002
                postedOn: 2017-03-02 13:21:55
                status: Posted
                amount: 10.76
                taxAmount: 0.76
                totalTaxExemptAmount: 0
                unappliedAmount: 3.66
                refundAmount: 7.1
                appliedAmount: 0
                comment: ""
                source: AdhocFromPrpc
                referredInvoiceId: 4028905f5a87c0ff015a87d3f8f10043
                reasonCode: Correcting invoice error
                createdDate: 2017-03-02 13:17:51
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-02 13:25:29
                updatedById: 402881e522cf4f9b0122cf5d82860002
                latestPDFFileId: 4028905f5a890526015a8d77af600036
                transferredToAccounting: No
                excludeFromAutoApplyRules: true
                autoApplyUponPosting: false
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/creditmemos/{creditMemoId}/unpost":
    put:
      tags:
        - Credit Memos
      summary: Unpost credit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: creditMemoId
          in: path
          description: >
            The unique ID of a credit memo. For example,
            8a8082e65b27f6c3015ba45ff82c7172.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
            application/json:
              example:
                id: 402890555a7e9791015a879f064a0054
                number: CM00000012
                accountId: 402890555a7e9791015a7f15fe44001c
                currency: USD
                creditMemoDate: 2017-03-01
                postedById: 402881e522cf4f9b0122cf5d82860002
                postedOn: 2017-03-01 14:28:06
                status: Draft
                amount: 3.1
                taxAmount: 0.1
                totalTaxExemptAmount: 0
                unappliedAmount: 3.1
                refundAmount: 0
                appliedAmount: 0
                comment: ""
                source: API
                referredInvoiceId: 402890555a7e9791015a7f1756aa0035
                reasonCode: Correcting invoice error
                createdDate: 2017-03-01 10:07:10
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 14:28:06
                updatedById: 402881e522cf4f9b0122cf5d82860002
                transferredToAccounting: No
                excludeFromAutoApplyRules: false
                autoApplyUponPosting: false
                success: true
      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/custom-exchange-rates/{currency}":
    get:
      tags:
        - Custom Exchange Rates
      summary: Get custom foreign currency exchange rates
      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_Entity_Ids_Single"
        - name: currency
          in: path
          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. 
          required: true
          schema:
            type: string
        - name: startDate
          in: query
          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.
          required: true
          schema:
            type: string
        - name: endDate
          in: query
          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.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCustomExchangeRatesType"
            application/json:
              example:
                success: true
                inverse: false
                rates:
                  2019-04-28:
                    providerExchangeRateDate: 2019-04-28
                    GBP: 1.135239621
                    USD: 0.889028445
                  2019-04-29:
                    providerExchangeRateDate: 2019-04-29
                    GBP: 1.134623962
                    USD: 0.892140244
                  2019-04-30:
                    providerExchangeRateDate: 2019-04-30
                    GBP: 1.134589832
                    USD: 0.892243287
      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);
  /objects/definitions/default:
    get:
      tags:
        - Custom Object Definitions
      summary: Get all custom object definitions
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Get all custom objects definitions for a given tenant.
      operationId: GET_AllCustomObjectDefinitionsInNamespace
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
        - name: select
          in: query
          description: >
            If you set `select` to `type`, the response will only contain the
            `type` of each custom object.
          schema:
            type: string
            enum:
              - type
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAllCustomObjectDefinitionsInNamespaceResponse"
      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:
      tags:
        - Custom Object Definitions
      summary: Create custom object definition
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Post custom object definition with the given type.


        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_CustomObjectDefinition
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
      requestBody:
        description: The custom object definition to be created
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostCustomObjectDefinitionRequest"
        required: true
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectDefinition"
        "400":
          description: Bad request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
      x-code-samples:
        - lang: Curl
          source: >-
            curl -X POST -H "Authorization: Bearer
            6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type:
            application/json" -d '{
                "label": "Birth Place Custom Object", 
                "object": "birth_place_custom_object", 
                "properties": {
                    "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": {
                            "city__c": "Id"
                        }, 
                        "namespace": "default", 
                        "object": "city"
                    }, 
                    {
                        "cardinality": "manyToOne", 
                        "fields": {
                            "state__c": "Id"
                        }, 
                        "namespace": "default", 
                        "object": "state"
                    }
                ], 
                "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('{
                "label": "Birth Place Custom Object", 
                "object": "birth_place_custom_object", 
                "properties": {
                    "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": {
                            "city__c": "Id"
                        }, 
                        "namespace": "default", 
                        "object": "city"
                    }, 
                    {
                        "cardinality": "manyToOne", 
                        "fields": {
                            "state__c": "Id"
                        }, 
                        "namespace": "default", 
                        "object": "state"
                    }
                ], 
                "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    \"label\": \"Birth Place Custom Object\", \n    \"object\": \"birth_place_custom_object\", \n    \"properties\": {\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                \"city__c\": \"Id\"\n            }, \n            \"namespace\": \"default\", \n            \"object\": \"city\"\n        }, \n        {\n            \"cardinality\": \"manyToOne\", \n            \"fields\": {\n                \"state__c\": \"Id\"\n            }, \n            \"namespace\": \"default\", \n            \"object\": \"state\"\n        }\n    ], \n    \"required\": [\n        \"city__c\", \n        \"state__c\", \n        \"country__c\"\n    ], \n    \"type\": \"object\"\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    \"label\": \"Birth Place Custom Object\", \n    \"object\": \"birth_place_custom_object\", \n    \"properties\": {\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                \"city__c\": \"Id\"\n            }, \n            \"namespace\": \"default\", \n            \"object\": \"city\"\n        }, \n        {\n            \"cardinality\": \"manyToOne\", \n            \"fields\": {\n                \"state__c\": \"Id\"\n            }, \n            \"namespace\": \"default\", \n            \"object\": \"state\"\n        }\n    ], \n    \"required\": [\n        \"city__c\", \n        \"state__c\", \n        \"country__c\"\n    ], \n    \"type\": \"object\"\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    \"label\": \"Birth Place Custom Object\", \n    \"object\": \"birth_place_custom_object\", \n    \"properties\": {\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                \"city__c\": \"Id\"\n            }, \n            \"namespace\": \"default\", \n            \"object\": \"city\"\n        }, \n        {\n            \"cardinality\": \"manyToOne\", \n            \"fields\": {\n                \"state__c\": \"Id\"\n            }, \n            \"namespace\": \"default\", \n            \"object\": \"state\"\n        }\n    ], \n    \"required\": [\n        \"city__c\", \n        \"state__c\", \n        \"country__c\"\n    ], \n    \"type\": \"object\"\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    \"label\": \"Birth Place Custom Object\", \n    \"object\": \"birth_place_custom_object\", \n    \"properties\": {\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                \"city__c\": \"Id\"\n            }, \n            \"namespace\": \"default\", \n            \"object\": \"city\"\n        }, \n        {\n            \"cardinality\": \"manyToOne\", \n            \"fields\": {\n                \"state__c\": \"Id\"\n            }, \n            \"namespace\": \"default\", \n            \"object\": \"state\"\n        }\n    ], \n    \"required\": [\n        \"city__c\", \n        \"state__c\", \n        \"country__c\"\n    ], \n    \"type\": \"object\"\n}", ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
      x-codegen-request-body-name: custom object definition
  "/objects/definitions/default/{object}":
    get:
      tags:
        - Custom Object Definitions
      summary: Get custom object definition
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Get the custom object definition by type for the given tenant.
      operationId: GET_CustomObjectDefinitionByType
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
        - name: object
          in: path
          description: Specifies the custom object's API name as object. It is
            case-sensitive.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectDefinition"
        "404":
          description: Resource Request-URI not found.
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
      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);
    delete:
      tags:
        - Custom Object Definitions
      summary: Delete custom object definition
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Delete 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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
        - name: object
          in: path
          description: Specifies the custom object's API name as object. It is
            case-sensitive.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: string
                description: The URI of the deleted custom object definition
                format: uri
                example: /objects/definitions/default/test_custom_object
      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);
  /objects/migrations:
    post:
      tags:
        - Custom Object Definitions
      summary: Update custom object definition
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Update 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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
      requestBody:
        description: Migration resource for object and namespace changes.
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/MigrationUpdateCustomObjectDefinitionsRequest"
        required: true
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/MigrationUpdateCustomObjectDefinitionsResponse"
      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);
      x-codegen-request-body-name: migration
  "/objects/records/default/{object}":
    get:
      tags:
        - Custom Object Records
      summary: Query custom object records
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Get 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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
        - name: object
          in: path
          description: Specifies the custom object's API name as object. It is
            case-sensitive.
          required: true
          schema:
            type: string
        - name: q
          in: query
          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.
          schema:
            type: string
        - name: ids
          in: query
          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`
          schema:
            type: string
        - name: pageSize
          in: query
          description: Page size. The value must be between 1 and 1000.
          schema:
            type: integer
        - name: cursor
          in: query
          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.
          schema:
            type: string
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/QueryCustomObjectRecordsResponse"
      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:
      tags:
        - Custom Object Records
      summary: Create custom object records
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Create 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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
        - name: object
          in: path
          description: Specifies the custom object's API name as object. It is
            case-sensitive.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostCustomObjectRecordsRequest"
        required: true
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PostCustomObjectRecordsResponse"
        "400":
          description: Bad request
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: |
                      The error code.
                    format: int32
                  message:
                    type: string
                    description: >
                      The error message that tells you what invalid data are
                      submitted. For example, data does not match the field
                      types defined on the custom object. When you get the 400
                      response, the entire payload is rejected. You must correct
                      the error before submitting the payload again.
            application/json:
              example:
                code: 400
                message: 'Json input does not match schema. Error(s): instance type (string)
                  does not match any allowed primitive type (allowed:
                  ["integer"])'
      x-code-samples:
        - lang: Curl
          source: "curl -X POST -H \"Authorization: Bearer
            6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type:
            application/json\" -d '{}'
            \"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('{}');


            try {
              $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/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 = "{}"


            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 = "{}"

            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", "{}", ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
      x-codegen-request-body-name: custom objects records
  "/objects/records/default/{object}/{id}":
    get:
      tags:
        - Custom Object Records
      summary: Get custom object record
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Get a record of a given type by ID.
      operationId: GET_CustomObjectRecordByID
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
        - name: object
          in: path
          description: Specifies the custom object's API name as object. It is
            case-sensitive.
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Id identifier in uuid form
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordWithAllFields"
        "404":
          description: Not exist
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
      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);
    put:
      tags:
        - Custom Object Records
      summary: Update custom object record
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Update 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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_If_Match"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
        - name: object
          in: path
          description: Specifies the custom object's API name as object. It is
            case-sensitive.
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Id identifier in uuid form
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CustomObjectRecordWithOnlyCustomFields"
        required: true
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordWithAllFields"
        "404":
          description: Object record does not exist
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
      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);
      x-codegen-request-body-name: objectRecordRequest
    delete:
      tags:
        - Custom Object Records
      summary: Delete custom object record
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Delete 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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
        - name: object
          in: path
          description: Specifies the custom object's API name as object. It is
            case-sensitive.
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Id identifier in uuid form
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: string
                description: The URI of the deleted custom object record
                format: uri
                example: /objects/records/default/test_custom_object/3a437f0b-fa7a-45bf-a9a5-2187a5a13ec0
      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);
    patch:
      tags:
        - Custom Object Records
      summary: Update individual fields in a custom object record
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Update 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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
        - name: object
          in: path
          description: Specifies the custom object's API name as object. It is
            case-sensitive.
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Id identifier in uuid form
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/merge-patch+json:
            schema:
              $ref: "#/components/schemas/CustomObjectRecordWithOnlyCustomFields"
        required: true
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordWithAllFields"
        "404":
          description: Object record does not exist
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
      x-code-samples: []
      x-codegen-request-body-name: objectRecordPatchRequest
  "/objects/batch/default/{object}":
    post:
      tags:
        - Custom Object Records
      summary: Update or delete custom object records as a batch
      description: >
        **Note:** The Custom Objects is an **Early Adopter** feature for
        existing customers. We are improving the product with feedback from
        early adopters, and aim to make the feature Generally Available soon.


        Make 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: 
          ```
          {
            "records": [
              {
                "fieldName__c": null
              }
            ]
          }
          ```
      operationId: POST_CustomObjectRecordsBatchUpdateOrDelete
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - name: Zuora-Version
          in: header
          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.
          schema:
            type: string
            format: date
        - name: object
          in: path
          description: Specifies the custom object's API name as object. It is
            case-sensitive.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CustomObjectRecordBatchRequest"
        required: true
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordBatchResponse"
        "400":
          description: Bad request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
      x-code-samples:
        - lang: Curl
          source: >-
            curl -X POST -H "Authorization: Bearer
            6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type:
            application/json" -d '{
                "action": {
                    "records": {
                        "64edb2a5-2796-4e95-9559-846f8636a01b": {
                            "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": {
                    "records": {
                        "64edb2a5-2796-4e95-9559-846f8636a01b": {
                            "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        \"records\": {\n            \"64edb2a5-2796-4e95-9559-846f8636a01b\": {\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        \"records\": {\n            \"64edb2a5-2796-4e95-9559-846f8636a01b\": {\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        \"records\": {\n            \"64edb2a5-2796-4e95-9559-846f8636a01b\": {\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        \"records\": {\n            \"64edb2a5-2796-4e95-9559-846f8636a01b\": {\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);
      x-codegen-request-body-name: CustomObjectRecordBatchRequest
  /query/jobs:
    get:
      tags:
        - Data Queries
      summary: Get data query jobs
      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.
      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"
        - name: queryStatus
          in: query
          description: |
            Filters the list of query jobs by status.
          schema:
            type: string
            enum:
              - accepted
              - in_progress
              - completed
              - failed
              - cancelled
        - name: pageSize
          in: query
          description: |
            Specifies the maximum number of query jobs to return.
          schema:
            maximum: 100
            type: integer
            default: 20
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetDataQueryJobsResponse"
            application/json:
              example:
                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
                  - id: 3a3e85c4-96e7-486b-ae02-827120104301
                    query: SELECT accountnumber, balance FROM Account WHERE Account.balance > 100
                    queryStatus: completed
                    dataFile: https://example.s3.us-west-2.amazonaws.com/3a3e85c4-96e7-486b-ae02-827120104301_24921638725108715.json?X-Amz-Security-Token=...
                    outputRows: 24516
                    processingTime: 9212
                    remainingRetries: 3
                    updatedOn: 2018-08-17T13:14:19.17Z
      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:
      tags:
        - Data Queries
      summary: Submit data query
      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 [Get 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":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/SubmitDataQueryResponse"
            application/json:
              example:
                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
        "400":
          description: Bad Request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DataQueryErrorResponse"
            application/json:
              example:
                code: 400
                message: Unable to process JSON
      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);
      x-codegen-request-body-name: body
  "/query/jobs/{job-id}":
    get:
      tags:
        - Data Queries
      summary: Get data query job
      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.
      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"
        - name: job-id
          in: path
          description: |
            Internal identifier of the query job.
          required: true
          schema:
            maxLength: 36
            minLength: 36
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetDataQueryJobResponse"
            application/json:
              example:
                data:
                  id: 3a3e85c4-96e7-486b-ae02-827120104301
                  query: SELECT accountnumber, balance FROM Account WHERE Account.balance > 100
                  queryStatus: completed
                  dataFile: https://example.s3.us-west-2.amazonaws.com/3a3e85c4-96e7-486b-ae02-827120104301_24921638725108715.json?X-Amz-Security-Token=...
                  outputRows: 24516
                  processingTime: 9212
                  remainingRetries: 3
                  updatedOn: 2018-08-17T13:14:19.17Z
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DataQueryErrorResponse"
            application/json:
              example:
                code: 1001
                message: "No such query: 1e8e8586-5366-4cdf-a01d-fae3b2cf8427"
      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);
    delete:
      tags:
        - Data Queries
      summary: Cancel data query job
      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"
        - name: job-id
          in: path
          description: |
            Internal identifier of the query job.
          required: true
          schema:
            maxLength: 64
            minLength: 64
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DeleteDataQueryJobResponse"
            application/json:
              example:
                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
        "400":
          description: Bad Request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DataQueryErrorResponse"
            application/json:
              example:
                code: 1003
                message: Query job c20a8ff4-3960-4c85-b067-d5259035f523 is not in accepted or
                  in_progress status
      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);
  /v1/debitmemos:
    get:
      tags:
        - Debit Memos
      summary: Get debit memos
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/).


        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=Processed


        - /v1/debitmemos?referredInvoiceId=null&status=Draft


        - /v1/debitmemos?status=Processed&type=External&sort=+number
      operationId: GET_DebitMemos
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: accountId
          in: query
          description: |
            This parameter filters the response based on the `accountId` field.
          schema:
            type: string
        - name: amount
          in: query
          description: |
            This parameter filters the response based on the `amount` field.
          schema:
            type: number
            format: double
        - name: balance
          in: query
          description: |
            This parameter filters the response based on the `balance` field.
          schema:
            type: number
            format: double
        - name: beAppliedAmount
          in: query
          description: >
            This parameter filters the response based on the `beAppliedAmount`
            field.
          schema:
            type: number
            format: double
        - name: createdById
          in: query
          description: >
            This parameter filters the response based on the `createdById` field.
          schema:
            type: string
        - name: createdDate
          in: query
          description: >
            This parameter filters the response based on the `createdDate` field.
          schema:
            type: string
            format: date-time
        - name: currency
          in: query
          description: |
            This parameter filters the response based on the `currency` field.
          schema:
            type: string
        - name: debitMemoDate
          in: query
          description: >
            This parameter filters the response based on the `debitMemoDate`
            field.
          schema:
            type: string
            format: date
        - name: dueDate
          in: query
          description: |
            This parameter filters the response based on the `dueDate` field.
          schema:
            type: string
            format: date
        - name: number
          in: query
          description: |
            This parameter filters the response based on the `number` field.
          schema:
            type: string
        - name: referredInvoiceId
          in: query
          description: >
            This parameter filters the response based on the `referredInvoiceId`
            field.
          schema:
            type: string
        - name: status
          in: query
          description: |
            This parameter filters the response based on the `status` field.
          schema:
            type: string
            enum:
              - Draft
              - Posted
              - Canceled
              - Error
              - PendingForTax
              - Generating
              - CancelInProgress
        - name: targetDate
          in: query
          description: |
            This parameter filters the response based on the `targetDate` field.
          schema:
            type: string
            format: date
        - name: taxAmount
          in: query
          description: |
            This parameter filters the response based on the `taxAmount` field.
          schema:
            type: number
            format: double
        - name: totalTaxExemptAmount
          in: query
          description: >
            This parameter filters the response based on the
            `totalTaxExemptAmount` field.
          schema:
            type: number
            format: double
        - name: updatedById
          in: query
          description: >
            This parameter filters the response based on the `updatedById` field.
          schema:
            type: string
        - name: updatedDate
          in: query
          description: >
            This parameter filters the response based on the `updatedDate` field.
          schema:
            type: string
            format: date-time
        - name: sort
          in: query
          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
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoCollectionType"
            application/json:
              example:
                debitmemos:
                  - id: 402890555a87d7f5015a892f2ba10057
                    number: DM00000006
                    accountId: 402890555a7e9791015a7f15fe44001c
                    debitMemoDate: 2017-10-17
                    dueDate: 2017-11-16
                    status: Draft
                    amount: 50
                    taxAmount: 0
                    totalTaxExemptAmount: 0
                    balance: 50
                    beAppliedAmount: 0
                    autoPay: true
                    comment: the comment
                    transferredToAccounting: No
                    reasonCode: Correcting invoice error
                    createdDate: 2017-03-01 17:24:14
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 17:24:14
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    latestPDFFileId: 402890555a87d7f5015a892f2c5c0060
                  - id: 402890555a87d7f5015a89251edc0045
                    number: DM00000003
                    accountId: 402890555a7d4022015a7dabf5f60088
                    debitMemoDate: 2017-11-30
                    dueDate: 2017-12-30
                    status: Draft
                    amount: 0.01
                    taxAmount: 0.01
                    totalTaxExemptAmount: 0
                    balance: 0.01
                    beAppliedAmount: 0
                    autoPay: true
                    comment: the comment
                    referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                    transferredToAccounting: No
                    reasonCode: Charge Dispute
                    createdDate: 2017-03-01 17:13:15
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 17:13:15
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                  - id: 402890555a87d7f5015a8919e4fe002e
                    number: DM00000002
                    accountId: 402890555a7d4022015a7dabf5f60088
                    debitMemoDate: 2017-03-01
                    dueDate: 2017-03-31
                    status: Draft
                    amount: 9
                    taxAmount: 8
                    totalTaxExemptAmount: 0
                    balance: 9
                    beAppliedAmount: 0
                    autoPay: true
                    comment: ""
                    referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                    transferredToAccounting: No
                    reasonCode: Correcting invoice error
                    createdDate: 2017-03-01 17:01:00
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 17:01:00
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    latestPDFFileId: 402890555a87d7f5015a8919e95d003a
                  - id: 402890555a7e9791015a87b082940067
                    number: DM00000001
                    accountId: 402890555a7e9791015a7f15fe44001c
                    debitMemoDate: 2017-03-01
                    dueDate: 2017-03-31
                    status: Draft
                    amount: 8.02
                    taxAmount: 0.02
                    totalTaxExemptAmount: 0
                    balance: 8.02
                    beAppliedAmount: 0
                    autoPay: true
                    comment: ""
                    referredInvoiceId: 402890555a7e9791015a7f1756aa0035
                    transferredToAccounting: No
                    reasonCode: Correcting invoice error
                    createdDate: 2017-03-01 10:26:16
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 10:45:03
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    latestPDFFileId: 402890555a7e9791015a87b083f00072
                success: true
      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);
    put:
      tags:
        - Debit Memos
      summary: Update debit memos
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/).


        Updates the due date for multiple debit memos in batches with one call. 
      operationId: PUT_BatchUpdateDebitMemos
      parameters:
        - $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":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: body
    post:
      tags:
        - Debit Memos
      summary: Create debit memo from charge
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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`
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/DebitMemoFromChargeType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
            application/json:
              example:
                id: 402890555a87d7f5015a892f2ba10057
                number: DM00000006
                accountId: 402890555a7e9791015a7f15fe44001c
                debitMemoDate: 2017-10-17
                dueDate: 2017-11-16
                status: Draft
                amount: 50
                taxAmount: 0
                totalTaxExemptAmount: 0
                balance: 50
                beAppliedAmount: 0
                autoPay: true
                comment: the comment
                transferredToAccounting: No
                reasonCode: Correcting invoice error
                createdDate: 2017-03-01 17:24:14
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 17:24:14
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      x-code-samples:
        - lang: Curl
          source: >-
            curl -X POST -H "Authorization: Bearer
            6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type:
            application/json" -d '{
                "accountId": "402890555a7e9791015a7f15fe44001c", 
                "autoPay": true, 
                "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, 
                "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    \"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    \"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    \"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    \"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);
      x-codegen-request-body-name: body
  "/v1/debitmemos/{debitMemoId}":
    get:
      tags:
        - Debit Memos
      summary: Get debit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        Retrieves the information about a specific debit memo.
      operationId: GET_DebitMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: debitMemoId
          in: path
          description: >
            The unique ID of a debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
            application/json:
              example:
                id: 402890555a87d7f5015a8919e4fe002e
                number: DM00000002
                accountId: 402890555a7d4022015a7dabf5f60088
                debitMemoDate: 2017-03-01
                dueDate: 2017-03-31
                status: Draft
                amount: 9
                taxAmount: 8
                totalTaxExemptAmount: 0
                balance: 9
                beAppliedAmount: 0
                autoPay: true
                comment: ""
                referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                transferredToAccounting: No
                reasonCode: Correcting invoice error
                createdDate: 2017-03-01 17:01:00
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 17:01:00
                updatedById: 402881e522cf4f9b0122cf5d82860002
                latestPDFFileId: 402890555a87d7f5015a8919e95d003a
                success: true
      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:
      tags:
        - Debit Memos
      summary: Update debit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: debitMemoId
          in: path
          description: >
            The unique ID of a debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTDebitMemoType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
            application/json:
              example:
                id: 4028905f5a890526015a8db30954007a
                number: DM00000003
                accountId: 4028905f5a87c0ff015a87d25ae90025
                debitMemoDate: 2017-03-02
                dueDate: 2017-04-01
                status: Draft
                amount: 12.9
                taxAmount: 0.9
                totalTaxExemptAmount: 0
                balance: 12.9
                beAppliedAmount: 0
                autoPay: true
                comment: ""
                referredInvoiceId: 4028905f5a87c0ff015a87d3f8f10043
                transferredToAccounting: No
                reasonCode: Correcting invoice error
                createdDate: 2017-03-02 14:26:45
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-02 14:27:05
                updatedById: 402881e522cf4f9b0122cf5d82860002
                latestPDFFileId: 4028905f5a890526015a8db30a570085
                success: true
      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);
      x-codegen-request-body-name: body
    delete:
      tags:
        - Debit Memos
      summary: Delete debit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: debitMemoId
          in: path
          description: >
            The unique ID of a debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/debitmemos/{debitMemoId}/application-parts":
    get:
      tags:
        - Debit Memos
      summary: Get debit memo application parts
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: debitMemoId
          in: path
          description: >
            The unique ID of a debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetDebitMemoApplicationPartCollectionType"
            application/json:
              example:
                applicationParts:
                  - creditMemoId: 4028905f60a165a50160b4f632ff023d
                    appliedAmount: 22
                    createdDate: 2018-01-02 11:42:16
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2018-01-02 11:42:16
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                  - paymentId: 4028905f60a165a50160b4f5d5cb0229
                    appliedAmount: 11
                    createdDate: 2018-01-02 11:41:38
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2018-01-02 11:41:38
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Debit Memos
      summary: Cancel debit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: debitMemoId
          in: path
          description: >
            The unique ID of a debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
            application/json:
              example:
                id: 402890555a87d7f5015a89251edc0045
                number: DM00000003
                accountId: 402890555a7d4022015a7dabf5f60088
                debitMemoDate: 2017-11-30
                dueDate: 2017-12-30
                status: Canceled
                amount: 0.01
                taxAmount: 0.01
                totalTaxExemptAmount: 0
                balance: 0.01
                beAppliedAmount: 0
                autoPay: true
                comment: the comment
                referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                transferredToAccounting: No
                reasonCode: Charge Dispute
                createdDate: 2017-03-01 17:13:15
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 17:57:26
                updatedById: 402881e522cf4f9b0122cf5d82860002
                cancelledOn: 2017-09-01 19:59:07
                cancelledById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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}/emails":
    post:
      tags:
        - Debit Memos
      summary: Email debit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: debitMemoId
          in: path
          description: >
            The ID of a posted debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostDebitMemoEmailType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/debitmemos/{debitMemoId}/files":
    post:
      tags:
        - Debit Memos
      summary: Upload file for debit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        Uploads an externally generated PDF file for a debit memo that is in Draft or Posted status.


        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"
        - name: debitMemoId
          in: path
          description: >
            The ID of the debit memo that you want to upload a PDF file for. For
            example, 402890555a87d7f5015a8919e4fe002e.
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  type: string
                  description: |
                    The PDF file to upload for the debit memo.
                  format: binary
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTUploadFileResponse"
            application/json:
              example:
                success: true
                fileId: 40289f466463d683016463ef8b7301a3
      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:
      tags:
        - Debit Memos
      summary: Get debit memo items
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: debitMemoId
          in: path
          description: >
            The unique ID of a debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
        - name: zuora-version
          in: header
          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`
          schema:
            type: string
        - name: amount
          in: query
          description: |
            This parameter filters the response based on the `amount` field.
          schema:
            type: number
            format: double
        - name: beAppliedAmount
          in: query
          description: >
            This parameter filters the response based on the `beAppliedAmount`
            field.
          schema:
            type: number
            format: double
        - name: createdById
          in: query
          description: >
            This parameter filters the response based on the `createdById` field.
          schema:
            type: string
        - name: createdDate
          in: query
          description: >
            This parameter filters the response based on the `createdDate` field.
          schema:
            type: string
            format: date-time
        - name: id
          in: query
          description: |
            This parameter filters the response based on the `id` field.
          schema:
            type: string
        - name: serviceEndDate
          in: query
          description: >
            This parameter filters the response based on the `serviceEndDate`
            field.
          schema:
            type: string
            format: date
        - name: serviceStartDate
          in: query
          description: >
            This parameter filters the response based on the `serviceStartDate`
            field.
          schema:
            type: string
            format: date
        - name: sku
          in: query
          description: |
            This parameter filters the response based on the `sku` field.
          schema:
            type: string
        - name: skuName
          in: query
          description: |
            This parameter filters the response based on the `skuName` field.
          schema:
            type: string
        - name: sourceItemId
          in: query
          description: >
            This parameter filters the response based on the `sourceItemId`
            field.
          schema:
            type: string
        - name: subscriptionId
          in: query
          description: >
            This parameter filters the response based on the `subscriptionId`
            field.
          schema:
            type: string
        - name: updatedById
          in: query
          description: >
            This parameter filters the response based on the `updatedById` field.
          schema:
            type: string
        - name: updatedDate
          in: query
          description: >
            This parameter filters the response based on the `updatedDate` field.
          schema:
            type: string
            format: date-time
        - name: sort
          in: query
          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
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoItemCollectionType"
            application/json:
              example:
                items:
                  - id: 402890555a87d7f5015a89251ede0046
                    amount: 1
                    amountWithoutTax: 1
                    beAppliedAmount: 0
                    balance: 1
                    sku: SKU-00000002
                    skuName: SKU-30
                    serviceStartDate: 2017-11-01
                    serviceEndDate: 2017-11-30
                    sourceItemType: InvoiceDetail
                    sourceItemId: 402890555a7d4022015a7dadb3b700a6
                    createdDate: 2017-03-01 17:13:15
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 17:13:15
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    comment: This is comment!
                    unitOfMeasure: Each
                    unitPrice: 1
                    quantity: 1
                    financeInformation:
                      deferredRevenueAccountingCode: Subscription Revenue
                      deferredRevenueAccountingCodeType: SalesRevenue
                      recognizedRevenueAccountingCode: Subscription Revenue
                      recognizedRevenueAccountingCodeType: SalesRevenue
                    taxationItems:
                      data:
                        - id: 402890555a87d7f5015a89251ef10047
                          sourceTaxItemId: 402890555a7d4022015a7dadb39b00a1
                          taxAmount: 0.01
                          balance: 0.01
                          paymentAmount: 0
                          creditAmount: 0
                          name: STATE TAX
                          exemptAmount: 0
                          jurisdiction: CALIFORNIA
                          locationCode: "06"
                          taxCode: ZtaxCode
                          taxCodeDescription: ""
                          taxDate: 2017-11-30
                          taxRate: 0.0625
                          taxRateDescription: This is tax rate description!
                          taxRateType: Percentage
                          financeInformation: {}
                success: true
      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:
      tags:
        - Debit Memos
      summary: Get debit memo item
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/).


        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_Entity_Ids_Single"
        - name: dmitemid
          in: path
          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).
          required: true
          schema:
            type: string
        - name: debitMemoId
          in: path
          description: >
            The unique ID of a debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
        - name: zuora-version
          in: header
          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`
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoItemType"
            application/json:
              example:
                id: 402890555a87d7f5015a8919e500002f
                amount: 1
                amountWithoutTax: 1
                beAppliedAmount: 0
                balance: 1
                quantity: 1
                sku: SKU-00000002
                skuName: ZTax Component
                serviceStartDate: 2017-02-27
                serviceEndDate: 2017-03-26
                sourceItemType: InvoiceDetail
                sourceItemId: 402890555a7d4022015a7dadb3b700a6
                createdDate: 2017-03-01 17:01:00
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 17:01:00
                updatedById: 402881e522cf4f9b0122cf5d82860002
                comment: aa
                unitOfMeasure: Each
                unitPrice: 1
                financeInformation:
                  deferredRevenueAccountingCode: Subscription Revenue
                  deferredRevenueAccountingCodeType: SalesRevenue
                  recognizedRevenueAccountingCode: Subscription Revenue
                  recognizedRevenueAccountingCodeType: SalesRevenue
                taxationItems:
                  data:
                    - id: 402890555a87d7f5015a8919e8450031
                      sourceTaxItemId: 402890555a7d4022015a7dadb39b00a1
                      taxAmount: 5
                      balance: 5
                      paymentAmount: 0
                      creditAmount: 0
                      name: my tax
                      exemptAmount: 0
                      jurisdiction: USA
                      locationCode: ""
                      taxCode: ZtaxCode
                      taxCodeDescription: ""
                      taxDate: 2017-02-27
                      taxRate: 5
                      taxRateDescription: desc3
                      taxRateType: FlatFee
                      financeInformation: {}
                success: true
      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:
      tags:
        - Debit Memos
      summary: Get taxation items of debit memo item
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/).


        Retrieves information about the taxation items of a specific debit memo item.
      operationId: GET_TaxationItemsOfDebitMemoItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_page"
        - name: dmitemid
          in: path
          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).
          required: true
          schema:
            type: string
        - name: debitMemoId
          in: path
          description: >
            The unique ID of a debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemsOfDebitMemoItemType"
            application/json:
              example:
                data:
                  - balance: 10
                    paymentAmount: 0
                    creditAmount: 0
                    financeInformation: {}
                    id: 402883836904567d01690530df760231
                    taxAmount: 10
                    name: taxName_0
                    exemptAmount: 10
                    jurisdiction: Jurisdiction
                    locationCode: "8"
                    taxCode: taxCode
                    taxCodeDescription: taxCodeDescription
                    taxDate: 2016-10-10
                    taxRate: 0.1
                    taxRateDescription: taxRateDescription
                    taxRateType: Percentage
                success: true
      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:
      tags:
        - Debit Memos
      summary: Create debit memo PDF
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/).


        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 user permission "Regenerate PDF" enabled.
      operationId: POST_DebitMemoPDF
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: debitMemoId
          in: path
          description: >
            The unique ID of the debit memo that you want to create a PDF file
            for. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTMemoPdfResponse"
            application/json:
              example:
                success: true
      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:
      tags:
        - Debit Memos
      summary: Post debit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: debitMemoId
          in: path
          description: >
            The unique ID of a debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
            application/json:
              example:
                id: 402890555a87d7f5015a8919e4fe002e
                number: DM00000002
                accountId: 402890555a7d4022015a7dabf5f60088
                debitMemoDate: 2017-03-01
                dueDate: 2017-03-31
                postedOn: 2017-03-01 18:14:29
                postedById: 402881e522cf4f9b0122cf5d82860002
                status: Posted
                amount: 9
                taxAmount: 8
                totalTaxExemptAmount: 0
                balance: 9
                beAppliedAmount: 0
                autoPay: true
                comment: ""
                referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                transferredToAccounting: No
                reasonCode: Correcting invoice error
                createdDate: 2017-03-01 17:01:00
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 18:14:29
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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}/unpost":
    put:
      tags:
        - Debit Memos
      summary: Unpost debit memo
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: debitMemoId
          in: path
          description: >
            The unique ID of a debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
            application/json:
              example:
                id: 402890555a87d7f5015a8919e4fe002e
                number: DM00000002
                accountId: 402890555a7d4022015a7dabf5f60088
                debitMemoDate: 2017-03-01
                dueDate: 2017-03-31
                postedOn: 2017-03-01 18:14:29
                postedById: 402881e522cf4f9b0122cf5d82860002
                status: Draft
                amount: 9
                taxAmount: 8
                totalTaxExemptAmount: 0
                balance: 9
                beAppliedAmount: 0
                autoPay: true
                comment: ""
                referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                transferredToAccounting: No
                reasonCode: Correcting invoice error
                createdDate: 2017-03-01 17:01:00
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 18:14:29
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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/debitmemos/{debitMemoId}/taxationitems":
    post:
      tags:
        - Debit Memos
      summary: Create taxation items for debit memo
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 taxation items for a debit memo.
      operationId: POST_DM_TaxationItems
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: debitMemoId
          in: path
          description: >
            The unique ID of a debit memo. For example,
            8a8082e65b27f6c3015ba419f3c2644e.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTTaxationItemListForDMType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemListType"
            application/json:
              example:
                taxationItems:
                  - createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 10:27:20
                    exemptAmount: 0
                    id: 402890555a7e9791015a87b17cee0076
                    memoItemId: 402890555a7e9791015a87b082980068
                    sourceTaxItemId: 402890555a7d4022015a7db254e200c2
                    jurisdiction: CALIFORNIA
                    locationCode: "06"
                    name: STATE TAX
                    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
                    financeInformation:
                      salesTaxPayableAccountingCode: Check
                      salesTaxPayableAccountingCodeType: Cash
                  - createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 10:27:20
                    exemptAmount: 0
                    id: 402890555a7e9791015a87b17cf10077
                    memoItemId: 402890555a7e9791015a87b082d5006a
                    jurisdiction: CALIFORNIA
                    locationCode: "06"
                    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
                    financeInformation:
                      salesTaxPayableAccountingCode: Check
                      salesTaxPayableAccountingCodeType: Cash
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/describe/{object}":
    get:
      tags:
        - Describe
      summary: Describe object
      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_Entity_Ids_Single"
        - name: object
          in: path
          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.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: >
            Returns an XML document that lists the fields of the specified object
          content:
            text/xml; charset=utf-8:
              schema:
                type: string
        "404":
          description: |
            Returns an XML document that indicates the error
          content:
            text/xml; charset=utf-8:
              schema:
                type: string
      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:
      tags:
        - Document Properties
      summary: Create document properties
      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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
      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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDocumentPropertiesResponseType"
            application/json:
              example:
                success: true
                id: 402892c74c9193cd014c96bbe7c101f9
                documentId: 40288af1614cee0b01614cf2ec25000a
                documentType: CreditMemo
                customFileName: testCreditMemo
      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);
      x-codegen-request-body-name: Request
  "/v1/document-properties/{documentType}/{documentId}":
    get:
      tags:
        - Document Properties
      summary: Get document properties
      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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
      operationId: GET_DocumentProperies
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: documentType
          in: path
          description: |
            The type of the billing document. 
          required: true
          schema:
            type: string
            enum:
              - Invoice
              - CreditMemo
              - DebitMemo
        - name: documentId
          in: path
          description: >
            The unique ID of document properties to be retrieved. For example,
            402892c74c9193cd014c96bbe7c101f9.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDocumentPropertiesResponseType"
            application/json:
              example:
                success: true
                id: 402892c74c9193cd014c96bbe7c101f9
                documentId: 40288af1614cee0b01614cf2ec25000a
                documentType: CreditMemo
                customFileName: customPDFName
      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/document-properties/{documentPropertiesId}":
    put:
      tags:
        - Document Properties
      summary: Update document properties
      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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
      operationId: PUT_DocumentProperties
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: documentPropertiesId
          in: path
          description: >
            The unique ID of document properties to be updated. For example,
            402892c74c9193cd014c96bbe7c101f9.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTDocumentPropertiesType"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDocumentPropertiesResponseType"
            application/json:
              example:
                success: true
                id: 402892c74c9193cd014c96bbe7c101f9
                documentId: 40288af1614cee0b01614cf2ec25000a
                documentType: CreditMemo
                customFileName: customPDFName
      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);
      x-codegen-request-body-name: Request
    delete:
      tags:
        - Document Properties
      summary: Delete document properties
      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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
      operationId: DELETE_DocumentProperties
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: documentPropertiesId
          in: path
          description: >
            The unique ID of document properties. For example,
            402892c74c9193cd014c96bbe7c101f9.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  /events/event-triggers:
    get:
      tags:
        - Event Triggers
      summary: Query event triggers
      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"
        - name: baseObject
          in: query
          description: "The Zuora object that trigger condition is defined upon. Should be
            specified in the pattern: ^[A-Z][\\\\w\\\\-]*$"
          schema:
            type: string
        - name: eventTypeName
          in: query
          description: "The event type name. Should be specified in the pattern:
            ^[A-Za-z]{1,}[\\w\\-]*$"
          schema:
            type: string
        - name: active
          in: query
          description: The status of the event trigger.
          schema:
            type: string
        - name: start
          in: query
          description: The first index of the query result. Default to 0 if absent, and
            the minimum is 0.
          schema:
            minimum: 0
            type: integer
            default: 0
        - name: limit
          in: query
          description: The maximum number of data records to be returned. Default to 10 if
            absent.
          schema:
            minimum: 1
            type: integer
            default: 10
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/EventTrigger"
                  next:
                    type: string
                    description: The link to the next page. No value if it is last page.
            application/json:
              example: >-
                {
                  "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"
                }
        "400":
          description: Bad Request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "reasons": [
                    {
                      "code": "FieldConstraintViolation",
                      "message": "start should be >= 0"
                    }
                  ]
                }
        "500":
          description: Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "reasons": [
                    {
                      "code": "SystemError",
                      "message": "internal server error"
                    }
                  ]
                }
      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:
      tags:
        - Event Triggers
      summary: Create an event trigger
      description: >
        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

        The `baseObject` field specifies which object to define a trigger on. 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` would be `Invoice`.
      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":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/EventTrigger"
            application/json:
              example: >-
                {
                  "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
                }
        "400":
          description: Bad Request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "reasons": [
                    {
                      "code": "MissingRequiredField",
                      "message": "eventType is missing"
                    }
                  ]
                }
        "500":
          description: Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "reasons": [
                    {
                      "code": "SystemError",
                      "message": "internal server error"
                    }
                  ]
                }
      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);
      x-codegen-request-body-name: postEventTriggerRequest
  "/events/event-triggers/{id}":
    get:
      tags:
        - Event Triggers
      summary: Get an event trigger by ID
      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"
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/EventTrigger"
            application/json:
              example: >-
                {
                  "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
                }
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "reasons": [
                    {
                      "code": "ObjectNotFound",
                      "message": "no event trigger found with the given id"
                    }
                  ]
                }
        "500":
          description: Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "reasons": [
                    {
                      "code": "SystemError",
                      "message": "internal server error"
                    }
                  ]
                }
      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:
      tags:
        - Event Triggers
      summary: Update an event trigger
      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"
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PutEventTriggerRequest"
        required: true
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/EventTrigger"
            application/json:
              example: >-
                {
                  "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
                }
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "reasons": [
                    {
                      "code": "ObjectNotFound",
                      "message": "no event trigger found with the given id"
                    }
                  ]
                }
        "500":
          description: Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "reasons": [
                    {
                      "code": "SystemError",
                      "message": "internal server error"
                    }
                  ]
                }
      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);
      x-codegen-request-body-name: putEventTriggerRequest
    delete:
      tags:
        - Event Triggers
      summary: Remove an event trigger
      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"
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "204":
          description: No Content
          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
          content: {}
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "reasons": [
                    {
                      "code": "ObjectNotFound",
                      "message": "no event trigger found with the given id"
                    }
                  ]
                }
        "500":
          description: Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "reasons": [
                    {
                      "code": "SystemError",
                      "message": "internal server error"
                    }
                  ]
                }
      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);
  "/v1/files/{file-id}":
    get:
      tags:
        - Get Files
      summary: Get files
      description: >
        Retrieve files such as export results, invoices, and accounting period
        reports.


        **Note:** The maximum file size is 2047MB. 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_Entity_Ids_Single"
        - name: file-id
          in: path
          description: |
            The Zuora ID of the file to retrieve.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content: {}
      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/hmac-signatures:
    post:
      tags:
        - HMAC Signatures
      summary: Return HMAC signatures
      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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTHMACSignatureType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTHMACSignatureResponseType"
            application/json:
              example:
                signature: ZmI0ZjE2ZTMxMWY1YjA0ZTc4MTg1ZDhlYWRkMTEwNDE3M2RiMzNiNQ==
                token: gCH6gYqQffQCsFKSLuxyagXsuXcIK0uf
                success: true
      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);
      x-codegen-request-body-name: Request
  /v1/hostedpages:
    get:
      tags:
        - Hosted Pages
      summary: Return hosted pages
      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_Entity_Ids_Single"
        - name: versionNumber
          in: query
          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.
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetHostedPagesType"
            application/json:
              example:
                hostedpages:
                  - pageId: 8a85858f49a3f2230149abccaa2e004a
                    pageType: ACH
                    pageVersion: 2
                  - pageId: 8a85858f49a3f2230149abcd99090057
                    pageType: Bank Transfer
                    pageVersion: 2
                  - pageId: 8a85858f49a3f2230149a71083d40019
                    pageType: Credit Card
                    pageVersion: 2
                success: true
      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:
    put:
      tags:
        - Invoices
      summary: Update invoices
      description: |
        Updates multiple invoices in batches with one call. 
      operationId: PUT_BatchUpdateInvoices
      parameters:
        - $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":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/invoices/{invoiceId}":
    put:
      tags:
        - Invoices
      summary: Update invoice
      description: |
        Updates a specific invoice. 
      operationId: PUT_UpdateInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: invoiceId
          in: path
          description: |
            The ID of the invoice. For example,
            2c92c8955bd63cc1015bd7c151af02ab.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PutInvoiceType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PutInvoiceResponseType"
            application/json:
              example:
                id: 40288ae9600808280160081dc9c13f15
                number: INV00000090
                accountId: 40288ae9600808280160081db1533506
                invoiceDate: 2017-11-29
                currency: USD
                targetDate: 2017-11-29
                dueDate: 2017-12-18
                status: Draft
                amount: 100
                taxAmount: 0
                totalTaxExemptAmount: 0
                balance: 100
                comment: ""
                autoPay: false
                transferredToAccounting: No
                creditBalanceAdjustmentAmount: 0
                createdDate: 2017-11-29 22:10:58
                createdById: 40288ae9600808280160081d833a311a
                updatedDate: 2017-11-30 13:47:52
                updatedById: 40288ae9600808280160081d833a311a
                cancelledOn: null,
                cancelledById: null,
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/invoices/{invoiceId}/application-parts":
    get:
      tags:
        - Invoices
      summary: Get invoice application parts
      description: >
        Note: The Invoice Settlement feature is in Limited Availability. This
        feature includes Unapplied Payments, Credit and Debit Memo, and Invoice
        Item Settlement. If you wish to have access to the feature, submit a
        request at Zuora Global Support.


        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_Entity_Ids_Single"
        - name: invoiceId
          in: path
          description: >
            The unique ID of an invoice. For example,
            2c92c8955bd63cc1015bd7c151af02ab.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetInvoiceApplicationPartCollectionType"
            application/json:
              example:
                applicationParts:
                  - creditMemoId: 4028905f60a165a50160b4f632ff023d
                    appliedAmount: 22
                    createdDate: 2018-01-02 11:42:16
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2018-01-02 11:42:16
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                  - paymentId: 4028905f60a165a50160b4f5d5cb0229
                    appliedAmount: 11
                    createdDate: 2018-01-02 11:41:38
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2018-01-02 11:41:38
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Invoices
      summary: Create credit memo from invoice
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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.
      operationId: POST_CreditMemoFromInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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`
          schema:
            type: string
        - name: invoiceId
          in: path
          description: |
            The ID of an invoice that you want to create a credit memo from.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CreditMemoFromInvoiceType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
            application/json:
              example:
                id: 402890555a87d7f5015a88bd27f80014
                number: CM00000013
                accountId: 402890555a7d4022015a7dabf5f60088
                currency: USD
                creditMemoDate: 2017-11-30
                status: Draft
                amount: 0.01
                taxAmount: 0.01
                totalTaxExemptAmount: 0
                unappliedAmount: 0.01
                refundAmount: 0
                appliedAmount: 0
                comment: the comment
                source: AdhocFromInvoice
                referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                reasonCode: Write-off
                createdDate: 2017-03-01 15:19:42
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 15:19:42
                updatedById: 402881e522cf4f9b0122cf5d82860002
                transferredToAccounting: No
                excludeFromAutoApplyRules: false
                autoApplyUponPosting: false
                success: true
      x-code-samples:
        - lang: Curl
          source: >-
            curl -X POST -H "Authorization: Bearer
            6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type:
            application/json" -d '{
                "autoApplyToInvoiceUponPosting": 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"
                            }
                        ], 
                        "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, 
                "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"
                            }
                        ], 
                        "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    \"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            \"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    \"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            \"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    \"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            \"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    \"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            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Write-off\"\n}", ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
      x-codegen-request-body-name: body
  "/v1/invoices/{invoiceId}/debitmemos":
    post:
      tags:
        - Invoices
      summary: Create debit memo from invoice
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: invoiceId
          in: path
          description: |
            The ID of an invoice that you want to create a debit memo from.
          required: true
          schema:
            type: string
        - name: zuora-version
          in: header
          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`
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/DebitMemoFromInvoiceType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
            application/json:
              example:
                id: 402890555a87d7f5015a89251edc0045
                number: DM00000003
                accountId: 402890555a7d4022015a7dabf5f60088
                debitMemoDate: 2017-11-30
                dueDate: 2017-12-30
                status: Draft
                amount: 0.01
                taxAmount: 0.01
                totalTaxExemptAmount: 0
                balance: 0.01
                beAppliedAmount: 0
                autoPay: true
                comment: the comment
                referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                transferredToAccounting: No
                reasonCode: Charge Dispute
                createdDate: 2017-03-01 17:13:15
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 17:13:15
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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, 
                        "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"
                            }
                        ], 
                        "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, 
                        "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"
                            }
                        ], 
                        "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            \"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            \"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            \"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            \"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            \"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            \"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            \"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            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Charge Dispute\"\n}", ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
      x-codegen-request-body-name: body
  "/v1/invoices/{invoiceId}/emails":
    post:
      tags:
        - Invoices
      summary: Email invoice
      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_Entity_Ids_Single"
        - name: invoiceId
          in: path
          description: >
            The ID of the invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostInvoiceEmailRequestType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/invoices/{invoiceId}/files":
    get:
      tags:
        - Invoices
      summary: Get invoice files
      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.
      operationId: GET_InvoiceFiles
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: invoiceId
          in: path
          description: >
            The unique ID of an invoice. For example,
            2c92c8955bd63cc1015bd7c151af02ab.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETInvoiceFilesResponse"
            application/json:
              example:
                invoiceFiles:
                  - id: 2c98901f62d7d83d0162d7facec2262f
                    versionNumber: 1524041954479
                    pdfFileUrl: https://rest.zuora.com/v1/files/2c98901f62d7d83d0162d7facea6262d
                  - id: 2c98901f62d7d83d0162d7f4a9792629
                    versionNumber: 1524041551946
                    pdfFileUrl: https://rest.zuora.com/v1/files/2c98901f62d7d83d0162d7f4a95c2627
                  - id: 2c98901f62d7d83d0162d7f491ea2626
                    versionNumber: 1524041544112
                    pdfFileUrl: https://rest.zuora.com/v1/files/2c98901f62d7d83d0162d7f490f22624
                success: true
      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:
      tags:
        - Invoices
      summary: Upload file for invoice
      description: >
        Uploads an externally generated invoice PDF file for an invoice that is
        in Draft or Posted status.


        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"
        - name: invoiceId
          in: path
          description: >
            The ID of the invoice that you want to upload a PDF file for. For
            example, 2c92c8955bd63cc1015bd7c151af02ab.
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  type: string
                  description: |
                    The PDF file to upload for the invoice.
                  format: binary
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTUploadFileResponse"
            application/json:
              example:
                success: true
                fileId: 40289f466463d683016463ef8b7301a2
      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:
      tags:
        - Invoices
      summary: Get invoice items
      description: |
        Retrieves the information about all items of a specified invoice. 
      operationId: GET_InvoiceItems
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: invoiceId
          in: path
          description: >
            The unique ID of an invoice. For example,
            2c92c8955bd63cc1015bd7c151af02ab.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETInvoiceItemsResponse"
            application/json:
              example:
                invoiceItems:
                  - id: 2c92c095511f5b4401512682dd017989
                    subscriptionName: A-S00000004
                    subscriptionId: 2c92c0f9511f56b2015126814ad532cc
                    serviceStartDate: 2015-11-20T00:00:00.000+0000
                    serviceEndDate: 2015-11-30T00:00:00.000+0000
                    balance: 21.1
                    chargeAmount: 21.1
                    chargeDescription: ""
                    chargeName: Annual Fee
                    chargeId: 2c92c0f9511f56b2015126814af832d2
                    productName: TeamCollab Enterprise
                    quantity: 1
                    taxAmount: 0
                    unitOfMeasure: ""
                    taxationItems:
                      data:
                        - balance: 2.11
                          paymentAmount: 0
                          creditAmount: 0
                          id: 2c98901a68ff26800168ffce6eeb0ffe
                          taxAmount: 2.11
                          name: taxName
                          exemptAmount: 0
                          jurisdiction: County
                          locationCode: 000-1
                          taxCode: TAXCODE-1
                          taxDate: 2015-11-20T00:00:00.000+0000
                          taxRate: 0.1
                          taxRateDescription: ""
                          taxRateType: Percentage
                  - id: 3e28d61d442f433797e268e2b7c11eeb
                    subscriptionName: A-S00000004
                    subscriptionId: c2d9a5768db440cbbf2709a55c614bed
                    serviceStartDate: 2015-11-20T00:00:00.000+0000
                    serviceEndDate: 2015-11-30T00:00:00.000+0000
                    chargeAmount: 2.1
                    chargeDescription: ""
                    chargeName: Discount
                    chargeId: 1b3dede652fa47db833a83be55d850a5
                    productName: TeamCollab Enterprise
                    quantity: 0
                    taxAmount: 0
                    unitOfMeasure: ""
                    appliedToItemId: 2c92c095511f5b4401512682dd017989
                    taxationItems:
                      data:
                        - balance: 0.21
                          paymentAmount: 0
                          creditAmount: 0
                          id: 2c98901a68ff26800168ffce6eeb0ffe
                          taxAmount: 0.21
                          name: taxName
                          exemptAmount: 0
                          jurisdiction: County
                          locationCode: 000-1
                          taxCode: TAXCODE-1
                          taxDate: 2015-11-20T00:00:00.000+0000
                          taxRate: 0.1
                          taxRateDescription: ""
                          taxRateType: Percentage
                success: true
      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:
      tags:
        - Invoices
      summary: Get taxation items of invoice item
      description: >
        Retrieves information about the taxation items of a specific invoice
        item. 
      operationId: GET_TaxationItemsOfInvoiceItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_page"
        - name: invoiceId
          in: path
          description: >
            The unique ID of an invoice. For example,
            2c92c8955bd63cc1015bd7c151af02ab.
          required: true
          schema:
            type: string
        - name: itemId
          in: path
          description: >
            The unique ID of an invoice item. For example,
            2c86c8955bd63cc1015bd7c151af02ef.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETInvoiceTaxationItemsResponse"
            application/json:
              example:
                data:
                  - balance: 10
                    paymentAmount: 0
                    creditAmount: 0
                    id: 2c98901a68ff26800168ffce84e3102c
                    taxAmount: 10
                    name: test
                    exemptAmount: 0
                    jurisdiction: test
                    locationCode: code - 001
                    taxCode: taxcode
                    taxCodeDescription: description
                    taxDate: 2019-02-18T00:00:00.000+0000
                    taxRate: 2
                    taxRateDescription: test
                    taxRateType: FlatFee
                  - balance: 10
                    paymentAmount: 0
                    creditAmount: 0
                    id: 2c98901a68ff26800168ffce85d6102e
                    taxAmount: 10
                    name: test
                    exemptAmount: 0
                    jurisdiction: test
                    locationCode: code - 001
                    taxCode: taxcode
                    taxCodeDescription: description
                    taxDate: 2019-02-18T00:00:00.000+0000
                    taxRate: 2
                    taxRateDescription: test
                    taxRateType: FlatFee
                success: true
      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:
      tags:
        - Invoices
      summary: Reverse invoice
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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/).


        Reverses a posted invoice. 


        **Restrictions**


        You are not allowed to reverse an invoice if one 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.


        See [Reverse Posted Invoices](https://knowledgecenter.zuora.com/CB_Billing/IA_Invoices/Reverse_Posted_Invoices) for more information.
      operationId: PUT_ReverseInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: invoiceId
          in: path
          description: >
            The ID of the invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PutReverseInvoiceType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PutReverseInvoiceResponseType"
            application/json:
              example:
                creditMemo:
                  id: 402890555a40ca7f015a5b099b0e307a
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/invoices/{invoiceId}/write-off":
    put:
      tags:
        - Invoices
      summary: Write off invoice
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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/).


        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.


        An invoice cannot be written off in the following situations:
          - The balance of an invoice has been changed.
      operationId: PUT_WriteOffInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: invoiceId
          in: path
          description: >
            The unique ID of an invoice. For example,
            2c92c8955bd63cc1015bd7c151af02ab.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTWriteOffInvoiceRequest"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTWriteOffInvoiceResponse"
            application/json:
              example:
                creditMemo:
                  id: 402890555a40ca7f015a5b099b0e307a
                success: true
      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);
      x-codegen-request-body-name: Request
  /v1/journal-runs:
    post:
      tags:
        - Journal Runs
      summary: Create journal run
      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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTJournalRunType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTJournalRunResponseType"
            application/json:
              example:
                journalRunNumber: JR-00000008
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/journal-runs/{jr-number}":
    get:
      tags:
        - Journal Runs
      summary: Get journal run
      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_Entity_Ids_Single"
        - name: jr-number
          in: path
          description: >
            Journal run number. Must be a valid journal run number in the format
            `JR-00000001`.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETJournalRunType"
            application/json:
              example:
                number: JR-00000002
                status: Completed
                executedOn: 2014-11-15 22:05:12
                segmentationRuleName: s1
                totalJournalEntryCount: 2
                targetStartDate: 2016-03-01
                targetEndDate: 2016-03-31
                journalEntryDate: 2016-02-02
                transactionTypes:
                  - type: Invoice Item
                success: true
      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);
    delete:
      tags:
        - Journal Runs
      summary: Delete journal run
      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_Entity_Ids_Single"
        - name: jr-number
          in: path
          description: >
            Journal run number. Must be a valid journal run number in the format
            `JR-00000001`.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/journal-runs/{jr-number}/cancel":
    put:
      tags:
        - Journal Runs
      summary: Cancel journal run
      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_Entity_Ids_Single"
        - name: jr-number
          in: path
          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".
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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/bulk:
    post:
      tags:
        - Mass Updater
      summary: Perform mass action
      description: >
        This reference 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.
      operationId: POST_MassUpdater
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - file
                - params
              properties:
                file:
                  type: string
                  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
                params:
                  type: string
                  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.
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTMassUpdateResponseType"
            application/json:
              example:
                success: true
                bulkKey: 402892f04c97b89a014c97bb30a50003
      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:
      tags:
        - Mass Updater
      summary: Get mass action result
      description: >
        This reference 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_Entity_Ids_Single"
        - name: bulk-key
          in: path
          description: >
            String of 32 characters that identifies a mass action. You get the
            bulk-key after performing a mass action through the REST API.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETMassUpdateType"
            application/json:
              example:
                actionType: UpdateAccountingCode
                inputSize: 354
                uploadedBy: smith@example.com
                uploadedOn: 2015-04-07 14:22:09
                status: Completed
                startedOn: 2015-04-07 14:22:11
                endedOn: 2015-04-07 14:32:01
                outputSize: 350
                outputURL: https://rest.zuora.com/api/file/402892c84c9285b1014c9293f5320007
                outputType: (url:.csv.zip)
                totalCount: 3
                processedCount: 3
                errorCount: 1
                successCount: 2
                success: true
      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:
      tags:
        - Mass Updater
      summary: Stop mass action
      description: >
        This reference 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_Entity_Ids_Single"
        - name: bulk-key
          in: path
          description: >
            String of 32 characters that identifies a mass action. You get the
            bulk-key after performing a mass action through the REST API.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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/entities:
    get:
      tags:
        - Entities
      summary: "Multi-entity: Get entities"
      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_Entity_Ids_Single"
        - name: provisioned
          in: query
          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.
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETEntitiesResponseType"
            application/json:
              example:
                entities:
                  - id: 8a808255557baba1015580e12fa5083a
                    name: Acme Corporation
                    displayName: Acme Corporation
                    locale: en_US
                    timezone: GMT
                    status: Provisioned
                    tenantId: "6398"
                  - id: 8a80825555a3c7a10155b460f53858e6
                    name: Acme-Americas
                    displayName: Acme-Americas
                    locale: en_US
                    timezone: America/Los_Angeles
                    status: Provisioned
                    parentId: 8a808255557baba1015580e12fa5083a
                    tenantId: "6398"
                  - id: 8a80825555a3c7a10155b46120d058e7
                    name: Acme-US
                    displayName: Acme-US
                    locale: en_US
                    timezone: America/Los_Angeles
                    status: Provisioned
                    parentId: 8a80825555a3c7a10155b460f53858e6
                    tenantId: "6398"
                  - id: 8a80825556ff28a4015708ba29312ecc
                    name: Acme-Europe
                    displayName: Acme-Europe
                    locale: en_US
                    timezone: Europe/Paris
                    status: Provisioned
                    parentId: 8a808255557baba1015580e12fa5083a
                    tenantId: "6398"
                  - id: 8a80825556ff28a4015708bac1d8305f
                    name: Acme-UK
                    displayName: Acme-UK
                    locale: en_US
                    timezone: Europe/London
                    status: Unprovisioned
                    parentId: 8a80825556ff28a4015708ba29312ecc
                    tenantId: "6398"
                  - id: 8a80825556ff28a4015708bb21963060
                    name: Acme-France
                    displayName: Acme-France
                    locale: en_US
                    timezone: Europe/Paris
                    status: Unprovisioned
                    parentId: 8a80825556ff28a4015708ba29312ecc
                    tenantId: "6398"
                success: true
      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:
      tags:
        - Entities
      summary: "Multi-entity: Create entity"
      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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CreateEntityType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CreateEntityResponseType"
            application/json:
              example:
                id: 8a80825556ff28a4015709096c5d6f5d
                name: Acme-Asia
                displayName: Acme-Asia
                locale: zh_CN
                timezone: Asia/Harbin
                status: Unprovisioned
                parentId: 8a808255557baba1015580e12fa5083a
                tenantId: "6398"
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/entities/{id}":
    get:
      tags:
        - Entities
      summary: "Multi-entity: Get entity by Id"
      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_Entity_Ids_Single"
        - name: id
          in: path
          description: Specify the Id of the entity that you want to retrieve. You can get
            the entity Id from the GET Entities call.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETEntitiesResponseTypeWithId"
            application/json:
              example:
                id: 8a80825555a3c7a10155b460f53858e6
                name: Acme-Americas
                displayName: Acme-Americas
                locale: en_US
                timezone: America/Los_Angeles
                status: Provisioned
                parentId: 8a808255557baba1015580e12fa5083a
                tenantId: "6398"
                success: true
      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:
      tags:
        - Entities
      summary: "Multi-entity: Update entity"
      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_Entity_Ids_Single"
        - name: id
          in: path
          description: The Id of the entity that you want to edit. You can get the entity
            Id from the GET Entities call.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/UpdateEntityType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/UpdateEntityResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
    delete:
      tags:
        - Entities
      summary: "Multi-entity: Delete entity"
      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_Entity_Ids_Single"
        - name: id
          in: path
          description: Specify the Id of the entity that you want to delete. You can get
            the entity Id from the GET Entities call.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DELETEntityResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/entities/{id}/provision":
    put:
      tags:
        - Entities
      summary: "Multi-entity: Provision entity"
      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_Entity_Ids_Single"
        - name: id
          in: path
          description: Specify the Id of the entity that you want to provision.  You can
            get the entity Id from the GET Entities call.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProvisionEntityResponseType"
            application/json:
              example:
                success: true
      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:
      tags:
        - Entity Connections
      summary: "Multi-entity: Get connections"
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_entityConnection"
        - name: type
          in: query
          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.
          schema:
            type: string
            enum:
              - inbound
              - outbound
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETEntityConnectionsResponseType"
            application/json:
              example:
                entityConnections:
                  - id: 8a80825555a3c7a10155b54a63821c0d
                    sourceEntityId: 8a80825555a3c7a10155b46120d058e7
                    targetEntityId: 8a808255557baba1015580e12fa5083a
                    status: Connected
                  - id: 8a80825555a3c7a10155b466736c5c3f
                    sourceEntityId: 8a808255557baba1015580e12fa5083a
                    targetEntityId: 8a80825555a3c7a10155b460f53858e6
                    status: Connected
                  - id: 8a808255575bdae401576a914a140420
                    sourceEntityId: 8a808255557baba1015580e12fa5083a
                    targetEntityId: 8a80825556ff28a4015708ba29312ecc
                    status: Connected
                success: true
      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:
      tags:
        - Entity Connections
      summary: "Multi-entity: Initiate connection"
      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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTEntityConnectionsType"
        required: false
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTEntityConnectionsResponseType"
            application/json:
              example:
                id: 8a808255575bdae401576a914a140420
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/entity-connections/{connection-id}/accept":
    put:
      tags:
        - Entity Connections
      summary: "Multi-entity: Accept connection"
      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_Entity_Ids_Single"
        - name: connection-id
          in: path
          description: |
            The ID of the connection that you want to accept.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTEntityConnectionsAcceptResponseType"
            application/json:
              example:
                success: true
      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}/acce\
            pt\""
        - 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:
      tags:
        - Entity Connections
      summary: "Multi-entity: Deny connection"
      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_Entity_Ids_Single"
        - name: connection-id
          in: path
          description: |
            The ID of the connection that you want to deny.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTEntityConnectionsDenyResponseType"
            application/json:
              example:
                success: true
      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:
      tags:
        - Entity Connections
      summary: "Multi-entity: Disconnect connection"
      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_Entity_Ids_Single"
        - name: connection-id
          in: path
          description: |
            The ID of the connection that you want to disconnect.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTEntityConnectionsDisconnectResponseType"
            application/json:
              example:
                success: true
      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}/disc\
            onnect\""
        - 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/users/{username}/request-access":
    put:
      tags:
        - Users
      summary: "Multi-entity: Send user access requests"
      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_Entity_Ids_Single"
        - name: username
          in: path
          description: >
            Specify the login name of the user who wants to access other
            entities.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSendUserAccessRequestType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTSendUserAccessRequestResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/users/{username}/accept-access":
    put:
      tags:
        - Users
      summary: "Multi-entity: Accept user access"
      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_Entity_Ids_Single"
        - name: username
          in: path
          description: >
            Specify the login name of the user that you want to accept the
            access request for.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTAcceptUserAccessResponseType"
            application/json:
              example:
                success: true
      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}/deny-access":
    put:
      tags:
        - Users
      summary: "Multi-entity: Deny user access"
      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_Entity_Ids_Single"
        - name: username
          in: path
          description: |
            Specify the login name of the user that you want to deny the access.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTDenyUserAccessResponseType"
            application/json:
              example:
                success: true
      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}/accessible-entities":
    get:
      tags:
        - Users
      summary: "Multi-entity: Get entities that a user can access"
      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_Entity_Ids_Single"
        - name: username
          in: path
          description: |
            Specify the login user name that you want to retrieve.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETEntitiesUserAccessibleResponseType"
            application/json:
              example:
                entities:
                  - id: 8a808255557baba1015580e12fa5083a
                    name: Acme Corporation
                    displayName: Acme Corporation
                    locale: en_US
                    timezone: GMT
                    status: Provisioned
                    tenantId: "6398"
                  - id: 8a80825555a3c7a10155b460f53858e6
                    name: Acme-Americas
                    displayName: Acme-Americas
                    locale: en_US
                    timezone: America/Los_Angeles
                    status: Provisioned
                    parentId: 8a808255557baba1015580e12fa5083a
                    tenantId: "6398"
                  - id: 8a80825555a3c7a10155b46120d058e7
                    name: Acme-US
                    displayName: Acme-US
                    locale: en_US
                    timezone: America/Los_Angeles
                    status: Provisioned
                    parentId: 8a80825555a3c7a10155b460f53858e6
                    tenantId: "6398"
                  - id: 8a80825556ff28a4015708b93df82ba7
                    name: Acme-Canada
                    displayName: Acme-Canada
                    locale: en_US
                    timezone: America/Toronto
                    status: Provisioned
                    parentId: 8a80825555a3c7a10155b460f53858e6
                    tenantId: "6398"
                success: true
      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);
  /notifications/notification-definitions:
    get:
      tags:
        - Notifications
      summary: Query notification definitions
      description: |
        Queries notification definitions with the specified filters.
      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"
        - name: start
          in: query
          description: The first index of the query result.
          allowEmptyValue: true
          schema:
            type: integer
            format: int32
            default: 1
        - name: limit
          in: query
          description: The maximum number of results the query should return.
          allowEmptyValue: true
          schema:
            maximum: 100
            minimum: 1
            type: integer
            format: int32
            default: 20
        - name: profileId
          in: query
          description: Id of the profile.
          allowEmptyValue: true
          schema:
            type: string
            format: uuid
        - name: eventTypeName
          in: query
          description: The name of the event.
          allowEmptyValue: true
          schema:
            type: string
        - name: emailTemplateId
          in: query
          description: The ID of the email template.
          allowEmptyValue: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  next:
                    type: string
                    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
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/GETPublicNotificationDefinitionResponse"
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"404",
                  "message":"HTTP 404 Not Found"
                }
        "405":
          description: Method Not Allowed
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"405",
                  "message":"HTTP 405 Method Not Allowed"
                }
        "415":
          description: Unsupported Media Type
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"415",
                  "message":"HTTP 415 Unsupported Media Type"
                }
        "500":
          description: Internal Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"500",
                  "message":"A temporary problem in the service occurred, you can retry later."
                }
      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:
      tags:
        - Notifications
      summary: Create a notification definition
      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.
      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:
        description: The request body used to create the notification definition.
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTPublicNotificationDefinitionRequest"
        required: true
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicNotificationDefinitionResponse"
        "400":
          description: Bad Request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"ConstraintViolated",
                  "message":"The email template is defined on a different EventType other than the notification's"
                }
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"404",
                  "message":"HTTP 404 Not Found"
                }
        "405":
          description: Method Not Allowed
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"405",
                  "message":"HTTP 405 Method Not Allowed"
                }
        "415":
          description: Unsupported Media Type
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"415",
                  "message":"HTTP 415 Unsupported Media Type"
                }
        "500":
          description: Internal Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"500",
                  "message":"A temporary problem in the service occurred, you can retry later."
                }
      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.Number>"
                    }, 
                    "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.Number>"
                    }, 
                    "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.Number>\"\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.Number>\"\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.Number>\"\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.Number>\"\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);
      x-codegen-request-body-name: entity
  "/notifications/notification-definitions/{id}":
    get:
      tags:
        - Notifications
      summary: Get a notification definition
      description: Queries the notification definition of the given ID.
      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"
        - name: id
          in: path
          description: The ID of the notification definition.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicNotificationDefinitionResponse"
        "404":
          description: Not Found
          headers:
            Zuora-Request-Id:
              description: The Zuora request ID passed from the request or generated by the
                API Gateway.
              schema:
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"404",
                  "message":"HTTP 404 Not Found"
                }
        "405":
          description: Method Not Allowed
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"405",
                  "message":"HTTP 405 Method Not Allowed"
                }
        "415":
          description: Unsupported Media Type
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"415",
                  "message":"HTTP 415 Unsupported Media Type"
                }
        "500":
          description: Internal Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"500",
                  "message":"A temporary problem in the service occurred, you can retry later."
                }
      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:
      tags:
        - Notifications
      summary: Update a notification definition
      description: |
        Updates a notification definition.
      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"
        - name: id
          in: path
          description: The ID of the notification definition to be updated.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The request body of the notification definition to be updated.
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTPublicNotificationDefinitionRequest"
        required: true
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicNotificationDefinitionResponse"
        "400":
          description: Bad Request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"ConstraintViolated",
                  "message":"The email template is defined on a different EventType other than the notification's"
                }
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"404",
                  "message":"HTTP 404 Not Found"
                }
        "405":
          description: Method Not Allowed
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"405",
                  "message":"HTTP 405 Method Not Allowed"
                }
        "415":
          description: Unsupported Media Type
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"415",
                  "message":"HTTP 415 Unsupported Media Type"
                }
        "500":
          description: Internal Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"500",
                  "message":"A temporary problem in the service occurred, you can retry later."
                }
      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);
      x-codegen-request-body-name: PUTPublicNotificationDefinitionRequest
    delete:
      tags:
        - Notifications
      summary: Delete a notification definition
      description: Deletes a notification definition.
      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"
        - name: id
          in: path
          description: The ID of the notification definition to be deleted.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "204":
          description: No Content
          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
          content: {}
        "400":
          description: Bad Request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"ObjectNotFound",
                  "message":"The notification definition with id 6e569e1e05f040eda51a927b140c0ac2 does not exist"
                }
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"404",
                  "message":"HTTP 404 Not Found"
                }
        "405":
          description: Method Not Allowed
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"405",
                  "message":"HTTP 405 Method Not Allowed"
                }
        "415":
          description: Unsupported Media Type
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"415",
                  "message":"HTTP 415 Unsupported Media Type"
                }
        "500":
          description: Internal Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"500",
                  "message":"A temporary problem in the service occurred, you can retry later."
                }
      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);
  /notifications/email-templates:
    get:
      tags:
        - Notifications
      summary: Query email templates
      description: |
        Queries email templates.
      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"
        - name: start
          in: query
          description: The first index of the query result.
          allowEmptyValue: true
          schema:
            type: integer
            format: int32
            default: 1
        - name: limit
          in: query
          description: The maximum number of results the query should return.
          allowEmptyValue: true
          schema:
            maximum: 100
            minimum: 1
            type: integer
            format: int32
            default: 20
        - name: eventTypeName
          in: query
          description: The name of the event.
          allowEmptyValue: true
          schema:
            type: string
        - name: name
          in: query
          description: The name of the email template.
          allowEmptyValue: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  next:
                    type: string
                    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
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/GETPublicEmailTemplateResponse"
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"404",
                  "message":"HTTP 404 Not Found"
                }
        "405":
          description: Method Not Allowed
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"405",
                  "message":"HTTP 405 Method Not Allowed"
                }
        "415":
          description: Unsupported Media Type
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"415",
                  "message":"HTTP 415 Unsupported Media Type"
                }
        "500":
          description: Internal Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"500",
                  "message":"A temporary problem in the service occurred, you can retry later."
                }
      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:
      tags:
        - Notifications
      summary: Create an email template
      description: |
        Creates an email template.
      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:
        description: The request body to create an email template.
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTPublicEmailTemplateRequest"
        required: true
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicEmailTemplateResponse"
        "400":
          description: Bad Request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"ObjectNotFound",
                  "message":"eventType {com.zuora.notification, AccountEdit} does not exist"
                }
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"404",
                  "message":"HTTP 404 Not Found"
                }
        "405":
          description: Method Not Allowed
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"405",
                  "message":"HTTP 405 Method Not Allowed"
                }
        "415":
          description: Unsupported Media Type
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"415",
                  "message":"HTTP 415 Unsupported Media Type"
                }
        "500":
          description: Internal Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"500",
                  "message":"A temporary problem in the service occurred, you can retry later."
                }
      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);
      x-codegen-request-body-name: POSTPublicEmailTemplateRequest
  "/notifications/email-templates/{id}":
    get:
      tags:
        - Notifications
      summary: Get an email template
      description: Queries the email template of the specified ID.
      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"
        - name: id
          in: path
          description: The ID of the email template.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicEmailTemplateResponse"
        "400":
          description: Bad Request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"ObjectNotFound",
                  "message":"The email template with id 6e569e1e05f040eda51a927b140c0ac2 does not exist in this tenant"
                }
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"404",
                  "message":"HTTP 404 Not Found"
                }
        "405":
          description: Method Not Allowed
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"405",
                  "message":"HTTP 405 Method Not Allowed"
                }
        "415":
          description: Unsupported Media Type
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"415",
                  "message":"HTTP 415 Unsupported Media Type"
                }
        "500":
          description: Internal Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"500",
                  "message":"A temporary problem in the service occurred, you can retry later."
                }
      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:
      tags:
        - Notifications
      summary: Update an email template
      description: |
        Updates an email template.
      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"
        - name: id
          in: path
          description: The ID of the email template to be updated.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The request body to update an email template.
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTPublicEmailTemplateRequest"
        required: true
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicEmailTemplateResponse"
        "400":
          description: Bad Request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"ObjectNotFound",
                  "message":"eventType {com.zuora.notification, AccountEdit} does not exist"
                }
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"404",
                  "message":"HTTP 404 Not Found"
                }
        "405":
          description: Method Not Allowed
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"405",
                  "message":"HTTP 405 Method Not Allowed"
                }
        "415":
          description: Unsupported Media Type
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"415",
                  "message":"HTTP 415 Unsupported Media Type"
                }
        "500":
          description: Internal Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"500",
                  "message":"A temporary problem in the service occurred, you can retry later."
                }
      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);
      x-codegen-request-body-name: PUTPublicEmailTemplateRequest
    delete:
      tags:
        - Notifications
      summary: Delete an email template
      description: Deletes an email template.
      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"
        - name: id
          in: path
          description: The ID of the email template to be deleted.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "204":
          description: No Content
          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
          content: {}
        "400":
          description: Bad Request
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"ObjectNotFound",
                  "message":"The email template with id 6e569e1e05f040eda51a927b140c0ac2 does not exist in this tenant"
                }
        "404":
          description: Not Found
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"404",
                  "message":"HTTP 404 Not Found"
                }
        "405":
          description: Method Not Allowed
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"405",
                  "message":"HTTP 405 Method Not Allowed"
                }
        "415":
          description: Unsupported Media Type
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: |-
                {
                  "code":"415",
                  "message":"HTTP 415 Unsupported Media Type"
                }
        "500":
          description: Internal Server Error
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
            application/json:
              example: >-
                {
                  "code":"500",
                  "message":"A temporary problem in the service occurred, you can retry later."
                }
      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);
  /v1/notification-history/callout:
    get:
      tags:
        - Notifications
      summary: Get callout notification histories
      description: >
        This REST API reference describes how to get a notification history for
        callouts.
      operationId: GET_CalloutHistory
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: endTime
          in: query
          description: The final date and time of records to be returned. Defaults to now.
            Use format yyyy-MM-ddTHH:mm:ss.
          schema:
            type: string
            format: date-time
        - name: startTime
          in: query
          description: The initial date and time of records to be returned. Defaults to
            (end time - 1 day). Use format yyyy-MM-ddTHH:mm:ss.
          schema:
            type: string
            format: date-time
        - name: objectId
          in: query
          description: The ID of an object that triggered a callout notification.
          schema:
            type: string
        - name: failedOnly
          in: query
          description: If `true`, only return failed records. If `false`, return all
            records in the given date range. The default value is `true`.
          schema:
            type: boolean
        - name: eventCategory
          in: query
          description: >
            Category of records to be returned by event category.


            The following formats are supported:

            * `{Event Type Namespace}:{Event Type Name}` if the Configurable Event features are enabled in your Zuora tenant. For example: `user.notification:NewSubscriptionCreated`.

            * Otherwise, numeric code of the event category. For example, `1210`. See [Event Categories for Notifications](https://knowledgecenter.zuora.com/DC_Developers/AA_REST_API/Event_Categories_for_Notification_Histories) for more information.
          schema:
            type: string
        - name: includeResponseContent
          in: query
          schema:
            type: boolean
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCalloutHistoryVOsType"
            application/json:
              example:
                calloutHistories:
                  - responseCode: 405
                    requestUrl: https://www.google.com
                    requestMethod: POST
                    eventCategory: 1210
                    notification: New Subscription Created
                    attemptedNum: 3
                    createTime: 2015-01-13T03:33:51
                    eventContext:
                      <Account.Currency>: USD
                      <Subscription.SubscriptionDetailTable>:
                        Charge Name: recurringcharge
                        Charge Type: Recurring
                        Effective Start Date: 01 / 01 / 2016
                        Unit Price: 50
                        QTY: 5
                        Total: 250
                      <Account.CurrencySymbol>: $
                      <BillToContact.FirstName>: Mary
                      <Subscription.ServiceActivation>: 01/01/2016
                      <Subscription.InitialTerm>: "50"
                      <Subscription.RenewalTerm>: "0"
                      <Subscription.CustomerAcceptance>: 01/01/2016
                      <Account.Name>: test
                      <Subscription.SubscriptionName>: A-S00000003
                      <Account.ID>: 402881e54ade80c8014ade884c48000b
                      <BillToContact.WorkEmail>: smith@example.com
                      <Account.Number>: A00000001
                      <Subscription.TermStartDate>: 01/01/2016
                      <Event.Timestamp>: 2015-01-13T22:31:43.248+0800
                      <Subscription.AutoRenew>: No
                      <Notification>:
                        id: 402892fa47866fe701478674a5c100eb
                        EmailTemplate: New Subscription Created Default Email Template
                        Event: New Subscription Created
                        Profile: Default Profile
                        emailAction: true
                        calloutAction: true
                        updatedOn: 01/12/2015 03:23:08
                        updatedBy: 402892fa47866fe7014786749d9b0002
                      <BillToContact.LastName>: Smith
                      <Object.ID>: 402881e54ae37f31014ae3b514e100fd
                      <Subscription.ContractEffective>: 01/01/2016
                      <Subscription.TCV>: $12,500.00
                      <Contact.ID>: 402881e54ade80c8014ade884c51000c
                      <Subscription.CMRR>: $250.00
                      <BillToContact.ID>: 402881e54ade80c8014ade884c51000c
                      <Event.Category>: SubscriptionCreated
                      <Subscription.TermSetting>: termed
                      <BillingAccount.ID>: 402881e54ade80c8014ade884c48000b
                      <Subscription.CreateDate>: 01/13/2015
                      <Subscription.TermEndDate>: 03/01/2020
                      <Subscription.ID>: 402881e54ae37f31014ae3b514e100fd
                      <Event.ID>: 402892fa47866fe701478674a4ff0093
                      <Subscription.CreatedBy>: smith@example.com
                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
      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:
      tags:
        - Notifications
      summary: Get email notification histories
      description: >
        This REST API reference 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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: endTime
          in: query
          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.
          schema:
            type: string
            format: date-time
        - name: startTime
          in: query
          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.
          schema:
            type: string
            format: date-time
        - name: objectId
          in: query
          description: The Id of an object that triggered an email notification.
          schema:
            type: string
        - name: failedOnly
          in: query
          description: If `true`, only returns failed records. When `false`, returns all
            records in the given date range. Defaults to `true` when not
            specified.
          schema:
            type: boolean
        - name: eventCategory
          in: query
          description: >
            Category of records to be returned by event category.


            The following formats are supported:

            * `{Event Type Namespace}:{Event Type Name}` if the Configurable Event features are enabled in your Zuora tenant. For example: `user.notification:NewSubscriptionCreated`.

            * Otherwise, numeric code of the event category. For example, `1210`. See [Event Categories for Notifications](https://knowledgecenter.zuora.com/DC_Developers/AA_REST_API/Event_Categories_for_Notification_Histories) for more information.
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETEmailHistoryVOsType"
            application/json:
              example:
                emailHistories:
                  - result: OK
                    eventCategory: 1210
                    notification: New Subscription Created
                    subject: New subscription A-S00000003 was created and activated
                    toEmail: smith@example.com
                    fromEmail: no-reply@example.com
                    cc: bob@example.com,chris@example.com
                    bcc: ceo@example.com,cto@example.com
                    replyTo: supportexample.com
                    sendTime: 2015-01-13T03:31:43
                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
      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);
  /oauth/token:
    post:
      tags:
        - OAuth
      summary: Generate an OAuth token
      description: >
        Generates 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:
              required:
                - client_id
                - client_secret
                - grant_type
              properties:
                client_id:
                  maxLength: 36
                  minLength: 36
                  type: string
                  description: |
                    The Client ID of the OAuth client.
                client_secret:
                  maxLength: 42
                  type: string
                  description: >
                    The Client Secret that was displayed when the OAuth client
                    was created.
                grant_type:
                  type: string
                  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
        required: true
      responses:
        "200":
          description: OK
          headers:
            X-RateLimit-Remaining-minute:
              description: |
                The number of requests that you may make in the next minute.
              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
            X-RateLimit-Limit-minute:
              description: |
                The rate limit of this operation, in requests per minute.
              schema:
                type: integer
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/tokenResponse"
            application/json:
              example:
                access_token: c652cbc0ea384b9f81856a93a2a74538
                token_type: bearer
                expires_in: 3599
                scope: user.7c4d5433dc234c369a01b9719ecd059f
                  entity.1a2b7a37-3e7d-4cb3-b0e2-883de9e766cc
                  entity.c92ed977-510c-4c48-9b51-8d5e848671e9 service.echo.read
                  tenant.19
                jti: c652cbc0ea384b9f81856a93a2a74539
        "429":
          description: Too Many Requests
          headers:
            X-RateLimit-Remaining-minute:
              description: |
                The number of requests that you may make in the next minute.
              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
            X-RateLimit-Limit-minute:
              description: |
                The rate limit of this operation, in requests per minute.
              schema:
                type: integer
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content: {}
      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"
  /v1/operations/invoice-collect:
    post:
      tags:
        - Operations
      summary: Invoice and collect
      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_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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.
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTInvoiceCollectType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTInvoiceCollectResponseType"
            application/json:
              example:
                invoices:
                  - invoiceId: 4028925a4cb74ec9014cb7540988002e
                    invoiceNumber: INV00000091
                    invoiceAmount: 801.73
                creditMemos:
                  - id: 402890555a7e9791015a879f064a0054
                    memoNumber: CM00000012
                    memoAmount: 801.73
                paymentId: 402892053e100406013e1024ab7c00e3
                amountCollected: 801.73
                success: true
      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);
      x-codegen-request-body-name: Request
  /v1/operations/billing-preview:
    post:
      tags:
        - Operations
      summary: Create billing preview
      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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/). 
      operationId: POST_BillingPreview
      parameters:
        - $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":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/BillingPreviewResult"
            application/json:
              example:
                accountId: 402890b75972406c0159724cd4d00011
                invoiceItems:
                  - id: 93ac165212294c1a8bef1c8f99121461
                    subscriptionName: A-S00000001
                    subscriptionId: 402890b75972406c0159724e2e810029
                    subscriptionNumber: A-S00000001
                    serviceStartDate: 2017-05-01
                    serviceEndDate: 2017-05-31
                    chargeAmount: 100
                    chargeDescription: ""
                    chargeName: positive-charge
                    chargeNumber: C-00000001
                    chargeId: 402890b75972406c0159724e2eec0031
                    productName: FA-freshAir
                    quantity: 1
                    taxAmount: 0
                    unitOfMeasure: License
                    chargeDate: 2017-01-06 16:38:26
                    chargeType: Recurring
                    processingType: Charge
                  - id: 3e28d61d442f433797e268e2b7c11eeb
                    subscriptionName: A-S00000001
                    subscriptionId: c2d9a5768db440cbbf2709a55c614bed
                    subscriptionNumber: A-S00000001
                    serviceStartDate: 2017-05-01
                    serviceEndDate: 2017-05-31
                    chargeAmount: 10
                    chargeDescription: ""
                    chargeName: discount-charge
                    chargeNumber: C-00000003
                    chargeId: 402890b75972406c0159724e2eec0031
                    productName: FA-freshAir
                    quantity: 0
                    taxAmount: 0
                    unitOfMeasure: ""
                    chargeDate: 2017-01-06 16:38:26
                    chargeType: Recurring
                    processingType: Discount
                    appliedToItemId: 93ac165212294c1a8bef1c8f99121461
                creditMemoItems:
                  - id: cf6326638f3c4ddda3722734aebd7ba7
                    subscriptionId: 402890b75972406c0159724e2e810029
                    amount: 50
                    amountWithoutTax: 50
                    comment: ""
                    sku: SKU-00000001
                    skuName: negative_charge
                    serviceStartDate: 2017-05-01
                    serviceEndDate: 2017-05-31
                    unitOfMeasure: License
                    ratePlanChargeId: 402890b75972406c0159724e2ef10032
                    quantity: 1
                    chargeDate: 2017-01-06 16:38:26
                    chargeType: Recurring
                    processingType: Charge
                    subscriptionNumber: A-S00000001
                    chargeNumber: C-00000002
                  - id: 3e28d61d442f433797e268e2b7c11eeb
                    subscriptionName: A-S00000001
                    subscriptionId: c2d9a5768db440cbbf2709a55c614bed
                    subscriptionNumber: A-S00000001
                    serviceStartDate: 2017-05-01
                    serviceEndDate: 2017-05-31
                    chargeAmount: 5
                    chargeDescription: ""
                    chargeName: discount-charge
                    chargeNumber: C-00000003
                    chargeId: 402890b75972406c0159724e2eec0031
                    productName: FA-freshAir
                    quantity: 0
                    taxAmount: 0
                    unitOfMeasure: ""
                    chargeDate: 2017-01-06 16:38:26
                    chargeType: Recurring
                    processingType: Discount
                    appliedToItemId: cf6326638f3c4ddda3722734aebd7ba7
                success: true
      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);
      x-codegen-request-body-name: Request
  /v1/orders/preview:
    post:
      tags:
        - Orders
      summary: Preview order
      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. The migration to Orders is in **Limited Availability**.
        We are actively soliciting feedback from a small set of early adopters
        before releasing as generally available. 



        Retrieves the preview of the charge metrics and invoice items of a specified order. This operation is only an order preview and no order is created.


        **Note:** Zuora has the following limits on Orders to prevent performance degradation. You can request a limit increase by submitting a request at [Zuora Global Support](https://support.zuora.com).

        * Up to 50 subscriptions are allowed in a single "Preview order" operation call.

        * Up to 50 order actions are allowed in a single "Preview order" operation call.

        * Up to 50 order actions are allowed on a single subscription in a "Preview order" operation call.
      operationId: POST_PreviewOrder
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTOrderPreviewRequestType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PostOrderPreviewResponseType"
            application/json:
              example:
                success: true
                previewResult:
                  chargeMetrics:
                    - subscriptionNumber: A-S00000101
                      charges:
                        - productRatePlanId: 2c98901f6706718c016706b8c0720012
                          productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                          originRatePlanId: 2c98919c67a5ae9d0167a6901c5a027f
                          chargeNumber: C-00000211
                          cmrr:
                            regular: 30
                            regularDelta: 0
                          tcv:
                            regular: 11.61
                            regularDelta: -348.39
                          tcb:
                            regular: 11.61
                            regularDelta: -348.39
                    - subscriptionNumber: A-S00000100
                      charges:
                        - productRatePlanId: 2c98901f6706718c016706b8c0720012
                          productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                          originRatePlanId: 2c98919c67a5ae9d0167a68f8eb20262
                          chargeNumber: C-00000210
                          cmrr:
                            regular: 40
                            regularDelta: 10
                          tcv:
                            regular: 480
                            regularDelta: 120
                          tcb:
                            regular: 480
                            regularDelta: 120
                    - subscriptionNumber: A-S00000102
                      charges:
                        - productRatePlanId: 2c98901f6706718c016706b8c0720012
                          productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                          originRatePlanId: 2c98919c67a5ae9d0167a69089bd029c
                          chargeNumber: C-00000212
                          cmrr:
                            regular: 30
                            regularDelta: 30
                          tcv:
                            regular: 359.61
                            regularDelta: 348
                          tcb:
                            regular: 360
                            regularDelta: 348.39
                  invoices:
                    - amount: 141.93
                      amountWithoutTax: 141.93
                      taxAmount: 0
                      targetDate: 2019-01-01
                      invoiceItems:
                        - serviceStartDate: 2018-12-01
                          serviceEndDate: 2018-12-12
                          amountWithoutTax: 11.61
                          taxAmount: 0
                          chargeDescription: ""
                          chargeName: Charge
                          chargeNumber: C-00000212
                          processingType: Charge
                          productName: Product
                          productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                          subscriptionNumber: A-S00000102
                          additionalInfo:
                            quantity: 2
                            unitOfMeasure: Each
                        - serviceStartDate: 2018-12-23
                          serviceEndDate: 2018-12-31
                          amountWithoutTax: 8.71
                          taxAmount: 0
                          chargeDescription: ""
                          chargeName: Charge
                          chargeNumber: C-00000212
                          processingType: Charge
                          productName: Product
                          productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                          subscriptionNumber: A-S00000102
                          additionalInfo:
                            quantity: 2
                            unitOfMeasure: Each
                        - serviceStartDate: 2019-01-01
                          serviceEndDate: 2019-01-31
                          amountWithoutTax: 30
                          taxAmount: 0
                          chargeDescription: ""
                          chargeName: Charge
                          chargeNumber: C-00000212
                          processingType: Charge
                          productName: Product
                          productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                          subscriptionNumber: A-S00000102
                          additionalInfo:
                            quantity: 2
                            unitOfMeasure: Each
                        - serviceStartDate: 2018-12-01
                          serviceEndDate: 2018-12-12
                          amountWithoutTax: 11.61
                          taxAmount: 0
                          chargeDescription: ""
                          chargeName: Charge
                          chargeNumber: C-00000211
                          processingType: Charge
                          productName: Product
                          productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                          subscriptionNumber: A-S00000101
                          additionalInfo:
                            quantity: 2
                            unitOfMeasure: Each
                        - serviceStartDate: 2018-12-01
                          serviceEndDate: 2018-12-31
                          amountWithoutTax: 40
                          taxAmount: 0
                          chargeDescription: ""
                          chargeName: Charge
                          chargeNumber: C-00000210
                          processingType: Charge
                          productName: Product
                          productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                          subscriptionNumber: A-S00000100
                          additionalInfo:
                            quantity: 2
                            unitOfMeasure: Each
                        - serviceStartDate: 2019-01-01
                          serviceEndDate: 2019-01-31
                          amountWithoutTax: 40
                          taxAmount: 0
                          chargeDescription: ""
                          chargeName: Charge
                          chargeNumber: C-00000210
                          processingType: Charge
                          productName: Product
                          productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                          subscriptionNumber: A-S00000100
                          additionalInfo:
                            quantity: 2
                            unitOfMeasure: Each
                  orderMetrics:
                    - orderActions:
                        - sequence: 0
                          type: UpdateProduct
                          orderItems: []
                          orderMetrics:
                            - productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              originRatePlanId: 2c98919c67a5ae9d0167a68f8eb20262
                              tcb:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 120
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a68f8edf026a
                                  termNumber: 1
                                  generatedReason: ChangePrice
                                  type: Regular
                                  startDate: 2018-12-01
                              productRatePlanId: 2c98901f6706718c016706b8c0720012
                              tcv:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 120
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a68f8edf026a
                                  termNumber: 1
                                  generatedReason: ChangePrice
                                  type: Regular
                                  startDate: 2018-12-01
                              chargeNumber: C-00000210
                              mrr:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 10
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a68f8edf026a
                                  termNumber: 1
                                  generatedReason: ChangePrice
                                  type: Regular
                                  startDate: 2018-12-01
                      subscriptionNumber: A-S00000100
                    - orderActions:
                        - sequence: 0
                          type: Suspend
                          orderItems: []
                          orderMetrics:
                            - productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              originRatePlanId: 2c98919c67a5ae9d0167a6901c5a027f
                              tcb:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: -348.39
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6901c8d0287
                                  termNumber: 1
                                  generatedReason: Contraction
                                  type: Regular
                                  startDate: 2018-12-13
                              quantity:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: -2
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6901c8d0287
                                  termNumber: 1
                                  generatedReason: Contraction
                                  startDate: 2018-12-13
                              productRatePlanId: 2c98901f6706718c016706b8c0720012
                              tcv:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: -348
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6901c8d0287
                                  termNumber: 1
                                  generatedReason: Contraction
                                  type: Regular
                                  startDate: 2018-12-13
                              chargeNumber: C-00000211
                              elp:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: -348.39
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6901c8d0287
                                  termNumber: 1
                                  generatedReason: Contraction
                                  type: Regular
                                  startDate: 2018-12-13
                              mrr:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: -30
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6901c8d0287
                                  termNumber: 1
                                  generatedReason: Contraction
                                  type: Regular
                                  startDate: 2018-12-13
                      subscriptionNumber: A-S00000101
                    - orderActions:
                        - sequence: 0
                          type: Resume
                          orderItems:
                            - quantity: 2
                              endDate: 2019-11-30
                              orderActionId: preview-2c98919c67a5ae9d0167a69a85a202f3
                              id: preview-preview-2c98919c67a5ae9d0167a69a8af40329
                              startDate: 2018-12-23
                              scId: preview-CSZ-0000000-internal
                          orderMetrics:
                            - productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              originRatePlanId: 2c98919c67a5ae9d0167a69089bd029c
                              tcb:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 338.71
                                  endDate: 2019-11-30
                                  orderItemId: preview-2c98919c67a5ae9d0167a69a8af40329
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2018-12-23
                              quantity:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 2
                                  endDate: 2019-11-30
                                  orderItemId: preview-2c98919c67a5ae9d0167a69a8af40329
                                  termNumber: 1
                                  generatedReason: Extension
                                  startDate: 2018-12-23
                              productRatePlanId: 2c98901f6706718c016706b8c0720012
                              tcv:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 338
                                  endDate: 2019-11-30
                                  orderItemId: preview-2c98919c67a5ae9d0167a69a8af40329
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2018-12-23
                              chargeNumber: C-00000212
                              elp:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 338.71
                                  endDate: 2019-11-30
                                  orderItemId: preview-2c98919c67a5ae9d0167a69a8af40329
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2018-12-23
                              mrr:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 30
                                  endDate: 2019-11-30
                                  orderItemId: preview-2c98919c67a5ae9d0167a69a8af40329
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2018-12-23
                        - sequence: 1
                          type: TermsAndConditions
                          orderItems:
                            - quantity: 2
                              endDate: 2019-12-10
                              orderActionId: preview-5bf336bd11724faabb0114a1f916d4c5
                              id: preview-preview-2c98919c67a5ae9d0167a69a8af8032a
                              startDate: 2019-12-01
                              scId: preview-2c98919c67a5ae9d0167a69a8ad70324
                          orderMetrics:
                            - productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              originRatePlanId: 2c98919c67a5ae9d0167a69089bd029c
                              tcb:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 9.68
                                  endDate: 2019-12-10
                                  orderItemId: preview-2c98919c67a5ae9d0167a69a8af8032a
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2019-12-01
                              quantity:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 2
                                  endDate: 2019-12-10
                                  orderItemId: preview-2c98919c67a5ae9d0167a69a8af8032a
                                  termNumber: 1
                                  generatedReason: Extension
                                  startDate: 2019-12-01
                              productRatePlanId: 2c98901f6706718c016706b8c0720012
                              tcv:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 9.68
                                  endDate: 2019-12-10
                                  orderItemId: preview-2c98919c67a5ae9d0167a69a8af8032a
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2019-12-01
                              chargeNumber: C-00000212
                              elp:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 9.68
                                  endDate: 2019-12-10
                                  orderItemId: preview-2c98919c67a5ae9d0167a69a8af8032a
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2019-12-01
                              mrr:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 30
                                  endDate: 2019-12-10
                                  orderItemId: preview-2c98919c67a5ae9d0167a69a8af8032a
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2019-12-01
                      subscriptionNumber: A-S00000102
      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", 
                "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", 
                "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    \"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    \"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    \"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    \"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);
      x-codegen-request-body-name: body
  /v1/async/orders/preview:
    post:
      tags:
        - Orders
      summary: Preview order asynchronously
      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. This operation is in **Limited Availability**. 



        In the case where a normal "Preview 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.
      operationId: POST_PreviewOrderAsynchronously
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTOrderPreviewRequestType"
        required: true
      responses:
        "202":
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  jobId:
                    type: string
                    description: The ID of an asynchronous job that will be returned for tracking
                      the status and result of the job.
                    format: UUID
            application/json:
              example:
                jobId: 2c90a02d676688200167770ce20601b6
      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", 
                "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", 
                "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    \"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    \"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    \"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    \"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);
      x-codegen-request-body-name: body
  /v1/orders:
    get:
      tags:
        - Orders
      summary: Get all orders
      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. The migration to Order Metrics is in **Limited
        Availability**. We are actively soliciting feedback from a small set of
        early adopters before releasing as generally available. If you have the
        [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders)
        feature enabled, you already have the Order Metrics feature enabled.



        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_Entity_Ids_Single"
        - name: page
          in: query
          description: |
            The page number of the orders retrieved. 
          schema:
            type: integer
            default: 1
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: dateFilterOption
          in: query
          description: >
            The date type to filter on. This field value can be orderDate or
            updatedDate. Default is orderDate.
          schema:
            type: string
        - name: startDate
          in: query
          description: >
            The result will only contain the orders with the date of
            dateFilterOption later than or equal to this date.
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: >
            The result will only contains orders with the date of
            dateFilterOption earlier than or equal to this date.
          schema:
            type: string
            format: date
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetAllOrdersResponseType"
            application/json:
              example:
                orders:
                  - orderNumber: O-00000002
                    orderDate: 2017-03-01
                    createdDate: 2018-03-14 15:12:58
                    createdBy: 2c989028622282520162235ab0f603ba
                    updatedDate: 2018-03-14 15:12:58
                    updatedBy: 2c989028622282520162235ab0f603ba
                    existingAccountNumber: accountA_Num
                    currency: USD
                    status: Completed
                    description: This is a description for the Order.
                    subscriptions:
                      - subscriptionNumber: A-S00000001
                        customFields: {}
                        baseVersion: 1
                        newVersion: 2
                        orderActions:
                          - type: UpdateProduct
                            sequence: 0
                            triggerDates:
                              - triggerDate: 2017-03-01
                                name: ContractEffective
                              - triggerDate: 2017-03-01
                                name: ServiceActivation
                              - triggerDate: 2017-03-01
                                name: CustomerAcceptance
                            updateProduct:
                              ratePlanId: 2c989028622282520162235acd1b05d2
                              newRatePlanId: 2c989028622282520162235ada870649
                              chargeUpdates:
                                - chargeNumber: C-00000001
                                  newRatePlanChargeId: 2c989028622282520162235adabc0651
                                  pricing:
                                    recurringVolume:
                                      quantity: 7
                                      tiers: []
                                  effectiveDate: {}
                                  billing: {}
                                  customFields: {}
                              customFields: {}
                            customFields: {}
                            orderItems: []
                            orderMetrics:
                              - productRatePlanChargeId: 2c989028622282520162235aca7a05b9
                                originRatePlanId: 2c989028622282520162235acd1b05d2
                                tcb:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1200
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5000
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                quantity:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    startDate: 2017-03-01
                                productRatePlanId: 2c989028622282520162235acd1005ca
                                tcv:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1200
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5000
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                chargeNumber: C-00000001
                                elp:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -3800
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                mrr:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -12
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 50
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                    customFields:
                      order_cf_date__c: 2017-01-01
                  - orderNumber: O-00000001
                    orderDate: 2017-01-01
                    createdDate: 2018-03-14 15:12:55
                    createdBy: 2c989028622282520162235ab0f603ba
                    updatedDate: 2018-03-14 15:12:55
                    updatedBy: 2c989028622282520162235ab0f603ba
                    existingAccountNumber: accountA_Num
                    currency: USD
                    status: Completed
                    subscriptions:
                      - subscriptionNumber: A-S00000001
                        customFields:
                          sub_cf_picklist__c: sub123
                        newVersion: 1
                        orderActions:
                          - type: CreateSubscription
                            sequence: 0
                            triggerDates:
                              - triggerDate: 2017-01-01
                                name: ContractEffective
                              - triggerDate: 2017-01-01
                                name: ServiceActivation
                              - triggerDate: 2017-01-01
                                name: CustomerAcceptance
                            createSubscription:
                              subscriptionOwnerAccountNumber: accountA_Num
                              terms:
                                autoRenew: false
                                renewalSetting: RENEW_WITH_SPECIFIC_TERM
                                initialTerm:
                                  startDate: 2017-01-01
                                  period: 12
                                  periodType: Month
                                  termType: TERMED
                                renewalTerms:
                                  - period: 0
                                    periodType: Month
                              subscribeToRatePlans:
                                - productRatePlanId: 2c989028622282520162235ac91605b3
                                  newRatePlanId: 2c989028622282520162235acd1b05d2
                                  chargeOverrides:
                                    - chargeNumber: C-00000001
                                      productRateplanChargeId: 2c989028622282520162235aca7a05b9
                                      pricing:
                                        recurringVolume:
                                          quantity: 12
                                          tiers: []
                                          listPriceBase: Per_Billing_Period
                                      startDate: {}
                                      endDate: {}
                                      billing: {}
                                      customFields: {}
                                  customFields: {}
                            customFields:
                              oa_cf_text__c: oa cf test
                            orderItems:
                              - id: 2c989028622282520162235acd7d05dc
                                startDate: 2017-01-01
                                endDate: 2017-12-31
                                quantity: 12
                                orderActionId: 2c989028622282520162235acbcc05c4
                                scId: 2c989028622282520162235acd1b05d3
                            orderMetrics:
                              - productRatePlanChargeId: 2c989028622282520162235aca7a05b9
                                originRatePlanId: 2c989028622282520162235acd1b05d2
                                tcb:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -1296
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                                quantity:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    startDate: 2017-01-01
                                productRatePlanId: 2c989028622282520162235acd1005ca
                                tcv:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -1296
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                                chargeNumber: C-00000001
                                elp:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                mrr:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1080
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -108
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                    customFields:
                      order_cf_date__c: 2017-01-01
                success: true
      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:
      tags:
        - Orders
      summary: Create order
      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. The migration to Orders is in **Limited Availability**.
        We are actively soliciting feedback from a small set of early adopters
        before releasing as generally available. 


        You can use this operation to create subscriptions and make changes to subscriptions by creating orders. The following tutorials demonstrate how to use this operation:

         * [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/BC_Subscription_Management/Orders/AC_Orders_Tutorials/A_Create_a_Ramp_Deal)
         * [Create a Subscription](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/A_Create_a_Subscription)
         * [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)


        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.


        **Note:** When you are to suspend a subcription (via the `suspend` order action), if in the same "Create 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 the payment processing fails 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.


        **Note:** Zuora has the following limits on Orders to prevent performance degradation. You can request a limit increase by submitting a request at [Zuora Global Support](https://support.zuora.com).

        * Up to 50 subscriptions are allowed in a single "Create order" operation call.

        * Up to 50 order actions are allowed in a single "Create order" operation call.

        * Up to 50 order actions are allowed on a single subscription in a "Create order" operation call.        
      operationId: POST_Order
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: returnIds
          in: query
          description: >
            Specify whether to return IDs associated with the numbers returned
            in the Create Order operation.
          schema:
            type: boolean
            default: false
        - name: zuora-version
          in: header
          description: |
            
            The minor version of the Zuora REST API. 

            You need to set this parameter if you use the following fields:
            * subscriptions
            * subscriptionNumbers
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTOrderRequestType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PostOrderResponseType"
            application/json:
              example:
                success: true
                orderNumber: OM-00002
                accountNumber: A00000001
                status: Pending
                subscriptions:
                  - subscriptionNumber: SM-00001
                    status: Pending Activation
                  - subscriptionNumber: SM-00002
                    status: Pending Acceptance
                  - subscriptionNumber: SM-00003
                    status: Active
                  - subscriptionNumber: SM-00004
                    status: Pending Acceptance
                  - subscriptionNumber: SM-00005
                    status: Suspended
                  - subscriptionNumber: SM-00006
                    status: Active
                invoiceNumbers:
                  - INV00000001
                paymentNumber: P-00000002
                paidAmount: 300
      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", 
                "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", 
                "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    \"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    \"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    \"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    \"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);
      x-codegen-request-body-name: body
  /v1/async/orders:
    post:
      tags:
        - Orders
      summary: Create order asynchronously
      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. This operation is in **Limited Availability**.



        In the case where a normal "Create 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. 
      operationId: POST_CreateOrderAsynchronously
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: zuora-version
          in: header
          description: |
            
            The minor version of the Zuora REST API. 

            You need to set this parameter if you use the following fields:
            * subscriptions
            * subscriptionNumbers
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTOrderRequestType"
        required: true
      responses:
        "202":
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  jobId:
                    type: string
                    description: The ID of an asynchronous job that will be returned for tracking
                      the status and result of the job.
                    format: UUID
            application/json:
              example:
                jobId: 1bc24f315d7b48d3a20245bfe73bdceb
      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", 
                "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", 
                "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    \"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    \"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    \"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    \"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);
      x-codegen-request-body-name: body
  "/v1/orders/{orderNumber}":
    get:
      tags:
        - Orders
      summary: Get an order
      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. The migration to Order Metrics is in **Limited
        Availability**. We are actively soliciting feedback from a small set of
        early adopters before releasing as generally available. If you have the
        [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders)
        feature enabled, you already have the Order Metrics feature enabled.



        Retrieves the detailed information about a specified order.
      operationId: GET_Order
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: orderNumber
          in: path
          description: The order number to be retrieved.
          required: true
          schema:
            type: string
            format: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrderResponse"
            application/json:
              example:
                success: true
                order:
                  orderNumber: O-00000282
                  orderDate: 2018-10-01
                  createdDate: 2018-12-13 17:21:43
                  createdBy: 402881e522cf4f9b0122cf5d82860002
                  updatedDate: 2018-12-13 17:21:45
                  updatedBy: 402881e522cf4f9b0122cf5d82860002
                  existingAccountNumber: A00000101
                  currency: USD
                  status: Completed
                  description: This is a description for the Order.
                  subscriptions:
                    - subscriptionNumber: A-S00000100
                      customFields: {}
                      baseVersion: 1
                      newVersion: 2
                      orderActions:
                        - type: UpdateProduct
                          sequence: 0
                          triggerDates:
                            - triggerDate: 2018-12-01
                              name: ContractEffective
                            - triggerDate: 2018-12-01
                              name: ServiceActivation
                            - triggerDate: 2018-12-01
                              name: CustomerAcceptance
                          updateProduct:
                            ratePlanId: 2c98919c67a5ae9d0167a68f8eb20262
                            newRatePlanId: 2c98919c67a5ae9d0167a6df3011036e
                            chargeUpdates:
                              - chargeNumber: C-00000210
                                newRatePlanChargeId: 2c98919c67a5ae9d0167a6df304b0372
                                pricing:
                                  recurringPerUnit:
                                    listPrice: 20
                                effectiveDate: {}
                                billing: {}
                                customFields: {}
                            customFields: {}
                          customFields: {}
                          orderItems: []
                          orderMetrics:
                            - productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              originRatePlanId: 2c98919c67a5ae9d0167a68f8eb20262
                              tcb:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 120
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a68f8edf026a
                                  termNumber: 1
                                  generatedReason: ChangePrice
                                  type: Regular
                                  startDate: 2018-12-01
                              productRatePlanId: 2c98919c67a5ae9d0167a68f8eab025f
                              tcv:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 120
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a68f8edf026a
                                  termNumber: 1
                                  generatedReason: ChangePrice
                                  type: Regular
                                  startDate: 2018-12-01
                              chargeNumber: C-00000210
                              mrr:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 10
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a68f8edf026a
                                  termNumber: 1
                                  generatedReason: ChangePrice
                                  type: Regular
                                  startDate: 2018-12-01
                    - subscriptionNumber: A-S00000101
                      customFields: {}
                      baseVersion: 1
                      newVersion: 2
                      orderActions:
                        - type: Suspend
                          sequence: 0
                          triggerDates:
                            - triggerDate: 2018-12-01
                              name: ContractEffective
                            - triggerDate: 2018-12-01
                              name: ServiceActivation
                            - triggerDate: 2018-12-01
                              name: CustomerAcceptance
                          suspend:
                            suspendPolicy: Today
                            suspendDate: 2018-12-13
                          customFields: {}
                          orderItems: []
                          orderMetrics:
                            - productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              originRatePlanId: 2c98919c67a5ae9d0167a6901c5a027f
                              tcb:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: -348.39
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6901c8d0287
                                  termNumber: 1
                                  generatedReason: Contraction
                                  type: Regular
                                  startDate: 2018-12-13
                              quantity:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: -2
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6901c8d0287
                                  termNumber: 1
                                  generatedReason: Contraction
                                  startDate: 2018-12-13
                              productRatePlanId: 2c98919c67a5ae9d0167a6901c55027c
                              tcv:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: -348
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6901c8d0287
                                  termNumber: 1
                                  generatedReason: Contraction
                                  type: Regular
                                  startDate: 2018-12-13
                              chargeNumber: C-00000211
                              elp:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: -348.39
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6901c8d0287
                                  termNumber: 1
                                  generatedReason: Contraction
                                  type: Regular
                                  startDate: 2018-12-13
                              mrr:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: -30
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6901c8d0287
                                  termNumber: 1
                                  generatedReason: Contraction
                                  type: Regular
                                  startDate: 2018-12-13
                    - subscriptionNumber: A-S00000102
                      customFields: {}
                      baseVersion: 2
                      newVersion: 3
                      orderActions:
                        - type: Resume
                          sequence: 0
                          triggerDates:
                            - triggerDate: 2018-12-12
                              name: ContractEffective
                            - triggerDate: 2018-12-12
                              name: ServiceActivation
                            - triggerDate: 2018-12-12
                              name: CustomerAcceptance
                          resume:
                            resumePolicy: FixedPeriodsFromSuspendDate
                            resumePeriods: 10
                            resumePeriodsType: Day
                            extendsTerm: true
                            resumeDate: 2018-12-23
                          customFields: {}
                          orderItems:
                            - id: 2c98919c67a5ae9d0167a6df33c2039e
                              startDate: 2018-12-23
                              endDate: 2019-11-30
                              quantity: 2
                              orderActionId: 2c98919c67a5ae9d0167a6df2e740368
                              scId: 2c98919c67a5ae9d0167a6df339c0399
                          orderMetrics:
                            - productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              originRatePlanId: 2c98919c67a5ae9d0167a69089bd029c
                              tcb:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 338.71
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6df33c2039e
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2018-12-23
                              quantity:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 2
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6df33c2039e
                                  termNumber: 1
                                  generatedReason: Extension
                                  startDate: 2018-12-23
                              productRatePlanId: 2c98919c67a5ae9d0167a69089b80299
                              tcv:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 338
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6df33c2039e
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2018-12-23
                              chargeNumber: C-00000212
                              elp:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 338.71
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6df33c2039e
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2018-12-23
                              mrr:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 30
                                  endDate: 2019-11-30
                                  orderItemId: 2c98919c67a5ae9d0167a6df33c2039e
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2018-12-23
                        - type: TermsAndConditions
                          sequence: 1
                          triggerDates:
                            - triggerDate: 2018-12-12
                              name: ContractEffective
                            - triggerDate: 2018-12-12
                              name: ServiceActivation
                            - triggerDate: 2018-12-12
                              name: CustomerAcceptance
                          termsAndConditions:
                            initialTerm:
                              period: 375
                              periodType: Day
                            renewalTerms:
                              - {}
                          customFields: {}
                          orderItems:
                            - id: 2c98919c67a5ae9d0167a6df33c7039f
                              startDate: 2019-12-01
                              endDate: 2019-12-10
                              quantity: 2
                              orderActionId: 2c98919c67a5ae9d0167a6df33ae039a
                              scId: 2c98919c67a5ae9d0167a6df339c0399
                          orderMetrics:
                            - productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              originRatePlanId: 2c98919c67a5ae9d0167a69089bd029c
                              tcb:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 9.68
                                  endDate: 2019-12-10
                                  orderItemId: 2c98919c67a5ae9d0167a6df33c7039f
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2019-12-01
                              quantity:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 2
                                  endDate: 2019-12-10
                                  orderItemId: 2c98919c67a5ae9d0167a6df33c7039f
                                  termNumber: 1
                                  generatedReason: Extension
                                  startDate: 2019-12-01
                              productRatePlanId: 2c98919c67a5ae9d0167a69089b80299
                              tcv:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 9.68
                                  endDate: 2019-12-10
                                  orderItemId: 2c98919c67a5ae9d0167a6df33c7039f
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2019-12-01
                              chargeNumber: C-00000212
                              elp:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 9.68
                                  endDate: 2019-12-10
                                  orderItemId: 2c98919c67a5ae9d0167a6df33c7039f
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2019-12-01
                              mrr:
                                - subscriptionOwner: A00000101
                                  invoiceOwner: A00000101
                                  amount: 30
                                  endDate: 2019-12-10
                                  orderItemId: 2c98919c67a5ae9d0167a6df33c7039f
                                  termNumber: 1
                                  generatedReason: Extension
                                  type: Regular
                                  startDate: 2019-12-01
                  customFields: {}
      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);
    delete:
      tags:
        - Orders
      summary: Delete order
      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. The migration to Orders is in **Limited Availability**.
        We are actively soliciting feedback from a small set of early adopters
        before releasing as generally available. 



        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. 


        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_Entity_Ids_Single"
        - name: orderNumber
          in: path
          description: The number of the order to be deleted.
          required: true
          schema:
            type: string
            format: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/async-jobs/{jobId}":
    get:
      tags:
        - Orders
      summary: Get job status and response
      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. This operation is in **Limited Availability**.



        Get the status and response of an asynchronous job. Currently, an asynchronous job created by "Create order asynchronously" or "Preview order asynchronously" is supported.
      operationId: GET_JobStatusAndResponse
      parameters:
        - name: jobId
          in: path
          description: UUID of the asynchronous job created by an asynchronous API
            operation.
          required: true
          schema:
            type: string
            format: UUID
      responses:
        "200":
          description: OK
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Type of job status.
                    enum:
                      - Processing
                      - Failed
                      - Completed
                  errors:
                    type: string
                    description: Error messages returned if the job failed.
                  result:
                    $ref: "#/components/schemas/JobResult"
                  success:
                    type: boolean
                    description: Indicates whether the operation call succeeded.
            application/json:
              example:
                status: Completed
                result:
                  success: true
                  orderNumber: OM-00002
                  accountNumber: A00000001
                  status: Pending
                  subscriptions:
                    - subscriptionNumber: SM-00001
                      status: Pending Activation
                    - subscriptionNumber: SM-00002
                      status: Pending Acceptance
                    - subscriptionNumber: SM-00003
                      status: Active
                    - subscriptionNumber: SM-00004
                      status: Pending Acceptance
                  invoiceNumbers:
                    - INV00000001
                  paymentNumber: P-00000002
                  paidAmount: 300
                success: true
      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/orders/term/{subscriptionNumber}":
    get:
      tags:
        - Orders
      summary: Get term information for subscription
      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. The migration to Order Metrics is in **Limited
        Availability**. We are actively soliciting feedback from a small set of
        early adopters before releasing as generally available. If you have the
        [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders)
        feature enabled, you already have the Order Metrics feature enabled.


        Retrieves the terms of the specified subscription.
      operationId: GET_SubscriptionTermInfo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: subscriptionNumber
          in: path
          description: >
            The number of the subscription to retrieve terms for. For example,
            A-S00000001.
          required: true
          schema:
            type: string
        - name: version
          in: query
          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.
          schema:
            type: integer
        - name: page
          in: query
          description: |
            The page number of the terms retrieved.
          schema:
            type: integer
            default: 1
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetSubscriptionTermInfoResponseType"
            application/json:
              example:
                success: true
                nextPage: https://rest.zuora.com/v1/orders/term/A-S00000001?page=2
                terms:
                  - termNumber: 1
                    isEvergreen: false
                    startDate: 2017-11-01
                    endDate: 2017-12-01
      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}/evergreenMetrics/{subscriptionNumber}":
    get:
      tags:
        - Orders
      summary: Get order metrics for evergreen subscription
      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. The migration to Order Metrics is in **Limited
        Availability**. We are actively soliciting feedback from a small set of
        early adopters before releasing as generally available. If you have the
        [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders)
        feature enabled, you already have the Order Metrics feature enabled.



        Retrieves the metrics of an evergreen subscription in a specified order.
      operationId: GET_OrderMetricsforEvergreenSubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: orderNumber
          in: path
          description: |
            The order number.
          required: true
          schema:
            type: string
            format: string
        - name: subscriptionNumber
          in: path
          description: |
            The subscription number you want to get the metrics for.
          required: true
          schema:
            type: string
        - name: startDate
          in: query
          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.
          required: true
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          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.
          required: true
          schema:
            type: string
            format: date
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrderResponseForEvergreen"
            application/json:
              example:
                success: true
                order:
                  orderNumber: OR-00015
                  orderDate: 2017-01-01
                  createdDate: 2017-08-02
                  createdBy: 8a8081085d834928015d837c3c4e0037
                  updatedDate: 2017-08-02
                  updatedBy: 8a8081085d834928015d837c3c4e0037
                  existingAccountNumber: A-00002
                  currency: USD
                  status: Completed
                  description: This is a description for the Order.
                  subscriptions:
                    - subscriptionNumber: S-00004
                      customFields: {}
                      newVersion: 1
                      orderActions:
                        - type: CreateSubscription
                          sequence: 0
                          triggerDates:
                            - triggerDate: 2017-01-01
                              name: ServiceActivation
                            - triggerDate: 2017-01-01
                              name: CustomerAcceptance
                          createSubscription:
                            terms:
                              initialTerm:
                                startDate: 2017-01-01
                                termType: EVERGREEN
                              renewalTerms:
                                - {}
                            subscribeToRatePlans:
                              - productRatePlanId: 8a8081085d834928015d9c54e67f0aa9
                                newRatePlanId: 8a8081085d834928015da1e36fdd2061
                                uniqueToken: Sugar-free Monthly
                                chargeOverrides:
                                  - chargeNumber: C-00000015
                                    productRateplanChargeId: 8a8081085d834928015d9c55d45f0aac
                                    uniqueToken: Sugar-free Membership Monthly Charge
                                    pricing:
                                      recurringPerUnit: {}
                                    startDate: {}
                                    endDate: {}
                                    billing: {}
                                    customFields: {}
                                customFields: {}
                          customFields: {}
                          orderMetrics:
                            - productRatePlanChargeId: 8a8081085d834928015d9c55d45f0aac
                              originRatePlanId: 8a8081085d834928015da1e36fdd2061
                              tcb:
                                - subscriptionOwner: A-00002
                                  invoiceOwner: A-00002
                                  amount: 36.129032258
                                  endDate: 2017-02-28
                                  termNumber: 1
                                  tax: 0
                                  type: Regular
                                  startDate: 2017-01-07
                              quantity:
                                - subscriptionOwner: A-00002
                                  invoiceOwner: A-00002
                                  amount: 10
                                  endDate: 2017-02-28
                                  termNumber: 1
                                  startDate: 2017-01-07
                              productRatePlanId: 8a8081085d834928015da1e36fd9205e
                              tcv:
                                - subscriptionOwner: A-00002
                                  invoiceOwner: A-00002
                                  amount: 35.714285714
                                  endDate: 2017-02-28
                                  termNumber: 1
                                  type: Regular
                                  startDate: 2017-01-07
                              chargeNumber: C-00000015
                              mrr:
                                - subscriptionOwner: A-00002
                                  invoiceOwner: A-00002
                                  amount: 20
                                  endDate: 2017-02-28
                                  termNumber: 1
                                  type: Regular
                                  startDate: 2017-01-07
                  customFields: {}
      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/subscriptionOwner/{accountNumber}":
    get:
      tags:
        - Orders
      summary: Get orders by subscription owner
      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. The migration to Order Metrics is in **Limited
        Availability**. We are actively soliciting feedback from a small set of
        early adopters before releasing as generally available. If you have the
        [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders)
        feature enabled, you already have the Order Metrics feature enabled.


        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_Entity_Ids_Single"
        - name: accountNumber
          in: path
          description: The subscription owner account number.
          required: true
          schema:
            type: string
            format: string
        - name: page
          in: query
          description: |
            The page number of the orders retrieved. The default is 1.
          schema:
            type: integer
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: dateFilterOption
          in: query
          description: >
            The date type to filter on.

            This field value can be 'orderDate' or 'updatedDate'. Default is orderDate.
          schema:
            type: string
        - name: startDate
          in: query
          description: >
            The result will only contain the orders with the date of
            'dateFilterOption' later than or equal to this date.
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: >
            The result will only contain the orders with the date of
            'dateFilterOption' earlier than or equal to this date.
          schema:
            type: string
            format: date
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrdersResponse"
            application/json:
              example:
                orders:
                  - orderNumber: O-00000002
                    orderDate: 2017-03-01
                    createdDate: 2018-03-14 15:12:58
                    createdBy: 2c989028622282520162235ab0f603ba
                    updatedDate: 2018-03-14 15:12:58
                    updatedBy: 2c989028622282520162235ab0f603ba
                    existingAccountNumber: accountA_Num
                    currency: USD
                    status: Completed
                    description: This is a description for the Order.
                    subscriptions:
                      - subscriptionNumber: A-S00000001
                        customFields: {}
                        baseVersion: 1
                        newVersion: 2
                        orderActions:
                          - type: UpdateProduct
                            sequence: 0
                            triggerDates:
                              - triggerDate: 2017-03-01
                                name: ContractEffective
                              - triggerDate: 2017-03-01
                                name: ServiceActivation
                              - triggerDate: 2017-03-01
                                name: CustomerAcceptance
                            updateProduct:
                              ratePlanId: 2c989028622282520162235acd1b05d2
                              newRatePlanId: 2c989028622282520162235ada870649
                              chargeUpdates:
                                - chargeNumber: C-00000001
                                  newRatePlanChargeId: 2c989028622282520162235adabc0651
                                  pricing:
                                    recurringVolume:
                                      quantity: 7
                                      tiers: []
                                  effectiveDate: {}
                                  billing: {}
                                  customFields: {}
                              customFields: {}
                            customFields: {}
                            orderItems: []
                            orderMetrics:
                              - productRatePlanChargeId: 2c989028622282520162235aca7a05b9
                                originRatePlanId: 2c989028622282520162235acd1b05d2
                                tcb:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1200
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5000
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                quantity:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    startDate: 2017-03-01
                                productRatePlanId: 2c989028622282520162235acd1005ca
                                tcv:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1200
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5000
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                chargeNumber: C-00000001
                                elp:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -3800
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                mrr:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -12
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 50
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                    customFields:
                      order_cf_date__c: 2017-01-01
                  - orderNumber: O-00000001
                    orderDate: 2017-01-01
                    createdDate: 2018-03-14 15:12:55
                    createdBy: 2c989028622282520162235ab0f603ba
                    updatedDate: 2018-03-14 15:12:55
                    updatedBy: 2c989028622282520162235ab0f603ba
                    existingAccountNumber: accountA_Num
                    currency: USD
                    status: Completed
                    subscriptions:
                      - subscriptionNumber: A-S00000001
                        customFields:
                          sub_cf_picklist__c: sub123
                        newVersion: 1
                        orderActions:
                          - type: CreateSubscription
                            sequence: 0
                            triggerDates:
                              - triggerDate: 2017-01-01
                                name: ContractEffective
                              - triggerDate: 2017-01-01
                                name: ServiceActivation
                              - triggerDate: 2017-01-01
                                name: CustomerAcceptance
                            createSubscription:
                              subscriptionOwnerAccountNumber: accountA_Num
                              terms:
                                autoRenew: false
                                renewalSetting: RENEW_WITH_SPECIFIC_TERM
                                initialTerm:
                                  startDate: 2017-01-01
                                  period: 12
                                  periodType: Month
                                  termType: TERMED
                                renewalTerms:
                                  - period: 0
                                    periodType: Month
                              subscribeToRatePlans:
                                - productRatePlanId: 2c989028622282520162235ac91605b3
                                  newRatePlanId: 2c989028622282520162235acd1b05d2
                                  chargeOverrides:
                                    - chargeNumber: C-00000001
                                      productRateplanChargeId: 2c989028622282520162235aca7a05b9
                                      pricing:
                                        recurringVolume:
                                          quantity: 12
                                          tiers: []
                                          listPriceBase: Per_Billing_Period
                                      startDate: {}
                                      endDate: {}
                                      billing: {}
                                      customFields: {}
                                  customFields: {}
                            customFields:
                              oa_cf_text__c: oa cf test
                            orderItems:
                              - id: 2c989028622282520162235acd7d05dc
                                startDate: 2017-01-01
                                endDate: 2017-12-31
                                quantity: 12
                                orderActionId: 2c989028622282520162235acbcc05c4
                                scId: 2c989028622282520162235acd1b05d3
                            orderMetrics:
                              - productRatePlanChargeId: 2c989028622282520162235aca7a05b9
                                originRatePlanId: 2c989028622282520162235acd1b05d2
                                tcb:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -1296
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                                quantity:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    startDate: 2017-01-01
                                productRatePlanId: 2c989028622282520162235acd1005ca
                                tcv:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -1296
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                                chargeNumber: C-00000001
                                elp:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                mrr:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1080
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -108
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                    customFields:
                      order_cf_date__c: 2017-01-01
                success: true
      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/subscription/{subscriptionNumber}":
    get:
      tags:
        - Orders
      summary: Get orders by subscription number
      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. The migration to Order Metrics is in **Limited
        Availability**. We are actively soliciting feedback from a small set of
        early adopters before releasing as generally available. If you have the
        [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders)
        feature enabled, you already have the Order Metrics feature enabled.


        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_Entity_Ids_Single"
        - name: subscriptionNumber
          in: path
          description: The subscription number.
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: |
            The page number of the orders retrieved. The default is '1'.
          schema:
            type: integer
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: dateFilterOption
          in: query
          description: >
            The date type to filter on. This field value can be 'orderDate' or
            'updatedDate'. Default is orderDate.
          schema:
            type: string
        - name: startDate
          in: query
          description: >
            The result will only contain the orders with the date of
            'dateFilterOption' later than or equal to this date.
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: >
            The result will only contain the orders with the date of
            'dateFilterOption' earlier than or equal to this date.
          schema:
            type: string
            format: date
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrdersResponse"
            application/json:
              example:
                orders:
                  - orderNumber: O-00000002
                    orderDate: 2017-03-01
                    createdDate: 2018-03-14 15:12:58
                    createdBy: 2c989028622282520162235ab0f603ba
                    updatedDate: 2018-03-14 15:12:58
                    updatedBy: 2c989028622282520162235ab0f603ba
                    existingAccountNumber: accountA_Num
                    currency: USD
                    status: Completed
                    description: This is a description for the Order.
                    subscriptions:
                      - subscriptionNumber: A-S00000001
                        customFields: {}
                        baseVersion: 1
                        newVersion: 2
                        orderActions:
                          - type: UpdateProduct
                            sequence: 0
                            triggerDates:
                              - triggerDate: 2017-03-01
                                name: ContractEffective
                              - triggerDate: 2017-03-01
                                name: ServiceActivation
                              - triggerDate: 2017-03-01
                                name: CustomerAcceptance
                            updateProduct:
                              ratePlanId: 2c989028622282520162235acd1b05d2
                              newRatePlanId: 2c989028622282520162235ada870649
                              chargeUpdates:
                                - chargeNumber: C-00000001
                                  newRatePlanChargeId: 2c989028622282520162235adabc0651
                                  pricing:
                                    recurringVolume:
                                      quantity: 7
                                      tiers: []
                                  effectiveDate: {}
                                  billing: {}
                                  customFields: {}
                              customFields: {}
                            customFields: {}
                            orderItems: []
                            orderMetrics:
                              - productRatePlanChargeId: 2c989028622282520162235aca7a05b9
                                originRatePlanId: 2c989028622282520162235acd1b05d2
                                tcb:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1200
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5000
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                quantity:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    startDate: 2017-03-01
                                productRatePlanId: 2c989028622282520162235acd1005ca
                                tcv:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1200
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5000
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                chargeNumber: C-00000001
                                elp:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -3800
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                mrr:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -12
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 50
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                    customFields:
                      order_cf_date__c: 2017-01-01
                  - orderNumber: O-00000001
                    orderDate: 2017-01-01
                    createdDate: 2018-03-14 15:12:55
                    createdBy: 2c989028622282520162235ab0f603ba
                    updatedDate: 2018-03-14 15:12:55
                    updatedBy: 2c989028622282520162235ab0f603ba
                    existingAccountNumber: accountA_Num
                    currency: USD
                    status: Completed
                    subscriptions:
                      - subscriptionNumber: A-S00000001
                        customFields:
                          sub_cf_picklist__c: sub123
                        newVersion: 1
                        orderActions:
                          - type: CreateSubscription
                            sequence: 0
                            triggerDates:
                              - triggerDate: 2017-01-01
                                name: ContractEffective
                              - triggerDate: 2017-01-01
                                name: ServiceActivation
                              - triggerDate: 2017-01-01
                                name: CustomerAcceptance
                            createSubscription:
                              subscriptionOwnerAccountNumber: accountA_Num
                              terms:
                                autoRenew: false
                                renewalSetting: RENEW_WITH_SPECIFIC_TERM
                                initialTerm:
                                  startDate: 2017-01-01
                                  period: 12
                                  periodType: Month
                                  termType: TERMED
                                renewalTerms:
                                  - period: 0
                                    periodType: Month
                              subscribeToRatePlans:
                                - productRatePlanId: 2c989028622282520162235ac91605b3
                                  newRatePlanId: 2c989028622282520162235acd1b05d2
                                  chargeOverrides:
                                    - chargeNumber: C-00000001
                                      productRateplanChargeId: 2c989028622282520162235aca7a05b9
                                      pricing:
                                        recurringVolume:
                                          quantity: 12
                                          tiers: []
                                          listPriceBase: Per_Billing_Period
                                      startDate: {}
                                      endDate: {}
                                      billing: {}
                                      customFields: {}
                                  customFields: {}
                            customFields:
                              oa_cf_text__c: oa cf test
                            orderItems:
                              - id: 2c989028622282520162235acd7d05dc
                                startDate: 2017-01-01
                                endDate: 2017-12-31
                                quantity: 12
                                orderActionId: 2c989028622282520162235acbcc05c4
                                scId: 2c989028622282520162235acd1b05d3
                            orderMetrics:
                              - productRatePlanChargeId: 2c989028622282520162235aca7a05b9
                                originRatePlanId: 2c989028622282520162235acd1b05d2
                                tcb:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -1296
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                                quantity:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    startDate: 2017-01-01
                                productRatePlanId: 2c989028622282520162235acd1005ca
                                tcv:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -1296
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                                chargeNumber: C-00000001
                                elp:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                mrr:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1080
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -108
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                    customFields:
                      order_cf_date__c: 2017-01-01
                success: true
      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/invoiceOwner/{accountNumber}":
    get:
      tags:
        - Orders
      summary: Get orders by invoice owner
      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. The migration to Order Metrics is in **Limited
        Availability**. We are actively soliciting feedback from a small set of
        early adopters before releasing as generally available. If you have the
        [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders)
        feature enabled, you already have the Order Metrics feature enabled.


        Retrieves the detailed information about all orders for a specified invoice owner.
      operationId: GET_OrdersByInvoiceOwner
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: accountNumber
          in: path
          description: The invoice owner account number.
          required: true
          schema:
            type: string
            format: string
        - name: page
          in: query
          description: |
            The page number of the orders retrieved. The default is 1.
          schema:
            type: integer
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: dateFilterOption
          in: query
          description: >
            The date type to filter on. This field value can be orderDate or
            updatedDate. Default is orderDate.
          schema:
            type: string
        - name: startDate
          in: query
          description: >
            The result will only contain the orders with the date of
            dateFilterOption later than or equal to this date.
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: >
            The result will only contain the orders with the date of
            dateFilterOption earlier than or equal to this date.
          schema:
            type: string
            format: date
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrdersResponse"
            application/json:
              example:
                orders:
                  - orderNumber: O-00000002
                    orderDate: 2017-03-01
                    createdDate: 2018-03-14 15:12:58
                    createdBy: 2c989028622282520162235ab0f603ba
                    updatedDate: 2018-03-14 15:12:58
                    updatedBy: 2c989028622282520162235ab0f603ba
                    existingAccountNumber: accountA_Num
                    currency: USD
                    status: Completed
                    description: This is a description for the Order.
                    subscriptions:
                      - subscriptionNumber: A-S00000001
                        customFields: {}
                        baseVersion: 1
                        newVersion: 2
                        orderActions:
                          - type: UpdateProduct
                            sequence: 0
                            triggerDates:
                              - triggerDate: 2017-03-01
                                name: ContractEffective
                              - triggerDate: 2017-03-01
                                name: ServiceActivation
                              - triggerDate: 2017-03-01
                                name: CustomerAcceptance
                            updateProduct:
                              ratePlanId: 2c989028622282520162235acd1b05d2
                              newRatePlanId: 2c989028622282520162235ada870649
                              chargeUpdates:
                                - chargeNumber: C-00000001
                                  newRatePlanChargeId: 2c989028622282520162235adabc0651
                                  pricing:
                                    recurringVolume:
                                      quantity: 7
                                      tiers: []
                                  effectiveDate: {}
                                  billing: {}
                                  customFields: {}
                              customFields: {}
                            customFields: {}
                            orderItems: []
                            orderMetrics:
                              - productRatePlanChargeId: 2c989028622282520162235aca7a05b9
                                originRatePlanId: 2c989028622282520162235acd1b05d2
                                tcb:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1200
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5000
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                quantity:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    startDate: 2017-03-01
                                productRatePlanId: 2c989028622282520162235acd1005ca
                                tcv:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1200
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -5000
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                chargeNumber: C-00000001
                                elp:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -3800
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                mrr:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 120
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: ChangePrice
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -12
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -500
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: DecreaseQuantity
                                    type: Regular
                                    startDate: 2017-03-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 50
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-03-01
                    customFields:
                      order_cf_date__c: 2017-01-01
                  - orderNumber: O-00000001
                    orderDate: 2017-01-01
                    createdDate: 2018-03-14 15:12:55
                    createdBy: 2c989028622282520162235ab0f603ba
                    updatedDate: 2018-03-14 15:12:55
                    updatedBy: 2c989028622282520162235ab0f603ba
                    existingAccountNumber: accountA_Num
                    currency: USD
                    status: Completed
                    subscriptions:
                      - subscriptionNumber: A-S00000001
                        customFields:
                          sub_cf_picklist__c: sub123
                        newVersion: 1
                        orderActions:
                          - type: CreateSubscription
                            sequence: 0
                            triggerDates:
                              - triggerDate: 2017-01-01
                                name: ContractEffective
                              - triggerDate: 2017-01-01
                                name: ServiceActivation
                              - triggerDate: 2017-01-01
                                name: CustomerAcceptance
                            createSubscription:
                              subscriptionOwnerAccountNumber: accountA_Num
                              terms:
                                autoRenew: false
                                renewalSetting: RENEW_WITH_SPECIFIC_TERM
                                initialTerm:
                                  startDate: 2017-01-01
                                  period: 12
                                  periodType: Month
                                  termType: TERMED
                                renewalTerms:
                                  - period: 0
                                    periodType: Month
                              subscribeToRatePlans:
                                - productRatePlanId: 2c989028622282520162235ac91605b3
                                  newRatePlanId: 2c989028622282520162235acd1b05d2
                                  chargeOverrides:
                                    - chargeNumber: C-00000001
                                      productRateplanChargeId: 2c989028622282520162235aca7a05b9
                                      pricing:
                                        recurringVolume:
                                          quantity: 12
                                          tiers: []
                                          listPriceBase: Per_Billing_Period
                                      startDate: {}
                                      endDate: {}
                                      billing: {}
                                      customFields: {}
                                  customFields: {}
                            customFields:
                              oa_cf_text__c: oa cf test
                            orderItems:
                              - id: 2c989028622282520162235acd7d05dc
                                startDate: 2017-01-01
                                endDate: 2017-12-31
                                quantity: 12
                                orderActionId: 2c989028622282520162235acbcc05c4
                                scId: 2c989028622282520162235acd1b05d3
                            orderMetrics:
                              - productRatePlanChargeId: 2c989028622282520162235aca7a05b9
                                originRatePlanId: 2c989028622282520162235acd1b05d2
                                tcb:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -1296
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                                quantity:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    startDate: 2017-01-01
                                productRatePlanId: 2c989028622282520162235acd1005ca
                                tcv:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -1296
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                                chargeNumber: C-00000001
                                elp:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 12960
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                mrr:
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: 1080
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    generatedReason: Extension
                                    type: Regular
                                    startDate: 2017-01-01
                                  - subscriptionOwner: accountA_Num
                                    invoiceOwner: accountA_Num
                                    amount: -108
                                    endDate: 2017-12-31
                                    orderItemId: 2c989028622282520162235acd7d05dc
                                    termNumber: 1
                                    discountChargeNumber: C-00000002
                                    generatedReason: ChangePrice
                                    type: Discount
                                    startDate: 2017-01-01
                    customFields:
                      order_cf_date__c: 2017-01-01
                success: true
      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/{orderNumber}/customFields":
    put:
      tags:
        - Orders
      summary: Update order custom fields
      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. The migration to Order Metrics is in **Limited
        Availability**. We are actively soliciting feedback from a small set of
        early adopters before releasing as generally available. If you have the
        [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders)
        feature enabled, you already have the Order Metrics feature enabled. 


        Updates the custom fields of a specified order.
      operationId: PUT_UpdateOrderCustomFields
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: orderNumber
          in: path
          description: The order number.
          required: true
          schema:
            type: string
            format: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTOrderPatchRequestType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/subscriptions/{subscriptionNumber}/customFields":
    put:
      tags:
        - Orders
      summary: Update subscription custom fields
      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. The migration to Orders is in **Limited Availability**.
        We are actively soliciting feedback from a small set of early adopters
        before releasing as generally available.


        Updates the custom fields of a specified subscription.
      operationId: PUT_UpdateSubscriptionCustomFields
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: subscriptionNumber
          in: path
          description: The subscription number to be updated.
          required: true
          schema:
            type: string
            format: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSubscriptionPatchRequestType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/orders/{orderNumber}/triggerDates":
    put:
      tags:
        - Orders
      summary: Update order action trigger dates
      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. The migration to Orders is in **Limited Availability**.
        We are actively soliciting feedback from a small set of early adopters
        before releasing as generally available.


        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_Entity_Ids_Single"
        - name: orderNumber
          in: path
          description: Order number of a pending order in which you are to update an order
            action's triggering dates.
          required: true
          schema:
            type: string
            format: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTOrderActionTriggerDatesRequestType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTOrderTriggerDatesResponseType"
            application/json:
              example:
                success: true
                orderNumber: OM-00002
                accountNumber: A00000001
                status: Pending
                subscriptions:
                  - subscriptionNumber: SM-00001
                    status: Pending Activation
                  - subscriptionNumber: SM-00002
                    status: Pending Acceptance
                  - subscriptionNumber: SM-00003
                    status: Active
                  - subscriptionNumber: SM-00004
                    status: Pending Acceptance
      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);
      x-codegen-request-body-name: body
  "/v1/gateway-settlement/payments/{payment-id}/settle":
    post:
      tags:
        - Payment Gateway Reconciliation
      summary: Settle Payment
      description: >
        Sets the Payment status to "Settled" and returns the Payment object as
        response.
      operationId: POST_SettlePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: payment-id
          in: path
          description: Unique ID of the payment.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTSettlePaymentRequest"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTSettlePaymentResponse"
            application/json:
              example:
                id: 2c90c8e26a6a5271016a8e78ba502e4b
                number: P-00000017
                status: Processed
                type: Electronic
                accountId: 2c90c8e26a6a5271016a6fda7f922c10
                amount: 332
                appliedAmount: 0
                unappliedAmount: 0
                refundAmount: 0
                creditBalanceAmount: 0
                currency: USD
                effectiveDate: 2019-05-06
                comment: ""
                paymentMethodId: 2c90c8e26a6a5271016a6fdf9b5f2caa
                paymentMethodSnapshotId: 2c90c8e26a6a5271016a8e78ba4a2e4a
                bankIdentificationNumber: "411111"
                gatewayId: 2c90c8e26a6a5271016a74321ba82ce0
                gatewayResponse: Approved
                gatewayResponseCode: "100"
                gatewayState: Settled
                referenceId: "5571684390686343603009"
                secondPaymentReferenceId: "549536"
                submittedOn: 2019-05-06 11:47:19
                settledOn: 2019-04-06 23:00:00
                createdDate: 2019-05-06 11:47:17
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2019-05-06 12:11:05
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/gateway-settlement/payments/{payment-id}/reject":
    post:
      tags:
        - Payment Gateway Reconciliation
      summary: Reject Payment
      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_Entity_Ids_Single"
        - name: payment-id
          in: path
          description: Unique ID of the payment.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRejectPaymentRequest"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRejectPaymentResponse"
            application/json:
              example:
                id: 2c90c8e26a6a5271016a8e8232892e60
                number: R-00000001
                status: Processed
                type: External
                methodType: CreditCard
                accountId: 2c90c8e26a6a5271016a6fda7f922c10
                amount: 121
                refundDate: 2019-05-06
                paymentMethodId: 2c90c8e26a6a5271016a749380452cfc
                paymentId: 2c90c8e26a6a5271016a8e80de242e56
                reasonCode: Payment Rejection
                gatewayResponse: Insufficient funds latest msg 1
                gatewayResponseCode: "0231"
                gatewayState: Settled
                referenceId: "825522036728874689"
                secondRefundReferenceId: "825522036690700110"
                settledOn: 2019-05-07 20:56:32
                createdDate: 2019-05-06 11:57:38
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2019-05-06 11:57:38
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/gateway-settlement/payments/{payment-id}/chargeback":
    post:
      tags:
        - Payment Gateway Reconciliation
      summary: Reverse Payment
      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_Entity_Ids_Single"
        - name: payment-id
          in: path
          description: Unique ID of the payment.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTReversePaymentRequest"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTReversePaymentResponse"
            application/json:
              example:
                id: 2c90c8e26a6a5271016a8e8232892e60
                number: R-00000001
                status: Processed
                type: External
                methodType: CreditCard
                accountId: 2c90c8e26a6a5271016a6fda7f922c10
                amount: 121
                refundDate: 2019-05-06
                paymentMethodId: 2c90c8e26a6a5271016a749380452cfc
                paymentId: 2c90c8e26a6a5271016a8e80de242e56
                reasonCode: Payment Reversal
                gatewayResponse: Insufficient funds latest msg 1
                gatewayResponseCode: "0231"
                gatewayState: Settled
                referenceId: "825522036728874689"
                secondRefundReferenceId: "825522036690700110"
                settledOn: 2019-05-07 20:56:32
                createdDate: 2019-05-06 11:57:38
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2019-05-06 11:57:38
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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);
      x-codegen-request-body-name: Request
  /v1/paymentgateways:
    get:
      tags:
        - Payment Gateways
      summary: Get payment gateways
      description: |
        Retrieves the basic information about all the payment gateways.
      operationId: GET_Paymentgateways
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentGatwaysResponse"
            application/json:
              example:
                paymentgateways:
                  - id: 4028905f5702783601570291e14c0015
                    name: Test Gateway Adapter
                    type: Test Gateway
                    isDefault: true
                    isActive: true
                success: true
      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/payment-methods:
    post:
      tags:
        - Payment Methods
      summary: Create payment method
      description: >
        You can use this operation to create a payment method for a customer
        account. 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

        **Note:** This feature is in **Limited Availability**. We are actively soliciting feedback from a small set of early adopters before releasing as generally available.


        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)  
      operationId: POST_PaymentMethods
      parameters:
        - $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":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTPaymentMethodResponse"
            application/json:
              example:
                id: 2c92a09650a7a80a0150ab50a5b746bd
                success: true
      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);
      x-codegen-request-body-name: Request
  /v1/payment-methods/decryption:
    post:
      tags:
        - Payment Methods
      summary: Create Apple Pay payment method
      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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTPaymentMethodDecryption"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTPaymentMethodResponseDecryption"
            application/json:
              example:
                paymentMethodId: 2c92c8f83dcbd8b1013dcce1d6a600ce
                success: true
      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);
      x-codegen-request-body-name: Request
  /v1/payment-methods/credit-cards:
    post:
      tags:
        - Payment Methods
      summary: Create credit card payment method
      description: >
        This REST API reference describes how to create a new credit card
        payment method for a customer account.


        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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTPaymentMethodType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTPaymentMethodResponseType"
            application/json:
              example:
                paymentMethodId: 2c92c8f83dcbd8b1013dcce1d6a60
                success: true
      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": "2015", 
                "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": "2015", 
                "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\": \"2015\", \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\": \"2015\", \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\": \"2015\", \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\": \"2015\", \n    \"numConsecutiveFailures\": 3, \n    \"securityCode\": \"123\"\n}", ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
      x-codegen-request-body-name: Request
  "/v1/payment-methods/credit-cards/{payment-method-id}":
    put:
      tags:
        - Payment Methods
      summary: Update credit card payment method
      description: |
        Updates an existing credit card payment method for the specified
        customer account.
      operationId: PUT_PaymentMethodsCreditCard
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: payment-method-id
          in: path
          description: Unique ID of the payment method to update.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTPaymentMethodType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTPaymentMethodResponseType"
            application/json:
              example:
                paymentMethodId: 2c92c8f83dcbd8b1013dcce1d6a600ce
                success: true
      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, 
                "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, 
                "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    \"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    \"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    \"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    \"numConsecutiveFailures\": 5, \n    \"securityCode\": \"111\"\n}", ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
      x-codegen-request-body-name: Request
  "/v1/payment-methods/credit-cards/accounts/{account-key}":
    get:
      tags:
        - Payment Methods
      summary: Get credit card payment methods for account
      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.


        You can send requests for bank transfer or ACH type payment methods. However, the response will not include effective details of these payment methods.
      operationId: GET_PaymentMethodsCreditCard
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: account-key
          in: path
          description: Account number or account ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentMethodsType"
            application/json:
              example:
                nextPage: https://rest.zuora.com/v1/payment-methods/credit-cards/accounts/A00001115?page=2&pageSize=2
                creditCards:
                  - cardHolderInfo:
                      phone: "4082021111"
                      cardHolderName: Leo
                      email: smith@example.com
                    defaultPaymentMethod: true
                    id: 2c92c8f83dabf9cf013daef12dd303b0
                    expirationMonth: 10
                    cardNumber: "************1111"
                    expirationYear: 2020
                    cardType: Visa
                  - cardHolderInfo:
                      zipCode: "95135"
                      addressLine1: 1400 Bridge Pkwy
                      state: California
                      country: United States
                      city: San Jose
                      cardHolderName: foo CC name
                    defaultPaymentMethod: false
                    id: 2c92a0f9391832b10139183e279e0044
                    expirationMonth: 10
                    cardNumber: "*****foo CC #"
                    expirationYear: 2012
                    cardType: Visa
                success: true
      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/{payment-method-id}":
    delete:
      tags:
        - Payment Methods
      summary: Delete payment method
      description: |
        Deletes a credit card payment method from the specified customer
        account.

        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.
      operationId: DELETE_PaymentMethods
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: payment-method-id
          in: path
          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.)
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/payment-methods/{payment-method-id}/verify":
    put:
      tags:
        - Payment Methods
      summary: Verify payment method
      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:
        - name: payment-method-id
          in: path
          description: |
            The ID of the payment method to be verified.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTVerifyPaymentMethodType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTVerifyPaymentMethodResponseType"
            application/json:
              example:
                success: true
                paymentMethodId: 402890765d9ce329015da18034ee0057
      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);
      x-codegen-request-body-name: body
  "/v1/payment-methods/{payment-method-id}/scrub":
    put:
      tags:
        - Payment Methods
      summary: Scrub payment method
      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_Entity_Ids_Single"
        - name: payment-method-id
          in: path
          description: >
            The ID of the payment method where you want to scrub the sensitive
            data.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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}/scr\
            ub\""
        - 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}/authorize":
    post:
      tags:
        - Payment Methods
      summary: Create authorization
      description: >+
        **Note:** If you wish 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 payment](https://www.zuora.com/developer/api-reference/#operation/Object_POSTPayment) or [Create 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 Verifi, CyberSource 1.28, CyberSource 1.97, Chase Paymentech Orbital, and Ingenico ePayments.


        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_Entity_Ids_Single"
        - name: payment-method-id
          in: path
          description: >
            The unique ID of the payment method where the authorization is
            created.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTDelayAuthorizeCapture"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTAuthorizeResponse"
      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);
      x-codegen-request-body-name: Request
  "/v1/payment-methods/{payment-method-id}/voidAuthorize":
    post:
      tags:
        - Payment Methods
      summary: Cancel authorization
      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_Entity_Ids_Single"
        - name: payment-method-id
          in: path
          description: >
            The unique ID of the payment method where the authorization is
            cancelled.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTVoidAuthorize"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTVoidAuthorizeResponse"
      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);
      x-codegen-request-body-name: Request
  "/v1/payment-methods/{payment-method-id}/profiles":
    get:
      tags:
        - Payment Methods
      summary: Get stored credential profiles
      description: >
        Retrieves the stored credential profiles within a payment method.


        **Note:** This feature is in **Limited Availability**. 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_Entity_Ids_Single"
        - name: payment-method-id
          in: path
          description: |
            ID of a payment method.
          required: true
          schema:
            type: string
        - name: includeAll
          in: query
          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.
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetStoredCredentialProfilesResponse"
            application/json:
              example:
                profiles:
                  - paymentMethodId: 402881836953a3c7016953aec290000d
                    number: 1
                    brand: Visa
                    status: Cancelled
                    type: Recurring
                    consentAgreementSrc: External
                    consentAgreementRef: ACCT1338AgreementV1.pdf
                    agreedOn: 2019-03-06 07:45:55
                    activatedOn: 2019-03-06 07:45:55
                    cancelledOn: 2019-03-13 07:52:16
                  - paymentMethodId: 402881836953a3c7016953aec290000d
                    number: 2
                    brand: Visa
                    status: Active
                    type: Recurring
                    consentAgreementSrc: External
                    consentAgreementRef: ACCT1338AgreementV2.pdf
                    agreedOn: 2019-03-13 07:55:08
                    activatedOn: 2019-03-13 07:55:08
                success: true
      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:
      tags:
        - Payment Methods
      summary: Create stored credential profile
      description: >
        Creates a stored credential profile within a pyament 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 **Limited Availability**. 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_Entity_Ids_Single"
        - name: payment-method-id
          in: path
          description: |
            ID of a payment method.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CreateStoredCredentialProfileRequest"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ModifiedStoredCredentialProfileResponse"
            application/json:
              example:
                success: true
                paymentMethodId: 402881836953a3c7016953aec290000d
                number: 3
      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);
      x-codegen-request-body-name: Request
  "/v1/payment-methods/{payment-method-id}/profiles/{profile-number}/cancel":
    post:
      tags:
        - Payment Methods
      summary: Cancel stored credential profile
      description: >
        Cancels a stored credential profile within a pyament 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 **Limited Availability**. 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_Entity_Ids_Single"
        - name: payment-method-id
          in: path
          description: |
            ID of a payment method.
          required: true
          schema:
            type: string
        - name: profile-number
          in: path
          description: >
            Number that identifies a stored credential profile within the
            payment method.
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ModifiedStoredCredentialProfileResponse"
            application/json:
              example:
                success: true
                paymentMethodId: 402881836953a3c7016953aec290000d
                number: 1
      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:
      tags:
        - Payment Methods
      summary: Expire stored credential profile
      description: >
        Expires a stored credential profile within a pyament 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 **Limited Availability**. 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_Entity_Ids_Single"
        - name: payment-method-id
          in: path
          description: |
            ID of a payment method.
          required: true
          schema:
            type: string
        - name: profile-number
          in: path
          description: >
            Number that identifies a stored credential profile within the
            payment method.
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ModifiedStoredCredentialProfileResponse"
            application/json:
              example:
                success: true
                paymentMethodId: 402881836953a3c7016953aec290000d
                number: 2
      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-runs:
    get:
      tags:
        - Payment Runs
      summary: Get payment runs
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: createdById
          in: query
          description: >
            This parameter filters the response based on the `createdById` field.
          schema:
            type: string
        - name: createdDate
          in: query
          description: >
            This parameter filters the response based on the `createdDate` field.
          schema:
            type: string
            format: date-time
        - name: status
          in: query
          description: |
            This parameter filters the response based on the `status` field.
          schema:
            type: string
            enum:
              - Pending
              - Processing
              - Completed
              - Error
              - Canceled
        - name: targetDate
          in: query
          description: |
            This parameter filters the response based on the `targetDate` field.
          schema:
            type: string
            format: date
        - name: updatedById
          in: query
          description: >
            This parameter filters the response based on the `updatedById` field.
          schema:
            type: string
        - name: updatedDate
          in: query
          description: >
            This parameter filters the response based on the `updatedDate` field.
          schema:
            type: string
            format: date-time
        - name: sort
          in: query
          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
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GETPaymentRunCollectionType"
              example:
                paymentRuns:
                  - id: 2c92c0856078bbcb016096576ccb75ca
                    number: PR-00002121
                    targetDate: 2017-12-28
                    status: Completed
                    executedOn: 2017-12-28 13:00:00
                    completedOn: 2017-12-28 13:00:00
                    applyCreditBalance: false
                    consolidatedPayment: false
                    processPaymentWithClosedPM: false
                    collectPayment: true
                    createdDate: 2017-12-27 13:00:00
                    createdById: 2c92c0f956bc8fcb0156f8eee04b4d54
                    updatedDate: 2017-12-28 13:00:00
                    updatedById: 2c92c0f956bc8fcb0156f8eee04b4d54
                nextPage: /payment-runs?page=2
                success: true
      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:
      tags:
        - Payment Runs
      summary: Create payment run
      description: >
        Creates a payment run. You can create a payment run to be executed
        immediately after it is created, or a scheduced payment run to be
        executed in future.


        The `accountId`, `batch`, `billCycleDay`, `currency`, `paymentGatewayId`, and `billingRunId` fields are used to determine which receivables to be paid in the payment run. If none of these fields is specified in the request body, the corresponding payment run collects payments for all accounts.
      operationId: POST_PaymentRun
      parameters:
        - $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":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentRunType"
            application/json:
              example:
                id: 2c92c0856078bbcb0160957bbb8f0b32
                number: PR-00002120
                targetDate: 2017-12-28
                status: Completed
                executedOn: 2017-12-28 09:00:06
                completedOn: 2017-12-28 09:00:06
                applyCreditBalance: false
                consolidatedPayment: false
                processPaymentWithClosedPM: false
                collectPayment: true
                createdDate: 2017-12-27 09:00:02
                createdById: 2c92c0f958fffd7d015914aeefc71a5d
                updatedDate: 2017-12-28 09:00:06
                updatedById: 2c92c0f958fffd7d015914aeefc71a5d
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/payment-runs/{paymentRunId}":
    get:
      tags:
        - Payment Runs
      summary: Get payment run
      description: |
        Retrives the information about a specific payment run.
      operationId: GET_PaymentRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: paymentRunId
          in: path
          description: >
            The unique ID of a payment run. For example,
            402890245f097f39015f0f074a2e0566.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GETPaymentRunType"
              example:
                id: 2c92c0856078bbcb0160957bbb8f0b32
                number: PR-00002120
                targetDate: 2017-12-28
                status: Completed
                executedOn: 2017-12-28 09:00:06
                completedOn: 2017-12-28 09:00:06
                applyCreditBalance: false
                consolidatedPayment: false
                processPaymentWithClosedPM: false
                collectPayment: true
                createdDate: 2017-12-27 09:00:02
                createdById: 2c92c0f958fffd7d015914aeefc71a5d
                updatedDate: 2017-12-28 09:00:06
                updatedById: 2c92c0f958fffd7d015914aeefc71a5d
                success: true
      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:
      tags:
        - Payment Runs
      summary: Update payment run
      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_Entity_Ids_Single"
        - name: paymentRunId
          in: path
          description: >
            The unique ID of a payment run. For example,
            402890245f097f39015f0f074a2e0566.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTPaymentRunRequest"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentRunType"
            application/json:
              example:
                id: 402890245f097f39015f0f074a2e0566
                number: PR-00000391
                status: Pending
                targetDate: 2017-10-12
                accountId: 402890245f097f39015f0e9fcdd60558
                autoApplyCreditMemo: true
                autoApplyUnappliedPayment: true
                consolidatedPayment: true
                processPaymentWithClosedPM: true
                collectPayment: true
                createdDate: 2017-09-22 12:37:22
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-09-22 12:37:22
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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);
      x-codegen-request-body-name: body
    delete:
      tags:
        - Payment Runs
      summary: Delete payment run
      description: >
        Deletes a payment run. Only payment runs with the Canceled or Error
        status can be deleted.
      operationId: DELETE_PaymentRun
      parameters:
        - name: paymentRunId
          in: path
          description: >
            The unique ID of a payment run. For example,
            402890245f097f39015f0f074a2e0566.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
              example:
                success: true
      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);
  "/v1/payment-runs/{paymentRunId}/summary":
    get:
      tags:
        - Payment Runs
      summary: Get payment run summary
      description: |
        Retrives the summary of a payment run.
      operationId: GET_PaymentRunSummary
      parameters:
        - name: paymentRunId
          in: path
          description: >
            The unique ID of a payment run. For example,
            402890245f097f39015f0f074a2e0566.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GETPaymentRunSummaryResponse"
              example:
                numberOfErrors: 0
                numberOfReceivables: 1
                numberOfPayments: 1
                numberOfUnprocessedReceivables: 0
                numberOfCreditBalanceAdjustments: 0
                numberOfInvoices: 0
                numberOfUnprocessedInvoices: 0
                numberOfCreditMemos: 1
                numberOfDebitMemos: 1
                numberOfUnappliedPayments: 1
                numberOfUnprocessedDebitMemos: 0
                totalValues:
                  - totalValueOfReceivables: 256 USD
                    totalValueOfPayments: 56 USD
                    totalValueOfErrors: 0 USD
                    totalValueOfUnprocessedReceivables: 0 USD
                    totalValueOfCreditBalance: 0 USD
                    totalValueOfInvoices: 0 USD
                    totalValueOfUnprocessedInvoices: 0 USD
                    totalValueOfDebitMemos: 256 USD
                    totalValueOfCreditMemos: 100 USD
                    totalValueOfUnappliedPayments: 100 USD
                    totalValueOfUnprocessedDebitMemos: 0 USD
                success: true
      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/payments:
    get:
      tags:
        - Payments
      summary: Get all payments
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: accountId
          in: query
          description: |
            This parameter filters the response based on the `accountId` field.
          schema:
            type: string
        - name: amount
          in: query
          description: |
            This parameter filters the response based on the `amount` field.
          schema:
            type: number
            format: double
        - name: appliedAmount
          in: query
          description: >
            This parameter filters the response based on the `appliedAmount`
            field.
          schema:
            type: number
            format: double
        - name: createdById
          in: query
          description: >
            This parameter filters the response based on the `createdById` field.
          schema:
            type: string
        - name: createdDate
          in: query
          description: >
            This parameter filters the response based on the `createdDate` field.
          schema:
            type: string
            format: date-time
        - name: creditBalanceAmount
          in: query
          description: >
            This parameter filters the response based on the
            `creditBalanceAmount` field.
          schema:
            type: number
            format: double
        - name: currency
          in: query
          description: |
            This parameter filters the response based on the `currency` field.
          schema:
            type: string
        - name: effectiveDate
          in: query
          description: >
            This parameter filters the response based on the `effectiveDate`
            field.
          schema:
            type: string
            format: date-time
        - name: number
          in: query
          description: |
            This parameter filters the response based on the `number` field.
          schema:
            type: string
        - name: refundAmount
          in: query
          description: >
            This parameter filters the response based on the `refundAmount`
            field.
          schema:
            type: number
            format: double
        - name: status
          in: query
          description: |
            This parameter filters the response based on the `status` field.
          schema:
            type: string
            enum:
              - Draft
              - Processing
              - Processed
              - Error
              - Canceled
              - Posted
        - name: type
          in: query
          description: |
            This parameter filters the response based on the `type` field.
          schema:
            type: string
            enum:
              - External
              - Electronic
        - name: unappliedAmount
          in: query
          description: >
            This parameter filters the response based on the `unappliedAmount`
            field.
          schema:
            type: number
            format: double
        - name: updatedById
          in: query
          description: >
            This parameter filters the response based on the `updatedById` field.
          schema:
            type: string
        - name: updatedDate
          in: query
          description: >
            This parameter filters the response based on the `updatedDate` field.
          schema:
            type: string
            format: date-time
        - name: sort
          in: query
          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
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PaymentCollectionResponseType"
            application/json:
              example:
                payments:
                  - id: 4028905f5a87c0ff015a87eb6b75007f
                    number: P-00000001
                    status: Processed
                    type: External
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 44.1
                    appliedAmount: 44.1
                    unappliedAmount: 0
                    refundAmount: 0
                    creditBalanceAmount: 0
                    currency: USD
                    effectiveDate: 2017-03-01
                    comment: normal payment
                    paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                    gatewayState: NotSubmitted
                    createdDate: 2017-03-01 11:30:37
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 11:30:37
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    financeInformation:
                      transferredToAccounting: No
                success: true
      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:
      tags:
        - Payments
      summary: Create payment
      description: >+
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        Creates a payment for the following scenarios:


        - A full payment on an invoice or debit memo

        - A partial payment

        - A payment for several invoices and debit memos

        - An unapplied payment 


        If you do not know to which customer account the payment belongs, you can create a payment without specifying a customer account.


        When creating a payment, the total number of invoices and debit memos that the payment will apply to should be less than or equal to 1,000.


        If the Proration application rule is used, when creating a payment, the following quantity must be less than or equal to 10,000: 


        (number of invoice items + number of debit memo items) * number of payment items


        Otherwise, the First In First Out rule will be used instead of the Proration rule.


        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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CreatePaymentType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a87eb6b75007f
                number: P-00000001
                status: Processed
                type: External
                accountId: 4028905f5a87c0ff015a87d25ae90025
                amount: 44.1
                appliedAmount: 44.1
                unappliedAmount: 0
                refundAmount: 0
                creditBalanceAmount: 0
                currency: USD
                effectiveDate: 2017-03-01
                comment: normal payment
                paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                gatewayState: NotSubmitted
                createdDate: 2017-03-01 11:30:37
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 11:30:37
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/payments/{paymentId}":
    get:
      tags:
        - Payments
      summary: Get payment
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        Retrieves the information about one specific payment.
      operationId: GET_Payment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: paymentId
          in: path
          description: >
            The unique ID of a payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a87eb6b75007f
                number: P-00000001
                status: Processed
                type: External
                accountId: 4028905f5a87c0ff015a87d25ae90025
                amount: 44.1
                appliedAmount: 44.1
                unappliedAmount: 0
                refundAmount: 0
                creditBalanceAmount: 0
                currency: USD
                effectiveDate: 2017-03-01
                comment: normal payment
                paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                gatewayState: NotSubmitted
                createdDate: 2017-03-01 11:30:37
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 11:30:37
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      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:
      tags:
        - Payments
      summary: Update payment
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        Updates a payment.
      operationId: PUT_UpdatePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: paymentId
          in: path
          description: >
            The unique ID of an unapplied payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/UpdatePaymentType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a87eb6b75007f
                number: P-00000001
                status: Processed
                type: External
                accountId: 4028905f5a87c0ff015a88889fe500a8
                amount: 44.1
                appliedAmount: 0
                unappliedAmount: 44.1
                refundAmount: 0
                creditBalanceAmount: 0
                currency: USD
                effectiveDate: 2017-03-01
                comment: new comment
                paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                gatewayState: NotSubmitted
                createdDate: 2017-03-01 11:30:37
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 14:25:34
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      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);
      x-codegen-request-body-name: body
    delete:
      tags:
        - Payments
      summary: Delete payment
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: paymentId
          in: path
          description: >
            The unique ID of an unapplied payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/payments/{paymentId}/transfer":
    put:
      tags:
        - Payments
      summary: Transfer payment
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: paymentId
          in: path
          description: >
            The unique ID of an unapplied payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/TransferPaymentType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a87eb6b75007f
                number: P-00000001
                status: Processed
                type: External
                accountId: 4028905f5a87c0ff015a88889fe500a8
                amount: 44.1
                appliedAmount: 0
                unappliedAmount: 44.1
                refundAmount: 0
                creditBalanceAmount: 0
                currency: USD
                effectiveDate: 2017-03-01
                comment: normal payment
                paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                gatewayState: NotSubmitted
                createdDate: 2017-03-01 11:30:37
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 14:22:58
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/payments/{paymentId}/apply":
    put:
      tags:
        - Payments
      summary: Apply payment
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        Applies an unapplied payment to invoices and debit memos.


        When applying a payment, the total number of invoices and debit memos that the payment will apply to must be less than or equal to 1,000.


        If the Proration application rule is used, when applying a payment, the following quantity must be less than or equal to 10,000: 


        (number of invoice items + number of debit memo items) * number of payment items


        Otherwise, the First In First Out rule will be used instead of the Proration rule.



        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_Entity_Ids_Single"
        - name: paymentId
          in: path
          description: >
            The unique ID of an unapplied payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ApplyPaymentType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a87eb6b75007f
                number: P-00000001
                status: Processed
                type: External
                accountId: 4028905f5a87c0ff015a87d25ae90025
                amount: 44.1
                appliedAmount: 44.1
                unappliedAmount: 0
                refundAmount: 0
                creditBalanceAmount: 0
                currency: USD
                effectiveDate: 2017-03-01
                comment: normal payment
                paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                gatewayState: NotSubmitted
                createdDate: 2017-03-01 11:30:37
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 13:56:15
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/payments/{paymentId}/cancel":
    put:
      tags:
        - Payments
      summary: Cancel payment
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: paymentId
          in: path
          description: >
            The unique ID of an unapplied payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a87eb6b75007f
                number: P-00000001
                status: Canceled
                type: External
                accountId: 4028905f5a87c0ff015a88889fe500a8
                amount: 44.1
                appliedAmount: 0
                unappliedAmount: 44.1
                refundAmount: 0
                creditBalanceAmount: 0
                currency: USD
                effectiveDate: 2017-03-01
                comment: new comment
                paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                gatewayState: NotSubmitted
                createdDate: 2017-03-01 11:30:37
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 14:26:57
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      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:
      tags:
        - Payments
      summary: Get payment parts
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: paymentId
          in: path
          description: >
            The unique ID of a payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentPartsCollectionType"
            application/json:
              example:
                parts:
                  - id: 4028905f5a87c0ff015a87eb6beb008d
                    debitMemoId: 4028905f5a87c0ff015a87e49e6b0062
                    amount: 4.1
                    createdDate: 2017-03-01 11:30:37
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 11:30:37
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                  - id: 4028905f5a87c0ff015a87eb6beb008c
                    invoiceId: 4028905f5a87c0ff015a87d3f8f10043
                    amount: 40
                    createdDate: 2017-03-01 11:30:37
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 11:30:37
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Payments
      summary: Get payment part
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - name: partid
          in: path
          description: >
            The unique ID of a specific payment part. You can get the payment
            part ID from the response of [Get payment
            parts](https://www.zuora.com/developer/api-reference/#operation/GET_PaymentParts).
          required: true
          schema:
            type: string
        - name: paymentId
          in: path
          description: >
            The unique ID of a payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentPartType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a87eb6beb008d
                debitMemoId: 4028905f5a87c0ff015a87e49e6b0062
                amount: 4.1
                createdDate: 2017-03-01 11:30:37
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 11:30:37
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Payments
      summary: Get payment part items
      description: >
        **Note:** The Invoice Item Settlement feature is in **Limited
        Availability**, and it must be used together with other Invoice
        Settlement features (Unapplied Payments, and Credit and Debit memos). If
        you wish to have access to the feature, submit a request at [Zuora
        Global Support](http://support.zuora.com/). 


        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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: partid
          in: path
          description: >
            The unique ID of a specific payment part. You can get the payment
            part ID from the response of [Get payment
            parts](https://www.zuora.com/developer/api-reference/#operation/GET_PaymentParts).
          required: true
          schema:
            type: string
        - name: paymentId
          in: path
          description: >
            The unique ID of a payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentItemPartCollectionType"
            application/json:
              example:
                itemParts:
                  - id: 4028905f5a87c0ff015a87eb6bd8008a
                    debitMemoItemId: 4028905f5a87c0ff015a87e49e7a0063
                    amount: 4
                    createdDate: 2017-03-01 11:30:37
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 11:30:37
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                  - id: 4028905f5a87c0ff015a87eb6bd8008b
                    taxItemId: 4028905f5a87c0ff015a87e49f5e0065
                    amount: 0.1
                    createdDate: 2017-03-01 11:30:37
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 11:30:37
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Payments
      summary: Get payment part item
      description: >
        **Note:** The Invoice Item Settlement feature is in **Limited
        Availability**, and it must be used together with other Invoice
        Settlement features (Unapplied Payments, and Credit and Debit memos). If
        you wish to have access to the feature, submit a request at [Zuora
        Global Support](http://support.zuora.com/).


        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_Entity_Ids_Single"
        - name: partid
          in: path
          description: >
            The unique ID of a specific payment part. You can get the payment
            part ID from the response of [Get payment
            parts](https://www.zuora.com/developer/api-reference/#operation/GET_PaymentParts).
          required: true
          schema:
            type: string
        - name: itempartid
          in: path
          description: >
            The unique ID of a specific payment part item. You can get the
            payment part item ID from the response of [Get payment part
            items](https://www.zuora.com/developer/api-reference/#operation/GET_PaymentItemParts).
          required: true
          schema:
            type: string
        - name: paymentId
          in: path
          description: >
            The unique ID of a payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentItemPartType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a87eb6bd8008a
                debitMemoItemId: 4028905f5a87c0ff015a87e49e7a0063
                amount: 4
                createdDate: 2017-03-01 11:30:37
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 11:30:37
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Payments
      summary: Refund payment
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        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).
      operationId: POST_RefundPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: paymentId
          in: path
          description: >
            The unique ID of an unapplied payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostRefundType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundPaymentType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a889e590e00c9
                number: R-00000001
                status: Processed
                type: External
                methodType: CreditCard
                accountId: 4028905f5a87c0ff015a87d25ae90025
                amount: 4
                refundDate: 2017-03-01
                comment: Create a refund for unapplied payment.
                paymentId: 4028905f5a87c0ff015a889ddfb800c0
                reasonCode: Standard Refund
                gatewayState: NotSubmitted
                createdDate: 2017-03-01 14:46:03
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 14:46:03
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      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.", 
                "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.", 
                "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    \"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    \"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    \"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    \"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);
      x-codegen-request-body-name: body
  "/v1/payments/{paymentId}/unapply":
    put:
      tags:
        - Payments
      summary: Unapply payment
      description: >
        **Note:** The Invoice Settlement feature is in **Limited Availability**.
        This feature includes Unapplied Payments, Credit and Debit Memo, and
        Invoice Item Settlement. If you wish to have access to the feature,
        submit a request at [Zuora Global Support](http://support.zuora.com/). 


        Unapplies an applied payment from invoices and debit memos.


        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_Entity_Ids_Single"
        - name: paymentId
          in: path
          description: >
            The unique ID of an applied payment. For example,
            8a8082e65b27f6c3015b89e4344c16b1.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/UnapplyPaymentType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a87eb6b75007f
                number: P-00000001
                status: Processed
                type: External
                accountId: 4028905f5a87c0ff015a87d25ae90025
                amount: 44.1
                appliedAmount: 32.98
                unappliedAmount: 11.12
                refundAmount: 0
                creditBalanceAmount: 0
                currency: USD
                effectiveDate: 2017-03-01
                comment: normal payment
                paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                gatewayState: NotSubmitted
                createdDate: 2017-03-01 11:30:37
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 13:53:12
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      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);
      x-codegen-request-body-name: body
  "/v1/rateplan/{product_id}/productRatePlan":
    get:
      tags:
        - Product Rate Plans
      summary: Get product rate plans
      description: >
        Retrieves information about all product rate plans of a specific product.
      operationId: GET_ProductRatePlans
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_page"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: product_id
          in: path
          description: >
            The unique ID of a product. For example,
            2c92c0f96487e16a016487f663c71a61.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETProductRatePlansResponse"
            application/json:
              example:
                productRatePlans:
                  - id: 40289f466464127601646473d6f7000f
                    status: Active
                    name: New Rate Plan
                    description: ""
                    effectiveStartDate: 2016-07-01
                    effectiveEndDate: 2020-07-31
                    productRatePlanCharges:
                      - id: 40289f4664641276016464740dd0001c
                        name: New Component
                        type: Recurring
                        model: FlatFee
                        pricingSummary:
                          - USD100
                        pricing:
                          - currency: USD
                            price: 100
                        productDiscountApplyDetails: []
                        endDateCondition: Subscription_End
                        billingDay: DefaultFromCustomer
                        listPriceBase: Per_Billing_Period
                        billingTiming: IN_ADVANCE
                        billingPeriod: Month
                        billingPeriodAlignment: AlignToCharge
                        taxable: false
                        taxCode: ""
                        triggerEvent: ContractEffective
                        description: ""
                        revenueRecognitionRuleName: Recognize upon invoicing
                        revRecTriggerCondition: ContractEffectiveDate
                        revRecCode: ""
                        financeInformation:
                          recognizedRevenueAccountingCode: ""
                          deferredRevenueAccountingCode: ""
                success: true
      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/quotes/document:
    post:
      tags:
        - Quotes Document
      summary: Generate quotes document
      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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTQuoteDocType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTQuoteDocResponseType"
            application/json:
              example:
                success: true
                file: https://rest.zuora.com/v1/file/2c92c09447f1ca410147f7bfed8c5a87
      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);
      x-codegen-request-body-name: Request
  /v1/refunds:
    get:
      tags:
        - Refunds
      summary: Get all refunds
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: accountId
          in: query
          description: |
            This parameter filters the response based on the `accountId` field.
          schema:
            type: string
        - name: amount
          in: query
          description: |
            This parameter filters the response based on the `amount` field.
          schema:
            type: number
            format: double
        - name: createdById
          in: query
          description: >
            This parameter filters the response based on the `createdById` field.
          schema:
            type: string
        - name: createdDate
          in: query
          description: >
            This parameter filters the response based on the `createdDate` field.
          schema:
            type: string
            format: date-time
        - name: methodType
          in: query
          description: |
            This parameter filters the response based on the `methodType` field.
          schema:
            type: string
            enum:
              - ACH
              - Cash
              - Check
              - CreditCard
              - PayPal
              - WireTransfer
              - DebitCard
              - CreditCardReferenceTransaction
              - BankTransfer
              - Other
        - name: number
          in: query
          description: |
            This parameter filters the response based on the `number` field.
          schema:
            type: string
        - name: paymentId
          in: query
          description: |
            This parameter filters the response based on the `paymentId` field.
          schema:
            type: string
        - name: refundDate
          in: query
          description: |
            This parameter filters the response based on the `refundDate` field.
          schema:
            type: string
            format: date
        - name: status
          in: query
          description: |
            This parameter filters the response based on the `status` field.
          schema:
            type: string
            enum:
              - Processed
              - Canceled
              - Error
              - Processing
        - name: type
          in: query
          description: |
            This parameter filters the response based on the `type` field.
          schema:
            type: string
            enum:
              - External
              - Electronic
        - name: updatedById
          in: query
          description: >
            This parameter filters the response based on the `updatedById` field.
          schema:
            type: string
        - name: updatedDate
          in: query
          description: >
            This parameter filters the response based on the `updatedDate` field.
          schema:
            type: string
            format: date-time
        - name: sort
          in: query
          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
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundCollectionType"
            application/json:
              example:
                refunds:
                  - id: 4028905f5a87c0ff015a889e590e00c9
                    number: R-00000001
                    status: Processed
                    type: External
                    methodType: CreditCard
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 4
                    refundDate: 2017-03-01
                    comment: update comment
                    paymentId: 4028905f5a87c0ff015a889ddfb800c0
                    reasonCode: Standard Refund
                    gatewayState: NotSubmitted
                    createdDate: 2017-03-01 14:46:03
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 16:56:41
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    financeInformation:
                      transferredToAccounting: No
                success: true
      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/{refundId}":
    get:
      tags:
        - Refunds
      summary: Get refund
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 the information about a specific refund.
      operationId: GET_Refund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: refundId
          in: path
          description: >
            The unique ID of a refund. For example,
            4028905f5a87c0ff015a889e590e00c9.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a889e590e00c9
                number: R-00000001
                status: Processed
                type: External
                methodType: CreditCard
                accountId: 4028905f5a87c0ff015a87d25ae90025
                amount: 4
                refundDate: 2017-03-01
                comment: Create a refund for unapplied payment.
                paymentId: 4028905f5a87c0ff015a889ddfb800c0
                reasonCode: Standard Refund
                gatewayState: NotSubmitted
                createdDate: 2017-03-01 14:46:03
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 14:46:03
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      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:
      tags:
        - Refunds
      summary: Update refund
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 the basic and finance information about a refund.
      operationId: PUT_UpdateRefund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: refundId
          in: path
          description: >
            The unique ID of a refund. For example,
            4028905f5a87c0ff015a889e590e00c9.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTRefundType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a889e590e00c9
                number: R-00000001
                status: Processed
                type: External
                methodType: CreditCard
                accountId: 4028905f5a87c0ff015a87d25ae90025
                amount: 4
                refundDate: 2017-03-01
                comment: update comment
                paymentId: 4028905f5a87c0ff015a889ddfb800c0
                reasonCode: Standard Refund
                gatewayState: NotSubmitted
                createdDate: 2017-03-01 14:46:03
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 16:56:41
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      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);
      x-codegen-request-body-name: body
    delete:
      tags:
        - Refunds
      summary: Delete refund
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 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_Entity_Ids_Single"
        - name: refundId
          in: path
          description: >
            The unique ID of a refund. For example,
            4028905f5a87c0ff015a889e590e00c9.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/refunds/{refundId}/cancel":
    put:
      tags:
        - Refunds
      summary: Cancel refund
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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/). 


        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_Entity_Ids_Single"
        - name: refundId
          in: path
          description: >
            The unique ID of a refund. For example,
            4028905f5a87c0ff015a889e590e00c9.      
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a889e590e00c9
                number: R-00000001
                status: Canceled
                type: External
                methodType: CreditCard
                accountId: 4028905f5a87c0ff015a87d25ae90025
                amount: 4
                refundDate: 2017-03-01
                comment: update comment
                paymentId: 4028905f5a87c0ff015a889ddfb800c0
                reasonCode: Standard Refund
                gatewayState: NotSubmitted
                cancelledOn: 2017-03-01 17:03:07
                createdDate: 2017-03-01 14:46:03
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 17:03:07
                updatedById: 402881e522cf4f9b0122cf5d82860002
                financeInformation:
                  transferredToAccounting: No
                success: true
      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:
      tags:
        - Refunds
      summary: Get refund parts
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 the information about all parts of a refund.
      operationId: GET_RefundParts
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: refundId
          in: path
          description: >
            The unique ID of a refund. For example,
            4028905f5a87c0ff015a889e590e00c9.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundPartCollectionType"
            application/json:
              example:
                parts:
                  - id: 4028905f5a87c0ff015a889e592b00cf
                    paymentId: 4028905f5a87c0ff015a889ddfb800c0
                    amount: 4
                    createdDate: 2017-03-01 14:46:03
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 14:46:03
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Refunds
      summary: Get refund part
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 the information about a specific refund part.
      operationId: GET_RefundPart
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: refundpartid
          in: path
          description: >
            The unique ID of a specific refund part. You can get the refund part
            ID from the response of [Get refund
            parts](https://www.zuora.com/developer/api-reference/#operation/GET_RefundParts).
          required: true
          schema:
            type: string
        - name: refundId
          in: path
          description: >
            The unique ID of a refund. For example,
            4028905f5a87c0ff015a889e590e00c9.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/RefundPartResponseType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a889e592b00cf
                paymentId: 4028905f5a87c0ff015a889ddfb800c0
                amount: 4
                createdDate: 2017-03-01 14:46:03
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 14:46:03
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Refunds
      summary: Get refund part items
      description: >
        **Note:** The Invoice Item Settlement 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 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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: refundpartid
          in: path
          description: >
            The unique ID of a specific refund part. You can get the refund part
            ID from the response of [Get refund
            parts](https://www.zuora.com/developer/api-reference/#operation/GET_RefundParts).
          required: true
          schema:
            type: string
        - name: refundId
          in: path
          description: >
            The unique ID of a refund. For example,
            4028905f5a87c0ff015a889e590e00c9.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundItemPartCollectionType"
            application/json:
              example:
                itemParts:
                  - id: 4028905f5a87c0ff015a889e592a00ce
                    amount: 4
                    createdDate: 2017-03-01 14:46:03
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 14:46:03
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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:
      tags:
        - Refunds
      summary: Get refund part item
      description: >
        **Note:** The Invoice Item Settlement 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 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_Entity_Ids_Single"
        - name: itempartid
          in: path
          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).
          required: true
          schema:
            type: string
        - name: refundpartid
          in: path
          description: >
            The unique ID of a specific refund part. You can get the refund part
            ID from the response of [Get refund
            parts](https://www.zuora.com/developer/api-reference/#operation/GET_RefundParts).
          required: true
          schema:
            type: string
        - name: refundId
          in: path
          description: >
            The unique ID of a refund. For example,
            4028905f5a87c0ff015a889e590e00c9.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundItemPartType"
            application/json:
              example:
                id: 4028905f5a87c0ff015a889e592a00ce
                amount: 4
                createdDate: 2017-03-01 14:46:03
                createdById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-03-01 14:46:03
                updatedById: 402881e522cf4f9b0122cf5d82860002
                success: true
      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/{event-number}":
    get:
      tags:
        - Revenue Events
      summary: Get revenue event details
      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_Entity_Ids_Single"
        - name: event-number
          in: path
          description: The number associated with the revenue event.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueEventDetailType"
            application/json:
              example:
                number: RE-00000001
                currency: USD
                accountId: 2c92c0f8439770960143b2141f5a584e
                subscriptionId: 2c92c0f943977b4f0143b23487994327
                subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                createdOn: 2014-01-20 16:36:45
                eventType: Invoice Posted
                recognitionStart: 2013-10-10
                recognitionEnd: 2013-10-10
                revenueItems:
                  - accountingPeriodName: Oct'2013
                    isAccountingPeriodClosed: false
                    amount: 50
                    currency: USD
                    accountingPeriodStartDate: 2013-10-01
                    accountingPeriodEndDate: 2013-10-31
                success: true
      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-events/revenue-schedules/{rs-number}":
    get:
      tags:
        - Revenue Events
      summary: Get revenue events for a revenue schedule
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_revenue"
        - name: rs-number
          in: path
          description: Revenue schedule number. The revenue schedule number is always
            prefixed with "RS", for example, "RS-00000001".
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueEventDetailsType"
            application/json:
              example:
                revenueEventDetails:
                  - number: RE-00000001
                    currency: USD
                    notes: Phase 1 Test
                    accountId: 2c92c0f8439770960143b2111f5a584e
                    subscriptionId: 2c92c0f943977b4f0143b23487999327
                    subscriptionChargeId: 2c92c0f943977b4f0143b22287ed432e
                    createdOn: 2014-01-21 11:35:42
                    eventType: Revenue Distributed
                    revenueItems:
                      - accountingPeriodName: Oct'2013
                        isAccountingPeriodClosed: false
                        amount: 10
                        currency: USD
                        accountingPeriodStartDate: 2013-10-01
                        accountingPeriodEndDate: 2013-10-31
                      - accountingPeriodName: Open-Ended
                        isAccountingPeriodClosed: false
                        amount: -10
                        currency: USD
                        accountingPeriodStartDate: 2013-11-12
                  - number: RE-00000002
                    currency: USD
                    accountId: 2c92c0f8439770960143b2111f5a584e
                    subscriptionId: 2c92c0f943977b4f0143b22287994327
                    subscriptionChargeId: 2c92c0f943977b4f0143b99987ed432e
                    createdOn: 2014-01-20 16:36:45
                    eventType: Invoice Posted
                    recognitionStart: 2013-10-10
                    recognitionEnd: 2013-10-10
                    revenueItems:
                      - accountingPeriodName: Oct'2013
                        isAccountingPeriodClosed: false
                        amount: 50
                        currency: USD
                        accountingPeriodStartDate: 2013-10-01
                        accountingPeriodEndDate: 2013-10-31
                success: true
      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-items/charge-revenue-summaries/{crs-number}":
    get:
      tags:
        - Revenue Items
      summary: Get revenue items by charge revenue summary number
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_accounting"
        - name: crs-number
          in: path
          description: The charge revenue summary number.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueItemsType"
            application/json:
              example:
                revenueItems:
                  - accountingPeriodName: Sep'2013
                    isAccountingPeriodClosed: false
                    amount: 35
                    currency: USD
                    accountingPeriodStartDate: 2013-09-01
                    accountingPeriodEndDate: 2013-09-30
                  - accountingPeriodName: Oct'2013
                    isAccountingPeriodClosed: false
                    amount: 50
                    currency: USD
                    accountingPeriodStartDate: 2013-10-01
                    accountingPeriodEndDate: 2013-10-31
                  - accountingPeriodName: Open-Ended
                    isAccountingPeriodClosed: false
                    amount: 150
                    currency: USD
                    accountingPeriodStartDate: 2013-12-11
                success: true
      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:
      tags:
        - Revenue Items
      summary: Get revenue items by revenue event number
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_accounting"
        - name: event-number
          in: path
          description: The number associated with the revenue event.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueItemsType"
            application/json:
              example:
                revenueItems:
                  - accountingPeriodName: Oct'2013
                    isAccountingPeriodClosed: false
                    amount: 50
                    currency: USD
                    accountingPeriodStartDate: 2013-10-01
                    accountingPeriodEndDate: 2013-10-31
                success: true
      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:
      tags:
        - Revenue Items
      summary: Update custom fields on revenue items by revenue event number
      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_Entity_Ids_Single"
        - name: event-number
          in: path
          description: The number associated with the revenue event.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTEventRIDetailType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/revenue-items/revenue-schedules/{rs-number}":
    get:
      tags:
        - Revenue Items
      summary: Get revenue items by revenue schedule
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_accounting"
        - name: rs-number
          in: path
          description: Revenue schedule number. The revenue schedule number is always
            prefixed with "RS", for example, "RS-00000001".
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRsRevenueItemsType"
            application/json:
              example:
                revenueItems:
                  - accountingPeriodName: Oct'2013
                    isAccountingPeriodClosed: false
                    amount: 50
                    currency: USD
                    accountingPeriodStartDate: 2013-10-01
                    accountingPeriodEndDate: 2013-10-31
                success: true
      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:
      tags:
        - Revenue Items
      summary: Update custom fields on revenue items by revenue schedule number
      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_Entity_Ids_Single"
        - name: rs-number
          in: path
          description: Revenue schedule number. The revenue schedule number is always
            prefixed with "RS", for example, "RS-00000001".
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTScheduleRIDetailType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/revenue-recognition-rules/product-charges/{charge-key}":
    get:
      tags:
        - Revenue Rules
      summary: Get revenue recognition rule by product rate plan charge
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 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_Entity_Ids_Single"
        - name: charge-key
          in: path
          description: >
            The unique ID of a product rate plan charge. For example,
            8a8082e65ba86084015bb323d3c61d82.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueRecognitionRuleAssociationType"
            application/json:
              example:
                revenueRecognitionRuleName: Custom - Unlimited recognition
                success: true
      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:
      tags:
        - Revenue Rules
      summary: Get revenue recognition rule by subscription charge
      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_Entity_Ids_Single"
        - name: charge-key
          in: path
          description: >
            The unique ID of the subscription rate plan charge. For example,
            402892793e173340013e173b81000012.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueRecognitionRuleAssociationType"
            application/json:
              example:
                revenueRecognitionRuleName: Recognize upon invoicing
                success: true
      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/settings/finance/revenue-automation-start-date:
    get:
      tags:
        - Revenue Rules
      summary: Get the revenue automation start date
      description: >
        This REST API reference 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_Entity_Ids_Single"
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueStartDateSettingType"
            application/json:
              example:
                startDate: 2012-02-01
                updatedOn: 2013-09-11 22:49:18
                updatedBy: MyCorpAdmin
                success: true
      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/revenue-schedules/credit-memo-items/{cmi-id}":
    get:
      tags:
        - Revenue Schedules
      summary: |
        Get revenue schedule by credit memo item ID
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 the details about a revenue schedule by specifying a valid credit memo item ID.
      operationId: GET_RSbyCreditMemoItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: cmi-id
          in: path
          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).
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailType"
            application/json:
              example:
                number: RS-00000116
                recognitionRuleName: Recognize upon invoicing
                amount: -100
                undistributedUnrecognizedRevenue: 0
                recognizedRevenue: 0
                unrecognizedRevenue: -100
                currency: USD
                createdOn: 2017-03-03 08:52:59
                updatedOn: 2017-03-03 08:53:00
                accountId: 2c90838f42cf16030142cf215ecb0014
                subscriptionId: 4028903b5a7eb9bc015a91a744a90111
                subscriptionChargeId: 4028903b5a7eb9bc015a91a744a90222
                productChargeId: 4028903b5a7eb9bc015a91a744a90165
                linkedTransactionId: 4028903b5a7eb9bc015a91a7bb380171
                linkedTransactionNumber: CM00000001
                linkedTransactionType: CreditMemoItem
                revenueScheduleDate: 2017-03-03
                revenueItems:
                  - accountingPeriodName: Mar-2017
                    isAccountingPeriodClosed: false
                    amount: -100
                    currency: USD
                    accountingPeriodStartDate: 2017-03-01
                    accountingPeriodEndDate: 2017-03-31
                    recognizedRevenueAccountingCodeType: Sales Revenue
                    recognizedRevenueAccountingCode: Subscription Revenue
                    deferredRevenueAccountingCodeType: Deferred Revenue
                    deferredRevenueAccountingCode: Deferred Revenue
                success: true
      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:
      tags:
        - Revenue Schedules
      summary: |
        Create revenue schedule for credit memo item (manual distribution)
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 a revenue schedule for a credit memo item, and manually distribute the revenue.
      operationId: POST_RSforCreditMemoItem_ManualDistribution
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: cmi-id
          in: path
          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).
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
            application/json:
              example:
                success: true
                revenueScheduleNumber: RS-00000119
      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);
      x-codegen-request-body-name: body
  "/v1/revenue-schedules/credit-memo-items/{cmi-id}/distribute-revenue-with-date-range":
    post:
      tags:
        - Revenue Schedules
      summary: |
        Create revenue schedule for credit memo item (distribute by date range)
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 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_Entity_Ids_Single"
        - name: cmi-id
          in: path
          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).
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionRatablyCMType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
            application/json:
              example:
                success: true
                revenueScheduleNumber: RS-00000119
      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);
      x-codegen-request-body-name: body
  "/v1/revenue-schedules/debit-memo-items/{dmi-id}":
    get:
      tags:
        - Revenue Schedules
      summary: |
        Get revenue schedule by debit memo item ID
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 the details about a revenue schedule by specifying a valid debit memo item ID.
      operationId: GET_RSbyDebitMemoItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: dmi-id
          in: path
          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).
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailType"
            application/json:
              example:
                number: RS-00000117
                recognitionRuleName: Recognize upon invoicing
                amount: -100
                undistributedUnrecognizedRevenue: 0
                recognizedRevenue: 0
                unrecognizedRevenue: -100
                currency: USD
                createdOn: 2017-03-03 08:52:59
                updatedOn: 2017-03-03 08:53:00
                accountId: 2c90838f42cf16030142cf215ecb0014
                subscriptionId: 4028903b5a7eb9bc015a91a744a30111
                subscriptionChargeId: 4028903b5a7eb9bc015a91a344a90222
                productChargeId: 4028903b5a7eb9bc015a91a734a90165
                linkedTransactionId: 4028903b5a7eb9bc015a33a7bb380171
                linkedTransactionNumber: DM00000001
                linkedTransactionType: DebitMemoItem
                revenueScheduleDate: 2017-03-03
                revenueItems:
                  - accountingPeriodName: Mar-2017
                    isAccountingPeriodClosed: false
                    amount: -100
                    currency: USD
                    accountingPeriodStartDate: 2017-03-01
                    accountingPeriodEndDate: 2017-03-31
                    recognizedRevenueAccountingCodeType: Sales Revenue
                    recognizedRevenueAccountingCode: Subscription Revenue
                    deferredRevenueAccountingCodeType: Deferred Revenue
                    deferredRevenueAccountingCode: Deferred Revenue
                success: true
      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:
      tags:
        - Revenue Schedules
      summary: |
        Create revenue schedule for debit memo item (manual distribution)
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 a revenue schedule for a debit memo item, and manually distribute the revenue.
      operationId: POST_RSforDebitMemoItem_ManualDistribution
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: dmi-id
          in: path
          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).
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
            application/json:
              example:
                success: true
                revenueScheduleNumber: RS-00000119
      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);
      x-codegen-request-body-name: body
  "/v1/revenue-schedules/debit-memo-items/{dmi-id}/distribute-revenue-with-date-range":
    post:
      tags:
        - Revenue Schedules
      summary: |
        Create revenue schedule for debit memo item (distribute by date range)
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 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_Entity_Ids_Single"
        - name: dmi-id
          in: path
          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).
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionRatablyDMType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
            application/json:
              example:
                success: true
                revenueScheduleNumber: RS-00000119
      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);
      x-codegen-request-body-name: body
  "/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}":
    get:
      tags:
        - Revenue Schedules
      summary: Get revenue schedule by invoice item adjustment
      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_Entity_Ids_Single"
        - name: invoice-item-adj-key
          in: path
          description: ID of the Invoice Item Adjustment, for example,
            e20b07fd416dcfcf0141c81164fd0a72.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailType"
            application/json:
              example:
                number: RS-00000273
                recognitionRuleName: Recognize upon invoicing
                amount: -25
                undistributedUnrecognizedRevenue: -25
                recognizedRevenue: 0
                unrecognizedRevenue: -25
                currency: USD
                createdOn: 2014-01-21 13:52:38
                updatedOn: 2014-01-21 13:52:38
                accountId: 2c92c0f8439770960143b2141f5a584e
                subscriptionId: 2c92c0f943977b4f0143b23487994327
                subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                linkedTransactionId: 2c92c0f8439770a40143b6ca76df205a
                linkedTransactionNumber: IIA-00000070
                linkedTransactionType: InvoiceItemAdjustment
                revenueScheduleDate: 2014-01-21
                revenueItems:
                  - accountingPeriodName: Open-Ended
                    isAccountingPeriodClosed: false
                    amount: -25
                    currency: USD
                    accountingPeriodStartDate: 2013-12-11
                success: true
      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:
      tags:
        - Revenue Schedules
      summary: Create revenue schedule for Invoice Item Adjustment (manual distribution)
      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_Entity_Ids_Single"
        - name: invoice-item-adj-key
          in: path
          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.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
            application/json:
              example:
                revenueScheduleNumber: rs-00000002
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}/distribute-revenue-with-date-range":
    post:
      tags:
        - Revenue Schedules
      summary: Create revenue schedule for Invoice Item Adjustment (distribute by date
        range)
      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_Entity_Ids_Single"
        - name: invoice-item-adj-key
          in: path
          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.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByDateRangeType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
            application/json:
              example:
                revenueScheduleNumber: RS-00000003
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/revenue-schedules/invoice-items/{invoice-item-id}":
    get:
      tags:
        - Revenue Schedules
      summary: Get revenue schedule by invoice item ID
      description: >
        Retrieves the details of a revenue schedule by specifying the invoice
        item ID.
      operationId: GET_RSbyInvoiceItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: invoice-item-id
          in: path
          description: A valid Invoice Item ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailType"
            application/json:
              example:
                number: RS-00000290
                recognitionRuleName: Recognize upon invoicing
                amount: 50
                undistributedUnrecognizedRevenue: 50
                recognizedRevenue: 0
                unrecognizedRevenue: 50
                currency: USD
                createdOn: 2014-01-21 13:59:25
                updatedOn: 2014-01-21 13:59:25
                accountId: 2c92c0f8439770960143b2141f5a584e
                subscriptionId: 2c92c0f943977b4f0143b23487994327
                subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                linkedTransactionId: 2c92c094439782460143b62c2ee60f59
                linkedTransactionType: InvoiceItem
                revenueScheduleDate: 2014-01-21
                revenueItems:
                  - accountingPeriodName: Open-Ended
                    isAccountingPeriodClosed: false
                    amount: 50
                    currency: USD
                    accountingPeriodStartDate: 2013-12-11
                    recognizedRevenueAccountingCodeType: "Revenue: Sales"
                    recognizedRevenueAccountingCode: Recurring Monthly Revenue
                success: true
      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:
      tags:
        - Revenue Schedules
      summary: Create revenue schedule for Invoice Item (manual distribution)
      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_Entity_Ids_Single"
        - name: invoice-item-id
          in: path
          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.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
            application/json:
              example:
                revenueScheduleNumber: RS-00000002
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/revenue-schedules/invoice-items/{invoice-item-id}/distribute-revenue-with-date-range":
    post:
      tags:
        - Revenue Schedules
      summary: Create revenue schedule for Invoice Item (distribute by date range)
      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_Entity_Ids_Single"
        - name: invoice-item-id
          in: path
          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.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByDateRangeType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
            application/json:
              example:
                revenueScheduleNumber: RS-00000003
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/revenue-schedules/product-charges/{charge-key}/{account-key}":
    get:
      tags:
        - Revenue Schedules
      summary: >
        Get all revenue schedules of product charge by charge ID and billing
        account ID
      description: >
        **Note:** This feature is only available if you have the Invoice
        Settlement feature enabled. The Invoice Settlement 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 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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_revenue"
        - name: account-key
          in: path
          description: |
            The account number or account ID.
          required: true
          schema:
            type: string
        - name: charge-key
          in: path
          description: >
            The unique ID of a product rate plan charge. For example,
            8a8082e65ba86084015bb323d3c61d82.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailsByProductChargeType"
            application/json:
              example:
                revenueSchedules:
                  - number: RS-00000123
                    recognitionRuleName: Custom - Unlimited recognition
                    amount: 100
                    undistributedUnrecognizedRevenue: 0
                    recognizedRevenue: 0
                    unrecognizedRevenue: 100
                    currency: USD
                    notes: some notes
                    createdOn: 2017-03-03 09:55:53
                    updatedOn: 2017-03-03 09:55:53
                    accountId: 2c90838f42cf16030142cf215ecb0014
                    productChargeId: 4028903b5a7eb9bc015a91a77404016a
                    linkedTransactionId: 4028903b5a7eb9bc015a91df45ea024e
                    linkedTransactionNumber: DM00000003
                    linkedTransactionType: DebitMemoItem
                    revenueScheduleDate: 2017-03-03
                    revenueItems:
                      - accountingPeriodName: Mar-2017
                        isAccountingPeriodClosed: false
                        amount: 50
                        currency: USD
                        accountingPeriodStartDate: 2017-03-01
                        accountingPeriodEndDate: 2017-03-31
                      - accountingPeriodName: Apr-2017
                        isAccountingPeriodClosed: false
                        amount: 50
                        currency: USD
                        accountingPeriodStartDate: 2017-04-01
                        accountingPeriodEndDate: 2017-04-30
                  - number: RS-00000120
                    recognitionRuleName: Custom - Unlimited recognition
                    amount: 98.9
                    undistributedUnrecognizedRevenue: 0
                    recognizedRevenue: 0
                    unrecognizedRevenue: 100
                    currency: USD
                    notes: notes
                    createdOn: 2017-03-03 09:36:57
                    updatedOn: 2017-03-03 09:36:57
                    accountId: 2c90838f42cf16030142cf215ecb0014
                    productChargeId: 4028903b5a7eb9bc015a91a77404016a
                    linkedTransactionId: 4028903b5a7eb9bc015a91cc368101d1
                    linkedTransactionNumber: DM00000002
                    linkedTransactionType: DebitMemoItem
                    revenueScheduleDate: 2017-03-03
                    revenueItems:
                      - accountingPeriodName: Jan-2016
                        isAccountingPeriodClosed: false
                        amount: 98.9
                        currency: USD
                        accountingPeriodStartDate: 2016-01-01
                        accountingPeriodEndDate: 2016-01-31
                success: true
      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/{rs-number}":
    get:
      tags:
        - Revenue Schedules
      summary: Get revenue schedule details
      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_Entity_Ids_Single"
        - name: rs-number
          in: path
          description: >
            Revenue schedule number. The revenue schedule number is always
            prefixed with "RS", for example, "RS-00000001".
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailType"
            application/json:
              example:
                number: RS-00000008
                recognitionRuleName: Recognize upon invoicing
                amount: 50
                undistributedUnrecognizedRevenue: -10
                recognizedRevenue: 0
                unrecognizedRevenue: 50
                currency: USD
                notes: change recognition term
                createdOn: 2014-01-20 16:36:45
                updatedOn: 2014-01-28 17:05:52
                accountId: 2c92c0f8439770960143b2141f5a584e
                subscriptionId: 2c92c0f943977b4f0143b23487994327
                subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                linkedTransactionId: 2c92c095439782cd0143b239aa234cf5
                linkedTransactionType: InvoiceItem
                revenueScheduleDate: 2014-01-20
                revenueItems:
                  - accountingPeriodName: Nov'2013
                    isAccountingPeriodClosed: true
                    amount: 60
                    currency: USD
                    accountingPeriodStartDate: 2013-10-01
                    accountingPeriodEndDate: 2013-10-31
                    recognizedRevenueAccountingCodeType: "Revenue: Sales"
                    recognizedRevenueAccountingCode: MONTHLY RECURRING CHARGE
                    deferredRevenueAccountingCodeType: "Liabilities: Deferred Revenue"
                    deferredRevenueAccountingCode: MONTHLY RECURRING CHARGE
                  - accountingPeriodName: Open-Ended
                    isAccountingPeriodClosed: false
                    amount: -10
                    currency: USD
                    accountingPeriodStartDate: 2013-11-01
                    recognizedRevenueAccountingCodeType: "Revenue: Sales"
                    recognizedRevenueAccountingCode: MONTHLY RECURRING CHARGE
                    deferredRevenueAccountingCodeType: "Liabilities: Sales"
                    deferredRevenueAccountingCode: MONTHLY RECURRING CHARGE
                success: true
      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);
    delete:
      tags:
        - Revenue Schedules
      summary: Delete revenue schedule
      description: >
        Deletes a revenue schedule by specifying its revenue schedule number

        ## Prerequisites

        You must have the Delete Custom Revenue Schedule permissions in Zuora Finance.
      operationId: DELETE_RS
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: rs-number
          in: path
          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.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/revenue-schedules/{rs-number}/basic-information":
    put:
      tags:
        - Revenue Schedules
      summary: Update revenue schedule basic information
      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_Entity_Ids_Single"
        - name: rs-number
          in: path
          description: >
            Revenue schedule number. The revenue schedule number is always
            prefixed with "RS", for example, "RS-00000001".
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTRSBasicInfoType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/revenue-schedules/{rs-number}/distribute-revenue-across-accounting-periods":
    put:
      tags:
        - Revenue Schedules
      summary: Distribute revenue across accounting periods
      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_Entity_Ids_Single"
        - name: rs-number
          in: path
          description: >
            Revenue schedule number. The revenue schedule number is always
            prefixed with "RS", for example, "RS-00000001".
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTAllocateManuallyType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTRevenueScheduleResponseType"
            application/json:
              example:
                revenueEventNumber: RE-00000326
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/revenue-schedules/{rs-number}/distribute-revenue-on-specific-date":
    put:
      tags:
        - Revenue Schedules
      summary: Distribute revenue on specific date
      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_Entity_Ids_Single"
        - name: rs-number
          in: path
          description: >
            Revenue schedule number. The revenue schedule number is always
            prefixed with "RS", for example, "RS-00000001".
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSpecificDateAllocationType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTRevenueScheduleResponseType"
            application/json:
              example:
                revenueEventNumber: RE-00000326
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/revenue-schedules/{rs-number}/distribute-revenue-with-date-range":
    put:
      tags:
        - Revenue Schedules
      summary: Distribute revenue by recognition start and end dates
      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_Entity_Ids_Single"
        - name: rs-number
          in: path
          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".
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTRSTermType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTRevenueScheduleResponseType"
            application/json:
              example:
                revenueEventNumber: RE-00000326
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/revenue-schedules/subscription-charges/{charge-key}":
    get:
      tags:
        - Revenue Schedules
      summary: Get revenue schedule by subscription charge
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_revenue"
        - name: charge-key
          in: path
          description: ID of the subscription rate plan charge; for example,
            402892793e173340013e173b81000012.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailsByChargeType"
            application/json:
              example:
                revenueSchedules:
                  - number: RS-00000291
                    recognitionRuleName: Recognize upon invoicing
                    amount: 50
                    undistributedUnrecognizedRevenue: 50
                    recognizedRevenue: 0
                    unrecognizedRevenue: 50
                    currency: USD
                    createdOn: 2014-01-21 13:59:25
                    updatedOn: 2014-01-21 13:59:25
                    accountId: 2c92c0f8439770960143b2141f5a584e
                    subscriptionId: 2c92c0f943977b4f0143b23487994327
                    subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                    linkedTransactionId: 2c92c094439782460143b62c2ee90f5a
                    linkedTransactionType: InvoiceItem
                    revenueScheduleDate: 2014-01-21
                    revenueItems:
                      - accountingPeriodName: Open-Ended
                        isAccountingPeriodClosed: false
                        amount: 50
                        currency: USD
                        accountingPeriodStartDate: 2013-12-11
                  - number: RS-00000290
                    recognitionRuleName: Recognize upon invoicing
                    amount: 50
                    undistributedUnrecognizedRevenue: 50
                    recognizedRevenue: 0
                    unrecognizedRevenue: 50
                    currency: USD
                    createdOn: 2014-01-21 13:59:25
                    updatedOn: 2014-01-21 13:59:25
                    accountId: 2c92c0f8439770960143b2141f5a584e
                    subscriptionId: 2c92c0f943977b4f0143b23487994327
                    subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                    linkedTransactionId: 2c92c094439782460143b62c2ee60f59
                    linkedTransactionNumber: INV00000838
                    linkedTransactionType: InvoiceItem
                    revenueScheduleDate: 2014-01-21
                    revenueItems:
                      - accountingPeriodName: Open-Ended
                        isAccountingPeriodClosed: false
                        amount: 50
                        currency: USD
                        accountingPeriodStartDate: 2013-12-11
                nextPage: https://rest.zuora.com/v1/revenue-schedules/subscription-charges/2c92c0f943977b4f0143b23487ed432e?page=2&pageSize=8
                success: true
      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:
      tags:
        - Revenue Schedules
      summary: Create revenue schedule on subscription charge
      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_Entity_Ids_Single"
        - name: charge-key
          in: path
          description: ID of the subscription rate plan charge; for example,
            402892793e173340013e173b81000012.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByChargeType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByChargeResponseType"
            application/json:
              example:
                revenueScheduleNumber: rs-00000001
                success: true
      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);
      x-codegen-request-body-name: Request
  /v1/revpro-accounting-codes:
    put:
      tags:
        - RevPro Integration
      summary: Update an accounting code
      description: Update a RevPro Accounting Code by a valid Product Rate Plan Charge Id.
      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":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTRevproAccCodeResponse"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: body
  /v1/rsa-signatures:
    post:
      tags:
        - RSA Signatures
      summary: Generate RSA signature.
      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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRSASignatureType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRSASignatureResponseType"
            application/json:
              example:
                signature: VpCAFL2hHC2irxbhWYGLJmdBigjARsCStwHZiQ78z5LyVuBCFr2lkie0db/7E8n38MXaq12Ng5As5Qj+9Nhz6RBsSEWLod7c7hvwNI28OcgBZtcV/wscbWU69EP/+/XrQnF3ZUbHbqmcmhE8C/zNnc2zvHckfArroDW2HxxmATfMJS0xKUm5TrHi4tiILZVMYY1KIUqQTyuXV6uRWYzkqMkFkZDNCxSxf0XwzuBI/VOgTCmFZb0c3+bk/q6+7d/azFCrrg8C3dquCNJRfUeaBou+SLUa4TW3hV4rGd2zpvSrD/425x4qFNGV6JQ7wvIleIdrXU4qbh9nCmYoApMODA==
                token: E2BJEle7YrAlw93SjkaKthTmzMvXF341
                tenantId: "12270"
                key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmWRFTwxQOqaG4JDZSQF/NJWvCDoSXm3TYilNzoN8nBbuvhKa7SZBBS+VP6rFqcbIU38Fu+Rf09vqyYOxuasPJe7yhqeOiStWB/aCPLhwXBeKt37L/qkwpNOKb1FETtUgrc+UjbtT0pnl55wCfi+Ik//X5SQi0B+c0ei1DQv99qmPJJErrhnBtdxeaWAT0EYAo42AOQ5cp0UWDY6OdOYL6+RyFOUFIs1yEgtfg4VMMSpSOKBOhYclQYuSC7nBF5Cc18ydtzsBpf7l49gCLTFzG45NCDAocada8KihFNpGXbauV9V4EPRD4lofaXdsXJ5Tw8/+KCsrUlvIQI3vcEv9LQIDAQAB
                success: true
      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);
      x-codegen-request-body-name: Request
  /v1/rsa-signatures/decrypt:
    post:
      tags:
        - RSA Signatures
      summary: Decrypt RSA signature
      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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTDecryptionType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTDecryptResponseType"
            application/json:
              example:
                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==
                decryptedSignature: /apps/publichostedpagelite.do#12270#tpyeSbjfUdpZpY4EMSCy7CrupvuhIdvM#1473658419005#2c92c0f855e2b4630155ec9e6a1b6eec
                success: true
      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);
      x-codegen-request-body-name: Request
  /v1/sequence-sets:
    get:
      tags:
        - Sequence Sets
      summary: Get sequence sets
      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 the Invoice Settlement feature enabled. The Invoice Settlement 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/). 
      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"
        - name: name
          in: query
          description: |
            The name of a specific sequence set.
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETSequenceSetsResponse"
            application/json:
              example:
                sequenceSets:
                  - name: DEFAULT
                    id: 2c98906c69be199c0169be74ed210afd
                    invoice:
                      prefix: INV
                      startNumber: 10
                    creditMemo:
                      prefix: CM
                      startNumber: 11
                    debitMemo:
                      prefix: DM
                      startNumber: 12
                    payment:
                      prefix: P-
                      startNumber: 13
                    refund:
                      prefix: R-
                      startNumber: 14
                  - name: FR
                    id: 2c98906c69be199c0169be74ed211afd
                    invoice:
                      prefix: FINV
                      startNumber: 10
                    creditMemo:
                      prefix: FCM
                      startNumber: 11
                    debitMemo:
                      prefix: FDM
                      startNumber: 12
                    payment:
                      prefix: FP-
                      startNumber: 13
                    refund:
                      prefix: FR-
                      startNumber: 14
                  - name: ITA
                    id: 2c98906c69be199c0169be74ed212afd
                    invoice:
                      prefix: ITAINV
                      startNumber: 10
                    creditMemo:
                      prefix: ITACM
                      startNumber: 11
                    debitMemo:
                      prefix: ITADM
                      startNumber: 12
                    payment:
                      prefix: ITAP-
                      startNumber: 13
                    refund:
                      prefix: ITAR-
                      startNumber: 14
                success: true
      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:
      tags:
        - Sequence Sets
      summary: Create sequence sets
      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 the Invoice Settlement feature enabled. The Invoice Settlement 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/). 
      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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTSequenceSetsResponse"
            application/json:
              example:
                success: true
                sequenceSets:
                  - name: FR
                    id: 402892c74c9193cd014c96bbe7c101f9
                    invoice:
                      prefix: FINV
                      startNumber: 10
                    creditMemo:
                      prefix: FCM
                      startNumber: 10
                    debitMemo:
                      prefix: FDM
                      startNumber: 10
                    payment:
                      prefix: FP-
                      startNumber: 10
                    refund:
                      prefix: FR-
                      startNumber: 10
                  - name: ITA
                    id: 402892c74c9193cd014c96bbe7c201f9
                    invoice:
                      prefix: IINV
                      startNumber: 10
                    creditMemo:
                      prefix: ICM
                      startNumber: 10
                    debitMemo:
                      prefix: IDM
                      startNumber: 10
                    payment:
                      prefix: IP-
                      startNumber: 10
                    refund:
                      prefix: IR-
                      startNumber: 10
      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);
      x-codegen-request-body-name: Request
  "/v1/sequence-sets/{id}":
    get:
      tags:
        - Sequence Sets
      summary: Get sequence set
      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 the Invoice Settlement feature enabled. The Invoice Settlement 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/). 
      operationId: GET_SequenceSet
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: |
            The ID of the sequence set to retrieve information about.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETSequenceSetResponse"
            application/json:
              example:
                name: FR
                invoice:
                  prefix: FINV
                  startNumber: 10
                creditMemo:
                  prefix: FCM
                  startNumber: 11
                debitMemo:
                  prefix: FDM
                  startNumber: 12
                payment:
                  prefix: FP-
                  startNumber: 13
                refund:
                  prefix: FR-
                  startNumber: 14
                success: true
      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:
      tags:
        - Sequence Sets
      summary: Update sequence set
      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 the Invoice Settlement feature enabled. The Invoice Settlement 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/). 
      operationId: PUT_SequenceSet
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: |
            The ID of the sequence set to update.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSequenceSetRequest"
        required: false
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTSequenceSetResponse"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
    delete:
      tags:
        - Sequence Sets
      summary: Delete sequence set
      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 the Invoice Settlement feature enabled. The Invoice Settlement 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/). 
      operationId: DELETE_SequenceSet
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: |
            The ID of the sequence set to delete.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  /settings/listing:
    get:
      tags:
        - Settings
      summary: List all settings
      description: >
        **Note:** The Settings API is **In Development**.


        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.

         * [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)
         * [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)
         * [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)
         * [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)
         * [Get Chart of Accounts](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Get_Chart_of_Accounts)
      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"
        - name: Accept
          in: header
          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.
          schema:
            maxLength: 64
            type: string
      responses:
        "200":
          description: OK
          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
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAllSettingsResponse"
              example:
                settings:
                  - key: AccountingRules
                    description: Accounting Rules settings
                    context: Entity
                    pathPattern: /accounting-rules
                    httpOperations:
                      - method: GET
                        url: /settings/accounting-rules
                        parameters: []
                        responseType: {}
                      - method: PUT
                        url: /settings/accounting-rules
                        parameters: []
                        requestType: {}
                        responseType: {}
            application/csv:
              schema:
                $ref: "#/components/schemas/ListAllSettingsResponse"
      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);
  /settings/batch-requests:
    post:
      tags:
        - Settings
      summary: Submit multiple settings requests as a batch
      description: >
        **Note:** The Settings API is **In Development**.


        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":
          description: OK
          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
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SettingsBatchResponse"
              example:
                responses:
                  - id: "1"
                    method: GET
                    url: /billing-rules
                    children: []
                    response:
                      status: 200 OK
                      body:
                        oneTimeCreditBack: false
                        proratePeriodOfRecurringCharge: true
                        prorateRecurringWeeklyCharges: true
                        prorateRecurringMonthlyCharges: true
                        prorateUsageMonthlyCharges: true
                        prorateUsageWeeklyCharges: true
                        daysInMonth: UseActualDays
                        prorationUnit: ProrateByDay
                        allowAutoPostBillRun: true
                        autoPostBillRunDefaultValue: true
                        includeNegativeInvoice: true
                        includeChildUsage: true
                        rateUsageIndividually: true
                        transactionOnSubscription: true
                        taxAddressOwner: SubscriptionOwner
                        takeContactSnapshot: true
                        taxInclusiveRoundingRule: RoundingNetAmount
                        legalDocumentGeneratingRule: GroupByOriginalSRPC
                        recurringChargeStyle: Advanced
                        preGenerateInvoicePdf: false
                        timeOfDailyInvoice: 0
                        notSendZeroItemsForTax: false
                        taxRateChangeOption: OneTaxItem
                        availableToCreditValidationLevel: HeaderLevel
                        invoicePastEndOfTerm: false
                        billToTermEndWhenAutoRenew: true
                        zuoraTaxRoundingDiffDispersion: false
                  - id: "2"
                    method: GET
                    url: /accounting-rules
                    children: []
                    response:
                      status: 200 OK
                      body:
                        allowBlankAccountingCodes: true
                        allowCreationInClosedPeriod: true
                        allowUsageInClosedPeriod: true
                        allowRevenueScheduleNegativeAmounts: true
                        differentCurrencies: false
      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);
      x-codegen-request-body-name: batchRequest
  /v1/subscriptions/preview:
    post:
      tags:
        - Subscriptions
      summary: Preview subscription
      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_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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. 
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTSubscriptionPreviewType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTSubscriptionPreviewResponseType"
            application/json:
              example:
                success: true
                contractedMrr: 100
                totalContractedValue: 277.4193548
                amount: 278.28
                amountWithoutTax: 278.28
                taxAmount: 0
                invoiceTargetDate: 2016-12-31
                invoiceItems:
                  - serviceStartDate: 2016-01-15
                    serviceEndDate: 2016-01-30
                    chargeAmount: 51.61
                    taxAmount: 5.16
                    chargeDescription: ""
                    chargeName: recurring
                    productName: restAPITest
                    productRatePlanChargeId: 40289070576ad42f0157b24a62420918
                    quantity: 1
                    unitOfMeasure: ""
                  - serviceStartDate: 2016-01-31
                    serviceEndDate: 2016-02-28
                    chargeAmount: 100
                    taxAmount: 10
                    chargeDescription: ""
                    chargeName: recurring
                    productName: restAPITest
                    productRatePlanChargeId: 40289070576ad42f0157b24a62420918
                    quantity: 1
                    unitOfMeasure: ""
                  - serviceStartDate: 2016-02-29
                    serviceEndDate: 2016-03-30
                    chargeAmount: 100
                    taxAmount: 10
                    chargeDescription: ""
                    chargeName: recurring
                    productName: restAPITest
                    productRatePlanChargeId: 40289070576ad42f0157b24a62420918
                    quantity: 1
                    unitOfMeasure: ""
                  - serviceStartDate: 2016-03-31
                    serviceEndDate: 2016-04-07
                    chargeAmount: 26.67
                    taxAmount: 2.66
                    chargeDescription: ""
                    chargeName: recurring
                    productName: restAPITest
                    productRatePlanChargeId: 40289070576ad42f0157b24a62420918
                    quantity: 1
                    unitOfMeasure: ""
      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);
      x-codegen-request-body-name: Request
  /v1/subscriptions:
    post:
      tags:
        - Subscriptions
      summary: Create subscription
      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_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTSubscriptionType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTSubscriptionResponseType"
            application/json:
              example:
                success: true
                subscriptionId: 402890fc4fa094d5014fa0a4aa78001d
                subscriptionNumber: A-S00000041
                contractedMrr: 1950
                totalContractedValue: 6227.41935465
      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);
      x-codegen-request-body-name: Request
  "/v1/subscriptions/accounts/{account-key}":
    get:
      tags:
        - Subscriptions
      summary: Get subscriptions by account
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: account-key
          in: path
          description: |
            
            Possible values are:
            * an account number
            * an account ID
          required: true
          schema:
            type: string
        - name: charge-detail
          in: query
          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.
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETSubscriptionWrapper"
            application/json:
              example:
                subscriptions:
                  - id: 8a8082c45aa81b51015ad68743ec0fdb
                    accountId: 8a8082c45aa81b51015ad64396090f5c
                    accountNumber: A00002641
                    accountName: ABCD
                    invoiceOwnerAccountId: 8a8082c45aa81b51015ad64396090f5c
                    invoiceOwnerAccountNumber: A00002641
                    invoiceOwnerAccountName: ABCD
                    subscriptionNumber: A-S00007412
                    termType: TERMED
                    invoiceSeparately: false
                    contractEffectiveDate: 2017-01-01
                    serviceActivationDate: 2017-01-01
                    customerAcceptanceDate: 2017-01-01
                    subscriptionStartDate: 2017-01-01
                    termStartDate: 2017-01-01
                    termEndDate: 2018-01-01
                    initialTerm: 12
                    initialTermPeriodType: Month
                    currentTerm: 12
                    currentTermPeriodType: Month
                    autoRenew: true
                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                    renewalTerm: 12
                    renewalTermPeriodType: Month
                    contractedMrr: 8.33
                    totalContractedValue: 100
                    notes: ""
                    status: Active
                    ratePlans:
                      - id: 8a8082c45aa81b51015ad68744030fe3
                        productId: 8a8082c45aa81b51015ad5a2d07d0e89
                        productName: ABC
                        productSku: SKU-00000987
                        productRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
                        ratePlanName: RatePlan 1
                        ratePlanCharges:
                          - id: 8a8082c45aa81b51015ad68744160fe4
                            originalChargeId: 8a8082c45aa81b51015ad68744160fe4
                            productRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
                            number: C-00032238
                            name: Annual Charge
                            type: Recurring
                            model: FlatFee
                            version: 1
                            pricingSummary: USD100
                            priceChangeOption: NoChange
                            currency: USD
                            price: 100
                            discountApplyDetails: []
                            billingDay: DefaultFromCustomer
                            listPriceBase: Per_Billing_Period
                            billingPeriod: Annual
                            billingTiming: IN_ADVANCE
                            billingPeriodAlignment: AlignToCharge
                            quantity: 1
                            segment: 1
                            effectiveStartDate: 2017-01-01
                            effectiveEndDate: 2018-01-01
                            done: false
                            triggerEvent: ContractEffective
                            endDateCondition: Subscription_End
                            mrr: 8.333333
                            dmrc: 8.333333
                            tcv: 100
                            dtcv: 100
                            description: ""
                          - id: 8a8082c45aa81b51015ad68744240fe5
                            originalChargeId: 8a8082c45aa81b51015ad68744240fe5
                            productRatePlanChargeId: 8a8082c45aa81b51015ad683bc590fd8
                            number: C-00032239
                            name: Discount-Fixed 10
                            type: Recurring
                            model: DiscountFixedAmount
                            version: 1
                            pricingSummary: USD10 fixed amount discount
                            currency: USD
                            discountAmount: 10
                            applyDiscountTo: ONETIMERECURRINGUSAGE
                            discountLevel: subscription
                            discountClass: VIP Discount
                            discountApplyDetails:
                              - appliedProductRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
                                appliedProductRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
                              - appliedProductRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
                                appliedProductRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
                            billingDay: DefaultFromCustomer
                            billingPeriod: Month
                            billingPeriodAlignment: AlignToCharge
                            segment: 1
                            effectiveStartDate: 2017-01-01
                            effectiveEndDate: 2018-01-01
                            done: false
                            triggerEvent: ContractEffective
                            endDateCondition: Subscription_End
                            mrr: 0
                            dmrc: 0
                            tcv: 0
                            dtcv: 0
                            description: ""
                success: true
      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/{subscription-key}":
    get:
      tags:
        - Subscriptions
      summary: Get subscriptions by key
      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_Entity_Ids_Single"
        - name: subscription-key
          in: path
          description: |
            Possible values are:
              * a subscription number
              * a subscription ID
          required: true
          schema:
            type: string
        - name: charge-detail
          in: query
          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.
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETSubscriptionTypeWithSuccess"
            application/json:
              example:
                success: true
                id: 8a8082c45aa81b51015ad68743ec0fdb
                accountId: 8a8082c45aa81b51015ad64396090f5c
                accountNumber: A00002641
                accountName: ABCD
                invoiceOwnerAccountId: 8a8082c45aa81b51015ad64396090f5c
                invoiceOwnerAccountNumber: A00002641
                invoiceOwnerAccountName: ABCD
                subscriptionNumber: A-S00007412
                termType: TERMED
                invoiceSeparately: false
                contractEffectiveDate: 2017-01-01
                serviceActivationDate: 2017-01-01
                customerAcceptanceDate: 2017-01-01
                subscriptionStartDate: 2017-01-01
                termStartDate: 2017-01-01
                termEndDate: 2018-01-01
                initialTerm: 12
                initialTermPeriodType: Month
                currentTerm: 12
                currentTermPeriodType: Month
                autoRenew: true
                renewalSetting: RENEW_WITH_SPECIFIC_TERM
                renewalTerm: 12
                renewalTermPeriodType: Month
                contractedMrr: 8.33
                totalContractedValue: 100
                notes: ""
                status: Active
                ratePlans:
                  - id: 8a8082c45aa81b51015ad68744030fe3
                    productId: 8a8082c45aa81b51015ad5a2d07d0e89
                    productName: ABC
                    productSku: SKU-00000987
                    productRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
                    ratePlanName: RatePlan 1
                    ratePlanCharges:
                      - id: 8a8082c45aa81b51015ad68744160fe4
                        originalChargeId: 8a8082c45aa81b51015ad68744160fe4
                        productRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
                        number: C-00032238
                        name: Annual Charge
                        type: Recurring
                        model: FlatFee
                        version: 1
                        pricingSummary: USD100
                        priceChangeOption: NoChange
                        currency: USD
                        price: 100
                        discountApplyDetails: []
                        billingDay: DefaultFromCustomer
                        listPriceBase: Per_Billing_Period
                        billingPeriod: Annual
                        billingTiming: IN_ADVANCE
                        billingPeriodAlignment: AlignToCharge
                        quantity: 1
                        segment: 1
                        effectiveStartDate: 2017-01-01
                        effectiveEndDate: 2018-01-01
                        done: false
                        triggerEvent: ContractEffective
                        endDateCondition: Subscription_End
                        mrr: 8.333333
                        dmrc: 8.333333
                        tcv: 100
                        dtcv: 100
                        description: ""
                      - id: 8a8082c45aa81b51015ad68744240fe5
                        originalChargeId: 8a8082c45aa81b51015ad68744240fe5
                        productRatePlanChargeId: 8a8082c45aa81b51015ad683bc590fd8
                        number: C-00032239
                        name: Discount-Fixed 10
                        type: Recurring
                        model: DiscountFixedAmount
                        version: 1
                        pricingSummary: USD10 fixed amount discount
                        currency: USD
                        discountAmount: 10
                        applyDiscountTo: ONETIMERECURRINGUSAGE
                        discountLevel: subscription
                        discountClass: VIP Discount
                        discountApplyDetails:
                          - appliedProductRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
                            appliedProductRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
                        billingDay: DefaultFromCustomer
                        billingPeriod: Month
                        billingPeriodAlignment: AlignToCharge
                        segment: 1
                        effectiveStartDate: 2017-01-01
                        effectiveEndDate: 2018-01-01
                        done: false
                        triggerEvent: ContractEffective
                        endDateCondition: Subscription_End
                        mrr: 0
                        dmrc: 0
                        tcv: 0
                        dtcv: 0
                        description: ""
      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:
      tags:
        - Subscriptions
      summary: Update subscription
      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_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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.
          schema:
            type: string
        - name: subscription-key
          in: path
          description: Subscription number or ID.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSubscriptionType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTSubscriptionResponseType"
            application/json:
              example:
                success: true
                subscriptionId: 4028bb83510f8ed7015114a503cf0373
                totalDeltaMrr: 100
                totalDeltaTcv: 4867.7419355
      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);
      x-codegen-request-body-name: Request
  "/v1/subscriptions/{subscription-key}/versions/{version}":
    get:
      tags:
        - Subscriptions
      summary: Get subscriptions by key and version
      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_Entity_Ids_Single"
        - name: subscription-key
          in: path
          description: |
            Subscription number. For example, A-S00000135.
          required: true
          schema:
            type: string
        - name: version
          in: path
          description: |
            Subscription version. For example, 1.
          required: true
          schema:
            type: string
        - name: charge-detail
          in: query
          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.
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETSubscriptionTypeWithSuccess"
            application/json:
              example:
                success: true
                id: 2c9081a03c63c94c013c687b864e0195
                accountId: 2c9081a03c63c94c013c66688a2c00bf
                accountNumber: RestAPI
                accountName: RestAPI
                subscriptionNumber: A-S00000004
                termType: TERMED
                contractEffectiveDate: 2012-02-01
                serviceActivationDate: 2012-02-01
                customerAcceptanceDate: 2012-02-01
                subscriptionStartDate: 2012-02-01
                termStartDate: 2012-02-01
                termEndDate: 2013-02-01
                initialTermPeriodType: Week
                currentTerm: 12
                currentTermPeriodType: Week
                autoRenew: false
                renewalSetting: RENEW_WITH_SPECIFIC_TERM
                renewalTerm: 0
                renewalTermPeriodType: Week
                contractedMrr: 26.67
                totalContractedValue: 404
                notes: ""
                status: Active
                ratePlans:
                  - id: 2c9081a03c63c94c013c687b868901a4
                    productId: 2c9081a03c63c94c013c66499ef0001b
                    productName: OneTime
                    productSku: SKU-00000022
                    productRatePlanId: 2c9081a03c63c94c013c665102e5003a
                    ratePlanName: OT_Tiered
                    ratePlanCharges:
                      - id: 2c9081a03c63c94c013c687b868901a5
                        originalChargeId: 2c9081a03c63c94c013c687a92d70175
                        productRatePlanChargeId: 2c9081a03c63c94c013c6651d677003c
                        number: C-00000010
                        name: OT_Tiered
                        type: OneTime
                        model: Tiered
                        uom: Each
                        version: 1
                        pricingSummary: "0 to 10 Each: USD20 flat fee;  11 Each or more: USD4/Each"
                        currency: USD
                        tiers:
                          - tier: 1
                            startingUnit: 0
                            endingUnit: 10
                            price: 20
                            priceFormat: FlatFee
                          - tier: 2
                            startingUnit: 11
                            price: 4
                            priceFormat: PerUnit
                        quantity: 11
                        segment: 1
                        effectiveStartDate: 2012-02-01
                        effectiveEndDate: 2012-02-02
                        processedThroughDate: 2012-02-02
                        chargedThroughDate: 2012-02-02
                        done: true
                        triggerEvent: ContractEffective
                        endDateCondition: One_Time
                        tcv: 24
                        dtcv: 24
                        description: ""
      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/{subscription-key}/renew":
    put:
      tags:
        - Subscriptions
      summary: Renew subscription
      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_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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 
          schema:
            type: string
        - name: subscription-key
          in: path
          description: Subscription number or ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTRenewSubscriptionType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTRenewSubscriptionResponseType"
            application/json:
              example:
                termStartDate: 2014-02-01
                success: true
                termEndDate: 2014-05-01
                subscriptionId: 2c92c8f83dcbd8b1013dcce0f09100a5
      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);
      x-codegen-request-body-name: Request
  "/v1/subscriptions/{subscription-key}/cancel":
    put:
      tags:
        - Subscriptions
      summary: Cancel subscription
      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_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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 
          schema:
            type: string
        - name: subscription-key
          in: path
          description: Subscription number or ID. Subscription status must be `Active`.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTSubscriptionCancellationType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTSubscriptionCancellationResponseType"
            application/json:
              example:
                success: true
                subscriptionId: 8a8082c453cd2a620154efc7bba0350e
                cancelledDate: 2019-05-31
                totalDeltaMrr: 0
                totalDeltaTcv: -703.2258065
                invoiceId: 8a8082c453cd2a620153e426c7eb78b3
      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);
      x-codegen-request-body-name: Request
  "/v1/subscriptions/{subscription-key}/resume":
    put:
      tags:
        - Subscriptions
      summary: Resume subscription
      description: >
        This REST API reference describes how to resume a suspended
        subscription. 


        This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://suport.zuora.com). 


        **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_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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
          schema:
            type: string
        - name: subscription-key
          in: path
          description: Subscription number or ID. Subscription status must be Active.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSubscriptionResumeType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTSubscriptionResumeResponseType"
            application/json:
              example:
                success: true
                subscriptionId: 8a8082c4539c5bcc0153a752f9c87094
                resumeDate: 2019-10-01
                termEndDate: 2020-01-31
                totalDeltaTcv: 396.7741935
      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);
      x-codegen-request-body-name: Request
  "/v1/subscriptions/{subscription-key}/suspend":
    put:
      tags:
        - Subscriptions
      summary: Suspend subscription
      description: >
        This REST API reference describes how to suspend an active
        subscription. 


        This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://suport.zuora.com).


        **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_Entity_Ids_Single"
        - name: zuora-version
          in: header
          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
          schema:
            type: string
        - name: subscription-key
          in: path
          description: Subscription number or ID. Subscription status must be Active.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSubscriptionSuspendType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTSubscriptionSuspendResponseType"
            application/json:
              example:
                success: true
                subscriptionId: 8a8082c4539c5bcc0153a658a9636fcc
                suspendDate: 2019-05-01
                resumeDate: 2016-06-01
                termEndDate: 2020-02-01
                totalDeltaTcv: -896.6666667
                invoiceId: 8a8082c453bb061f0153c529bc921b4b
      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);
      x-codegen-request-body-name: Request
  "/v1/subscriptions/{subscriptionNumber}/versions/{version}/customFields":
    put:
      tags:
        - Subscriptions
      summary: Update subscription custom fields of a specified subscription version
      description: |
        Updates the custom fields of a specified subscription version.
      operationId: PUT_UpdateSubscriptionCustomFieldsOfASpecifiedVersion
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: subscriptionNumber
          in: path
          description: The subscription number to be updated.
          required: true
          schema:
            type: string
            format: string
        - name: version
          in: path
          description: The subscription version to be updated.
          required: true
          schema:
            type: string
            format: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSubscriptionPatchRequestType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: body
  /v1/journal-entries:
    post:
      tags:
        - Summary Journal Entries
      summary: Create summary journal entry
      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_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTJournalEntryType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTJournalEntryResponseType"
            application/json:
              example:
                success: true
                journalEntryNumber: JE-00000001
      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);
      x-codegen-request-body-name: Request
  "/v1/journal-entries/journal-runs/{jr-number}":
    get:
      tags:
        - Summary Journal Entries
      summary: Get all summary journal entries in a journal run
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_revenue"
        - name: jr-number
          in: path
          description: Journal run number.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETJournalEntriesInJournalRunType"
            application/json:
              example:
                success: true
                journalEntries:
                  - number: JE-00000006
                    status: Created
                    journalEntryDate: 2016-12-31
                    currency: USD
                    homeCurrency: USD
                    aggregateCurrency: true
                    transactionType: Invoice Item
                    accountingPeriodName: Dec'16
                    timePeriodStart: 2016-12-01
                    timePeriodEnd: 2016-12-31
                    transferredToAccounting: No
                    notes: note
                    segments:
                      - segmentName: Seg1
                        segmentValue: seg value
                    journalEntryItems:
                      - accountingCodeType: AccountsReceivable
                        accountingCodeName: Accounts Receivable
                        glAccountName: Accounts Receivable
                        glAccountNumber: 10-001-000-1234
                        type: Debit
                        amount: 100
                        homeCurrencyAmount: 100
                      - accountingCodeType: SalesRevenue
                        accountingCodeName: Sales Revenue
                        glAccountName: Sales Revenue
                        glAccountNumber: 10-001-000-1000
                        type: Credit
                        amount: 100
                        homeCurrencyAmount: 100
      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}":
    get:
      tags:
        - Summary Journal Entries
      summary: Get summary journal entry
      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_Entity_Ids_Single"
        - name: je-number
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETJournalEntryDetailType"
            application/json:
              example:
                number: JE-00000001
                status: Created
                journalEntryDate: 2016-01-31
                currency: USD
                homeCurrency: USD
                aggregateCurrency: true
                transactionType: Revenue Event Item
                accountingPeriodName: Jan'16
                timePeriodStart: 2016-01-01
                timePeriodEnd: 2016-01-31
                segments:
                  - segmentName: Customer Code
                    segmentValue: A00000001
                  - segmentName: Charge Type
                    segmentValue: OneTime
                journalEntryItems:
                  - accountingCodeType: DeferredRevenue
                    accountingCodeName: Deferred Revenue
                    type: Debit
                    homeCurrencyAmount: 424.08
                    amount: 424.08
                  - accountingCodeType: SalesRevenue
                    accountingCodeName: Professional Services Revenue
                    type: Credit
                    homeCurrencyAmount: 424.08
                    amount: 424.08
                success: true
      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);
    delete:
      tags:
        - Summary Journal Entries
      summary: Delete summary journal entry
      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_Entity_Ids_Single"
        - name: je-number
          in: path
          description: Journal entry number in the format JE-00000001.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/journal-entries/{je-number}/cancel":
    put:
      tags:
        - Summary Journal Entries
      summary: Cancel summary journal entry
      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_Entity_Ids_Single"
        - name: je-number
          in: path
          description: Journal entry number in the format JE-00000001.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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-entries/{je-number}/basic-information":
    put:
      tags:
        - Summary Journal Entries
      summary: Update basic information of a summary journal entry
      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_Entity_Ids_Single"
        - name: je-number
          in: path
          description: Journal entry number in the format JE-00000001.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUT_BasicSummaryJournalEntryType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
      x-codegen-request-body-name: Request
  "/v1/taxationitems/{id}":
    get:
      tags:
        - Taxation Items
      summary: |
        Get taxation item
      description: |
        Retrieves the information about a specific taxation item by ID.
      operationId: GET_TaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: id
          in: path
          description: |
            The unique ID of a taxation item.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemType"
            application/json:
              example:
                createdById: 402881e522cf4f9b0122cf5d82860002
                createdDate: 2017-02-27 11:52:03
                exemptAmount: 0
                id: 402890555a7d4022015a7db254e200c8
                memoItemId: 402890555a7d4022015a7db254d800c7
                sourceTaxItemId: 402890555a7d4022015a7db254e200c1
                name: my tax
                taxAmount: 1
                taxCode: ZtaxCode
                taxCodeDescription: ""
                taxDate: 2017-02-27
                taxRate: 5
                taxRateType: FlatFee
                updatedById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-02-27 11:52:03
                financeInformation: {}
                success: true
      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:
      tags:
        - Taxation Items
      summary: Update taxation item
      description: |
        Updates a specific taxation item by ID.
      operationId: PUT_TaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: id
          in: path
          description: |
            The unique ID of a taxation item.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTTaxationItemType"
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemType"
            application/json:
              example:
                createdById: 402881e522cf4f9b0122cf5d82860002
                createdDate: 2017-02-27 18:16:24
                exemptAmount: 0
                id: 402890555a7e9791015a7f12364e0004
                memoItemId: 402890555a7e9791015a7f1235f50003
                sourceTaxItemId: 402890555a7d4022015a7db254e200c1
                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
                updatedById: 402881e522cf4f9b0122cf5d82860002
                updatedDate: 2017-02-28 17:53:11
                financeInformation:
                  onAccountAccountingCode: Check
                  onAccountAccountingCodeType: Cash
                success: true
      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);
      x-codegen-request-body-name: body
    delete:
      tags:
        - Taxation Items
      summary: Delete taxation item
      description: |
        Deletes a specific taxation item by ID.
      operationId: DELETE_TaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - name: id
          in: path
          description: |
            The unique ID of a taxation item.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
            application/json:
              example:
                success: true
      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);
  "/v1/transactions/invoices/accounts/{account-key}":
    get:
      tags:
        - Transactions
      summary: Get invoices
      description: |
        Retrieves invoices for a specified account. 
        Invoices are returned in reverse chronological order by **updatedDate**.
      operationId: GET_TransactionInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: account-key
          in: path
          description: |
            Account number or account ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETInvoiceFileWrapper"
            application/json:
              example:
                invoices:
                  - id: 8a88818e66bdd34d0166be4589b60031
                    accountId: 2c9891b06661f78c01667bc6dc090202
                    accountNumber: AN_1539674921782
                    accountName: AC_AC_15396749217821539674921782
                    invoiceDate: 2018-10-29
                    invoiceNumber: INV00000001
                    dueDate: 2018-10-29
                    invoiceTargetDate: 2018-10-29
                    amount: 9.68
                    balance: 9.68
                    creditBalanceAdjustmentAmount: 0
                    createdBy: 2c9891b06661f78c01667bc6c7600068
                    status: Draft
                    reversed: false
                    invoiceItems: https://rest.zuora.com/v1/invoices/8a88818e66bdd34d0166be4589b60031/items
                    invoiceFiles: https://rest.zuora.com/v1/invoices/8a88818e66bdd34d0166be4589b60031/files
                success: true
      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:
      tags:
        - Transactions
      summary: Get payments
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: account-key
          in: path
          description: Account number or account ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentsType"
            application/json:
              example:
                success: true
                payments:
                  - paymentMethodId: 2c92c8f83dabf9cf013daef12dd303b0
                    paidInvoices:
                      - invoiceId: 2c92a09539190dbe0139190f42780012
                        invoiceNumber: INV00000159
                        appliedPaymentAmount: 5
                      - invoiceId: 2c92a0953a3fa95d013a407c10a60100
                        invoiceNumber: INV00000323
                        appliedPaymentAmount: 139722.1
                      - invoiceId: 2c92a09739190dc60139194bcf1b0098
                        invoiceNumber: INV00000160
                        appliedPaymentAmount: 10521
                    effectiveDate: 2013-03-27
                    accountId: 2c92a0f9391832b10139183e277a0042
                    accountName: subscribeCallYan_1
                    id: 2c92c8f83dabf9cf013daf3bfa0305a6
                    status: Processed
                    paymentNumber: P-00000075
                    type: Electronic
                    accountNumber: A00001115
                    amount: 150248.1
                  - paymentMethodId: 2c92a0f9391832b10139183e279e0044
                    paidInvoices:
                      - invoiceId: 2c92a09539190dbe0139190f42780012
                        invoiceNumber: INV00000159
                        appliedPaymentAmount: 5
                    effectiveDate: 2012-08-11
                    accountId: 2c92a0f9391832b10139183e277a0042
                    accountName: subscribeCallYan_1
                    id: 2c92a0f9391832b101391922ad5f049d
                    status: Processed
                    paymentNumber: P-00000056
                    type: Electronic
                    accountNumber: A00001115
                    amount: 5
      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:
      tags:
        - Usage
      summary: Post usage
      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. 


        ## 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_Entity_Ids_Single"
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - file
              properties:
                file:
                  type: string
                  description: |
                    The usage data to import.
                  format: binary
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTUsageResponseType"
            application/json:
              example:
                success: true
                size: 316
                checkImportStatus: /v1/usage/2c92c8f83dcbd8b1013dcce1159900cc/status
      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:
      tags:
        - Usage
      summary: Get usage
      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_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - name: account-key
          in: path
          description: Account number or account ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETUsageWrapper"
            application/json:
              example:
                usage:
                  - sourceName: Import
                    quantity: 4
                    unitOfMeasure: UOM
                    accountName: subscribeCallYan_1
                    id: 2c92c8953dac2b1c013dae0a263f35dd
                    startDateTime: 2012-02-05 00:00:00
                    accountNumber: A00001115
                    status: Pending
                    submissionDateTime: 2013-03-27 15:48:53
                    accountId: 2c92a0f9391832b10139183e277a0042
                  - sourceName: Import
                    quantity: 4
                    unitOfMeasure: UOM
                    accountName: subscribeCallYan_1
                    id: 2c92c8943db2ae51013dcce116b00f4b
                    startDateTime: 2012-02-05 00:00:00
                    accountNumber: A00001115
                    status: Pending
                    submissionDateTime: 2013-04-02 15:32:16
                    accountId: 2c92a0f9391832b10139183e277a0042
                  - sourceName: Import
                    quantity: 3
                    unitOfMeasure: UOM
                    accountName: subscribeCallYan_1
                    id: 2c92c8953dac2b1c013dae0a263f35dc
                    startDateTime: 2012-02-04 00:00:00
                    accountNumber: A00001115
                    status: Pending
                    submissionDateTime: 2013-03-27 15:48:53
                    accountId: 2c92a0f9391832b10139183e277a0042
                  - sourceName: Import
                    quantity: 3
                    unitOfMeasure: UOM
                    accountName: subscribeCallYan_1
                    id: 2c92c8943db2ae51013dcce116b00f4a
                    startDateTime: 2012-02-04 00:00:00
                    accountNumber: A00001115
                    status: Pending
                    submissionDateTime: 2013-04-02 15:32:16
                    accountId: 2c92a0f9391832b10139183e277a0042
                  - sourceName: Import
                    quantity: 2
                    unitOfMeasure: UOM
                    accountName: subscribeCallYan_1
                    id: 2c92c8953dac2b1c013dae0a263e35db
                    startDateTime: 2012-02-03 00:00:00
                    accountNumber: A00001115
                    status: Pending
                    submissionDateTime: 2013-03-27 15:48:53
                    accountId: 2c92a0f9391832b10139183e277a0042
                  - sourceName: Import
                    quantity: 2
                    unitOfMeasure: UOM
                    accountName: subscribeCallYan_1
                    id: 2c92c8943db2ae51013dcce116af0f49
                    startDateTime: 2012-02-03 00:00:00
                    accountNumber: A00001115
                    status: Pending
                    submissionDateTime: 2013-04-02 15:32:16
                    accountId: 2c92a0f9391832b10139183e277a0042
                  - sourceName: Import
                    quantity: 1
                    unitOfMeasure: UOM
                    accountName: subscribeCallYan_1
                    id: 2c92c8953dac2b1c013dae0a263e35da
                    startDateTime: 2012-02-02 00:00:00
                    accountNumber: A00001115
                    status: Pending
                    submissionDateTime: 2013-03-27 15:48:53
                    accountId: 2c92a0f9391832b10139183e277a0042
                  - sourceName: Import
                    quantity: 1
                    unitOfMeasure: UOM
                    accountName: subscribeCallYan_1
                    id: 2c92c8943db2ae51013dcce116af0f48
                    startDateTime: 2012-02-02 00:00:00
                    accountNumber: A00001115
                    status: Pending
                    submissionDateTime: 2013-04-02 15:32:16
                    accountId: 2c92a0f9391832b10139183e277a0042
                  - sourceName: Import
                    quantity: 4
                    unitOfMeasure: UOM
                    accountName: subscribeCallYan_1
                    id: 2c92c8953dac2b1c013dae0a263e35d9
                    startDateTime: 2012-01-05 00:00:00
                    accountNumber: A00001115
                    status: Pending
                    submissionDateTime: 2013-03-27 15:48:53
                    accountId: 2c92a0f9391832b10139183e277a0042
                  - sourceName: Import
                    quantity: 4
                    unitOfMeasure: UOM
                    accountName: subscribeCallYan_1
                    id: 2c92c8943db2ae51013dcce116af0f47
                    startDateTime: 2012-01-05 00:00:00
                    accountNumber: A00001115
                    status: Pending
                    submissionDateTime: 2013-04-02 15:32:16
                    accountId: 2c92a0f9391832b10139183e277a0042
                success: true
                nextPage: https://rest.zuora.com/v1/usage/accounts/A00001115?page=2&pageSize=10
      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);
  /workflows:
    get:
      tags:
        - Workflows
      summary: Get workflows
      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"
        - name: callout_trigger
          in: query
          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.
          schema:
            type: boolean
        - name: interval
          in: query
          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.
          schema:
            type: string
        - name: name
          in: query
          description: >
            If specified, the operation retrieves the workflow that is in the
            specified name.
          schema:
            type: string
        - name: ondemand_trigger
          in: query
          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.
          schema:
            type: boolean
        - name: scheduled_trigger
          in: query
          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.
          schema:
            type: boolean
        - name: page
          in: query
          description: >
            If you want to retrieve only the workflows on a specific page, you
            can specify the `page` number in the query.
          schema:
            type: integer
            default: 1
        - name: page_length
          in: query
          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.
          schema:
            type: integer
            default: 20
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetWorkflowsResponse"
            application/json:
              example:
                data:
                  - calloutTrigger: true
                    createdAt: 2019-05-31T14:52:38.171Z
                    description: ""
                    id: 48
                    name: New test workflow
                    ondemandTrigger: true
                    scheduledTrigger: false
                    type: Workflow::Setup
                    updatedAt: 2019-06-03T21:02:26.694Z
                pagination:
                  page: 1
                  page_length: 1
                  next_page: https://rest.zuora.com/workflows?page=2&page_length=1
      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/{workflow_id}":
    get:
      tags:
        - Workflows
      summary: Get a workflow by ID
      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"
        - name: workflow_id
          in: path
          description: |
            The unique ID of a workflow. For example, 19080.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetWorkflowResponse"
            application/json:
              example:
                id: 19063
                name: WF-19027-00000032
                originalWorkflowId: 19027
                type: Workflow::Instance
                status: Finished
                tasks:
                  total: 4
                  queued: 0
                  processing: 0
                  pending: 0
                  stopped: 0
                  success: 4
                  error: 0
                messages:
                  success:
                    No Message:
                      - 84067
                      - 84066
                      - 84065
                      - 84064
                runTime: 64.513026
                cpuTime: 19:01:04
                finishedAt: 2019-09-10 19:33:34 UTC
                createdAt: 2019-09-10 19:32:21 UTC
                updatedAt: 2019-09-10 19:33:34 UTC
      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);
    delete:
      tags:
        - Workflows
      summary: Delete a workflow by ID
      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"
        - name: workflow_id
          in: path
          description: |
            The unique ID of a workflow. For example, 19080.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DeleteWorkflowSuccess"
            application/json:
              example:
                success: true
                id: 19080
        "404":
          description: The workflow for the given id does not exist
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DeleteWorkflowError"
            application/json:
              example:
                errors:
                  - "Invalid ID / Multiple objects returned - SchemaId: 2
                    InstanceId: 2 ObjectId: 19080"
      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);
  "/workflows/{workflow_id}/run":
    post:
      tags:
        - Workflows
      summary: Run a workflow
      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"
        - name: workflow_id
          in: path
          description: The ID of the workflow you want to run.
          required: true
          schema:
            type: integer
      requestBody:
        description: Include parameters you want to pass to the workflow.
        content:
          application/json; charset=utf-8:
            schema:
              type: object
              example:
                paymentId: 4028905f5a87c0ff015a889ddfb800c0
                accountId: 4028905f5a87c0ff015a87d25ae90025
        required: false
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/WorkflowInstance"
            application/json:
              example:
                id: 400
                name: WF-396-00000003
                originalWorkflowId: 396
                type: Workflow::Instance
                status: Queued
                createdAt: 2019-09-19 18:25:33 UTC
                updatedAt: 2019-09-19 18:25:33 UTC
        "400":
          description: Callout not enabled for the workflow
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    description: The list of errors returned from the workflow
                    items:
                      $ref: "#/components/schemas/WorkflowError"
            application/json:
              example:
                errors:
                  - status: 400
                    code: invalid
                    title: Callout mode is not turned on in this workflow.
        "406":
          description: The provided body is missing one or more required parameters
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    description: The list of errors returned from the workflow
                    items:
                      $ref: "#/components/schemas/WorkflowError"
                  parameters:
                    type: object
                    description: The request body that was originally provided to the run API.
            application/json:
              example:
                errors:
                  - status: 406
                    code: invalid
                    title: Required field for Workflow-Message1 does not have a set value. Ensure
                      parameter 'Message' is present.
                parameters:
                  workflow: {}
        "409":
          description: The provided workflow_id references a workflow instance
          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
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    description: The list of errors returned from the workflow
                    items:
                      $ref: "#/components/schemas/WorkflowError"
            application/json:
              example:
                errors:
                  - status: 406
                    code: invalid
                    title: Workflow WF-396-00000002 with Id 399 is an instance/run.
      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);
      x-codegen-request-body-name: inputparameters
  "/workflows/{workflow_id}/export":
    get:
      tags:
        - Workflows
      summary: Export a workflow
      description: Export a Workflow in a JSON document. This document can be used to
        create a copy of this workflow.
      operationId: GET_WorkflowExport
      parameters:
        - name: workflow_id
          in: path
          description: The ID of the workflow to export.
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: OK
          content:
            application/json; charset=utf-8:
              schema:
                type: object
                properties:
                  workflow:
                    $ref: "#/components/schemas/Workflow"
                  tasks:
                    type: array
                    items:
                      $ref: "#/components/schemas/Task"
                  linkages:
                    type: array
                    items:
                      $ref: "#/components/schemas/Linkage"
            application/json:
              example:
                workflow:
                  id: 286
                  name: Call Echo
                  description: ""
                  parameters: {}
                  data: {}
                  type: Workflow::Setup
                  ondemand_trigger: true
                  callout_trigger: true
                  scheduled_trigger: false
                  css:
                    top: 40px
                    left: 30px
                  notifications: {}
                  priority: Medium
                  sync_trigger: false
                  run_mode: automated
                  delete_ttl: 60
                  task_summary: {}
                tasks:
                  - id: 849
                    name: Call Echo
                    parameters:
                      url: http://scooterlabs.com/echo
                      datas:
                        - key: ""
                          value: ""
                      method: GET
                      headers:
                        - key: ""
                          value: ""
                      raw_body: ""
                      body_type: raw
                      validation:
                        zuora_call: "false"
                        status_codes:
                          - ""
                          - "200"
                      retry_rules:
                        retry_count: "0"
                        retry_window: "30"
                        current_retry_count: "0"
                      authorization:
                        type: none
                      strict_variables: "true"
                      validate_response: "false"
                      validation_scheme: ""
                      include_response_code: "true"
                    action_type: Callout
                    call_type: SOAP
                    css:
                      top: 160px
                      left: 470px
                    concurrent_limit: 9999999
                    tags:
                      - ""
                    priority: Medium
                    assignment: []
                linkages:
                  - source_workflow_id: 286
                    target_task_id: 849
                    linkage_type: Start
      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/import:
    post:
      tags:
        - Workflows
      summary: Import a workflow
      description: Creates a copy of a workflow using the exported JSON document of
        the original workflow.
      operationId: POST_WorkflowImport
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              type: object
              properties:
                workflow:
                  $ref: "#/components/schemas/Workflow"
                tasks:
                  type: array
                  items:
                    $ref: "#/components/schemas/Task"
                linkages:
                  type: array
                  items:
                    $ref: "#/components/schemas/Linkage"
        required: false
      responses:
        "200":
          description: OK
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/Workflow"
            application/json:
              example:
                id: 403
                name: Call Echo
                description: ""
                type: Workflow::Setup
                ondemandTrigger: true
                calloutTrigger: true
                scheduledTrigger: false
                createdAt: 2019-10-03T14:14:39.139Z
                updatedAt: 2019-10-03T14:14:39.139Z
      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);
      x-codegen-request-body-name: request
  /workflows/tasks:
    get:
      tags:
        - Workflows
      summary: Get tasks
      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"
        - name: id
          in: query
          description: >
            If specified, the operation retrieves the task that is with
            specified id.
          schema:
            type: string
        - name: name
          in: query
          description: >
            If specified, the operation retrieves tasks that is in the specified
            name.
          schema:
            type: string
        - name: instance
          in: query
          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.
          schema:
            type: boolean
        - name: action_type
          in: query
          description: >
            If specified, the operation retrieves tasks that is the specified
            type.
          schema:
            type: string
        - name: object
          in: query
          description: >
            If specified, the operation retrieves tasks with the specified
            object.
          schema:
            type: string
        - name: object_id
          in: query
          description: >
            If specified, the operation retrieves tasks with the specified
            object id.
          schema:
            type: string
        - name: call_type
          in: query
          description: >
            If specified, the operation retrieves tasks with the specified api
            call type used.
          schema:
            type: string
        - name: workflow_id
          in: query
          description: >
            If specified, the operation retrieves tasks that for the specified
            workflow id.
          schema:
            type: string
        - name: tags
          in: query
          description: >
            If specified, the operation retrieves tasks that with the specified
            filter tags.
          schema:
            type: string
        - name: page
          in: query
          description: >
            If you want to retrieve only the workflows on a specific page, you
            can specify the `page` number in the query.
          schema:
            type: integer
            default: 1
        - name: page_length
          in: query
          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.
          schema:
            type: integer
            default: 20
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/TasksResponse"
            application/json:
              example:
                data:
                  - id: 2771
                    name: If
                    instance: true
                    parameters:
                      if_clause: "{% if 0 > 1 %}\r

                        True\r

                        {% else %}\r

                        False\r

                        {% endif %}"
                      strict_variables: "true"
                    data:
                      Files:
                        XML_52881.xml:
                          name: JSONData_xslt.xml
                          size: 0.011725425720214844
                          object_class: Workflow
                      Tasks:
                        Previous:
                          Id: 2770
                          Status: Error
                          ErrorClass: WorkflowError::Callout
                          ErrorReason: Callout response was 500 after 1 tries.
                      Callout:
                        URL: https://rest.apisandbox.zuora.com/v1/action/query
                        RequestBody:
                          queryString: Select Id From Contact Where LastName = 'Drew' AND FirstName =
                            'Nancy' AND  WorkEmail = 'nancy@xyz.com'
                        ResponseBody:
                          message: |
                            An unexpected error occurred
                        ResponseCode: 500
                        RequestHeaders:
                          Content-Type: application/json
                        ResponseHeaders:
                          x-n:
                            - S
                          date:
                            - Thu, 19 Sep 2019 12:35:43 GMT
                          pragma:
                            - no-cache
                          server:
                            - kong/0.9.9
                          expires:
                            - Thu, 19 Sep 2019 12:35:43 GMT
                          connection:
                            - close
                          content-type:
                            - text/plain; charset=UTF-8
                          cache-control:
                            - max-age=0, no-cache, no-store
                      Workflow:
                        LastRunDate: 2019-09-19
                        ExecutionDate: 2019-09-19
                        LastRunDateTime: 2019-09-19T12:34:41
                        WorkflowRunUser: Nobody
                        ExecutionDateTime: 2019-09-19T12:35:37
                    action_type: If
                    call_type: SOAP
                    workflow_id: 476
                    status: Success
                    start_time: 2019-09-19T12:35:43.857Z
                    end_time: 2019-09-19T12:35:43.942Z
                    original_task_id: 2582
                    original_workflow_id: 416
                    tags: []
                pagination:
                  page: 1
                  page_length: 1
                  next_page: https://rest.zuora.com/workflows/tasks?page=2&page_length=1
      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/{task_id}":
    get:
      tags:
        - Workflows
      summary: Get a task by ID
      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"
        - name: task_id
          in: path
          description: |
            The unique ID of the task.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/Task"
            application/json:
              example:
                id: 2771
                name: If
                instance: true
                parameters:
                  if_clause: "{% if 0 > 1 %}\r

                    True\r

                    {% else %}\r

                    False\r

                    {% endif %}"
                  strict_variables: "true"
                data:
                  Files:
                    XML_52881.xml:
                      name: JSONData_xslt.xml
                      size: 0.011725425720214844
                      object_class: Workflow
                  Tasks:
                    Previous:
                      Id: 2770
                      Status: Error
                      ErrorClass: WorkflowError::Callout
                      ErrorReason: Callout response was 500 after 1 tries.
                  Callout:
                    URL: https://rest.apisandbox.zuora.com/v1/action/query
                    RequestBody:
                      queryString: Select Id From Contact Where LastName = 'Drew' AND FirstName =
                        'Nancy' AND  WorkEmail = 'nancy@xyz.com'
                    ResponseBody:
                      message: |
                        An unexpected error occurred
                    ResponseCode: 500
                    RequestHeaders:
                      Content-Type: application/json
                    ResponseHeaders:
                      x-n:
                        - S
                      date:
                        - Thu, 19 Sep 2019 12:35:43 GMT
                      pragma:
                        - no-cache
                      server:
                        - kong/0.9.9
                      expires:
                        - Thu, 19 Sep 2019 12:35:43 GMT
                      connection:
                        - close
                      content-type:
                        - text/plain; charset=UTF-8
                      cache-control:
                        - max-age=0, no-cache, no-store
                  Workflow:
                    LastRunDate: 2019-09-19
                    ExecutionDate: 2019-09-19
                    LastRunDateTime: 2019-09-19T12:34:41
                    WorkflowRunUser: Nobody
                    ExecutionDateTime: 2019-09-19T12:35:37
                action_type: If
                call_type: SOAP
                workflow_id: 476
                status: Success
                start_time: 2019-09-19T12:35:43.857Z
                end_time: 2019-09-19T12:35:43.942Z
                original_task_id: 2582
                original_workflow_id: 416
                tags: []
      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/batch_update:
    put:
      tags:
        - Workflows
      summary: Update tasks in batch
      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"
        required: false
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/TasksResponse"
            application/json:
              example:
                data:
                  - id: 2771
                    name: If
                    instance: true
                    parameters:
                      if_clause: "{% if 0 > 1 %}\r

                        True\r

                        {% else %}\r

                        False\r

                        {% endif %}"
                      strict_variables: "true"
                    data:
                      Files:
                        XML_52881.xml:
                          name: JSONData_xslt.xml
                          size: 0.011725425720214844
                          object_class: Workflow
                      Tasks:
                        Previous:
                          Id: 2770
                          Status: Error
                          ErrorClass: WorkflowError::Callout
                          ErrorReason: Callout response was 500 after 1 tries.
                      Callout:
                        URL: https://rest.apisandbox.zuora.com/v1/action/query
                        RequestBody:
                          queryString: Select Id From Contact Where LastName = 'Drew' AND FirstName =
                            'Nancy' AND  WorkEmail = 'nancy@xyz.com'
                        ResponseBody:
                          message: |
                            An unexpected error occurred
                        ResponseCode: 500
                        RequestHeaders:
                          Content-Type: application/json
                        ResponseHeaders:
                          x-n:
                            - S
                          date:
                            - Thu, 19 Sep 2019 12:35:43 GMT
                          pragma:
                            - no-cache
                          server:
                            - kong/0.9.9
                          expires:
                            - Thu, 19 Sep 2019 12:35:43 GMT
                          connection:
                            - close
                          content-type:
                            - text/plain; charset=UTF-8
                          cache-control:
                            - max-age=0, no-cache, no-store
                      Workflow:
                        LastRunDate: 2019-09-19
                        ExecutionDate: 2019-09-19
                        LastRunDateTime: 2019-09-19T12:34:41
                        WorkflowRunUser: Nobody
                        ExecutionDateTime: 2019-09-19T12:35:37
                    action_type: If
                    call_type: SOAP
                    workflow_id: 476
                    status: Success
                    start_time: 2019-09-19T12:35:43.857Z
                    end_time: 2019-09-19T12:35:43.942Z
                    original_task_id: 2582
                    original_workflow_id: 416
                    tags: []
                pagination: {}
        "400":
          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:
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/BadRequestResponse"
            application/json:
              example:
                errors:
                  - status: 400
                    code: Task
                    title: Data not present or not in array.
        "404":
          description: One or more tasks are missing the required `id` field
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/BadRequestResponse"
            application/json:
              example:
                errors:
                  - status: 404
                    code: Task
                    title: Missing ids for tasks.
      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);
      x-codegen-request-body-name: UpdateRequest
  /workflows/metrics.json:
    get:
      tags:
        - Workflows
      summary: Get workflow task usage
      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"
        - name: startDate
          in: query
          description: >
            The start date of the usage data that you want to get. For example,
            2019-01-01.
          required: true
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: >
            The end date of the usage data that you want to get. For example,
            2019-12-31.
          required: true
          schema:
            type: string
            format: date
        - name: metrics
          in: query
          description: >
            The type of metric that you want to get. Currently, only `taskCount`
            is supported. `taskCount` is the amount of task runs.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/UsagesResponse"
            application/json:
              example:
                metrics:
                  - date: 2019-01-16
                    values:
                      taskCount: 1417
                  - date: 2019-08-02
                    values:
                      taskCount: 24
                  - date: 2019-05-23
                    values:
                      taskCount: 2
      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);
  /v1/object/account:
    post:
      tags:
        - Accounts
      summary: "CRUD: Create account"
      description: >
        Creates an account without creating any associated objects such as
        subscriptions.
      operationId: Object_POSTAccount
      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/ProxyCreateAccount"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e0321fdf4fab
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/account/{id}":
    get:
      tags:
        - Accounts
      summary: "CRUD: Get account"
      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"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetAccount"
            application/json:
              example:
                AccountNumber: AN_1476935136687
                AllowInvoiceEdit: false
                Id: 2c93808457d787030157e031b5b74a9d
                AutoPay: true
                InvoiceDeliveryPrefsPrint: false
                UpdatedDate: 2016-10-20T05:45:37.000+02:00
                CreditBalance: 0
                BillCycleDay: 1
                BcdSettingOption: ManualSet
                PaymentTerm: Due Upon Receipt
                Status: Draft
                TotalInvoiceBalance: 0
                UpdatedById: 2c93808457d787030157e0319d644922
                Batch: Batch1
                CreatedById: 2c93808457d787030157e0319d644922
                InvoiceDeliveryPrefsEmail: false
                Name: AC_1476935136687
                SoldToId: 2c93808457d787030157e031b6444a9e
                Notes: this is notes
                Balance: 0
                InvoiceTemplateId: 2c93808457d787030157e031a33c4a94
                CrmId: crmid
                BillToId: 2c93808457d787030157e031b6444a9e
                CreatedDate: 2016-10-20T05:45:36.000+02:00
                DefaultPaymentMethodId: 2c93808457d787030157e031b6d24a9f
                Currency: USD
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Accounts
      summary: "CRUD: Update account"
      description: |
        Updates an account.
      operationId: Object_PUTAccount
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyAccount"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e0321fdf4fab
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Accounts
      summary: "CRUD: Delete account"
      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"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e031b1ea4a98
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  "/v1/object/amendment/{id}":
    get:
      tags:
        - Amendments
      summary: "CRUD: Get amendment"
      operationId: Object_GETAmendment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetAmendment"
            application/json:
              example:
                RenewalSetting: RENEW_WITH_SPECIFIC_TERM
                Id: 2c93808457d787030157e02e430c1f15
                UpdatedDate: 2016-10-20T05:41:50.000+02:00
                SubscriptionId: 2c93808457d787030157e02e3ef61f02
                ServiceActivationDate: 2016-10-20
                CurrentTermPeriodType: Month
                Description: AMtssl1bnuq1
                ContractEffectiveDate: 2016-10-20
                CreatedById: 2c93808457d787030157e02e0bcf1d0c
                CreatedDate: 2016-10-20T05:41:50.000+02:00
                Name: AMtssl1bnuq1_new
                CustomerAcceptanceDate: 2016-10-20
                Code: A-AM00000004
                RenewalTermPeriodType: Month
                Type: NewProduct
                Status: Draft
                UpdatedById: 2c93808457d787030157e02e0bcf1d0c
                EffectiveDate: 2016-10-20
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Amendments
      summary: "CRUD: Update amendment"
      operationId: Object_PUTAmendment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyAmendment"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e02e430c1f15
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Amendments
      summary: "CRUD: Delete amendment"
      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"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e02e3a541ef4
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  /v1/object/bill-run:
    post:
      tags:
        - Bill Run
      summary: "CRUD: Create bill run"
      description: >
        **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). 



        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_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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c92c0f959d961e1015a0872b69a7347
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/bill-run/{id}":
    get:
      tags:
        - Bill Run
      summary: "CRUD: Get bill run"
      description: >
        **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). 



        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"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetBillRun"
            application/json:
              example:
                AutoRenewal: false
                InvoiceDate: 2017-02-01
                Id: 2c92c09459d949220159f79d592f7e1a
                NumberOfInvoices: 1
                UpdatedDate: 2017-02-01T19:00:00.000-08:00
                BillCycleDay: AllBillCycleDays
                AutoEmail: false
                AutoPost: false
                NoEmailForZeroAmountInvoice: false
                NumberOfAccounts: 1
                BillRunNumber: BR-00002572
                Status: Completed
                CreatedDate: 2017-01-31T19:00:01.000-08:00
                CreatedById: 2c92c0f956bc8fcb0156f8eee04b4d54
                UpdatedById: 2c92c0f956bc8fcb0156f8eee04b4d54
                ExecutedDate: 2017-02-01T19:00:00.000-08:00
                Batch: Batch1
                InvoicesEmailed: false
                TargetDate: 2017-02-20
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Bill Run
      summary: "CRUD: Post or Cancel bill run"
      description: >
        **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). 



        ## 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_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyBillRun"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c92c0f959d961e1015a0872b69a7347
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Bill Run
      summary: "CRUD: Delete bill run"
      description: >
        **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). 



        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"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                Success: true
                Id: 2c92c0f959d961e1015a0872b69a7347
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  "/v1/object/communication-profile/{id}":
    get:
      tags:
        - Communication Profiles
      summary: "CRUD: Retrieve CommunicationProfile"
      operationId: Object_GETCommunicationProfile
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetCommunicationProfile"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Contacts
      summary: "CRUD: Create contact"
      description: |
        Creates a contact for a specified account.
      operationId: Object_POSTContact
      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/ProxyCreateContact"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e03220684fac
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/contact/{id}":
    get:
      tags:
        - Contacts
      summary: "CRUD: Get contact"
      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"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetContact"
            application/json:
              example:
                OtherPhoneType: Work
                MobilePhone: "8613312345678"
                Id: 2c93808457d787030157e02e606e2095
                FirstName: FN1476934918260_new
                NickName: this is nick name
                UpdatedDate: 2016-10-20T05:41:58.000+02:00
                Country: United States
                WorkEmail: work@example.com
                HomePhone: "86123456789"
                AccountId: 2c93808457d787030157e02e5fde2094
                Description: desc
                OtherPhone: "11111111111111111"
                Fax: "123456"
                CreatedById: 2c93808457d787030157e02e45291f18
                CreatedDate: 2016-10-20T05:41:58.000+02:00
                PostalCode: "98119"
                UpdatedById: 2c93808457d787030157e02e45291f18
                City: Seattle
                TaxRegion: CA
                State: Washington
                PersonalEmail: home@example.com
                Address1: 312 2nd Ave W
                LastName: LN1476934918260
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Contacts
      summary: "CRUD: Update contact"
      description: |
        Updates a contact for a specified account.

        You can update contacts for cancelled accounts.
      operationId: Object_PUTContact
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyContact"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e02e606e2095
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Contacts
      summary: "CRUD: Delete contact"
      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"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e02e5b26208f
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  /v1/object/credit-balance-adjustment:
    post:
      tags:
        - Credit Balance Adjustments
      summary: "CRUD: Create CreditBalanceAdjustment"
      operationId: Object_POSTCreditBalanceAdjustment
      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/ProxyCreateCreditBalanceAdjustment"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c92c0f96a531e4f016a5377af993d87
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The invoice could not be found. It may have been deleted by another
                      user.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/credit-balance-adjustment/{id}":
    get:
      tags:
        - Credit Balance Adjustments
      summary: "CRUD: Retrieve CreditBalanceAdjustment"
      operationId: Object_GETCreditBalanceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetCreditBalanceAdjustment"
            application/json:
              example:
                Id: 2c93808457d787030157e02f640b2c9f
                CancelledOn: 2016-10-20T05:43:05.000+02:00
                Amount: 30.8
                UpdatedById: 2c93808457d787030157e02f409a2af9
                CreatedById: 2c93808457d787030157e02f409a2af9
                CreatedDate: 2016-10-20T05:43:04.000+02:00
                ReasonCode: Standard Adjustment
                SourceTransactionNumber: INV00000001
                Number: CBA-00000001
                AdjustmentDate: 2016-10-20
                Type: Increase
                Status: Canceled
                AccountId: 2c93808457d787030157e02f5fb82c76
                SourceTransactionId: 2c93808457d787030157e02f60a42c87
                SourceTransactionType: Invoice
                UpdatedDate: 2016-10-20T05:43:05.000+02:00
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Credit Balance Adjustments
      summary: "CRUD: Update CreditBalanceAdjustment"
      operationId: Object_PUTCreditBalanceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyCreditBalanceAdjustment"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c92c0f96a531e4f016a5377af993d87
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
  /v1/object/export:
    post:
      tags:
        - Exports
      summary: "CRUD: Create Export"
      description: >
        Use this operation to create a data source export. After you have
        created a data source export, use [CRUD: Retrieve
        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.


        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_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":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e03222184fae
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/export/{id}":
    get:
      tags:
        - Exports
      summary: "CRUD: Retrieve Export"
      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"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetExport"
            application/json:
              example:
                Format: csv
                Query: select * from account
                Encrypted: false
                CreatedById: 2c93808457d787030157e03202294e25
                CreatedDate: 2016-10-20T05:46:04.000+02:00
                Name: test_Export_1476935164445
                Zip: true
                Size: 5
                UpdatedDate: 2016-10-20T05:46:04.000+02:00
                UpdatedById: 2c93808457d787030157e03202294e25
                Status: Completed
                Id: 2c93808457d787030157e03222184fae
                FileId: 2c93808457d787030157e032228d4fb0
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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/{id}":
    get:
      tags:
        - Features
      summary: "CRUD: Retrieve Feature"
      operationId: Object_GETFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetFeature"
            application/json:
              example:
                Id: 2c93808457d787030157e02f82872e25
                Status: Active
                CreatedDate: 2016-10-20T05:43:12.000+02:00
                UpdatedDate: 2016-10-20T05:43:12.000+02:00
                FeatureCode: feature_code_1476934992537
                CreatedById: 2c93808457d787030157e02f68272cae
                UpdatedById: 2c93808457d787030157e02f68272cae
                Name: name_1476934992537_new
                Description: this is desc
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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);
    delete:
      tags:
        - Features
      summary: "CRUD: Delete Feature"
      operationId: Object_DELETEFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e02f80e92e24
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  "/v1/object/import/{id}":
    get:
      tags:
        - Imports
      summary: "CRUD: Retrieve Import"
      operationId: Object_GETImport
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetImport"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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/import:
    post:
      tags:
        - Imports
      summary: "CRUD: Create Import"
      description: |
        Creates a data import.
      operationId: Object_POSTImport
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - File
                - ImportType
                - Name
              properties:
                ImportType:
                  type: string
                  description: |
                    The type of data to import.
                  enum:
                    - Usage
                    - Payment
                    - Quote
                    - TaxationDetail
                    - UpdateAccountingCode
                    - CreateRevenueSchedule
                    - UpdateRevenueSchedule
                    - DeleteRevenueSchedule
                    - ImportFXRate
                Name:
                  type: string
                  description: |
                    A descriptive name for the import.
                File:
                  type: string
                  description: |
                    The data to import.
                  format: binary
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyPostImport"
            application/json:
              example:
                Success: true
                Id: 2c92c0f8601fab5701601fee2bf67056
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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/invoice/{id}":
    get:
      tags:
        - Invoices
      summary: "CRUD: Get invoice"
      operationId: Object_GETInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoice"
            application/json:
              example:
                InvoiceDate: 2011-01-10
                TaxExemptAmount: 0
                UpdatedDate: 2016-10-20T05:45:45.000+02:00
                CreditBalanceAdjustmentAmount: 0
                Status: Posted
                TargetDate: 2016-10-20
                AccountId: 2c93808457d787030157e031d2704c28
                IncludesOneTime: true
                InvoiceNumber: INV00000002
                UpdatedById: 2c93808457d787030157e031bb3f4aa5
                PaymentAmount: 0
                Id: 2c93808457d787030157e031d86c4c57
                TaxAmount: 0
                IncludesUsage: true
                CreatedById: 2c93808457d787030157e031bb3f4aa5
                CreatedDate: 2016-10-20T05:45:45.000+02:00
                Body: JVBERi0xLjUNCjQg......QNCiUlRU9GDQo=
                PostedDate": 2016-10-20T05:45:45.000+02:00
                Amount: 23.92
                Balance: 23.92
                RefundAmount: 0
                AmountWithoutTax: 23.92
                AdjustmentAmount: 0
                PostedBy: 2c93808457d787030157e031bb3f4aa5
                DueDate: 2011-01-10
                IncludesRecurring: true
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Invoices
      summary: "CRUD: Update invoice"
      operationId: Object_PUTInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyInvoice"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e031d86c4c57
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Invoices
      summary: "CRUD: Delete invoice"
      operationId: Object_DELETEInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e02f149f2922
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  /v1/object/invoice-adjustment:
    post:
      tags:
        - Invoice Adjustments
      summary: "CRUD: Create InvoiceAdjustment"
      operationId: Object_POSTInvoiceAdjustment
      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/ProxyCreateInvoiceAdjustment"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e030d3043f79
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/invoice-adjustment/{id}":
    get:
      tags:
        - Invoice Adjustments
      summary: "CRUD: Retrieve InvoiceAdjustment"
      operationId: Object_GETInvoiceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoiceAdjustment"
            application/json:
              example:
                AdjustmentNumber: IA-00000001
                CustomerName: AC_1476935078064
                Id: 2c93808457d787030157e030d3043f79
                AccountingCode: Accounts Receivable
                ReasonCode: Standard Adjustment
                AccountId: 2c93808457d787030157e030d0a43f53
                CustomerNumber: AN_1476935078064
                InvoiceId: 2c93808457d787030157e030d10f3f64
                ImpactAmount: -1.2
                CreatedById: 2c93808457d787030157e030b4fa3dd6
                CreatedDate: 2016-10-20T05:44:38.000+02:00
                Type: Credit
                Amount: 1.2
                AdjustmentDate: 2016-10-20
                Comments: this is comments
                UpdatedDate: 2016-10-20T05:44:38.000+02:00
                Status: Processed
                InvoiceNumber: INV00000001
                ReferenceId: refid-1476935078657
                UpdatedById: 2c93808457d787030157e030b4fa3dd6
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Invoice Adjustments
      summary: "CRUD: Update InvoiceAdjustment"
      operationId: Object_PUTInvoiceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyInvoiceAdjustment"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Invoice Adjustments
      summary: "CRUD: Delete InvoiceAdjustment"
      operationId: Object_DELETEInvoiceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  "/v1/object/invoice-item/{id}":
    get:
      tags:
        - Invoice Items
      summary: "CRUD: Retrieve InvoiceItem"
      operationId: Object_GETInvoiceItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoiceItem"
            application/json:
              example:
                ServiceEndDate: 2016-10-20
                Id: 2c93808457d787030157e03089c03c3b
                ChargeDate: 2016-10-20T05:44:19.000+02:00
                AccountingCode: Accounts Receivable
                UnitPrice: 10
                SubscriptionId: 2c93808457d787030157e03088bf3c24
                ProcessingType: 0
                Quantity: 1
                ChargeAmount: 10
                ServiceStartDate: 2016-10-20
                CreatedById: 2c93808457d787030157e03071873a9a
                CreatedDate: 2016-10-20T05:44:19.000+02:00
                TaxAmount: 0
                ChargeName: OneTime_Flat Fee Pricing1476935059154
                SKU: API-SKU1476935058740
                UpdatedDate: 2016-10-20T05:44:21.000+02:00
                UpdatedById: 2c93808457d787030157e03071873a9a
                TaxExemptAmount: 0
                InvoiceId: 2c93808457d787030157e03089bb3c39
                ProductDescription: Create product via API
                RatePlanChargeId: 2c93808457d787030157e03088ec3c2d
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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-item-adjustment/{id}":
    get:
      tags:
        - Invoice Item Adjustments
      summary: "CRUD: Retrieve InvoiceItemAdjustment"
      operationId: Object_GETInvoiceItemAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoiceItemAdjustment"
            application/json:
              example:
                AdjustmentNumber: IIA-00000001
                ServiceEndDate: 2016-10-20
                Id: 2c93808457d787030157e0324aea5158
                AccountingCode: Accounts Receivable
                UpdatedDate: 2016-10-20T05:46:14.000+02:00
                AccountId: 2c93808457d787030157e032485b5131
                Comment: this is comments
                InvoiceNumber: INV00000001
                InvoiceId: 2c93808457d787030157e03248c75142
                ServiceStartDate: 2016-10-20
                InvoiceItemName: OneTime_Flat Fee Pricing1476935174089
                CreatedDate: 2016-10-20T05:46:14.000+02:00
                ReasonCode: Standard Adjustment
                UpdatedById: 2c93808457d787030157e032283c4fb2
                Amount: 1.2
                AdjustmentDate: 2016-10-20
                Type: Credit
                Status: Processed
                SourceType: InvoiceDetail
                SourceId: 2c93808457d787030157e03248c95144
                ReferenceId: refid-1476935174845
                CreatedById: 2c93808457d787030157e032283c4fb2
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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);
    delete:
      tags:
        - Invoice Item Adjustments
      summary: "CRUD: Delete InvoiceItemAdjustment"
      operationId: Object_DELETEInvoiceItemAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  /v1/object/invoice-payment:
    post:
      tags:
        - Invoice Payments
      summary: "CRUD: Create InvoicePayment"
      operationId: Object_POSTInvoicePayment
      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/ProxyCreateInvoicePayment"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e02dee6e1b7a
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/invoice-payment/{id}":
    get:
      tags:
        - Invoice Payments
      summary: "CRUD: Retrieve InvoicePayment"
      operationId: Object_GETInvoicePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoicePayment"
            application/json:
              example:
                Id: 2c93808457d787030157e02dee6e1b7a
                PaymentId: 2c93808457d787030157e02de5fc1b57
                CreatedDate: 2016-10-20T05:41:29.000+02:00
                UpdatedDate: 2016-10-20T05:41:29.000+02:00
                Amount: 10
                CreatedById: 2c93808457d787030157e02dc3d919dc
                UpdatedById: 2c93808457d787030157e02dc3d919dc
                RefundAmount: 0
                InvoiceId: 2c93808457d787030157e02deadb1b6d
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Invoice Payments
      summary: "CRUD: Update InvoicePayment"
      operationId: Object_PUTInvoicePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyInvoicePayment"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
  "/v1/object/invoice-split/{id}":
    get:
      tags:
        - Invoice Splits
      summary: "CRUD: Retrieve InvoiceSplit"
      operationId: Object_GETInvoiceSplit
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoiceSplit"
            application/json:
              example:
                UpdatedById: 2c93808457d787030157e03111d542ae
                Id: 2c93808457d787030157e0312cb2445c
                CreatedById: 2c93808457d787030157e03111d542ae
                CreatedDate: 2016-10-20T05:45:01.000+02:00
                UpdatedDate: 2016-10-20T05:45:01.000+02:00
                InvoiceId: 2c93808457d787030157e0312aa34449
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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-split-item/{id}":
    get:
      tags:
        - Invoice Split Items
      summary: "CRUD: Retrieve InvoiceSplitItem"
      operationId: Object_GETInvoiceSplitItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoiceSplitItem"
            application/json:
              example:
                InvoiceDate: 2011-01-20
                UpdatedById: 2c93808457d787030157e031bb3f4aa5
                CreatedById: 2c93808457d787030157e031bb3f4aa5
                CreatedDate: 2016-10-20T05:45:45.000+02:00
                UpdatedDate: 2016-10-20T05:45:45.000+02:00
                SplitPercentage: 50.9
                PaymentTerm: Due Upon Receipt
                Id: 2c93808457d787030157e031d7214c55
                InvoiceSplitId: 2c93808457d787030157e031d5844c53
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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/payment:
    post:
      tags:
        - Payments
      summary: "CRUD: Create payment"
      description: >
        Creates a payment.


        **Note:** If you have the Invoice Settlement feature enabled, you cannot use this operation to create a payment.
      operationId: Object_POSTPayment
      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/ProxyCreatePayment"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e03197714910
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/payment/{id}":
    get:
      tags:
        - Payments
      summary: "CRUD: Get payment"
      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"
        - name: id
          in: path
          description: >
            The unique ID of a payment. For example,
            2c92c095592623ea01596621ada84352.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetPayment"
            application/json:
              example:
                PaymentNumber: P-00000036
                GatewayResponse: This transaction has been approved by Test gateway.
                Id: 2c92c095592623ea01596621ada84352
                UpdatedDate: 2017-01-03T13:00:00.000-08:00
                GatewayState: Submitted
                Source: PaymentRun
                AccountId: 2c92c0f94fd7f22d014fef0b703e26f4
                BankIdentificationNumber: "111111"
                ReferenceId: "3115031.8425435387"
                PaymentMethodSnapshotId: 2c92c095592623ea01596621ada44351
                UpdatedById: 2c92c0f955e2bcfc0155e3019d0c4963
                SubmittedOn: 2017-01-03T13:00:00.000-08:00
                Type: Electronic
                CreatedDate: 2017-01-03T13:00:00.000-08:00
                RefundAmount: 0
                SourceName: PR-00001035
                Amount: 19696.44
                PaymentMethodId: 2c92c0f94fd7f22d014fef0b714e26f9
                CreatedById: 2c92c0f955e2bcfc0155e3019d0c4963
                Status: Processed
                AppliedCreditBalanceAmount: 0
                Gateway: Test Gateway2
                GatewayResponseCode: approve
                EffectiveDate: 2017-01-03
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Payments
      summary: "CRUD: Update payment"
      description: |
        Updates a payment. 
      operationId: Object_PUTPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: >
            The unique ID of a payment. For example,
            2c92c095592623ea01596621ada84352.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyPayment"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Id: 2c92c0f85d5964dc015d59bb40ff3f0e
                Success: true
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Payments
      summary: "CRUD: Delete payment"
      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"
        - name: id
          in: path
          description: >
            The unique ID of the payment to be deleted. For example,
            2c92c0f85d4e95ae015d4f7e5d690622.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                Id: 2c92c0f85d4e95ae015d4f7e5d690622
                Success: true
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  /v1/object/payment-method:
    post:
      tags:
        - Payment Methods
      summary: "CRUD: Create payment method"
      operationId: Object_POSTPaymentMethod
      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/ProxyCreatePaymentMethod"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e03220ec4fad
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/payment-method/{id}":
    get:
      tags:
        - Payment Methods
      summary: "CRUD: Get payment method"
      operationId: Object_GETPaymentMethod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetPaymentMethod"
            application/json:
              example:
                CreditCardExpirationMonth: 12
                CreditCardAddress1: 312 2nd Ave W
                Id: 2c93808457d787030157e0314e8145d7
                CreditCardExpirationYear: 2020
                UpdatedDate: 2016-10-20T05:45:10.000+02:00
                CreditCardCity: Seattle
                CreditCardState: Washington
                AccountId: 2c93808457d787030157e0314c0945d4
                Type: CreditCard
                UpdatedById: 2c93808457d787030157e0312ef1445e
                CreditCardCountry: United States
                AchAddress1: 312 2nd Ave W
                CreditCardType: Visa
                CreatedById: 2c93808457d787030157e0312ef1445e
                CreditCardPostalCode: "98119"
                CreditCardHolderName: Somebody
                CreatedDate: 2016-10-20T05:45:10.000+02:00
                TotalNumberOfProcessedPayments: 1
                PaymentMethodStatus: Active
                NumConsecutiveFailures: 7
                TotalNumberOfErrorPayments: 0
                CreditCardMaskNumber: "************1111"
                LastTransactionStatus: Approved
                LastTransactionDateTime: 2016-10-20T05:45:10.000+02:00
                UseDefaultRetryRule: true
                BankIdentificationNumber: "411111"
                IdentityNumber: ""
                IsCompany: false
                CompanyName: ""
                Active: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Payment Methods
      summary: "CRUD: Update payment method"
      operationId: Object_PUTPaymentMethod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyPaymentMethod"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e02fced332a2
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Payment Methods
      summary: "CRUD: Delete payment method"
      operationId: Object_DELETEPaymentMethod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e02fcc8e329f
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  "/v1/object/payment-method-snapshot/{id}":
    get:
      tags:
        - Payment Method Snapshots
      summary: "CRUD: Get payment method snapshot"
      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"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetPaymentMethodSnapshot"
            application/json:
              example:
                CreditCardExpirationMonth: 12
                CreditCardAddress1: 312 2nd Ave W
                Id: 2c93808457d787030157e0314f2245d8
                CreditCardExpirationYear: 2020
                CreditCardCity: Seattle
                CreditCardState: Washington
                AccountId: 2c93808457d787030157e0314c0945d4
                NumConsecutiveFailures: 0
                CreditCardType: Visa
                BankIdentificationNumber: "411111"
                TotalNumberOfProcessedPayments: 0
                CreditCardPostalCode: "98119"
                CreditCardCountry: United States
                PaymentMethodId: 2c93808457d787030157e0314e8145d7
                CreditCardMaskNumber: "************1111"
                CreditCardHolderName: Somebody
                TotalNumberOfErrorPayments: 0
                UseDefaultRetryRule: true
                Type: CreditCard
                PaymentMethodStatus: Active
                IdentityNumber: ""
                IsCompany: false
                CompanyName: ""
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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);
    delete:
      tags:
        - Payment Method Snapshots
      summary: "CRUD: Delete payment method snapshot"
      description: >
        This REST API reference describes how to delete a Payment Method
        Snapshot.
      operationId: Object_DELETEPaymentMethodSnapshot
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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-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_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-snapshot/{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-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::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-snapshot/{id}");

            var request = new RestRequest(Method.DELETE);

            request.AddHeader("content-type", "application/json");

            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");

            IRestResponse response = client.Execute(request);
  "/v1/object/payment-method-transaction-log/{id}":
    get:
      tags:
        - Payment Method Transaction Logs
      summary: "CRUD: Retrieve PaymentMethodTransactionLog"
      operationId: Object_GETPaymentMethodTransactionLog
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetPaymentMethodTransactionLog"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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-transaction-log/{id}":
    get:
      tags:
        - Payment Transaction Logs
      summary: "CRUD: Get payment transaction log"
      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"
        - name: id
          in: path
          description: |
            The ID of a payment transaction log.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetPaymentTransactionLog"
            application/json:
              example:
                GatewayReasonCodeDescription: This transaction has been approved by Test gateway.
                Id: 2c93808457d787030157e030b2703dcd
                PaymentId: 2c93808457d787030157e030b2673dcc
                TransactionId: "874200.071357285"
                GatewayState: Submitted
                TransactionDate: 2016-10-20T05:44:30.000+02:00
                Gateway: TEST gateway name1476935063101
                GatewayReasonCode: approve
                GatewayTransactionType: Sale
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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/product:
    post:
      tags:
        - Products
      summary: "CRUD: Create Product"
      operationId: Object_POSTProduct
      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/ProxyCreateProduct"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e03246ae5129
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/product/{id}":
    get:
      tags:
        - Products
      summary: "CRUD: Retrieve Product"
      operationId: Object_GETProduct
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetProduct"
            application/json:
              example:
                Id: 2c93808457d787030157e02e7be22210
                CreatedById: 2c93808457d787030157e02e62af2097
                CreatedDate: 2016-10-20T05:42:05.000+02:00
                UpdatedDate: 2016-10-20T05:42:05.000+02:00
                SKU: API-SKU1476934925293
                EffectiveStartDate: 1966-10-20
                UpdatedById: 2c93808457d787030157e02e62af2097
                Name: P_1476934925293_new
                EffectiveEndDate: 2066-10-20
                Description: Create product via API_new
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Products
      summary: "CRUD: Update Product"
      operationId: Object_PUTProduct
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyProduct"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e02e7be22210
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Products
      summary: "CRUD: Delete Product"
      operationId: Object_DELETEProduct
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e02e7a22220e
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  "/v1/object/product-feature/{id}":
    get:
      tags:
        - Product Features
      summary: "CRUD: Retrieve ProductFeature"
      operationId: Object_GETProductFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetProductFeature"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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);
    delete:
      tags:
        - Product Features
      summary: "CRUD: Delete ProductFeature"
      operationId: Object_DELETEProductFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e02d820f16d3
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  /v1/object/product-rate-plan:
    post:
      tags:
        - Product Rate Plans
      summary: "CRUD: Create ProductRatePlan"
      operationId: Object_POSTProductRatePlan
      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/ProxyCreateProductRatePlan"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e0324735512b
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/product-rate-plan/{id}":
    get:
      tags:
        - Product Rate Plans
      summary: "CRUD: Retrieve ProductRatePlan"
      operationId: Object_GETProductRatePlan
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetProductRatePlan"
            application/json:
              example:
                ProductId: 2c93808457d787030157e02da0231850
                Id: 2c93808457d787030157e02da0d91852
                CreatedById: 2c93808457d787030157e02d84c116d5
                CreatedDate: 2016-10-20T05:41:09.000+02:00
                UpdatedDate: 2016-10-20T05:41:09.000+02:00
                EffectiveStartDate: 1966-10-20
                UpdatedById: 2c93808457d787030157e02d84c116d5
                Name: ProductRatePlan1476934869186_new
                EffectiveEndDate: 2066-10-20
                Description: Test create product rateplan via API
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Product Rate Plans
      summary: "CRUD: Update ProductRatePlan"
      operationId: Object_PUTProductRatePlan
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyProductRatePlan"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e02da0d91852
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Product Rate Plans
      summary: "CRUD: Delete ProductRatePlan"
      operationId: Object_DELETEProductRatePlan
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e02d9dde184f
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  /v1/object/product-rate-plan-charge:
    post:
      tags:
        - Product Rate Plan Charges
      summary: "CRUD: Create product rate plan charge"
      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_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateProductRatePlanCharge"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e03197714910
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/product-rate-plan-charge/{id}":
    get:
      tags:
        - Product Rate Plan Charges
      summary: "CRUD: Get product rate plan charge"
      operationId: Object_GETProductRatePlanCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: >
            The unique ID of a product rate plan charge to be retrieved. For
            example, 2c93808457d787030157e031fcd34e19.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetProductRatePlanCharge"
            application/json:
              example:
                PriceChangeOption: NoChange
                IncludedUnits: 0
                OverageCalculationOption: EndOfSmoothingPeriod
                Id: 2c93808457d787030157e032002b4e21
                AccountingCode: name_1476935155610
                BillCycleDay: 1
                BillingPeriod: Month
                OverageUnusedUnitsCreditOption: NoCredit
                CreatedById: 2c93808457d787030157e031dd264c85
                RecognizedRevenueAccount: name_1476935155610
                ChargeType: Recurring
                BillCycleType: DefaultFromCustomer
                DefaultQuantity: 1
                UpToPeriodsType: Billing Periods
                ProductRatePlanId: 2c93808457d787030157e031ff054e1e
                Taxable: false
                Description: Recurring Flat Fee Pricing
                LegacyRevenueReporting: false
                ChargeModel: Flat Fee Pricing
                NumberOfPeriod: 1
                BillingTiming: In Advance
                PriceIncreasePercentage: 0
                CreatedDate: 2016-10-20T05:45:55.000+02:00
                DeferredRevenueAccount: name_1476935155610
                UpdatedById: 2c93808457d787030157e031dd264c85
                Name: Recurring_Flat Fee Pricing1476935155610
                ListPriceBase: Per Billing Period
                EndDateCondition: SubscriptionEnd
                TriggerEvent: ContractEffective
                BillingPeriodAlignment: AlignToCharge
                RevenueRecognitionRuleName: Recognize upon invoicing
                UseTenantDefaultForPriceChange: true
                UpdatedDate: 2016-10-20T05:45:55.000+02:00
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Product Rate Plan Charges
      summary: "CRUD: Update product rate plan charge"
      description: |
        Updates the information about a product rate plan charge.
      operationId: Object_PUTProductRatePlanCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: >
            The unique ID of the product rate plan charge to be updated. For
            example, 2c93808457d787030157e031fcd34e19.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyProductRatePlanCharge"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e03197714910
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Product Rate Plan Charges
      summary: "CRUD: Delete product rate plan charge"
      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"
        - name: id
          in: path
          description: >
            The unique ID of the product rate plan charge to be deleted. For
            example, 2c93808457d787030157e031fcd34e19.
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e031fcd34e19
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  "/v1/object/product-rate-plan-charge-tier/{id}":
    get:
      tags:
        - Product Rate Plan Charge Tiers
      summary: "CRUD: Retrieve ProductRatePlanChargeTier"
      operationId: Object_GETProductRatePlanChargeTier
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetProductRatePlanChargeTier"
            application/json:
              example:
                UpdatedById: 2c93808457d787030157e02fd0f132a4
                CreatedById: 2c93808457d787030157e02fd0f132a4
                CreatedDate: 2016-10-20T05:43:38.000+02:00
                UpdatedDate: 2016-10-20T05:43:38.000+02:00
                StartingUnit: 0
                Currency: USD
                EndingUnit: 0
                Id: 2c93808457d787030157e02fe725341f
                PriceFormat: Flat Fee
                Tier: 1
                Price: 30
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Product Rate Plan Charge Tiers
      summary: "CRUD: Update ProductRatePlanChargeTier"
      description: >
        Updates the price of a product rate plan charge tier.


        To make other updates to product rate plan charge tiers, use [CRUD: Update 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_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: >
            The unique ID of the product rate plan charge tier to be updated.
            For example, 2c92c0f86c85891e016c88d55a6e543b.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyProductRatePlanChargeTier"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c92c0f86c85891e016c88d55a6e543b
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
  "/v1/object/rate-plan/{id}":
    get:
      tags:
        - Rate Plans
      summary: "CRUD: Retrieve RatePlan"
      operationId: Object_GETRatePlan
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRatePlan"
            application/json:
              example:
                UpdatedById: 2c93808457d787030157e02ea77723ef
                UpdatedDate: 2016-10-20T05:42:24.000+02:00
                Id: 2c93808457d787030157e02ec54f259e
                CreatedById: 2c93808457d787030157e02ea77723ef
                CreatedDate: 2016-10-20T05:42:24.000+02:00
                Name: ProductRatePlan1476934943281
                AmendmentId: 2c93808457d787030157e02ec4b42599
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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/rate-plan-charge/{id}":
    get:
      tags:
        - Rate Plan Charges
      summary: "CRUD: Get rate plan charge"
      operationId: Object_GETRatePlanCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRatePlanCharge"
            application/json:
              example:
                PriceChangeOption: NoChange
                OverageCalculationOption: EndOfSmoothingPeriod
                Id: 2c93808457d787030157e02f9b802fad
                ChargeNumber: C-00000001
                BillingPeriodAlignment: AlignToCharge
                UpdatedDate: 2016-10-20T05:43:19.000+02:00
                Version: 1
                BillCycleDay: 1
                BillingPeriod: Month
                IsLastSegment: true
                UpToPeriodsType: Billing Periods
                UpdatedById: 2c93808457d787030157e02f84852e27
                Quantity: 1
                EndDateCondition: SubscriptionEnd
                Segment: 1
                RatePlanId: 2c93808457d787030157e02f9b762fac
                ChargeModel: Flat Fee Pricing
                TriggerEvent: ContractEffective
                BillingTiming: In Arrears
                CreatedById: 2c93808457d787030157e02f84852e27
                CreatedDate: 2016-10-20T05:43:18.000+02:00
                Name: Recurring_Flat Fee Pricing1476934998566
                ChargeType: Recurring
                OverageUnusedUnitsCreditOption: NoCredit
                OriginalId: 2c93808457d787030157e02f9b802fad
                ListPriceBase: Per Billing Period
                PriceIncreasePercentage: 0
                NumberOfPeriods: 1
                BillCycleType: DefaultFromCustomer
                Description: Recurring Flat Fee Pricing
                AccountingCode: name_1476934998566
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Rate Plan Charges
      summary: "CRUD: Update rate plan charge"
      operationId: Object_PUTRatePlanCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyRatePlanCharge"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c92c0f86a79e2e4016a8bad616b257c
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
  "/v1/object/rate-plan-charge-tier/{id}":
    get:
      tags:
        - Rate Plan Charge Tiers
      summary: "CRUD: Retrieve RatePlanChargeTier"
      operationId: Object_GETRatePlanChargeTier
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRatePlanChargeTier"
            application/json:
              example:
                UpdatedById: 2c93808457d787030157e02da3161854
                CreatedById: 2c93808457d787030157e02da3161854
                Price: 30
                UpdatedDate: 2016-10-20T05:41:16.000+02:00
                StartingUnit: 0
                EndingUnit: 0
                Id: 2c93808457d787030157e02dbecc19d8
                CreatedDate: 2016-10-20T05:41:16.000+02:00
                PriceFormat: Flat Fee
                Tier: 1
                RatePlanChargeId: 2c93808457d787030157e02dbee919da
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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/refund:
    post:
      tags:
        - Refunds
      summary: "CRUD: Create refund"
      operationId: Object_POSTRefund
      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/ProxyCreateRefund"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e03198c84918
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/refund/{id}":
    get:
      tags:
        - Refunds
      summary: "CRUD: Get refund"
      operationId: Object_GETRefund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRefund"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Refunds
      summary: "CRUD: Update refund"
      operationId: Object_PUTRefund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyRefund"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e03198c84918
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Refunds
      summary: "CRUD: Delete refund"
      operationId: Object_DELETERefund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e03198c84918
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  "/v1/object/refund-invoice-payment/{id}":
    get:
      tags:
        - Refund Invoice Payments
      summary: "CRUD: Retrieve RefundInvoicePayment"
      operationId: Object_GETRefundInvoicePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRefundInvoicePayment"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Refund Transaction Logs
      summary: "CRUD: Retrieve RefundTransactionLog"
      operationId: Object_GETRefundTransactionLog
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRefundTransactionLog"
            application/json:
              example:
                GatewayReasonCodeDescription: This transaction has been approved by Test gateway.
                Id: 2c93808457d787030157e0304c0538f2
                TransactionId: "9036150.175338026"
                GatewayState: Submitted
                GatewayReasonCode: approve
                TransactionDate: 2016-10-20T05:44:04.000+02:00
                Gateway: TEST gateway name1476935035677
                RefundId: 2c93808457d787030157e0304bf638f0
                GatewayTransactionType: Refund
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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/subscription/{id}":
    get:
      tags:
        - Subscriptions
      summary: "CRUD: Retrieve Subscription"
      operationId: Object_GETSubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetSubscription"
            application/json:
              example:
                TermStartDate: 2018-05-10
                Id: 2c92c0fa6343984c0163498b71fe04be
                UpdatedDate: 2018-05-11T11:38:03.000+08:00
                Version: 1
                AutoRenew: false
                SubscriptionStartDate: 2018-05-10
                InitialTerm: 12
                InitialTermPeriodType: Month
                AccountId: 2c92c0fa6343984c0163498b71a604b2
                IsInvoiceSeparate: false
                CurrentTermPeriodType: Month
                CurrentTerm: 12
                RenewalTermPeriodType: Month
                ContractEffectiveDate: 2018-05-10
                UpdatedById: 2c92c0f9631b0084016323ec8720683d
                ContractAcceptanceDate: 2018-05-10
                CreatedById: 2c92c0f9631b0084016323ec8720683d
                CreatedDate: 2018-05-10T18:14:25.000+08:00
                Name: A-S00000177
                Status: Expired
                ServiceActivationDate: 2018-05-10
                OriginalId: 2c92c0fa6343984c0163498b71fe04be
                RenewalTerm: 12
                TermEndDate: 2019-05-10
                TermType: TERMED
                RenewalSetting: RENEW_WITH_SPECIFIC_TERM
                OriginalCreatedDate: 2018-05-10T18:14:25.000+08:00
                SubscriptionEndDate: 2019-05-10
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Subscriptions
      summary: "CRUD: Update Subscription"
      operationId: Object_PUTSubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifySubscription"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e02ea04123cf
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      x-code-samples:
        - lang: Curl
          source: >-
            curl -X PUT -H "Authorization: Bearer
            6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type:
            application/json" -d '{
                "Id": "2c93808457d787030157e02ea04123cf", 
                "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('{
                "Id": "2c93808457d787030157e02ea04123cf", 
                "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    \"Id\": \"2c93808457d787030157e02ea04123cf\", \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    \"Id\": \"2c93808457d787030157e02ea04123cf\", \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    \"Id\": \"2c93808457d787030157e02ea04123cf\", \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    \"Id\": \"2c93808457d787030157e02ea04123cf\", \n    \"Name\": \"S_1476934934547_name\", \n    \"Notes\": \"this is notes_new\"\n}", ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Subscriptions
      summary: "CRUD: Delete Subscription"
      operationId: Object_DELETESubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
            application/json:
              example:
                success: true
                id: 2c93808457d787030157e02ea04123cf
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  "/v1/object/subscription-product-feature/{id}":
    get:
      tags:
        - Subscription Product Features
      summary: "CRUD: Retrieve SubscriptionProductFeature"
      operationId: Object_GETSubscriptionProductFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetSubscriptionProductFeature"
            application/json:
              example:
                RatePlanId: 2c93808457d787030157e0316ae64769
                Id: 2c93808457d787030157e0316ae7476a
                CreatedById: 2c93808457d787030157e03151e845e3
                CreatedDate: 2016-10-20T05:45:17.000+02:00
                Name: name_1476935116658
                FeatureCode: feature_code_1476935116658
                FeatureId: 2c93808457d787030157e03167fe4758
                UpdatedDate: 2016-10-20T05:45:18.000+02:00
                UpdatedById: 2c93808457d787030157e03151e845e3
                Description: update description
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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/taxation-item:
    post:
      tags:
        - Taxation Items
      summary: "CRUD: Create TaxationItem"
      operationId: Object_POSTTaxationItem
      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/ProxyCreateTaxationItem"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e0306f413a96
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/taxation-item/{id}":
    get:
      tags:
        - Taxation Items
      summary: "CRUD: Retrieve TaxationItem"
      operationId: Object_GETTaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetTaxationItem"
            application/json:
              example:
                Jurisdiction: test
                InvoiceItemId: 2c93808457d787030157e0306cd43a88
                Id: 2c93808457d787030157e0306f413a96
                AccountingCode: Usage Revenue
                UpdatedDate: 2016-10-20T05:44:13.000+02:00
                TaxCode: taxcode
                LocationCode: code - 001
                CreatedById: 2c93808457d787030157e0304e2f38f8
                CreatedDate: 2016-10-20T05:44:13.000+02:00
                Name: test
                TaxCodeDescription: description
                TaxRateDescription: test
                TaxAmount: 3
                UpdatedById: 2c93808457d787030157e0304e2f38f8
                ExemptAmount: 50
                TaxRate: 3
                TaxRateType: FlatFee
                TaxDate: 2016-10-20
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Taxation Items
      summary: "CRUD: Update TaxationItem"
      operationId: Object_PUTTaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyTaxationItem"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Taxation Items
      summary: "CRUD: Delete TaxationItem"
      operationId: Object_DELETETaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  /v1/object/unit-of-measure:
    post:
      tags:
        - Unit Of Measure
      summary: "CRUD: Create UnitOfMeasure"
      operationId: Object_POSTUnitOfMeasure
      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/ProxyCreateUnitOfMeasure"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e030232f3748
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/unit-of-measure/{id}":
    get:
      tags:
        - Unit Of Measure
      summary: "CRUD: Retrieve UnitOfMeasure"
      operationId: Object_GETUnitOfMeasure
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetUnitOfMeasure"
            application/json:
              example:
                Active: true
                Id: 2c93808457d787030157e030232f3748
                CreatedById: 2c93808457d787030157e0300f6735d3
                CreatedDate: 2016-10-20T05:43:53.000+02:00
                UpdatedDate: 2016-10-20T05:43:53.000+02:00
                DisplayedAs: name_display_name_1476935033519
                UomName: name_1476935033519
                RoundingMode: UP
                UpdatedById: 2c93808457d787030157e0300f6735d3
                DecimalPlaces: 9
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Unit Of Measure
      summary: "CRUD: Update UnitOfMeasure"
      operationId: Object_PUTUnitOfMeasure
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyUnitOfMeasure"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Unit Of Measure
      summary: "CRUD: Delete UnitOfMeasure"
      operationId: Object_DELETEUnitOfMeasure
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
  /v1/object/usage:
    post:
      tags:
        - Usage
      summary: "CRUD: Create usage"
      operationId: Object_POSTUsage
      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/ProxyCreateUsage"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
            application/json:
              example:
                Success: true
                Id: 2c93808457d787030157e02e0a301d0a
        "400":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
            application/json:
              example:
                Errors:
                  - Code: INVALID_VALUE
                    Message: The account number 123xProxy is invalid.
                Success: false
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: CreateRequest
  "/v1/object/usage/{id}":
    get:
      tags:
        - Usage
      summary: "CRUD: Get usage"
      operationId: Object_GETUsage
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: fields
          in: query
          description: Object fields to return
          schema:
            type: string
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetUsage"
            application/json:
              example:
                AccountNumber: A00000030
                Id: 2c92c0f86bf50ca0016c040309316ca4
                ChargeNumber: C-00000229
                StartDateTime: 2017-12-01T23:41:36.000+08:00
                SubscriptionId: 2c92c0f956bc8fcb0156d5039e0a5aa0
                ChargeId: 2c92c0f956bc8fcb0156d5039e275aa9
                AccountId: 2c92c0f956bc8fb40156d502fc3718b1
                Quantity: 9
                Description: test
                SubscriptionNumber: A-S00000100
                CreatedById: 2c92c0f958fffd7d015914aeefc71a5d
                CreatedDate: 2019-07-18T15:36:43.000+08:00
                RbeStatus: Pending
                SubmissionDateTime: 2019-07-18T15:36:43.000+08:00
                SourceType: API
                UOM: Each
                UpdatedDate: 2019-07-18T15:36:43.000+08:00
                UpdatedById: 2c92c0f958fffd7d015914aeefc71a5d
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
        "404":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
            application/json:
              example:
                records: {}
                size: 0
                done: true
      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:
      tags:
        - Usage
      summary: "CRUD: Update usage"
      operationId: Object_PUTUsage
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyUsage"
        required: true
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
      x-codegen-request-body-name: ModifyRequest
    delete:
      tags:
        - Usage
      summary: "CRUD: Delete usage"
      operationId: Object_DELETEUsage
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - name: id
          in: path
          description: Object id
          required: true
          schema:
            type: string
      responses:
        "200":
          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
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
        "401":
          description: ""
          headers:
            WWW-Authenticate:
              description: >
                The value of this header is:


                ```

                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API

                ```
              schema:
                type: string
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer
                    realm=Zuora API
            Zuora-Request-Id:
              description: >
                The Zuora internal identifier of the API call. You cannot
                control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: >
                A custom identifier for tracing the API call. If you specified a
                tracing identifier in the request headers, Zuora returns the
                same tracing identifier. Otherwise, Zuora does not set this
                header.
              schema:
                maxLength: 64
                type: string
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
            application/json:
              example:
                message: Authentication error
      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);
components:
  schemas:
    Account:
      allOf:
        - required:
            - billCycleDay
            - billToContact
            - currency
            - name
          type: object
          properties:
            accountNumber:
              maxLength: 70
              type: string
            additionalEmailAddresses:
              maxLength: 1200
              type: string
              description: >
                List of additional email addresses to receive emailed invoices.
                Values should be a comma-separated list of email addresses.
            allowInvoiceEdit:
              type: boolean
              description: |
                Indicates if associated invoices can be edited.
                Values are: 

                * `true`
                * `false` (default)
            autoPay:
              type: boolean
              description: Specifies whether future payments are to be automatically billed
                when they are due. Possible values are `true`, `false`.
            batch:
              type: string
            billCycleDay:
              maximum: 31
              minimum: 0
              type: integer
              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".
            billToContact:
              $ref: "#/components/schemas/BillToContactPostOrder"
            communicationProfileId:
              type: string
            creditCard:
              $ref: "#/components/schemas/creditCard"
            creditMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
            crmId:
              maxLength: 100
              type: string
            currency:
              type: string
              description: 3 uppercase character currency code
            customFields:
              $ref: "#/components/schemas/AccountObjectCustomFields"
            customerServiceRepName:
              maxLength: 50
              type: string
              description: >
                Name of the account's customer service representative, if
                applicable.
            debitMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
            hpmCreditCardPaymentMethodId:
              type: string
            invoiceDeliveryPrefsEmail:
              type: boolean
              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.
            invoiceDeliveryPrefsPrint:
              type: boolean
              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.
            invoiceTemplateId:
              type: string
            name:
              maxLength: 255
              type: string
            notes:
              maxLength: 65535
              type: string
            parentId:
              type: string
              description: Identifier of the parent customer account for this Account object.
                Use this field if you have customer hierarchy enabled.
            paymentGateway:
              maxLength: 40
              type: string
            paymentMethod:
              $ref: "#/components/schemas/PaymentMethod"
            paymentTerm:
              type: string
            purchaseOrderNumber:
              maxLength: 100
              type: string
              description: >
                The number of the purchase order associated with this account.
                Purchase order information generally comes from customers.
            salesRep:
              maxLength: 50
              type: string
              description: >
                The name of the sales representative associated with this
                account, if applicable.
            sequenceSetId:
              type: string
              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.
            soldToContact:
              $ref: "#/components/schemas/SoldToContactPostOrder"
            taxInfo:
              $ref: "#/components/schemas/TaxInfo"
          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.
        - $ref: "#/components/schemas/DataAccessControlField"
    AccountCreditCardHolder:
      type: object
      properties:
        addressLine1:
          maxLength: 255
          type: string
          description: |
            First line of the cardholder's address.
        addressLine2:
          maxLength: 255
          type: string
          description: |
            Second line of the cardholder's address.
        cardHolderName:
          maxLength: 50
          type: string
          description: >
            Full name of the cardholder as it appears on the card. For example,
            "John J Smith".
        city:
          maxLength: 40
          type: string
          description: |
            City of the cardholder's address.
        country:
          maxLength: 64
          type: string
          description: >
            Country of the cardholder's address. The value of this field must be
            a valid country name or abbreviation.
        email:
          maxLength: 80
          type: string
          description: |
            Email address of the cardholder.
        phone:
          maxLength: 40
          type: string
          description: |
            Phone number of the cardholder.
        state:
          maxLength: 50
          type: string
          description: |
            State or province of the cardholder's address.
        zipCode:
          maxLength: 20
          type: string
          description: |
            ZIP code or other postal code of the cardholder's address.
      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.
    AccountObjectCustomFields:
      title: accountFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    AccountObjectNSFields:
      title: accountFieldsNetSuite
      type: object
      properties:
        Class__NS:
          maxLength: 255
          type: string
          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).
        CustomerType__NS:
          type: string
          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
        Department__NS:
          maxLength: 255
          type: string
          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).
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        Location__NS:
          maxLength: 255
          type: string
          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).
        Subsidiary__NS:
          maxLength: 255
          type: string
          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).
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
        SynctoNetSuite__NS:
          type: string
          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
      description: >
        Container for Account fields provided by the [Zuora Connector for
        NetSuite](https://www.zuora.com/connect/app/?appId=265).
    AccountingCodeObjectCustomFields:
      title: accountingCodeFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    AccountingPeriodObjectCustomFields:
      title: accountingPeriodFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    ActionAmendInvoiceData:
      type: object
      properties:
        Invoice:
          $ref: "#/components/schemas/Invoice"
        InvoiceItem:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/ActionAmendInvoiceItem"
    ActionAmendInvoiceItem:
      type: object
      properties:
        AccountingCode:
          type: string
          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` 
        AppliedToInvoiceItemId:
          type: string
          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 
        ChargeAmount:
          type: number
          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
        ChargeDate:
          type: string
          description: |-2
             The date when the Invoice Item is created .


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
        ChargeDescription:
          type: string
          description: |-2
             A description of the invoice item's charge.


            **Character limit**: 500

            **Values**: inherited from `RatePlanCharge.Description` 
        ChargeId:
          type: string
          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` 
        ChargeName:
          type: string
          description: |-2
             The name of the invoice item's charge.
            **Character limi**t: 50

            **Values: **inherited from `RatePlanCharge.Name` 
        ChargeNumber:
          type: string
          description: |-2
             The unique identifier of the invoice item's charge.


            **Character limit:** 50

            **Values:** inherited from `RatePlanCharge.ChargeNumber` 
        ChargeType:
          type: string
          description: |2
             Specifies the type of charge.


            **Character limit**: 9

            **Values**: one of the following:

            - `OneTime`
            - `Recurring`
            - `Usage`
        CreatedById:
          type: string
          description: |-2
             The user ID of the person who created the invoice item.


            **Character limit**: 32

            **Values**: automatically generated 
        CreatedDate:
          type: string
          description: |-2
             The date the invoice item was created.


            **Character limit:** 29

            **Values**: automatically generated 
          format: date-time
        InvoiceId:
          type: string
          description: |-2
             The ID of the invoice that's associated with this invoice item.


            **Character limit**: 32

            **Values**: inherited from `Invoice.Id` 
        ProcessingType:
          type: number
          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
        ProductDescription:
          type: string
          description: |-2
             A description of the product associated with this invoice item.


            **Character limit**: 500

            **Values**: inherited from `Product.Description` 
        ProductId:
          type: string
          description: |-2
             The ID of the product associated with this invoice item.


            **Character limit**: 32

            **Values**: inherited from `Product.Id` 
        ProductName:
          type: string
          description: |-2
             The name of the product associated with this invoice item.


            **Character limit**: 255

            **Values: **inherited from `Product.Name` 
        ProductRatePlanChargeId:
          type: string
          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.
        Quantity:
          type: number
          description: |-2
             The number of units for this invoice item.


            **Values**: inherited from `RatePlanCharge.Quantity` 
          format: double
        RatePlanChargeId:
          type: string
          description: >-2
             The ID of the rate plan charge that's associated with this invoice item.


            **Character limit**: 32


            **Values**: inherited from `RatePlanCharge.Id` 
        RevRecCode:
          type: string
          description: >-2
             Associates this invoice item with a specific revenue recognition code.


            **Character limit**: 32


            **Values**: inherited from `ProductRatePlanCharge.RevRecCode` 
        RevRecStartDate:
          type: string
          description: |-2
             The date when revenue recognition is triggered.


            **Character limit**: 29

            **Values**: generated from `InvoiceItem.RevRecTriggerCondition` 
          format: date
        RevRecTriggerCondition:
          type: string
          description: >-2
             Specifies when revenue recognition begins based on a triggering event.


            **Character limit**:


            **Values**: inherited from `ProductRatePlanCharge`.`RevRecTriggerCondition` 
        SKU:
          type: string
          description: |-2
             The unique SKU for the product associated with this invoice item.


            **Character limit**: 255

            **Values**: inherited from `Product.SKU` 
        ServiceEndDate:
          type: string
          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
        ServiceStartDate:
          type: string
          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
        SubscriptionId:
          type: string
          description: |-2
             The ID of the subscription associated with the invoice item.


            **Character limit**: 32

            **Values**: inherited from `Subscription.Id` 
        SubscriptionNumber:
          type: string
          description: |-2
             The number of the subscription associated with the invoice item.


            **Character limit**:

            **Values**: 
        TaxAmount:
          type: number
          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
        TaxCode:
          type: string
          description: |-2
             Specifies the tax code for taxation rules.


            **Character limit**: 6

            **Values**: inherited from `ProductRatePlanCharge.TaxCode` 
        TaxExemptAmount:
          type: number
          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
        TaxMode:
          type: string
          description: |-2
             The tax mode of the invoice item.


            **Character limit**: 12

            **Values**: `TaxExclusive`, `TaxInclusive` 
        UOM:
          type: string
          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` 
        UnitPrice:
          type: number
          description: >-2
             The per-unit price of the invoice item.


            **Character limit**:


            **Values**: calculated from multiple fields in ProductRatePlanCharge and ProductRatePlanChargeTier objets 
          format: double
        UpdatedById:
          type: string
          description: |-2
             The ID of the user who last updated the invoice item.


            **Character limit**: 32

            **Values**: automatically generated 
        UpdatedDate:
          type: string
          description: |-2
             The date when the invoice item was last updated.


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
    ActionAmendSubscriptionProductFeature:
      type: object
      properties:
        CreatedById:
          type: string
          description: ""
        CreatedDate:
          type: string
          description: >-2
             Date and time when the product feature was added to the subscription.


            **Character limit**: 29


            **Values**: 
          format: date-time
        Description:
          type: string
          description: |-2
             Description of the subscription product feature.


            **Character limit**: 500

            **Values**: 
        FeatureCode:
          type: string
          description: |-2
             Unique code of the feature.


            **Character limit**: 255

            **Values**: 
        FeatureId:
          type: string
          description: |-2
             Internal Zuora ID of the feature.


            **Character limit**: 32

            **Values**: 
        Name:
          type: string
          description: |-2
             Name of the feature.


            **Character limit**: 255

            **Values**: 
        RatePlanId:
          type: string
          description: |-2
             Id of the product rate plan to which the feature belongs.


            **Character limit**: 32

            **Values**: 
        UpdatedById:
          type: string
          description: >-2
             Internal Zuora ID of the user who last updated the subscription product feature.


            **Character limit**: 32


            **Values**: 
        UpdatedDate:
          type: string
          description: >-2
             Date and time when the subscription product feature was last updated.


            **Character limit**: 29


            **Values**: 
          format: date-time
    ActionSubscribeInvoiceData:
      type: object
      properties:
        Invoice:
          $ref: "#/components/schemas/InvoiceDataInvoice"
        InvoiceItem:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/ActionSubscribeInvoiceItem"
    ActionSubscribeInvoiceItem:
      allOf:
        - type: object
          properties:
            AccountingCode:
              type: string
              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` 
            AppliedToChargeNumber:
              type: string
              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 
            AppliedToInvoiceItemId:
              type: string
              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 
            ChargeAmount:
              type: number
              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
            ChargeDate:
              type: string
              description: |-2
                 The date when the Invoice Item is created .


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            ChargeDescription:
              type: string
              description: |-2
                 A description of the invoice item's charge.


                **Character limit**: 500


                **Values**: inherited from `RatePlanCharge.Description` 
            ChargeId:
              type: string
              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` 
            ChargeName:
              type: string
              description: >-2
                 The name of the invoice item's charge.
                **Character limi**t: 50 **Values: **inherited from `RatePlanCharge.Name` 
            ChargeNumber:
              type: string
              description: >-2
                 The unique identifier of the invoice item's charge.
                **Character limit:** 50 **Values:** inherited from `RatePlanCharge.ChargeNumber` 
            ChargeType:
              type: string
              description: |2
                 Specifies the type of charge.


                **Character limit**: 9


                **Values**: one of the following:

                - `OneTime`
                - `Recurring`
                - `Usage`
            CreatedById:
              type: string
              description: |-2
                 The user ID of the person who created the invoice item.


                **Character limit**: 32


                **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-2
                 The date the invoice item was created.
                **Character limit:** 29


                **Values**: automatically generated 
              format: date-time
            InvoiceId:
              type: string
              description: |-2
                 The ID of the invoice that's associated with this invoice item.


                **Character limit**: 32


                **Values**: inherited from `Invoice.Id` 
            ProcessingType:
              type: number
              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
            ProductDescription:
              type: string
              description: |-2
                 A description of the product associated with this invoice item.


                **Character limit**: 500


                **Values**: inherited from `Product.Description` 
            ProductId:
              type: string
              description: |-2
                 The ID of the product associated with this invoice item.


                **Character limit**: 32


                **Values**: inherited from `Product.Id` 
            ProductName:
              type: string
              description: >-2
                 The name of the product associated with this invoice item.


                **Character limit**: 255 **Values: **inherited from `Product.Name` 
            ProductRatePlanChargeId:
              type: string
              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.
            Quantity:
              type: number
              description: |-2
                 The number of units for this invoice item.



                **Values**: inherited from `RatePlanCharge.Quantity` 
              format: double
            RatePlanChargeId:
              type: string
              description: >-2
                 The ID of the rate plan charge that's associated with this invoice item.


                **Character limit**: 32



                **Values**: inherited from `RatePlanCharge.Id` 
            RevRecCode:
              type: string
              description: >-2
                 Associates this invoice item with a specific revenue recognition code.


                **Character limit**: 32



                **Values**: inherited from `ProductRatePlanCharge.RevRecCode` 
            RevRecStartDate:
              type: string
              description: |-2
                 The date when revenue recognition is triggered.


                **Character limit**: 29


                **Values**: generated from `InvoiceItem.RevRecTriggerCondition` 
              format: date
            RevRecTriggerCondition:
              type: string
              description: >-2
                 Specifies when revenue recognition begins based on a triggering event.


                **Character limit**:



                **Values**: inherited from `ProductRatePlanCharge`.`RevRecTriggerCondition` 
            SKU:
              type: string
              description: >-2
                 The unique SKU for the product associated with this invoice item.


                **Character limit**: 255



                **Values**: inherited from `Product.SKU` 
            ServiceEndDate:
              type: string
              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
            ServiceStartDate:
              type: string
              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
            SubscriptionId:
              type: string
              description: |-2
                 The ID of the subscription associated with the invoice item.


                **Character limit**: 32


                **Values**: inherited from `Subscription.Id` 
            SubscriptionNumber:
              type: string
              description: >-2
                 The number of the subscription associated with the invoice item.


                **Character limit**:



                **Values**: 
            TaxAmount:
              type: number
              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
            TaxCode:
              type: string
              description: |-2
                 Specifies the tax code for taxation rules.


                **Character limit**: 6


                **Values**: inherited from `ProductRatePlanCharge.TaxCode` 
            TaxExemptAmount:
              type: number
              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
            TaxMode:
              type: string
              description: |-2
                 The tax mode of the invoice item.


                **Character limit**: 12


                **Values**: `TaxExclusive`, `TaxInclusive` 
            UOM:
              type: string
              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` 
            UnitPrice:
              type: number
              description: >-2
                 The per-unit price of the invoice item.


                **Character limit**:



                **Values**: calculated from multiple fields in ProductRatePlanCharge and ProductRatePlanChargeTier objets 
              format: double
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the invoice item.


                **Character limit**: 32


                **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the invoice item was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/InvoiceItemObjectNSFields"
        - $ref: "#/components/schemas/InvoiceItemObjectCustomFields"
    ActionsErrorResponse:
      type: object
      properties:
        Code:
          type: string
          description: ""
        Message:
          type: string
          description: ""
    AmendRequest:
      required:
        - Amendments
      type: object
      properties:
        AmendOptions:
          type: object
          properties:
            ApplyCreditBalance:
              type: boolean
              description: ""
            ElectronicPaymentOptions:
              $ref: "#/components/schemas/ElectronicPaymentOptions"
            ExternalPaymentOptions:
              $ref: "#/components/schemas/ExternalPaymentOptions"
            GenerateInvoice:
              type: boolean
              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`.
            InvoiceProcessingOptions:
              $ref: "#/components/schemas/InvoiceProcessingOptions"
            ProcessPayments:
              type: boolean
              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 feature enabled, Zuora does not support using this field to collect payments against invoices.
          description: >
            Use the `AmendOptions` container to specify billing options, such as
            invoice generation and when to process payments.
        Amendments:
          type: array
          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"
        PreviewOptions:
          type: object
          properties:
            EnablePreviewMode:
              type: boolean
              description: " Determines whether to create an amendment or display a preview of
                the change."
            IncludeExistingDraftInvoiceItems:
              type: boolean
              description: " Specifies whether to include draft invoice items in amendment
                previews."
            NumberOfPeriods:
              type: integer
              description: " Indicates the number of invoice periods to show in a preview."
              format: int32
            PreviewThroughTermEnd:
              type: boolean
              description: " Request to preview the charge through the end of the subscription
                term."
            PreviewType:
              type: string
              description: " The type of preview you will receive from a preview request."
          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.
    AmendResult:
      type: object
      properties:
        AmendmentIds:
          type: array
          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
        ChargeMetricsData:
          $ref: "#/components/schemas/ChargeMetricsData"
        Errors:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/ActionsErrorResponse"
        GatewayResponse:
          type: string
          description: ""
        GatewayResponseCode:
          type: string
          description: ""
        InvoiceDatas:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/ActionAmendInvoiceData"
        InvoiceId:
          type: string
          description: ""
        PaymentId:
          type: string
          description: ""
        PaymentTransactionNumber:
          type: string
          description: ""
        SubscriptionId:
          type: string
          description: ""
        Success:
          type: boolean
          description: ""
        TotalDeltaMrr:
          type: number
          description: ""
          format: double
        TotalDeltaTcv:
          type: number
          description: ""
          format: double
    Amendment:
      required:
        - ContractEffectiveDate
        - Name
        - SubscriptionId
        - Type
      type: object
      properties:
        AutoRenew:
          type: boolean
          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 
        Code:
          type: string
          description: |2
             A unique alphanumeric string that identifies the amendment.


            **Character limit**: 50

            **Values**: automatically generated
        ContractEffectiveDate:
          type: string
          description: >2
             The date when the amendment's changes become effective for billing purposes.
          format: date
        CreatedById:
          type: string
          description: |-2
             The user ID of the person who created the amendment.


            **Character limit**: 32

            **Values**: automatically generated 
        CreatedDate:
          type: string
          description: |-2
             The date when the amendment was created.


            **Values**: automatically generated 
          format: date-time
        CurrentTerm:
          type: integer
          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
        CurrentTermPeriodType:
          type: string
          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.
        CustomerAcceptanceDate:
          type: string
          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
        Description:
          type: string
          description: |-2
             A description of the amendment.


            **Character limit**: 500

            **Values**: maximum 500 characters 
        DestinationAccountId:
          type: string
          description: >-2
             The ID of the subscription owner that the subscription is being transferred to.


            **Character limit**: 32


            **Values**: a valid account ID 
        DestinationInvoiceOwnerId:
          type: string
          description: >-2
             The ID of the invoice owner that the subscription is being transferred to.


            **Character limit**: 32


            **Values**: a valid invoice ID 
        EffectiveDate:
          type: string
          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
        Name:
          type: string
          description: |-2
             The name of the amendment.


            **Character limit**: 100

            **Values**: a string of 100 characters or fewer 
        RatePlanData:
          required:
            - RatePlan
          type: object
          properties:
            RatePlan:
              $ref: "#/components/schemas/RatePlan"
            RatePlanChargeData:
              type: array
              description: ""
              items:
                $ref: "#/components/schemas/RatePlanChargeDataInRatePlanData"
            SubscriptionProductFeatureList:
              $ref: "#/components/schemas/SubscriptionProductFeatureList"
          description: >
            A container for one `RatePlanData`. This field is only required if
            the `Type` field is set to `NewProduct`, `RemoveProduct`, or
            `UpdateProduct`.
        RenewalSetting:
          type: string
          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 
        RenewalTerm:
          type: integer
          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
        RenewalTermPeriodType:
          type: string
          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`
        ResumeDate:
          type: string
          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.


            **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/).
          format: date
        ServiceActivationDate:
          type: string
          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
        SpecificUpdateDate:
          type: string
          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
        Status:
          type: string
          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
        SubscriptionId:
          type: string
          description: |-2
             The ID of the subscription that the amendment changes.


            **Character limit**: 32

            **Values**: a valid subscription ID 
        SuspendDate:
          type: string
          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.


            **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/).
          format: date
        TermStartDate:
          type: string
          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
        TermType:
          type: string
          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:
          type: string
          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 (This value is in **Limited Availability**.)

            - ResumeSubscription (This value is in **Limited Availability**.)
        UpdatedById:
          type: string
          description: |-2
             The ID of the user who last updated the amendment.


            **Character limit**: 32

            **Values**: automatically generated 
        UpdatedDate:
          type: string
          description: |-2
             The date when the amendment was last updated.


            **Values**: automatically generated 
          format: date-time
    AmendmentObjectCustomFields:
      title: amendmentFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    AmendmentRatePlanChargeData:
      required:
        - RatePlanCharge
      type: object
      properties:
        RatePlanCharge:
          $ref: "#/components/schemas/AmendmentRatePlanChargeDataRatePlanCharge"
        RatePlanChargeTier:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/AmendmentRatePlanChargeTier"
    AmendmentRatePlanChargeDataRatePlanCharge:
      title: RatePlanCharge
      allOf:
        - required:
            - ProductRatePlanChargeId
          type: object
          properties:
            BillCycleType:
              type: string
              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. 
            BillingPeriod:
              type: string
              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. 
            BillingTiming:
              type: string
              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/).

            ChargeNumber:
              type: string
              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
            DiscountAmount:
              type: string
              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
            DiscountPercentage:
              type: string
              description: " Query Filter "
              format: decimal
            EndDateCondition:
              type: string
              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. 
            ListPriceBase:
              type: string
              description: |
                The list price base for the product rate plan charge.


                **Values**: one of the following:

                - `Per Month`
                - `Per Billing Period`
                - `Per Week`
            Price:
              type: string
              description: " Query Filter "
              format: decimal
            PriceChangeOption:
              type: string
              description: >2
                 Applies an automatic price change when a termed subscription is renewed.


                **Character limit**:



                **Values**: one of the following:


                - `NoChange` (default)

                - `SpecificPercentageValue`

                - `UseLatestProductCatalogPricing`
            PriceIncreasePercentage:
              type: string
              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
            ProductRatePlanChargeId:
              type: string
              description: ""
            Quantity:
              type: number
              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
            RatingGroup:
              type: string
              description: >
                Specifies a rating group based on which usage records are rated.
                **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/).


                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`.
            RevRecCode:
              type: string
              description: >-2
                 Associates this product rate plan charge with a specific revenue recognition code.


                **Character limit**: 70



                **Values**: a valid revenue recognition code 
            RevRecTriggerCondition:
              type: string
              description: |+2
                 Specifies when revenue recognition begins.


                **Character limit**: 22


                **Values**: one of the following:

                -  `ContractEffectiveDate`

                -  `ServiceActivationDate`

                -  `CustomerAcceptanceDate`

            RevenueRecognitionRuleName:
              type: string
              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 
            SpecificBillingPeriod:
              type: integer
              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
            SpecificEndDate:
              type: string
              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
            TriggerDate:
              type: string
              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
            TriggerEvent:
              type: string
              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.
            UpToPeriods:
              type: integer
              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
            UpToPeriodsType:
              type: string
              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`.
            WeeklyBillCycleDay:
              type: string
              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`
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
    AmendmentRatePlanChargeTier:
      required:
        - RatePlanChargeId
      type: object
      properties:
        PriceFormat:
          type: string
          description: |-2
             Indicates if the price is a flat fee or is per unit.


            **Character limit**: 8


            **Values**: `Flat Fee`, `Per Unit` 
        RatePlanChargeId:
          type: string
          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` 
    ApplyCreditMemoType:
      type: object
      properties:
        debitMemos:
          type: array
          description: |
            Container for debit memos that the credit memo is applied to.
          items:
            $ref: "#/components/schemas/CreditMemoApplyDebitMemoRequestType"
        effectiveDate:
          type: string
          description: |
            The date when the credit memo is applied.
          format: date
        invoices:
          type: array
          description: |
            Container for invoices that the credit memo is applied to.
          items:
            $ref: "#/components/schemas/CreditMemoApplyInvoiceRequestType"
      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
    ApplyPaymentType:
      type: object
      properties:
        debitMemos:
          type: array
          description: |
            Container for debit memos.
          items:
            $ref: "#/components/schemas/PaymentDebitMemoApplicationApplyRequestType"
        effectiveDate:
          type: string
          description: >
            The date when the payment application takes effect, in `yyyy-mm-dd`
            format.
          format: date
        invoices:
          type: array
          description: |
            Container for invoices.
          items:
            $ref: "#/components/schemas/PaymentInvoiceApplicationApplyRequestType"
      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
    BadRequestResponse:
      type: object
      properties:
        Errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: The error code.
              status:
                type: string
                description: The status of the response.
              title:
                type: string
                description: The reason for the error.
    BatchDebitMemoType:
      title: debitMemos
      type: object
      properties:
        dueDate:
          type: string
          description: >
            The date by which the payment for the debit memo is due, in
            `yyyy-mm-dd` format.
          format: date
        id:
          type: string
          description: |
            The ID of the debit memo to be updated.
    BatchInvoiceType:
      title: invoices
      type: object
      properties:
        autoPay:
          type: boolean
          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.
        dueDate:
          type: string
          description: |
            The date by which the payment for this invoice is due. 
          format: date
        id:
          type: string
          description: |
            The ID of the invoice to be updated.
        invoiceDate:
          type: string
          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
        transferredToAccounting:
          type: string
          description: >
            Whether the invoice was transferred to an external accounting system.
          enum:
            - Processing
            - Yes
            - Error
            - Ignore
    BillToContact:
      allOf:
        - required:
            - firstName
            - lastName
          type: object
          properties:
            address1:
              maxLength: 255
              type: string
              description: >
                First line of the contact's address. This is often a street
                address or a business name.
            address2:
              maxLength: 255
              type: string
              description: |
                Second line of the contact's address.
            city:
              maxLength: 40
              type: string
              description: |
                City of the contact's address.
            country:
              maxLength: 64
              type: string
              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.
            county:
              maxLength: 32
              type: string
              description: |
                County of the contact's address.
            fax:
              maxLength: 40
              type: string
              description: |
                Fax number of the contact.
            firstName:
              maxLength: 100
              type: string
              description: |
                First name of the contact.
            homePhone:
              maxLength: 40
              type: string
              description: |
                Home phone number of the contact.
            lastName:
              maxLength: 100
              type: string
              description: |
                Last name of the contact.
            mobilePhone:
              maxLength: 40
              type: string
              description: |
                Mobile phone number of the contact.
            nickname:
              maxLength: 100
              type: string
              description: |
                Nickname of the contact.
            otherPhone:
              maxLength: 40
              type: string
              description: >
                Additional phone number of the contact. Use the `otherPhoneType`
                field to specify the type of phone number.
            otherPhoneType:
              type: string
              description: |
                Specifies the type of phone number in the `otherPhone` field.
              enum:
                - Work
                - Mobile
                - Home
                - Other
            personalEmail:
              maxLength: 80
              type: string
              description: |
                Personal email address of the contact.
              format: email
            postalCode:
              maxLength: 20
              type: string
              description: |
                ZIP code or other postal code of the contact's address.
            state:
              maxLength: 40
              type: string
              description: |
                State or province of the contact's address.
            taxRegion:
              maxLength: 32
              type: string
              description: >
                Region defined in your taxation rules. Only applicable if you
                use Zuora Tax.
            workEmail:
              maxLength: 80
              type: string
              description: |
                Business email address of the contact.
              format: email
            workPhone:
              maxLength: 40
              type: string
              description: |
                Business phone number of the contact.
          description: |
            Contact details associated with an account.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    BillToContactPostOrder:
      allOf:
        - required:
            - firstName
            - lastName
          type: object
          properties:
            address1:
              maxLength: 255
              type: string
              description: >
                First line of the contact's address. This is often a street
                address or a business name.
            address2:
              maxLength: 255
              type: string
              description: |
                Second line of the contact's address.
            city:
              maxLength: 40
              type: string
              description: |
                City of the contact's address.
            contactDescription:
              maxLength: 100
              type: string
              description: |
                A description for the contact.
            country:
              maxLength: 64
              type: string
              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.
            county:
              maxLength: 32
              type: string
              description: |
                County of the contact's address.
            fax:
              maxLength: 40
              type: string
              description: |
                Fax number of the contact.
            firstName:
              maxLength: 100
              type: string
              description: |
                First name of the contact.
            homePhone:
              maxLength: 40
              type: string
              description: |
                Home phone number of the contact.
            lastName:
              maxLength: 100
              type: string
              description: |
                Last name of the contact.
            mobilePhone:
              maxLength: 40
              type: string
              description: |
                Mobile phone number of the contact.
            nickname:
              maxLength: 100
              type: string
              description: |
                Nickname of the contact.
            otherPhone:
              maxLength: 40
              type: string
              description: >
                Additional phone number of the contact. Use the `otherPhoneType`
                field to specify the type of phone number.
            otherPhoneType:
              type: string
              description: |
                Specifies the type of phone number in the `otherPhone` field.
              enum:
                - Work
                - Mobile
                - Home
                - Other
            personalEmail:
              maxLength: 80
              type: string
              description: |
                Personal email address of the contact.
              format: email
            postalCode:
              maxLength: 20
              type: string
              description: |
                ZIP code or other postal code of the contact's address.
            state:
              maxLength: 40
              type: string
              description: |
                State or province of the contact's address.
            taxRegion:
              maxLength: 32
              type: string
              description: >
                Region defined in your taxation rules. Only applicable if you
                use Zuora Tax.
            workEmail:
              maxLength: 80
              type: string
              description: |
                Business email address of the contact.
              format: email
            workPhone:
              maxLength: 40
              type: string
              description: |
                Business phone number of the contact.
          description: |
            Contact details associated with an account.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    BillingDocumentQueryResponseElementType:
      type: object
      properties:
        documents:
          type: array
          description: |
            Container for billing documents.
          items:
            $ref: "#/components/schemas/GETBillingDocumentsResponseType"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    BillingOptions:
      type: object
      properties:
        documentDate:
          type: string
          format: date
        targetDate:
          type: string
          format: date
    BillingPreviewResult:
      type: object
      properties:
        accountId:
          type: string
          description: |
            ID of the customer account to which the billing preview applies.
        creditMemoItems:
          type: array
          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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
          items:
            $ref: "#/components/schemas/POSTBillingPreviewCreditMemoItem"
        invoiceItems:
          type: array
          description: >
            An array of invoice items returned as the result of the billing
            preview request.
          items:
            $ref: "#/components/schemas/POSTBillingPreviewInvoiceItem"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    BillingUpdate:
      type: object
      properties:
        billingPeriodAlignment:
          type: string
          enum:
            - AlignToCharge
            - AlignToSubscriptionStart
            - AlignToTermStart
    BodyInSettingValueReponse:
      title: settingsResponseBody
      type: object
      description: Response body if the request is executed successfully.
    BodyInSettingValueRequest:
      title: settingsRequestBody
      type: object
      description: Request payload if any
    CalloutAuth:
      type: object
      properties:
        domain:
          type: string
          description: The domain of the callout auth.
        password:
          type: string
          description: The field is required when requiredAuth is true.
        preemptive:
          type: boolean
          description: Set this field to `true` if you want to enable the preemptive
            authentication.
        username:
          type: string
          description: The field is required when requiredAuth is true.
      description: If requiredAuth is true, this object is required.
    CalloutMergeFields:
      title: calloutParams
      type: object
      additionalProperties:
        type: string
        description: >
          The key is the parameter name. The value is a merge field with angle
          brackets.
      description: |
        A key-value map of merge fields of this callout.
    CancelSubscription:
      title: cancelSubscription
      required:
        - cancellationPolicy
      type: object
      properties:
        cancellationEffectiveDate:
          type: string
          format: date
        cancellationPolicy:
          type: string
          enum:
            - EndOfCurrentTerm
            - EndOfLastInvoicePeriod
            - SpecificDate
      description: |
        Information about an order action of type `CancelSubscription`.
    ChargeMetricsData:
      type: object
      properties:
        ChargeMetrics:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/NewChargeMetrics"
    ChargeOverride:
      title: charge
      required:
        - productRatePlanChargeId
      type: object
      properties:
        billing:
          type: object
          properties:
            billCycleDay:
              maximum: 31
              minimum: 0
              type: integer
              description: >
                Day of the month that each billing period begins on. Only
                applicable if the value of the `billCycleType` field is
                `SpecificDayofMonth`.
            billCycleType:
              type: string
              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
            billingPeriod:
              type: string
              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
            billingPeriodAlignment:
              type: string
              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
            billingTiming:
              type: string
              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
            specificBillingPeriod:
              type: integer
              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`.
            weeklyBillCycleDay:
              type: string
              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
          description: |
            Billing information about the charge.
        chargeNumber:
          maxLength: 50
          type: string
          description: |
            Charge number of the charge. For example, C-00000307.

            If you do not set this field, Zuora will generate the charge number.
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          maxLength: 500
          type: string
          description: |
            Description of the charge.
        endDate:
          $ref: "#/components/schemas/EndConditions"
        pricing:
          type: object
          properties:
            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"
          description: |
            Pricing information about the charge.
        productRatePlanChargeId:
          type: string
          description: >
            Internal identifier of the product rate plan charge that the charge
            is based on.
        revRecCode:
          maxLength: 70
          type: string
          description: |
            Revenue Recognition Code
        revRecTriggerCondition:
          type: string
          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
        revenueRecognitionRuleName:
          type: string
          description: |
            Specifies the revenue recognition rule.

              * `Recognize upon invoicing` 
              * `Recognize daily over time`
          enum:
            - Recognize upon invoicing
            - Recognize daily over time
        startDate:
          $ref: "#/components/schemas/TriggerParams"
        uniqueToken:
          maxLength: 50
          type: string
          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.
      description: |
        Charge associated with a rate plan.
    ChargeOverrideForEvergreen:
      title: charge
      required:
        - productRatePlanChargeId
      type: object
      properties:
        billing:
          type: object
          properties:
            billCycleDay:
              maximum: 31
              minimum: 0
              type: integer
              description: >
                Day of the month that each billing period begins on. Only
                applicable if the value of the `billCycleType` field is
                `SpecificDayofMonth`.
            billCycleType:
              type: string
              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
            billingPeriod:
              type: string
              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
            billingPeriodAlignment:
              type: string
              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
            billingTiming:
              type: string
              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
            specificBillingPeriod:
              type: integer
              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`.
            weeklyBillCycleDay:
              type: string
              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
          description: |
            Billing information about the charge.
        chargeNumber:
          maxLength: 50
          type: string
          description: |
            Charge number of the charge. For example, C-00000307.

            If you do not set this field, Zuora will generate the charge number.
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          maxLength: 500
          type: string
          description: |
            Description of the charge.
        endDate:
          $ref: "#/components/schemas/EndConditions"
        pricing:
          type: object
          properties:
            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"
          description: |
            Pricing information about the charge.
        productRatePlanChargeId:
          type: string
          description: >
            Internal identifier of the product rate plan charge that the charge
            is based on.
        revRecCode:
          maxLength: 70
          type: string
          description: |
            Revenue Recognition Code
        revRecTriggerCondition:
          type: string
          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
        revenueRecognitionRuleName:
          type: string
          description: |
            Specifies the revenue recognition rule.

              * `Recognize upon invoicing` 
              * `Recognize daily over time`
          enum:
            - Recognize upon invoicing
            - Recognize daily over time
        startDate:
          $ref: "#/components/schemas/TriggerParams"
        uniqueToken:
          maxLength: 50
          type: string
          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.
      description: |
        Charge associated with a rate plan.
    ChargePreviewMetrics:
      type: object
      properties:
        chargeNumber:
          type: string
        cmrr:
          type: object
          properties:
            discount:
              type: number
              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".
            discountDelta:
              type: number
              description: Delta discountCmrr value between the order base and the latest
                subscription version.
            regular:
              type: number
            regularDelta:
              type: number
        originRatePlanId:
          type: string
        productRatePlanChargeId:
          type: string
        productRatePlanId:
          type: string
        tax:
          type: object
          properties:
            discount:
              type: number
              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.
            discountDelta:
              type: number
              description: Delta discount TAX value between the base and the latest
                subscription version in the order for the specific recurring
                charge.
            regular:
              type: number
            regularDelta:
              type: number
              description: Delta tax value between the base and the latest subscription
                version in the order.
        tcb:
          type: object
          properties:
            discount:
              type: number
              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.
            discountDelta:
              type: number
              description: Delta discount TCB value between the base and the latest
                subscription version for specific recurring charge in the order.
            regular:
              type: number
            regularDelta:
              type: number
              description: Delta TCB value between the base and the latest subscription
                version in the order.
        tcv:
          type: object
          properties:
            discount:
              type: number
              description: Always equals to discountTcb.
            discountDelta:
              type: number
              description: Always equals to delta discountTcb.
            regular:
              type: number
            regularDelta:
              type: number
    ChargeTier:
      title: chargeTier
      required:
        - price
        - startingUnit
        - tier
      type: object
      properties:
        endingUnit:
          type: number
          description: |
            Limit on the number of units for which the tier is effective.
        price:
          type: number
          description: >
            Price or per-unit price of the tier, depending on the value of the
            `priceFormat` field.
        priceFormat:
          type: string
          description: |
            Specifies whether the tier has a fixed price or a per-unit price.
          enum:
            - FlatFee
            - PerUnit
        startingUnit:
          type: number
          description: |
            Number of units at which the tier becomes effective.
        tier:
          minimum: 1
          type: integer
          description: |
            Index of the tier in the charge.
    ChargeUpdate:
      type: object
      properties:
        billing:
          $ref: "#/components/schemas/BillingUpdate"
        chargeNumber:
          type: string
          description: |
            Read only. Identifies the charge to be updated.
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          type: string
        effectiveDate:
          $ref: "#/components/schemas/TriggerParams"
        pricing:
          $ref: "#/components/schemas/PricingUpdate"
        uniqueToken:
          type: string
          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.
      description: The JSON object containing the information for a charge update in
        the 'UpdateProduct' type order action.
    ChargeUpdateForEvergreen:
      type: object
      properties:
        billing:
          $ref: "#/components/schemas/BillingUpdate"
        chargeNumber:
          type: string
          description: |
            Read only. Identifies the charge to be updated.
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          type: string
        effectiveDate:
          $ref: "#/components/schemas/TriggerParams"
        pricing:
          $ref: "#/components/schemas/PricingUpdateForEvergreen"
        uniqueToken:
          type: string
          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.
      description: The JSON object containing the information for a charge update in
        the 'UpdateProduct' type order action.
    ChildrenSettingValueRequest:
      title: childSettingsRequest
      type: object
      properties:
        body:
          $ref: "#/components/schemas/BodyInSettingValueRequest"
        id:
          type: string
          description: >
            The id of the request. You can set it to any string. It must be
            unique within the whole batch.
        method:
          type: string
          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
        url:
          type: string
          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`.
    CommonErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: |
            The error code.
          format: int32
        message:
          type: string
          description: |
            The error message.
    CommonResponseType:
      type: object
      properties:
        processId:
          type: string
          description: |
            The Id of the process that handle the operation.
        reasons:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: |
                  The error code of response.
              message:
                type: string
                description: |
                  The detail information of the error response
        success:
          type: boolean
          description: |
            Indicates whether the call succeeded.
    Contact:
      required:
        - firstName
        - lastName
      type: object
      properties:
        address1:
          maxLength: 255
          type: string
          description: >
            First line of the contact's address. This is often a street address
            or a business name.
        address2:
          maxLength: 255
          type: string
          description: |
            Second line of the contact's address.
        city:
          maxLength: 40
          type: string
          description: |
            City of the contact's address.
        country:
          maxLength: 64
          type: string
          description: |
            Country of the contact's address. 
        county:
          maxLength: 32
          type: string
          description: |
            County of the contact's address.
        fax:
          maxLength: 40
          type: string
          description: |
            Fax number of the contact.
        firstName:
          maxLength: 100
          type: string
          description: |
            First name of the contact.
        homePhone:
          maxLength: 40
          type: string
          description: |
            Home phone number of the contact.
        lastName:
          maxLength: 100
          type: string
          description: |
            Last name of the contact.
        mobilePhone:
          maxLength: 40
          type: string
          description: |
            Mobile phone number of the contact.
        nickname:
          maxLength: 100
          type: string
          description: |
            Nickname of the contact.
        otherPhone:
          maxLength: 40
          type: string
          description: >
            Additional phone number of the contact. Use the `otherPhoneType`
            field to specify the type of phone number.
        otherPhoneType:
          type: string
          description: |
            Specifies the type of phone number in the `otherPhone` field.
          enum:
            - Work
            - Mobile
            - Home
            - Other
        personalEmail:
          maxLength: 80
          type: string
          description: |
            Personal email address of the contact.
          format: email
        postalCode:
          maxLength: 20
          type: string
          description: |
            ZIP code or other postal code of the contact's address.
        state:
          maxLength: 40
          type: string
          description: |
            State or province of the contact's address.
        taxRegion:
          maxLength: 32
          type: string
          description: >
            Region defined in your taxation rules. Only applicable if you use
            Zuora Tax.
        workEmail:
          maxLength: 80
          type: string
          description: |
            Business email address of the contact.
          format: email
        workPhone:
          maxLength: 40
          type: string
          description: |
            Business phone number of the contact.
      description: |
        Contact details associated with an account.
    ContactObjectCustomFields:
      title: contactFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    CreateEntityResponseType:
      type: object
      properties:
        displayName:
          type: string
          description: The display name of the entity that is shown in the Zuora UI and
            APIs.
        id:
          type: string
          description: The entity Id.
        locale:
          type: string
          description: The locale that is used in this entity.
        name:
          type: string
          description: The name of the entity.
        parentId:
          type: string
          description: The Id of the parent entity.
        status:
          type: string
          description: The status of the entity.
          enum:
            - Provisioned
            - Unprovisioned
        success:
          type: boolean
          description: Returns `true` if the request is successful.
        tenantId:
          type: string
          description: The Id of the tenant that the entity belongs to.
        timezone:
          type: string
          description: The time zone that is used in this entity.
    CreateEntityType:
      required:
        - locale
        - name
        - parentId
        - timezone
      type: object
      properties:
        displayName:
          maxLength: 255
          type: string
          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.
        locale:
          type: string
          description: The locale that is used in this entity.
        name:
          maxLength: 255
          type: string
          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. 
        parentId:
          type: string
          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. 
        timezone:
          type: string
          description: The time zone that is used in this entity.
      example:
        displayName: Acme-Asia
        locale: zh_CN
        name: Acme-Asia
        parentId: 8a808255557baba1015580e12fa5083a
        timezone: Asia/Harbin
    CreateOrderChargeOverride:
      title: charge
      required:
        - productRatePlanChargeId
      type: object
      properties:
        billing:
          type: object
          properties:
            billCycleDay:
              maximum: 31
              minimum: 0
              type: integer
              description: >
                Day of the month that each billing period begins on. Only
                applicable if the value of the `billCycleType` field is
                `SpecificDayofMonth`.
            billCycleType:
              type: string
              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
            billingPeriod:
              type: string
              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
            billingPeriodAlignment:
              type: string
              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
            billingTiming:
              type: string
              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
            specificBillingPeriod:
              type: integer
              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`.
            weeklyBillCycleDay:
              type: string
              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
          description: |
            Billing information about the charge.
        chargeNumber:
          maxLength: 50
          type: string
          description: |
            Charge number of the charge. For example, C-00000307.

            If you do not set this field, Zuora will generate the charge number.
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          maxLength: 500
          type: string
          description: |
            Description of the charge.
        endDate:
          $ref: "#/components/schemas/EndConditions"
        pricing:
          type: object
          properties:
            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"
          description: |
            Pricing information about the charge.
        productRatePlanChargeId:
          type: string
          description: >
            Internal identifier of the product rate plan charge that the charge
            is based on.
        revRecCode:
          maxLength: 70
          type: string
          description: |
            Revenue Recognition Code
        revRecTriggerCondition:
          type: string
          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
        revenueRecognitionRuleName:
          type: string
          description: |
            Specifies the revenue recognition rule.

              * `Recognize upon invoicing` 
              * `Recognize daily over time`
          enum:
            - Recognize upon invoicing
            - Recognize daily over time
        startDate:
          $ref: "#/components/schemas/CreateOrderTriggerParams"
        uniqueToken:
          maxLength: 50
          type: string
          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.
      description: |
        Charge associated with a rate plan.
    CreateOrderChargeUpdate:
      type: object
      properties:
        billing:
          $ref: "#/components/schemas/BillingUpdate"
        chargeNumber:
          type: string
          description: |
            Read only. Identifies the charge to be updated.
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          type: string
        effectiveDate:
          $ref: "#/components/schemas/CreateOrderTriggerParams"
        pricing:
          $ref: "#/components/schemas/CreateOrderPricingUpdate"
        uniqueToken:
          type: string
          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.
      description: The JSON object containing the information for a charge update in
        the 'UpdateProduct' type order action.
    CreateOrderCreateSubscription:
      title: createSubscription
      type: object
      properties:
        invoiceSeparately:
          type: boolean
          description: >
            Specifies whether the subscription appears on a separate invoice
            when Zuora generates invoices.
        newSubscriptionOwnerAccount:
          $ref: "#/components/schemas/CreateOrderCreateSubscriptionNewSubscriptionOwnerAc\
            count"
        notes:
          maxLength: 500
          type: string
          description: >
            Notes about the subscription. These notes are only visible to Zuora
            users.
        subscribeToRatePlans:
          type: array
          description: |
            List of rate plans associated with the subscription.
          items:
            $ref: "#/components/schemas/CreateOrderRatePlanOverride"
        subscriptionNumber:
          maxLength: 100
          type: string
          description: >
            Subscription number of the subscription. For example, A-S00000001.


            If you do not set this field, Zuora will generate the subscription number.
        subscriptionOwnerAccountNumber:
          maxLength: 70
          type: string
          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.
        terms:
          required:
            - initialTerm
          type: object
          properties:
            autoRenew:
              type: boolean
              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`.
            initialTerm:
              required:
                - termType
              type: object
              properties:
                period:
                  type: integer
                  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`.


                    The duration of the first term cannot be greater than 10 years.
                periodType:
                  type: string
                  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
                startDate:
                  type: string
                  description: |
                    Start date of the first term, in YYYY-MM-DD format.
                  format: date
                termType:
                  type: string
                  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
              description: |
                Information about the first term of the subscription.
            renewalSetting:
              type: string
              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
            renewalTerms:
              type: array
              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"
          description: |
            Container for the terms and renewal settings of the subscription.
      description: |
        Information about an order action of type `CreateSubscription`.
    CreateOrderCreateSubscriptionNewSubscriptionOwnerAccount:
      allOf:
        - required:
            - billCycleDay
            - billToContact
            - currency
            - name
          type: object
          properties:
            accountNumber:
              maxLength: 70
              type: string
              description: |
                Account number. For example, A00000001.
            additionalEmailAddresses:
              maxLength: 1200
              type: string
              description: >
                List of additional email addresses to receive emailed invoices.
                Values should be a comma-separated list of email addresses.
            allowInvoiceEdit:
              type: boolean
              description: |
                Indicates if associated invoices can be edited.
                Values are: 

                * `true`
                * `false` (default)
            autoPay:
              type: boolean
              description: >
                Specifies whether future payments are automatically billed when
                they are due.
            batch:
              type: string
              description: >
                Name of the billing batch that the account belongs to. For
                example, Batch1.
            billCycleDay:
              maximum: 31
              minimum: 0
              type: integer
              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".
            billToContact:
              $ref: "#/components/schemas/BillToContactPostOrder"
            communicationProfileId:
              type: string
              description: >
                Internal identifier of the communication profile that Zuora uses
                when sending notifications to the account's contacts.
            creditCard:
              $ref: "#/components/schemas/creditCard"
            creditMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
            crmId:
              maxLength: 100
              type: string
              description: |
                External identifier of the account in a CRM system.
            currency:
              type: string
              description: |
                ISO 3-letter currency code (uppercase). For example, USD.
            customFields:
              $ref: "#/components/schemas/AccountObjectCustomFields"
            customerServiceRepName:
              maxLength: 50
              type: string
              description: >
                Name of the account's customer service representative, if
                applicable.
            debitMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
            hpmCreditCardPaymentMethodId:
              type: string
              description: >
                Internal identifier of the hosted payment method (HPM) credit
                card payment method associated with the account.
            invoiceDeliveryPrefsEmail:
              type: boolean
              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.         
            invoiceDeliveryPrefsPrint:
              type: boolean
              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.
            invoiceTemplateId:
              type: string
              description: >
                Internal identifier of the invoice template that Zuora uses when
                generating invoices for the account.
            name:
              maxLength: 255
              type: string
              description: |
                Account name.
            notes:
              maxLength: 65535
              type: string
              description: >
                Notes about the account. These notes are only visible to Zuora
                users.
            parentId:
              type: string
              description: Identifier of the parent customer account for this Account object.
                Use this field if you have customer hierarchy enabled.
            paymentGateway:
              maxLength: 40
              type: string
              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.
            paymentMethod:
              $ref: "#/components/schemas/PaymentMethod"
            paymentTerm:
              type: string
              description: >
                Name of the payment term associated with the account. For
                example, "Net 30". The payment term determines the due dates of
                invoices.
            purchaseOrderNumber:
              maxLength: 100
              type: string
              description: >
                The number of the purchase order associated with this account.
                Purchase order information generally comes from customers.
            salesRep:
              maxLength: 50
              type: string
              description: >
                The name of the sales representative associated with this
                account, if applicable.
            soldToContact:
              $ref: "#/components/schemas/SoldToContactPostOrder"
            taxInfo:
              $ref: "#/components/schemas/TaxInfo"
          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.
        - $ref: "#/components/schemas/DataAccessControlField"
    CreateOrderOrderAction:
      required:
        - type
      type: object
      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:
          type: array
          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:
          type: string
          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 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 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 order API call.
          enum:
            - CreateSubscription
            - TermsAndConditions
            - AddProduct
            - UpdateProduct
            - RemoveProduct
            - RenewSubscription
            - CancelSubscription
            - OwnerTransfer
            - Suspend
            - Resume
        updateProduct:
          $ref: "#/components/schemas/CreateOrderRatePlanUpdate"
    CreateOrderPricingUpdate:
      type: object
      properties:
        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"
    CreateOrderRatePlanOverride:
      title: ratePlan
      required:
        - productRatePlanId
      type: object
      properties:
        chargeOverrides:
          type: array
          description: |
            List of charges associated with the rate plan.
          items:
            $ref: "#/components/schemas/CreateOrderChargeOverride"
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        productRatePlanId:
          type: string
          description: >
            Internal identifier of the product rate plan that the rate plan is
            based on.
        uniqueToken:
          maxLength: 50
          type: string
          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.
      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 `chanrgeNumber` 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). 
    CreateOrderRatePlanUpdate:
      title: updateProduct
      type: object
      properties:
        chargeUpdates:
          type: array
          items:
            $ref: "#/components/schemas/CreateOrderChargeUpdate"
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        ratePlanId:
          type: string
          description: >
            The id of the rate plan to be updated. It can be the latest version
            or any history version id.
        specificUpdateDate:
          type: string
          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
        uniqueToken:
          type: string
          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.
      description: |
        Information about an order action of type `UpdateProduct`.
    CreateOrderResume:
      title: Resume
      required:
        - resumePolicy
      type: object
      properties:
        extendsTerm:
          type: boolean
          description: >
            Specifies whether to extend the subscription term by the length of
            time the suspension is in effect.
        resumePeriods:
          type: integer
          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. 
        resumePeriodsType:
          type: string
          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
        resumePolicy:
          type: string
          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
        resumeSpecificDate:
          type: string
          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
      description: |
        Information about an order action of type `Resume`.
    CreateOrderSuspend:
      title: Suspend
      required:
        - suspendPolicy
      type: object
      properties:
        suspendPeriods:
          type: integer
          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. 
        suspendPeriodsType:
          type: string
          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
        suspendPolicy:
          type: string
          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
        suspendSpecificDate:
          type: string
          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
      description: |
        Information about an order action of type `Suspend`.
    CreateOrderTermsAndConditions:
      title: termsAndConditions
      type: object
      properties:
        autoRenew:
          type: boolean
        lastTerm:
          $ref: "#/components/schemas/LastTerm"
        renewalSetting:
          type: string
          enum:
            - RENEW_WITH_SPECIFIC_TERM
            - RENEW_TO_EVERGREEN
        renewalTerms:
          type: array
          items:
            $ref: "#/components/schemas/RenewalTerm"
      description: |
        Information about an order action of type `TermsAndConditions`.
    CreateOrderTriggerParams:
      title: startDate
      type: object
      properties:
        specificTriggerDate:
          type: string
          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
        triggerEvent:
          type: string
          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
      description: |
        Specifies when a charge becomes active.
    CreatePMPayPalECPayPalNativeEC:
      type: object
      properties:
        BAID:
          type: string
          description: |
            ID of a PayPal billing agreement. For example, I-1TJ3GAGG82Y9.
        email:
          type: string
          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.
    CreatePaymentMethodACH:
      type: object
      properties:
        addressLine1:
          type: string
          description: |
            First address line, 255 characters or less.
        addressLine2:
          type: string
          description: |
            Second address line, 255 characters or less.
        bankABACode:
          type: string
          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`.
        bankAccountName:
          maxLength: 70
          type: string
          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`.
        bankAccountNumber:
          maxLength: 30
          type: string
          description: >
            The bank account number associated with the ACH payment. This field
            is only required if the `type` field is set to `ACH`.
        bankAccountType:
          type: string
          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
        bankName:
          maxLength: 70
          type: string
          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`.
        city:
          type: string
          description: |+
            City, 40 characters or less.
                
        country:
          type: string
          description: |
            Country, must be a valid country name or abbreviation.
        phone:
          type: string
          description: |
            Phone number, 40 characters or less.
        state:
          type: string
          description: |
            State, must be a valid state name or 2-character abbreviation.
        zipCode:
          type: string
          description: |
            Zip code, 20 characters or less.
    CreatePaymentMethodBankTransfer:
      type: object
      properties:
        IBAN:
          type: string
          description: >
            The International Bank Account Number. This field is used to create
            the SEPA payment method.
        accountNumber:
          type: string
          description: >
            The number of the customer's bank account. Use this field for direct
            debit payment methods.
        bankCode:
          type: string
          description: >
            The sort code or number that identifies the bank. This is also known
            as the sort code. 
        branchCode:
          type: string
          description: |
            The branch code of the bank used for direct debit.     
        businessIdentificationCode:
          type: string
          description: |
            The BIC code used for SEPA.
        identityNumber:
          type: string
          description: |
            The identity number used for Bank Transfer.
    CreatePaymentMethodCardholderInfo:
      title: cardHolderInfo
      required:
        - cardHolderName
      type: object
      properties:
        addressLine1:
          type: string
          description: |
            First address line, 255 characters or less.
        addressLine2:
          type: string
          description: |
            Second address line, 255 characters or less.
        cardHolderName:
          type: string
          description: >
            The card holder's full name as it appears on the card, e.g., "John J
            Smith", 50 characters or less.
        city:
          type: string
          description: |
            City, 40 characters or less.
        country:
          type: string
          description: |
            Country, must be a valid country name or abbreviation.
        email:
          type: string
          description: |
            Card holder's email address, 80 characters or less.
        phone:
          type: string
          description: |
            Phone number, 40 characters or less.
        state:
          type: string
          description: |
            State; must be a valid state name or 2-character abbreviation.
        zipCode:
          type: string
          description: |
            Zip code, 20 characters or less.
      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.
    CreatePaymentMethodCommon:
      type: object
      properties:
        accountKey:
          type: string
          description: >
            Internal ID of the customer account that will own the payment method.
        authGateway:
          type: string
          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.
        makeDefault:
          type: boolean
          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.
          default: false
    CreatePaymentMethodCreditCard:
      type: object
      properties:
        cardHolderInfo:
          $ref: "#/components/schemas/CreatePaymentMethodCardholderInfo"
        cardNumber:
          type: string
          description: |
            Credit card number.
        cardType:
          type: string
          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).
        checkDuplicated:
          type: boolean
          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`. 
        expirationMonth:
          type: string
          description: |
            One or two digit expiration month (1-12) of the credit card.
        expirationYear:
          type: string
          description: |
            Four-digit expiration year of the credit card.
        mitConsentAgreementRef:
          maxLength: 128
          type: string
          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.
        mitConsentAgreementSrc:
          type: string
          description: |
            Required if you set the `mitProfileAction` field.
          enum:
            - External
        mitNetworkTransactionId:
          maxLength: 128
          type: string
          description: >
            Specifies the ID of a network transaction. Only applicable if you
            set the `mitProfileAction` field to `Persist`.
        mitProfileAction:
          type: string
          description: >
            If you set this field, Zuora creates a stored credential profile
            within the payment method.


            **Note:** This feature is in **Limited Availability**. 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
        mitProfileAgreedOn:
          type: string
          description: >
            The date on which the profile is agreed. Required if you set the
            `mitProfileAction` field. The date format is `yyyy-mm-dd`.
          format: date
        mitProfileType:
          type: string
          description: |
            Required if you set the `mitProfileAction` field.
          enum:
            - Recurring
        securityCode:
          type: string
          description: >
            CVV or CVV2 security code of the credit card.


            To ensure PCI compliance, this value is not stored and cannot be queried.
    CreatePaymentMethodPayPalAdaptive:
      type: object
      properties:
        preapprovalKey:
          type: string
          description: |
            The PayPal preapproval key.
    CreatePaymentType:
      allOf:
        - required:
            - amount
            - currency
            - type
          type: object
          properties:
            accountId:
              type: string
              description: |
                The ID of the customer account that the payment is created for.
            amount:
              type: number
              description: |
                The total amount of the payment.
              format: double
            authTransactionId:
              maxLength: 50
              type: string
              description: >
                The authorization transaction ID from the payment gateway. Use
                this field for electronic payments, such as credit cards.
            comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Additional information related to the payment.
            currency:
              type: string
              description: |
                A currency defined in the web-based UI administrative settings.
            debitMemos:
              type: array
              description: |
                Container for debit memos.
              items:
                $ref: "#/components/schemas/PaymentDebitMemoApplicationCreateRequestType"
            effectiveDate:
              type: string
              description: |
                The date when the payment takes effect, in `yyyy-mm-dd` format.
              format: date
            financeInformation:
              type: object
              properties:
                bankAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to a bank account in your
                    accounting system.
                transferredToAccounting:
                  type: string
                  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
                unappliedPaymentAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: |
                    The accounting code for the unapplied payment.
              description: |
                Container for the finance information related to the payment.
            gatewayId:
              type: string
              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.
            gatewayOrderId:
              maxLength: 50
              type: string
              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. 
            invoices:
              type: array
              description: |
                Container for invoices.
              items:
                $ref: "#/components/schemas/PaymentInvoiceApplicationCreateRequestType"
            paymentMethodId:
              type: string
              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.
            referenceId:
              maxLength: 60
              minLength: 0
              type: string
              description: >
                The transaction ID returned by the payment gateway. Use this
                field to reconcile payments between your gateway and Zuora
                Payments.
            type:
              type: string
              description: |
                The type of the payment.
              enum:
                - External
                - Electronic
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
    CreateStoredCredentialProfileRequest:
      required:
        - consentAgreementSrc
        - status
        - type
      type: object
      properties:
        action:
          type: string
          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
        agreedOn:
          type: string
          description: >
            The date on which the profile is agreed. The date format is
            `yyyy-mm-dd`.
          format: date
        authGateway:
          type: string
          description: >
            Specifies the ID of the payment gateway that Zuora will use when
            activating the stored credential profile.
        cardSecurityCode:
          type: string
          description: |
            The security code of the credit card.
        consentAgreementRef:
          maxLength: 128
          type: string
          description: >
            Specifies your reference for the consent agreement that you have
            established with the customer.
        consentAgreementSrc:
          type: string
          enum:
            - External
        networkTransactionId:
          maxLength: 128
          type: string
          description: |
            The ID of a network transaction.
        status:
          type: string
          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:
          type: string
          enum:
            - Recurring
      example:
        authGateway: 4028905f5702783601570291e14c0015
        consentAgreementRef: ACCT1338AgreementV1.pdf
        consentAgreementSrc: External
        status: Active
        type: Recurring
    CreateSubscription:
      title: createSubscription
      type: object
      properties:
        invoiceSeparately:
          type: boolean
          description: >
            Specifies whether the subscription appears on a separate invoice
            when Zuora generates invoices.
        newSubscriptionOwnerAccount:
          required:
            - billCycleDay
            - billToContact
            - currency
            - name
          type: object
          properties:
            accountNumber:
              maxLength: 70
              type: string
              description: |
                Account number. For example, A00000001.
            autoPay:
              type: boolean
              description: >
                Specifies whether future payments are automatically billed when
                they are due.
            batch:
              type: string
              description: >
                Name of the billing batch that the account belongs to. For
                example, Batch1.
            billCycleDay:
              maximum: 31
              minimum: 0
              type: integer
              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".
            billToContact:
              $ref: "#/components/schemas/BillToContact"
            communicationProfileId:
              type: string
              description: >
                Internal identifier of the communication profile that Zuora uses
                when sending notifications to the account's contacts.
            creditCard:
              $ref: "#/components/schemas/creditCard"
            crmId:
              maxLength: 100
              type: string
              description: |
                External identifier of the account in a CRM system.
            currency:
              type: string
              description: |
                ISO 3-letter currency code (uppercase). For example, USD.
            customFields:
              $ref: "#/components/schemas/AccountObjectCustomFields"
            hpmCreditCardPaymentMethodId:
              type: string
              description: >
                Internal identifier of the hosted payment method (HPM) credit
                card payment method associated with the account.
            invoiceDeliveryPrefsEmail:
              type: boolean
              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.         
            invoiceDeliveryPrefsPrint:
              type: boolean
              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.
            invoiceTemplateId:
              type: string
              description: >
                Internal identifier of the invoice template that Zuora uses when
                generating invoices for the account.
            name:
              maxLength: 70
              type: string
              description: |
                Account name.
            notes:
              maxLength: 65535
              type: string
              description: >
                Notes about the account. These notes are only visible to Zuora
                users.
            parentId:
              type: string
              description: Identifier of the parent customer account for this Account object.
                Use this field if you have customer hierarchy enabled.
            paymentGateway:
              maxLength: 40
              type: string
              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.
            paymentMethod:
              $ref: "#/components/schemas/PaymentMethod"
            paymentTerm:
              type: string
              description: >
                Name of the payment term associated with the account. For
                example, "Net 30". The payment term determines the due dates of
                invoices.
            soldToContact:
              $ref: "#/components/schemas/SoldToContact"
            taxInfo:
              $ref: "#/components/schemas/TaxInfo"
          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.
        notes:
          maxLength: 500
          type: string
          description: >
            Notes about the subscription. These notes are only visible to Zuora
            users.
        subscribeToRatePlans:
          type: array
          description: |
            List of rate plans associated with the subscription.
          items:
            $ref: "#/components/schemas/RatePlanOverride"
        subscriptionNumber:
          maxLength: 100
          type: string
          description: >
            Subscription number of the subscription. For example, A-S00000001.


            If you do not set this field, Zuora will generate the subscription number.
        subscriptionOwnerAccountNumber:
          maxLength: 70
          type: string
          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.
        terms:
          required:
            - initialTerm
            - renewalTerms
          type: object
          properties:
            autoRenew:
              type: boolean
              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`.
            initialTerm:
              required:
                - termType
              type: object
              properties:
                period:
                  type: integer
                  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`.


                    The duration of the first term cannot be greater than 10 years.
                periodType:
                  type: string
                  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
                startDate:
                  type: string
                  description: |
                    Start date of the first term, in YYYY-MM-DD format.
                  format: date
                termType:
                  type: string
                  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
              description: |
                Information about the first term of the subscription.
            renewalSetting:
              type: string
              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
            renewalTerms:
              type: array
              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"
          description: |
            Container for the terms and renewal settings of the subscription.
      description: |
        Information about an order action of type `CreateSubscription`.
    CreateSubscriptionForEvergreen:
      title: createSubscription
      type: object
      properties:
        invoiceSeparately:
          type: boolean
          description: >
            Specifies whether the subscription appears on a separate invoice
            when Zuora generates invoices.
        newSubscriptionOwnerAccount:
          required:
            - billCycleDay
            - billToContact
            - currency
            - name
          type: object
          properties:
            accountNumber:
              maxLength: 70
              type: string
              description: |
                Account number. For example, A00000001.
            autoPay:
              type: boolean
              description: >
                Specifies whether future payments are automatically billed when
                they are due.
            batch:
              type: string
              description: >
                Name of the billing batch that the account belongs to. For
                example, Batch1.
            billCycleDay:
              maximum: 31
              minimum: 0
              type: integer
              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".
            billToContact:
              $ref: "#/components/schemas/BillToContact"
            communicationProfileId:
              type: string
              description: >
                Internal identifier of the communication profile that Zuora uses
                when sending notifications to the account's contacts.
            creditCard:
              $ref: "#/components/schemas/creditCard"
            crmId:
              maxLength: 100
              type: string
              description: |
                External identifier of the account in a CRM system.
            currency:
              type: string
              description: |
                ISO 3-letter currency code (uppercase). For example, USD.
            customFields:
              $ref: "#/components/schemas/AccountObjectCustomFields"
            hpmCreditCardPaymentMethodId:
              type: string
              description: >
                Internal identifier of the hosted payment method (HPM) credit
                card payment method associated with the account.
            invoiceDeliveryPrefsEmail:
              type: boolean
              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.         
            invoiceDeliveryPrefsPrint:
              type: boolean
              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.
            invoiceTemplateId:
              type: string
              description: >
                Internal identifier of the invoice template that Zuora uses when
                generating invoices for the account.
            name:
              maxLength: 70
              type: string
              description: |
                Account name.
            notes:
              maxLength: 65535
              type: string
              description: >
                Notes about the account. These notes are only visible to Zuora
                users.
            parentId:
              type: string
              description: Identifier of the parent customer account for this Account object.
                Use this field if you have customer hierarchy enabled.
            paymentGateway:
              maxLength: 40
              type: string
              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.
            paymentMethod:
              $ref: "#/components/schemas/PaymentMethod"
            paymentTerm:
              type: string
              description: >
                Name of the payment term associated with the account. For
                example, "Net 30". The payment term determines the due dates of
                invoices.
            soldToContact:
              $ref: "#/components/schemas/SoldToContact"
            taxInfo:
              $ref: "#/components/schemas/TaxInfo"
          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.
        notes:
          maxLength: 500
          type: string
          description: >
            Notes about the subscription. These notes are only visible to Zuora
            users.
        subscribeToRatePlans:
          type: array
          description: |
            List of rate plans associated with the subscription.
          items:
            $ref: "#/components/schemas/RatePlanOverrideForEvergreen"
        subscriptionNumber:
          maxLength: 100
          type: string
          description: >
            Subscription number of the subscription. For example, A-S00000001.


            If you do not set this field, Zuora will generate the subscription number.
        subscriptionOwnerAccountNumber:
          maxLength: 70
          type: string
          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.
        terms:
          required:
            - initialTerm
            - renewalTerms
          type: object
          properties:
            autoRenew:
              type: boolean
              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`.
            initialTerm:
              required:
                - termType
              type: object
              properties:
                period:
                  type: integer
                  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`.


                    The duration of the first term cannot be greater than 10 years.
                periodType:
                  type: string
                  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
                startDate:
                  type: string
                  description: |
                    Start date of the first term, in YYYY-MM-DD format.
                  format: date
                termType:
                  type: string
                  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
              description: |
                Information about the first term of the subscription.
            renewalSetting:
              type: string
              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
            renewalTerms:
              type: array
              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"
          description: |
            Container for the terms and renewal settings of the subscription.
      description: |
        Information about an order action of type `CreateSubscription`.
    CreditBalanceAdjustmentObjectCustomFields:
      title: creditBalanceAdjustmentFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    CreditBalanceAdjustmentObjectNSFields:
      title: creditBalanceAdjustmentFieldsNS
      type: object
      properties:
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
      description: >
        Container for Credit Balance Adjustment fields provided by the [Zuora
        Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
    CreditMemoApplyDebitMemoItemRequestType:
      title: items
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount that is applied to the specific item. 
          format: double
        creditMemoItemId:
          type: string
          description: |
            The ID of the credit memo item.
        creditTaxItemId:
          type: string
          description: |
            The ID of the credit memo taxation item.
        debitMemoItemId:
          type: string
          description: >
            The ID of the debit memo item that the credit memo item is applied
            to.
        taxItemId:
          type: string
          description: >
            The ID of the debit memo taxation item that the credit memo taxation
            item is applied to.
    CreditMemoApplyDebitMemoRequestType:
      title: debitMemos
      required:
        - amount
        - debitMemoId
      type: object
      properties:
        amount:
          type: number
          description: |
            The credit memo amount to be applied to the debit memo.
          format: double
        debitMemoId:
          type: string
          description: |
            The unique ID of the debit memo that the credit memo is applied to.
        items:
          type: array
          description: |
            Container for items.
          items:
            $ref: "#/components/schemas/CreditMemoApplyDebitMemoItemRequestType"
    CreditMemoApplyInvoiceItemRequestType:
      title: items
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount that is applied to the specific item. 
          format: double
        creditMemoItemId:
          type: string
          description: |
            The ID of the credit memo item.
        creditTaxItemId:
          type: string
          description: |
            The ID of the credit memo taxation item.
        invoiceItemId:
          type: string
          description: |
            The ID of the invoice item that the credit memo item is applied to.
        taxItemId:
          type: string
          description: >
            The ID of the invoice taxation item that the credit memo taxation
            item is applied to.
    CreditMemoApplyInvoiceRequestType:
      title: invoices
      required:
        - amount
        - invoiceId
      type: object
      properties:
        amount:
          type: number
          description: |
            The credit memo amount to be applied to the invoice.
          format: double
        invoiceId:
          type: string
          description: |
            The unique ID of the invoice that the credit memo is applied to.
        items:
          type: array
          description: |
            Container for items.
          items:
            $ref: "#/components/schemas/CreditMemoApplyInvoiceItemRequestType"
    CreditMemoEntityPrefix:
      title: creditMemo
      type: object
      properties:
        prefix:
          type: string
          description: |
            The prefix of credit memos.
          example: CM
        startNumber:
          type: integer
          description: |
            The starting document number of credit memos.
          example: 10
      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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
    CreditMemoFromChargeDetailType:
      title: charges
      allOf:
        - required:
            - chargeId
            - productRatePlanChargeId
          type: object
          properties:
            amount:
              type: number
              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
            chargeId:
              type: string
              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.
            comment:
              maxLength: 255
              minLength: 0
              type: string
              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.
            description:
              maxLength: 255
              minLength: 0
              type: string
              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.
            financeInformation:
              type: object
              properties:
                deferredRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the deferred revenue, such as
                    Monthly Recurring Liability.
                onAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to an on account in your
                    accounting system.
                recognizedRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the recognized revenue, such as
                    Monthly Recurring Charges or Overage Charges.
                revenueRecognitionRuleName:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The name of the revenue recognition rule governing the
                    revenue schedule.
              description: >
                Container for the finance information related to the product
                rate plan charge associated with the credit memo.
            memoItemAmount:
              type: number
              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
            productRatePlanChargeId:
              type: string
              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.
            quantity:
              type: number
              description: |
                The number of units for the credit memo item.
              format: double
            serviceEndDate:
              type: string
              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
            serviceStartDate:
              type: string
              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
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
    CreditMemoFromChargeType:
      allOf:
        - required:
            - accountId
          type: object
          properties:
            accountId:
              type: string
              description: |
                The ID of the account associated with the credit memo.
            charges:
              type: array
              description: |
                Container for product rate plan charges.
              items:
                $ref: "#/components/schemas/CreditMemoFromChargeDetailType"
            comment:
              type: string
              description: |
                Comments about the credit memo.
            effectiveDate:
              type: string
              description: |
                The date when the credit memo takes effect.
              format: date
            reasonCode:
              type: string
              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.
        - $ref: "#/components/schemas/CreditMemoObjectNSFields"
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
    CreditMemoFromInvoiceType:
      allOf:
        - type: object
          properties:
            autoApplyToInvoiceUponPosting:
              type: boolean
              description: >
                Whether the credit memo automatically applies to the invoice
                upon posting.
            comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Comments about the credit memo.
            effectiveDate:
              type: string
              description: |
                The date when the credit memo takes effect.
              format: date
            excludeFromAutoApplyRules:
              type: boolean
              description: >
                Whether the credit memo is excluded from the rule of
                automatically applying credit memos to invoices.
            invoiceId:
              type: string
              description: |
                The ID of the invoice that the credit memo is created from.
            items:
              type: array
              description: |
                Container for items.
              items:
                $ref: "#/components/schemas/CreditMemoItemFromInvoiceItemType"
            reasonCode:
              type: string
              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.
            taxAutoCalculation:
              type: boolean
              description: |
                Whether to automatically calculate taxes in the credit memo.
              default: true
        - $ref: "#/components/schemas/CreditMemoObjectNSFields"
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
    CreditMemoItemFromInvoiceItemType:
      title: items
      allOf:
        - required:
            - amount
            - skuName
          type: object
          properties:
            amount:
              type: number
              description: |
                The amount of the credit memo item.
              format: double
            comment:
              type: string
              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.
            description:
              type: string
              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.
            financeInformation:
              type: object
              properties:
                deferredRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the deferred revenue, such as
                    Monthly Recurring Liability.
                onAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to an on account in your
                    accounting system.
                recognizedRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the recognized revenue, such as
                    Monthly Recurring Charges or Overage Charges.
                revenueRecognitionRuleName:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The name of the revenue recognition rule governing the
                    revenue schedule.
              description: >
                Container for the finance information related to the credit memo
                item.
            invoiceItemId:
              type: string
              description: |
                The ID of the invoice item.
            quantity:
              type: number
              description: |
                The number of units for the credit memo item.
              format: double
            serviceEndDate:
              type: string
              description: |
                The service end date of the credit memo item.
              format: date
            serviceStartDate:
              type: string
              description: |
                The service start date of the credit memo item.
              format: date
            skuName:
              type: string
              description: |
                The name of the SKU.
            taxItems:
              type: array
              description: |
                Container for taxation items.
              items:
                $ref: "#/components/schemas/CreditMemoTaxItemFromInvoiceTaxItemType"
            unitOfMeasure:
              type: string
              description: |
                The definable unit that you measure when determining charges.
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
    CreditMemoItemFromWriteOffInvoice:
      title: items
      allOf:
        - type: object
          properties:
            comment:
              type: string
              description: |
                Comments about the credit memo item.
            financeInformation:
              type: object
              properties:
                deferredRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the deferred revenue, such as
                    Monthly Recurring Liability.
                onAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to an on account in your
                    accounting system.
                recognizedRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the recognized revenue, such as
                    Monthly Recurring Charges or Overage Charges.
                revenueRecognitionRuleName:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The name of the revenue recognition rule governing the
                    revenue schedule.
              description: >
                Container for the finance information related to the credit memo
                item.
            invoiceItemId:
              type: string
              description: |
                The ID of the invoice item.
            serviceEndDate:
              type: string
              description: |
                The service end date of the credit memo item. 
              format: date
            serviceStartDate:
              type: string
              description: |
                The service start date of the credit memo item. 
              format: date
            skuName:
              type: string
              description: |
                The name of the SKU.
            unitOfMeasure:
              type: string
              description: |
                The definable unit that you measure when determining charges.
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
    CreditMemoItemObjectCustomFields:
      title: creditMemoItemFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    CreditMemoObjectCustomFields:
      title: creditMemoFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    CreditMemoObjectNSFields:
      title: creditMemoFieldsNS
      type: object
      properties:
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        Origin__NS:
          maxLength: 255
          type: string
          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).
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
        Transaction__NS:
          maxLength: 255
          type: string
          description: >
            Related transaction in NetSuite. Only available if you have
            installed the [Zuora Connector for
            NetSuite](https://www.zuora.com/connect/app/?appId=265).
      description: >
        Container for Credit Memo fields provided by the [Zuora Connector for
        NetSuite](https://www.zuora.com/connect/app/?appId=265).
    CreditMemoResponseType:
      title: creditMemos
      type: object
      properties:
        id:
          type: string
          description: |
            The ID of the generated credit memo.
    CreditMemoTaxItemFromInvoiceTaxItemType:
      title: taxItems
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the credit memo taxation item.
          format: double
        financeInformation:
          type: object
          properties:
            onAccountAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: >
                The accounting code that maps to an on account in your
                accounting system.
            salesTaxPayableAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: |
                The accounting code for the sales taxes payable.
          description: >
            Container for the finance information related to the source taxation
            item.
        jurisdiction:
          type: string
          description: >
            The jurisdiction that applies the tax or VAT. This value is
            typically a state, province, county, or city. 
        locationCode:
          type: string
          description: >
            The identifier for the location based on the value of the `taxCode`
            field.
        sourceTaxItemId:
          type: string
          description: |
            The ID of the source taxation item.
        taxCode:
          type: string
          description: >
            The tax code identifies which tax rules and tax rates to apply to a
            specific credit memo. 
        taxCodeDescription:
          type: string
          description: |
            The description of the tax code.
        taxDate:
          type: string
          description: >
            The date that the tax is applied to the credit memo, in `yyyy-mm-dd`
            format.
          format: date
        taxExemptAmount:
          type: number
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
        taxName:
          type: string
          description: |
            The name of taxation.
        taxRate:
          type: number
          description: |
            The tax rate applied to the credit memo.
          format: double
        taxRateDescription:
          type: string
          description: |
            The description of the tax rate. 
        taxRateType:
          type: string
          description: |
            The type of the tax rate applied to the credit memo. 
          enum:
            - Percentage
            - FlatFee
    CreditMemoUnapplyDebitMemoItemRequestType:
      title: items
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount that is unapplied from the specific item. 
          format: double
        creditMemoItemId:
          type: string
          description: |
            The ID of the credit memo item.
        creditTaxItemId:
          type: string
          description: |
            The ID of the credit memo taxation item.
        debitMemoItemId:
          type: string
          description: >
            The ID of the debit memo item that the credit memo item is unapplied
            from.
        taxItemId:
          type: string
          description: >
            The ID of the debit memo taxation item that the credit memo taxation
            item is unapplied from.
    CreditMemoUnapplyDebitMemoRequestType:
      title: debitMemos
      required:
        - amount
        - debitMemoId
      type: object
      properties:
        amount:
          type: number
          description: |
            The credit memo amount to be unapplied from the debit memo.
          format: double
        debitMemoId:
          type: string
          description: >
            The unique ID of the debit memo that the credit memo is unapplied
            from.
        items:
          type: array
          description: |
            Container for items.
          items:
            $ref: "#/components/schemas/CreditMemoUnapplyDebitMemoItemRequestType"
    CreditMemoUnapplyInvoiceItemRequestType:
      title: items
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount that is unapplied from the specific item. 
          format: double
        creditMemoItemId:
          type: string
          description: |
            The ID of the credit memo item.
        creditTaxItemId:
          type: string
          description: |
            The ID of the credit memo taxation item.
        invoiceItemId:
          type: string
          description: >
            The ID of the invoice item that the credit memo item is unapplied
            from.
        taxItemId:
          type: string
          description: >
            The ID of the invoice taxation item that the credit memo taxation
            item is unapplied from.
    CreditMemoUnapplyInvoiceRequestType:
      title: invoices
      required:
        - amount
        - invoiceId
      type: object
      properties:
        amount:
          type: number
          description: |
            The credit memo amount to be unapplied from the invoice.
          format: double
        invoiceId:
          type: string
          description: |
            The unique ID of the invoice that the credit memo is unapplied from.
        items:
          type: array
          description: |
            Container for items.
          items:
            $ref: "#/components/schemas/CreditMemoUnapplyInvoiceItemRequestType"
    CustomObjectAllFieldsDefinition:
      title: customObjectFieldDefinition
      description: The definitions of all the fields in the custom object definition
      allOf:
        - type: object
          properties:
            CreatedById:
              type: object
              properties:
                format:
                  type: string
                  description: The field data format
                  enum:
                    - uuid
                label:
                  type: string
                  description: The UI name of the field
                origin:
                  type: string
                  description: Specifies whether the field is a system field or a custom field
                  enum:
                    - system
                type:
                  type: string
                  description: The field data type
                  enum:
                    - string
              description: The `CreatedById` field definition
            CreatedDate:
              type: object
              properties:
                format:
                  type: string
                  description: The field data format
                  enum:
                    - date-time
                origin:
                  type: string
                  description: Specifies the field is a system field
                  enum:
                    - system
                type:
                  type: string
                  description: The field data type
                  enum:
                    - string
              description: The `CreatedDate` field definition
            Id:
              type: object
              properties:
                format:
                  type: string
                  description: The field data format
                  enum:
                    - uuid
                label:
                  type: string
                  description: The UI name of the field
                origin:
                  type: string
                  description: Specifies whether the field is a system field or a custom field
                  enum:
                    - system
                type:
                  type: string
                  description: The field data type
                  enum:
                    - string
              description: The `Id` field definition
            UpdatedById:
              type: object
              properties:
                format:
                  type: string
                  description: The field data format
                  enum:
                    - uuid
                label:
                  type: string
                  description: The UI name of the field
                origin:
                  type: string
                  description: Specifies whether the field is a system field or a custom field
                  enum:
                    - system
                type:
                  type: string
                  description: The field data type
                  enum:
                    - string
              description: The `UpdatedById` field definition
            UpdatedDate:
              type: object
              properties:
                format:
                  type: string
                  description: The field data format
                  enum:
                    - date-time
                origin:
                  type: string
                  description: Specifies the field is a system field
                  enum:
                    - system
                type:
                  type: string
                  description: The field data type
                  enum:
                    - string
              description: The `UpdatedDate` field definition
        - $ref: "#/components/schemas/CustomObjectCustomFieldsDefinition"
    CustomObjectCustomFieldDefinition:
      title: customObjectCustomFieldDefinition
      type: object
      properties:
        format:
          type: string
          description: The data format of the custom field
        label:
          type: string
          description: The UI label of the custom field
        origin:
          type: string
          description: Specifies that this is a custom field
          enum:
            - custom
        type:
          type: string
          description: The data type of the custom field
      description: The custom field definition in the custom object
    CustomObjectCustomFieldDefinitionUpdate:
      title: customObjectCustomFieldDefinition
      type: object
      properties:
        default:
          type: string
          description: Applicable if the `type` of the action is  `updateField`
        description:
          type: string
          description: Applicable if the `type` of the action is  `updateField`
        format:
          type: string
          description: The data format of the custom field
        label:
          type: string
          description: The UI label of the custom field
        origin:
          type: string
          description: Specifies that this is a custom field
          enum:
            - custom
        type:
          type: string
          description: The data type of the custom field
      description: The custom field definition in the custom object
    CustomObjectCustomFieldsDefinition:
      title: customObjectCustomFieldDefinition
      type: object
      additionalProperties:
        $ref: "#/components/schemas/CustomObjectCustomFieldDefinition"
      description: The custom field definition in the custom object definition
    CustomObjectDefinition:
      title: customObjectDefinition
      type: object
      properties:
        CreatedById:
          type: string
          description: The creator's Id
          format: uuid
        CreatedDate:
          type: string
          description: The creation time of the custom object definition in date-time
            format.
          format: date-time
        Id:
          type: string
          description: The unique Id of the custom object definition
          format: uuid
        UpdatedById:
          type: string
          description: The modifier's Id
          format: uuid
        UpdatedDate:
          type: string
          description: The update time of the custom object definition in date-time format.
          format: date-time
        schema:
          type: object
          properties:
            filterable:
              type: array
              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
            label:
              type: string
              description: A label for the custom object
            object:
              type: string
              description: The API name of the custom object
            properties:
              $ref: "#/components/schemas/CustomObjectAllFieldsDefinition"
            relationships:
              type: array
              description: An array of relationships with Zuora objects or other custom
                objects
              items:
                type: object
                properties:
                  cardinality:
                    type: string
                    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.
                    default: manyToOne
                    enum:
                      - manyToOne
                      - oneToMany
                  fields:
                    $ref: "#/components/schemas/FieldsAdditionalProperties"
                  namespace:
                    type: string
                    description: The namespace where the related object is located
                  object:
                    type: string
                    description: The API name of the related object
            required:
              type: array
              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:
              type: string
              description: The custom object definition type. Can only be `object` currently.
              enum:
                - object
          description: The schema of the custom object definition
        type:
          type: string
          description: The API name of the custom object
      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:
          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
            - cardinality: manyToOne
              fields:
                work_address__c: Id
              namespace: default
              object: address
            - cardinality: oneToMany
              fields:
                Id: person_id__c
              namespace: default
              object: car
            - cardinality: oneToMany
              fields:
                Id: person_id__c
              namespace: default
              object: device
          required:
            - last_name__c
            - marital_status__c
          type: object
        type: person
    CustomObjectDefinitionUpdateActionRequest:
      required:
        - namespace
        - object
        - type
      type: object
      properties:
        description:
          type: string
          description: Optional property for `updateObject` action
        field:
          $ref: "#/components/schemas/UpdateCustomObjectCusotmField"
        label:
          type: string
          description: Optional property for `updateObject` action
        namespace:
          type: string
          description: The namespace of the custom object definition to be updated
        object:
          type: string
          description: The API name of the custom object definition to be updated
        relationship:
          required:
            - fields
            - namespace
            - object
          type: object
          properties:
            cardinality:
              type: string
              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
            fields:
              $ref: "#/components/schemas/FieldsAdditionalProperties"
            namespace:
              type: string
              description: The namespace where the related object is located
            object:
              type: string
              description: The API name of the related object
        type:
          type: string
          description: The type of the updating action on a custom object definition
          enum:
            - addField
            - deleteField
            - updateField
            - updateObject
            - renameField
            - addRelationship
            - deleteRelationship
      example:
        field:
          definition:
            description: Address zip code
            label: Zip code
            maxLength: 10
            type: string
          name: zip__c
        namespace: default
        object: address
        type: addField
    CustomObjectDefinitionUpdateActionResponse:
      type: object
      properties:
        description:
          type: string
          description: Optional property for `updateObject` action
        field:
          $ref: "#/components/schemas/UpdateCustomObjectCusotmField"
        label:
          type: string
          description: Optional property for `updateObject` action
        namespace:
          type: string
          description: The namespace of the custom object definition to be updated
        object:
          type: string
          description: The API name of the custom object definition to be updated
        relationship:
          type: object
          properties:
            cardinality:
              type: string
              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.
              default: manyToOne
              enum:
                - manyToOne
                - oneToMany
            fields:
              $ref: "#/components/schemas/FieldsAdditionalProperties"
            namespace:
              type: string
              description: The namespace where the related object is located
            object:
              type: string
              description: The API name of the related object
        type:
          type: string
          description: The type of the updating action on a custom object definition
          enum:
            - addField
            - deleteField
            - updateField
            - updateObject
            - renameField
            - addRelationship
            - deleteRelationship
      example:
        field:
          definition:
            description: Address zip code
            label: Zip code
            maxLength: 10
            type: string
          name: zip__c
        namespace: default
        object: address
        type: addField
    CustomObjectDefinitions:
      title: customObjectDefinitions
      type: object
      additionalProperties:
        $ref: "#/components/schemas/CustomObjectDefinition"
      description: The custom object definitions. This object maps types to custom
        object definitions.
    CustomObjectRecordBatchAction:
      title: updateDeleteBatchAction
      required:
        - type
      type: object
      properties:
        ids:
          type: array
          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:
            type: object
            format: uuid
        records:
          $ref: "#/components/schemas/CustomObjectRecordBatchUpdateMapping"
        type:
          type: string
          description: The type of the batch action
          enum:
            - delete
            - update
      description: The batch action on custom object records
    CustomObjectRecordBatchActionResult:
      required:
        - type
      type: object
      properties:
        type:
          type: string
          description: The type of the performed batch action
          example: update
          enum:
            - delete
            - update
        unprocessedIds:
          type: array
          description: Ids of records that are not successfully processed.
          example:
            - 64edb2a5-2796-4e95-9559-846f8636a01b
            - dbfb35a3-dd2b-42c9-b8f7-eb36fed1a1e1
            - 2c2a1810-bfef-4150-84de-50e769978e42
          items:
            type: string
            format: uuid
    CustomObjectRecordBatchRequest:
      required:
        - action
      type: object
      properties:
        action:
          $ref: "#/components/schemas/CustomObjectRecordBatchAction"
      description: Request of processing custom object records in batch.
      example:
        action:
          records:
            64edb2a5-2796-4e95-9559-846f8636a01b:
              name__c: elba43
              person_id__c: 30c52793-8f06-41c6-b623-04829710d7a
          type: update
    CustomObjectRecordBatchResponse:
      type: object
      properties:
        result:
          $ref: "#/components/schemas/CustomObjectRecordBatchActionResult"
    CustomObjectRecordBatchUpdateMapping:
      title: updateIdFieldsMapping
      type: object
      additionalProperties:
        type: object
        properties: {}
        description: Map of object Id and associated custom fields data to be updated
      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
    CustomObjectRecordWithAllFields:
      title: customObjectRecord
      description: Record data from an object
      allOf:
        - type: object
          properties:
            CreatedById:
              type: string
              description: The creator's Id
            CreatedDate:
              type: string
              description: The record creation time in the date-time format
              format: date-time
            Id:
              type: string
              description: The unique Id of the custom object record
              format: uuid
            UpdatedById:
              type: string
              description: The modifier's Id
            UpdatedDate:
              type: string
              description: The record modification time in the date-time format
              format: date-time
            type:
              type: string
              description: The type of the custom object record. It is the API name of the
                custom object definition.
        - $ref: "#/components/schemas/CustomObjectRecordWithOnlyCustomFields"
    CustomObjectRecordWithOnlyCustomFields:
      title: customObjectRecord
      type: object
      additionalProperties:
        type: object
        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
    CustomObjectsNamespace:
      type: object
      properties:
        CreatedById:
          type: string
          description: The Id of the namespace creator.
          example: 58bcc694-0b01-4c38-83d9-679891aee4dc
        CreatedDate:
          type: string
          description: The date-time when the namespace is created.
          example: 2017-05-25T16:13:12.629Z
        Id:
          type: string
          description: The unique ID of the namespace.
          format: uuid
          example: 3a13cb7f-5d2b-4f77-bb14-a1affb4c3ae3
        UpdatedById:
          type: string
          description: The Id of the user who updates the namespace most recently.
          example: 58bcc694-0b01-4c38-83d9-679891aee4dc
        UpdatedDate:
          type: string
          description: The date-time when the namespace is last updated.
          example: 2017-05-25T16:13:12.629Z
        name:
          type: string
          description: The name of the custom object namespace.
          example: com_mycompany
        origin:
          type: string
          description: Specifies the namespace is either a custom or system namespace.
          enum:
            - custom
            - system
      description: The namespaces for custom object definitions.
    DELETEntityResponseType:
      type: object
      properties:
        success:
          type: boolean
          description: Returns `true` if the request is successful.
    DataAccessControlField:
      title: dataAccessControlField
      type: object
      additionalProperties:
        type: string
        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.
      description: |
        Container for the data access control field.
    DataQueryErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: |
            Error code.
        message:
          type: string
          description: |
            Error message.
    DataQueryJob:
      title: queryJob
      description: |
        A data query job.
      allOf:
        - $ref: "#/components/schemas/DataQueryJobCommon"
        - type: object
          properties:
            dataFile:
              type: string
              description: >
                The URL of the query results. Only applicable if the value of
                the `queryStatus` field is `completed`.
              format: URL
            outputRows:
              type: integer
              description: >
                The number of rows the query results. Only applicable if the
                value of the `queryStatus` field is `completed`.
            processingTime:
              type: integer
              description: >
                Processing time of the query job, in milliseconds. Only
                applicable if the value of the `queryStatus` field is
                `completed`.
            queryStatus:
              type: string
              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 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
    DataQueryJobCancelled:
      title: cancelledQueryJob
      description: |
        A cancelled data query job.
      allOf:
        - $ref: "#/components/schemas/DataQueryJobCommon"
        - type: object
          properties:
            queryStatus:
              type: string
              description: |
                Status of the query job.
              enum:
                - cancelled
    DataQueryJobCommon:
      type: object
      properties:
        id:
          maxLength: 64
          minLength: 64
          type: string
          description: |
            Internal identifier of the query job.
          format: uuid
        query:
          type: string
          description: |
            The query that was submitted.
        remainingRetries:
          type: integer
          description: >
            The number of times that Zuora will retry the query if Zuora is
            unable to perform the query.
        updatedOn:
          type: string
          description: >
            Date and time when the query job was last updated, in ISO 8601
            format.
          format: date-time
    DebitMemoEntityPrefix:
      title: debitMemo
      type: object
      properties:
        prefix:
          type: string
          description: |
            The prefix of debit memos.
          example: DM
        startNumber:
          type: integer
          description: |
            The starting document number of debit memos.
          example: 10
      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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
    DebitMemoFromChargeDetailType:
      title: charges
      allOf:
        - required:
            - chargeId
            - productRatePlanChargeId
          type: object
          properties:
            amount:
              type: number
              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
            chargeId:
              type: string
              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.
            comment:
              maxLength: 255
              minLength: 0
              type: string
              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.
            description:
              maxLength: 255
              minLength: 0
              type: string
              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.
            financeInformation:
              type: object
              properties:
                deferredRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the deferred revenue, such as
                    Monthly Recurring Liability.
                recognizedRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the recognized revenue, such as
                    Monthly Recurring Charges or Overage Charges.
                revenueRecognitionRuleName:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The name of the revenue recognition rule governing the
                    revenue schedule.
              description: >
                Container for the finance information related to the product
                rate plan charge associated with the debit memo.
            memoItemAmount:
              type: number
              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
            productRatePlanChargeId:
              type: string
              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.
            quantity:
              type: number
              description: |
                The number of units for the debit memo item.
              format: double
            serviceEndDate:
              type: string
              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
            serviceStartDate:
              type: string
              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
        - $ref: "#/components/schemas/DebitMemoItemObjectCustomFields"
    DebitMemoFromChargeType:
      title: charges
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              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.
            accountNumber:
              type: string
              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.
            autoPay:
              type: boolean
              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.
            charges:
              type: array
              description: |
                Container for product rate plan charges.
              items:
                $ref: "#/components/schemas/DebitMemoFromChargeDetailType"
            comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Comments about the debit memo.
            effectiveDate:
              type: string
              description: |
                The date when the debit memo takes effect.
              format: date
            reasonCode:
              type: string
              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.
        - $ref: "#/components/schemas/DebitMemoObjectNSFields"
        - $ref: "#/components/schemas/DebitMemoObjectCustomFields"
    DebitMemoFromInvoiceType:
      allOf:
        - type: object
          properties:
            autoPay:
              type: boolean
              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.
            comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Comments about the debit memo. 
            effectiveDate:
              type: string
              description: |
                The date when the debit memo takes effect.
              format: date
            invoiceId:
              type: string
              description: |
                The ID of the invoice that the debit memo is created from.
            items:
              type: array
              description: |
                Container for items.
              items:
                $ref: "#/components/schemas/DebitMemoItemFromInvoiceItemType"
            reasonCode:
              type: string
              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.
            taxAutoCalculation:
              type: boolean
              description: |
                Whether to automatically calculate taxes in the debit memo.
              default: true
        - $ref: "#/components/schemas/DebitMemoObjectNSFields"
        - $ref: "#/components/schemas/DebitMemoObjectCustomFields"
    DebitMemoItemFromInvoiceItemType:
      title: items
      allOf:
        - required:
            - amount
            - skuName
          type: object
          properties:
            amount:
              type: number
              description: |
                The amount of the debit memo item.
              format: double
            comment:
              type: string
              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.
            description:
              type: string
              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.
            financeInformation:
              type: object
              properties:
                deferredRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the deferred revenue, such as
                    Monthly Recurring Liability.
                recognizedRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the recognized revenue, such as
                    Monthly Recurring Charges or Overage Charges.
                revenueRecognitionRuleName:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The name of the revenue recognition rule governing the
                    revenue schedule.
              description: >
                Container for the finance information related to the debit memo
                item.
            invoiceItemId:
              type: string
              description: |
                The ID of the invoice item.
            quantity:
              type: number
              description: |
                The number of units for the debit memo item.
              format: double
            serviceEndDate:
              type: string
              description: |
                The service end date of the debit memo item.
              format: date
            serviceStartDate:
              type: string
              description: |
                The service start date of the debit memo item. 
              format: date
            skuName:
              type: string
              description: |
                The name of the SKU.
            taxItems:
              type: array
              description: |
                Container for taxation items.
              items:
                $ref: "#/components/schemas/DebitMemoTaxItemFromInvoiceTaxItemType"
            unitOfMeasure:
              type: string
              description: |
                The definable unit that you measure when determining charges.
        - $ref: "#/components/schemas/DebitMemoItemObjectCustomFields"
    DebitMemoItemObjectCustomFields:
      title: debitMemoItemFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    DebitMemoObjectCustomFields:
      title: debitMemoFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    DebitMemoObjectNSFields:
      title: debitMemoFieldsNS
      type: object
      properties:
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
      description: >
        Container for Debit Memo fields provided by the [Zuora Connector for
        NetSuite](https://www.zuora.com/connect/app/?appId=265).
    DebitMemoTaxItemFromInvoiceTaxItemType:
      title: taxItems
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the debit memo taxation item.
          format: double
        financeInformation:
          type: object
          properties:
            salesTaxPayableAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: |
                The accounting code for the sales taxes payable.
          description: >
            Container for the finance information related to the source taxation
            item.
        jurisdiction:
          type: string
          description: >
            The jurisdiction that applies the tax or VAT. This value is
            typically a state, province, county, or city.
        locationCode:
          type: string
          description: >
            The identifier for the location based on the value of the `taxCode`
            field.
        sourceTaxItemId:
          type: string
          description: |
            The ID of the source taxation item.
        taxCode:
          type: string
          description: >
            The tax code identifies which tax rules and tax rates to apply to a
            specific debit memo.
        taxCodeDescription:
          type: string
          description: |
            The description of the tax code.
        taxDate:
          type: string
          description: >
            The date that the tax is applied to the debit memo, in `yyyy-mm-dd`
            format.
          format: date
        taxExemptAmount:
          type: number
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
        taxName:
          type: string
          description: |
            The name of taxation.
        taxRate:
          type: number
          description: |
            The tax rate applied to the debit memo.
          format: double
        taxRateDescription:
          type: string
          description: |
            The description of the tax rate.
        taxRateType:
          type: string
          description: |
            The type of the tax rate applied to the debit memo.
          enum:
            - Percentage
            - FlatFee
    DeleteDataQueryJobResponse:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/DataQueryJobCancelled"
    DeleteResult:
      type: object
      properties:
        errors:
          type: array
          description: |
            If the delete failed, this contains an array of Error objects.
          items:
            $ref: "#/components/schemas/ActionsErrorResponse"
        id:
          type: string
          description: |
            ID of the deleted object.
        success:
          type: boolean
          description: >
            A boolean field indicating the success of the delete operation. If
            the delete was successful, it is `true`. Otherwise, `false`.
    DeleteWorkflowError:
      type: object
      properties:
        Errors:
          type: array
          description: The error messages
          items:
            type: string
    DeleteWorkflowSuccess:
      type: object
      properties:
        id:
          type: string
          description: The id of the deleted workflow
        success:
          type: boolean
          description: The indicator for whether the deletion was a success
    DiscountPricingOverride:
      title: discount
      type: object
      properties:
        applyDiscountTo:
          type: string
          description: |
            Specifies which type of charge the discount charge applies to.
          enum:
            - ONETIME
            - RECURRING
            - USAGE
            - ONETIMERECURRING
            - ONETIMEUSAGE
            - RECURRINGUSAGE
            - ONETIMERECURRINGUSAGE
        discountAmount:
          type: number
          description: |
            Only applicable if the discount charge is a fixed-amount discount.
        discountLevel:
          type: string
          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
        discountPercentage:
          type: number
          description: |
            Only applicable if the discount charge is a percentage discount.
        priceChangeOption:
          type: string
          description: >
            Specifies how Zuora changes the price of the charge each time the
            subscription renews.
          enum:
            - NoChange
            - UseLatestProductCatalogPricing
      description: |
        Pricing information about a discount charge.
    DiscountPricingUpdate:
      type: object
      properties:
        discountPercentage:
          type: number
          description: >
            The amount of the discount as a percentage. This field is only used
            for percentage discounts.
        priceChangeOption:
          type: string
          description: >
            Specifies how Zuora changes the price of the charge each time the
            subscription renews.
          enum:
            - NoChange
            - UseLatestProductCatalogPricing
    ElectronicPaymentOptions:
      type: object
      properties:
        PaymentMethodId:
          type: string
          description: ""
    EndConditions:
      title: endDate
      type: object
      properties:
        endDateCondition:
          type: string
          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
        specificEndDate:
          type: string
          description: >
            Date in YYYY-MM-DD format. Only applicable if the value of the
            `endDateCondition` field is `Specific_End_Date`.
          format: date
        upToPeriods:
          type: integer
          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`.
        upToPeriodsType:
          type: string
          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
      description: |
        Specifies when a charge becomes inactive.
    ErrorResponse:
      type: object
      properties:
        reasons:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: |
                  The error code of response.
              message:
                type: string
                description: The detail information of the error response
      example:
        reasons:
          - code: ObjectNotFound
            message: Notification definition with id 6e569e1e05f040eda51a927b140c0ac1 does
              not exist
    EventRevenueItemType:
      title: revenueItems
      allOf:
        - required:
            - accountingPeriodName
          type: object
          properties:
            accountingPeriodName:
              type: string
              description: >
                Name of the accounting period. The open-ended accounting period
                is named `Open-Ended`.
        - $ref: "#/components/schemas/RevenueEventItemObjectCustomFields"
    EventTrigger:
      type: object
      properties:
        active:
          type: boolean
          description: The status of the trigger.
        baseObject:
          maxLength: 100
          minLength: 1
          type: string
          description: "The base object that the trigger rule is defined upon. Should be
            specified in the pattern: ^[A-Z][\\\\w\\\\-]*$"
        condition:
          maxLength: 5000
          minLength: 1
          type: string
          description: The JEXL expression to be evaluated against object changes. See
            above for more information and an example.
        description:
          maxLength: 1000
          type: string
          description: The description of the trigger.
        eventType:
          $ref: "#/components/schemas/EventType"
        id:
          type: string
          format: uuid
    EventType:
      required:
        - displayName
        - name
      type: object
      properties:
        description:
          maxLength: 1000
          type: string
          description: The description of the event type.
        displayName:
          maxLength: 500
          minLength: 1
          type: string
          description: The display name for the event type.
        name:
          maxLength: 200
          minLength: 1
          type: string
          description: "The name of the event. Should be unique, contain no space, and be
            in the pattern: ^[A-Za-z]{1,}[\\\\w\\\\-]*$"
    ExecuteResult:
      type: object
      properties:
        Errors:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/ActionsErrorResponse"
        Id:
          type: string
          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.
        Success:
          type: boolean
          description: >
            Returns `true` if the call was processed successfully, otherwise
            `false`.
    ExternalPaymentOptions:
      type: object
      properties:
        Amount:
          type: number
          description: ""
          format: double
        EffectiveDate:
          type: string
          description: ""
          format: date
        GatewayOrderId:
          type: string
          description: ""
        PaymentMethodId:
          type: string
          description: ""
        ReferenceId:
          type: string
          description: ""
    FeatureObjectCustomFields:
      title: featureFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    FieldsAdditionalProperties:
      title: relationshipFieldMapping
      type: object
      additionalProperties:
        type: string
      description: >
        Field mappings in the form of `<this-object-field-name>`:
        `<other-object-field-name>`.
    FieldsAdditionalPropertiesForPostDefinition:
      title: relationshipFieldMapping
      type: object
      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.
    FilterRuleParameterDefinition:
      title: parameter
      type: object
      properties:
        description:
          maxLength: 255
          type: string
        displayName:
          maxLength: 255
          type: string
          description: |
            The display name of the parameter.
        options:
          type: array
          description: |
            The option values of the parameter.
          items:
            type: string
        valueType:
          type: string
          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
      description: |
        Definition of a filter rule parameter.
    FilterRuleParameterDefinitions:
      title: parameters
      type: object
      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`
    FilterRuleParameterValues:
      title: filterRuleParams
      type: object
      additionalProperties:
        type: string
        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.
      description: |
        The parameter values used to configure the filter rule.
    GETAPaymentGatwayResponse:
      title: paymentgateways
      type: object
      properties:
        id:
          type: string
          description: The ID of the payment gateway.
        isActive:
          type: boolean
          description: Specifies if this payment gateway is in active status.
        isDefault:
          type: boolean
          description: Specifies if this is the default payment gateway to process
            payments for your customer accounts.
        name:
          type: string
          description: The name of the payment gateway.
        type:
          type: string
          description: The type of the payment gateway
    GETARPaymentType:
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                The ID of the customer account that the payment is for.
            amount:
              type: number
              description: |
                The total amount of the payment.
              format: double
            appliedAmount:
              type: number
              description: |
                The applied amount of the payment.
              format: double
            authTransactionId:
              type: string
              description: |
                The authorization transaction ID from the payment gateway.
            bankIdentificationNumber:
              type: string
              description: >
                The first six digits of the credit card or debit card used for
                the payment, when applicable.
            cancelledOn:
              type: string
              description: >
                The date and time when the payment was cancelled, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            comment:
              type: string
              description: |
                Comments about the payment.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the payment.
            createdDate:
              type: string
              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
            creditBalanceAmount:
              type: number
              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
            currency:
              type: string
              description: |
                A currency defined in the web-based UI administrative settings.
            effectiveDate:
              type: string
              description: >
                The date and time when the payment takes effect, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            financeInformation:
              type: object
              properties:
                bankAccountAccountingCode:
                  type: string
                  description: >
                    The accounting code that maps to a bank account in your
                    accounting system.
                bankAccountAccountingCodeType:
                  type: string
                  description: >
                    The type of the accounting code that maps to a bank account
                    in your accounting system.
                transferredToAccounting:
                  type: string
                  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
                unappliedPaymentAccountingCode:
                  type: string
                  description: |
                    The accounting code for the unapplied payment.
                unappliedPaymentAccountingCodeType:
                  type: string
                  description: |
                    The type of the accounting code for the unapplied payment.
              description: |
                Container for the finance information related to the payment.
            gatewayId:
              type: string
              description: |
                The ID of the gateway instance that processes the payment.
            gatewayOrderId:
              type: string
              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.
            gatewayResponse:
              type: string
              description: >
                The message returned from the payment gateway for the payment.
                This message is gateway-dependent.
            gatewayResponseCode:
              type: string
              description: >
                The code returned from the payment gateway for the payment. This
                code is gateway-dependent.
            gatewayState:
              type: string
              description: >
                The status of the payment in the gateway; use for reconciliation.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
            id:
              type: string
              description: >
                The unique ID of the created payment. For example,
                4028905f5a87c0ff015a87eb6b75007f.
            markedForSubmissionOn:
              type: string
              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
            number:
              type: string
              description: >
                The unique identification number of the payment. For example,
                P-00000001.
            paymentMethodId:
              type: string
              description: >
                The unique ID of the payment method that the customer used to
                make the payment.
            paymentMethodSnapshotId:
              type: string
              description: >
                The unique ID of the payment method snapshot which is a copy of
                the particular Payment Method used in a transaction.
            referenceId:
              type: string
              description: >
                The transaction ID returned by the payment gateway. Use this
                field to reconcile payments between your gateway and Zuora
                Payments.
            refundAmount:
              type: number
              description: |
                The amount of the payment that is refunded.
              format: double
            secondPaymentReferenceId:
              type: string
              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.
            settledOn:
              type: string
              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
            softDescriptor:
              type: string
              description: >
                A payment gateway-specific field that maps to Zuora for the
                gateways, Orbital, Vantiv and Verifi.
            softDescriptorPhone:
              type: string
              description: >
                A payment gateway-specific field that maps to Zuora for the
                gateways, Orbital, Vantiv and Verifi.
            status:
              type: string
              description: |
                The status of the payment.
              enum:
                - Draft
                - Processing
                - Processed
                - Error
                - Canceled
                - Posted
            submittedOn:
              type: string
              description: >
                The date and time when the payment was submitted, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
            type:
              type: string
              description: |
                The type of the payment.
              enum:
                - External
                - Electronic
            unappliedAmount:
              type: number
              description: |
                The unapplied amount of the payment.
              format: double
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the payment.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
    GETARPaymentTypewithSuccess:
      title: payments
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                The ID of the customer account that the payment is for.
            amount:
              type: number
              description: |
                The total amount of the payment.
              format: double
            appliedAmount:
              type: number
              description: |
                The applied amount of the payment.
              format: double
            authTransactionId:
              type: string
              description: |
                The authorization transaction ID from the payment gateway.
            bankIdentificationNumber:
              type: string
              description: >
                The first six digits of the credit card or debit card used for
                the payment, when applicable.
            cancelledOn:
              type: string
              description: >
                The date and time when the payment was cancelled, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            comment:
              type: string
              description: |
                Comments about the payment.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the payment part.
            createdDate:
              type: string
              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
            creditBalanceAmount:
              type: number
              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
            currency:
              type: string
              description: >
                A currency defined in the web-based UI administrative settings.


                For more information about the supported currencies and , see [ISO Currency Codes] (https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/D_Country%2C_State%2C_and_Province_Codes/D_Currencies_and_Their_3-Letter_Codes).
            effectiveDate:
              type: string
              description: >
                The date and time when the payment takes effect, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            financeInformation:
              type: object
              properties:
                bankAccountAccountingCode:
                  type: string
                  description: >
                    The accounting code that maps to a bank account in your
                    accounting system.
                bankAccountAccountingCodeType:
                  type: string
                  description: >
                    The type of the accounting code that maps to a bank account
                    in your accounting system.
                transferredToAccounting:
                  type: string
                  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
                unappliedPaymentAccountingCode:
                  type: string
                  description: |
                    The accounting code for the unapplied payment.
                unappliedPaymentAccountingCodeType:
                  type: string
                  description: |
                    The type of the accounting code for the unapplied payment.
              description: |
                Container for the finance information related to the payment.
            gatewayId:
              type: string
              description: |
                The ID of the gateway instance that processes the payment.
            gatewayOrderId:
              type: string
              description: >
                A merchant-specified natural key value that can be passed to the
                electronic payment gateway when a payment is created.
            gatewayResponse:
              type: string
              description: >
                The message returned from the payment gateway for the payment.
                This message is gateway-dependent.
            gatewayResponseCode:
              type: string
              description: >
                The code returned from the payment gateway for the payment. This
                code is gateway-dependent.
            gatewayState:
              type: string
              description: >
                The status of the payment in the gateway; use for
                reconciliation. 
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
            id:
              type: string
              description: >
                The unique ID of the payment. For example,
                4028905f5a87c0ff015a87eb6b75007f.
            markedForSubmissionOn:
              type: string
              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
            number:
              type: string
              description: >
                The unique identification number of the payment. For example,
                P-00000001.
            paymentMethodId:
              type: string
              description: >
                The unique ID of the payment method that the customer used to
                make the payment.
            paymentMethodSnapshotId:
              type: string
              description: >
                The unique ID of the payment method snapshot which is a copy of
                the particular Payment Method used in a transaction.
            referenceId:
              type: string
              description: >
                The transaction ID returned by the payment gateway. Use this
                field to reconcile payments between your gateway and Zuora
                Payments.
            refundAmount:
              type: number
              description: |
                The amount of the payment that is refunded.
              format: double
            secondPaymentReferenceId:
              type: string
              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.
            settledOn:
              type: string
              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
            softDescriptor:
              type: string
              description: >
                A payment gateway-specific field that maps to Zuora for the
                gateways, Orbital, Vantiv and Verifi.
            softDescriptorPhone:
              type: string
              description: >
                A payment gateway-specific field that maps to Zuora for the
                gateways, Orbital, Vantiv and Verifi.
            status:
              type: string
              description: |
                The status of the payment.
              enum:
                - Draft
                - Processing
                - Processed
                - Error
                - Canceled
                - Posted
            submittedOn:
              type: string
              description: >
                The date and time when the payment was submitted, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            type:
              type: string
              description: |
                The type of the payment.
              enum:
                - External
                - Electronic
            unappliedAmount:
              type: number
              description: |
                The unapplied amount of the payment.
              format: double
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the payment.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
    GETAccountSummaryInvoiceType:
      title: invoices
      type: object
      properties:
        amount:
          type: string
          description: |
            Invoice amount before adjustments, discounts, and similar items.
          format: decimal
        balance:
          type: string
          description: |
            Balance due on the invoice.
          format: decimal
        dueDate:
          type: string
          description: |
            Due date as `yyyy-mm-dd`.
          format: date
        id:
          type: string
          description: |
            Invoice ID.
        invoiceDate:
          type: string
          description: |
            Invoice date as `yyyy-mm-dd`.
          format: date
        invoiceNumber:
          type: string
          description: |
            Invoice number.
        status:
          type: string
          description: >
            Invoice status - not the payment status of the invoice, just the
            status of the invoice itself. Possible values are: `Posted`,
            `Draft`, `Canceled`, `Error`.
    GETAccountSummaryPaymentInvoiceType:
      title: paidInvoices
      type: object
      properties:
        appliedPaymentAmount:
          type: string
          description: |
            Amount of payment applied to the invoice.
          format: decimal
        invoiceId:
          type: string
          description: |
            Invoice ID.
        invoiceNumber:
          type: string
          description: |
            Invoice number.
    GETAccountSummaryPaymentType:
      title: payments
      type: object
      properties:
        effectiveDate:
          type: string
          description: |
            Effective date as `yyyy-mm-dd`.
          format: date
        id:
          type: string
          description: |
            Payment ID.
        paidInvoices:
          type: array
          description: |
            Container for paid invoices for this subscription.
          items:
            $ref: "#/components/schemas/GETAccountSummaryPaymentInvoiceType"
        paymentNumber:
          type: string
          description: |
            Payment number.
        paymentType:
          type: string
          description: |
            Payment type; possible values are: `External`, `Electronic`.
        status:
          type: string
          description: >
            Payment status. Possible values are: `Draft`, `Processing`,
            `Processed`, `Error`, `Voided`, `Canceled`, `Posted`.
    GETAccountSummarySubscriptionRatePlanType:
      title: ratePlans
      type: object
      properties:
        productId:
          type: string
          description: |
            Product ID.
        productName:
          type: string
          description: |
            Product name.
        productRatePlanId:
          type: string
          description: |
            Product Rate Plan ID.
        productSku:
          type: string
          description: ""
        ratePlanName:
          type: string
          description: |
            Rate plan name.
    GETAccountSummarySubscriptionType:
      title: subscriptions
      allOf:
        - type: object
          properties:
            autoRenew:
              type: boolean
              description: >
                If `true`, auto-renew is enabled. If `false`, auto-renew is
                disabled.
            id:
              type: string
              description: |
                Subscription ID.
            initialTerm:
              type: string
              description: |
                Duration of the initial subscription term in whole months. 
            ratePlans:
              type: array
              description: |
                Container for rate plans for this subscription.
              items:
                $ref: "#/components/schemas/GETAccountSummarySubscriptionRatePlanType"
            renewalTerm:
              type: string
              description: |
                Duration of the renewal term in whole months.
            status:
              type: string
              description: >
                Subscription status; possible values are: `Draft`,
                `PendingActivation`, `PendingAcceptance`, `Active`, `Cancelled`,
                `Expired`.
            subscriptionNumber:
              type: string
              description: |
                Subscription Number.
            subscriptionStartDate:
              type: string
              description: |
                Subscription start date.
              format: date
            termEndDate:
              type: string
              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
            termStartDate:
              type: string
              description: >
                Start date of the subscription term. If this is a renewal
                subscription, this date is different than the subscription start
                date.
              format: date
            termType:
              type: string
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    GETAccountSummaryType:
      type: object
      properties:
        basicInfo:
          $ref: "#/components/schemas/GETAccountSummaryTypeBasicInfo"
        billToContact:
          $ref: "#/components/schemas/GETAccountSummaryTypeBillToContact"
        invoices:
          type: array
          description: |
            Container for invoices. Only returns the last 6 invoices.
          items:
            $ref: "#/components/schemas/GETAccountSummaryInvoiceType"
        payments:
          type: array
          description: |
            Container for payments. Only returns the last 6 payments.
          items:
            $ref: "#/components/schemas/GETAccountSummaryPaymentType"
        soldToContact:
          $ref: "#/components/schemas/GETAccountSummaryTypeSoldToContact"
        subscriptions:
          type: array
          description: |
            Container for subscriptions.
          items:
            $ref: "#/components/schemas/GETAccountSummarySubscriptionType"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        taxInfo:
          type: object
          properties:
            VATId:
              type: string
              description: |
                EU Value Added Tax ID.
            companyCode:
              type: string
              description: |
                Unique code that identifies a company account in Avalara.
            exemptCertificateId:
              type: string
              description: |
                ID of the customer tax exemption certificate.
            exemptCertificateType:
              type: string
              description: |
                Type of tax exemption certificate that the customer holds.
            exemptDescription:
              type: string
              description: >
                Description of the tax exemption certificate that the customer
                holds.
            exemptEffectiveDate:
              type: string
              description: |
                Date when the customer tax exemption starts.
              format: date
            exemptEntityUseCode:
              maxLength: 64
              type: string
              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.
            exemptExpirationDate:
              type: string
              description: |
                Date when the customer tax exemption expires.
              format: date
            exemptIssuingJurisdiction:
              type: string
              description: >
                Jurisdiction in which the customer tax exemption certificate was
                issued.
            exemptStatus:
              type: string
              description: |
                Status of the account tax exemption.
          description: >
            Container for tax exempt information, used to establish the tax
            exempt status of a customer account.
        usage:
          type: array
          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"
    GETAccountSummaryTypeBasicInfo:
      title: basicInfo
      description: |
        Container for basic information about the account.
      allOf:
        - type: object
          properties:
            accountNumber:
              type: string
              description: |
                Account number.
            additionalEmailAddresses:
              type: array
              description: >
                A list of additional email addresses to receive emailed invoices.
              items:
                type: string
            balance:
              type: string
              description: |
                Current outstanding balance.
              format: decimal
            batch:
              type: string
              description: >
                The alias name given to a batch. A string of 50 characters or
                less.
            billCycleDay:
              type: string
              description: >
                Billing cycle day (BCD), the day of the month when a bill run
                generates invoices for the account.
            currency:
              type: string
              description: |
                A currency as defined in Billing Settings in the Zuora UI.
            defaultPaymentMethod:
              type: object
              properties:
                creditCardExpirationMonth:
                  type: string
                  description: |
                    Two-digit numeric card expiration month as `mm`.
                creditCardExpirationYear:
                  type: string
                  description: |
                    Four-digit card expiration year as `yyyy`.
                creditCardNumber:
                  type: string
                  description: >
                    Credit card number, 16 characters or less, displayed in
                    masked format (e.g., ************1234).
                creditCardType:
                  type: string
                  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).
                id:
                  type: string
                  description: >
                    The ID of the credit card payment method associated with
                    this account.
                paymentMethodType:
                  type: string
                  description: ""
              description: ""
            id:
              type: string
              description: |
                Account ID.
            invoiceDeliveryPrefsEmail:
              type: boolean
              description: |
                Whether the customer wants to receive invoices through email. 
            invoiceDeliveryPrefsPrint:
              type: boolean
              description: >
                Whether the customer wants to receive printed invoices, such as
                through postal mail.
            lastInvoiceDate:
              type: string
              description: >
                Date of the most recent invoice for the account; null if no
                invoice has ever been generated.
              format: date
            lastPaymentAmount:
              type: string
              description: >
                Amount of the most recent payment collected for the account;
                null if no payment has ever been collected.
              format: decimal
            lastPaymentDate:
              type: string
              description: >
                Date of the most recent payment collected for the account. Null
                if no payment has ever been collected.
              format: date
            name:
              type: string
              description: |
                Account name.
            status:
              type: string
              description: >
                Account status; possible values are: `Active`, `Draft`,
                `Canceled`.
            tags:
              type: string
              description: ""
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
    GETAccountSummaryTypeBillToContact:
      title: Contact
      description: Container for bill-to contact information.
      allOf:
        - type: object
          properties:
            address1:
              type: string
              description: |
                First address line, 255 characters or less.
            address2:
              type: string
              description: |
                Second address line, 255 characters or less.
            city:
              type: string
              description: |
                City, 40 characters or less.
            country:
              type: string
              description: >
                Full country name. This field does not contain the ISO-standard
                abbreviation of the country name.
            county:
              type: string
              description: "County; 32 characters or less. Zuora Tax uses this information to
                calculate county taxation.          "
            fax:
              type: string
              description: |
                Fax phone number, 40 characters or less.
            firstName:
              type: string
              description: |
                First name, 100 characters or less.
            id:
              type: string
              description: |
                Contact ID.
            lastName:
              type: string
              description: |
                Last name, 100 characters or less.
            state:
              type: string
              description: >
                Full state name. This field does not contain the ISO-standard
                abbreviation of the state name.
            taxRegion:
              type: string
              description: |
                A region string, defined in your Zuora tax rules.
            workEmail:
              type: string
              description: |
                Work email address, 80 characters or less.
            workPhone:
              type: string
              description: |
                Work phone number, 40 characters or less.
            zipCode:
              type: string
              description: |
                Zip code, 20 characters or less.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    GETAccountSummaryTypeSoldToContact:
      title: Contact
      description: >
        Container for sold-to contact information; uses the same structure as
        `billToContact`.
      allOf:
        - type: object
          properties:
            address1:
              type: string
              description: |
                First address line, 255 characters or less.
            address2:
              type: string
              description: |
                Second address line, 255 characters or less.
            city:
              type: string
              description: |
                City, 40 characters or less.
            country:
              type: string
              description: >
                Full country name. This field does not contain the ISO-standard
                abbreviation of the country name.
            county:
              type: string
              description: "County; 32 characters or less. Zuora Tax uses this information to
                calculate county taxation.          "
            fax:
              type: string
              description: |
                Fax phone number, 40 characters or less.
            firstName:
              type: string
              description: |
                First name, 100 characters or less.
            id:
              type: string
              description: |
                Contact ID.
            lastName:
              type: string
              description: |
                Last name, 100 characters or less.
            state:
              type: string
              description: >
                Full state name. This field does not contain the ISO-standard
                abbreviation of the state name.
            taxRegion:
              type: string
              description: |
                A region string, defined in your Zuora tax rules.
            workEmail:
              type: string
              description: |
                Work email address, 80 characters or less.
            workPhone:
              type: string
              description: |
                Work phone number, 40 characters or less.
            zipCode:
              type: string
              description: |
                Zip code, 20 characters or less.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    GETAccountSummaryUsageType:
      title: usage
      type: object
      properties:
        quantity:
          type: string
          description: |
            Number of units used.
          format: decimal
        startDate:
          type: string
          description: >
            The start date of a usage period as `yyyy-mm`. Zuora uses this field
            value to determine the usage date.
          format: date
        unitOfMeasure:
          type: string
          description: >
            Unit by which consumption is measured, as configured in the Billing
            Settings section of the web-based UI.
    GETAccountType:
      type: object
      properties:
        basicInfo:
          $ref: "#/components/schemas/GETAccountTypeBasicInfo"
        billToContact:
          $ref: "#/components/schemas/GETAccountTypeBillToContact"
        billingAndPayment:
          type: object
          properties:
            additionalEmailAddresses:
              type: array
              description: >
                A list of additional email addresses to receive emailed invoices.
              items:
                type: string
            billCycleDay:
              type: string
              description: >
                Billing cycle day (BCD), the day of the month when a bill run
                generates invoices for the account.
            currency:
              type: string
              description: |
                A currency defined in the web-based UI administrative settings.
            invoiceDeliveryPrefsEmail:
              type: boolean
              description: |
                Whether the customer wants to receive invoices through email. 
            invoiceDeliveryPrefsPrint:
              type: boolean
              description: >
                Whether the customer wants to receive printed invoices, such as
                through postal mail.
            paymentGateway:
              type: string
              description: >
                The name of the payment gateway instance. If null or left
                unassigned, the Account will use the Default Gateway.
            paymentTerm:
              type: string
              description: >
                A payment-terms indicator defined in the web-based UI
                administrative settings, e.g., "Net 30".
          description: |
            Container for billing and payment information for the account.
        metrics:
          type: object
          properties:
            balance:
              type: string
              description: |
                The customer's total invoice balance minus credit balance.
              format: decimal
            contractedMrr:
              type: string
              description: >
                Future expected MRR that accounts for future upgrades,
                downgrades, upsells and cancellations.
              format: decimal
            creditBalance:
              type: string
              description: |
                Current credit balance.
              format: decimal
            totalDebitMemoBalance:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                Total balance of all posted debit memos.
              format: decimal
            totalInvoiceBalance:
              type: string
              description: |
                Total balance of all posted invoices.
              format: decimal
            unappliedCreditMemoAmount:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                Total unapplied amount of all posted credit memos.
              format: decimal
            unappliedPaymentAmount:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                Total unapplied amount of all posted payments.
              format: decimal
          description: |
            Container for account metrics.
        soldToContact:
          $ref: "#/components/schemas/GETAccountTypeSoldToContact"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        taxInfo:
          type: object
          properties:
            VATId:
              type: string
              description: |
                EU Value Added Tax ID.
            companyCode:
              type: string
              description: |
                Unique code that identifies a company account in Avalara.
            exemptCertificateId:
              type: string
              description: |
                ID of the customer tax exemption certificate.
            exemptCertificateType:
              type: string
              description: |
                Type of tax exemption certificate that the customer holds.
            exemptDescription:
              type: string
              description: >
                Description of the tax exemption certificate that the customer
                holds.
            exemptEffectiveDate:
              type: string
              description: |
                Date when the customer tax exemption starts.
              format: date
            exemptEntityUseCode:
              maxLength: 64
              type: string
              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.
            exemptExpirationDate:
              type: string
              description: |
                Date when the customer tax exemption expires.
              format: date
            exemptIssuingJurisdiction:
              type: string
              description: >
                Jurisdiction in which the customer tax exemption certificate was
                issued.
            exemptStatus:
              type: string
              description: |
                Status of the account tax exemption.
          description: >
            Container for tax exempt information, used to establish the tax
            exempt status of a customer account.
    GETAccountTypeBasicInfo:
      title: basicInfo
      description: |
        Container for basic information about the account.
      allOf:
        - type: object
          properties:
            accountNumber:
              type: string
              description: |
                Account number.
            batch:
              type: string
              description: >
                The alias name given to a batch. A string of 50 characters or
                less.
            communicationProfileId:
              type: string
              description: |
                ID of a communication profile.
            creditMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
            crmId:
              type: string
              description: |
                CRM account ID for the account, up to 100 characters.
            currency:
              type: string
              description: |
                A currency as defined in Billing Settings in the Zuora UI.
            debitMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
            id:
              type: string
              description: |
                Account ID.
            invoiceTemplateId:
              type: string
              description: >
                Invoice template ID, configured in Billing Settings in the Zuora
                UI.
            name:
              type: string
              description: |
                Account name.
            notes:
              type: string
              description: |
                Notes associated with the account, up to 65,535 characters.
            parentId:
              type: string
              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.
            salesRep:
              type: string
              description: The name of the sales representative associated with this account,
                if applicable. Maximum of 50 characters.
            sequenceSetId:
              type: string
              description: >
                The ID of the billing document sequence set that is assigned to
                the customer account. 
            status:
              type: string
              description: >
                Account status; possible values are: `Active`, `Draft`,
                `Canceled`.
            tags:
              type: string
              description: ""
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
    GETAccountTypeBillToContact:
      title: Contact
      description: |
        Container for bill-to contact information.
      allOf:
        - type: object
          properties:
            address1:
              type: string
              description: |
                First address line, 255 characters or less.
            address2:
              type: string
              description: |
                Second address line, 255 characters or less.
            city:
              type: string
              description: |
                City, 40 characters or less.
            country:
              type: string
              description: >
                Full country name. This field does not contain the ISO-standard
                abbreviation of the country name.
            county:
              type: string
              description: "County; 32 characters or less. Zuora Tax uses this information to
                calculate county taxation.          "
            fax:
              type: string
              description: |
                Fax phone number, 40 characters or less.
            firstName:
              type: string
              description: |
                First name, 100 characters or less.
            homePhone:
              type: string
              description: |
                Home phone number, 40 characters or less.
            lastName:
              type: string
              description: |
                Last name, 100 characters or less.
            mobilePhone:
              type: string
              description: |
                Mobile phone number, 40 characters or less.
            nickname:
              type: string
              description: |
                Nickname for this contact.
            otherPhone:
              type: string
              description: |
                Other phone number, 40 characters or less.
            otherPhoneType:
              type: string
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
            personalEmail:
              type: string
              description: |
                Personal email address, 80 characters or less.
            state:
              type: string
              description: >
                Full state name. This field does not contain the ISO-standard
                abbreviation of the state name.
            taxRegion:
              type: string
              description: |
                A region string, defined in your Zuora tax rules.
            workEmail:
              type: string
              description: |
                Work email address, 80 characters or less.
            workPhone:
              type: string
              description: |
                Work phone number, 40 characters or less.
            zipCode:
              type: string
              description: |
                Zip code, 20 characters or less.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    GETAccountTypeSoldToContact:
      title: Contact
      description: >
        Container for sold-to contact information. Uses the same field structure
        as billToContact.
      allOf:
        - type: object
          properties:
            address1:
              type: string
              description: |
                First address line, 255 characters or less.
            address2:
              type: string
              description: |
                Second address line, 255 characters or less.
            city:
              type: string
              description: |
                City, 40 characters or less.
            country:
              type: string
              description: >
                Full country name. This field does not contain the ISO-standard
                abbreviation of the country name.
            county:
              type: string
              description: "County; 32 characters or less. Zuora tax uses this information to
                calculate county taxation.          "
            fax:
              type: string
              description: |
                Fax phone number, 40 characters or less.
            firstName:
              type: string
              description: |
                First name, 100 characters or less.
            homePhone:
              type: string
              description: |
                Home phone number, 40 characters or less.
            lastName:
              type: string
              description: |
                Last name, 100 characters or less.
            mobilePhone:
              type: string
              description: |
                Mobile phone number, 40 characters or less.
            nickname:
              type: string
              description: |
                Nickname for this contact.
            otherPhone:
              type: string
              description: |
                Other phone number, 40 characters or less.
            otherPhoneType:
              type: string
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
            personalEmail:
              type: string
              description: |
                Personal email address, 80 characters or less.
            state:
              type: string
              description: >
                Full state name. This field does not contain the ISO-standard
                abbreviation of the state name.
            taxRegion:
              type: string
              description: |
                A region string, defined in your Zuora tax rules.
            workEmail:
              type: string
              description: |
                Work email address, 80 characters or less.
            workPhone:
              type: string
              description: |
                Work phone number, 40 characters or less.
            zipCode:
              type: string
              description: |
                Zip code, 20 characters or less.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    GETAccountingCodeItemType:
      allOf:
        - type: object
          properties:
            category:
              type: string
              description: |
                The category associated with the accounting code.
              enum:
                - Assets
                - Liabilities
                - Equity
                - Revenue
                - Expenses
            createdBy:
              type: string
              description: |
                The ID of the user who created the accounting code.
            createdOn:
              type: string
              description: |
                Date and time when the accounting code was created.
              format: date-time
            glAccountName:
              type: string
              description: |
                Name of the account in your general ledger.

                Field only available if you have Zuora Finance enabled.
            glAccountNumber:
              type: string
              description: |
                Account number in your general ledger.

                Field only available if you have Zuora Finance enabled.
            id:
              type: string
              description: |
                ID of the accounting code.
            name:
              type: string
              description: |
                Name of the accounting code.
            notes:
              type: string
              description: |
                Any optional notes for the accounting code.
            status:
              type: string
              description: |
                The accounting code status.
              enum:
                - Active
                - Inactive
            success:
              type: boolean
              description: |
                Returns `true` if the request was processed successfully.
            type:
              type: string
              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
            updatedBy:
              type: string
              description: |
                The ID of the user who last updated the accounting code.
            updatedOn:
              type: string
              description: |
                Date and time when the accounting code was last updated.
              format: date-time
        - $ref: "#/components/schemas/AccountingCodeObjectCustomFields"
    GETAccountingCodeItemWithoutSuccessType:
      title: accountingCodes
      allOf:
        - type: object
          properties:
            category:
              type: string
              description: |
                The category associated with the accounting code.
              enum:
                - Assets
                - Liabilities
                - Equity
                - Revenue
                - Expenses
            createdBy:
              type: string
              description: |
                The ID of the user who created the accounting code.
            createdOn:
              type: string
              description: |
                Date and time when the accounting code was created.
              format: date-time
            glAccountName:
              type: string
              description: |
                Name of the account in your general ledger.

                Field only available if you have Zuora Finance enabled.
            glAccountNumber:
              type: string
              description: |
                Account number in your general ledger.

                Field only available if you have Zuora Finance enabled.
            id:
              type: string
              description: |
                ID of the accounting code.
            name:
              type: string
              description: |
                Name of the accounting code.
            notes:
              type: string
              description: |
                Any optional notes for the accounting code.
            status:
              type: string
              description: |
                The accounting code status.
              enum:
                - Active
                - Inactive
            type:
              type: string
              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
            updatedBy:
              type: string
              description: |
                The ID of the user who last updated the accounting code.
            updatedOn:
              type: string
              description: |
                Date and time when the accounting code was last updated.
              format: date-time
        - $ref: "#/components/schemas/AccountingCodeObjectCustomFields"
    GETAccountingCodesType:
      type: object
      properties:
        accountingCodes:
          type: array
          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"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETAccountingPeriodType:
      allOf:
        - type: object
          properties:
            createdBy:
              type: string
              description: |
                ID of the user who created the accounting period.
            createdOn:
              type: string
              description: |
                Date and time when the accounting period was created.
              format: date-time
            endDate:
              type: string
              description: |
                The end date of the accounting period.
              format: date
            fileIds:
              type: object
              properties:
                accountsReceivableAccountAgingDetailExportFileId:
                  type: string
                  description: >
                    File ID of the Accounts Receivable Aging Account Detail
                    report.
                accountsReceivableInvoiceAgingDetailExportFileId:
                  type: string
                  description: >
                    File ID of the Accounts Receivable Aging Invoice Detail
                    report.
                arRollForwardDetailExportFileId:
                  type: string
                  description: |
                    File ID of the Accounts Receivable Detail report.
                fxRealizedGainAndLossDetailExportFileId:
                  type: string
                  description: >
                    File ID of the Realized Gain and Loss Detail report.


                    Returned only if you have Foreign Currency Conversion enabled.
                fxUnrealizedGainAndLossDetailExportFileId:
                  type: string
                  description: >
                    File ID of the Unrealized Gain and Loss Detail report.


                    Returned only if you have Foreign Currency Conversion enabled
                revenueDetailCsvFileId:
                  type: string
                  description: |
                    File ID of the Revenue Detail report in CSV format.
                revenueDetailExcelFileId:
                  type: string
                  description: |
                    File ID of the Revenue Detail report in XLSX format.
                unprocessedChargesFileId:
                  type: string
                  description: >
                    File ID of a report containing all unprocessed charges for
                    the accounting period.
              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.
            fiscalYear:
              type: string
              description: |
                Fiscal year of the accounting period.
            fiscal_quarter:
              type: integer
              description: ""
              format: int64
            id:
              type: string
              description: |
                ID of the accounting period.
            name:
              type: string
              description: |
                Name of the accounting period.
            notes:
              type: string
              description: |
                Any optional notes about the accounting period.
            runTrialBalanceEnd:
              type: string
              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
            runTrialBalanceErrorMessage:
              type: string
              description: >
                If trial balance status is Error, an error message is returned
                in this field.
            runTrialBalanceStart:
              type: string
              description: >
                Date and time that the trial balance was run. If the trial
                balance status is Pending, this field is null.
              format: date-time
            runTrialBalanceStatus:
              type: string
              description: >
                Status of the trial balance for the accounting period. Possible
                values:


                * `Pending`

                * `Processing`

                * `Completed`

                * `Error`
            startDate:
              type: string
              description: |
                The start date of the accounting period.
              format: date
            status:
              type: string
              description: |
                Status of the accounting period. Possible values:
                * `Open`
                * `PendingClose`
                * `Closed`
            success:
              type: boolean
              description: |
                Returns `true` if the request was processed successfully.
            updatedBy:
              type: string
              description: |
                ID of the user who last updated the accounting period.
            updatedOn:
              type: string
              description: |
                Date and time when the accounting period was last updated.
              format: date-time
        - $ref: "#/components/schemas/AccountingPeriodObjectCustomFields"
    GETAccountingPeriodWithoutSuccessType:
      title: accountingPeriods
      allOf:
        - type: object
          properties:
            createdBy:
              type: string
              description: |
                ID of the user who created the accounting period.
            createdOn:
              type: string
              description: |
                Date and time when the accounting period was created.
              format: date-time
            endDate:
              type: string
              description: |
                The end date of the accounting period.
              format: date
            fileIds:
              type: object
              properties:
                accountsReceivableAccountAgingDetailExportFileId:
                  type: string
                  description: >
                    File ID of the Accounts Receivable Aging Account Detail
                    report.
                accountsReceivableInvoiceAgingDetailExportFileId:
                  type: string
                  description: >
                    File ID of the Accounts Receivable Aging Invoice Detail
                    report.
                arRollForwardDetailExportFileId:
                  type: string
                  description: |
                    File ID of the Accounts Receivable Detail report.
                fxRealizedGainAndLossDetailExportFileId:
                  type: string
                  description: >
                    File ID of the Realized Gain and Loss Detail report.


                    Returned only if you have Foreign Currency Conversion enabled.
                fxUnrealizedGainAndLossDetailExportFileId:
                  type: string
                  description: >
                    File ID of the Unrealized Gain and Loss Detail report.


                    Returned only if you have Foreign Currency Conversion enabled
                revenueDetailCsvFileId:
                  type: string
                  description: |
                    File ID of the Revenue Detail report in CSV format.
                revenueDetailExcelFileId:
                  type: string
                  description: |
                    File ID of the Revenue Detail report in XLSX format.
                unprocessedChargesFileId:
                  type: string
                  description: >
                    File ID of a report containing all unprocessed charges for
                    the accounting period.
              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.
            fiscalYear:
              type: string
              description: |
                Fiscal year of the accounting period.
            fiscal_quarter:
              type: integer
              description: ""
              format: int64
            id:
              type: string
              description: |
                ID of the accounting period.
            name:
              type: string
              description: |
                Name of the accounting period.
            notes:
              type: string
              description: |
                Any optional notes about the accounting period.
            runTrialBalanceEnd:
              type: string
              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
            runTrialBalanceErrorMessage:
              type: string
              description: >
                If trial balance status is Error, an error message is returned
                in this field.
            runTrialBalanceStart:
              type: string
              description: >
                Date and time that the trial balance was run. If the trial
                balance status is `Pending`, this field is `null`.
              format: date-time
            runTrialBalanceStatus:
              type: string
              description: >
                Status of the trial balance for the accounting period. Possible
                values:


                * `Pending`

                * `Processing`

                * `Completed`

                * `Error`
            startDate:
              type: string
              description: |
                The start date of the accounting period.
              format: date
            status:
              type: string
              description: |
                Status of the accounting period. Possible values:

                * `Open`
                * `PendingClose`
                * `Closed`
            updatedBy:
              type: string
              description: |
                D of the user who last updated the accounting period.
            updatedOn:
              type: string
              description: |
                Date and time when the accounting period was last updated.
              format: date-time
        - $ref: "#/components/schemas/AccountingPeriodObjectCustomFields"
    GETAccountingPeriodsType:
      type: object
      properties:
        accountingPeriods:
          type: array
          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"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETAllCustomObjectDefinitionsInNamespaceResponse:
      type: object
      properties:
        count:
          type: integer
          description: The number of objects in the `definitions` object. The value of
            this field is the number of custom object definitions in the
            namespace.
        definitions:
          $ref: "#/components/schemas/CustomObjectDefinitions"
      example:
        count: 1
        definitions:
          person:
            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:
              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
                - cardinality: manyToOne
                  fields:
                    work_address__c: Id
                  namespace: default
                  object: address
                - cardinality: oneToMany
                  fields:
                    Id: person_id__c
                  namespace: default
                  object: car
                - cardinality: oneToMany
                  fields:
                    Id: person_id__c
                  namespace: default
                  object: device
              required:
                - last_name__c
                - marital_status__c
              type: object
            type: person
    GETAmendmentType:
      type: object
      properties:
        autoRenew:
          type: boolean
          description: >
            Determines whether the subscription is automatically renewed, or
            whether it expires at the end of the term and needs to be manually
            renewed. 
        baseRatePlanId:
          type: string
          description: >
            The rate plan ID on which changes are made. Only the Update or
            Remove amendment returns a base rate plan ID.
        baseSubscriptionId:
          type: string
          description: |
            The ID of the subscription based on which the amendment is created.
        code:
          type: string
          description: |
            The amendment code.
        contractEffectiveDate:
          type: string
          description: >
            The date when the amendment becomes effective for billing purposes,
            as `yyyy-mm-dd`.
          format: date
        currentTerm:
          type: integer
          description: |
            The length of the period for the current subscription term. 
          format: int64
        currentTermPeriodType:
          type: string
          description: |
            The period type for the current subscription term.
            Possible values are:

            - Month
            - Year
            - Day
            - Week
        customerAcceptanceDate:
          type: string
          description: >
            The date when the customer accepts the amendment changes to the
            subscription, as `yyyy-mm-dd`.
          format: date
        description:
          type: string
          description: |
            Description of the amendment.
        destinationAccountId:
          type: string
          description: |
            The ID of the account that the subscription is being transferred to.
        destinationInvoiceOwnerId:
          type: string
          description: |
            The ID of the invoice that the subscription is being transferred to.
        effectiveDate:
          type: string
          description: |
            The date when the amendment changes take effective. 
          format: date
        id:
          type: string
          description: |
            The amendment ID.
        name:
          type: string
          description: |
            The name of the amendment.
        newRatePlanId:
          type: string
          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.
        newSubscriptionId:
          type: string
          description: |
            The ID of the subscription that the amendment changes.
        renewalSetting:
          type: string
          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
        renewalTerm:
          type: integer
          description: |
            The term of renewal for the amended subscription.
          format: int64
        renewalTermPeriodType:
          type: string
          description: |
            The period type for the subscription renewal term.
            Possible values are:

            - Month
            - Year
            - Day
            - Week
        resumeDate:
          type: string
          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
        serviceActivationDate:
          type: string
          description: |
            The date when service is activated, as `yyyy-mm-dd`.
          format: date
        specificUpdateDate:
          type: string
          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
        status:
          type: string
          description: |
            The status of the amendment.
            Possible values are:

            - Draft 
            - Pending Activation
            - Pending Acceptance
            - Completed
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        suspendDate:
          type: string
          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
        termStartDate:
          type: string
          description: |
            The date when the new terms and conditions take effect.
          format: date
        termType:
          type: string
          description: |
            Indicates if the subscription is `TERMED` or `EVERGREEN`.
        type:
          type: string
          description: |
            Type of the amendment.
            Possible values are:

            - Cancellation
            - NewProduct
            - OwnerTransfer
            - RemoveProduct
            - Renewal
            - UpdateProduct
            - TermsAndConditions
    GETAttachmentResponseType:
      type: object
      properties:
        createdBy:
          type: string
          description: |
            Zuora user id who added this attachment to the object.
        createdOn:
          type: string
          description: |
            Date and time when the attachment was added to the object.
          format: date-time
        description:
          type: string
          description: |
            Description of the attachment.
        fileContentType:
          type: string
          description: |
            File type.
        fileId:
          type: string
          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.
        fileName:
          type: string
          description: |
            Attachment file name.
        id:
          type: string
          description: |
            Id of this attachment.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        updatedBy:
          type: string
          description: |
            Zuora user id who last updated the attachment.
        updatedOn:
          type: string
          description: |
            Date and time when the attachment was last updated.
          format: date-time
    GETAttachmentResponseWithoutSuccessType:
      title: attachments
      type: object
      properties:
        createdBy:
          type: string
          description: |
            Zuora user id of who added this attachment to the object.
        createdOn:
          type: string
          description: |
            Date and time when the attachment was added to the object.
          format: date-time
        description:
          type: string
          description: |
            Description of the attachment.
        fileContentType:
          type: string
          description: |
            Attachment file type.
        fileId:
          type: string
          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.
        fileName:
          type: string
          description: |
            Attachment file name.
        id:
          type: string
          description: |
            Zuora id of this attachement.
        updatedBy:
          type: string
          description: |
            Zuora user id who last updated the attachment.
        updatedOn:
          type: string
          description: |
            Date and time when the attachment was last updated.
          format: date-time
    GETAttachmentsResponseType:
      type: object
      properties:
        attachments:
          type: array
          description: |
            Container for one or more attachments.
          items:
            $ref: "#/components/schemas/GETAttachmentResponseWithoutSuccessType"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETBillingDocumentFilesDeletionJobResponse:
      type: object
      properties:
        id:
          type: string
          description: |
            The unique ID of the billing document file deletion job.
        status:
          type: string
          description: |
            The status of the billing document file deletion job.
          enum:
            - Pending
            - Processing
            - Completed
            - Error
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETBillingDocumentsResponseType:
      title: documents
      type: object
      properties:
        accountId:
          type: string
          description: The ID of the customer account associated with the billing document.
          format: uuid
        amount:
          type: number
          description: |
            The total amount of the billing document.
          format: double
        balance:
          type: number
          description: |
            The balance of the billing document.
          format: double
        documentDate:
          type: string
          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
        documentNumber:
          type: string
          description: |
            The number of the billing document.
        documentType:
          type: string
          description: |
            The type of the billing document.
          enum:
            - Invoice
            - CreditMemo
            - DebitMemo
        id:
          type: string
          description: |
            The ID of the billing document.
        status:
          type: string
          description: |
            The current status of the billing document.
          enum:
            - Draft
            - Posted
            - Canceled
            - Error
    GETCMTaxItemType:
      title: creditTaxItems
      type: object
      properties:
        appliedAmount:
          type: number
          description: |
            The applied amount of the taxation item.
          format: double
        exemptAmount:
          type: number
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
        financeInformation:
          type: object
          properties:
            onAccountAccountingCode:
              type: string
              description: >
                The accounting code that maps to an on account in your
                accounting system.
            onAccountAccountingCodeType:
              type: string
              description: >
                The type of the accounting code that maps to an on account in
                your accounting system.
            salesTaxPayableAccountingCode:
              type: string
              description: |
                The accounting code for the sales taxes payable.
            salesTaxPayableAccountingCodeType:
              type: string
              description: |
                The type of the accounting code for the sales taxes payable.
          description: |
            Container for the finance information related to the taxation item.
        id:
          type: string
          description: |
            The ID of the taxation item.
        jurisdiction:
          type: string
          description: >
            The jurisdiction that applies the tax or VAT. This value is
            typically a state, province, county, or city.
        locationCode:
          type: string
          description: >
            The identifier for the location based on the value of the `taxCode`
            field.
        name:
          type: string
          description: |
            The name of the taxation item.
        refundAmount:
          type: number
          description: |
            The amount of the refund on the taxation item.
          format: double
        sourceTaxItemId:
          type: string
          description: |
            The ID of the source taxation item.
        taxAmount:
          type: number
          description: |
            The amount of taxation.
          format: double
        taxCode:
          type: string
          description: >
            The tax code identifies which tax rules and tax rates to apply to a
            specific credit memo.
        taxCodeDescription:
          type: string
          description: |
            The description of the tax code.
        taxDate:
          type: string
          description: >
            The date that the tax is applied to the credit memo, in `yyyy-mm-dd`
            format.
          format: date
        taxRate:
          type: number
          description: |
            The tax rate applied to the credit memo.
          format: double
        taxRateDescription:
          type: string
          description: |
            The description of the tax rate.
        taxRateType:
          type: string
          description: |
            The type of the tax rate.
          enum:
            - Percentage
            - FlatFee
        unappliedAmount:
          type: number
          description: |
            The unapplied amount of the taxation item.
          format: double
    GETCMTaxItemTypeNew:
      title: data
      type: object
      properties:
        appliedAmount:
          type: number
          description: |
            The applied amount of the taxation item.
          format: double
        exemptAmount:
          type: number
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
        financeInformation:
          type: object
          properties:
            onAccountAccountingCode:
              type: string
              description: >
                The accounting code that maps to an on account in your
                accounting system.
            onAccountAccountingCodeType:
              type: string
              description: >
                The type of the accounting code that maps to an on account in
                your accounting system.
            salesTaxPayableAccountingCode:
              type: string
              description: |
                The accounting code for the sales taxes payable.
            salesTaxPayableAccountingCodeType:
              type: string
              description: |
                The type of the accounting code for the sales taxes payable.
          description: |
            Container for the finance information related to the taxation item.
        id:
          type: string
          description: |
            The ID of the taxation item.
        jurisdiction:
          type: string
          description: >
            The jurisdiction that applies the tax or VAT. This value is
            typically a state, province, county, or city.
        locationCode:
          type: string
          description: >
            The identifier for the location based on the value of the `taxCode`
            field.
        name:
          type: string
          description: |
            The name of the taxation item.
        refundAmount:
          type: number
          description: |
            The amount of the refund on the taxation item.
          format: double
        sourceTaxItemId:
          type: string
          description: |
            The ID of the source taxation item.
        taxAmount:
          type: number
          description: |
            The amount of taxation.
          format: double
        taxCode:
          type: string
          description: >
            The tax code identifies which tax rules and tax rates to apply to a
            specific credit memo.
        taxCodeDescription:
          type: string
          description: |
            The description of the tax code.
        taxDate:
          type: string
          description: >
            The date that the tax is applied to the credit memo, in `yyyy-mm-dd`
            format.
          format: date
        taxRate:
          type: number
          description: |
            The tax rate applied to the credit memo.
          format: double
        taxRateDescription:
          type: string
          description: |
            The description of the tax rate.
        taxRateType:
          type: string
          description: |
            The type of the tax rate.
          enum:
            - Percentage
            - FlatFee
        unappliedAmount:
          type: number
          description: |
            The unapplied amount of the taxation item.
          format: double
    GETCalloutHistoryVOType:
      title: calloutHistories
      type: object
      properties:
        attemptedNum:
          type: string
          description: |
            The number of times the callout was retried.
        createTime:
          type: string
          description: |
            The time that the calloutHistory record was made.
        eventCategory:
          type: string
          description: |
            The event category for the callout.
        eventContext:
          type: string
          description: |
            The context of the callout event.
        notification:
          type: string
          description: |
            The name of the notification.
        requestMethod:
          type: string
          description: |
            The request method set in notifications settings.
        requestUrl:
          type: string
          description: |
            The base url set in notifications settings.
        responseCode:
          type: string
          description: |
            The responseCode of the request.
        responseContent:
          type: string
          description: ""
    GETCalloutHistoryVOsType:
      type: object
      properties:
        calloutHistories:
          type: array
          description: |
            A container for callout histories.
          items:
            $ref: "#/components/schemas/GETCalloutHistoryVOType"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETCatalogType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        products:
          type: array
          description: |
            Container for one or more products:
          items:
            $ref: "#/components/schemas/GETProductType"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETChargeRSDetailType:
      type: object
      properties:
        accountId:
          type: string
          description: |
            An account ID.
        amount:
          type: string
          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
        currency:
          type: string
          description: |
            The type of currency used. 
        notes:
          type: string
          description: |
            Additional information about this record.
        number:
          type: string
          description: |
            The charge revenue summary number.
        recognitionRuleName:
          type: string
          description: |
            The name of the recognition rule.
        recognizedRevenue:
          type: string
          description: |
            The revenue that was distributed in a closed accounting period.
          format: decimal
        revenueItems:
          type: array
          description: >
            Revenue items are listed in ascending order by the accounting period
            start date.
          items:
            $ref: "#/components/schemas/GETRevenueItemTypeResponse"
        subscriptionChargeId:
          type: string
          description: |
            The original subscription charge ID.
        subscriptionId:
          type: string
          description: |
            The original subscription ID.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        undistributedUnrecognizedRevenue:
          type: string
          description: |
            Revenue in the open-ended accounting period.
          format: decimal
        unrecognizedRevenue:
          type: string
          description: >
            Revenue distributed in all open accounting periods, which includes
            the open-ended accounting period.
          format: decimal
    GETCreditMemoCollectionType:
      type: object
      properties:
        creditmemos:
          type: array
          description: |
            Container for credit memos.
          items:
            $ref: "#/components/schemas/GETCreditMemoTypewithSuccess"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETCreditMemoItemPartType:
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the credit memo part item. 
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the credit memo part item.
        createdDate:
          type: string
          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
        creditMemoItemId:
          type: string
          description: >
            The ID of the credit memo item associated with the credit memo part
            item.
        creditTaxItemId:
          type: string
          description: |
            The ID of the credit memo taxation item.
        debitMemoItemId:
          type: string
          description: >
            The ID of the debit memo item associated with the credit memo part
            item.
        id:
          type: string
          description: |
            The ID of the credit memo part item.
        invoiceItemId:
          type: string
          description: >
            The ID of the invoice item associated with the credit memo part item.
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
        taxItemId:
          type: string
          description: >
            The ID of the invoice or debit memo taxation item associated with
            the credit memo taxation item.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the credit memo part item.
        updatedDate:
          type: string
          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
    GETCreditMemoItemPartTypewithSuccess:
      title: itemparts
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the credit memo part item.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the credit memo part item.
        createdDate:
          type: string
          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
        creditMemoItemId:
          type: string
          description: >
            The ID of the credit memo item associated with the credit memo part
            item.
        creditTaxItemId:
          type: string
          description: |
            The ID of the credit memo taxation item.
        debitMemoItemId:
          type: string
          description: >
            The ID of the debit memo item associated with the credit memo part
            item.
        id:
          type: string
          description: |
            The ID of the credit memo part item.
        invoiceItemId:
          type: string
          description: >
            The ID of the invoice item associated with the credit memo part item.
        taxItemId:
          type: string
          description: >
            The ID of the invoice or debit memo taxation item associated with
            the credit memo taxation item.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the credit memo part item.
        updatedDate:
          type: string
          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
    GETCreditMemoItemPartsCollectionType:
      type: object
      properties:
        itemParts:
          type: array
          description: |
            Container for credit memo part items.
          items:
            $ref: "#/components/schemas/GETCreditMemoItemPartTypewithSuccess"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETCreditMemoItemType:
      allOf:
        - type: object
          properties:
            amount:
              type: number
              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
            amountWithoutTax:
              type: number
              description: |
                The credit memo item amount excluding tax.
              format: double
            appliedAmount:
              type: number
              description: |
                The applied amount of the credit memo item.
              format: double
            appliedToItemId:
              type: string
              description: >
                The unique ID of the credit memo item that the discount charge
                is applied to.
            comment:
              type: string
              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.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the credit memo item.
            createdDate:
              type: string
              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
            creditTaxItems:
              type: array
              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"
            description:
              type: string
              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.
            financeInformation:
              type: object
              properties:
                deferredRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for the deferred revenue, such as
                    Monthly Recurring Liability.
                deferredRevenueAccountingCodeType:
                  type: string
                  description: >
                    The type of the deferred revenue accounting code, such as
                    Deferred Revenue.'
                onAccountAccountingCode:
                  type: string
                  description: >
                    The accounting code that maps to an on account in your
                    accounting system.
                onAccountAccountingCodeType:
                  type: string
                  description: >
                    The type of the accounting code that maps to an on account
                    in your accounting system.
                recognizedRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for the recognized revenue, such as
                    Monthly Recurring Charges or Overage Charges.
                recognizedRevenueAccountingCodeType:
                  type: string
                  description: >
                    The type of the recognized revenue accounting code, such as
                    Sales Revenue or Sales Discount.
                revenueRecognitionRuleName:
                  type: string
                  description: >
                    The name of the revenue recognition rule governing the
                    revenue schedule.
                revenueScheduleNumber:
                  type: string
                  description: >
                    Revenue schedule number. The revenue schedule number is
                    always prefixed with "RS", for example, RS-00000001.
              description: >
                Container for the finance information related to the credit memo
                item.
            id:
              type: string
              description: |
                The ID of the credit memo item.
            processingType:
              type: string
              description: >
                The kind of the charge for the credit memo item. Its possible
                values are `Charge` and `Discount`. 
            quantity:
              type: number
              description: |
                The number of units for the credit memo item.
              format: double
            refundAmount:
              type: number
              description: |
                The amount of the refund on the credit memo item.
              format: double
            serviceEndDate:
              type: string
              description: |
                The service end date of the credit memo item.
              format: date
            serviceStartDate:
              type: string
              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
            sku:
              type: string
              description: |
                The SKU for the product associated with the credit memo item.
            skuName:
              type: string
              description: |
                The name of the SKU.
            sourceItemId:
              type: string
              description: |
                The ID of the source item.
            sourceItemType:
              type: string
              description: |
                The type of the source item.
              enum:
                - SubscriptionComponent
                - InvoiceDetail
                - ProductRatePlanCharge
            subscriptionId:
              type: string
              description: |
                The ID of the subscription associated with the credit memo item.
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
            taxationItems:
              type: object
              properties:
                data:
                  type: array
                  description: |
                    List of taxation items.
                  items:
                    $ref: "#/components/schemas/GETCMTaxItemTypeNew"
                nextPage:
                  type: string
                  description: >
                    URL to retrieve the next page of the response if it exists;
                    otherwise absent.
                  format: URL
              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.
            unappliedAmount:
              type: number
              description: |
                The unapplied amount of the credit memo item.
              format: double
            unitOfMeasure:
              type: string
              description: |
                The units to measure usage.
            unitPrice:
              type: number
              description: |
                The per-unit price of the credit memo item.
              format: double
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the credit memo item.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
    GETCreditMemoItemTypewithSuccess:
      title: items
      allOf:
        - type: object
          properties:
            amount:
              type: number
              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
            amountWithoutTax:
              type: number
              description: |
                The credit memo item amount excluding tax.
              format: double
            appliedAmount:
              type: number
              description: |
                The applied amount of the credit memo item.
              format: double
            appliedToItemId:
              type: string
              description: >
                The unique ID of the credit memo item that the discount charge
                is applied to.
            comment:
              type: string
              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.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the credit memo item.
            createdDate:
              type: string
              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
            creditTaxItems:
              type: array
              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"
            description:
              type: string
              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.
            financeInformation:
              type: object
              properties:
                deferredRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for the deferred revenue, such as
                    Monthly Recurring Liability.
                deferredRevenueAccountingCodeType:
                  type: string
                  description: >
                    The type of the deferred revenue accounting code, such as
                    Deferred Revenue. 
                onAccountAccountingCode:
                  type: string
                  description: >
                    The accounting code that maps to an on account in your
                    accounting system.
                onAccountAccountingCodeType:
                  type: string
                  description: >
                    The type of the accounting code that maps to an on account
                    in your accounting system.
                recognizedRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for the recognized revenue, such as
                    Monthly Recurring Charges or Overage Charges.
                recognizedRevenueAccountingCodeType:
                  type: string
                  description: >
                    The type of the recognized revenue accounting code, such as
                    Sales Revenue or Sales Discount. 
                revenueRecognitionRuleName:
                  type: string
                  description: >
                    The name of the revenue recognition rule governing the
                    revenue schedule.
                revenueScheduleNumber:
                  type: string
                  description: >
                    Revenue schedule number. The revenue schedule number is
                    always prefixed with "RS", for example, RS-00000001.
              description: >
                Container for the finance information related to the credit memo
                item.
            id:
              type: string
              description: |
                The ID of the credit memo item.
            processingType:
              type: string
              description: >
                The kind of the charge for the credit memo item. Its possible
                values are `Charge` and `Discount`. 
            quantity:
              type: number
              description: |
                The number of units for the credit memo item.
              format: double
            refundAmount:
              type: number
              description: |
                The amount of the refund on the credit memo item.
              format: double
            serviceEndDate:
              type: string
              description: |
                The service end date of the credit memo item. 
              format: date
            serviceStartDate:
              type: string
              description: |
                The service start date of the credit memo item.
              format: date
            sku:
              type: string
              description: |
                The SKU for the product associated with the credit memo item.
            skuName:
              type: string
              description: |
                The name of the SKU.
            sourceItemId:
              type: string
              description: |
                The ID of the source item.
            sourceItemType:
              type: string
              description: |
                The type of the source item.
              enum:
                - SubscriptionComponent
                - InvoiceDetail
                - ProductRatePlanCharge
            subscriptionId:
              type: string
              description: |
                The ID of the subscription associated with the credit memo item.
            taxationItems:
              type: object
              properties:
                data:
                  type: array
                  description: |
                    List of taxation items.
                  items:
                    $ref: "#/components/schemas/GETCMTaxItemTypeNew"
                nextPage:
                  type: string
                  description: >
                    URL to retrieve the next page of the response if it exists;
                    otherwise absent.
                  format: URL
              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.
            unappliedAmount:
              type: number
              description: |
                The unapplied amount of the credit memo item.
              format: double
            unitOfMeasure:
              type: string
              description: |
                The units to measure usage.
            unitPrice:
              type: number
              description: |
                The per-unit price of the credit memo item.
              format: double
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the credit memo item.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
    GETCreditMemoItemsListType:
      type: object
      properties:
        items:
          type: array
          description: |
            Container for credit memo items.
          items:
            $ref: "#/components/schemas/GETCreditMemoItemTypewithSuccess"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETCreditMemoPartType:
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the credit memo part.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the credit memo part.
        createdDate:
          type: string
          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
        debitMemoId:
          type: string
          description: |
            The ID of the debit memo associated with the credit memo part.
        id:
          type: string
          description: |
            The ID of the credit memo part.
        invoiceId:
          type: string
          description: |
            The ID of the invoice associated with the credit memo part.
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the credit memo part.
        updatedDate:
          type: string
          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
    GETCreditMemoPartTypewithSuccess:
      title: parts
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the credit memo part.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the credit memo part.
        createdDate:
          type: string
          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
        debitMemoId:
          type: string
          description: |
            The ID of the debit memo associated with the credit memo part.
        id:
          type: string
          description: |
            The ID of the credit memo part.
        invoiceId:
          type: string
          description: |
            The ID of the invoice associated with the credit memo part.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the credit memo part.
        updatedDate:
          type: string
          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
    GETCreditMemoPartsCollectionType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        parts:
          type: array
          description: |
            Container for credit memo parts.
          items:
            $ref: "#/components/schemas/GETCreditMemoPartTypewithSuccess"
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETCreditMemoType:
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                The ID of the customer account associated with the credit memo.
            amount:
              type: number
              description: |
                The total amount of the credit memo.
              format: double
            appliedAmount:
              type: number
              description: |
                The applied amount of the credit memo.
              format: double
            autoApplyUponPosting:
              type: boolean
              description: >
                Whether the credit memo automatically applies to the invoice
                upon posting.
            cancelledById:
              type: string
              description: |
                The ID of the Zuora user who cancelled the credit memo.
            cancelledOn:
              type: string
              description: >
                The date and time when the credit memo was cancelled, in
                `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
            comment:
              type: string
              description: |
                Comments about the credit memo.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the credit memo.
            createdDate:
              type: string
              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
            creditMemoDate:
              type: string
              description: >
                The date when the credit memo takes effect, in `yyyy-mm-dd`
                format. For example, 2017-05-20.
              format: date
            currency:
              type: string
              description: |
                A currency defined in the web-based UI administrative settings.
            excludeFromAutoApplyRules:
              type: boolean
              description: >
                Whether the credit memo is excluded from the rule of
                automatically applying credit memos to invoices.
            id:
              type: string
              description: |
                The unique ID of the credit memo.
            latestPDFFileId:
              type: string
              description: |
                The ID of the latest PDF file generated for the credit memo.
            number:
              type: string
              description: |
                The unique identification number of the credit memo.
            postedById:
              type: string
              description: |
                The ID of the Zuora user who posted the credit memo.
            postedOn:
              type: string
              description: >
                The date and time when the credit memo was posted, in
                `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
            reasonCode:
              type: string
              description: >
                A code identifying the reason for the transaction. The value
                must be an existing reason code or empty.
            referredInvoiceId:
              type: string
              description: |
                The ID of a referred invoice.
            refundAmount:
              type: number
              description: |
                The amount of the refund on the credit memo.
              format: double
            source:
              type: string
              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 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.
            sourceId:
              type: string
              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`.
            status:
              type: string
              description: |
                The status of the credit memo.
              enum:
                - Draft
                - Posted
                - Canceled
                - Error
                - PendingForTax
                - Generating
                - CancelInProgress
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
            targetDate:
              type: string
              description: >
                The target date for the credit memo, in `yyyy-mm-dd` format. For
                example, 2017-07-20.
              format: date
            taxAmount:
              type: number
              description: |
                The amount of taxation.
              format: double
            taxMessage:
              type: string
              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.
            taxStatus:
              type: string
              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:
                - Completed
                - Error
            totalTaxExemptAmount:
              type: number
              description: >
                The total amount of taxes or VAT for which the customer has an
                exemption.
              format: double
            transferredToAccounting:
              type: string
              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
            unappliedAmount:
              type: number
              description: |
                The unapplied amount of the credit memo.
              format: double
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the credit memo.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/CreditMemoObjectNSFields"
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
    GETCreditMemoTypewithSuccess:
      title: creditmemos
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                The ID of the customer account associated with the credit memo.
            amount:
              type: number
              description: |
                The total amount of the credit memo.
              format: double
            appliedAmount:
              type: number
              description: |
                The applied amount of the credit memo.
              format: double
            autoApplyUponPosting:
              type: boolean
              description: >
                Whether the credit memo automatically applies to the invoice
                upon posting.
            cancelledById:
              type: string
              description: |
                The ID of the Zuora user who cancelled the credit memo.
            cancelledOn:
              type: string
              description: >
                The date and time when the credit memo was cancelled, in
                `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
            comment:
              type: string
              description: |
                Comments about the credit memo.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the credit memo.
            createdDate:
              type: string
              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
            creditMemoDate:
              type: string
              description: >
                The date when the credit memo takes effect, in `yyyy-mm-dd`
                format. For example, 2017-05-20.
              format: date
            currency:
              type: string
              description: |
                A currency defined in the web-based UI administrative settings.
            excludeFromAutoApplyRules:
              type: boolean
              description: >
                Whether the credit memo is excluded from the rule of
                automatically applying credit memos to invoices.
            id:
              type: string
              description: |
                The unique ID of the credit memo.
            latestPDFFileId:
              type: string
              description: |
                The ID of the latest PDF file generated for the credit memo.
            number:
              type: string
              description: |
                The unique identification number of the credit memo.
            postedById:
              type: string
              description: |
                The ID of the Zuora user who posted the credit memo.
            postedOn:
              type: string
              description: >
                The date and time when the credit memo was posted, in
                `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
            reasonCode:
              type: string
              description: >
                A code identifying the reason for the transaction. The value
                must be an existing reason code or empty.
            referredInvoiceId:
              type: string
              description: |
                The ID of a referred invoice.
            refundAmount:
              type: number
              description: |
                The amount of the refund on the credit memo.
              format: double
            source:
              type: string
              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 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.
            sourceId:
              type: string
              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`.
            status:
              type: string
              description: |
                The status of the credit memo. 
              enum:
                - Draft
                - Posted
                - Canceled
                - Error
                - PendingForTax
                - Generating
                - CancelInProgress
            targetDate:
              type: string
              description: >
                The target date for the credit memo, in `yyyy-mm-dd` format. For
                example, 2017-07-20.
              format: date
            taxAmount:
              type: number
              description: |
                The amount of taxation.
              format: double
            taxMessage:
              type: string
              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.
            taxStatus:
              type: string
              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:
                - Completed
                - Error
            totalTaxExemptAmount:
              type: number
              description: >
                The total amount of taxes or VAT for which the customer has an
                exemption.
              format: double
            transferredToAccounting:
              type: string
              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
            unappliedAmount:
              type: number
              description: |
                The unapplied amount of the credit memo.
              format: double
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the credit memo.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/CreditMemoObjectNSFields"
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
    GETCustomExchangeRatesDataType:
      title: rates
      type: object
      properties:
        DATE:
          title: List of exchange rates
          type: object
          properties:
            CURRENCY:
              type: string
              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.
            providerExchangeRateDate:
              type: string
              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
          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.
    GETCustomExchangeRatesType:
      type: object
      properties:
        inverse:
          type: boolean
          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.
        rates:
          type: array
          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"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETDMTaxItemType:
      title: taxItems
      type: object
      properties:
        appliedAmount:
          type: number
          description: |
            The applied amount of the taxation item.
          format: double
        creditAmount:
          type: number
          description: |
            The amount of credit memos applied to the debit memo. 
          format: double
        exemptAmount:
          type: number
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
        financeInformation:
          type: object
          properties:
            salesTaxPayableAccountingCode:
              type: string
              description: |
                The accounting code for the sales taxes payable.
            salesTaxPayableAccountingCodeType:
              type: string
              description: |
                The type of the accounting code for the sales taxes payable.
          description: |
            Container for the finance information related to the taxation item.
        id:
          type: string
          description: |
            The ID of the taxation item.
        jurisdiction:
          type: string
          description: >
            The jurisdiction that applies the tax or VAT. This value is
            typically a state, province, county, or city.
        locationCode:
          type: string
          description: >
            The identifier for the location based on the value of the `taxCode`
            field.
        name:
          type: string
          description: |
            The name of the taxation item.
        paymentAmount:
          type: number
          description: |
            The amount of payments applied to the debit memo. 
          format: double
        refundAmount:
          type: number
          description: |
            The amount of the refund on the taxation item.
          format: double
        sourceTaxItemId:
          type: string
          description: |
            The ID of the source taxation item.
        taxAmount:
          type: number
          description: |
            The amount of taxation.
          format: double
        taxCode:
          type: string
          description: >
            The tax code identifies which tax rules and tax rates to apply to a
            specific debit memo.
        taxCodeDescription:
          type: string
          description: |
            The description of the tax code.
        taxDate:
          type: string
          description: >
            The date that the tax is applied to the debit memo, in `yyyy-mm-dd`
            format.
          format: date
        taxRate:
          type: number
          description: |
            The tax rate applied to the debit memo.
          format: double
        taxRateDescription:
          type: string
          description: |
            The description of the tax rate.
        taxRateType:
          type: string
          description: |
            The type of the tax rate.
          enum:
            - Percentage
            - FlatFee
        unappliedAmount:
          type: number
          description: |
            The unapplied amount of the taxation item.
          format: double
    GETDMTaxItemTypeNew:
      title: data
      type: object
      properties:
        balance:
          type: number
          description: |
            The balance of the taxation item.
          format: double
        creditAmount:
          type: number
          description: |
            The amount of credit memos applied to the debit memo. 
          format: double
        exemptAmount:
          type: number
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
        financeInformation:
          type: object
          properties:
            salesTaxPayableAccountingCode:
              type: string
              description: |
                The accounting code for the sales taxes payable.
            salesTaxPayableAccountingCodeType:
              type: string
              description: |
                The type of the accounting code for the sales taxes payable.
          description: |
            Container for the finance information related to the taxation item.
        id:
          type: string
          description: |
            The ID of the taxation item.
        jurisdiction:
          type: string
          description: >
            The jurisdiction that applies the tax or VAT. This value is
            typically a state, province, county, or city.
        locationCode:
          type: string
          description: >
            The identifier for the location based on the value of the `taxCode`
            field.
        name:
          type: string
          description: |
            The name of the taxation item.
        paymentAmount:
          type: number
          description: |
            The amount of payments applied to the debit memo. 
          format: double
        sourceTaxItemId:
          type: string
          description: |
            The ID of the source taxation item.
        taxAmount:
          type: number
          description: |
            The amount of taxation.
          format: double
        taxCode:
          type: string
          description: >
            The tax code identifies which tax rules and tax rates to apply to a
            specific debit memo.
        taxCodeDescription:
          type: string
          description: |
            The description of the tax code.
        taxDate:
          type: string
          description: >
            The date that the tax is applied to the debit memo, in `yyyy-mm-dd`
            format.
          format: date
        taxRate:
          type: number
          description: |
            The tax rate applied to the debit memo.
          format: double
        taxRateDescription:
          type: string
          description: |
            The description of the tax rate.
        taxRateType:
          type: string
          description: |
            The type of the tax rate.
          enum:
            - Percentage
            - FlatFee
    GETDebitMemoCollectionType:
      type: object
      properties:
        debitmemos:
          type: array
          description: |
            Container for debit memos.
          items:
            $ref: "#/components/schemas/GETDebitMemoTypewithSuccess"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETDebitMemoItemCollectionType:
      type: object
      properties:
        items:
          type: array
          description: |
            Container for debit memo items.
          items:
            $ref: "#/components/schemas/GETDebitMemoItemTypewithSuccess"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETDebitMemoItemType:
      allOf:
        - type: object
          properties:
            amount:
              type: number
              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
            amountWithoutTax:
              type: number
              description: |
                The debit memo item amount excluding tax.
              format: double
            balance:
              type: number
              description: |
                The balance of the debit memo item.
              format: double
            beAppliedAmount:
              type: number
              description: |
                The applied amount of the debit memo item.
              format: double
            comment:
              type: string
              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.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the debit memo item.
            createdDate:
              type: string
              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
            description:
              type: string
              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.
            financeInformation:
              type: object
              properties:
                deferredRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for the deferred revenue, such as
                    Monthly Recurring Liability.
                deferredRevenueAccountingCodeType:
                  type: string
                  description: >
                    The type of the deferred revenue accounting code, such as
                    Deferred Revenue.
                recognizedRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for the recognized revenue, such as
                    Monthly Recurring Charges or Overage Charges.
                recognizedRevenueAccountingCodeType:
                  type: string
                  description: >
                    The type of the recognized revenue accounting code, such as
                    Sales Revenue or Sales Discount.
                revenueRecognitionRuleName:
                  type: string
                  description: >
                    The name of the revenue recognition rule governing the
                    revenue schedule.
                revenueScheduleNumber:
                  type: string
                  description: >
                    The revenue schedule number. The revenue schedule number is
                    always prefixed with "RS", for example, RS-00000001.
              description: >
                Container for the finance information related to the debit memo
                item.
            id:
              type: string
              description: |
                The ID of the debit memo item.
            quantity:
              type: number
              description: |
                The number of units for the debit memo item.
              format: double
            serviceEndDate:
              type: string
              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
            serviceStartDate:
              type: string
              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
            sku:
              type: string
              description: |
                The SKU for the product associated with the debit memo item.
            skuName:
              type: string
              description: |
                The name of the SKU.
            sourceItemId:
              type: string
              description: |
                The ID of the source item.
            sourceItemType:
              type: string
              description: |
                The type of the source item. 
              enum:
                - SubscriptionComponent
                - InvoiceDetail
                - ProductRatePlanCharge
            subscriptionId:
              type: string
              description: |
                The ID of the subscription associated with the debit memo item.
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
            taxItems:
              type: array
              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"
            taxationItems:
              type: object
              properties:
                data:
                  type: array
                  description: |
                    List of taxation items.
                  items:
                    $ref: "#/components/schemas/GETDMTaxItemTypeNew"
                nextPage:
                  type: string
                  description: >
                    URL to retrieve the next page of the response if it exists;
                    otherwise absent.
                  format: URL
              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.
            unitOfMeasure:
              type: string
              description: |
                The units to measure usage.
            unitPrice:
              type: number
              description: |
                The per-unit price of the debit memo item.
              format: double
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the debit memo item.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/DebitMemoItemObjectCustomFields"
    GETDebitMemoItemTypewithSuccess:
      title: items
      allOf:
        - type: object
          properties:
            amount:
              type: number
              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
            amountWithoutTax:
              type: number
              description: |
                The debit memo item amount excluding tax.
              format: double
            balance:
              type: number
              description: |
                The balance of the debit memo item.
              format: double
            beAppliedAmount:
              type: number
              description: |
                The applied amount of the debit memo item.
              format: double
            comment:
              type: string
              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.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the debit memo item.
            createdDate:
              type: string
              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
            description:
              type: string
              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.
            financeInformation:
              type: object
              properties:
                deferredRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for the deferred revenue, such as
                    Monthly Recurring Liability.
                deferredRevenueAccountingCodeType:
                  type: string
                  description: >
                    The type of the deferred revenue accounting code, such as
                    Deferred Revenue.
                recognizedRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for the recognized revenue, such as
                    Monthly Recurring Charges or Overage Charges.
                recognizedRevenueAccountingCodeType:
                  type: string
                  description: >
                    The type of the recognized revenue accounting code, such as
                    Sales Revenue or Sales Discount.
                revenueRecognitionRuleName:
                  type: string
                  description: >
                    The name of the revenue recognition rule governing the
                    revenue schedule.
                revenueScheduleNumber:
                  type: string
                  description: >
                    The revenue schedule number. The revenue schedule number is
                    always prefixed with "RS", for example, RS-00000001.
              description: >
                Container for the finance information related to the debit memo
                item.
            id:
              type: string
              description: |
                The ID of the debit memo item.
            quantity:
              type: number
              description: |
                The number of units for the debit memo item.
              format: double
            serviceEndDate:
              type: string
              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
            serviceStartDate:
              type: string
              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
            sku:
              type: string
              description: |
                The SKU for the product associated with the debit memo item.
            skuName:
              type: string
              description: |
                The name of the SKU.
            sourceItemId:
              type: string
              description: |
                The ID of the source item.
            sourceItemType:
              type: string
              description: |
                The type of the source item.
              enum:
                - SubscriptionComponent
                - InvoiceDetail
                - ProductRatePlanCharge
            subscriptionId:
              type: string
              description: |
                The ID of the subscription associated with the debit memo item.
            taxItems:
              type: array
              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"
            taxationItems:
              type: object
              properties:
                data:
                  type: array
                  description: |
                    List of taxation items.
                  items:
                    $ref: "#/components/schemas/GETDMTaxItemTypeNew"
                nextPage:
                  type: string
                  description: >
                    URL to retrieve the next page of the response if it exists;
                    otherwise absent.
                  format: URL
              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.
            unitOfMeasure:
              type: string
              description: |
                The units to measure usage.
            unitPrice:
              type: number
              description: |
                The per-unit price of the debit memo item.
              format: double
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the debit memo item.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/DebitMemoItemObjectCustomFields"
    GETDebitMemoType:
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                The ID of the customer account associated with the debit memo.
            amount:
              type: number
              description: |
                The total amount of the debit memo.
              format: double
            autoPay:
              type: boolean
              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.
            balance:
              type: number
              description: |
                The balance of the debit memo.
              format: double
            beAppliedAmount:
              type: number
              description: |
                The amount that is applied to the debit memo.
              format: double
            cancelledById:
              type: string
              description: |
                The ID of the Zuora user who cancelled the debit memo.
            cancelledOn:
              type: string
              description: >
                The date and time when the debit memo was cancelled, in
                `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
            comment:
              type: string
              description: |
                Comments about the debit memo.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the debit memo.
            createdDate:
              type: string
              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
            debitMemoDate:
              type: string
              description: >
                The date when the debit memo takes effect, in `yyyy-mm-dd`
                format. For example, 2017-05-20.
              format: date
            dueDate:
              type: string
              description: >
                The date by which the payment for the debit memo is due, in
                `yyyy-mm-dd` format.
              format: date
            id:
              type: string
              description: |
                The unique ID of the debit memo.
            latestPDFFileId:
              type: string
              description: |
                The ID of the latest PDF file generated for the debit memo.
            number:
              type: string
              description: |
                The unique identification number of the debit memo.
            postedById:
              type: string
              description: |
                The ID of the Zuora user who posted the debit memo. 
            postedOn:
              type: string
              description: >
                The date and time when the debit memo was posted, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            reasonCode:
              type: string
              description: >
                A code identifying the reason for the transaction. The value
                must be an existing reason code or empty.
            referredInvoiceId:
              type: string
              description: |
                The ID of a referred invoice.
            status:
              type: string
              description: |
                The status of the debit memo.
              enum:
                - Draft
                - Posted
                - Canceled
                - Error
                - PendingForTax
                - Generating
                - CancelInProgress
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
            targetDate:
              type: string
              description: >
                The target date for the debit memo, in `yyyy-mm-dd` format. For
                example, 2017-07-20.
              format: date
            taxAmount:
              type: number
              description: |
                The amount of taxation.
              format: double
            taxMessage:
              type: string
              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.
            taxStatus:
              type: string
              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:
                - Completed
                - Error
            totalTaxExemptAmount:
              type: number
              description: >
                The total amount of taxes or VAT for which the customer has an
                exemption.
              format: double
            transferredToAccounting:
              type: string
              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
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the debit memo.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/DebitMemoObjectNSFields"
        - $ref: "#/components/schemas/DebitMemoObjectCustomFields"
    GETDebitMemoTypewithSuccess:
      title: debitmemos
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                The ID of the customer account associated with the debit memo.
            amount:
              type: number
              description: |
                The total amount of the debit memo.
              format: double
            autoPay:
              type: boolean
              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.      
            balance:
              type: number
              description: |
                The balance of the debit memo.
              format: double
            beAppliedAmount:
              type: number
              description: |
                The applied amount of the debit memo.
              format: double
            cancelledById:
              type: string
              description: |
                The ID of the Zuora user who cancelled the debit memo.
            cancelledOn:
              type: string
              description: >
                The date and time when the debit memo was cancelled, in
                `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
            comment:
              type: string
              description: |
                Comments about the debit memo.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the debit memo.
            createdDate:
              type: string
              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
            debitMemoDate:
              type: string
              description: >
                The date when the debit memo takes effect, in `yyyy-mm-dd`
                format. For example, 2017-05-20.
              format: date
            dueDate:
              type: string
              description: >
                The date by which the payment for the debit memo is due, in
                `yyyy-mm-dd` format.
              format: date
            id:
              type: string
              description: |
                The unique ID of the debit memo.
            latestPDFFileId:
              type: string
              description: |
                The ID of the latest PDF file generated for the debit memo.
            number:
              type: string
              description: |
                The unique identification number of the debit memo.
            postedById:
              type: string
              description: |
                The ID of the Zuora user who posted the debit memo.
            postedOn:
              type: string
              description: >
                The date and time when the debit memo was posted, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            reasonCode:
              type: string
              description: >
                A code identifying the reason for the transaction. The value
                must be an existing reason code or empty.
            referredInvoiceId:
              type: string
              description: |
                The ID of a referred invoice.
            status:
              type: string
              description: |
                The status of the debit memo. 
              enum:
                - Draft
                - Posted
                - Canceled
                - Error
                - PendingForTax
                - Generating
                - CancelInProgress
            targetDate:
              type: string
              description: >
                The target date for the debit memo, in `yyyy-mm-dd` format. For
                example, 2017-07-20.
              format: date
            taxAmount:
              type: number
              description: |
                The amount of taxation.
              format: double
            taxMessage:
              type: string
              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.
            taxStatus:
              type: string
              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:
                - Completed
                - Error
            totalTaxExemptAmount:
              type: number
              description: >
                The total amount of taxes or VAT for which the customer has an
                exemption.
              format: double
            transferredToAccounting:
              type: string
              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
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the debit memo.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/DebitMemoObjectNSFields"
        - $ref: "#/components/schemas/DebitMemoObjectCustomFields"
    GETDiscountApplyDetailsType:
      title: discountApplyDetails
      type: object
      properties:
        appliedProductRatePlanChargeId:
          type: string
          description: >
            The ID of the product rate plan charge that the discount rate plan
            charge applies to.
        appliedProductRatePlanId:
          type: string
          description: >
            The ID of the product rate plan that the discount rate plan charge
            applies to.
    GETDocumentPropertiesResponseType:
      type: object
      properties:
        customFileName:
          type: string
          description: >
            The custom file name used by Word or PDF files generated for the
            billing document.
        documentId:
          type: string
          description: |
            The unique ID of a billing document.
        documentType:
          type: string
          description: |
            The type of the billing document. 
          enum:
            - Invoice
            - CreditMemo
            - DebitMemo
        id:
          type: string
          description: |
            The unique ID of a document property.
        success:
          type: boolean
          description: |
            Indicates whether the call succeeded.
    GETEmailHistoryVOType:
      title: emailHistories
      type: object
      properties:
        bcc:
          type: string
          description: |
            Blind carbon copy recipients of the email.
        cc:
          type: string
          description: |
            Carbon Copy recipients of the email.
        errorMessage:
          type: string
          description: >
            null if the content of result is "OK". A description of the error if
            the content of result is not "OK".
        eventCategory:
          type: string
          description: |
            The event category of the email.
        fromEmail:
          type: string
          description: |
            The sender of the email.
        notification:
          type: string
          description: |
            The name of the notification.
        replyTo:
          type: string
          description: |
            The reply-to address as configured in the email template.
        result:
          type: string
          description: |
            The result from the mail server of sending the email.
        sendTime:
          type: string
          description: |
            The date and time the email was sent.
        subject:
          type: string
          description: |
            The subject of the email.
        toEmail:
          type: string
          description: |
            The intended recipient of the email.
    GETEmailHistoryVOsType:
      type: object
      properties:
        emailHistories:
          type: array
          description: |
            A container for email histories.
          items:
            $ref: "#/components/schemas/GETEmailHistoryVOType"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETEntitiesResponseType:
      type: object
      properties:
        entities:
          type: array
          description: Container for one or more entities in a multi-entity hierarchy.
          items:
            $ref: "#/components/schemas/GETEntitiesType"
        success:
          type: boolean
          description: Returns `true` if the request is successful.
    GETEntitiesResponseTypeWithId:
      type: object
      properties:
        displayName:
          type: string
          description: The display name of the entity that is shown in the Zuora UI and
            APIs.
        id:
          type: string
          description: The entity Id.
        locale:
          type: string
          description: The locale that is used in this entity.
        name:
          type: string
          description: The name of the entity.
        parentId:
          type: string
          description: The Id of the parent entity.
        status:
          type: string
          description: The status of the entity.
          enum:
            - Provisioned
            - Unprovisioned
        success:
          type: boolean
          description: Returns `true` if the request is successful.
        tenantId:
          type: string
          description: The Id of the tenant that the entity belongs to.
        timezone:
          type: string
          description: The time zone that is used in this entity.
    GETEntitiesType:
      title: entities
      type: object
      properties:
        displayName:
          type: string
          description: >
            The display name of the entity that is shown in the Zuora UI and
            APIs.
        id:
          type: string
          description: |
            The entity Id.
        locale:
          type: string
          description: |
            The locale that is used in this entity.
        name:
          type: string
          description: |
            The name of the entity.
        parentId:
          type: string
          description: |
            The Id of the parent entity.
        status:
          type: string
          description: |
            The status of the entity.
          enum:
            - Provisioned
            - Unprovisioned
        tenantId:
          type: string
          description: |
            The Id of the tenant that the entity belongs to.
        timezone:
          type: string
          description: |
            The time zone that is used in this entity.
    GETEntitiesUserAccessibleResponseType:
      type: object
      properties:
        entities:
          type: array
          description: |
            Container for one or more entities in a multi-entity hierarchy.
          items:
            $ref: "#/components/schemas/GETEntitiesType"
        success:
          type: boolean
          description: |
            Returns `true` if the request is successful.
    GETEntityConnectionsArrayItemsType:
      title: entityConnections
      type: object
      properties:
        id:
          type: string
          description: |
            The ID of the connection.
        sourceEntityId:
          type: string
          description: |
            The ID of the source entity in the connection.
        status:
          type: string
          description: |
            Status of the connection. 

            Possible values:
             - `Connected`
             - `Pending`
             - `Disconnected`
        targetEntityId:
          type: string
          description: |
            The ID of the target entity in the connection.
    GETEntityConnectionsResponseType:
      type: object
      properties:
        entityConnections:
          type: array
          description: >
            Container for one or more connections that are related to the entity.
          items:
            $ref: "#/components/schemas/GETEntityConnectionsArrayItemsType"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETInvoiceFileWrapper:
      type: object
      properties:
        invoices:
          type: array
          description: |
            Contains information about one or more invoices:
          items:
            $ref: "#/components/schemas/GETInvoiceType"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETInvoiceFilesResponse:
      type: object
      properties:
        invoiceFiles:
          type: array
          description: |
            Container for invoice PDF files.
          items:
            $ref: "#/components/schemas/InvoiceFile"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETInvoiceItemsResponse:
      type: object
      properties:
        invoiceItems:
          type: array
          description: |
            Container for invoice items.
          items:
            $ref: "#/components/schemas/InvoiceItem"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETInvoiceTaxItemType:
      title: data
      type: object
      properties:
        availableToCreditAmount:
          type: number
          description: |
            The amount of the invoice taxation item that is available to credit.
          format: decimal
        balance:
          type: number
          description: |
            The balance of the taxation item.
          format: double
        creditAmount:
          type: number
          description: |
            The amount of credit memos applied to the taxation item. 
          format: double
        exemptAmount:
          type: number
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
        id:
          type: string
          description: |
            The ID of the taxation item.
        jurisdiction:
          type: string
          description: >
            The jurisdiction that applies the tax or VAT. This value is
            typically a state, province, county, or city.
        locationCode:
          type: string
          description: >
            The identifier for the location based on the value of the `taxCode`
            field.
        name:
          type: string
          description: |
            The name of the taxation item.
        paymentAmount:
          type: number
          description: |
            The amount of payments applied to the taxation item. 
          format: double
        taxAmount:
          type: number
          description: |
            The amount of taxation.
          format: double
        taxCode:
          type: string
          description: >
            The tax code identifies which tax rules and tax rates to apply to a
            specific invoice.
        taxCodeDescription:
          type: string
          description: |
            The description of the tax code.
        taxDate:
          type: string
          description: >
            The date that the tax is applied to the invoice, in `yyyy-mm-dd`
            format.
          format: date
        taxRate:
          type: number
          description: |
            The tax rate applied to the invoice.
          format: double
        taxRateDescription:
          type: string
          description: |
            The description of the tax rate.
        taxRateType:
          type: string
          description: |
            The type of the tax rate.
          enum:
            - Percentage
            - FlatFee
    GETInvoiceTaxationItemsResponse:
      type: object
      properties:
        data:
          type: array
          description: |
            Container for the taxation items of the invoice item.
          items:
            $ref: "#/components/schemas/GETInvoiceTaxItemType"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETInvoiceType:
      title: invoices
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                Customer account ID.
            accountName:
              type: string
              description: |
                Customer account name.
            accountNumber:
              type: string
              description: |
                Customer account number.
            amount:
              type: string
              description: >
                Amount of the invoice before adjustments, discounts, and similar
                items.
              format: decimal
            balance:
              type: string
              description: >
                Balance remaining due on the invoice (after adjustments,
                discounts, etc.)
              format: decimal
            body:
              type: string
              description: |
                The REST URL of the invoice PDF file.
            createdBy:
              type: string
              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.
            creditBalanceAdjustmentAmount:
              type: string
              description: ""
              format: decimal
            dueDate:
              type: string
              description: |
                Payment due date as _yyyy-mm-dd_.
              format: date
            id:
              type: string
              description: |
                Invoice ID.
            invoiceDate:
              type: string
              description: |
                Invoice date as _yyyy-mm-dd_
              format: date
            invoiceFiles:
              type: string
              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
            invoiceItems:
              type: string
              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
            invoiceNumber:
              type: string
              description: |
                Unique invoice ID, returned as a string.
            invoiceTargetDate:
              type: string
              description: >
                Date through which charges on this invoice are calculated, as
                _yyyy-mm-dd_.
              format: date
            reversed:
              type: boolean
              description: |
                Whether the invoice is reversed.
            status:
              type: string
              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`.
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
    GETJournalEntriesInJournalRunType:
      type: object
      properties:
        journalEntries:
          type: array
          description: |
            Key name that represents the list of journal entries.
          items:
            $ref: "#/components/schemas/GETJournalEntryDetailTypeWithoutSuccess"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETJournalEntryDetailType:
      allOf:
        - type: object
          properties:
            accountingPeriodName:
              type: string
              description: |
                Name of the accounting period that the journal entry belongs to.
            aggregateCurrency:
              type: boolean
              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`.
            currency:
              type: string
              description: |
                Currency used.
            homeCurrency:
              type: string
              description: |
                Home currency used.
            journalEntryDate:
              type: string
              description: |
                Date of the journal entry.
              format: date
            journalEntryItems:
              type: array
              description: |
                Key name that represents the list of journal entry items.
              items:
                $ref: "#/components/schemas/GETJournalEntryItemType"
            notes:
              type: string
              description: |
                
                Additional information about this record.
                Character limit: 2,000
            number:
              type: string
              description: |
                Journal entry number in the format JE-00000001.
            segments:
              type: array
              description: |
                List of segments that apply to the summary journal entry.
              items:
                $ref: "#/components/schemas/GETJournalEntrySegmentType"
            status:
              type: string
              description: |
                Status of journal entry.
              enum:
                - Created
                - Cancelled
            success:
              type: boolean
              description: |
                Returns `true` if the request was processed successfully.
            timePeriodEnd:
              type: string
              description: |
                End date of time period included in the journal entry.
              format: date
            timePeriodStart:
              type: string
              description: |
                Start date of time period included in the journal entry.
              format: date
            transactionType:
              type: string
              description: >
                Transaction type of the transactions included in the summary
                journal entry.
            transferDateTime:
              type: string
              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
            transferredBy:
              type: string
              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`.
            transferredToAccounting:
              type: string
              description: "Status shows whether the journal entry has been transferred to an
                accounting system. "
              enum:
                - No
                - Processing
                - Yes
                - Error
                - Ignore
        - $ref: "#/components/schemas/JournalEntryObjectCustomFields"
    GETJournalEntryDetailTypeWithoutSuccess:
      title: journalEntries
      allOf:
        - type: object
          properties:
            accountingPeriodName:
              type: string
              description: |
                Name of the accounting period that the journal entry belongs to.
            aggregateCurrency:
              type: boolean
              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`.
            currency:
              type: string
              description: |
                Currency used.
            homeCurrency:
              type: string
              description: |
                Home currency used.
            journalEntryDate:
              type: string
              description: |
                Date of the journal entry.
              format: date
            journalEntryItems:
              type: array
              description: |
                Key name that represents the list of journal entry items.
              items:
                $ref: "#/components/schemas/GETJournalEntryItemType"
            notes:
              type: string
              description: |
                Additional information about this record.
                Character limit: 2,000
            number:
              type: string
              description: |
                Journal entry number in the format JE-00000001.
            segments:
              type: array
              description: |
                List of segments that apply to the summary journal entry.
              items:
                $ref: "#/components/schemas/GETJournalEntrySegmentType"
            status:
              type: string
              description: "Status of journal entry. "
              enum:
                - Created
                - Cancelled
            timePeriodEnd:
              type: string
              description: |
                End date of time period included in the journal entry.
              format: date
            timePeriodStart:
              type: string
              description: |
                Start date of time period included in the journal entry.
              format: date
            transactionType:
              type: string
              description: >
                Transaction type of the transactions included in the summary
                journal entry.
            transferDateTime:
              type: string
              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
            transferredBy:
              type: string
              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`.
            transferredToAccounting:
              type: string
              description: "Status shows whether the journal entry has been transferred to an
                accounting system. "
              enum:
                - No
                - Processing
                - Yes
                - Error
                - Ignore
        - $ref: "#/components/schemas/JournalEntryObjectCustomFields"
    GETJournalEntryItemType:
      title: journalEntryItems
      allOf:
        - type: object
          properties:
            accountingCodeName:
              type: string
              description: |
                Name of the accounting code.
            accountingCodeType:
              type: string
              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
            amount:
              type: string
              description: |
                Journal entry item amount in transaction currency.
              format: decimal
            glAccountName:
              type: string
              description: >
                The account number in the general ledger (GL) that corresponds
                to the accounting code.
            glAccountNumber:
              type: string
              description: >
                The account name in the general ledger (GL) that corresponds to
                the accounting code.
            homeCurrencyAmount:
              type: string
              description: |
                Journal entry item amount in home currency.
              format: decimal
            type:
              type: string
              description: "Type of journal entry item. "
              enum:
                - Credit
                - Debit
        - $ref: "#/components/schemas/JournalEntryItemObjectCustomFields"
    GETJournalEntrySegmentType:
      title: segments
      type: object
      properties:
        segmentName:
          type: string
          description: |
            Name of segment.
        segmentValue:
          type: string
          description: |
            Value of segment in this summary journal entry.
    GETJournalRunTransactionType:
      title: transactionTypes
      type: object
      properties:
        type:
          type: string
          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
    GETJournalRunType:
      type: object
      properties:
        aggregateCurrency:
          type: boolean
          description: ""
        executedOn:
          type: string
          description: |
            Date and time the journal run was executed.
          format: date-time
        journalEntryDate:
          type: string
          description: |
            Date of the journal entry.
          format: date
        number:
          type: string
          description: |
            Journal run number.
        segmentationRuleName:
          type: string
          description: |
            Name of GL segmentation rule used in the journal run.
        status:
          type: string
          description: |
            Status of the journal run. 
          enum:
            - Pending
            - Processing
            - Completed
            - Error
            - CancelInprogress
            - Cancelled
            - DeleteInprogress
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        targetEndDate:
          type: string
          description: |
            The target end date of the journal run.
          format: date
        targetStartDate:
          type: string
          description: |
            The target start date of the journal run.
          format: date
        totalJournalEntryCount:
          type: integer
          description: |
            Total number of journal entries in the journal run.
          format: int64
        transactionTypes:
          type: array
          description: |
            Transaction types included in the journal run.
          items:
            $ref: "#/components/schemas/GETJournalRunTransactionType"
    GETMassUpdateType:
      type: object
      properties:
        actionType:
          type: string
          description: |
            Type of mass action.
        endedOn:
          type: string
          description: >
            Date and time that the mass action was completed. The format is
            `yyyy-MM-dd hh:mm:ss`.
          format: date-time
        errorCount:
          type: string
          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.
        inputSize:
          type: integer
          description: |
            Size of the input file in bytes.
          format: int64
        outputSize:
          type: integer
          description: |
            Size of the response file in bytes.
          format: int64
        outputType:
          type: string
          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. |
        outputURL:
          type: string
          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.
        processedCount:
          type: string
          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.
        startedOn:
          type: string
          description: >
            Date and time that Zuora started processing the mass action. The
            format is `yyyy-MM-dd hh:mm:ss`.
          format: date-time
        status:
          type: string
          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. |
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        successCount:
          type: string
          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.
        totalCount:
          type: string
          description: |
            Total number of records in the uploaded mass action file.
            When the mass action **status** is Pending, this field is null.
        uploadedBy:
          type: string
          description: |
            Email of the person who uploaded the mass action file.
        uploadedOn:
          type: string
          description: >
            Date and time that the mass action file was uploaded. The format is
            `yyyy-MM-dd hh:mm:ss`.
          format: date-time
    GETPaidInvoicesType:
      title: paidInvoices
      type: object
      properties:
        appliedPaymentAmount:
          type: string
          description: |
            Amount of the payment applied to this invoice.
          format: decimal
        invoiceId:
          type: string
          description: |
            Invoice ID.
        invoiceNumber:
          type: string
          description: |
            Invoice number.
    GETPaymentGatwaysResponse:
      type: object
      properties:
        paymentgateways:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/GETAPaymentGatwayResponse"
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETPaymentItemPartCollectionType:
      type: object
      properties:
        itemParts:
          type: array
          description: |
            Container for payment part items.
          items:
            $ref: "#/components/schemas/GETPaymentItemPartTypewithSuccess"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETPaymentItemPartType:
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the payment part item.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the payment part item.
        createdDate:
          type: string
          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
        debitMemoItemId:
          type: string
          description: |
            The ID of the debit memo item associated with the payment part item.
        id:
          type: string
          description: |
            The ID of the payment part item.
        invoiceItemId:
          type: string
          description: |
            The ID of the invoice item associated with the payment part item.
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
        taxItemId:
          type: string
          description: |
            The ID of the taxation item associated with the payment part item.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the payment part item.
        updatedDate:
          type: string
          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
    GETPaymentItemPartTypewithSuccess:
      title: itemParts
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the payment part item.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the payment part item.
        createdDate:
          type: string
          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
        debitMemoItemId:
          type: string
          description: |
            The ID of the debit memo item associated with the payment part item.
        id:
          type: string
          description: |
            The ID of the payment part item.
        invoiceItemId:
          type: string
          description: |
            The ID of the invoice item associated with the payment part item.
        taxItemId:
          type: string
          description: |
            The ID of the taxation item associated with the payment part item.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the payment part item.
        updatedDate:
          type: string
          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
    GETPaymentMethodType:
      title: creditCards
      type: object
      properties:
        cardHolderInfo:
          type: object
          properties:
            addressLine1:
              type: string
              description: |
                First address line, 255 characters or less.
            addressLine2:
              type: string
              description: |
                Second address line, 255 characters or less.
            cardHolderName:
              type: string
              description: >
                The full name as it appears on the card, e.g., "John J Smith",
                50 characters or less.
            city:
              type: string
              description: |
                City, 40 characters or less.
            country:
              type: string
              description: |
                Country, must be a valid country name or abbreviation.
            email:
              type: string
              description: |
                Card holder's email address, 80 characters or less.
            phone:
              type: string
              description: |
                Phone number, 40 characters or less.
            state:
              type: string
              description: |
                State, must be a valid state name or 2-character abbreviation.
            zipCode:
              type: string
              description: |
                Zip code, 20 characters or less.
          description: |
            Container for the name and billing address for the card holder.
        cardNumber:
          type: string
          description: >
            Credit or debit card number, 16 characters or less, masked for
            security purposes.
        cardType:
          type: string
          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).
        defaultPaymentMethod:
          type: boolean
          description: >
            Contains true if this is the default payment method for this
            customer, otherwise false.
        expirationMonth:
          type: string
          description: |
            One or two digit(s) expiration month (1-12).
        expirationYear:
          type: string
          description: |
            Four-digit expiration year.
        id:
          type: string
          description: |
            Unique ID generated by Zuora when this payment method was created.
    GETPaymentMethodsType:
      type: object
      properties:
        creditCards:
          type: array
          description: |
            Container for one or more credit or debit card records:
          items:
            $ref: "#/components/schemas/GETPaymentMethodType"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETPaymentPartType:
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the payment part.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the payment part.
        createdDate:
          type: string
          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
        debitMemoId:
          type: string
          description: |
            The ID of the debit memo associated with the payment part.
        id:
          type: string
          description: |
            The ID of the payment part.
        invoiceId:
          type: string
          description: |
            The ID of the invoice associated with the payment part.
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the payment part.
        updatedDate:
          type: string
          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
    GETPaymentPartTypewithSuccess:
      title: parts
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the payment part.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the payment part.
        createdDate:
          type: string
          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
        debitMemoId:
          type: string
          description: |
            The ID of the debit memo associated with the payment part.
        id:
          type: string
          description: |
            The ID of the payment part.
        invoiceId:
          type: string
          description: |
            The ID of the invoice associated with the payment part.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the payment part.
        updatedDate:
          type: string
          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
    GETPaymentPartsCollectionType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        parts:
          type: array
          description: |
            Container for payment parts.
          items:
            $ref: "#/components/schemas/GETPaymentPartTypewithSuccess"
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETPaymentRunCollectionType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            The URL for requesting the next page of the response, if it exists;
            otherwise absent.
        paymentRuns:
          type: array
          description: |
            Container for payment runs.
          items:
            $ref: "#/components/schemas/GETPaymentRunType"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETPaymentRunSummaryResponse:
      type: object
      properties:
        numberOfCreditBalanceAdjustments:
          type: integer
          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.
        numberOfCreditMemos:
          type: integer
          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.
        numberOfDebitMemos:
          type: integer
          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.
        numberOfErrors:
          type: integer
          description: |
            The number of payments with the status of `Error` and `Processing`.
        numberOfInvoices:
          type: integer
          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.
        numberOfPayments:
          type: integer
          description: >
            The number of payments that are successfully processed in the
            payment run.
        numberOfReceivables:
          type: integer
          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.
        numberOfUnappliedPayments:
          type: integer
          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.
        numberOfUnprocessedDebitMemos:
          type: integer
          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.
        numberOfUnprocessedInvoices:
          type: integer
          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.
        numberOfUnprocessedReceivables:
          type: integer
          description: >
            The number of receivables with remaining positive balances after the
            payment run is completed.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        totalValues:
          type: array
          description: |
            Container for total values.
          items:
            $ref: "#/components/schemas/GETPaymentRunSummaryTotalValues"
    GETPaymentRunSummaryTotalValues:
      title: totalValues
      type: object
      properties:
        totalValueOfCreditBalance:
          type: string
          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.
        totalValueOfCreditMemos:
          type: string
          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.
        totalValueOfDebitMemos:
          type: string
          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.
        totalValueOfErrors:
          type: string
          description: >
            The total amount of receivables associated with the payments with
            the status of `Error` and `Processing`.
        totalValueOfInvoices:
          type: string
          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.
        totalValueOfPayments:
          type: string
          description: >
            The total amount of payments that are successfully processed in the
            payment run.
        totalValueOfReceivables:
          type: string
          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.
        totalValueOfUnappliedPayments:
          type: integer
          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.
        totalValueOfUnprocessedDebitMemos:
          type: string
          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.
        totalValueOfUnprocessedInvoices:
          type: string
          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.
        totalValueOfUnprocessedReceivables:
          type: string
          description: >
            The total amount of receivables with remaining positive balances
            after the payment run is completed.
    GETPaymentRunType:
      title: paymentRuns
      type: object
      properties:
        accountId:
          type: string
          description: |
            The ID of the customer account associated with the payment run.
        applyCreditBalance:
          type: boolean
          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.
        autoApplyCreditMemo:
          type: boolean
          description: >
            **Note:** The Invoice Settlement feature is in **Limited
            Availability**. This feature includes Unapplied Payments, Credit and
            Debit Memo, and Invoice Item Settlement. If you wish to have access
            to the feature, submit a request at [Zuora Global
            Support](http://support.zuora.com/).


            Whether to automatically apply a posted credit memo to one or more receivables in the payment run.
        autoApplyUnappliedPayment:
          type: boolean
          description: >
            **Note:** The Invoice Settlement feature is in **Limited
            Availability**. This feature includes Unapplied Payments, Credit and
            Debit Memo, and Invoice Item Settlement. If you wish to have access
            to the feature, submit a request at [Zuora Global
            Support](http://support.zuora.com/).


            Whether to automatically apply unapplied payments to  one or more receivables in the payment run.
        batch:
          type: string
          description: |
            The alias name given to a batch.
          example: Batch1
        billCycleDay:
          type: string
          description: >
            The billing cycle day (BCD), the day of the month when a bill run
            generates invoices for the account. 
          example: "1"
        billingRunId:
          type: string
          description: |
            The ID of the bill run.
          format: uuid
        collectPayment:
          type: boolean
          description: >
            Whether to process electronic payments during the execution of
            payment runs. 
        completedOn:
          type: string
          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
        consolidatedPayment:
          type: boolean
          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.
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the payment run.
        createdDate:
          type: string
          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
        currency:
          type: string
          description: |
            A currency defined in the web-based UI administrative settings.
          example: USD
        executedOn:
          type: string
          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
        id:
          type: string
          description: |
            The ID of the payment run.
        number:
          type: string
          description: |
            The identification number of the payment run.
        paymentGatewayId:
          type: string
          description: |
            The ID of the gateway instance that processes the payment.
          format: uuid
        processPaymentWithClosedPM:
          type: boolean
          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.
        runDate:
          type: string
          description: >
            The date and time when the scheduled payment run is to be executed
            for collecting payments.
          format: date-time
        status:
          type: string
          description: |
            The status of the created payment run.
          enum:
            - Pending
            - Processing
            - Completed
            - Error
            - Canceled
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        targetDate:
          type: string
          description: >
            The target date used to determine which receivables to be collected
            in the payment run. 
          format: date
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the payment run.
        updatedDate:
          type: string
          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
    GETPaymentType:
      title: payments
      allOf:
        - type: object
          properties:
            accountID:
              type: string
              description: |
                Customer account ID.
            accountName:
              type: string
              description: |
                Customer account name.
            accountNumber:
              type: string
              description: |
                Customer account number.
            amount:
              type: string
              description: |
                Payment amount.
              format: decimal
            effectiveDate:
              type: string
              description: |
                Effective payment date as _yyyy-mm-dd_.
              format: date
            gatewayTransactionNumber:
              type: string
              description: |
                Transaction ID from payment gateway.
            id:
              type: string
              description: |
                PaymentID.
            paidInvoices:
              type: array
              description: >
                Information about one or more invoices to which this payment was
                applied:
              items:
                $ref: "#/components/schemas/GETPaidInvoicesType"
            paymentMethodID:
              type: string
              description: |
                Payment method.
            paymentNumber:
              type: string
              description: |
                Unique payment number.
            status:
              type: string
              description: >
                Possible values are: `Draft`, `Processing`, `Processed`,
                `Error`, `Voided`, `Canceled`, `Posted.
            type:
              type: string
              description: |
                Possible values are: `External`, `Electronic`.
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
    GETPaymentsType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        payments:
          type: array
          description: |
            Information about one or more payments:
          items:
            $ref: "#/components/schemas/GETPaymentType"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETProductDiscountApplyDetailsType:
      title: productDiscountApplyDetails
      type: object
      properties:
        appliedProductRatePlanChargeId:
          type: string
          description: >
            The ID of the product rate plan charge that the discount product
            rate plan charge applies to.
        appliedProductRatePlanId:
          type: string
          description: >
            The ID of the product rate plan that the discount product rate plan
            charge applies to.
    GETProductRatePlanChargePricingTierType:
      title: tiers
      type: object
      properties:
        endingUnit:
          type: string
          description: |
            Decimal defining end of tier range.
          format: decimal
        price:
          type: string
          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
        priceFormat:
          type: string
          description: |
            Tier price format.

            Allowed values:
            - flat fee 
            - per unit
        startingUnit:
          type: string
          description: |
            Decimal defining start of tier range.
          format: decimal
        tier:
          type: integer
          description: |
            Unique number of the tier.
          format: int64
    GETProductRatePlanChargePricingType:
      title: pricing
      type: object
      properties:
        currency:
          type: string
          description: |
            Currency used by the charge model. For example: USD or EUR
        discountAmount:
          type: string
          description: >
            Value subtracted from price in currency specified. Used only when
            the charge model is DiscountFixedAmount.
          format: decimal
        discountPercentage:
          type: string
          description: >
            Percent discount applied to the price. Used only when the charge
            model is DiscountPercentage.
          format: decimal
        includedUnits:
          type: string
          description: >
            Specifies the number of units in the base set of units when the
            charge model is Overage.
          format: decimal
        overagePrice:
          type: string
          description: >
            Price per unit when base set of units is exceeded. Used only when
            charge model is Overage or Tiered with Overage.
          format: decimal
        price:
          type: string
          description: |
            The decimal value that applies when the charge model is not tiered
          format: decimal
        tiers:
          type: array
          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"
    GETProductRatePlanChargeType:
      title: productRatePlanCharges
      allOf:
        - type: object
          properties:
            applyDiscountTo:
              type: string
              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
            billingDay:
              type: string
              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.
            billingPeriod:
              type: string
              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
            billingPeriodAlignment:
              type: string
              description: >
                Aligns charges within the same subscription if multiple charges
                begin on different dates.


                Possible values:

                - AlignToCharge

                - AlignToSubscriptionStart

                - AlignToTermStart
            billingTiming:
              type: string
              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). 
            defaultQuantity:
              type: string
              description: >
                The default quantity of units.  This field is required if you
                use a per-unit charge model.
              format: decimal
            description:
              type: string
              description: |
                Usually a brief line item summary of the Rate Plan Charge.
            discountClass:
              type: string
              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).
            discountLevel:
              type: string
              description: |
                The level of the discount. 

                Values:
                - RatePlan
                - Subscription
                - Account
            endDateCondition:
              type: string
              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
            financeInformation:
              title: financeInformation
              type: object
              properties:
                adjustmentLiabilityAccountingCode:
                  type: string
                  description: >
                    The accounting code for adjustment liability. 


                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                adjustmentLiabilityAccountingCodeType:
                  type: string
                  description: >
                    The type associated with the adjustment liability accounting
                    code. 


                    **Note**: This field is only available if you have the RevPro Integration feature enabled.
                adjustmentRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for adjustment revenue. 


                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                adjustmentRevenueAccountingCodeType:
                  type: string
                  description: >
                    The type associated with the adjustment revenue accounting
                    code. 


                    **Note**: This field is only available if you have the RevPro Integration feature enabled.
                contractAssetAccountingCode:
                  type: string
                  description: >
                    The accounting code for contract asset. 


                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                contractAssetAccountingCodeType:
                  type: string
                  description: >
                    The type associated with the contract asset accounting
                    code. 


                    **Note**: This field is only available if you have the RevPro Integration feature enabled.
                contractLiabilityAccountingCode:
                  type: string
                  description: >
                    The accounting code for contract liability. 


                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                contractLiabilityAccountingCodeType:
                  type: string
                  description: >
                    The type associated with the contract liability accounting
                    code. 


                    **Note**: This field is only available if you have the RevPro Integration feature enabled.
                contractRecognizedRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for contract recognized revenue. 


                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                contractRecognizedRevenueAccountingCodeType:
                  type: string
                  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.
                deferredRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for deferred revenue, such as Monthly
                    Recurring Liability. 
                deferredRevenueAccountingCodeType:
                  type: string
                  description: >
                    The type associated with the deferred revenue accounting
                    code, such as Deferred Revenue. 
                recognizedRevenueAccountingCode:
                  type: string
                  description: >
                    The accounting code for recognized revenue, such as Monthly
                    Recurring Charges or Overage Charges. 
                recognizedRevenueAccountingCodeType:
                  type: string
                  description: >
                    The type associated with the recognized revenue accounting
                    code, such as Sales Revenue or Sales Discount. 
                unbilledReceivablesAccountingCode:
                  type: string
                  description: >
                    The accounting code for unbilled receivables. 


                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                unbilledReceivablesAccountingCodeType:
                  type: string
                  description: >
                    The type associated with the unbilled receivables accounting
                    code. 


                    **Note**: This field is only available if you have the RevPro Integration feature enabled.
              description: |
                Container for finance information of a rate plan charge.
            id:
              type: string
              description: |
                Unique product rate-plan charge ID.
            includedUnits:
              type: string
              description: >
                Specifies the number of units in the base set of units when the
                charge model is Overage.
              format: decimal
            listPriceBase:
              type: string
              description: |
                The list price base for the product rate plan charge.

                Values:
                - Month
                - Billing Period
                - Per_Week
            maxQuantity:
              type: string
              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
            minQuantity:
              type: string
              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
            model:
              type: string
              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

                The Pricing Summaries section below details these charge models and their associated pricingSummary values.
            name:
              type: string
              description: >
                Name of the product rate-plan charge. (Not required to be
                unique.)
            numberOfPeriods:
              type: integer
              description: >
                Value specifies the number of periods used in the smoothing
                model calculations Used when overage smoothing model is
                `RollingWindow` or `Rollover`.
              format: int64
            overageCalculationOption:
              type: string
              description: |
                Value specifies when to calculate overage charges.

                Values:
                - EndOfSmoothingPeriod
                - PerBillingPeriod
            overageUnusedUnitsCreditOption:
              type: string
              description: >
                Determines whether to credit the customer with unused units of
                usage.


                Values:

                - NoCredit

                - CreditBySpecificRate
            prepayPeriods:
              type: integer
              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
            priceChangeOption:
              type: string
              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
            priceIncreasePercentage:
              type: string
              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
            pricing:
              type: array
              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"
            pricingSummary:
              type: array
              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.
              items:
                type: string
            productDiscountApplyDetails:
              type: array
              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"
            ratingGroup:
              type: string
              description: >
                Specifies a rating group based on which usage records are rated.


                **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/).


                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`.
            revRecCode:
              maxLength: 70
              type: string
              description: >
                Associates this product rate plan charge with a specific revenue
                recognition code. The value is a valid revenue recognition code.
            revRecTriggerCondition:
              maxLength: 22
              type: string
              description: |
                Specifies when revenue recognition begins.
              enum:
                - ContractEffectiveDate
                - ServiceActivationDate
                - CustomerAcceptanceDate
            revenueRecognitionRuleName:
              type: string
              description: >
                The name of the revenue recognition rule governing the revenue
                schedule.
            smoothingModel:
              type: string
              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.
            specificBillingPeriod:
              type: integer
              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
            taxCode:
              type: string
              description: |
                Specifies the tax code for taxation rules; used by Zuora Tax.
            taxMode:
              type: string
              description: >
                Specifies how to define taxation for the charge; used by Zuora
                Tax. Possible values are: `TaxExclusive`, `TaxInclusive`.
            taxable:
              type: boolean
              description: >
                Specifies whether the charge is taxable; used by Zuora Tax.
                Possible values are:`true`, `false`.
            triggerEvent:
              type: string
              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:
              type: string
              description: >
                The type of charge. Possible values are: `OneTime`, `Recurring`,
                `Usage`.
            uom:
              type: string
              description: >
                Describes the Units of Measure (uom) configured in **Settings >
                Billing** for the productRatePlanCharges.


                Values: `Each`, `License`, `Seat`, or `null`
            upToPeriods:
              type: integer
              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
            upToPeriodsType:
              type: string
              description: |+
                The period type used to define when the charge ends.

                Values:
                - Billing_Periods
                - Days
                - Weeks
                - Months
                - Years
                  
            usageRecordRatingOption:
              type: string
              description: >
                Determines how Zuora processes usage records for per-unit usage
                charges. 
            useDiscountSpecificAccountingCode:
              type: boolean
              description: >
                Determines whether to define a new accounting code for the new
                discount charge.

                Values: `true`, `false`
            useTenantDefaultForPriceChange:
              type: boolean
              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`
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectCustomFields"
    GETProductRatePlanType:
      title: productRatePlans
      allOf:
        - type: object
          properties:
            description:
              type: string
              description: |
                Rate plan description.
            effectiveEndDate:
              type: string
              description: >
                Final date the rate plan is active, as `yyyy-mm-dd`. After this
                date, the rate plan status is `Expired`.
              format: date
            effectiveStartDate:
              type: string
              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
            id:
              type: string
              description: |
                Unique product rate-plan charge ID.
            name:
              type: string
              description: >
                Name of the product rate-plan charge. (Not required to be
                unique.)
            productRatePlanCharges:
              type: array
              description: |
                Field attributes describing the product rate plan charges:
              items:
                $ref: "#/components/schemas/GETProductRatePlanChargeType"
            status:
              type: string
              description: |
                Possible vales are: `Active`, `Expired`, `NotStarted`.
        - $ref: "#/components/schemas/ProductRatePlanObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanObjectCustomFields"
    GETProductRatePlansResponse:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        productRatePlans:
          type: array
          description: |
            Container for one or more products.
          items:
            $ref: "#/components/schemas/GETProductRatePlanType"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETProductType:
      title: products
      allOf:
        - type: object
          properties:
            category:
              type: string
              description: >
                Category of the product. Used by Zuora Quotes Guided Product
                Selector.


                Possible values are:
                  - Base Products
                  - Add On Services
                  - Miscellaneous Products
            description:
              type: string
              description: |
                Optional product description.
            effectiveEndDate:
              type: string
              description: >
                The date when the product expires and cannot be subscribed to
                anymore, as `yyyy-mm-dd`.
              format: date
            effectiveStartDate:
              type: string
              description: >
                The date when the product becomes available and can be
                subscribed to, as `yyyy-mm-dd`.
              format: date
            id:
              type: string
              description: |
                Product ID.
            name:
              type: string
              description: |
                Product name, up to 100 characters.
            productFeatures:
              type: array
              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"
            productRatePlans:
              type: string
              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 [Get
                product rate
                plans](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 [Get product rate plans](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
            sku:
              type: string
              description: |
                Unique product SKU, up to 50 characters.
            tags:
              type: string
              description: ""
        - $ref: "#/components/schemas/ProductObjectNSFields"
        - $ref: "#/components/schemas/ProductObjectCustomFields"
    GETPublicEmailTemplateResponse:
      type: object
      properties:
        active:
          type: boolean
          description: The status of the email template.
        bccEmailAddress:
          type: string
          description: Email BCC address.
          format: email
        ccEmailAddress:
          type: string
          description: Email CC address.
        ccEmailType:
          type: string
          description: Email cc type.
          default: SpecificEmails
          enum:
            - BillToContact
            - SoldToContact
            - SpecificEmails
            - TenantAdmin
            - BillToAndSoldToContacts
            - RunOwner
            - AllContacts
            - InvoiceOwnerBillToContact
            - InvoiceOwnerSoldToContact
            - InvoiceOwnerBillToAndSoldToContacts
            - InvoiceOwnerAllContacts
        createdBy:
          type: string
          description: The ID of the user who created the notification definition.
          format: uuid
        createdOn:
          type: string
          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
        description:
          maxLength: 255
          type: string
          description: The description of the email template.
        emailBody:
          type: string
          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.
        emailSubject:
          type: string
          description: The email subject. You can add merge fields in the email subject
            using angle brackets.
        encodingType:
          type: string
          description: The endcode type of the email body.
          enum:
            - UTF8
            - Shift_JIS
            - ISO_2022_JP
            - EUC_JP
            - X_SJIS_0213
        eventTypeName:
          minLength: 1
          type: string
          description: The name of the event type.
        eventTypeNamespace:
          type: string
          description: |
            The namespace of the `eventTypeName` field. 
        fromEmailAddress:
          type: string
          description: If formEmailType is SpecificEmail, this field is required.
        fromEmailType:
          type: string
          description: The from email type.
          enum:
            - TenantEmail
            - SpecificEmail
        fromName:
          maxLength: 50
          type: string
          description: The name of email sender.
        id:
          type: string
          description: The filter rule associated with this notification definition.
          format: uuid
        isHtml:
          type: boolean
          description: Specified whether the style of email body is HTML.
        name:
          maxLength: 255
          type: string
          description: The name of the email template.
        replyToEmailAddress:
          type: string
          description: If replyToEmailType is SpecificEmail, this field is required
        replyToEmailType:
          type: string
          description: The reply email type.
          enum:
            - TenantEmail
            - SpecificEmail
        toEmailAddress:
          type: string
          description: If toEmailType is SpecificEmail, this field is required.
        toEmailType:
          type: string
          description: Email receive type.
          enum:
            - BillToContact
            - SoldToContact
            - SpecificEmails
            - TenantAdmin
            - BillToAndSoldToContacts
            - RunOwner
            - AllContacts
            - InvoiceOwnerBillToContact
            - InvoiceOwnerSoldToContact
            - InvoiceOwnerBillToAndSoldToContacts
            - InvoiceOwnerAllContacts
        updatedBy:
          type: string
          description: The ID of the user who updated the notification definition.
          format: uuid
        updatedOn:
          type: string
          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
      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
        fromEmailType: TenantEmail
        fromName: Example Co. Ltd.
        id: 6e569e1e05f040eda51a927b140c0ac2
        isHtml: true
        name: Account Edit Email
        replyToEmailType: TenantEmail
        toEmailType: BillToContact
        updatedBy: 6e569e1e05f040eda51a927b140c0ac4
        updatedOn: 2017-04-18T07:36:19.798Z
    GETPublicNotificationDefinitionResponse:
      type: object
      properties:
        active:
          type: boolean
          description: The status of the notification definition. The default value is true.
        callout:
          type: object
          properties:
            active:
              type: boolean
              description: The status of the callout. The default is true.
              default: true
            calloutAuth:
              $ref: "#/components/schemas/CalloutAuth"
            calloutBaseurl:
              minLength: 10
              type: string
              description: The callout URL. It must start with 'https://'
              format: url
              example: https://***
            calloutParams:
              $ref: "#/components/schemas/CalloutMergeFields"
            calloutRetry:
              type: boolean
              description: Specified whether to retry the callout when the callout fails. The
                default is true.
              default: true
            description:
              maxLength: 255
              type: string
              description: Description for the callout.
            eventTypeName:
              minLength: 1
              type: string
              description: The name of the event type.
            httpMethod:
              type: string
              description: The HTTP method of the callout.
              example: POST
              enum:
                - GET
                - PUT
                - POST
                - DELETE
            id:
              type: string
              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
            name:
              maxLength: 255
              type: string
              description: The name of the created callout.
            requiredAuth:
              type: boolean
              description: Specifies whether the callout requires auth.
        calloutActive:
          type: boolean
          description: The status of the callout action. The default value is false.
        communicationProfileId:
          type: string
          description: The profile that the notification definition belongs to.
          format: uuid
        createdBy:
          type: string
          description: The ID of the user who created the notification definition.
          format: uuid
        createdOn:
          type: string
          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
        description:
          maxLength: 255
          type: string
          description: Description of the notification definition
        emailActive:
          type: boolean
          description: The status of the email action. The default value is false.
        emailTemplateId:
          type: string
          description: The ID of the email template. In the request, there should be at
            least one email template or callout.
          format: uuid
        eventTypeName:
          minLength: 1
          type: string
          description: The name of the event type.
        eventTypeNamespace:
          type: string
          description: |
            The namespace of the `eventTypeName` field. 
        filterRule:
          type: object
          properties:
            condition:
              type: string
              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
            description:
              maxLength: 255
              type: string
              description: The description of the filter rule.
            eventTypeName:
              minLength: 1
              type: string
              description: The value is `null`.
            id:
              type: string
              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
            parameters:
              $ref: "#/components/schemas/FilterRuleParameterDefinitions"
          description: ""
        filterRuleParams:
          $ref: "#/components/schemas/FilterRuleParameterValues"
        id:
          type: string
          description: The filter rule associated with this notification definition.
          format: uuid
        name:
          maxLength: 255
          type: string
          description: The name of the notification definition.
        updatedBy:
          type: string
          description: The ID of the user who updated the notification definition.
          format: uuid
        updatedOn:
          type: string
          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
      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
          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
          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
              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
    GETRSDetailForProductChargeType:
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                The ID of a customer account.
            amount:
              type: string
              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`.
            createdOn:
              type: string
              description: >
                The date and time when the record was created, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            currency:
              type: string
              description: |
                The type of currency used.
            linkedTransactionId:
              type: string
              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.
            linkedTransactionNumber:
              type: string
              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.
            linkedTransactionType:
              type: string
              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.
            notes:
              type: string
              description: |
                Additional information about this record.
            number:
              type: string
              description: >
                The revenue schedule number. The revenue schedule number is
                always prefixed with "RS", for example, "RS-00000001".
            productChargeId:
              type: string
              description: |
                The ID of a product rate plan charge.
            recognitionRuleName:
              type: string
              description: |
                The name of the recognition rule.
            recognizedRevenue:
              type: string
              description: |
                The revenue that was distributed in a closed accounting period.
            referenceId:
              type: string
              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.
            revenueItems:
              type: array
              description: >
                Revenue items are listed in ascending order by the accounting
                period start date.
              items:
                $ref: "#/components/schemas/GETRsRevenueItemType"
            revenueScheduleDate:
              type: string
              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
            undistributedUnrecognizedRevenue:
              type: string
              description: |
                The revenue in the open-ended accounting period.
            unrecognizedRevenue:
              type: string
              description: >
                The revenue distributed in all open accounting periods, which
                includes the open-ended accounting period.
            updatedOn:
              type: string
              description: >
                The date and time when the revenue automation start date was
                set, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
    GETRSDetailType:
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                An account ID.
            amount:
              type: string
              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
            createdOn:
              type: string
              description: >
                The date and time when the record was created, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            currency:
              type: string
              description: |
                The type of currency used.
            linkedTransactionId:
              type: string
              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.
            linkedTransactionNumber:
              type: string
              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.
            linkedTransactionType:
              type: string
              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.
            notes:
              type: string
              description: |
                Additional information about this record.
            number:
              type: string
              description: >
                Revenue schedule number. The revenue schedule number is always
                prefixed with "RS", for example, "RS-00000001".
            recognitionRuleName:
              type: string
              description: |
                The name of the recognition rule.
            recognizedRevenue:
              type: string
              description: |
                The revenue that was distributed in a closed accounting period.
              format: decimal
            referenceId:
              type: string
              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.
            revenueItems:
              type: array
              description: >
                Revenue items are listed in ascending order by the accounting
                period start date.
              items:
                $ref: "#/components/schemas/GETRsRevenueItemType"
            revenueScheduleDate:
              type: string
              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
            subscriptionChargeId:
              type: string
              description: |
                The original subscription charge ID.
            subscriptionId:
              type: string
              description: |
                The original subscription ID.
            success:
              type: boolean
              description: |
                Returns `true` if the request was processed successfully.
            undistributedUnrecognizedRevenue:
              type: string
              description: |
                Revenue in the open-ended accounting period.
              format: decimal
            unrecognizedRevenue:
              type: string
              description: >
                Revenue distributed in all open accounting periods, which
                includes the open-ended accounting period.
              format: decimal
            updatedOn:
              type: string
              description: >
                The date and time when the revenue automation start date was
                set, in `yyyy-mm-dd hh:mm:ss` formst.
              format: date-time
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
    GETRSDetailWithoutSuccessType:
      title: revenueSchedules
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                An account ID.
            amount:
              type: string
              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
            createdOn:
              type: string
              description: >
                The date and time when the record was created, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            currency:
              type: string
              description: |
                The type of currency used.
            linkedTransactionId:
              type: string
              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.
            linkedTransactionNumber:
              type: string
              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.
            linkedTransactionType:
              type: string
              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.
            notes:
              type: string
              description: |
                Additional information about this record.
            number:
              type: string
              description: >
                Revenue schedule number. The revenue schedule number is always
                prefixed with "RS", for example, "RS-00000001".
            recognitionRuleName:
              type: string
              description: |
                The name of the recognition rule.
            recognizedRevenue:
              type: string
              description: |
                The revenue that was distributed in a closed accounting period.
              format: decimal
            referenceId:
              type: string
              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.
            revenueItems:
              type: array
              description: >
                Revenue items are listed in ascending order by the accounting
                period start date.
              items:
                $ref: "#/components/schemas/GETRsRevenueItemType"
            revenueScheduleDate:
              type: string
              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
            subscriptionChargeId:
              type: string
              description: |
                The original subscription charge ID.
            subscriptionId:
              type: string
              description: |
                The original subscription ID.
            undistributedUnrecognizedRevenue:
              type: string
              description: |
                Revenue in the open-ended accounting period.
              format: decimal
            unrecognizedRevenue:
              type: string
              description: >
                Revenue distributed in all open accounting periods, which
                includes the open-ended accounting period.
              format: decimal
            updatedOn:
              type: string
              description: >
                The date when the revenue automation start date was set, in
                `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
    GETRSDetailsByChargeType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        revenueSchedules:
          type: array
          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"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETRSDetailsByProductChargeType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        revenueSchedules:
          type: array
          description: |
            How revenue will be recognized over time.
          items:
            $ref: "#/components/schemas/GETRSDetailForProductChargeType"
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
      example: ""
    GETRefundCollectionType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        refunds:
          type: array
          description: |
            Container for refunds.
          items:
            $ref: "#/components/schemas/GETRefundTypewithSuccess"
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETRefundCreditMemoType:
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: >
                The ID of the account associated with this refund. Zuora
                associates the refund automatically with the account from the
                associated payment.
            amount:
              type: number
              description: |
                The total amount of the refund.
              format: double
            cancelledOn:
              type: string
              description: >
                The date and time when the refund was cancelled, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            comment:
              type: string
              description: |
                Comments about the refund.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the refund.
            createdDate:
              type: string
              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
            creditMemoId:
              type: string
              description: |
                The ID of the credit memo that is refunded.
            financeInformation:
              type: object
              properties:
                bankAccountAccountingCode:
                  type: string
                  description: >
                    The accounting code that maps to a bank account in your
                    accounting system.
                bankAccountAccountingCodeType:
                  type: string
                  description: >
                    The type of the accounting code that maps to a bank account
                    in your accounting system.
                transferredToAccounting:
                  type: string
                  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
                unappliedPaymentAccountingCode:
                  type: string
                  description: |
                    The accounting code for the unapplied payment.
                unappliedPaymentAccountingCodeType:
                  type: string
                  description: |
                    The type of the accounting code for the unapplied payment.
              description: |
                Container for the finance information related to the refund.
            gatewayId:
              type: string
              description: |
                The ID of the gateway instance that processes the refund.
            gatewayResponse:
              type: string
              description: >
                The message returned from the payment gateway for the refund.
                This message is gateway-dependent.
            gatewayResponseCode:
              type: string
              description: >
                The response code returned from the payment gateway for the
                refund. This code is gateway-dependent.
            gatewayState:
              type: string
              description: |
                The status of the refund in the gateway.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
            id:
              type: string
              description: |
                The ID of the created refund.
            markedForSubmissionOn:
              type: string
              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
            methodType:
              type: string
              description: |
                How an external refund was issued to a customer.
              enum:
                - ACH
                - Cash
                - Check
                - CreditCard
                - PayPal
                - WireTransfer
                - DebitCard
                - CreditCardReferenceTransaction
                - BankTransfer
                - Other
            number:
              type: string
              description: |
                The unique identification number of the refund.
            paymentId:
              type: string
              description: |
                The ID of the payment associated with the refund.
            paymentMethodId:
              type: string
              description: >
                The unique ID of the payment method that the customer used to
                make the refund.
            paymentMethodSnapshotId:
              type: string
              description: >
                The unique ID of the payment method snapshot, which is a copy of
                the particular payment method used in a transaction.
            reasonCode:
              type: string
              description: |
                A code identifying the reason for the transaction.
            referenceId:
              type: string
              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.
            refundDate:
              type: string
              description: |
                The date when the refund takes effect, in yyyy-mm-dd format.
              format: date
            refundTransactionTime:
              type: string
              description: >
                The date and time when the refund was issued, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            secondRefundReferenceId:
              type: string
              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.
            settledOn:
              type: string
              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
            softDescriptor:
              type: string
              description: >
                A payment gateway-specific field that maps to Zuora for the
                gateways, Orbital, Vantiv and Verifi.
            softDescriptorPhone:
              type: string
              description: >
                A payment gateway-specific field that maps to Zuora for the
                gateways, Orbital, Vantiv and Verifi.
            status:
              type: string
              description: |
                The status of the refund.
              enum:
                - Processed
                - Canceled
                - Error
                - Processing
            submittedOn:
              type: string
              description: >
                The date and time when the refund was submitted, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
            type:
              type: string
              description: |
                The type of the refund.
              enum:
                - External
                - Electronic
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the refund.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    GETRefundItemPartCollectionType:
      type: object
      properties:
        itemParts:
          type: array
          description: |
            Container for refund part items.
          items:
            $ref: "#/components/schemas/GETRefundItemPartTypewithSuccess"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETRefundItemPartType:
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the refund part item.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the refund part item.
        createdDate:
          type: string
          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
        creditMemoItemId:
          type: string
          description: |
            The ID of the credit memo item associated with the refund part item.
        creditTaxItemId:
          type: string
          description: >
            The ID of the credit memo taxation item associated with the refund
            part item.
        id:
          type: string
          description: |
            The ID of the refund part item.
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the refund part item.
        updatedDate:
          type: string
          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
    GETRefundItemPartTypewithSuccess:
      title: itemParts
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the refund part item.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the refund part item.
        createdDate:
          type: string
          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
        creditMemoItemId:
          type: string
          description: |
            The ID of the credit memo item associated with the refund part item.
        creditTaxItemId:
          type: string
          description: >
            The ID of the credit memo taxation item associated with the refund
            part item.
        id:
          type: string
          description: |
            The ID of the refund part item.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the refund part item.
        updatedDate:
          type: string
          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
    GETRefundPartCollectionType:
      type: object
      properties:
        parts:
          type: array
          description: |
            Container for refund parts.
          items:
            $ref: "#/components/schemas/RefundPartResponseTypewithSuccess"
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GETRefundPaymentType:
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: >
                The ID of the account associated with this refund. Zuora
                associates the refund automatically with the account from the
                associated payment.
            amount:
              type: number
              description: |
                The total amount of the refund.
              format: double
            cancelledOn:
              type: string
              description: >
                The date and time when the refund was cancelled, in `yyyy-mm-dd
                hh:mm:ss` format. 
              format: date-time
            comment:
              type: string
              description: |
                Comments about the refund.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the refund.
            createdDate:
              type: string
              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
            creditMemoId:
              type: string
              description: |
                The ID of the credit memo associated with the refund.
            financeInformation:
              type: object
              properties:
                bankAccountAccountingCode:
                  type: string
                  description: >
                    The accounting code that maps to a bank account in your
                    accounting system.
                bankAccountAccountingCodeType:
                  type: string
                  description: >
                    The type of the accounting code that maps to a bank account
                    in your accounting system.
                transferredToAccounting:
                  type: string
                  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
                unappliedPaymentAccountingCode:
                  type: string
                  description: |
                    The accounting code for the unapplied payment.
                unappliedPaymentAccountingCodeType:
                  type: string
                  description: |
                    The type of the accounting code for the unapplied payment.
              description: |
                Container for the finance information related to the refund.
            gatewayId:
              type: string
              description: |
                The ID of the gateway instance that processes the refund.
            gatewayResponse:
              type: string
              description: >
                The message returned from the payment gateway for the refund.
                This message is gateway-dependent.
            gatewayResponseCode:
              type: string
              description: >
                The code returned from the payment gateway for the refund. This
                code is gateway-dependent.
            gatewayState:
              type: string
              description: |
                The status of the refund in the gateway.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
            id:
              type: string
              description: |
                The ID of the created refund.
            markedForSubmissionOn:
              type: string
              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
            methodType:
              type: string
              description: |
                How an external refund was issued to a customer.
              enum:
                - ACH
                - Cash
                - Check
                - CreditCard
                - PayPal
                - WireTransfer
                - DebitCard
                - CreditCardReferenceTransaction
                - BankTransfer
                - Other
            number:
              type: string
              description: |
                The unique identification number of the refund.
            paymentId:
              type: string
              description: |
                The ID of the payment that is refunded.
            paymentMethodId:
              type: string
              description: >
                The unique ID of the payment method that the customer used to
                make the refund. 
            paymentMethodSnapshotId:
              type: string
              description: >
                The unique ID of the payment method snapshot, which is a copy of
                the particular payment method used in a transaction.
            reasonCode:
              type: string
              description: |
                A code identifying the reason for the transaction. 
            referenceId:
              type: string
              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.
            refundDate:
              type: string
              description: |
                The date when the refund takes effect, in `yyyy-mm-dd` format.
              format: date
            refundTransactionTime:
              type: string
              description: >
                The date and time when the refund was issued, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            secondRefundReferenceId:
              type: string
              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.
            settledOn:
              type: string
              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
            softDescriptor:
              type: string
              description: >
                A payment gateway-specific field that maps to Zuora for the
                gateways, Orbital, Vantiv and Verifi.
            softDescriptorPhone:
              type: string
              description: >
                A payment gateway-specific field that maps to Zuora for the
                gateways, Orbital, Vantiv and Verifi.
            status:
              type: string
              description: |
                The status of the refund.
              enum:
                - Processed
                - Canceled
                - Error
                - Processing
            submittedOn:
              type: string
              description: >
                The date and time when the refund was submitted, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
            type:
              type: string
              description: |
                The type of the refund.
              enum:
                - External
                - Electronic
            updatedById:
              type: string
              description: |
                The ID of the the Zuora user who last updated the refund.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    GETRefundType:
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              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.
            amount:
              type: number
              description: |
                The total amount of the refund.
              format: double
            cancelledOn:
              type: string
              description: >
                The date and time when the refund was cancelled, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            comment:
              type: string
              description: |
                Comments about the refund.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the refund.
            createdDate:
              type: string
              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
            creditMemoId:
              type: string
              description: |
                The ID of the credit memo that is refunded.
            financeInformation:
              type: object
              properties:
                bankAccountAccountingCode:
                  type: string
                  description: >
                    The accounting code that maps to a bank account in your
                    accounting system.
                bankAccountAccountingCodeType:
                  type: string
                  description: >
                    The type of the accounting code that maps to a bank account
                    in your accounting system.
                transferredToAccounting:
                  type: string
                  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
                unappliedPaymentAccountingCode:
                  type: string
                  description: |
                    The accounting code for the unapplied payment.
                unappliedPaymentAccountingCodeType:
                  type: string
                  description: |
                    The type of the accounting code for the unapplied payment.
              description: |
                Container for the finance information related to the refund.
            gatewayId:
              type: string
              description: |
                The ID of the gateway instance that processes the refund.
            gatewayResponse:
              type: string
              description: >
                The message returned from the payment gateway for the refund.
                This message is gateway-dependent.
            gatewayResponseCode:
              type: string
              description: >
                The code returned from the payment gateway for the refund. This
                code is gateway-dependent.
            gatewayState:
              type: string
              description: |
                The status of the refund in the gateway.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
            id:
              type: string
              description: |
                The ID of the refund.
            markedForSubmissionOn:
              type: string
              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
            methodType:
              type: string
              description: |
                How an external refund was issued to a customer. 
              enum:
                - ACH
                - Cash
                - Check
                - CreditCard
                - PayPal
                - WireTransfer
                - DebitCard
                - CreditCardReferenceTransaction
                - BankTransfer
                - Other
            number:
              type: string
              description: |
                The unique identification number of the refund.
            paymentId:
              type: string
              description: |
                The ID of the payment that is refunded.
            paymentMethodId:
              type: string
              description: >
                The unique ID of the payment method that the customer used to
                make the refund.
            paymentMethodSnapshotId:
              type: string
              description: >
                The unique ID of the payment method snapshot, which is a copy of
                the particular payment method used in a transaction.
            reasonCode:
              type: string
              description: |
                A code identifying the reason for the transaction.
            referenceId:
              type: string
              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.
            refundDate:
              type: string
              description: >
                The date when the refund takes effect, in `yyyy-mm-dd` format.
                For example, 2017-03-01.
              format: date
            refundTransactionTime:
              type: string
              description: >
                The date and time when the refund was issued, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            secondRefundReferenceId:
              type: string
              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.
            settledOn:
              type: string
              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
            softDescriptor:
              type: string
              description: >
                A payment gateway-specific field that maps Zuora to other
                gateways.
            softDescriptorPhone:
              type: string
              description: >
                A payment gateway-specific field that maps Zuora to other
                gateways.
            status:
              type: string
              description: |
                The status of the refund. 
              enum:
                - Processed
                - Canceled
                - Error
                - Processing
            submittedOn:
              type: string
              description: >
                The date and time when the refund was submitted, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
            type:
              type: string
              description: |
                The type of the refund. 
              enum:
                - External
                - Electronic
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the refund.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    GETRefundTypewithSuccess:
      title: refunds
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              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.
            amount:
              type: number
              description: |
                The total amount of the refund.
              format: double
            cancelledOn:
              type: string
              description: >
                The date and time when the refund was cancelled, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            comment:
              type: string
              description: |
                Comments about the refund.
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the refund.
            createdDate:
              type: string
              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
            creditMemoId:
              type: string
              description: |
                The ID of the credit memo that is refunded.
            financeInformation:
              type: object
              properties:
                bankAccountAccountingCode:
                  type: string
                  description: >
                    The accounting code that maps to a bank account in your
                    accounting system.
                bankAccountAccountingCodeType:
                  type: string
                  description: >
                    The type of the accounting code that maps to a bank account
                    in your accounting system.
                transferredToAccounting:
                  type: string
                  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
                unappliedPaymentAccountingCode:
                  type: string
                  description: |
                    The accounting code for the unapplied payment.
                unappliedPaymentAccountingCodeType:
                  type: string
                  description: |
                    The type of the accounting code for the unapplied payment.
              description: |
                Container for the finance information related to the refund.
            gatewayId:
              type: string
              description: |
                The ID of the gateway instance that processes the refund.
            gatewayResponse:
              type: string
              description: >
                The message returned from the payment gateway for the refund.
                This message is gateway-dependent.
            gatewayResponseCode:
              type: string
              description: >
                The code returned from the payment gateway for the refund. This
                code is gateway-dependent.
            gatewayState:
              type: string
              description: |
                The status of the refund in the gateway. 
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
            id:
              type: string
              description: |
                The ID of the refund.
            markedForSubmissionOn:
              type: string
              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
            methodType:
              type: string
              description: |
                How an external refund was issued to a customer. 
              enum:
                - ACH
                - Cash
                - Check
                - CreditCard
                - PayPal
                - WireTransfer
                - DebitCard
                - CreditCardReferenceTransaction
                - BankTransfer
                - Other
            number:
              type: string
              description: |
                The unique identification number of the refund.
            paymentId:
              type: string
              description: |
                The ID of the payment that is refunded.
            paymentMethodId:
              type: string
              description: >
                The unique ID of the payment method that the customer used to
                make the refund.
            paymentMethodSnapshotId:
              type: string
              description: >
                The unique ID of the payment method snapshot, which is a copy of
                the particular payment method used in a transaction.
            reasonCode:
              type: string
              description: |
                A code identifying the reason for the transaction.
            referenceId:
              type: string
              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.
            refundDate:
              type: string
              description: >
                The date when the refund takes effect, in `yyyy-mm-dd` format.
                For example, 2017-03-01.
              format: date
            refundTransactionTime:
              type: string
              description: >
                The date and time when the refund was issued, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            secondRefundReferenceId:
              type: string
              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.
            settledOn:
              type: string
              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
            softDescriptor:
              type: string
              description: >
                A payment gateway-specific field that maps Zuora to other
                gateways.
            softDescriptorPhone:
              type: string
              description: >
                A payment gateway-specific field that maps Zuora to other
                gateways.
            status:
              type: string
              description: |
                The status of the refund. 
              enum:
                - Processed
                - Canceled
                - Error
                - Processing
            submittedOn:
              type: string
              description: >
                The date and time when the refund was submitted, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            type:
              type: string
              description: |
                The type of the refund. 
              enum:
                - External
                - Electronic
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the refund.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    GETRevenueEventDetailType:
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                An account ID.
            createdOn:
              type: string
              description: >
                The date when the record was created in YYYY-MM-DD HH:MM:SS
                format.
              format: date-time
            currency:
              type: string
              description: |
                The type of currency used.
            eventType:
              type: string
              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
            notes:
              type: string
              description: |
                Additional information about this record.
            number:
              type: string
              description: |
                The revenue event number created when a revenue event occurs.
            recognitionEnd:
              type: string
              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
            recognitionStart:
              type: string
              description: |
                The start date of a recognition period in YYYY-MM-DD format.
              format: date
            revenueItems:
              type: array
              description: >
                Revenue items are listed in ascending order by the accounting
                period start date.
              items:
                $ref: "#/components/schemas/GETRevenueItemType"
            subscriptionChargeId:
              type: string
              description: |
                The original subscription charge ID.
            subscriptionId:
              type: string
              description: |
                The original subscription ID.
            success:
              type: boolean
              description: |
                Returns `true` if the request was processed successfully.
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
    GETRevenueEventDetailWithoutSuccessType:
      title: revenueEventDetails
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                An account ID.
            createdOn:
              type: string
              description: >
                The date when the record was created in YYYY-MM-DD HH:MM:SS
                format.
              format: date-time
            currency:
              type: string
              description: The type of currency used.
            eventType:
              type: string
              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
            notes:
              type: string
              description: |
                Additional information about this record.
            number:
              type: string
              description: |
                The revenue event number created when a revenue event occurs.
            recognitionEnd:
              type: string
              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
            recognitionStart:
              type: string
              description: |
                The start date of a recognition period in YYYY-MM-DD format.
              format: date
            revenueItems:
              type: array
              description: >
                Revenue items are listed in ascending order by the accounting
                period start date.
              items:
                $ref: "#/components/schemas/GETRevenueItemType"
            subscriptionChargeId:
              type: string
              description: |
                The original subscription charge ID.
            subscriptionId:
              type: string
              description: |
                The original subscription ID.
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
    GETRevenueEventDetailsType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        revenueEventDetails:
          type: array
          description: >
            Represents a change to a revenue schedule, such as posting an
            invoice or distributing revenue.
          items:
            $ref: "#/components/schemas/GETRevenueEventDetailWithoutSuccessType"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETRevenueItemType:
      title: revenueItems
      allOf:
        - type: object
          properties:
            accountingPeriodEndDate:
              type: string
              description: >
                The accounting period end date. The accounting period end date
                of the open-ended accounting period is null. 
              format: date
            accountingPeriodName:
              type: string
              description: >
                Name of the accounting period. The open-ended accounting period
                is named `Open-Ended`. 
            accountingPeriodStartDate:
              type: string
              description: |
                The accounting period start date.
              format: date
            amount:
              type: string
              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
            currency:
              type: string
              description: |
                The type of currency used. 
            isAccountingPeriodClosed:
              type: boolean
              description: |
                Indicates if the accounting period is closed or open. 
        - $ref: "#/components/schemas/RevenueEventItemObjectCustomFields"
    GETRevenueItemTypeResponse:
      title: revenueItems
      type: object
      properties:
        accountingPeriodEndDate:
          type: string
          description: >
            The accounting period end date. The accounting period end date of
            the open-ended accounting period is null.
          format: date
        accountingPeriodName:
          type: string
          description: >
            Name of the accounting period. The open-ended accounting period is
            named Open-Ended. 
        accountingPeriodStartDate:
          type: string
          description: |
            The accounting period start date.
          format: date
        amount:
          type: string
          description: |
            The amount of the revenue item.
          format: decimal
        currency:
          type: string
          description: |
            The type of currency used. 
        isAccountingPeriodClosed:
          type: boolean
          description: |
            Indicates if the accounting period is closed or open. 
    GETRevenueItemsType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        revenueItems:
          type: array
          description: >
            Revenue items are listed in ascending order by the accounting period
            start date.
          items:
            $ref: "#/components/schemas/GETRevenueItemType"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETRevenueRecognitionRuleAssociationType:
      type: object
      properties:
        revenueRecognitionRuleName:
          type: string
          description: |
            The name of the revenue recognition rule governing the revenue
            schedule.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETRevenueStartDateSettingType:
      type: object
      properties:
        startDate:
          type: string
          description: >
            The date on which revenue automation starts. This is the first day
            of an accounting period.
          format: date
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        updatedBy:
          type: string
          description: |
            The user who made the change.
        updatedOn:
          type: string
          description: |
            The date when the revenue automation start date was set.
          format: date-time
    GETRsRevenueItemType:
      title: revenueItems
      allOf:
        - type: object
          properties:
            accountingPeriodEndDate:
              type: string
              description: >
                The accounting period end date. The accounting period end date
                of the open-ended accounting period is null.
              format: date
            accountingPeriodName:
              type: string
              description: >
                The name of the accounting period. The open-ended accounting
                period is named `Open-Ended`.
            accountingPeriodStartDate:
              type: string
              description: |
                The accounting period start date.
              format: date
            amount:
              type: string
              description: |
                The amount of the revenue item.
              format: decimal
            currency:
              type: string
              description: |
                The type of currency used.
            deferredRevenueAccountingCode:
              type: string
              description: >
                The accounting code for deferred revenue, such as Monthly
                Recurring Liability. Required only when
                `overrideChargeAccountingCodes` is `true`. Otherwise, this value
                is ignored.
            deferredRevenueAccountingCodeType:
              type: string
              description: >
                The type of the deferred revenue accounting code, such as
                Deferred Revenue. Required only when
                `overrideChargeAccountingCodes` is `true`. Otherwise, this value
                is ignored.
            isAccountingPeriodClosed:
              type: boolean
              description: |
                Indicates if the accounting period is closed or open.
            recognizedRevenueAccountingCode:
              type: string
              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.
            recognizedRevenueAccountingCodeType:
              type: string
              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.
        - $ref: "#/components/schemas/RevenueScheduleItemObjectCustomFields"
    GETRsRevenueItemsType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        revenueItems:
          type: array
          description: >
            Revenue items are listed in ascending order by the accounting period
            start date.
          items:
            $ref: "#/components/schemas/GETRsRevenueItemType"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETSequenceSetResponse:
      title: sequenceSets
      type: object
      properties:
        creditMemo:
          $ref: "#/components/schemas/CreditMemoEntityPrefix"
        debitMemo:
          $ref: "#/components/schemas/DebitMemoEntityPrefix"
        id:
          type: string
          description: >
            The unique ID of the sequence set. For example,
            402892c74c9193cd014c96bbe7c101f9.
        invoice:
          $ref: "#/components/schemas/InvoiceEntityPrefix"
        name:
          type: string
          description: |
            The name of the sequence set.
        payment:
          $ref: "#/components/schemas/PaymentEntityPrefix"
        refund:
          $ref: "#/components/schemas/RefundEntityPrefix"
      description: ""
    GETSequenceSetsResponse:
      type: object
      properties:
        sequenceSets:
          type: array
          description: >
            Array of sequence sets configured for billing documents, payments,
            and refunds.
          items:
            $ref: "#/components/schemas/GETSequenceSetResponse"
        success:
          type: boolean
          description: |
            Indicates whether the call succeeded.
      description: ""
    GETSubscriptionProductFeatureType:
      title: subscriptionProductFeatures
      type: object
      properties:
        description:
          type: string
          description: |
            Feature description.
        featureCode:
          type: string
          description: |
            Feature code, up to 255 characters long.
        id:
          type: string
          description: |
            SubscriptionProductFeature ID.
        name:
          type: string
          description: |
            Feature name, up to 255 characters long.
    GETSubscriptionRatePlanChargesType:
      title: ratePlanCharges
      allOf:
        - type: object
          properties:
            applyDiscountTo:
              type: string
              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`
            billingDay:
              type: string
              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.
            billingPeriod:
              type: string
              description: |
                Allows billing period to be overridden on the rate plan charge.
            billingPeriodAlignment:
              type: string
              description: |
                Possible values:

                * `AlignToCharge`
                * `AlignToSubscriptionStart`
                * `AlignToTermStart`
            billingTiming:
              type: string
              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/).
            chargedThroughDate:
              type: string
              description: >
                The date through which a customer has been billed for the charge.
              format: date
            currency:
              type: string
              description: |
                Currency used by the account. For example, `USD` or `EUR`.
            description:
              type: string
              description: |
                Description of the rate plan charge.
            discountAmount:
              type: number
              description: |
                The amount of the discount.
            discountApplyDetails:
              type: array
              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"
            discountClass:
              type: string
              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).
            discountLevel:
              type: string
              description: >
                The level of the discount. Values: `RatePlan`, `Subscription`,
                `Account`.
            discountPercentage:
              type: number
              description: |
                The amount of the discount as a percentage.
            dmrc:
              type: string
              description: >
                The change (delta) of monthly recurring charge exists when the
                change in monthly recurring revenue caused by an amendment or a
                new subscription.
            done:
              type: boolean
              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 bee completed for the charge segment.
            dtcv:
              type: string
              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.
            effectiveEndDate:
              type: string
              description: |
                The effective end date of the rate plan charge.
              format: date
            effectiveStartDate:
              type: string
              description: |
                The effective start date of the rate plan charge.
              format: date
            endDateCondition:
              type: string
              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`
            id:
              type: string
              description: |
                Rate plan charge ID.
            includedUnits:
              type: number
              description: |
                Specifies the number of units in the base set of units.
            listPriceBase:
              type: string
              description: |
                List price base; possible values are:

                * `Per_Billing_Period`
                * `Per_Month`
                * `Per_Week`
            model:
              type: string
              description: |
                Charge model; possible values are:

                * `FlatFee`
                * `PerUnit`
                * `Overage`
                * `Volume`
                * `Tiered`
                * `TieredWithOverage`
                * `DiscountFixedAmount`
                * `DiscountPercentage`
            mrr:
              type: string
              description: |
                Monthly recurring revenue of the rate plan charge.
            name:
              type: string
              description: |
                Charge name.
            number:
              type: string
              description: |
                Charge number.
            numberOfPeriods:
              type: integer
              description: >
                Specifies the number of periods to use when calculating charges
                in an overage smoothing charge model.
              format: int64
            originalChargeId:
              type: string
              description: |
                The original ID of the rate plan charge.
            overageCalculationOption:
              type: string
              description: |
                Determines when to calculate overage charges.
            overagePrice:
              type: number
              description: |
                The price for units over the allowed amount.
            overageUnusedUnitsCreditOption:
              type: string
              description: >
                Determines whether to credit the customer with unused units of
                usage.
            price:
              type: number
              description: >
                The price associated with the rate plan charge expressed as a
                decimal.
            priceChangeOption:
              type: string
              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`
            priceIncreasePercentage:
              type: number
              description: |
                A planned future price increase amount as a percentage.
            pricingSummary:
              type: string
              description: |
                Concise description of rate plan charge model.
            processedThroughDate:
              type: string
              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
            productRatePlanChargeId:
              type: string
              description: ""
            quantity:
              type: number
              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.
            ratingGroup:
              type: string
              description: >
                Specifies a rating group based on which usage records are rated.


                **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/).


                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`.
            segment:
              type: integer
              description: >
                The identifying number of the subscription rate plan segment.
                Segments are numbered sequentially, starting with 1.
              format: int64
            smoothingModel:
              type: string
              description: >
                Specifies when revenue recognition begins. When charge model is
                `Overage` or `TieredWithOverage`, `smoothingModel` will be one
                of the following values:


                * `ContractEffectiveDate`

                * `ServiceActivationDate`

                * `CustomerAcceptanceDate`
            specificBillingPeriod:
              type: integer
              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
            specificEndDate:
              type: string
              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
            tcv:
              type: string
              description: |
                The total contract value.
            tiers:
              type: array
              description: |
                One or many defined ranges with distinct pricing.
              items:
                $ref: "#/components/schemas/GETTierType"
            triggerDate:
              type: string
              description: |
                The date that the rate plan charge will be triggered.
              format: date
            triggerEvent:
              type: string
              description: |
                The event that will cause the rate plan charge to be triggered.

                Possible values: 

                * `ContractEffective`
                * `ServiceActivation`
                * `CustomerAcceptance`
                * `SpecificDate`
            type:
              type: string
              description: >
                Charge type. Possible values are: `OneTime`, `Recurring`,
                `Usage`.
            unusedUnitsCreditRates:
              type: number
              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`.
            uom:
              type: string
              description: |
                Specifies the units to measure usage. 
            upToPeriods:
              type: string
              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.
            upToPeriodsType:
              type: string
              description: |
                The period type used to define when the charge ends. 

                Values:

                * `Billing_Periods`
                * `Days`
                * `Weeks`
                * `Months`
                * `Years`
            usageRecordRatingOption:
              type: string
              description: >
                Determines how Zuora processes usage records for per-unit usage
                charges. 
            version:
              type: integer
              description: |
                Rate plan charge revision number.
              format: int64
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
    GETSubscriptionRatePlanType:
      title: ratePlans
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: |
                Rate plan ID.
            lastChangeType:
              type: string
              description: |
                The last amendment on the rate plan.

                Possible Values:

                * `Add`
                * `Update`
                * `Remove`
            productId:
              type: string
              description: ""
            productName:
              type: string
              description: ""
            productRatePlanId:
              type: string
              description: ""
            productSku:
              type: string
              description: |
                The unique SKU for the product.
            ratePlanCharges:
              type: array
              description: |
                Container for one or more charges.
              items:
                $ref: "#/components/schemas/GETSubscriptionRatePlanChargesType"
            ratePlanName:
              type: string
              description: |
                Name of the rate plan.
            subscriptionProductFeatures:
              type: array
              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"
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
    GETSubscriptionType:
      title: subscriptions
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: ""
            accountName:
              type: string
              description: ""
            accountNumber:
              type: string
              description: ""
            autoRenew:
              type: boolean
              description: >
                If `true`, the subscription automatically renews at the end of
                the term. Default is `false`.
            contractEffectiveDate:
              type: string
              description: |
                Effective contract date for this subscription, as yyyy-mm-dd.
              format: date
            contractedMrr:
              type: number
              description: |
                Monthly recurring revenue of the subscription.
            currentTerm:
              type: integer
              description: |
                The length of the period for the current subscription term.
              format: int64
            currentTermPeriodType:
              type: string
              description: |
                The period type for the current subscription term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
            customerAcceptanceDate:
              type: string
              description: >
                The date on which the services or products within a subscription
                have been accepted by the customer, as yyyy-mm-dd.
              format: date
            id:
              type: string
              description: |
                Subscription ID.
            initialTerm:
              type: integer
              description: |
                The length of the period for the first subscription term.
              format: int64
            initialTermPeriodType:
              type: string
              description: |
                The period type for the first subscription term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
            invoiceOwnerAccountId:
              type: string
              description: ""
            invoiceOwnerAccountName:
              type: string
              description: ""
            invoiceOwnerAccountNumber:
              type: string
              description: ""
            invoiceSeparately:
              type: string
              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.
            notes:
              type: string
              description: |
                A string of up to 65,535 characters.
            orderNumber:
              type: string
              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.
            ratePlans:
              type: array
              description: |
                Container for rate plans.
              items:
                $ref: "#/components/schemas/GETSubscriptionRatePlanType"
            renewalSetting:
              type: string
              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`
            renewalTerm:
              type: integer
              description: |
                The length of the period for the subscription renewal term.
              format: int64
            renewalTermPeriodType:
              type: string
              description: |
                The period type for the subscription renewal term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
            serviceActivationDate:
              type: string
              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
            status:
              type: string
              description: |
                Subscription status; possible values are:

                * `Draft`
                * `Pending Activation`
                * `Pending Acceptance`
                * `Active`
                * `Cancelled`
                * `Suspended` (This value is in Limited Availability.)
            subscriptionNumber:
              type: string
              description: ""
            subscriptionStartDate:
              type: string
              description: |
                Date the subscription becomes effective.
              format: date
            termEndDate:
              type: string
              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
            termStartDate:
              type: string
              description: >
                Date the subscription term begins. If this is a renewal
                subscription, this date is different from the subscription start
                date.
              format: date
            termType:
              type: string
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
            totalContractedValue:
              type: number
              description: |
                Total contracted value of the subscription.
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    GETSubscriptionTypeWithSuccess:
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: The ID of the account associated with this subscription.
            accountName:
              type: string
              description: The name of the account associated with this subscription.
            accountNumber:
              type: string
              description: The number of the account associated with this subscription.
            autoRenew:
              type: boolean
              description: >
                If `true`, the subscription automatically renews at the end of
                the term. Default is `false`.
            contractEffectiveDate:
              type: string
              description: |
                Effective contract date for this subscription, as yyyy-mm-dd.
              format: date
            contractedMrr:
              type: number
              description: |
                Monthly recurring revenue of the subscription.
            currentTerm:
              type: integer
              description: |
                The length of the period for the current subscription term.
              format: int64
            currentTermPeriodType:
              type: string
              description: |
                The period type for the current subscription term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
            customerAcceptanceDate:
              type: string
              description: >
                The date on which the services or products within a subscription
                have been accepted by the customer, as yyyy-mm-dd.
              format: date
            id:
              type: string
              description: |
                Subscription ID.
            initialTerm:
              type: integer
              description: |
                The length of the period for the first subscription term.
              format: int64
            initialTermPeriodType:
              type: string
              description: |
                The period type for the first subscription term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
            invoiceOwnerAccountId:
              type: string
              description: ""
            invoiceOwnerAccountName:
              type: string
              description: ""
            invoiceOwnerAccountNumber:
              type: string
              description: ""
            invoiceSeparately:
              type: string
              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.
            notes:
              type: string
              description: |
                A string of up to 65,535 characters.
            orderNumber:
              type: string
              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.
            ratePlans:
              type: array
              description: |
                Container for rate plans.
              items:
                $ref: "#/components/schemas/GETSubscriptionRatePlanType"
            renewalSetting:
              type: string
              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`
            renewalTerm:
              type: integer
              description: |
                The length of the period for the subscription renewal term.
              format: int64
            renewalTermPeriodType:
              type: string
              description: |
                The period type for the subscription renewal term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
            serviceActivationDate:
              type: string
              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
            status:
              type: string
              description: |
                Subscription status; possible values are:

                * `Draft`
                * `Pending Activation`
                * `Pending Acceptance`
                * `Active`
                * `Cancelled`
                * `Suspended` (This value is in Limited Availability.)
            subscriptionNumber:
              type: string
              description: Subscription number.
            subscriptionStartDate:
              type: string
              description: |
                Date the subscription becomes effective.
              format: date
            success:
              type: boolean
              description: |
                Returns `true` if the request was processed successfully.
            termEndDate:
              type: string
              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
            termStartDate:
              type: string
              description: >
                Date the subscription term begins. If this is a renewal
                subscription, this date is different from the subscription start
                date.
              format: date
            termType:
              type: string
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
            totalContractedValue:
              type: number
              description: |
                Total contracted value of the subscription.
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    GETSubscriptionWrapper:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        subscriptions:
          type: array
          description: |
            Array of subscriptions.
          items:
            $ref: "#/components/schemas/GETSubscriptionType"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GETTaxationItemListType:
      type: object
      properties:
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
        taxationItems:
          type: array
          description: |
            Container for taxation items.
          items:
            $ref: "#/components/schemas/GETTaxationItemTypewithSuccess"
    GETTaxationItemType:
      allOf:
        - type: object
          properties:
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the taxation item. 
            createdDate:
              type: string
              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
            exemptAmount:
              type: number
              description: >
                The amount of taxes or VAT for which the customer has an
                exemption.
              format: double
            financeInformation:
              type: object
              properties:
                onAccountAccountingCode:
                  type: string
                  description: >
                    The accounting code that maps to an on account in your
                    accounting system.
                onAccountAccountingCodeType:
                  type: string
                  description: >
                    The type of the accounting code that maps to an on account
                    in your accounting system.
                salesTaxPayableAccountingCode:
                  type: string
                  description: |
                    The accounting code for the sales taxes payable.
                salesTaxPayableAccountingCodeType:
                  type: string
                  description: |
                    The type of the accounting code for the sales taxes payable.
              description: >
                Container for the finance information related to the taxation
                item.
            id:
              type: string
              description: |
                The ID of the taxation item.
            jurisdiction:
              type: string
              description: >
                The jurisdiction that applies the tax or VAT. This value is
                typically a state, province, county, or city.
            locationCode:
              type: string
              description: >
                The identifier for the location based on the value of the
                `taxCode` field. 
            memoItemId:
              type: string
              description: >
                The ID of the credit or debit memo associated with the taxation
                item.
            name:
              type: string
              description: |
                The name of the taxation item.
            sourceTaxItemId:
              type: string
              description: >
                The ID of the taxation item of the invoice, which the credit or
                debit memo is created from.
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
            taxAmount:
              type: number
              description: |
                The amount of the tax applied to the credit or debit memo.
              format: double
            taxCode:
              type: string
              description: >
                The tax code identifies which tax rules and tax rates to apply
                to a specific credit or debit memo.
            taxCodeDescription:
              type: string
              description: |
                The description of the tax code.
            taxDate:
              type: string
              description: |
                The date when the tax is applied to the credit or debit memo.
              format: date
            taxRate:
              type: number
              description: |
                The tax rate applied to the credit or debit memo.
              format: double
            taxRateDescription:
              type: string
              description: |
                The description of the tax rate.
            taxRateType:
              type: string
              description: |
                The type of the tax rate applied to the credit or debit memo.
              enum:
                - Percentage
                - FlatFee
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the taxation item.
            updatedDate:
              type: string
              description: >
                The date and time when the taxation item was last updated, in
                `yyyy-mm-dd hh:mm:ss` format. 
              format: date-time
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    GETTaxationItemTypewithSuccess:
      title: taxationItems
      allOf:
        - type: object
          properties:
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the taxation item.
            createdDate:
              type: string
              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
            exemptAmount:
              type: number
              description: >
                The amount of taxes or VAT for which the customer has an
                exemption.
              format: double
            financeInformation:
              type: object
              properties:
                onAccountAccountingCode:
                  type: string
                  description: >
                    The accounting code that maps to an on account in your
                    accounting system.
                onAccountAccountingCodeType:
                  type: string
                  description: >
                    The type of the accounting code that maps to an on account
                    in your accounting system.
                salesTaxPayableAccountingCode:
                  type: string
                  description: |
                    The accounting code for the sales taxes payable.
                salesTaxPayableAccountingCodeType:
                  type: string
                  description: |
                    The type of the accounting code for the sales taxes payable.
              description: >
                Container for the finance information related to the taxation
                item.
            id:
              type: string
              description: |
                The ID of the taxation item.
            jurisdiction:
              type: string
              description: >
                The jurisdiction that applies the tax or VAT. This value is
                typically a state, province, county, or city.
            locationCode:
              type: string
              description: >
                The identifier for the location based on the value of the
                `taxCode` field.
            memoItemId:
              type: string
              description: >
                The ID of the credit or debit memo associated with the taxation
                item.
            name:
              type: string
              description: |
                The name of the taxation item.
            sourceTaxItemId:
              type: string
              description: >
                The ID of the taxation item of the invoice, which the credit or
                debit memo is created from.
            taxAmount:
              type: number
              description: |
                The amount of the tax applied to the credit or debit memo.
              format: double
            taxCode:
              type: string
              description: >
                The tax code identifies which tax rules and tax rates to apply
                to a specific credit or debit memo.
            taxCodeDescription:
              type: string
              description: |
                The description of the tax code.
            taxDate:
              type: string
              description: |
                The date when the tax is applied to the credit or debit memo.
              format: date
            taxRate:
              type: number
              description: |
                The tax rate applied to the credit or debit memo.
              format: double
            taxRateDescription:
              type: string
              description: |
                The description of the tax rate.
            taxRateType:
              type: string
              description: |
                The type of the tax rate applied to the credit or debit memo.
              enum:
                - Percentage
                - FlatFee
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the taxation item.
            updatedDate:
              type: string
              description: >
                The date and time when the taxation item was last updated, in
                `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    GETTaxationItemsOfCreditMemoItemType:
      allOf:
        - type: object
          properties:
            data:
              type: array
              description: |
                Container for the taxation items of the credit memo item.
              items:
                $ref: "#/components/schemas/GETCMTaxItemTypeNew"
            nextPage:
              type: string
              description: >
                URL to retrieve the next page of the response if it exists;
                otherwise absent.
              format: URL
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
    GETTaxationItemsOfDebitMemoItemType:
      allOf:
        - type: object
          properties:
            data:
              type: array
              description: |
                Container for the taxation items of the debit memo item.
              items:
                $ref: "#/components/schemas/GETDMTaxItemTypeNew"
            nextPage:
              type: string
              description: >
                URL to retrieve the next page of the response if it exists;
                otherwise absent.
              format: URL
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
    GETTierType:
      title: tiers
      type: object
      properties:
        endingUnit:
          type: number
          description: |
            Decimal defining end of tier range.
        price:
          type: number
          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.
        priceFormat:
          type: string
          description: |
            Tier price format. Allowed values: `flat fee`, `per unit`.
        startingUnit:
          type: number
          description: |
            Decimal defining start of tier range.
        tier:
          type: integer
          description: |
            Unique number of the tier.
          format: int64
    GETUsageType:
      title: usage
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                Customer account ID.
            accountName:
              type: string
              description: |
                Customer account name.
            accountNumber:
              type: string
              description: |
                Customer account number.
            chargeNumber:
              type: string
              description: |
                Number of the rate-plan charge that pays for this usage.
            id:
              type: string
              description: |
                Unique ID for the usage item.
            quantity:
              type: string
              description: |
                Number of units used.
              format: decimal
            sourceName:
              type: string
              description: |
                Source of the usage data. Possible values are: `Import`, `API`.
            startDateTime:
              type: string
              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
            status:
              type: string
              description: |
                Possible values are: `Importing`, `Pending`, `Processed`.
            submissionDateTime:
              type: string
              description: |
                Date when usage was submitted.
              format: date-time
            subscriptionNumber:
              type: string
              description: |
                Number of the subscription covering this usage.
            unitOfMeasure:
              type: string
              description: |
                Unit used to measure consumption.
        - $ref: "#/components/schemas/UsageObjectCustomFields"
    GETUsageWrapper:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        usage:
          type: array
          description: |
            Contains one or more usage items.
          items:
            $ref: "#/components/schemas/GETUsageType"
    GatewayOption:
      type: object
      properties:
        name:
          type: string
          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.
        value:
          type: string
          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.
    GenerateBillingDocumentResponseType:
      type: object
      properties:
        creditMemos:
          type: array
          description: >
            Container for generated credit memos.


            **Note:** This container is only available if you have the Invoice Settlement feature enabled. The Invoice Settlement 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/).
          items:
            $ref: "#/components/schemas/CreditMemoResponseType"
        invoices:
          type: array
          description: |
            Container for generated invoics.
          items:
            $ref: "#/components/schemas/InvoiceResponseType"
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GetAllOrdersResponseType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        orders:
          type: array
          items:
            $ref: "#/components/schemas/Order"
        success:
          type: boolean
          description: |
            Indicates whether the call succeeded.
    GetBillingPreviewRunResponse:
      type: object
      properties:
        assumeRenewal:
          type: string
          description: ""
        batch:
          type: string
          description: |
            The customer batch included in the billing preview run. 
        chargeTypeToExclude:
          type: string
          description: |
            The charge types excluded from the forecast run.
        createdById:
          type: string
          description: |
            The ID of the user who created the billing preview run.
        createdDate:
          type: string
          description: |
            The date and time when the billing preview run was created.
          format: datetime
        endDate:
          type: string
          description: |
            The date and time when the billing preview run completes.
          format: datetime
        errorMessage:
          type: string
          description: |
            The error message generated by a failed billing preview run.
        includingEvergreenSubscription:
          type: boolean
          description: >
            Indicates if evergreen subscriptions are included in the billing
            preview run.
        resultFileUrl:
          type: string
          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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
        runNumber:
          type: string
          description: |
            The run number of the billing preview run.
        startDate:
          type: string
          description: |
            The date and time when the billing preview run starts.
          format: datetime
        status:
          type: string
          description: |
            The status of the >billing preview run.

            **Possible values:** 

            * 0: Pending
            * 1: Processing
            * 2: Completed
            * 3: Error
            * 4: Canceled
        succeededAccounts:
          type: integer
          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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
        targetDate:
          type: string
          description: |
            The target date for the billing preview run.          
          format: date
        totalAccounts:
          type: integer
          description: |
            The total number of accounts in the billing preview run.
          format: int32
        updatedById:
          type: string
          description: |
            The ID of the user who last updated the billing preview run.
        updatedDate:
          type: string
          description: |
            The date and time when the billing preview run was last updated.
          format: date-time
      description: get billingPreviewRun response
    GetCustomObjectsAllNamespacesResponse:
      type: object
      properties:
        count:
          type: integer
          description: The number of namespaces for custom object definitions.
          example: 1
        namespaces:
          type: array
          items:
            $ref: "#/components/schemas/CustomObjectsNamespace"
    GetDataQueryJobResponse:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/DataQueryJob"
    GetDataQueryJobsResponse:
      type: object
      properties:
        data:
          type: array
          description: >
            List of data query jobs. The query jobs are listed in reverse order
            of creation.
          items:
            $ref: "#/components/schemas/DataQueryJob"
    GetDebitMemoApplicationPartCollectionType:
      type: object
      properties:
        applicationParts:
          type: array
          description: |
            Container for application parts.
          items:
            $ref: "#/components/schemas/GetDebitMemoApplicationPartType"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GetDebitMemoApplicationPartType:
      title: applicationParts
      type: object
      properties:
        appliedAmount:
          type: number
          description: |
            The amount that is applied to the debit memo.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the payment or credit memo.
          format: uuid
        createdDate:
          type: string
          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
        creditMemoId:
          type: string
          description: |
            The ID of credit memo that is applied to the specified debit memo.
          format: uuid
        paymentId:
          type: string
          description: |
            The ID of the payment that is applied to the specified debit memo.
          format: uuid
        updatedById:
          type: string
          description: >
            The ID of the Zuora user who last updated the payment or credit memo.
          format: uuid
        updatedDate:
          type: string
          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
    GetHostedPageType:
      title: hostedpages
      type: object
      properties:
        pageId:
          type: string
          description: |
            Page ID of the Payment Page that Zuora assigns when it is created.
        pageName:
          type: string
          description: >
            Name of the Payment Page that specified during the page
            configuration.
        pageType:
          type: string
          description: >
            Payment method type of this Payment Page, e.g. 'Credit Card', 'ACH',
            or 'Bank Transfer'.
        pageVersion:
          type: string
          description: >
            Version of the Payment Page. 1 for Payment Pages 1.0 or 2 for
            Payment Pages 2.0.
    GetHostedPagesType:
      type: object
      properties:
        hostedpages:
          type: array
          description: |
            Container for the hosted page information.
          items:
            $ref: "#/components/schemas/GetHostedPageType"
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    GetInvoiceApplicationPartCollectionType:
      type: object
      properties:
        applicationParts:
          type: array
          description: |
            Container for application parts.
          items:
            $ref: "#/components/schemas/GetInvoiceApplicationPartType"
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    GetInvoiceApplicationPartType:
      title: applicationParts
      type: object
      properties:
        appliedAmount:
          type: number
          description: |
            The amount that is applied to the invoice.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the payment or credit memo.
          format: uuid
        createdDate:
          type: string
          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
        creditMemoId:
          type: string
          description: |
            The ID of credit memo that is applied to the specified invoice.
          format: uuid
        paymentId:
          type: string
          description: |
            The ID of the payment that is applied to the specified invoice.
          format: uuid
        updatedById:
          type: string
          description: >
            The ID of the Zuora user who last updated the payment or credit memo.
          format: uuid
        updatedDate:
          type: string
          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
    GetOrderResponse:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - type: object
          properties:
            order:
              $ref: "#/components/schemas/Order"
    GetOrderResponseForEvergreen:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - type: object
          properties:
            order:
              $ref: "#/components/schemas/OrderForEvergreen"
    GetOrderResume:
      title: Resume
      type: object
      properties:
        extendsTerm:
          type: boolean
          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.
        resumeDate:
          type: string
          description: |
            The resume date when the resumption takes effect.
          format: date
        resumePeriods:
          type: integer
          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. 
        resumePeriodsType:
          type: string
          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
        resumePolicy:
          type: string
          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
        resumeSpecificDate:
          type: string
          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
      description: |
        Information about an order action of type `Resume`.
    GetOrderSuspend:
      title: Suspend
      type: object
      properties:
        suspendDate:
          type: string
          description: |
            The suspend date when the suspension takes effect. 
          format: date
        suspendPeriods:
          type: integer
          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. 
        suspendPeriodsType:
          type: string
          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
        suspendPolicy:
          type: string
          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
        suspendSpecificDate:
          type: string
          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
      description: |
        Information about an order action of type `Suspend`.
    GetOrdersResponse:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - type: object
          properties:
            nextPage:
              type: string
              description: >
                URL to retrieve the next page of the response if it exists;
                otherwise absent.
              format: URL
            orders:
              type: array
              items:
                $ref: "#/components/schemas/Order"
    GetProductFeatureType:
      title: productFeatures
      allOf:
        - type: object
          properties:
            code:
              type: string
              description: |
                Feature code, up to 255 characters long.
            description:
              type: string
              description: |
                Feature description.
            id:
              type: string
              description: |
                Feature ID.
            name:
              type: string
              description: |
                Feature name, up to 255 characters long.
            status:
              type: string
              description: ""
        - $ref: "#/components/schemas/ProductFeatureObjectCustomFields"
    GetStoredCredentialProfilesResponse:
      type: object
      properties:
        profiles:
          type: object
          properties:
            activatedOn:
              type: string
              description: >
                The date when the stored credential profile was activated (if
                applicable).
              format: date-time
            agreedOn:
              type: string
              description: |
                The date when the stored credential profile was created.
              format: date-time
            brand:
              type: string
              description: |
                The stored credential transaction framework. For example, Visa.
            cancelledOn:
              type: string
              description: >
                The date when the stored credential profile was cancelled (if
                applicable).
              format: date-time
            consentAgreementRef:
              maxLength: 128
              type: string
              description: >
                Your reference for the consent agreement that you have
                established with the customer.
            consentAgreementSrc:
              type: string
              enum:
                - External
            expiredOn:
              type: string
              description: >
                The date when the stored credential profile was expired (if
                applicable).
              format: date-time
            number:
              type: integer
              description: >
                The number that identifies the stored credential profile within
                the payment method.
            paymentMethodId:
              type: string
              description: |
                ID of the payment method.
            status:
              type: string
              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:
              type: string
              enum:
                - Recurring
          description: |
            Container for stored credential profiles.
        success:
          type: boolean
    GetSubscriptionTermInfoResponseType:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - type: object
          properties:
            nextPage:
              type: string
              description: |
                The URL of the next page of terms.
              format: URL
            terms:
              type: array
              items:
                $ref: "#/components/schemas/Term"
    GetWorkflowResponse:
      type: object
      properties:
        cpuTime:
          type: string
          description: |
            The overall CPU time for the execution of the workflow.
          format: time
        createdAt:
          type: string
          description: >
            The date and time when the workflow is created, in the `YYYY-MM-DD
            HH:MM:SS` format..
          format: datetime
        finishedAt:
          type: string
          description: >
            The date and time when the execution of the workflow completes, in
            the `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
        id:
          type: integer
          description: |
            The unique ID of the workflow.
        messages:
          type: object
          properties: {}
          description: |
            Messages from tasks.
        name:
          type: string
          description: |
            The unique run number of the workflow.
        originalWorkflowId:
          type: string
          description: |
            The ID of the workflow setup.
        runTime:
          type: number
          description: >
            The execution time of the workflow including the waiting time, in
            seconds.
          format: double
        status:
          type: string
          description: |
            The status of the workflow.
          enum:
            - Queued
            - Processing
            - Pending
            - Stopped
            - Success
            - Error
        tasks:
          type: object
          properties:
            error:
              type: integer
              description: |
                The number of tasks in **Error** state.
            pending:
              type: integer
              description: |
                The number of tasks in **Pending** state.
            processing:
              type: integer
              description: |
                The number of tasks in **Processing** state.
            queued:
              type: integer
              description: |
                The number of tasks in **Queued** state.
            stopped:
              type: integer
              description: |
                The number of tasks in **Stopped** state.
            success:
              type: integer
              description: |
                The number of tasks in **Success** state.
            total:
              type: integer
              description: |
                The total number of tasks.
          description: |
            An object containing task counts.
        type:
          type: string
          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.
        updatedAt:
          type: string
          description: >
            The date and time when the workflow is updated the last time, in the
            `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
    GetWorkflowsResponse:
      type: object
      properties:
        data:
          type: array
          description: |
            The list of workflows retrieved. 
          items:
            $ref: "#/components/schemas/Workflow"
        pagination:
          type: object
          properties:
            next_page:
              type: string
              description: >
                A string containing the URL where the next page of data can be
                retrieved.
            page:
              type: integer
              description: |
                An integer denoting the current page number.
            page_length:
              type: integer
              description: |
                An  integer denoting the number of workflows in this response.
          description: >
            An object containing pagination information for the list of
            workflows returned by the api
    InitialTerm:
      required:
        - termType
      type: object
      properties:
        period:
          maximum: 100
          minimum: 0
          type: integer
          description: Specify only when the termType is 'TERMED'.
        periodType:
          type: string
          description: Specify only when the termType is 'TERMED'.
          enum:
            - Month
            - Year
            - Day
            - Week
        startDate:
          type: string
          description: |
            The start date of the current term.
          format: date
        termType:
          type: string
          enum:
            - TERMED
            - EVERGREEN
      description: The length of the period for the current subscription term.
    Invoice:
      type: object
      properties:
        AccountId:
          type: string
          description: ""
        AdjustmentAmount:
          type: number
          description: >-2
             The amount of the invoice adjustments associated with the invoice. **Character limi**t: 16

            **Values**: a valid currency amount 
          format: double
        Amount:
          type: number
          description: |-2
             The sum of all charges and taxes associated with the invoice.


            **Character limit**: 16

            **Values**: automatically generated 
          format: double
        AmountWithoutTax:
          type: number
          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
        Balance:
          type: number
          description: >-2
             The remaining balance of the invoice after all payments, adjustments, and refunds are applied.


            **Character limit**: 16


            **Values**: automatically generated 
          format: double
        BillRunId:
          type: string
          description: |-2
             The ID of a Bill Run.


            **Character limit**: 32

            **Values**: a BillRun ID 
        Body:
          type: string
          description: " Required "
        Comments:
          type: string
          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 
        CreatedById:
          type: string
          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 
        CreatedDate:
          type: string
          description: |-2
             The date when the invoice was generated.


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
        CreditBalanceAdjustmentAmount:
          type: number
          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
        DueDate:
          type: string
          description: |-2
             The date by which the payment for this invoice is due.


            **Character limit**: 29 
          format: date
        IncludesOneTime:
          type: boolean
          description: >-2
             Specifies whether the invoice includes one-time charges.


            **Character limit**: 5


            **Values**: automatically generated from one of the following: `True` (default), `False` 
        IncludesRecurring:
          type: boolean
          description: >-2
             Specifies whether the invoice includes recurring charges.


            **Character limit**: 5


            **Values**: automatically generated from one of the following: `True` (default), `False` 
        IncludesUsage:
          type: boolean
          description: >-2
             Specifies whether the invoice includes usage charges.


            **Character limit**: 5


            **Values**: automatically generated from one of the following: `True `(default), `False` 
        InvoiceDate:
          type: string
          description: |-2
             Specifies the date on which to generate the invoice.


            **Character limit**: 29 
          format: date
        InvoiceNumber:
          type: string
          description: >-2
             The unique identification number for the invoice. This number is returned as a string.


            **Character limit**: 32


            **Values**: automatically generated 
        LastEmailSentDate:
          type: string
          description: |-2
             The date when the invoice was last emailed.


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
        PaymentAmount:
          type: number
          description: |-2
             The amount of payments applied to the invoice.


            **Character limit**: 16 **Value**s: automatically generated 
          format: double
        PostedBy:
          type: string
          description: |-2
             The user ID of the person who moved the invoice to Posted status.


            **Character limit**: 32

            **Values**: automatically generated 
        PostedDate:
          type: string
          description: |-2
             The date when the invoice was posted.


            **Character limit:** 29

            **Values**: automatically generated 
          format: date-time
        RefundAmount:
          type: number
          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
        RegenerateInvoicePDF:
          type: boolean
          description: |-2
             Regenerates a PDF of an invoice that was already generated.

            **Character limit**: 5

            **Values**: `True`, `False` 
        Status:
          type: string
          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

        TargetDate:
          type: string
          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
        TaxAmount:
          type: number
          description: |-2
             The total amount of the taxes applied to the invoice.


            **Character limit**: 16

            **Values**: automatically generated 
          format: double
        TaxExemptAmount:
          type: number
          description: |-2
             The total amount of the invoice that is exempt from taxation.


            **Character limit**: 16

            **Values**: automatically generated 
          format: double
        TransferredToAccounting:
          type: string
          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 
        UpdatedById:
          type: string
          description: ""
        UpdatedDate:
          type: string
          description: |-2
             The date when the invoice was last updated.


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
    InvoiceAdjustmentObjectCustomFields:
      title: invoiceAdjustmentFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    InvoiceDataInvoice:
      title: Invoice
      description: ""
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              description: ""
            AdjustmentAmount:
              type: number
              description: >-2
                 The amount of the invoice adjustments associated with the invoice. **Character limi**t: 16


                **Values**: a valid currency amount 
              format: double
            Amount:
              type: number
              description: |-2
                 The sum of all charges and taxes associated with the invoice.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
            AmountWithoutTax:
              type: number
              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
            Balance:
              type: number
              description: >-2
                 The remaining balance of the invoice after all payments, adjustments, and refunds are applied.


                **Character limit**: 16



                **Values**: automatically generated 
              format: double
            BillRunId:
              type: string
              description: |-2
                 The ID of a Bill Run.


                **Character limit**: 32


                **Values**: a BillRun ID 
            Body:
              type: string
              description: " Required "
            Comments:
              type: string
              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 
            CreatedById:
              type: string
              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 
            CreatedDate:
              type: string
              description: |-2
                 The date when the invoice was generated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            CreditBalanceAdjustmentAmount:
              type: number
              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
            DueDate:
              type: string
              description: |-2
                 The date by which the payment for this invoice is due.


                **Character limit**: 29 
              format: date
            IncludesOneTime:
              type: boolean
              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` 
            IncludesRecurring:
              type: boolean
              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` 
            IncludesUsage:
              type: boolean
              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` 
            InvoiceDate:
              type: string
              description: |-2
                 Specifies the date on which to generate the invoice.


                **Character limit**: 29 
              format: date
            InvoiceNumber:
              type: string
              description: >-2
                 The unique identification number for the invoice. This number is returned as a string.


                **Character limit**: 32



                **Values**: automatically generated 
            LastEmailSentDate:
              type: string
              description: |-2
                 The date when the invoice was last emailed.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            PaymentAmount:
              type: number
              description: |-2
                 The amount of payments applied to the invoice.


                **Character limit**: 16 **Value**s: automatically generated 
              format: double
            PostedBy:
              type: string
              description: >-2
                 The user ID of the person who moved the invoice to Posted status.


                **Character limit**: 32



                **Values**: automatically generated 
            PostedDate:
              type: string
              description: |-2
                 The date when the invoice was posted.
                **Character limit:** 29


                **Values**: automatically generated 
              format: date-time
            RefundAmount:
              type: number
              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
            RegenerateInvoicePDF:
              type: boolean
              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` 
            Status:
              type: string
              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

            TargetDate:
              type: string
              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
            TaxAmount:
              type: number
              description: |-2
                 The total amount of the taxes applied to the invoice.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
            TaxExemptAmount:
              type: number
              description: |-2
                 The total amount of the invoice that is exempt from taxation.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
            TransferredToAccounting:
              type: string
              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 
            UpdatedById:
              type: string
              description: ""
            UpdatedDate:
              type: string
              description: |-2
                 The date when the invoice was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
    InvoiceEntityPrefix:
      title: Invoice
      type: object
      properties:
        prefix:
          type: string
          description: |
            The prefix of invoices.
          example: INV
        startNumber:
          type: integer
          description: |
            The starting document number of invoices.
          example: 10
      description: |
        Container for the prefix and starting document number of invoices.
    InvoiceFile:
      title: invoiceFiles
      type: object
      properties:
        id:
          type: string
          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.
        pdfFileUrl:
          type: string
          description: >
            The REST URL for the invoice PDF file. Click the URL to open the
            invoice PDF file.
        versionNumber:
          type: integer
          description: |
            The version number of the invoice PDF file.
          format: int64
    InvoiceItem:
      title: invoiceItems
      allOf:
        - type: object
          properties:
            appliedToItemId:
              type: string
              description: The unique ID of the invoice item that the discount charge is
                applied to.
            availableToCreditAmount:
              type: number
              description: >
                The amount of the invoice item that is available to
                credit.        
              format: decimal
            balance:
              type: string
              description: The balance of the invoice item.
              format: decimal
            chargeAmount:
              type: string
              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
            chargeDescription:
              type: string
              description: Description of the charge.
            chargeId:
              type: string
              description: ID of the charge.
            chargeName:
              type: string
              description: Name of the charge.
            id:
              type: string
              description: Item ID.
            productName:
              type: string
              description: Name of the product associated with this item.
            quantity:
              type: string
              description: Quantity of this item, in the configured unit of measure for the
                charge.
              format: decimal
            serviceEndDate:
              type: string
              description: End date of the service period for this item, i.e., the last day of
                the service period, as _yyyy-mm-dd_.
              format: date
            serviceStartDate:
              type: string
              description: 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
            subscriptionId:
              type: string
              description: ID of the subscription for this item.
            subscriptionName:
              type: string
              description: Name of the subscription for this item.
            success:
              type: boolean
              description: Returns `true` if the request was processed successfully.
            taxAmount:
              type: string
              description: Tax applied to the charge.
              format: decimal
            taxationItems:
              type: object
              properties:
                data:
                  type: array
                  description: |
                    List of taxation items.
                  items:
                    $ref: "#/components/schemas/GETInvoiceTaxItemType"
                nextPage:
                  type: string
                  description: >
                    URL to retrieve the next page of the response if it exists;
                    otherwise absent.
                  format: URL
              description: |
                Container for the taxation items of the invoice item. 
            unitOfMeasure:
              type: string
              description: Unit used to measure. consumption.
        - $ref: "#/components/schemas/InvoiceItemObjectNSFields"
        - $ref: "#/components/schemas/InvoiceItemObjectCustomFields"
    InvoiceItemAdjustmentObjectCustomFields:
      title: invoiceItemAdjustmentFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    InvoiceItemAdjustmentObjectNSFields:
      title: invoiceItemAdjustmentFieldsNS
      type: object
      properties:
        InvoiceItemAdjustment.IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        InvoiceItemAdjustment.IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        InvoiceItemAdjustment.SyncDate__NS:
          maxLength: 255
          type: string
          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).
      description: >
        Container for Invoice Item Adjustment fields provided by the [Zuora
        Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
    InvoiceItemObjectCustomFields:
      title: invoiceItemFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    InvoiceItemObjectNSFields:
      title: invoiceItemFieldsNS
      type: object
      properties:
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
      description: >
        Container for Invoice Item fields provided by the [Zuora Connector for
        NetSuite](https://www.zuora.com/connect/app/?appId=265).
    InvoiceItemPreviewResult:
      type: object
      properties:
        additionalInfo:
          type: object
          properties:
            quantity:
              type: number
            unitOfMeasure:
              type: string
        amountWithoutTax:
          type: number
        appliedToChargeNumber:
          type: string
          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.
        chargeDescription:
          type: string
        chargeName:
          type: string
        chargeNumber:
          type: string
          description: Available when the chargeNumber was specified in the request or
            when the order is amending an existing subscription.
        processingType:
          type: string
          enum:
            - Charge
            - Discount
            - Tax
        productName:
          type: string
        productRatePlanChargeId:
          type: string
        serviceEndDate:
          type: string
          format: date
        serviceStartDate:
          type: string
          format: date
        subscriptionNumber:
          type: string
        taxAmount:
          type: number
    InvoiceObjectCustomFields:
      title: invoiceFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    InvoiceObjectNSFields:
      title: invoiceFieldsNS
      type: object
      properties:
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
      description: >
        Container for Invoice fields provided by the [Zuora Connector for
        NetSuite](https://www.zuora.com/connect/app/?appId=265).
    InvoicePayment:
      required:
        - Amount
        - InvoiceId
      type: object
      properties:
        Amount:
          type: string
          description: |
            The amount of the payment to apply to an invoice.
          format: decimal
        InvoiceId:
          type: string
          description: |
            The ID of the invoice that the payment is applied to.
        PaymentId:
          type: string
          description: |
            The ID of the payment.
    InvoiceProcessingOptions:
      required:
        - InvoiceTargetDate
      type: object
      properties:
        InvoiceDate:
          type: string
          description: " The invoice date."
          format: date
        InvoiceTargetDate:
          type: string
          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
    InvoiceResponseType:
      title: invoices
      type: object
      properties:
        id:
          type: string
          description: |
            The ID of the generated invoice.
    JobResult:
      description: >
        **Note:** The schema of the `result` nested field is the same as the
        response body schema of either the ["Create
        order"](https://www.zuora.com/developer/api-reference/#operation/POST_Order)
        or the ["Preview
        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 order". See [Preview Order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) for the response body schema of "Preview order". 
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - type: object
          properties:
            accountNumber:
              type: string
              description: The account number for the order.
            creditMemoNumbers:
              type: array
              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
            invoiceNumbers:
              type: array
              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
            orderNumber:
              type: string
              description: The order number of the order created.
            paidAmount:
              type: string
              description: The total amount collected in this order request.
            paymentNumber:
              type: string
              description: The payment number that collected in this order request.
            status:
              type: string
              description: Status of the order. `Pending` is only applicable for an order that
                contains a `CreateSubscription` order action.
              enum:
                - Completed
                - Pending
            subscriptionNumbers:
              type: array
              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
            subscriptions:
              type: array
              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:
                type: object
                properties:
                  status:
                    type: string
                    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
                  subscriptionNumber:
                    type: string
                    description: Subscription number of the subscription included in this order.
    JournalEntryItemObjectCustomFields:
      title: journalEntryItemFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    JournalEntryObjectCustomFields:
      title: journalEntryFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    LastTerm:
      required:
        - termType
      type: object
      properties:
        period:
          maximum: 100
          minimum: 0
          type: integer
          description: Specify only when the termType is 'TERMED'.
        periodType:
          type: string
          description: Specify only when the termType is 'TERMED'.
          enum:
            - Month
            - Year
            - Day
            - Week
        startDate:
          type: string
          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
        termType:
          type: string
          enum:
            - TERMED
            - EVERGREEN
      description: The length of the period for the current subscription term.
    Linkage:
      type: object
      properties:
        linkage_type:
          type: string
          enum:
            - Start
            - Success
            - Failure
            - Iterate
            - Approve
            - Reject
        source_task_id:
          type: integer
          description: the task that spawned the target task
        source_workflow_id:
          type: integer
          description: the workflow the target task is associated with
        target_task_id:
          type: integer
          description: the task that the source task is linked to.
      description: Used to represent the relationship between workflow tasks
    ListAllSettingsResponse:
      title: allSettings
      type: object
      properties:
        settings:
          type: array
          items:
            $ref: "#/components/schemas/SettingItemWithOperationsInformation"
    MigrationUpdateCustomObjectDefinitionsRequest:
      required:
        - actions
      type: object
      properties:
        actions:
          maxItems: 1
          minItems: 1
          type: array
          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"
    MigrationUpdateCustomObjectDefinitionsResponse:
      type: object
      properties:
        actions:
          maxItems: 1
          minItems: 1
          type: array
          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"
    ModifiedStoredCredentialProfileResponse:
      type: object
      properties:
        number:
          type: integer
          description: >
            The number that identifies the stored credential profile within the
            payment method.
        paymentMethodId:
          type: string
          description: |
            ID of the payment method.
        success:
          type: boolean
    NewChargeMetrics:
      type: object
      properties:
        ChargeNumber:
          type: string
          description: ""
        DMRR:
          type: number
          description: ""
          format: double
        DTCV:
          type: number
          description: ""
          format: double
        MRR:
          type: number
          description: ""
          format: double
        OriginalId:
          type: string
          description: ""
        OriginalRatePlanId:
          type: string
          description: ""
        ProductRatePlanChargeId:
          type: string
          description: ""
        ProductRatePlanId:
          type: string
          description: ""
        TCV:
          type: number
          description: ""
          format: double
    OneTimeFlatFeePricingOverride:
      title: oneTimeFlatFee
      required:
        - listPrice
      type: object
      properties:
        listPrice:
          type: number
          description: |
            Price of the charge.
      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.
    OneTimePerUnitPricingOverride:
      title: oneTimePerUnit
      type: object
      properties:
        listPrice:
          type: number
          description: |
            Per-unit price of the charge.
        quantity:
          minimum: 0
          type: number
          description: |
            Number of units purchased.
      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.
    OneTimeTieredPricingOverride:
      title: oneTimeTiered
      type: object
      properties:
        quantity:
          minimum: 0
          type: number
          description: |
            Number of units purchased.
        tiers:
          type: array
          description: |
            List of cumulative pricing tiers in the charge.
          items:
            $ref: "#/components/schemas/ChargeTier"
      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.
    OneTimeVolumePricingOverride:
      title: oneTimeVolume
      type: object
      properties:
        quantity:
          minimum: 0
          type: number
          description: |
            Number of units purchased.
        tiers:
          type: array
          description: |
            List of variable pricing tiers in the charge.
          items:
            $ref: "#/components/schemas/ChargeTier"
      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.
    Order:
      type: object
      properties:
        createdBy:
          type: string
          description: The ID of the user who created this order.
        createdDate:
          type: string
          description: The time that the order gets created in the system, in the
            `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
        currency:
          type: string
          description: Currency code.
        customFields:
          $ref: "#/components/schemas/OrderObjectCustomFields"
        description:
          maxLength: 500
          type: string
          description: A description of the order.
        existingAccountNumber:
          type: string
          description: The account number that this order has been created under. This is
            also the invoice owner of the subscriptions included in this order.
        orderDate:
          type: string
          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
        orderNumber:
          type: string
          description: The order number of the order.
        status:
          type: string
          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
        subscriptions:
          type: array
          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:
            type: object
            properties:
              baseVersion:
                type: integer
                description: The base version of the subscription.
              customFields:
                $ref: "#/components/schemas/SubscriptionObjectCustomFields"
              newVersion:
                type: integer
                description: The latest version of the subscription.
              orderActions:
                type: array
                items:
                  $ref: "#/components/schemas/OrderAction"
              sequence:
                type: integer
                description: The sequence number of a certain subscription processed by the
                  order.
              subscriptionNumber:
                type: string
                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.
        updatedBy:
          type: string
          description: The ID of the user who updated this order.
        updatedDate:
          type: string
          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
      description: Represents the order information that will be returned in the GET call.
    OrderAction:
      type: object
      properties:
        addProduct:
          $ref: "#/components/schemas/RatePlanOverride"
        cancelSubscription:
          $ref: "#/components/schemas/CancelSubscription"
        createSubscription:
          $ref: "#/components/schemas/CreateSubscription"
        customFields:
          $ref: "#/components/schemas/OrderActionObjectCustomFields"
        orderItems:
          type: array
          items:
            $ref: "#/components/schemas/OrderItem"
        orderMetrics:
          type: array
          items:
            $ref: "#/components/schemas/orderMetric"
        ownerTransfer:
          $ref: "#/components/schemas/OwnerTransfer"
        removeProduct:
          $ref: "#/components/schemas/RemoveProduct"
        resume:
          $ref: "#/components/schemas/GetOrderResume"
        sequence:
          type: integer
          description: The sequence of the order actions processed in the order.
        suspend:
          $ref: "#/components/schemas/GetOrderSuspend"
        termsAndConditions:
          $ref: "#/components/schemas/TermsAndConditions"
        triggerDates:
          type: array
          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:
          type: string
          description: Type of the order action.
          enum:
            - CreateSubscription
            - TermsAndConditions
            - AddProduct
            - UpdateProduct
            - RemoveProduct
            - RenewSubscription
            - CancelSubscription
            - OwnerTransfer
            - Suspend
            - Resume
        updateProduct:
          $ref: "#/components/schemas/RatePlanUpdate"
      description: Represents the processed order action.
    OrderActionForEvergreen:
      type: object
      properties:
        addProduct:
          $ref: "#/components/schemas/RatePlanOverrideForEvergreen"
        cancelSubscription:
          $ref: "#/components/schemas/CancelSubscription"
        createSubscription:
          $ref: "#/components/schemas/CreateSubscriptionForEvergreen"
        customFields:
          $ref: "#/components/schemas/OrderActionObjectCustomFields"
        orderMetrics:
          type: array
          items:
            $ref: "#/components/schemas/OrderMetricsForEvergreen"
        ownerTransfer:
          $ref: "#/components/schemas/OwnerTransfer"
        removeProduct:
          $ref: "#/components/schemas/RemoveProduct"
        resume:
          $ref: "#/components/schemas/GetOrderResume"
        sequence:
          type: integer
          description: The sequence of the order actions processed in the order.
        suspend:
          $ref: "#/components/schemas/GetOrderSuspend"
        termsAndConditions:
          $ref: "#/components/schemas/TermsAndConditions"
        triggerDates:
          type: array
          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:
          type: string
          description: Type of the order action.
          enum:
            - CreateSubscription
            - TermsAndConditions
            - AddProduct
            - UpdateProduct
            - RemoveProduct
            - RenewSubscription
            - CancelSubscription
            - OwnerTransfer
            - Suspend
            - Resume
        updateProduct:
          $ref: "#/components/schemas/RatePlanUpdateForEvergreen"
      description: Represents the processed order action.
    OrderActionObjectCustomFields:
      title: orderActionFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    OrderForEvergreen:
      type: object
      properties:
        createdBy:
          type: string
          description: The ID of the user who created this order.
        createdDate:
          type: string
          description: The time that the order gets created in the system, in the
            `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
        currency:
          type: string
          description: Currency code.
        customFields:
          $ref: "#/components/schemas/OrderObjectCustomFields"
        description:
          maxLength: 500
          type: string
          description: A description of the order.
        existingAccountNumber:
          type: string
          description: The account number that this order has been created under. This is
            also the invoice owner of the subscriptions included in this order.
        orderDate:
          type: string
          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
        orderNumber:
          type: string
          description: The order number of the order.
        status:
          type: string
          description: The status of the order.
        subscriptions:
          type: array
          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:
            type: object
            properties:
              baseVersion:
                type: integer
                description: The base version of the subscription.
              customFields:
                $ref: "#/components/schemas/SubscriptionObjectCustomFields"
              newVersion:
                type: integer
                description: The latest version of the subscription.
              orderActions:
                type: array
                items:
                  $ref: "#/components/schemas/OrderActionForEvergreen"
              sequence:
                type: integer
                description: The sequence number of a certain subscription processed by the
                  order.
              subscriptionNumber:
                type: string
                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.
        updatedBy:
          type: string
          description: The ID of the user who updated this order.
        updatedDate:
          type: string
          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
      description: Represents the order information that will be returned in the GET call.
    OrderItem:
      type: object
      properties:
        endDate:
          type: string
          description: The order item's effective end date, aligned with the end date of
            an increased quantity order metrics.
          format: date
        id:
          type: string
          description: The ID of the order item.
        orderActionId:
          type: string
          description: Specify the order action that creates this order item.
        quantity:
          type: number
          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.
        scId:
          type: string
          description: The ID of the charge segment that gets newly generated when the
            order item is created.
        startDate:
          type: string
          description: The order item's effective start date, aligned with the start date
            of an increased quantity order metrics.
          format: date
      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
    OrderMetricsForEvergreen:
      type: object
      properties:
        chargeNumber:
          type: string
        mrr:
          type: array
          items:
            $ref: "#/components/schemas/TimeSlicedNetMetricsForEvergreen"
        originRatePlanId:
          type: string
        productRatePlanChargeId:
          type: string
        productRatePlanId:
          type: string
        quantity:
          type: array
          items:
            $ref: "#/components/schemas/TimeSlicedMetricsForEvergreen"
        tcb:
          type: array
          description: Total contracted billing which is the forecast value for the total
            invoice amount.
          items:
            $ref: "#/components/schemas/TimeSlicedTcbNetMetricsForEvergreen"
        tcv:
          type: array
          description: Total contracted value.
          items:
            $ref: "#/components/schemas/TimeSlicedNetMetricsForEvergreen"
      description: Shows the delta metrics caused by a specific order action on a
        specific charge.
    OrderObjectCustomFields:
      title: orderFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    OwnerTransfer:
      title: ownerTransfer
      type: object
      properties:
        destinationAccountNumber:
          type: string
          description: >
            The account number of the account that the subscription is being
            transferred to.
        destinationInvoiceAccountNumber:
          type: string
          description: >
            The account number of the invoice owner account that the
            subscription is being transferred to.
      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/).
    POSTAccountCreatePaymentMethodACH:
      type: object
      properties:
        addressLine1:
          type: string
          description: |
            First address line, 255 characters or less.
        addressLine2:
          type: string
          description: |
            Second address line, 255 characters or less.
        bankABACode:
          type: string
          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`.
        bankAccountName:
          maxLength: 70
          type: string
          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`.
        bankAccountNumber:
          maxLength: 30
          type: string
          description: >
            The bank account number associated with the ACH payment. This field
            is only required if the `type` field is set to `ACH`.
        bankAccountType:
          type: string
          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
        bankName:
          maxLength: 70
          type: string
          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`.
        city:
          type: string
          description: |+
            City, 40 characters or less.
                
        country:
          type: string
          description: |
            Country, must be a valid country name or abbreviation.
        phone:
          type: string
          description: |
            Phone number, 40 characters or less.
        state:
          type: string
          description: |
            State, must be a valid state name or 2-character abbreviation.
        zipCode:
          type: string
          description: |
            Zip code, 20 characters or less.
    POSTAccountCreatePaymentMethodCreditCard:
      description: ""
      allOf:
        - type: object
          properties:
            cardHolderInfo:
              required:
                - addressLine1
                - cardHolderName
                - city
                - country
                - state
                - zipCode
              type: object
              properties:
                addressLine1:
                  type: string
                  description: |
                    First address line, 255 characters or less.
                addressLine2:
                  type: string
                  description: |
                    Second address line, 255 characters or less.
                cardHolderName:
                  type: string
                  description: >
                    The card holder's full name as it appears on the card, e.g.,
                    "John J Smith", 50 characters or less.
                city:
                  type: string
                  description: |
                    City, 40 characters or less.
                country:
                  type: string
                  description: |
                    Country; must be a valid country name or abbreviation.
                email:
                  type: string
                  description: |
                    Card holder's email address, 80 characters or less.
                phone:
                  type: string
                  description: |
                    Phone number, 40 characters or less.
                state:
                  type: string
                  description: >
                    State; must be a valid state name or 2-character
                    abbreviation.
                zipCode:
                  type: string
                  description: |
                    Zip code, 20 characters or less.
              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.
            cardNumber:
              type: string
              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).
            cardType:
              type: string
              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).
            expirationMonth:
              type: string
              description: |
                Two-digit expiration month (01-12).
            expirationYear:
              type: string
              description: |
                Four-digit expiration year.
            securityCode:
              type: string
              description: >
                The CVV or CVV2 security code of the card. To ensure PCI
                compliance, this value is not stored and cannot be queried.
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
    POSTAccountResponseType:
      type: object
      properties:
        accountId:
          type: string
          description: |
            Auto-generated account ID.
        accountNumber:
          type: string
          description: |
            Account number.
        billToContactId:
          type: string
          description: |
            The ID of the bill-to contact.
        contractedMrr:
          type: string
          description: |
            Contracted monthly recurring revenue of the subscription.
          format: decimal
        creditMemoId:
          type: string
          description: >
            The credit memo ID, if a credit memo is generated during the
            subscription process.


            **Note:** This field is only available if you have the Invoice Settlements feature enabled.
        invoiceId:
          type: string
          description: |
            ID of the invoice generated at account creation, if applicable.
        paidAmount:
          type: string
          description: >
            Amount collected on the invoice generated at account creation, if
            applicable.
          format: decimal
        paymentId:
          type: string
          description: >
            ID of the payment collected on the invoice generated at account
            creation, if applicable.
        paymentMethodId:
          type: string
          description: >
            ID of the payment method that was set up at account creation, which
            automatically becomes the default payment method for this account.
        soldToContactId:
          type: string
          description: |
            The ID of the sold-to contact.
        subscriptionId:
          type: string
          description: >
            ID of the subscription that was set up at account creation, if
            applicable.
        subscriptionNumber:
          type: string
          description: >
            Number of the subscription that was set up at account creation, if
            applicable.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        totalContractedValue:
          type: string
          description: |
            Total contracted value of the subscription.
          format: decimal
    POSTAccountType:
      allOf:
        - required:
            - billToContact
            - currency
            - name
          type: object
          properties:
            accountNumber:
              type: string
              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.
            additionalEmailAddresses:
              type: array
              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
            applyCreditBalance:
              type: boolean
              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. 
            autoPay:
              type: boolean
              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.
            batch:
              type: string
              description: >
                The alias name given to a batch. A string of 50 characters or
                less.
            billCycleDay:
              type: integer
              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
            billToContact:
              $ref: "#/components/schemas/POSTAccountTypeBillToContact"
            collect:
              type: boolean
              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.
              default: true
            communicationProfileId:
              type: string
              description: "The ID of a communication profile.          "
            creditCard:
              $ref: "#/components/schemas/POSTAccountTypeCreditCard"
            creditMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
            crmId:
              type: string
              description: |
                CRM account ID for the account, up to 100 characters.
            currency:
              type: string
              description: |
                A currency as defined in Billing Settings in the Zuora UI.
            debitMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
            documentDate:
              type: string
              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
            hpmCreditCardPaymentMethodId:
              type: string
              description: >
                The ID of the HPM credit card payment method associated with
                this account. If the `autoPay` field is set to `true`, you must
                provide either this field or the `creditCard` field, but not
                both.


                **Note:** Non-credit card payment methods are not supported.
            invoice:
              type: boolean
              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`.
              default: true
            invoiceCollect:
              type: boolean
              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`.
              default: true
            invoiceDeliveryPrefsEmail:
              type: boolean
              description: |
                Whether the customer wants to receive invoices through email. 
              default: false
            invoiceDeliveryPrefsPrint:
              type: boolean
              description: >
                Whether the customer wants to receive printed invoices, such as
                through postal mail.
              default: false
            invoiceTargetDate:
              type: string
              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
            invoiceTemplateId:
              type: string
              description: >
                Invoice template ID, configured in Billing Settings in the Zuora
                UI.
            name:
              type: string
              description: |
                Account name, up to 255 characters.
            notes:
              type: string
              description: A string of up to 65,535 characters.
            parentId:
              type: string
              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.
            paymentGateway:
              type: string
              description: >
                The name of the payment gateway instance. If null or left
                unassigned, the Account will use the Default Gateway.
            paymentMethod:
              $ref: "#/components/schemas/POSTAccountTypePaymentMethod"
            paymentTerm:
              type: string
              description: >
                Payment terms for this account. Possible values are: `Due Upon
                Receipt`, `Net 30`, `Net 60`, `Net 90`.
            runBilling:
              type: boolean
              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.
              default: true
            salesRep:
              type: string
              description: The name of the sales representative associated with this account,
                if applicable. Maximum of 50 characters.
            sequenceSetId:
              type: string
              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.
            soldToContact:
              $ref: "#/components/schemas/POSTAccountTypeSoldToContact"
            soldToSameAsBillTo:
              type: boolean
              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.
            subscription:
              $ref: "#/components/schemas/POSTAccountTypeSubscription"
            tagging:
              type: string
              description: ""
            targetDate:
              type: string
              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
            taxInfo:
              type: object
              properties:
                VATId:
                  type: string
                  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).
                companyCode:
                  type: string
                  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). 
                exemptCertificateId:
                  type: string
                  description: >
                    ID of the customer tax exemption certificate. Requires Zuora
                    Tax.
                exemptCertificateType:
                  type: string
                  description: >
                    Type of tax exemption certificate that the customer holds.
                    Requires Zuora Tax.
                exemptDescription:
                  type: string
                  description: >
                    Description of the tax exemption certificate that the
                    customer holds. Requires Zuora Tax.
                exemptEffectiveDate:
                  type: string
                  description: >
                    Date when the customer tax exemption starts. Requires Zuora
                    Tax.


                    Format: `yyyy-mm-dd`. Defaults to the current date.
                  format: date
                exemptEntityUseCode:
                  maxLength: 64
                  type: string
                  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.
                exemptExpirationDate:
                  type: string
                  description: >
                    Date when the customer tax exemption expires. Requires Zuora
                    Tax.


                    Format: `yyyy-mm-dd`. Defaults to the current date.
                  format: date
                exemptIssuingJurisdiction:
                  type: string
                  description: >
                    Jurisdiction in which the customer tax exemption certificate
                    was issued.
                exemptStatus:
                  type: string
                  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`.
              description: >
                Container for tax exempt information, used to establish the tax
                exempt status of a customer account.
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
    POSTAccountTypeBillToContact:
      title: Contact
      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.
      allOf:
        - required:
            - firstName
            - lastName
          type: object
          properties:
            address1:
              type: string
              description: |
                First address line, 255 characters or less.
            address2:
              type: string
              description: |
                Second address line, 255 characters or less.
            city:
              type: string
              description: |
                City, 40 characters or less.
            country:
              type: string
              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.
            county:
              type: string
              description: >
                County; 32 characters or less. May optionally be used by Zuora
                Tax to calculate county tax.
            fax:
              type: string
              description: |
                Fax phone number, 40 characters or less.
            firstName:
              type: string
              description: |
                First name, 100 characters or less.
            homePhone:
              type: string
              description: |
                Home phone number, 40 characters or less.
            lastName:
              type: string
              description: |
                Last name, 100 characters or less.
            mobilePhone:
              type: string
              description: |
                Mobile phone number, 40 characters or less.
            nickname:
              type: string
              description: |
                Nickname for this contact
            otherPhone:
              type: string
              description: |
                Other phone number, 40 characters or less.
            otherPhoneType:
              type: string
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
            personalEmail:
              type: string
              description: |
                Personal email address, 80 characters or less.
            state:
              type: string
              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.
            taxRegion:
              type: string
              description: >
                If using Zuora Tax, a region string as optionally defined in
                your tax rules. Not required.
            workEmail:
              type: string
              description: |
                Work email address, 80 characters or less.
            workPhone:
              type: string
              description: |
                Work phone number, 40 characters or less.
            zipCode:
              type: string
              description: |
                Zip code, 20 characters or less.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    POSTAccountTypeCreditCard:
      title: creditCard
      description: >
        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.
      allOf:
        - required:
            - cardHolderInfo
            - cardNumber
            - cardType
            - expirationMonth
            - expirationYear
          type: object
          properties:
            cardHolderInfo:
              required:
                - addressLine1
                - cardHolderName
                - city
                - country
                - state
                - zipCode
              type: object
              properties:
                addressLine1:
                  type: string
                  description: |
                    First address line, 255 characters or less.
                addressLine2:
                  type: string
                  description: |
                    Second address line, 255 characters or less.
                cardHolderName:
                  type: string
                  description: >
                    The card holder's full name as it appears on the card, e.g.,
                    "John J Smith", 50 characters or less.
                city:
                  type: string
                  description: |
                    City, 40 characters or less.
                country:
                  type: string
                  description: |
                    Country; must be a valid country name or abbreviation.
                email:
                  type: string
                  description: |
                    Card holder's email address, 80 characters or less.
                phone:
                  type: string
                  description: |
                    Phone number, 40 characters or less.
                state:
                  type: string
                  description: >
                    State; must be a valid state name or 2-character
                    abbreviation.
                zipCode:
                  type: string
                  description: |
                    Zip code, 20 characters or less.
              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.
            cardNumber:
              type: string
              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).
            cardType:
              type: string
              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).
            expirationMonth:
              type: string
              description: |
                Two-digit expiration month (01-12).
            expirationYear:
              type: string
              description: |
                Four-digit expiration year.
            securityCode:
              type: string
              description: >
                The CVV or CVV2 security code of the card. To ensure PCI
                compliance, this value is not stored and cannot be queried.
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
    POSTAccountTypePaymentMethod:
      title: paymentMethod
      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 container instead of the
        `creditCard` field.


        Note that you can not use this field together with `creditCard` or `hpmCreditCardPaymentMethodId` to create a payment method.
      allOf:
        - required:
            - type
          type: object
          properties:
            type:
              type: string
              description: >
                Type of payment method. The following types of the payment
                method are supported:             


                * `CreditCard` - Credit card payment method.

                * `ACH` - ACH payment method.
              enum:
                - CreditCard
                - ACH
        - $ref: "#/components/schemas/POSTAccountCreatePaymentMethodACH"
        - $ref: "#/components/schemas/POSTAccountCreatePaymentMethodCreditCard"
    POSTAccountTypeSoldToContact:
      title: Contact
      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.
      allOf:
        - required:
            - firstName
            - lastName
          type: object
          properties:
            address1:
              type: string
              description: |
                First address line, 255 characters or less.
            address2:
              type: string
              description: |
                Second address line, 255 characters or less.
            city:
              type: string
              description: |
                City, 40 characters or less.
            country:
              type: string
              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.
            county:
              type: string
              description: >
                County; 32 characters or less. May optionally be used by Zuora
                Tax to calculate county tax.
            fax:
              type: string
              description: |
                Fax phone number, 40 characters or less.
            firstName:
              type: string
              description: |
                First name, 100 characters or less.
            homePhone:
              type: string
              description: |
                Home phone number, 40 characters or less.
            lastName:
              type: string
              description: |
                Last name, 100 characters or less.
            mobilePhone:
              type: string
              description: |
                Mobile phone number, 40 characters or less.
            nickname:
              type: string
              description: |
                Nickname for this contact
            otherPhone:
              type: string
              description: |
                Other phone number, 40 characters or less.
            otherPhoneType:
              type: string
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
            personalEmail:
              type: string
              description: |
                Personal email address, 80 characters or less.
            state:
              type: string
              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.
            taxRegion:
              type: string
              description: >
                If using Zuora Tax, a region string as optionally defined in
                your tax rules. Not required.
            workEmail:
              type: string
              description: |
                Work email address, 80 characters or less.
            workPhone:
              type: string
              description: |
                Work phone number, 40 characters or less.
            zipCode:
              type: string
              description: |
                Zip code, 20 characters or less.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    POSTAccountTypeSubscription:
      title: subscription
      description: >
        Container for subscription information, used if creating a subscription
        for the new account at the time of account creation.
      allOf:
        - required:
            - contractEffectiveDate
            - termType
          type: object
          properties:
            autoRenew:
              type: boolean
              description: |
                If `true`, auto-renew is enabled. Default is `false`.
            contractEffectiveDate:
              type: string
              description: |
                Effective contract date for this subscription, as `yyyy-mm-dd`.
              format: date
            customerAcceptanceDate:
              type: string
              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
            initialTerm:
              type: integer
              description: >
                Duration of the initial subscription term in whole
                months.  Default is 0. 
              format: int64
            invoiceOwnerAccountKey:
              type: string
              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). 
            invoiceSeparately:
              type: boolean
              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`.
            notes:
              type: string
              description: ""
            renewalTerm:
              type: integer
              description: |
                Duration of the renewal term in whole months. Default is 0.
              format: int64
            serviceActivationDate:
              type: string
              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
            subscribeToRatePlans:
              type: array
              description: |
                Container for one or more rate plans for this subscription.
              items:
                $ref: "#/components/schemas/POSTSrpCreateType"
            subscriptionNumber:
              type: string
              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.
            termStartDate:
              type: string
              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
            termType:
              type: string
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    POSTAccountingCodeResponseType:
      type: object
      properties:
        id:
          type: string
          description: |
            ID of the newly created accounting code.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTAccountingCodeType:
      allOf:
        - required:
            - name
            - type
          type: object
          properties:
            glAccountName:
              type: string
              description: >
                Name of the account in your general ledger.


                Field only available if you have Zuora Finance enabled. Maximum of 255 characters.
            glAccountNumber:
              type: string
              description: >
                Account number in your general ledger.


                Field only available if you have Zuora Finance enabled. Maximum of 255 characters.
            name:
              type: string
              description: |
                Name of the accounting code.

                Accounting code name must be unique. Maximum of 100 characters.
            notes:
              type: string
              description: |
                Maximum of 2,000 characters.
            type:
              type: string
              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
        - $ref: "#/components/schemas/AccountingCodeObjectCustomFields"
    POSTAccountingPeriodResponseType:
      type: object
      properties:
        id:
          type: string
          description: |
            ID of the newly-created accounting period.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTAccountingPeriodType:
      allOf:
        - required:
            - endDate
            - fiscalYear
            - name
            - startDate
          type: object
          properties:
            endDate:
              type: string
              description: >
                The end date of the accounting period in yyyy-mm-dd format, for
                example, "2016-02-19".
              format: date
            fiscalYear:
              type: string
              description: >
                Fiscal year of the accounting period in yyyy format, for
                example, "2016".
            fiscal_quarter:
              type: integer
              description: ""
              format: int64
            name:
              type: string
              description: >
                Name of the accounting period.


                Accounting period name must be unique. Maximum of 100 characters.
            notes:
              type: string
              description: |
                Notes about the accounting period.

                Maximum of 255 characters.
            startDate:
              type: string
              description: >
                The start date of the accounting period in yyyy-mm-dd format,
                for example, "2016-02-19".
              format: date
        - $ref: "#/components/schemas/AccountingPeriodObjectCustomFields"
    POSTAttachmentResponseType:
      type: object
      properties:
        fileId:
          type: string
          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.
        id:
          type: string
          description: |
            Attachment id.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTAuthorizeResponse:
      type: object
      properties:
        gatewayOrderId:
          type: string
          description: The order ID for the gateway.
        resultCode:
          type: string
          description: The result code of the request. 0 indicates the call succeeded, and
            other values indicate the call failed.
        resultMessage:
          type: string
          description: The corresponding request ID.
        success:
          type: boolean
          description: Indicates whether the call succeeded.
        transactionId:
          type: string
          description: The ID of the transaction.
      example:
        gatewayOrderId: A001
        resultCode: 0
        resultMessage: "Request ID: 5231719060426316203012"
        success: true
        transactionId: "5231719060426316203012"
    POSTBillingDocumentFilesDeletionJobRequest:
      type: object
      properties:
        accountIds:
          type: array
          description: >
            Container for the IDs of the accounts that you want to create the
            billing document files deletion job for. 
          items:
            type: string
      example:
        accountIds:
          - 4028905558b483220158b48983dd0015
          - 6028905558b483220158b68983dd0016
    POSTBillingDocumentFilesDeletionJobResponse:
      type: object
      properties:
        id:
          type: string
          description: |
            The unique ID of the billing document file deletion job.
        status:
          type: string
          description: |
            The status of the billing document file deletion job.
          enum:
            - Pending
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    POSTBillingPreviewCreditMemoItem:
      title: creditMemoItems
      type: object
      properties:
        amount:
          type: number
          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
        amountWithoutTax:
          type: number
          description: |
            The credit memo item amount excluding tax.
          format: double
        appliedToItemId:
          type: string
          description: >
            The unique ID of the credit memo item that the discount charge is
            applied to.
        chargeDate:
          type: string
          description: |
            The date when the credit memo item is created.
          format: date-time
        chargeNumber:
          type: string
          description: |
            Number of the charge.
        chargeType:
          type: string
          description: |
            The type of charge. 

            Possible values are `OneTime`, `Recurring`, and `Usage`.
        comment:
          type: string
          description: |
            Comment of the credit memo item.
        id:
          type: string
          description: |
            Credit memo item id.
        processingType:
          type: string
          description: |
            Identifies the kind of charge. 

            Possible values:
            * charge
            * discount
            * prepayment
            * tax
        quantity:
          type: string
          description: >
            Quantity of this item, in the configured unit of measure for the
            charge.
          format: decimal
        ratePlanChargeId:
          type: string
          description: |
            Id of the rate plan charge associated with this item.
        serviceEndDate:
          type: string
          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
        serviceStartDate:
          type: string
          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
        sku:
          type: string
          description: |
            Unique SKU for the product associated with this item.
        skuName:
          type: string
          description: |
            Name of the unique SKU for the product associated with this item.
        subscriptionId:
          type: string
          description: |
            ID of the subscription associated with this item.
        subscriptionNumber:
          type: string
          description: |
            Name of the subscription associated with this item.
        unitOfMeasure:
          type: string
          description: |
            Unit used to measure consumption.
    POSTBillingPreviewInvoiceItem:
      title: invoiceItems
      type: object
      properties:
        appliedToItemId:
          type: string
          description: >
            The unique ID of the invoice item that the discount charge is
            applied to.
        chargeAmount:
          type: string
          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
        chargeDate:
          type: string
          description: |
            The date when the invoice item was created.
          format: date-time
        chargeDescription:
          type: string
          description: |
            Description of the charge.
        chargeId:
          type: string
          description: |
            Id of the charge.
        chargeName:
          type: string
          description: |
            Name of the charge.
        chargeNumber:
          type: string
          description: |
            Number of the charge.
        chargeType:
          type: string
          description: |
            The type of charge. 

            Possible values are `OneTime`, `Recurring`, and `Usage`.
        id:
          type: string
          description: |
            Invoice item ID.
        processingType:
          type: string
          description: |-
            Identifies the kind of charge. 

            Possible values:
            * charge
            * discount
            * prepayment
            * tax
        productName:
          type: string
          description: |
            Name of the product associated with this item.
        quantity:
          type: string
          description: >
            Quantity of this item, in the configured unit of measure for the
            charge.
          format: decimal
        serviceEndDate:
          type: string
          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
        serviceStartDate:
          type: string
          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
        subscriptionId:
          type: string
          description: |
            ID of the subscription associated with this item.
        subscriptionName:
          type: string
          description: |
            Name of the subscription associated with this item.
        subscriptionNumber:
          type: string
          description: |
            Number of the subscription associated with this item.
        taxAmount:
          type: string
          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
        unitOfMeasure:
          type: string
          description: |
            Unit used to measure consumption.
    POSTCatalogType:
      required:
        - toEntityIds
      type: object
      properties:
        toEntityIds:
          type: array
          description: |
            The entity that you want to share the product with.
          items:
            title: Entity IDs
            type: string
      example:
        targetEntityIds:
          - 8a80825555a3c7a10155b460f53858e6
    POSTDecryptResponseType:
      type: object
      properties:
        decryptedSignature:
          type: string
          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"
        publicKey:
          type: string
          description: |
            The public key passed in as a request parameter.
        signature:
          type: string
          description: |
            The signature passed in as a request parameter.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTDecryptionType:
      required:
        - method
        - publicKey
        - signature
      type: object
      properties:
        method:
          type: string
          description: |
            The type of the request. Set it to POST.
        publicKey:
          type: string
          description: |
            The public key generated by Zuora.
        signature:
          type: string
          description: |
            The signature generated by Zuora.
      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==
    POSTDelayAuthorizeCapture:
      required:
        - accountId
        - accountNumber
        - amount
        - gatewayOrderId
      type: object
      properties:
        accountId:
          type: string
          description: The ID of the customer account.
        accountNumber:
          type: string
          description: The number of the customer account.
        amount:
          type: number
          description: The amount of the trasaction.
        gatewayOrderId:
          type: string
          description: The order ID for the specific gateway.
        softDescriptor:
          type: string
          description: A text, rendered on a cardholder’s statement, describing a
            particular product or service purchased by the cardholder.
        softDescriptorPhone:
          type: string
          description: The phone number that relates to the soft descriptor, usually the
            phone number of customer service.
      example:
        accountId: 402881e861bd8a7e0161c6a453750026
        accountNumber: A00000004
        amount: 1.99
        gatewayOrderId: A001
        softDescriptor: Service fee
        softDescriptorPhone: 400-000-1234
    POSTDistributionItemType:
      title: revenueDistributions
      required:
        - accountingPeriodName
        - newAmount
      type: object
      properties:
        accountingPeriodName:
          type: string
          description: >
            Name of the accounting period. The open-ended accounting period is
            named `Open-Ended`. 


            The accounting period must be open.
        newAmount:
          type: string
          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
    POSTDocumentPropertiesType:
      type: object
      properties:
        customFileName:
          type: string
          description: >
            The custom file name to use to generate new Word or PDF files for
            the billing document.
        documentId:
          type: string
          description: >
            The unique ID of a billing document that you want to create document
            properties for.
        documentType:
          type: string
          description: |
            The type of the billing document. 
          enum:
            - Invoice
            - CreditMemo
            - DebitMemo
      example:
        customFileName: testCreditMemo
        documentId: 40288af1614cee0b01614cf2ec25000a
        documentType: CreditMemo
    POSTEmailBillingDocfromBillRunType:
      type: object
      properties:
        resend:
          type: boolean
          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.
          default: false
      example:
        resend: "true"
    POSTEntityConnectionsResponseType:
      type: object
      properties:
        id:
          type: string
          description: |
            The ID of the connection that you just initiated.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTEntityConnectionsType:
      required:
        - targetEntityId
      type: object
      properties:
        targetEntityId:
          maxLength: 32
          type: string
          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.
      example:
        targetEntityId: 8a80825556ff28a4015708ba29312ecc
    POSTHMACSignatureResponseType:
      type: object
      properties:
        signature:
          type: string
          description: |
            Contains a keyed-hash message authentication code (HMAC)
            e.g. `ZmI0ZjE2ZTMxMWY1YjA0ZTc4MTg1ZDhlYWRkMTEwNDE3M2RiMzNiNQ==<`
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        token:
          type: string
          description: |
            Contains a token code. e.g. `gCH6gYqQffQCsFKSLuxyagXsuXcIK0uf`
    POSTHMACSignatureType:
      required:
        - method
        - uri
      type: object
      properties:
        accountKey:
          type: string
          description: >
            Customer account number or ID.


            Specifies this field only when creating signatures for Create payment method.
        method:
          type: string
          description: |
            Possible values are: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'.
        name:
          type: string
          description: >
            Account name.


            Specifies this field only when creating signatures for Create account.
        pageId:
          type: string
          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.
        uri:
          type: string
          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"
      example:
        accountKey: A00000001
        method: POST
        uri: https://rest.zuora.com/v1/payment-methods/credit-cards
    POSTInvoiceCollectCreditMemosType:
      title: creditMemos
      type: object
      properties:
        id:
          type: string
          description: |
            The ID of the credit memo.
        memoAmount:
          type: string
          description: |
            The amount of the credit memo.
          format: decimal
        memoNumber:
          type: string
          description: |
            The unique identification number of the credit memo.
    POSTInvoiceCollectInvoicesType:
      title: invoices
      type: object
      properties:
        invoiceAmount:
          type: string
          description: |
            The amount of the invoice.
          format: decimal
        invoiceId:
          type: string
          description: |
            The ID of the invoice.
        invoiceNumber:
          type: string
          description: |
            The unique identification number of the invoice.
    POSTInvoiceCollectResponseType:
      type: object
      properties:
        amountCollected:
          type: string
          description: |
            Payment amount applied.
          format: decimal
        creditMemos:
          type: array
          description: >
            Information on one or more credit memos associated with this
            operation.
          items:
            $ref: "#/components/schemas/POSTInvoiceCollectCreditMemosType"
        invoices:
          type: array
          description: |
            Information on one or more invoices associated with this operation.
          items:
            $ref: "#/components/schemas/POSTInvoiceCollectInvoicesType"
        paymentId:
          type: string
          description: |
            Payment ID.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTInvoiceCollectType:
      required:
        - accountKey
      type: object
      properties:
        accountKey:
          type: string
          description: |
            Customer account ID or account number.
        documentDate:
          type: string
          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
        invoiceDate:
          type: string
          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
        invoiceId:
          type: string
          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)
        invoiceTargetDate:
          type: string
          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
        paymentGateway:
          type: string
          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.
        targetDate:
          type: string
          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
      example:
        accountKey: 4028925a4cb74ec9014cb7520fc00005
        invoiceId: 4028925a4cb74ec9014cb7540988002e
        paymentGateway: TestGateway
    POSTJournalEntryItemType:
      title: journalEntryItems
      allOf:
        - required:
            - accountingCodeName
            - amount
            - type
          type: object
          properties:
            accountingCodeName:
              type: string
              description: |
                Name of the accounting code.
            accountingCodeType:
              type: string
              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
            amount:
              type: string
              description: |
                Journal entry item amount in transaction currency.
              format: decimal
            homeCurrencyAmount:
              type: string
              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:
              type: string
              description: "Type of journal entry item. "
              enum:
                - Credit
                - Debit
        - $ref: "#/components/schemas/JournalEntryItemObjectCustomFields"
    POSTJournalEntryResponseType:
      type: object
      properties:
        journalEntryNumber:
          type: string
          description: |
            Journal entry number in the format JE-00000001.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTJournalEntrySegmentType:
      title: segments
      required:
        - segmentName
        - segmentValue
      type: object
      properties:
        segmentName:
          type: string
          description: |
            Name of segment.
        segmentValue:
          type: string
          description: |
            Value of segment in this summary journal entry.
    POSTJournalEntryType:
      allOf:
        - required:
            - accountingPeriodName
            - currency
            - journalEntryDate
            - journalEntryItems
          type: object
          properties:
            accountingPeriodName:
              type: string
              description: >
                Name of the accounting period. The open-ended accounting period
                is named `Open-Ended`.
            currency:
              type: string
              description: |
                The type of currency used. Currency must be active.
            journalEntryDate:
              type: string
              description: |
                Date of the journal entry.
              format: date
            journalEntryItems:
              type: array
              description: |
                Key name that represents the list of journal entry items.
              items:
                $ref: "#/components/schemas/POSTJournalEntryItemType"
            notes:
              type: string
              description: |
                The number associated with the revenue event.

                Character limit: 2,000
            segments:
              type: array
              description: |
                List of segments that apply to the summary journal entry.
              items:
                $ref: "#/components/schemas/POSTJournalEntrySegmentType"
            transferredToAccounting:
              type: string
              description: >
                Status shows whether the journal entry has been transferred to
                an accounting system.
              enum:
                - No
                - Processing
                - Yes
                - Error
                - Ignore
        - $ref: "#/components/schemas/JournalEntryObjectCustomFields"
    POSTJournalRunResponseType:
      type: object
      properties:
        journalRunNumber:
          type: string
          description: |
            Journal run number.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTJournalRunTransactionType:
      title: transactionTypes
      required:
        - type
      type: object
      properties:
        type:
          type: string
          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
    POSTJournalRunType:
      required:
        - journalEntryDate
        - transactionTypes
      type: object
      properties:
        accountingPeriodName:
          type: string
          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`.
        journalEntryDate:
          type: string
          description: |
            Date of the journal entry.
          format: date
        targetEndDate:
          type: string
          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
        targetStartDate:
          type: string
          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
        transactionTypes:
          type: array
          description: |
            Transaction types included in the journal run.

            You can include one or more transaction types.
          items:
            $ref: "#/components/schemas/POSTJournalRunTransactionType"
      example:
        accountingPeriodName: Nov-2014
        journalEntryDate: 2014-11-04
        transactionTypes:
          - type: Invoice Item
          - type: Revenue Event Item
    POSTMassUpdateResponseType:
      type: object
      properties:
        bulkKey:
          type: string
          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.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTMemoPdfResponse:
      type: object
      properties:
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTOrderPreviewRequestType:
      required:
        - orderDate
        - previewOptions
        - subscriptions
      type: object
      properties:
        customFields:
          $ref: "#/components/schemas/OrderObjectCustomFields"
        description:
          maxLength: 500
          type: string
          description: A description of the order.
        existingAccountNumber:
          maxLength: 70
          type: string
          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.
        orderDate:
          type: string
          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
        orderNumber:
          maxLength: 100
          type: string
          description: The order number of this order.
        previewAccountInfo:
          $ref: "#/components/schemas/PreviewAccountInfo"
        previewOptions:
          $ref: "#/components/schemas/PreviewOptions"
        subscriptions:
          type: array
          description: Each item includes a set of order actions, which will be applied to
            the same base subscription.
          items:
            type: object
            properties:
              customFields:
                $ref: "#/components/schemas/SubscriptionObjectCustomFields"
              orderActions:
                type: array
                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"
              subscriptionNumber:
                type: string
                description: >
                  Leave this field empty to represent new subscription creation,
                  or specify a subscription number to update an existing
                  subscription.
      example:
        customFields: {}
        description: This is a description for the Order.
        existingAccountNumber: A00000101
        orderDate: 2018-10-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
    POSTOrderRequestType:
      required:
        - orderDate
        - subscriptions
      type: object
      properties:
        customFields:
          $ref: "#/components/schemas/OrderObjectCustomFields"
        description:
          maxLength: 500
          type: string
          description: A description of the order.
        existingAccountNumber:
          maxLength: 70
          type: string
          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.
        newAccount:
          $ref: "#/components/schemas/Account"
        orderDate:
          type: string
          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
        orderNumber:
          maxLength: 100
          type: string
          description: The order number of the new order. If not provided, system will
            auto-generate a number for this order.
        processingOptions:
          $ref: "#/components/schemas/ProcessingOptions"
        subscriptions:
          type: array
          description: Each item includes a set of order actions, which will be applied to
            the same base subscription.
          items:
            type: object
            properties:
              customFields:
                $ref: "#/components/schemas/SubscriptionObjectCustomFields"
              orderActions:
                type: array
                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"
              subscriptionNumber:
                type: string
                description: >
                  Leave this empty to represent new subscription creation.
                  Specify a subscription number to update an existing
                  subscription.
      example:
        description: This is a description for the Order.
        existingAccountNumber: A00000001
        orderDate: 2017-01-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
    POSTPaymentMethodDecryption:
      required:
        - accountID
        - integrationType
        - merchantID
        - paymentToken
      type: object
      properties:
        accountID:
          type: string
          description: >-
            The ID of the customer account associated with this payment method.


            **Note:** You can create a payment method without assocating it with a customer account if you want. To do it and change the `accountID` field to optional in this operation, submit a request at [Zuora Global Support](http://support.zuora.com/).
        cardHolderInfo:
          type: object
          properties:
            addressLine1:
              type: string
              description: |
                First address line, 255 characters or less.
            addressLine2:
              type: string
              description: |
                Second address line, 255 characters or less.
            cardHolderName:
              type: string
              description: >
                The card holder's full name as it appears on the card, e.g.,
                "John J Smith", 50 characters or less.
            city:
              type: string
              description: |
                City, 40 characters or less.
            country:
              type: string
              description: |
                Country, must be a valid country name or abbreviation.
            email:
              type: string
              description: |
                Card holder's email address, 80 characters or less.
            phone:
              type: string
              description: |
                Phone number, 40 characters or less.
            state:
              type: string
              description: |
                State; must be a valid state name or 2-character abbreviation.
            zipCode:
              type: string
              description: |
                Zip code, 20 characters or less.
          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.

        integrationType:
          type: string
          description: |+
            Field to identify the token decryption type.

            **Note:** The only value at this time is `ApplePay`.

        invoiceID:
          type: string
          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.
        merchantID:
          type: string
          description: >
            The Merchant ID that was configured for use with Apple Pay in the
            Apple iOS Developer Center.
        paymentGateway:
          type: string
          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.
        paymentToken:
          type: object
          properties: {}
          description: >+
            The complete JSON Object representing the encrypted payment token
            payload returned in the response from the Apple Pay session.

        processPayment:
          type: boolean
          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.
      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
    POSTPaymentMethodRequest:
      allOf:
        - required:
            - type
          type: object
          properties:
            type:
              type: string
              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.
              enum:
                - PayPalEC
                - PayPalNativeEC
                - PayPalAdaptive
                - CreditCard
                - ACH
                - SEPA
                - Betalingsservice
                - Autogiro
                - Bacs
        - $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"
    POSTPaymentMethodResponse:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - type: object
          properties:
            id:
              type: string
              description: |
                Internal ID of the payment method that was created.
            reasons:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                    description: |
                      Error code.
                  message:
                    type: string
                    description: |
                      Error message.
                description: >
                  Error information. Only applicable if the payment method was
                  not created.
    POSTPaymentMethodResponseDecryption:
      type: object
      properties:
        amount:
          type: string
          description: |
            The payment amount contained within the encrypted token.
        paymentId:
          type: string
          description: |
            The ID of newly processed payment,
        paymentMethodId:
          type: string
          description: |
            ID of the newly-created payment method.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTPaymentMethodResponseType:
      type: object
      properties:
        paymentMethodId:
          type: string
          description: |
            ID of the newly-created payment method.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTPaymentMethodType:
      allOf:
        - required:
            - accountKey
            - creditCardNumber
            - creditCardType
            - expirationMonth
            - expirationYear
          type: object
          properties:
            accountKey:
              type: string
              description: >-
                ID of the customer account to update.


                **Note:** You can create a credit card payment method without assocating it with a customer account if you want. To do it and change the `accountKey` field to optional in this operation, submit a request at [Zuora Global Support](http://support.zuora.com/). 
            cardHolderInfo:
              $ref: "#/components/schemas/CreatePaymentMethodCardholderInfo"
            creditCardNumber:
              type: string
              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.
            creditCardType:
              type: string
              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).
            defaultPaymentMethod:
              type: boolean
              description: >
                Specify true to make this card the default payment method;
                otherwise, omit this parameter to keep the current default
                payment method.
            expirationMonth:
              type: string
              description: |
                One or two digits expiration month (1-12).
            expirationYear:
              type: string
              description: |
                Four-digit expiration year.
            mitConsentAgreementRef:
              maxLength: 128
              type: string
              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.
            mitConsentAgreementSrc:
              type: string
              description: |
                Required if you set the `mitProfileAction` field.
              enum:
                - External
            mitNetworkTransactionId:
              maxLength: 128
              type: string
              description: >
                Specifies the ID of a network transaction. Only applicable if
                you set the `mitProfileAction` field to `Persist`.
            mitProfileAction:
              type: string
              description: >
                If you set this field, Zuora creates a stored credential profile
                within the payment method.


                **Note:** This feature is in **Limited Availability**. 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
            mitProfileAgreedOn:
              type: string
              description: >
                The date on which the profile is agreed. Required if you set the
                `mitProfileAction` field. The date format is `yyyy-mm-dd`.  
              format: date
            mitProfileType:
              type: string
              description: |
                Required if you set the `mitProfileAction` field.
              enum:
                - Recurring
            numConsecutiveFailures:
              maximum: 100
              minimum: 0
              type: integer
              description: >
                The number of consecutive failed payments for this payment
                method. It is reset to `0` upon successful payment. 
              format: int32
            securityCode:
              type: string
              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.

        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
    POSTPaymentRunRequest:
      type: object
      properties:
        accountId:
          type: string
          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
        applyCreditBalance:
          type: boolean
          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.
        autoApplyCreditMemo:
          type: boolean
          description: >
            **Note:** The Invoice Settlement feature is in **Limited
            Availability**. This feature includes Unapplied Payments, Credit and
            Debit Memo, and Invoice Item Settlement. If you wish to have access
            to the feature, submit a request at [Zuora Global
            Support](http://support.zuora.com/).


            Whether to automatically apply a posted credit memo to one or more receivables in the payment run.
        autoApplyUnappliedPayment:
          type: boolean
          description: >
            **Note:** The Invoice Settlement feature is in **Limited
            Availability**. This feature includes Unapplied Payments, Credit and
            Debit Memo, and Invoice Item Settlement. If you wish to have access
            to the feature, submit a request at [Zuora Global
            Support](http://support.zuora.com/).


            Whether to automatically apply unapplied payments to  one or more receivables in the payment run.
        batch:
          type: string
          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. 
        billCycleDay:
          type: string
          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.
        billingRunId:
          type: string
          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
        collectPayment:
          type: boolean
          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.
        consolidatedPayment:
          type: boolean
          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.
        currency:
          type: string
          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.
        paymentGatewayId:
          type: string
          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
        processPaymentWithClosedPM:
          type: boolean
          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.
        runDate:
          type: string
          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
        targetDate:
          type: string
          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
      example:
        accountId: 402890245f097f39015f0e9fcdd60558
        autoApplyCreditMemo: "true"
        autoApplyUnappliedPayment: "true"
        consolidatedPayment: "true"
        processPaymentWithClosedPM: "true"
        targetDate: 2017-10-10
    POSTPublicEmailTemplateRequest:
      required:
        - emailBody
        - emailSubject
        - eventTypeName
        - fromEmailType
        - name
        - toEmailType
      type: object
      properties:
        active:
          type: boolean
          description: The status of the email template. The default value is true.
          default: true
        bccEmailAddress:
          type: string
          description: The email bcc address.
          format: email
        ccEmailAddress:
          type: string
          description: The email CC address.
        ccEmailType:
          type: string
          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.
          default: SpecificEmails
          enum:
            - BillToContact
            - SoldToContact
            - SpecificEmails
            - TenantAdmin
            - BillToAndSoldToContacts
            - RunOwner
            - AllContacts
            - InvoiceOwnerBillToContact
            - InvoiceOwnerSoldToContact
            - InvoiceOwnerBillToAndSoldToContacts
            - InvoiceOwnerAllContacts
        description:
          maxLength: 255
          type: string
          description: The description of the email template.
        emailBody:
          type: string
          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.
        emailSubject:
          type: string
          description: The email subject. Users can add merge fields in the email subject
            using angle brackets.
        encodingType:
          type: string
          description: The endcode type of the email body.
          default: UTF8
          enum:
            - UTF8
            - Shift_JIS
            - ISO_2022_JP
            - EUC_JP
            - X_SJIS_0213
        eventTypeName:
          minLength: 1
          type: string
          description: |
            The name of the event type. 
        eventTypeNamespace:
          type: string
          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.         
        fromEmailAddress:
          type: string
          description: If fromEmailType is SpecificEmail, this field is required.
        fromEmailType:
          type: string
          description: The type of the email.
          enum:
            - TenantEmail
            - SpecificEmail
        fromName:
          type: string
          description: The name of the email sender.
        isHtml:
          type: boolean
          description: Specifies whether the style of email body is HTML. The default
            value is false.
          default: false
        name:
          maxLength: 255
          type: string
          description: The name of the email template, a unique name in a tenant.
        replyToEmailAddress:
          type: string
          description: If replyToEmailType is SpecificEmail, this field is required.
        replyToEmailType:
          type: string
          description: Type of the replyTo email.
          enum:
            - TenantEmail
            - SpecificEmail
        toEmailAddress:
          type: string
          description: If toEmailType is SpecificEmail, this field is required.
        toEmailType:
          type: string
          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
      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
        fromEmailType: TenantEmail
        fromName: Example Co. Ltd.
        isHtml: true
        name: Account Edit Email
        replyToEmailType: TenantEmail
        toEmailType: BillToContact
    POSTPublicNotificationDefinitionRequest:
      required:
        - eventTypeName
        - name
      type: object
      properties:
        active:
          type: boolean
          description: The status of the notification definition. The default value is true.
          default: true
        callout:
          required:
            - calloutBaseurl
            - eventTypeName
            - httpMethod
            - name
            - requiredAuth
          type: object
          properties:
            active:
              type: boolean
              description: The status of the callout. The default is true.
              default: true
            calloutAuth:
              $ref: "#/components/schemas/CalloutAuth"
            calloutBaseurl:
              minLength: 10
              type: string
              description: The callout URL. It must start with 'https://'
              format: url
              example: https://***
            calloutParams:
              $ref: "#/components/schemas/CalloutMergeFields"
            calloutRetry:
              type: boolean
              description: Specified whether to retry the callout when the callout fails. The
                default is true.
              default: true
            description:
              maxLength: 255
              type: string
              description: Description for the callout.
            eventTypeName:
              minLength: 1
              type: string
              description: The name of the event type.
            httpMethod:
              type: string
              description: The HTTP method of the callout.
              example: POST
              enum:
                - GET
                - PUT
                - POST
                - DELETE
            name:
              maxLength: 255
              type: string
              description: The name of the created callout.
            requiredAuth:
              type: boolean
              description: Specifies whether the callout requires auth.
        calloutActive:
          type: boolean
          description: The status of the callout action. Default value is false.
          default: false
        communicationProfileId:
          type: string
          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'.
        description:
          maxLength: 255
          type: string
          description: The description of the notification definition.
        emailActive:
          type: boolean
          description: The status of the email action. The default value is false.
          default: false
        emailTemplateId:
          type: string
          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
        eventTypeName:
          minLength: 1
          type: string
          description: |
            The name of the event type. 
        eventTypeNamespace:
          type: string
          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 a notification definition on the `OrderActionProcessed` event, you must specify `com.zuora.notification` for this field.
        filterRule:
          required:
            - condition
            - parameters
          type: object
          properties:
            condition:
              type: string
              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
            description:
              maxLength: 255
              type: string
              description: The description of the filter rule.
            parameters:
              $ref: "#/components/schemas/FilterRuleParameterDefinitions"
          description: ""
        filterRuleParams:
          $ref: "#/components/schemas/FilterRuleParameterValues"
        name:
          maxLength: 255
          type: string
          description: The name of the notification definition, unique per communication
            profile.
      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
          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
              valueType: BIG_DECIMAL
        filterRuleParams:
          _EDITED_FROM: UI
          _VIP_ACCOUNT_BALANCE: "100000"
        name: Account Edit Notification
    POSTQuoteDocResponseType:
      type: object
      properties:
        file:
          type: string
          description: >
            URL of the generated quote document if the file was successfully
            generated.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTQuoteDocType:
      required:
        - documentType
        - quoteId
        - serverUrl
        - sessionId
        - templateId
      type: object
      properties:
        apiuser:
          type: string
          description: >
            If not using Salesforce locale, this API Zuora user will be used to
            retrieve the locale from Zuora.
        documentType:
          type: string
          description: |
            Type of the document to generate: `PDF` or `DOC`.
        locale:
          type: string
          description: |
            Salesforce locale value to use.
        password:
          type: string
          description: ""
        quoteId:
          type: string
          description: ｜ Id of the quote。
        sandbox:
          type: string
          description: ""
        serverUrl:
          type: string
          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}`
        sessionId:
          type: string
          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}*
        templateId:
          type: string
          description: |
            Id of the quote template in Zuora.
        token:
          type: string
          description: ""
        useSFDCLocale:
          type: string
          description: >
            If using Salesforce org locale, set this to a value that is not null.
        username:
          type: string
          description: ""
        zquotesMajorVersion:
          type: string
          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.
        zquotesMinorVersion:
          type: string
          description: >
            The minor version number of Zuora Quotes you are generating the
            quote document in.
      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"
    POSTRSASignatureResponseType:
      type: object
      properties:
        key:
          type: string
          description: |
            Public key generated for this Payment Page.
        signature:
          type: string
          description: |
            Digital signature generated for this Payment Page.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        tenantId:
          type: string
          description: |
            ID of the Zuora tenant.
        token:
          type: string
          description: |
            Token generated for this Payment Page.
    POSTRSASignatureType:
      required:
        - method
        - pageId
        - uri
      type: object
      properties:
        method:
          type: string
          description: |
            The type of the request. Set it to POST.
        pageId:
          type: string
          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.
        uri:
          type: string
          description: >-
            The URL that the Payment Page will be served from. Set it to:


            * https://www.zuora.com/apps/PublicHostedPageLite.do if you are on the production environment.

            * https://apisandbox.zuora.com/apps/PublicHostedPageLite.do if you are on the API Sandbox environment. 
      example:
        method: POST
        pageId: 2c92c0f855e2b4630155ec9e6a1b6eec
        uri: https://apisandbox.zuora.com/apps/PublicHostedPageLite.do
    POSTRejectPaymentRequest:
      type: object
      properties:
        gatewayResponse:
          type: string
          description: >
            The transaction response returned by the gateway for this
            transaction. If the transaction was declined, this reason is
            provided in the message.
        gatewayResponseCode:
          type: string
          description: >
            Response message Code returned by the gateway about the transaction
            status.
        referenceId:
          type: string
          description: >
            Unique Id generated by the gateway for each transaction. Use this ID
            to find the respective Zuora Payment ID. 
        secondReferenceId:
          type: string
          description: >
            The second reference Id. Some gateway uses two unique transaction
            IDs.
        settledOn:
          type: string
          description: >
            The date and time of the transaction settlement. The format is
            `yyyy-mm-dd hh:mm:ss`.
          format: date-time
      example:
        gatewayResponse: Insufficient funds
        gatewayResponseCode: "023"
        referenceId: "825522036728874689"
        secondReferenceId: "825522036690700110"
        settledOn: 2019-05-07 20:56:32.981
    POSTRejectPaymentResponse:
      type: object
      properties:
        accountId:
          type: string
          description: |
            The ID of the customer account that the payment is for.
        amount:
          type: number
          description: |
            The total amount of the payment.
          format: double
        cancelledOn:
          type: string
          description: >
            The date and time when the payment was cancelled, in `yyyy-mm-dd
            hh:mm:ss` format.
          format: date-time
        comment:
          type: string
          description: |
            Comments about the payment.
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the refund.
        createdDate:
          type: string
          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
        creditMemoId:
          type: string
          description: |
            The ID of the credit memo that is refunded.
        financeInformation:
          type: object
          properties:
            bankAccountAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: >
                The accounting code that maps to a bank account in your
                accounting system.
            bankAccountAccountingCodeType:
              type: string
              description: >+
                The type of the accounting code that maps to a bank account in
                your accounting system.
                  
            transferredToAccounting:
              type: string
              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
            unappliedPaymentAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: |
                The accounting code for the unapplied payment.
            unappliedPaymentAccountingCodeType:
              type: string
              description: |+
                The type of the accounting code for the unapplied payment.
                  
          description: |
            Container for the finance information related to the refund.
        gatewayId:
          type: string
          description: |
            The ID of the gateway instance that processes the payment.
        gatewayResponse:
          type: string
          description: >
            The message returned from the payment gateway for the payment. This
            message is gateway-dependent.
        gatewayResponseCode:
          type: string
          description: >
            The code returned from the payment gateway for the payment. This
            code is gateway-dependent.
        gatewayState:
          type: string
          description: |
            The status of the payment in the gateway; used for reconciliation.
          enum:
            - MarkedForSubmission
            - Submitted
            - Settled
            - NotSubmitted
            - FailedToSettle
        id:
          type: string
          description: |
            The ID of the payment chargeback.
        markedForSubmissionOn:
          type: string
          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
        methodType:
          type: string
          description: |
            How an external refund was issued to a customer. 
          enum:
            - ACH
            - Cash
            - Check
            - CreditCard
            - PayPal
            - WireTransfer
            - DebitCard
            - CreditCardReferenceTransaction
            - BankTransfer
            - Other
        number:
          type: string
          description: >
            The unique identification number of the payment. For example,
            P-00000001.
        paymentId:
          type: string
          description: |
            The ID of the payment that is refunded.
        paymentMethodId:
          type: string
          description: >
            The unique ID of the payment method that the customer used to make
            the payment.
        paymentMethodSnapshotId:
          type: string
          description: >
            The unique ID of the payment method snapshot which is a copy of the
            particular Payment Method used in a transaction.
        reasonCode:
          type: string
          description: |
            A code identifying the reason for the transaction.      
        referenceId:
          type: string
          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.
        refundDate:
          type: string
          description: >
            The date when the refund takes effect, in `yyyy-mm-dd` format. For
            example, 2017-03-01.       
          format: date
        refundTransactionTime:
          type: string
          description: >
            The date and time when the refund was issued, in `yyyy-mm-dd
            hh:mm:ss` format.
          format: date-time
        secondRefundReferenceId:
          type: string
          description: >
            The transaction ID returned by the payment gateway if there is an
            additional refund. 
        settledOn:
          type: string
          description: >
            The date and time when the transaction is settled, in `yyyy-mm-dd
            hh:mm:ss` format.
          format: date-time
        softDescriptor:
          type: string
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.
        softDescriptorPhone:
          type: string
          description: >
            A payment gateway-specific field that maps Zuora to other
            gateways.          
        status:
          type: string
          description: |
            The status of the payment.
        submittedOn:
          type: string
          description: >
            The date and time when the payment was submitted, in yyyy-mm-dd
            hh:mm:ss format.
          format: date-time
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        type:
          type: string
          description: |
            The type of the payment.
          enum:
            - External
            - Electronic
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the payment.
        updatedDate:
          type: string
          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
    POSTRevenueScheduleByChargeResponseType:
      type: object
      properties:
        revenueScheduleNumber:
          type: string
          description: >
            Revenue schedule number. The revenue schedule number is always
            prefixed with "RS", for example, "RS-00000001".
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTRevenueScheduleByChargeType:
      allOf:
        - required:
            - amount
            - revenueScheduleDate
          type: object
          properties:
            amount:
              type: string
              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
            deferredRevenueAccountingCode:
              type: string
              description: >
                The accounting code for deferred revenue, such as Monthly
                Recurring Liability. Required only when
                `overrideChargeAccountingCodes` is `true`. Otherwise, this value
                is ignored.
            deferredRevenueAccountingCodeType:
              type: string
              description: >
                The type of the deferred revenue accounting code, such as
                Deferred Revenue. Required only when
                `overrideChargeAccountingCodes` is `true`. Otherwise, this value
                is ignored.
            notes:
              type: string
              description: |
                Additional information about this record.

                Character Limit: 2,000
            overrideChargeAccountingCodes:
              type: boolean
              description: >
                When overriding accounting codes from a charge,
                `recognizedRevenueAccountingCode` and `deferredRevenue
                AccountingCode` must be in the request body and can have the
                empty value.
              default: false
            recognizedRevenueAccountingCode:
              type: string
              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.
            recognizedRevenueAccountingCodeType:
              type: string
              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.
            referenceId:
              type: string
              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: 60
            revenueDistributions:
              type: array
              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"
            revenueEvent:
              $ref: "#/components/schemas/POSTRevenueScheduleByChargeTypeRevenueEvent"
            revenueScheduleDate:
              type: string
              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
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
    POSTRevenueScheduleByChargeTypeRevenueEvent:
      title: RevenueEvent
      description: >
        Represents a change to a revenue schedule, such as posting an invoice or
        distributing revenue.
      allOf:
        - required:
            - eventType
            - eventTypeSystemId
          type: object
          properties:
            eventType:
              type: string
              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
            eventTypeSystemId:
              type: string
              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.
            notes:
              type: string
              description: |
                Additional information about this record.
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
    POSTRevenueScheduleByDateRangeType:
      allOf:
        - required:
            - recognitionEnd
            - recognitionStart
            - revenueEvent
          type: object
          properties:
            distributionType:
              type: string
              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)
            notes:
              type: string
              description: |
                Additional information about this record.
            recognitionEnd:
              type: string
              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
            recognitionStart:
              type: string
              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
            revenueEvent:
              $ref: "#/components/schemas/POSTRevenueScheduleByDateRangeTypeRevenueEvent"
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
    POSTRevenueScheduleByDateRangeTypeRevenueEvent:
      title: RevenueEvent
      description: |
        Must specify at least one of `eventType` or `eventTypeSystemId`.
      allOf:
        - type: object
          properties:
            eventType:
              type: string
              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
            eventTypeSystemId:
              type: string
              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.
            notes:
              type: string
              description: ""
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
    POSTRevenueScheduleByTransactionRatablyCMType:
      allOf:
        - required:
            - recognitionEnd
            - recognitionStart
          type: object
          properties:
            distributionType:
              type: string
              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.
            notes:
              maxLength: 2000
              minLength: 0
              type: string
              description: |
                Additional information about this record.
            recognitionEnd:
              type: string
              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
            recognitionStart:
              type: string
              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
            revenueEvent:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionRatablyTypeRevenueE\
                vent"
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
    POSTRevenueScheduleByTransactionRatablyDMType:
      allOf:
        - required:
            - recognitionEnd
            - recognitionStart
          type: object
          properties:
            distributionType:
              type: string
              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.
            notes:
              maxLength: 2000
              minLength: 0
              type: string
              description: |
                Additional information about this record.
            recognitionEnd:
              type: string
              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
            recognitionStart:
              type: string
              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
            revenueEvent:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionRatablyTypeRevenueE\
                vent"
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
    POSTRevenueScheduleByTransactionRatablyTypeRevenueEvent:
      title: RevenueEvent
      description: |
        Must specify at least one of `eventType` or `eventTypeSystemId`.
      allOf:
        - type: object
          properties:
            eventType:
              maxLength: 50
              minLength: 0
              type: string
              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.
            eventTypeSystemId:
              maxLength: 50
              minLength: 0
              type: string
              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.
            notes:
              maxLength: 2000
              minLength: 0
              type: string
              description: |
                Additional information about the revenue event.
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
    POSTRevenueScheduleByTransactionResponseType:
      type: object
      properties:
        revenueScheduleNumber:
          type: string
          description: >
            Revenue schedule number. The revenue schedule number is always
            prefixed with "RS", for example, "RS-00000001".
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    POSTRevenueScheduleByTransactionType:
      allOf:
        - type: object
          properties:
            notes:
              type: string
              description: |
                Additional information about this record.

                Character Limit: 2,000
            revenueDistributions:
              type: array
              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"
            revenueEvent:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionTypeRevenueEvent"
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
    POSTRevenueScheduleByTransactionTypeRevenueEvent:
      title: RevenueEvent
      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`.
      allOf:
        - type: object
          properties:
            eventType:
              type: string
              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
            eventTypeSystemId:
              type: string
              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.
            notes:
              type: string
              description: |
                Additional information about this record.
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
    POSTReversePaymentRequest:
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: >
            The amount that needs to be reversed (chargeback). It cannot be
            greater than the total Payment amount. 
        gatewayResponse:
          type: string
          description: >
            The transaction response returned by the gateway for this
            transaction. If the transaction was declined, this reason is
            provided in the message.
        gatewayResponseCode:
          type: string
          description: >
            Response message Code returned by the gateway about the transaction
            status.
        referenceId:
          type: string
          description: >
            Unique Id generated by the gateway for each transaction. Use this ID
            to find the respective Zuora Payment ID. 
        secondReferenceId:
          type: string
          description: >
            The second reference Id. Some gateways use two unique transaction
            IDs.
        settledOn:
          type: string
          description: >
            The date and time of the transaction settlement. The format is
            `yyyy-mm-dd hh:mm:ss`.
          format: date-time
      example:
        amount: 100
        gatewayResponse: Insufficient funds
        gatewayResponseCode: "023"
        referenceId: "825522036728874689"
        secondReferenceId: "825522036690700110"
        settledOn: 2019-05-07 20:56:32.981
    POSTReversePaymentResponse:
      type: object
      properties:
        accountId:
          type: string
          description: |
            The ID of the customer account that the payment is for.
        amount:
          type: number
          description: |
            The total amount of the payment.
          format: double
        cancelledOn:
          type: string
          description: >
            The date and time when the payment was cancelled, in `yyyy-mm-dd
            hh:mm:ss` format.
          format: date-time
        comment:
          type: string
          description: |
            Comments about the payment.
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the refund.
        createdDate:
          type: string
          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
        creditMemoId:
          type: string
          description: |
            The ID of the credit memo that is refunded.
        financeInformation:
          type: object
          properties:
            bankAccountAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: >
                The accounting code that maps to a bank account in your
                accounting system.
            bankAccountAccountingCodeType:
              type: string
              description: >+
                The type of the accounting code that maps to a bank account in
                your accounting system.
                  
            transferredToAccounting:
              type: string
              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
            unappliedPaymentAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: |
                The accounting code for the unapplied payment.
            unappliedPaymentAccountingCodeType:
              type: string
              description: |+
                The type of the accounting code for the unapplied payment.
                  
          description: |
            Container for the finance information related to the refund.
        gatewayId:
          type: string
          description: |
            The ID of the gateway instance that processes the payment.
        gatewayResponse:
          type: string
          description: >
            The message returned from the payment gateway for the payment. This
            message is gateway-dependent.
        gatewayResponseCode:
          type: string
          description: >
            The code returned from the payment gateway for the payment. This
            code is gateway-dependent.
        gatewayState:
          type: string
          description: |
            The status of the payment in the gateway; used for reconciliation.
          enum:
            - MarkedForSubmission
            - Submitted
            - Settled
            - NotSubmitted
            - FailedToSettle
        id:
          type: string
          description: |
            The ID of the payment chargeback.
        markedForSubmissionOn:
          type: string
          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
        methodType:
          type: string
          description: |
            How an external refund was issued to a customer. 
          enum:
            - ACH
            - Cash
            - Check
            - CreditCard
            - PayPal
            - WireTransfer
            - DebitCard
            - CreditCardReferenceTransaction
            - BankTransfer
            - Other
        number:
          type: string
          description: >
            The unique identification number of the payment. For example,
            P-00000001.
        paymentId:
          type: string
          description: |
            The ID of the payment that is refunded.
        paymentMethodId:
          type: string
          description: >
            The unique ID of the payment method that the customer used to make
            the payment.
        paymentMethodSnapshotId:
          type: string
          description: >
            The unique ID of the payment method snapshot which is a copy of the
            particular Payment Method used in a transaction.
        reasonCode:
          type: string
          description: |
            A code identifying the reason for the transaction.   
        referenceId:
          type: string
          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.
        refundDate:
          type: string
          description: >
            The date when the refund takes effect, in `yyyy-mm-dd` format. For
            example, 2017-03-01.
          format: date
        refundTransactionTime:
          type: string
          description: >
            The date and time when the refund was issued, in `yyyy-mm-dd
            hh:mm:ss` format.
          format: date-time
        secondRefundReferenceId:
          type: string
          description: >
            The transaction ID returned by the payment gateway if there is an
            additional refund. 
        settledOn:
          type: string
          description: >
            The date and time when the transaction is settled, in `yyyy-mm-dd
            hh:mm:ss` format.
          format: date-time
        softDescriptor:
          type: string
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.
        softDescriptorPhone:
          type: string
          description: >
            A payment gateway-specific field that maps Zuora to other
            gateways.          
        status:
          type: string
          description: |
            The status of the payment.
        submittedOn:
          type: string
          description: >
            The date and time when the payment was submitted, in yyyy-mm-dd
            hh:mm:ss format.
          format: date-time
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        type:
          type: string
          description: |
            The type of the payment.
          enum:
            - External
            - Electronic
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the payment.
        updatedDate:
          type: string
          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
    POSTScCreateType:
      title: chargeOverrides
      allOf:
        - required:
            - productRatePlanChargeId
          type: object
          properties:
            applyDiscountTo:
              type: string
              description: >
                Specifies the type of charges that you want a specific discount
                to apply to.


                Values:


                * `ONETIME`

                * `RECURRING`

                * `USAGE`

                * `ONETIMERECURRING`

                * `ONETIMEUSAGE`

                * `RECURRINGUSAGE`

                * `ONETIMERECURRINGUSAGE`
            billCycleDay:
              type: string
              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`
            billCycleType:
              type: string
              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`
            billingPeriod:
              type: string
              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`
            billingPeriodAlignment:
              type: string
              description: >
                Aligns charges within the same subscription if multiple charges
                begin on different dates.


                Values:


                * `AlignToCharge`

                * `AlignToSubscriptionStart`

                * `AlignToTermStart`
            billingTiming:
              type: string
              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`
            description:
              type: string
              description: |
                Description of the charge.
            discountAmount:
              type: number
              description: |
                Specifies the amount of fixed-amount discount.
            discountLevel:
              type: string
              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`
            discountPercentage:
              type: number
              description: |
                Percentage of discount for a percentage discount. 
            endDateCondition:
              type: string
              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`
            includedUnits:
              type: number
              description: >
                Specifies the number of units in the base set of units for this
                charge. Must be >=`0`.
            listPriceBase:
              type: string
              description: |
                The list price base for the product rate plan charge.

                Values:

                * `Per_Billing_Period`
                * `Per_Month`
                * `Per_Week`
            number:
              type: string
              description: >
                Unique number that identifies the charge. Max 50 characters.
                System-generated if not provided.
            numberOfPeriods:
              type: integer
              description: >
                Specifies the number of periods to use when calculating charges
                in an overage smoothing charge model.
              format: int64
            overagePrice:
              type: number
              description: |
                Price for units over the allowed amount.
            overageUnusedUnitsCreditOption:
              type: string
              description: >
                Determines whether to credit the customer with unused units of
                usage.


                Values:


                * `NoCredit`

                * `CreditBySpecificRate`
            price:
              type: number
              description: |
                Price for units in the subscription rate plan.
            priceChangeOption:
              type: string
              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`
            priceIncreasePercentage:
              type: number
              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`.
            productRatePlanChargeId:
              type: string
              description: |
                ID of a product rate-plan charge for this subscription.
            quantity:
              type: number
              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.
            ratingGroup:
              type: string
              description: >
                Specifies a rating group based on which usage records are rated.


                **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/).


                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`.
            specificBillingPeriod:
              type: integer
              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
            specificEndDate:
              type: string
              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
            tiers:
              type: array
              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"
            triggerDate:
              type: string
              description: >
                Specifies when to start billing the customer for the charge.
                Required if the `triggerEvent` field is set to `USD`.
              format: date
            triggerEvent:
              type: string
              description: |
                Specifies when to start billing the customer for the charge.

                Values:

                * `UCE`
                * `USA`
                * `UCA`
                * `USD`
            unusedUnitsCreditRates:
              type: number
              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`.
            upToPeriods:
              type: integer
              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
            upToPeriodsType:
              type: string
              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`. 
            weeklyBillCycleDay:
              type: string
              description: >
                Specifies which day of the week is the bill cycle day (BCD) for
                the charge. 


                Values:


                * `Sunday`

                * `Monday`

                * `Tuesday`

                * `Wednesday`

                * `Thursday`

                * `Friday`

                * `Saturday`
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
    POSTSequenceSetRequest:
      title: sequenceSets
      required:
        - creditMemo
        - debitMemo
        - invoice
        - name
      type: object
      properties:
        creditMemo:
          $ref: "#/components/schemas/CreditMemoEntityPrefix"
        debitMemo:
          $ref: "#/components/schemas/DebitMemoEntityPrefix"
        invoice:
          $ref: "#/components/schemas/InvoiceEntityPrefix"
        name:
          type: string
          description: >
            The name of the sequence set to configure for billing documents,
            payments, and refunds.
          example: FRANCE
        payment:
          $ref: "#/components/schemas/PaymentEntityPrefix"
        refund:
          $ref: "#/components/schemas/RefundEntityPrefix"
      description: ""
    POSTSequenceSetsRequest:
      type: object
      properties:
        sequenceSets:
          type: array
          description: >
            Array of sequence sets configured for billing documents, payments,
            and refunds.
          items:
            $ref: "#/components/schemas/POSTSequenceSetRequest"
      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
    POSTSequenceSetsResponse:
      type: object
      properties:
        sequenceSets:
          type: array
          description: >
            Array of sequence sets configured for billing documents, payments,
            and refunds.
          items:
            $ref: "#/components/schemas/GETSequenceSetResponse"
        success:
          type: boolean
          description: |
            Indicates whether the call succeeded.
          example: true
      description: ""
    POSTSettlePaymentRequest:
      type: object
      properties:
        settledOn:
          type: string
          description: >
            The date and time of the transaction settlement. The format is
            `yyyy-mm-dd hh:mm:ss`.
          format: date-time
      example:
        settledOn: 2019-05-07 20:56:32.981
    POSTSettlePaymentResponse:
      type: object
      properties:
        accountId:
          type: string
          description: |
            The ID of the customer account that the payment is for.
        amount:
          type: number
          description: |
            The total amount of the payment.
          format: double
        appliedAmount:
          type: number
          description: |
            The applied amount of the payment.
          format: double
        authTransactionId:
          type: string
          description: |
            The authorization transaction ID from the payment gateway.
        bankIdentificationNumber:
          type: string
          description: >
            The first six digits of the credit card or debit card used for the
            payment, when applicable.
        cancelledOn:
          type: string
          description: >
            The date and time when the payment was cancelled, in `yyyy-mm-dd
            hh:mm:ss` format.
          format: date-time
        comment:
          type: string
          description: |
            Comments about the payment.
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the refund.
        createdDate:
          type: string
          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
        creditBalanceAmount:
          type: number
          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
        currency:
          type: string
          description: |
            A currency defined in the web-based UI administrative settings.
        effectiveDate:
          type: string
          description: >
            The date and time when the payment takes effect, in `yyyy-mm-dd
            hh:mm:ss` format.
          format: date-time
        financeInformation:
          type: object
          properties:
            bankAccountAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: >
                The accounting code that maps to a bank account in your
                accounting system.
            bankAccountAccountingCodeType:
              type: string
              description: >+
                The type of the accounting code that maps to a bank account in
                your accounting system.
                  
            transferredToAccounting:
              type: string
              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
            unappliedPaymentAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: |
                The accounting code for the unapplied payment.
            unappliedPaymentAccountingCodeType:
              type: string
              description: |+
                The type of the accounting code for the unapplied payment.
                  
          description: |
            Container for the finance information related to the refund.
        gatewayId:
          type: string
          description: |
            The ID of the gateway instance that processes the payment.
        gatewayOrderId:
          type: string
          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.
        gatewayResponse:
          type: string
          description: >
            The message returned from the payment gateway for the payment. This
            message is gateway-dependent.
        gatewayResponseCode:
          type: string
          description: >
            The code returned from the payment gateway for the payment. This
            code is gateway-dependent.
        gatewayState:
          type: string
          description: |
            The status of the payment in the gateway; used for reconciliation.
          enum:
            - MarkedForSubmission
            - Submitted
            - Settled
            - NotSubmitted
            - FailedToSettle
        id:
          type: string
          description: |
            The ID of the payment chargeback.
        markedForSubmissionOn:
          type: string
          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
        number:
          type: string
          description: >
            The unique identification number of the payment. For example,
            P-00000001.
        paymentMethodId:
          type: string
          description: >
            The unique ID of the payment method that the customer used to make
            the payment.
        paymentMethodSnapshotId:
          type: string
          description: >
            The unique ID of the payment method snapshot which is a copy of the
            particular Payment Method used in a transaction.
        referenceId:
          type: string
          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.
        refundAmount:
          type: number
          description: |
            The amount of the payment that is refunded.
          format: double
        secondPaymentReferenceId:
          type: string
          description: >
            The transaction ID returned by the payment gateway if there is an
            additional transaction for the payment. 
        settledOn:
          type: string
          description: >
            The date and time when the transaction is settled, in `yyyy-mm-dd
            hh:mm:ss` format.
          format: date-time
        softDescriptor:
          type: string
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.
        softDescriptorPhone:
          type: string
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.
        status:
          type: string
          description: |
            The status of the payment.
        submittedOn:
          type: string
          description: >
            The date and time when the payment was submitted, in `yyyy-mm-dd
            hh:mm:ss` format.
          format: date-time
        success:
          type: boolean
          description: |
            Indicates if the request is processed successfully.
        type:
          type: string
          description: |
            The type of the payment.
          enum:
            - External
            - Electronic
        unappliedAmount:
          type: number
          description: |
            The unapplied amount of the payment.
          format: double
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the payment.
        updatedDate:
          type: string
          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
    POSTSrpCreateType:
      title: subscribeToRatePlans
      allOf:
        - required:
            - productRatePlanId
          type: object
          properties:
            chargeOverrides:
              type: array
              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"
            productRatePlanId:
              type: string
              description: |
                ID of a product rate plan for this subscription.
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
    POSTSubscriptionCancellationResponseType:
      type: object
      properties:
        cancelledDate:
          type: string
          description: |
            The date that the subscription was canceled.
          format: date
        creditMemoId:
          type: string
          description: >
            The credit memo ID, if a credit memo is generated during the
            subscription process.


            **Note:** This field is only available if you have the Invoice Settlements feature enabled.
        invoiceId:
          type: string
          description: |
            ID of the invoice, if one is generated.
        paidAmount:
          type: number
          description: |
            Amount paid.
        paymentId:
          type: string
          description: |
            ID of the payment, if a payment is collected.
        subscriptionId:
          type: string
          description: |
            The subscription ID.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        totalDeltaMrr:
          type: number
          description: >
            Change in the subscription monthly recurring revenue as a result of
            the update.
        totalDeltaTcv:
          type: number
          description: >
            Change in the total contracted value of the subscription as a result
            of the update.
    POSTSubscriptionCancellationType:
      required:
        - cancellationPolicy
        - invoiceCollect
      type: object
      properties:
        applyCreditBalance:
          type: boolean
          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.



            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.
        cancellationEffectiveDate:
          type: string
          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
        cancellationPolicy:
          type: string
          description: >
            Cancellation method. Possible values are: `EndOfCurrentTerm`,
            `EndOfLastInvoicePeriod`, `SpecificDate`. If using `SpecificDate`,
            the `cancellationEffectiveDate` field is required.
        collect:
          type: boolean
          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.
          default: false
        documentDate:
          type: string
          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
        invoice:
          type: boolean
          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. 
        invoiceCollect:
          type: boolean
          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`.
          default: false
        invoiceTargetDate:
          type: string
          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
        runBilling:
          type: boolean
          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.
          default: false
        targetDate:
          type: string
          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
      example:
        cancellationEffectiveDate: 2019-05-31
        cancellationPolicy: SpecificDate
        collect: false
        runBilling: true
    POSTSubscriptionPreviewCreditMemoItemsType:
      title: creditMemoItems
      type: object
      properties:
        amountWithoutTax:
          type: number
          description: |
            The credit memo item amount excluding tax.
          format: double
        chargeAmount:
          type: number
          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
        chargeDescription:
          type: string
          description: |
            Description of this credit memo item.
        chargeName:
          type: string
          description: |
            Name of this credit memo item.
        productName:
          type: string
          description: |
            Name of the product associated with this credit memo item.
        productRatePlanChargeId:
          type: string
          description: >
            ID of the product rate plan charge associated with this credit memo
            item.
        quantity:
          type: integer
          description: |
            Quantity of the charge associated with this credit memo item.
        serviceEndDate:
          type: string
          description: >
            End date of the service period for this credit memo item, as
            yyyy-mm-dd.
          format: date
        serviceStartDate:
          type: string
          description: |
            Service start date of this credit memo item, as yyyy-mm-dd.
          format: date
        taxAmount:
          type: number
          description: |
            The tax amount of the credit memo item.
          format: double
        unitOfMeasure:
          type: string
          description: Unit used to measure consumption.
    POSTSubscriptionPreviewInvoiceItemsType:
      title: invoiceItems
      type: object
      properties:
        chargeAmount:
          type: number
          description: >
            The amount of the charge. This amount doesn't include taxes unless
            the charge's tax mode is inclusive.
        chargeDescription:
          type: string
          description: |
            Description of the charge.
        chargeName:
          type: string
          description: |
            Name of the charge.
        productName:
          type: string
          description: |
            Name of the product associated with this item.
        productRatePlanChargeId:
          type: string
          description: |
            ID of the product rate plan charge.
        quantity:
          type: number
          description: |
            Quantity of this item.
        serviceEndDate:
          type: string
          description: >
            End date of the service period for this item, i.e., the last day of
            the period, as yyyy-mm-dd.
          format: date
        serviceStartDate:
          type: string
          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
        taxAmount:
          type: number
          description: |
            The tax amount of the invoice item.
          format: double
        unitOfMeasure:
          type: string
          description: ""
    POSTSubscriptionPreviewResponseType:
      type: object
      properties:
        amount:
          type: number
          description: |
            Invoice amount.
        amountWithoutTax:
          type: number
          description: |
            Invoice amount minus tax.
        chargeMetrics:
          type: object
          properties:
            dmrr:
              type: string
              description: |
                Change in monthly recurring revenue.
            dtcv:
              type: string
              description: |
                Change in total contract value.
            mrr:
              type: string
              description: |
                Monthly recurring revenue.
            number:
              type: string
              description: >
                The charge number of the subscription. Only available for update
                subscription.
            originRatePlanId:
              type: string
              description: |
                The origin rate plan ID. Only available for update subscription.
            originalId:
              type: string
              description: >
                The original rate plan charge ID. Only available for update
                subscription.
            productRatePlanChargeId:
              type: string
              description: |
                The product rate plan charge ID.
            productRatePlanId:
              type: string
              description: |
                The product rate plan ID.
            tcv:
              type: string
              description: |
                Total contract value.
          description: |
            Container for charge metrics.
        contractedMrr:
          type: number
          description: |
            Monthly recurring revenue of the subscription.
        creditMemo:
          type: object
          properties:
            amount:
              type: number
              description: Credit memo amount.
              format: double
            amountWithoutTax:
              type: number
              description: Credit memo amount minus tax.
              format: double
            creditMemoItems:
              type: array
              description: ""
              items:
                $ref: "#/components/schemas/POSTSubscriptionPreviewCreditMemoItemsType"
            taxAmount:
              type: number
              description: Tax amount on the credit memo.
              format: double
          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 the Invoice Settlement feature enabled. The Invoice Settlement 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/). 
        invoice:
          type: object
          properties: {}
          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
               
        invoiceItems:
          type: array
          description: |
            Container for invoice items.
          items:
            $ref: "#/components/schemas/POSTSubscriptionPreviewInvoiceItemsType"
        invoiceTargetDate:
          type: string
          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
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        targetDate:
          type: string
          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
        taxAmount:
          type: number
          description: |
            Tax amount on the invoice.
        totalContractedValue:
          type: number
          description: |
            Total contracted value of the subscription.
    POSTSubscriptionPreviewType:
      allOf:
        - required:
            - contractEffectiveDate
            - subscribeToRatePlans
            - termType
          type: object
          properties:
            accountKey:
              type: string
              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.
            contractEffectiveDate:
              type: string
              description: |
                Effective contract date for this subscription, as yyyy-mm-dd.
              format: date
            customerAcceptanceDate:
              type: string
              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
            includeExistingDraftDocItems:
              type: boolean
              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.
            includeExistingDraftInvoiceItems:
              type: boolean
              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.
            initialTerm:
              type: integer
              description: >
                Duration of the first term of the subscription, in whole months.
                Default is `0`. 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
            initialTermPeriodType:
              type: string
              description: |
                The period type of the initial term. 

                Supported values are:

                * `Month`
                * `Year`
                * `Day`
                * `Week`
            invoiceOwnerAccountKey:
              type: string
              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/).
            invoiceTargetDate:
              type: string
              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
            notes:
              type: string
              description: String of up to 500 characters.
            previewAccountInfo:
              $ref: "#/components/schemas/POSTSubscriptionPreviewTypePreviewAccountInfo"
            previewType:
              type: string
              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.
            serviceActivationDate:
              type: string
              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
            subscribeToRatePlans:
              type: array
              description: |
                Container for one or more rate plans for this subscription.
              items:
                $ref: "#/components/schemas/POSTSrpCreateType"
            targetDate:
              type: string
              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
            termStartDate:
              type: string
              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
            termType:
              type: string
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    POSTSubscriptionPreviewTypePreviewAccountInfo:
      title: previewAccountInfo
      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.
      allOf:
        - required:
            - billCycleDay
            - billToContact
            - currency
          type: object
          properties:
            billCycleDay:
              type: integer
              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
            billToContact:
              type: object
              properties:
                city:
                  type: string
                  description: >
                    The city of the bill-to address. The value should be 40
                    characters or less.
                country:
                  type: string
                  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.
                county:
                  type: string
                  description: >
                    The county of the bill-to address. The value should be 32
                    characters or less.
                state:
                  type: string
                  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`.
                taxRegion:
                  type: string
                  description: >
                    If using Zuora Tax, a region string as optionally defined in
                    your tax rules.
                zipCode:
                  type: string
                  description: >
                    The zip code of the bill-to address. The value should be 20
                    characters or less.
              description: |
                Container for bill-to contact information of this account.
            currency:
              type: string
              description: |
                A currency as defined in Billing Settings.
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
    POSTSubscriptionResponseType:
      type: object
      properties:
        contractedMrr:
          type: number
          description: |
            Monthly recurring revenue of the subscription.
        creditMemoId:
          type: string
          description: >
            The credit memo ID, if a credit memo is generated during the
            subscription process.


            **Note:** This field is only available if you have the Invoice Settlements feature enabled.
        invoiceId:
          type: string
          description: >
            Invoice ID, if an invoice is generated during the subscription
            process.
        paidAmount:
          type: number
          description: |
            Payment amount, if a payment is collected.
        paymentId:
          type: string
          description: |
            Payment ID, if a payment is collected.
        subscriptionId:
          type: string
          description: ""
        subscriptionNumber:
          type: string
          description: ""
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        totalContractedValue:
          type: number
          description: |
            Total contracted value of the subscription.
    POSTSubscriptionType:
      allOf:
        - required:
            - accountKey
            - contractEffectiveDate
            - renewalTerm
            - subscribeToRatePlans
            - termType
          type: object
          properties:
            accountKey:
              type: string
              description: |
                Customer account number or ID
            applyCreditBalance:
              type: boolean
              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.



                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.
            autoRenew:
              type: boolean
              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`.
              default: false
            collect:
              type: boolean
              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.
              default: true
            contractEffectiveDate:
              type: string
              description: |
                Effective contract date for this subscription, as yyyy-mm-dd
              format: date
            customerAcceptanceDate:
              type: string
              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
            documentDate:
              type: string
              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
            gatewayId:
              type: string
              description: >
                The ID of the payment gateway instance. For example,
                `2c92c0f86078c4d5016091674bcc3e92`.
            initialTerm:
              type: integer
              description: >
                The length of the period for the first subscription term.
                Default is `0`. 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
            initialTermPeriodType:
              type: string
              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`
            invoice:
              type: boolean
              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. 
            invoiceCollect:
              type: boolean
              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`.
              default: true
            invoiceOwnerAccountKey:
              type: string
              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/).
            invoiceSeparately:
              type: boolean
              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.
            invoiceTargetDate:
              type: string
              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
            notes:
              type: string
              description: |
                String of up to 500 characters.
            paymentMethodId:
              type: string
              description: |
                The ID of the payment method used for the payment.
            renewalSetting:
              type: string
              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`
            renewalTerm:
              type: integer
              description: >
                The length of the period for the subscription renewal term.
                Default is `0`.
              format: int64
            renewalTermPeriodType:
              type: string
              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`
            runBilling:
              type: boolean
              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.
              default: true
            serviceActivationDate:
              type: string
              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
            subscribeToRatePlans:
              type: array
              description: |
                Container for one or more rate plans for this subscription.
              items:
                $ref: "#/components/schemas/POSTSrpCreateType"
            subscriptionNumber:
              type: string
              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.
            targetDate:
              type: string
              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
            termStartDate:
              type: string
              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
            termType:
              type: string
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    POSTTaxationItemForCMType:
      title: taxationItems
      allOf:
        - required:
            - jurisdiction
            - name
            - taxAmount
            - taxRate
            - taxRateType
          type: object
          properties:
            exemptAmount:
              type: number
              description: >
                The amount of taxes or VAT for which the customer has an
                exemption.
              format: double
            financeInformation:
              type: object
              properties:
                onAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to an on account in your
                    accounting system.
                salesTaxPayableAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: |
                    The accounting code for the sales taxes payable.
              description: >
                Container for the finance information related to the taxation
                item.
            jurisdiction:
              type: string
              description: >
                The jurisdiction that applies the tax or VAT. This value is
                typically a state, province, county, or city.
            locationCode:
              type: string
              description: >
                The identifier for the location based on the value of the
                `taxCode` field.
            memoItemId:
              type: string
              description: |
                The ID of the credit memo that the taxation item is created for.
            name:
              type: string
              description: |
                The name of the taxation item.
            sourceTaxItemId:
              type: string
              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.
            taxAmount:
              type: number
              description: |
                The amount of the tax applied to the credit memo.
              format: double
            taxCode:
              type: string
              description: >
                The tax code identifies which tax rules and tax rates to apply
                to a specific credit memo.
            taxCodeDescription:
              type: string
              description: |
                The description of the tax code.
            taxDate:
              type: string
              description: |
                The date when the tax is applied to the credit memo.
              format: date
            taxRate:
              type: number
              description: |
                The tax rate applied to the credit memo.
              format: double
            taxRateDescription:
              type: string
              description: |
                The description of the tax rate.
            taxRateType:
              type: string
              description: |
                The type of the tax rate applied to the credit memo.
              enum:
                - Percentage
                - FlatFee
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    POSTTaxationItemForDMType:
      title: taxationItems
      allOf:
        - required:
            - jurisdiction
            - name
            - taxAmount
            - taxRate
            - taxRateType
          type: object
          properties:
            exemptAmount:
              type: number
              description: >
                The amount of taxes or VAT for which the customer has an
                exemption.
              format: double
            financeInformation:
              type: object
              properties:
                salesTaxPayableAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: |
                    The accounting code for the sales taxes payable.
              description: >
                Container for the finance information related to the taxation
                item.
            jurisdiction:
              type: string
              description: >
                The jurisdiction that applies the tax or VAT. This value is
                typically a state, province, county, or city.
            locationCode:
              type: string
              description: >
                The identifier for the location based on the value of the
                `taxCode` field.
            memoItemId:
              type: string
              description: |
                The ID of the debit memo that the taxation item is created for.
            name:
              type: string
              description: |
                The name of the taxation item.
            sourceTaxItemId:
              type: string
              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.
            taxAmount:
              type: number
              description: |
                The amount of the tax applied to the debit memo.
              format: double
            taxCode:
              type: string
              description: >
                The tax code identifies which tax rules and tax rates to apply
                to a specific debit memo.
            taxCodeDescription:
              type: string
              description: |
                The description of the tax code.
            taxDate:
              type: string
              description: |
                The date when the tax is applied to the debit memo.
              format: date
            taxRate:
              type: number
              description: |
                The tax rate applied to the debit memo.
              format: double
            taxRateDescription:
              type: string
              description: |
                The description of the tax rate.
            taxRateType:
              type: string
              description: |
                The type of the tax rate applied to the debit memo.
              enum:
                - Percentage
                - FlatFee
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    POSTTaxationItemListForCMType:
      type: object
      properties:
        taxationItems:
          type: array
          description: |
            Container for taxation items.
          items:
            $ref: "#/components/schemas/POSTTaxationItemForCMType"
      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
    POSTTaxationItemListForDMType:
      type: object
      properties:
        taxationItems:
          type: array
          description: |
            Container for taxation items.
          items:
            $ref: "#/components/schemas/POSTTaxationItemForDMType"
      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
    POSTTierType:
      title: tiers
      required:
        - price
        - tier
      type: object
      properties:
        endingUnit:
          type: number
          description: |
            End number of a range of units for the tier.
        price:
          type: number
          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.
        priceFormat:
          type: string
          description: |
            Indicates if pricing is a flat fee or is per unit.

            Values:

            * `FlatFee`
            * `PerUnit`
        startingUnit:
          type: number
          description: |
            Starting number of a range of units for the tier.
        tier:
          type: integer
          description: |
            Unique number that identifies the tier that the price applies to.
          format: int64
    POSTUploadFileResponse:
      type: object
      properties:
        fileId:
          type: string
          description: |
            The unique ID of the uploaded PDF file.
        success:
          type: boolean
          description: |
            Indicates whether the call succeeded.
    POSTUsageResponseType:
      type: object
      properties:
        checkImportStatus:
          type: string
          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.
        size:
          type: integer
          description: |
            The size of the uploaded file in bytes.
          format: int64
        success:
          type: boolean
          description: |
            Indicates whether the call succeeded.
    POSTVoidAuthorize:
      required:
        - gatewayOrderId
        - transactionId
      type: object
      properties:
        accountId:
          type: string
          description: The ID of the customer account. This field is generally required,
            but is optional if you are using the Ingenico ePayments gateway.
        accountNumber:
          type: string
          description: The number of the customer account. This field is generally
            required, but is optional if you are using the Ingenico ePayments
            gateway.
        gatewayOrderId:
          type: string
          description: The order ID for the specific gateway.
        paymentGatewayId:
          type: string
          description: The ID of the payment gateway instance. This field is required if
            you do not specify the `accountId` and `accountNumber` fields.
        transactionId:
          type: string
          description: The ID of the transaction.
      example:
        accountId: 402881e861bd8a7e0161c6a453750026
        accountNumber: A00000004
        gatewayOrderId: A001
        transactionId: "5205213224866613203009"
    POSTVoidAuthorizeResponse:
      type: object
      properties:
        gatewayOrderId:
          type: string
          description: The order ID for the gateway.
        resultCode:
          type: string
          description: The result code of the request. 0 indicates the call succeeded, and
            other values indicate the call failed.
        resultMessage:
          type: string
          description: The corresponding request ID.
        success:
          type: boolean
          description: Indicates whether the call succeeded.
        transactionId:
          type: string
          description: The ID of the transaction.
      example:
        gatewayOrderId: A001
        resultCode: 0
        resultMessage: "Request ID: 5231719060426316203012"
        success: true
        transactionId: "5231719060426316203012"
    PUTAcceptUserAccessResponseType:
      type: object
      properties:
        success:
          type: boolean
          description: |
            Returns `true` if the request is successful.
    PUTAccountType:
      allOf:
        - type: object
          properties:
            additionalEmailAddresses:
              type: array
              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
            autoPay:
              type: boolean
              description: >
                Whether future payments are to be automatically billed when they
                are due. 
            batch:
              type: string
              description: >
                The alias name given to a batch. A string of 50 characters or
                less.
            billToContact:
              $ref: "#/components/schemas/PUTAccountTypeBillToContact"
            communicationProfileId:
              type: string
              description: |
                The ID of a communication profile.
            creditMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
            crmId:
              type: string
              description: |
                CRM account ID for the account, up to 100 characters.
            debitMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
            invoiceDeliveryPrefsEmail:
              type: boolean
              description: |
                Whether the customer wants to receive invoices through email. 

                The default value is `false`.
            invoiceDeliveryPrefsPrint:
              type: boolean
              description: >
                Whether the customer wants to receive printed invoices, such as
                through postal mail.


                The default value is `false`.
            invoiceTemplateId:
              type: string
              description: >
                Invoice template ID, configured in Billing Settings in the Zuora
                UI.
            name:
              type: string
              description: |
                Account name, up to 255 characters.
            notes:
              type: string
              description: |
                A string of up to 65,535 characters.
            parentId:
              type: string
              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.
            paymentGateway:
              type: string
              description: >
                The name of the payment gateway instance. If null or left
                unassigned, the Account will use the Default Gateway.
            salesRep:
              type: string
              description: The name of the sales representative associated with this account,
                if applicable. Maximum of 50 characters.
            sequenceSetId:
              type: string
              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.
            soldToContact:
              $ref: "#/components/schemas/PUTAccountTypeSoldToContact"
            tagging:
              type: string
              description: ""
            taxInfo:
              type: object
              properties:
                VATId:
                  type: string
                  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).
                companyCode:
                  type: string
                  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). 
                exemptCertificateId:
                  type: string
                  description: >
                    ID of the customer tax exemption certificate. Requires Zuora
                    Tax.
                exemptCertificateType:
                  type: string
                  description: >
                    Type of tax exemption certificate that the customer holds.
                    Requires Zuora Tax.
                exemptDescription:
                  type: string
                  description: >
                    Description of the tax exemption certificate that the
                    customer holds. Requires Zuora Tax.
                exemptEffectiveDate:
                  type: string
                  description: >
                    Date when the customer tax exemption starts. Requires Zuora
                    Tax.


                    Format: `yyyy-mm-dd`. Defaults to the current date.
                  format: date
                exemptEntityUseCode:
                  maxLength: 64
                  type: string
                  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.
                exemptExpirationDate:
                  type: string
                  description: >
                    Date when the customer tax exemption expires. Requires Zuora
                    Tax.


                    Format: `yyyy-mm-dd`. Defaults to the current date.
                  format: date
                exemptIssuingJurisdiction:
                  type: string
                  description: >
                    Jurisdiction in which the customer tax exemption certificate
                    was issued.
                exemptStatus:
                  type: string
                  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`.
              description: >
                Container for tax exempt information, used to establish the tax
                exempt status of a customer account.
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
    PUTAccountTypeBillToContact:
      title: Contact
      description: |
        Container for bill-to contact information for this account.
      allOf:
        - required:
            - firstName
            - lastName
          type: object
          properties:
            address1:
              type: string
              description: |
                First address line, 255 characters or less.
            address2:
              type: string
              description: |
                Second address line, 255 characters or less.
            city:
              type: string
              description: |
                City, 40 characters or less.
            country:
              type: string
              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.
            county:
              type: string
              description: >
                County; 32 characters or less. May optionally be used by Zuora
                Tax to calculate county tax.
            fax:
              type: string
              description: |
                Fax phone number, 40 characters or less.
            firstName:
              type: string
              description: |
                First name, 100 characters or less.
            homePhone:
              type: string
              description: |
                Home phone number, 40 characters or less.
            lastName:
              type: string
              description: |
                Last name, 100 characters or less.
            mobilePhone:
              type: string
              description: |
                Mobile phone number, 40 characters or less.
            nickname:
              type: string
              description: |
                Nickname for this contact
            otherPhone:
              type: string
              description: |
                Other phone number, 40 characters or less.
            otherPhoneType:
              type: string
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
            personalEmail:
              type: string
              description: |
                Personal email address, 80 characters or less.
            state:
              type: string
              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.
            taxRegion:
              type: string
              description: >
                If using Zuora Tax, a region string as optionally defined in
                your tax rules. Not required.
            workEmail:
              type: string
              description: |
                Work email address, 80 characters or less.
            workPhone:
              type: string
              description: |
                Work phone number, 40 characters or less.
            zipCode:
              type: string
              description: |
                Zip code, 20 characters or less.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    PUTAccountTypeSoldToContact:
      title: Contact
      description: |
        Container for optional sold-to contact.
      allOf:
        - required:
            - firstName
            - lastName
          type: object
          properties:
            address1:
              type: string
              description: |
                First address line, 255 characters or less.
            address2:
              type: string
              description: |
                Second address line, 255 characters or less.
            city:
              type: string
              description: |
                City, 40 characters or less.
            country:
              type: string
              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.
            county:
              type: string
              description: >
                County; 32 characters or less. May optionally be used by Zuora
                Tax to calculate county tax.
            fax:
              type: string
              description: |
                Fax phone number, 40 characters or less.
            firstName:
              type: string
              description: |
                First name, 100 characters or less.
            homePhone:
              type: string
              description: |
                Home phone number, 40 characters or less.
            lastName:
              type: string
              description: |
                Last name, 100 characters or less.
            mobilePhone:
              type: string
              description: |
                Mobile phone number, 40 characters or less.
            nickname:
              type: string
              description: |
                Nickname for this contact
            otherPhone:
              type: string
              description: |
                Other phone number, 40 characters or less.
            otherPhoneType:
              type: string
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
            personalEmail:
              type: string
              description: |
                Personal email address, 80 characters or less.
            state:
              type: string
              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.
            taxRegion:
              type: string
              description: >
                If using Zuora Tax, a region string as optionally defined in
                your tax rules. Not required.
            workEmail:
              type: string
              description: |
                Work email address, 80 characters or less.
            workPhone:
              type: string
              description: |
                Work phone number, 40 characters or less.
            zipCode:
              type: string
              description: |
                Zip code, 20 characters or less.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    PUTAccountingCodeType:
      allOf:
        - type: object
          properties:
            glAccountName:
              type: string
              description: >
                Name of the account in your general ledger.


                Field only available if you have Zuora Finance enabled. Maximum of 255 characters.
            glAccountNumber:
              type: string
              description: >
                Account number in your general ledger.


                Field only available if you have Zuora Finance enabled. Maximum of 255 characters.
            name:
              type: string
              description: |
                Name of the accounting code.

                Accounting code name must be unique. Maximum of 100 characters.
            notes:
              type: string
              description: |
                Maximum of 2,000 characters.
            type:
              type: string
              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
        - $ref: "#/components/schemas/AccountingCodeObjectCustomFields"
    PUTAccountingPeriodType:
      allOf:
        - type: object
          properties:
            endDate:
              type: string
              description: >
                The end date of the accounting period in yyyy-mm-dd format, for
                example, "2016-02-19".
              format: date
            fiscalYear:
              type: string
              description: >
                Fiscal year of the accounting period in yyyy format, for
                example, "2016".
            fiscal_quarter:
              type: integer
              description: ""
              format: int64
            name:
              type: string
              description: >
                Name of the accounting period.


                Accounting period name must be unique. Maximum of 100 characters.
            notes:
              type: string
              description: |
                Notes about the accounting period.

                Maximum of 255 characters.
            startDate:
              type: string
              description: >
                The start date of the accounting period in yyyy-mm-dd format,
                for example, "2016-02-19".
              format: date
        - $ref: "#/components/schemas/AccountingPeriodObjectCustomFields"
    PUTAllocateManuallyType:
      allOf:
        - type: object
          properties:
            eventType:
              type: string
              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
            eventTypeSystemId:
              type: string
              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.
            notes:
              type: string
              description: |
                Additional information about this record.
            revenueDistributions:
              type: array
              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"
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
    PUTAttachmentType:
      type: object
      properties:
        description:
          type: string
          description: |
            Description of the attachment.
        fileName:
          type: string
          description: >
            File name of the attachment. The value should not contain the file
            extension. Only the file name without the extension can be edited.
      example:
        description: Updated image
        fileName: Image123.png
    PUTBatchDebitMemosRequest:
      type: object
      properties:
        debitMemos:
          type: array
          description: |
            Container for debit memo update details.
          items:
            $ref: "#/components/schemas/BatchDebitMemoType"
      example:
        debitMemos:
          - dueDate: 2017-12-28
            id: 402890d25f9f083f015f9f28041d0008
          - dueDate: 2017-12-20
            id: 402890555a87d7f5015a892f2ba10057
    PUTCreditMemoItemType:
      title: items
      allOf:
        - required:
            - id
          type: object
          properties:
            amount:
              type: number
              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
            comment:
              type: string
              description: |
                Comments about the credit memo item.
            financeInformation:
              type: object
              properties:
                deferredRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the deferred revenue, such as
                    Monthly Recurring Liability.
                onAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to an on account in your
                    accounting system.
                recognizedRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the recognized revenue, such as
                    Monthly Recurring Charges or Overage Charges.
                revenueRecognitionRuleName:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The name of the revenue recognition rule governing the
                    revenue schedule.
              description: >
                Container for the finance information related to the credit memo
                item.
            id:
              maxLength: 32
              minLength: 32
              type: string
              description: |
                The ID of the credit memo item.
            quantity:
              type: number
              description: |
                The number of units for the credit memo item.
              format: double
            serviceEndDate:
              type: string
              description: |
                The service end date of the credit memo item.
              format: date
            serviceStartDate:
              type: string
              description: |
                The service start date of the credit memo item.
              format: date
            skuName:
              type: string
              description: |
                The name of the SKU.
            taxItems:
              type: array
              description: |
                Container for credit memo taxation items.
              items:
                $ref: "#/components/schemas/PutCreditMemoTaxItemType"
            unitOfMeasure:
              type: string
              description: |
                The definable unit that you measure when determining charges.
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
    PUTCreditMemoType:
      allOf:
        - type: object
          properties:
            autoApplyUponPosting:
              type: boolean
              description: >
                Whether the credit memo automatically applies to the invoice
                upon posting.
            comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Comments about the credit memo.
            effectiveDate:
              type: string
              description: |
                The date when the credit memo takes effect.
              format: date
            excludeFromAutoApplyRules:
              type: boolean
              description: >
                Whether the credit memo is excluded from the rule of
                automatically applying credit memos to invoices.
            items:
              type: array
              description: |
                Container for credit memo items.
              items:
                $ref: "#/components/schemas/PUTCreditMemoItemType"
            reasonCode:
              type: string
              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.
            transferredToAccounting:
              type: string
              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
        - $ref: "#/components/schemas/CreditMemoObjectNSFields"
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
    PUTDebitMemoItemType:
      title: items
      allOf:
        - required:
            - id
          type: object
          properties:
            amount:
              type: number
              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
            comment:
              type: string
              description: |
                Comments about the debit memo item.
            financeInformation:
              type: object
              properties:
                deferredRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the deferred revenue, such as
                    Monthly Recurring Liability.
                recognizedRevenueAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code for the recognized revenue, such as
                    Monthly Recurring Charges or Overage Charges.
                revenueRecognitionRuleName:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The name of the revenue recognition rule governing the
                    revenue schedule.
              description: >
                Container for the finance information related to the debit memo
                item.
            id:
              maxLength: 32
              minLength: 32
              type: string
              description: |
                The ID of the debit memo item.
            quantity:
              type: number
              description: |
                The number of units for the debit memo item.
              format: double
            serviceEndDate:
              type: string
              description: |
                The service end date of the debit memo item.
              format: date
            serviceStartDate:
              type: string
              description: |
                The service start date of the debit memo item. 
              format: date
            skuName:
              type: string
              description: |
                The name of the SKU.
            taxItems:
              type: array
              description: |
                Container for debit memo taxation items.
              items:
                $ref: "#/components/schemas/PutDebitMemoTaxItemType"
            unitOfMeasure:
              type: string
              description: |
                The definable unit that you measure when determining charges.
        - $ref: "#/components/schemas/DebitMemoItemObjectCustomFields"
    PUTDebitMemoType:
      allOf:
        - type: object
          properties:
            autoPay:
              type: boolean
              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.
            comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Comments about the debit memo.
            dueDate:
              type: string
              description: >
                The date by which the payment for the debit memo is due, in
                `yyyy-mm-dd` format.
              format: date
            effectiveDate:
              type: string
              description: |
                The date when the debit memo takes effect.
              format: date
            items:
              type: array
              description: |
                Container for debit memo items.
              items:
                $ref: "#/components/schemas/PUTDebitMemoItemType"
            reasonCode:
              type: string
              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
            transferredToAccounting:
              type: string
              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
        - $ref: "#/components/schemas/DebitMemoObjectNSFields"
        - $ref: "#/components/schemas/DebitMemoObjectCustomFields"
    PUTDenyUserAccessResponseType:
      type: object
      properties:
        success:
          type: boolean
          description: |
            Returns `true` if the request is successful.
    PUTDocumentPropertiesType:
      type: object
      properties:
        customFileName:
          type: string
          description: >
            The custom file name to use to generate new Word or PDF files for
            the billing document.
      example:
        customFileName: exampleCreditMemo
    PUTEntityConnectionsAcceptResponseType:
      type: object
      properties:
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    PUTEntityConnectionsDenyResponseType:
      type: object
      properties:
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    PUTEntityConnectionsDisconnectResponseType:
      type: object
      properties:
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    PUTEventRIDetailType:
      required:
        - revenueItems
      type: object
      properties:
        revenueItems:
          type: array
          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"
      example:
        revenueItems:
          - accountingPeriodName: Oct'2014
          - accountingPeriodName: Nov'2014
    PUTJournalEntryItemType:
      title: journalEntryItems
      allOf:
        - required:
            - accountingCodeName
            - type
          type: object
          properties:
            accountingCodeName:
              type: string
              description: >
                Name of the accounting code.


                If the Journal Entry Item has a blank accounting code, enter the empty string.
            accountingCodeType:
              type: string
              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:
              type: string
              description: "Type of journal entry item. "
              enum:
                - Credit
                - Debit
        - $ref: "#/components/schemas/JournalEntryItemObjectCustomFields"
    PUTOrderActionTriggerDatesRequestType:
      type: object
      properties:
        subscriptions:
          type: array
          items:
            required:
              - subscriptionNumber
            type: object
            properties:
              orderActions:
                type: array
                items:
                  required:
                    - sequence
                  type: object
                  properties:
                    charges:
                      type: array
                      items:
                        type: object
                        properties:
                          chargeNumber:
                            type: string
                            description: Charge number of the charge which needs the triggering date to be
                              provided. The charge's `triggerEvent` must have
                              been set as `SpecificDate`.
                          specificTriggerDate:
                            type: string
                            description: Date in YYYY-MM-DD format. The specific trigger date you are to set
                              for the charge.
                            format: date
                    sequence:
                      type: integer
                      description: >
                        Identifies which order action will have its triggering
                        dates updated. 
                    triggerDates:
                      type: array
                      description: Container for the service activation and customer acceptance dates
                        of the order action.
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            description: Name of the trigger date of the order action.
                            enum:
                              - ServiceActivation
                              - CustomerAcceptance
                          triggerDate:
                            type: string
                            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
              subscriptionNumber:
                maxLength: 100
                type: string
                description: >
                  Subscription number of a subscription in the `Pending` order
                  for which you are to update the triggering dates. For example,
                  A-S00000001.
      example:
        subscriptions:
          - orderActions:
              - charges:
                  - chargeNumber: C-0000001
                    specificTriggerDate: 2016-09-01
                sequence: 0
                triggerDates:
                  - name: CustomerAcceptance
                    triggerDate: 2016-09-01
            subscriptionNumber: A-S00000009
    PUTOrderPatchRequestType:
      type: object
      properties:
        customFields:
          $ref: "#/components/schemas/OrderObjectCustomFields"
        subscriptions:
          type: array
          items:
            type: object
            properties:
              orderActions:
                type: array
                items:
                  type: object
                  properties:
                    customFields:
                      $ref: "#/components/schemas/OrderActionObjectCustomFields"
                    sequence:
                      type: integer
                      description: The sequence number of the order action in the order.
              subscriptionNumber:
                type: string
      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
    PUTOrderTriggerDatesResponseType:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - type: object
          properties:
            accountNumber:
              type: string
              description: The account number for the order.
            orderNumber:
              type: string
              description: The order number of the order updated.
            status:
              type: string
              description: Status of the order.
              enum:
                - Completed
                - Pending
            subscriptions:
              type: array
              description: The subscriptions updated.
              items:
                type: object
                properties:
                  status:
                    type: string
                    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
                  subscriptionNumber:
                    type: string
                    description: Subscription number of the subscription updated.
    PUTPaymentMethodResponseType:
      type: object
      properties:
        paymentMethodId:
          type: string
          description: |
            ID of the updated payment method.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    PUTPaymentMethodType:
      allOf:
        - type: object
          properties:
            addressLine1:
              type: string
              description: |
                First address line, 255 characters or less.
            addressLine2:
              type: string
              description: |
                Second address line, 255 characters or less.
            cardHolderName:
              type: string
              description: >
                The full name as it appears on the card, e.g., "John J Smith",
                50 characters or less.
            city:
              type: string
              description: |
                City, 40 characters or less.
            country:
              type: string
              description: |
                Country; must be a valid country name or abbreviation.
            defaultPaymentMethod:
              type: boolean
              description: >
                Specify "true" to make this card the default payment method;
                otherwise, omit this parameter to keep the current default
                payment method.
            email:
              type: string
              description: |
                Card holder's email address, 80 characters or less.
            expirationMonth:
              type: string
              description: |
                One or two digit(s) expiration month (1-12).
            expirationYear:
              type: string
              description: |
                Four-digit expiration year.
            numConsecutiveFailures:
              maximum: 100
              minimum: 0
              type: integer
              description: >
                The number of consecutive failed payments for this payment
                method. It is reset to `0` upon successful payment. 
              format: int32
            phone:
              type: string
              description: |
                Phone number, 40 characters or less.
            securityCode:
              type: string
              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.

            state:
              type: string
              description: |
                State; must be a valid state name or 2-character abbreviation.
            zipCode:
              type: string
              description: |
                Zip code, 20 characters or less.
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
    PUTPaymentRunRequest:
      type: object
      properties:
        accountId:
          type: string
          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
        applyCreditBalance:
          type: boolean
          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.
        autoApplyCreditMemo:
          type: boolean
          description: >
            **Note:** The Invoice Settlement feature is in **Limited
            Availability**. This feature includes Unapplied Payments, Credit and
            Debit Memo, and Invoice Item Settlement. If you wish to have access
            to the feature, submit a request at [Zuora Global
            Support](http://support.zuora.com/).


            Whether to automatically apply a posted credit memo to one or more receivables in the payment run.
        autoApplyUnappliedPayment:
          type: boolean
          description: >
            **Note:** The Invoice Settlement feature is in **Limited
            Availability**. This feature includes Unapplied Payments, Credit and
            Debit Memo, and Invoice Item Settlement. If you wish to have access
            to the feature, submit a request at [Zuora Global
            Support](http://support.zuora.com/).


            Whether to automatically apply unapplied payments to  one or more receivables in the payment run.
        batch:
          type: string
          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. 
        billCycleDay:
          type: string
          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.
        billingRunId:
          type: string
          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
        collectPayment:
          type: boolean
          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.
        consolidatedPayment:
          type: boolean
          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.
        currency:
          type: string
          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.
        paymentGatewayId:
          type: string
          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
        processPaymentWithClosedPM:
          type: boolean
          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.
        runDate:
          type: string
          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
        targetDate:
          type: string
          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
      example:
        autoApplyCreditMemo: "true"
        autoApplyUnappliedPayment: "true"
        consolidatedPayment: "true"
        processPaymentWithClosedPM: "true"
        targetDate: 2017-10-12
    PUTPublicCalloutOptionsRequest:
      type: object
      properties:
        confirmSucFromResContent:
          type: boolean
          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.
        intervalTime:
          minimum: 1
          type: integer
          description: The interval, in minutes, between callout retries.
          format: int32
        retryNumber:
          minimum: 1
          type: integer
          description: The number of retries when the callout fails.
          format: int32
      example:
        confirmSucFromResContent: false
        intervalTime: 30
        retryNumber: 3
    PUTPublicEmailTemplateRequest:
      type: object
      properties:
        active:
          type: boolean
          description: The status of the email template.
        bccEmailAddress:
          type: string
          description: Email bcc address.
          format: email
        ccEmailAddress:
          type: string
          description: Email cc address.
        ccEmailType:
          type: string
          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.
          default: SpecificEmails
          enum:
            - BillToContact
            - SoldToContact
            - SpecificEmails
            - TenantAdmin
            - BillToAndSoldToContacts
            - RunOwner
            - AllContacts
            - InvoiceOwnerBillToContact
            - InvoiceOwnerSoldToContact
            - InvoiceOwnerBillToAndSoldToContacts
            - InvoiceOwnerAllContacts
        description:
          maxLength: 255
          type: string
          description: The description of the email template.
        emailBody:
          type: string
          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.
        emailSubject:
          type: string
          description: The email subject. You can add merge fields in the email subject
            using angle brackets.
        encodingType:
          type: string
          description: The endcode type of the email body.
          enum:
            - UTF8
            - Shift_JIS
            - ISO_2022_JP
            - EUC_JP
            - X_SJIS_0213
        fromEmailAddress:
          type: string
          description: If fromEmailType is SpecificEmail, this field is required
        fromEmailType:
          type: string
          description: The type of fromEmail.
          enum:
            - TenantEmail
            - SpecificEmail
        fromName:
          type: string
          description: The name of email sender.
        isHtml:
          type: boolean
          description: Specifies whether the style of email body is HTML.
        name:
          maxLength: 255
          type: string
          description: The name of the email template.
        replyToEmailAddress:
          type: string
          description: If replyToEmailType is SpecificEmail, this field is required.
        replyToEmailType:
          type: string
          description: The type of the reply email.
          enum:
            - TenantEmail
            - SpecificEmail
        toEmailAddress:
          type: string
          description: If toEmailType is SpecificEmail, this field is required.
        toEmailType:
          type: string
          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
      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
        fromEmailType: TenantEmail
        fromName: Example Co. Ltd.
        isHtml: true
        name: Account Edit Email
        replyToEmailType: TenantEmail
        toEmailType: BillToContact
    PUTPublicNotificationDefinitionRequest:
      type: object
      properties:
        active:
          type: boolean
          description: The status of the notification definition. The default value is true.
          default: true
        callout:
          required:
            - calloutBaseurl
            - httpMethod
            - name
            - requiredAuth
          type: object
          properties:
            active:
              type: boolean
              description: The status of the callout. The default is true.
              default: true
            calloutAuth:
              $ref: "#/components/schemas/CalloutAuth"
            calloutBaseurl:
              minLength: 10
              type: string
              description: The callout URL. It must start with 'https://'
              format: url
              example: https://***
            calloutParams:
              $ref: "#/components/schemas/CalloutMergeFields"
            calloutRetry:
              type: boolean
              description: Specified whether to retry the callout when the callout fails. The
                default is true.
              default: true
            description:
              maxLength: 255
              type: string
              description: Description for the callout.
            httpMethod:
              type: string
              description: The HTTP method of the callout.
              example: POST
              enum:
                - GET
                - PUT
                - POST
                - DELETE
            name:
              maxLength: 255
              type: string
              description: The name of the created callout.
            requiredAuth:
              type: boolean
              description: Specifies whether the callout requires auth.
        calloutActive:
          type: boolean
          description: The status of the callout action. The default value is false.
          default: false
        communicationProfileId:
          type: string
          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
        description:
          maxLength: 255
          type: string
          description: The description of the notification definition.
        emailActive:
          type: boolean
          description: The status of the email action. The default is false.
          default: false
        emailTemplateId:
          type: string
          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
        filterRule:
          required:
            - condition
            - parameters
          type: object
          properties:
            condition:
              type: string
              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
            description:
              maxLength: 255
              type: string
              description: The description of the filter rule.
            parameters:
              $ref: "#/components/schemas/FilterRuleParameterDefinitions"
          description: ""
        filterRuleParams:
          $ref: "#/components/schemas/FilterRuleParameterValues"
        name:
          maxLength: 255
          type: string
          description: The name of the notification definition, which is unique in the
            profile.
      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
              valueType: BIG_DECIMAL
        filterRuleParams:
          _EDITED_FROM: UI
          _VIP_ACCOUNT_BALANCE: "100000"
        name: Account Edit Notification
    PUTRSBasicInfoType:
      allOf:
        - type: object
          properties:
            notes:
              type: string
              description: |
                Additional information about this record.
            referenceId:
              type: string
              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.
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
    PUTRSTermType:
      allOf:
        - required:
            - recognitionEnd
            - recognitionStart
          type: object
          properties:
            distributionType:
              type: string
              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)
            eventType:
              type: string
              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
            eventTypeSystemId:
              type: string
              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.
            notes:
              type: string
              description: |
                Additional information about this record.
            recognitionEnd:
              type: string
              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
            recognitionStart:
              type: string
              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
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
    PUTRefundType:
      allOf:
        - type: object
          properties:
            comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Comments about the refund.
            financeInformation:
              type: object
              properties:
                bankAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to a bank account in your
                    accounting system.
                transferredToAccounting:
                  type: string
                  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
                unappliedPaymentAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: |
                    The accounting code for the unapplied payment.
              description: |
                Container for the finance information related to the refund.
            reasonCode:
              type: string
              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.
            referenceId:
              maxLength: 60
              minLength: 0
              type: string
              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.
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    PUTRenewSubscriptionResponseType:
      type: object
      properties:
        creditMemoId:
          type: string
          description: >
            The credit memo ID, if a credit memo is generated during the
            subscription process.


            **Note:** This field is only available if you have the Invoice Settlements feature enabled.
        invoiceId:
          type: string
          description: |
            Invoice ID, if one is generated.
        paidAmount:
          type: number
          description: |
            Payment amount, if payment is collected.
        paymentId:
          type: string
          description: |
            Payment ID, if payment is collected.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        termEndDate:
          type: string
          description: |
            Date the new subscription term ends, as yyyy-mm-dd.
          format: date
        termStartDate:
          type: string
          description: |
            Date the new subscription term begins, as yyyy-mm-dd.
          format: date
        totalDeltaMrr:
          type: number
          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.
        totalDeltaTcv:
          type: number
          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.
    PUTRenewSubscriptionType:
      type: object
      properties:
        applyCreditBalance:
          type: boolean
          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.



            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.
        collect:
          type: boolean
          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.
          default: false
        documentDate:
          type: string
          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
        invoice:
          type: boolean
          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. 
        invoiceCollect:
          type: boolean
          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`.
          default: true
        invoiceTargetDate:
          type: string
          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
        runBilling:
          type: boolean
          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.
          default: false
        targetDate:
          type: string
          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
      example:
        collect: false
        runBilling: true
    PUTRevenueScheduleResponseType:
      type: object
      properties:
        revenueEventNumber:
          type: string
          description: |
            The revenue event number created when a revenue event occurs.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    PUTRevproAccCodeResponse:
      type: object
      properties:
        success:
          type: boolean
          description: ""
    PUTScAddType:
      title: chargeOverrides
      allOf:
        - required:
            - productRatePlanChargeId
          type: object
          properties:
            applyDiscountTo:
              type: string
              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
            billCycleDay:
              type: string
              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
            billCycleType:
              type: string
              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
            billingPeriod:
              type: string
              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
            billingPeriodAlignment:
              type: string
              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
            billingTiming:
              type: string
              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`
            description:
              type: string
              description: |
                Description of the charge.
            discountAmount:
              type: number
              description: >
                Specifies the amount of fixed-amount discount.


                Available for the following charge type for the Discount-Fixed Amount charge model:


                * Recurring
            discountLevel:
              type: string
              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
            discountPercentage:
              type: number
              description: >
                Specifies the percentage of a percentage discount. 


                Available for the following charge type for the Discount-Percentage charge model:


                * Recurring
            endDateCondition:
              type: string
              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`
            includedUnits:
              type: number
              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
            listPriceBase:
              type: string
              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
            number:
              type: string
              description: >
                Unique number that identifies the charge. System-generated if
                not provided.
            numberOfPeriods:
              type: integer
              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
            overagePrice:
              type: number
              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
            overageUnusedUnitsCreditOption:
              type: string
              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
            price:
              type: number
              description: >
                Price for units in the subscription rate plan.


                Supports all charge types for the Flat Fee and Per Unit charge models
            priceChangeOption:
              type: string
              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.
            priceIncreasePercentage:
              type: number
              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.
            productRatePlanChargeId:
              type: string
              description: ""
            quantity:
              type: number
              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
            ratingGroup:
              type: string
              description: >
                Specifies a rating group based on which usage records are rated.


                **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/).


                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`.
            specificBillingPeriod:
              type: integer
              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
            specificEndDate:
              type: string
              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
            tiers:
              type: array
              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"
            triggerDate:
              type: string
              description: >
                Specifies when to start billing the customer for the charge.
                Required if the `triggerEvent` field is set to `USD`.
              format: date
            triggerEvent:
              type: string
              description: |
                Specifies when to start billing the customer for the charge.

                Values:

                * `UCE`
                * `USA`
                * `UCA`
                * `USD`
            unusedUnitsCreditRates:
              type: number
              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
            upToPeriods:
              type: integer
              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
            upToPeriodsType:
              type: string
              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`. 
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
    PUTScUpdateType:
      title: chargeUpdateDetails
      allOf:
        - required:
            - ratePlanChargeId
          type: object
          properties:
            billingPeriodAlignment:
              type: string
              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
            description:
              type: string
              description: |
                Description of the charge.
            includedUnits:
              type: number
              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`
            overagePrice:
              type: number
              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
            price:
              type: number
              description: >
                Price for units in the subscription rate plan.


                Supports all charge types for the Flat Fee and Per Unit charge models
            priceChangeOption:
              type: string
              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.
            priceIncreasePercentage:
              type: number
              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.
            quantity:
              type: number
              description: |
                Quantity of units; must be greater than zero.
            ratePlanChargeId:
              type: string
              description: |
                ID of a rate-plan charge for this subscription.
            tiers:
              type: array
              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"
            triggerDate:
              type: string
              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
            triggerEvent:
              type: string
              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
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
    PUTScheduleRIDetailType:
      required:
        - revenueItems
      type: object
      properties:
        revenueItems:
          type: array
          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"
      example:
        revenueItems:
          - accountingPeriodName: Oct'2014
          - accountingPeriodName: Nov'2014
    PUTSendUserAccessRequestResponseType:
      type: object
      properties:
        success:
          type: boolean
          description: |
            Returns `true` if the request is successful.
    PUTSendUserAccessRequestType:
      required:
        - targetEntityIds
      type: object
      properties:
        targetEntityIds:
          type: array
          description: |
            The ID of the entities that the user wants to access.
          items:
            title: Entity IDs
            type: string
      example:
        targetEntityIds:
          - 8a80825555a3c7a10155b46120d058e7
          - 8a80825556ff28a4015708b93df82ba7
    PUTSequenceSetRequest:
      type: object
      properties:
        creditMemo:
          $ref: "#/components/schemas/CreditMemoEntityPrefix"
        debitMemo:
          $ref: "#/components/schemas/DebitMemoEntityPrefix"
        invoice:
          $ref: "#/components/schemas/InvoiceEntityPrefix"
        name:
          type: string
          description: >
            The name of the sequence set configured for billing documents,
            payments, and refunds.
        payment:
          $ref: "#/components/schemas/PaymentEntityPrefix"
        refund:
          $ref: "#/components/schemas/RefundEntityPrefix"
      description: ""
      example:
        creditMemo:
          prefix: FR-CM
        invoice:
          startNumber: 100
        name: FR
        payment:
          prefix: FR-P-
    PUTSequenceSetResponse:
      type: object
      properties:
        success:
          type: boolean
          description: |
            Indicates whether the call succeeded.
      description: ""
    PUTSpecificDateAllocationType:
      allOf:
        - required:
            - distributeOn
            - distributionType
          type: object
          properties:
            amount:
              type: string
              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
            distributeOn:
              type: string
              description: >
                The recognition date on which to distribute revenue for
                milestone-based recognition.


                Type: date in `yyyy-mm-dd` format.
              format: date
            distributionType:
              type: string
              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)
            eventType:
              type: string
              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
            eventTypeSystemId:
              type: string
              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.
            notes:
              type: string
              description: |
                Additional information about this record.
            percentage:
              type: string
              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
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
    PUTSrpAddType:
      title: add
      allOf:
        - required:
            - contractEffectiveDate
            - productRatePlanId
          type: object
          properties:
            chargeOverrides:
              type: array
              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"
            contractEffectiveDate:
              type: string
              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
            customerAcceptanceDate:
              type: string
              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
            productRatePlanId:
              type: string
              description: |
                ID of a product rate plan for this subscription
            serviceActivationDate:
              type: string
              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
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
    PUTSrpRemoveType:
      title: remove
      required:
        - contractEffectiveDate
        - ratePlanId
      type: object
      properties:
        contractEffectiveDate:
          type: string
          description: |
            Effective date of the new subscription, as yyyy-mm-dd.
          format: date
        customerAcceptanceDate:
          type: string
          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
        ratePlanId:
          type: string
          description: |
            ID of a rate plan for this subscription.
        serviceActivationDate:
          type: string
          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
    PUTSrpUpdateType:
      title: update
      allOf:
        - required:
            - contractEffectiveDate
            - ratePlanId
          type: object
          properties:
            chargeUpdateDetails:
              type: array
              description: |
                Container for one or more product rate plan charges. 
              items:
                $ref: "#/components/schemas/PUTScUpdateType"
            contractEffectiveDate:
              type: string
              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
            customerAcceptanceDate:
              type: string
              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
            ratePlanId:
              type: string
              description: |
                ID of a rate plan for this subscription.
            serviceActivationDate:
              type: string
              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
            specificUpdateDate:
              type: string
              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
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
    PUTSubscriptionPatchRequestType:
      type: object
      properties:
        customFields:
          $ref: "#/components/schemas/SubscriptionObjectCustomFields"
        ratePlans:
          type: array
          items:
            type: object
            properties:
              charges:
                type: array
                items:
                  type: object
                  properties:
                    chargeNumber:
                      type: string
                    customFields:
                      $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
              customFields:
                $ref: "#/components/schemas/RatePlanObjectCustomFields"
              ratePlanId:
                type: string
                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.
      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
    PUTSubscriptionPreviewInvoiceItemsType:
      title: invoiceItems
      type: object
      properties:
        chargeAmount:
          type: number
          description: >
            The amount of the charge. This amount doesn't include taxes unless
            the charge's tax mode is inclusive.
        chargeDescription:
          type: string
          description: |
            Description of the charge.
        chargeName:
          type: string
          description: |
            Name of the charge
        productName:
          type: string
          description: |
            Name of the product associated with this item.
        productRatePlanChargeId:
          type: string
          description: ""
        quantity:
          type: number
          description: |
            Quantity of this item.
        serviceEndDate:
          type: string
          description: >
            End date of the service period for this item, i.e., the last day of
            the period, as yyyy-mm-dd.
          format: date
        serviceStartDate:
          type: string
          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
        unitOfMeasure:
          type: string
          description: ""
    PUTSubscriptionResponseType:
      type: object
      properties:
        amount:
          type: number
          description: |
            Invoice amount. Preview mode only.
        amountWithoutTax:
          type: number
          description: |
            Invoice amount minus tax. Preview mode only.
        chargeMetrics:
          type: object
          properties:
            dmrr:
              type: string
              description: |
                Change in total contract value.
            dtcv:
              type: string
              description: |
                Change in monthly recurring revenue.
            mrr:
              type: string
              description: |
                Monthly recurring revenue.
            number:
              type: string
              description: >
                The charge number of the subscription. Only available for update
                subscription.
            originRatePlanId:
              type: string
              description: |
                The origin rate plan ID. Only available for update subscription.
            originalId:
              type: string
              description: >
                The original rate plan charge ID. Only available for update
                subscription.
            productRatePlanChargeId:
              type: string
              description: ""
            productRatePlanId:
              type: string
              description: ""
            tcv:
              type: string
              description: |
                Total contract value.
          description: |
            Container for charge metrics.
        creditMemo:
          type: object
          properties:
            amount:
              type: number
              description: Credit memo amount.
              format: double
            amountWithoutTax:
              type: number
              description: Credit memo amount minus tax.
              format: double
            creditMemoItems:
              type: array
              description: ""
              items:
                $ref: "#/components/schemas/POSTSubscriptionPreviewCreditMemoItemsType"
            taxAmount:
              type: number
              description: Tax amount on the credit memo.
              format: double
          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 the Invoice Settlement feature enabled. The Invoice Settlement 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/). 
        creditMemoId:
          type: string
          description: >
            The credit memo ID, if a credit memo is generated during the
            subscription process.


            **Note:** This field is only available if you have the Invoice Settlements feature enabled.
        invoice:
          type: object
          properties: {}
          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
        invoiceId:
          type: string
          description: |
            Invoice ID, if an invoice is generated during the update.
        invoiceItems:
          type: array
          description: |
            Container for invoice items.
          items:
            $ref: "#/components/schemas/PUTSubscriptionPreviewInvoiceItemsType"
        invoiceTargetDate:
          type: string
          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
        paidAmount:
          type: number
          description: |
            Payment amount, if a payment is collected
        paymentId:
          type: string
          description: |
            Payment ID, if a payment is collected.
        subscriptionId:
          type: string
          description: |
            The ID of the resulting new subscription.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        targetDate:
          type: string
          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
        taxAmount:
          type: number
          description: |
            Tax amount on the invoice.
        totalDeltaMrr:
          type: number
          description: >
            Change in the subscription monthly recurring revenue as a result of
            the update.
        totalDeltaTcv:
          type: number
          description: >
            Change in the total contracted value of the subscription as a result
            of the update.
    PUTSubscriptionResumeResponseType:
      type: object
      properties:
        creditMemoId:
          type: string
          description: >
            The credit memo ID, if a credit memo is generated during the
            subscription process.


            **Note:** This field is only available if you have the Invoice Settlements feature enabled.
        invoiceId:
          type: string
          description: >
            Invoice ID, if an invoice is generated during the subscription
            process.
        paidAmount:
          type: number
          description: |
            Payment amount, if a payment is collected.
        paymentId:
          type: string
          description: |
            Payment ID, if a payment is collected.
        resumeDate:
          type: string
          description: |
            The date when subscription resumption takes effect, as yyyy-mm-dd.
          format: date
        subscriptionId:
          type: string
          description: |
            The subscription ID.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        termEndDate:
          type: string
          description: |
            The date when the new subscription term ends, as yyyy-mm-dd.
          format: date
        totalDeltaTcv:
          type: number
          description: >
            Change in the total contracted value of the subscription as a result
            of the update.
    PUTSubscriptionResumeType:
      required:
        - resumePolicy
      type: object
      properties:
        applyCreditBalance:
          type: boolean
          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.



            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.
        collect:
          type: boolean
          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.
          default: false
        contractEffectiveDate:
          type: string
          description: >
            The date when the customer notifies you that they want to resume
            their subscription.
          format: date
        documentDate:
          type: string
          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
        extendsTerm:
          type: boolean
          description: >
            Whether to extend the subscription term by the length of time the
            suspension is in effect.


            Values: `true`, `false`.
        invoice:
          type: boolean
          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. 
        invoiceCollect:
          type: boolean
          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`.
          default: false
        invoiceTargetDate:
          type: string
          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
        resumePeriods:
          type: string
          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`.
        resumePeriodsType:
          type: string
          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`.
        resumePolicy:
          type: string
          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.
        resumeSpecificDate:
          type: string
          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
        runBilling:
          type: boolean
          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.
          default: false
        targetDate:
          type: string
          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
      example:
        collect: false
        contractEffectiveDate: 2019-02-01
        extendsTerm: true
        resumePolicy: SpecificDate
        resumeSpecificDate: 2019-10-01
        runBilling: true
    PUTSubscriptionSuspendResponseType:
      type: object
      properties:
        creditMemoId:
          type: string
          description: >
            The credit memo ID, if a credit memo is generated during the
            subscription process.


            **Note:** This field is only available if you have the Invoice Settlements feature enabled.
        invoiceId:
          type: string
          description: >
            Invoice ID, if an invoice is generated during the subscription
            process.
        paidAmount:
          type: number
          description: |
            Payment amount, if a payment is collected.
        paymentId:
          type: string
          description: |
            Payment ID, if a payment is collected.
        resumeDate:
          type: string
          description: >
            The date when subscription resumption takes effect, in the format
            yyyy-mm-dd.
          format: date
        subscriptionId:
          type: string
          description: |
            The subscription ID.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
        suspendDate:
          type: string
          description: >
            The date when subscription suspension takes effect, in the format
            yyyy-mm-dd.
          format: date
        termEndDate:
          type: string
          description: >
            The date when the new subscription term ends, in the format
            yyyy-mm-dd.
          format: date
        totalDeltaTcv:
          type: number
          description: >
            Change in the total contracted value of the subscription as a result
            of the update.
    PUTSubscriptionSuspendType:
      required:
        - suspendPolicy
      type: object
      properties:
        applyCreditBalance:
          type: boolean
          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.



            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.
        collect:
          type: boolean
          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.
          default: false
        contractEffectiveDate:
          type: string
          description: >
            The date when the customer notifies you that they want to amend
            their subscription.
          format: date
        documentDate:
          type: string
          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
        extendsTerm:
          type: boolean
          description: >
            Whether to extend the subscription term by the length of time the
            suspension is in effect. Values: `true`, `false`.
        invoice:
          type: boolean
          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. 
        invoiceCollect:
          type: boolean
          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`.
        invoiceTargetDate:
          type: string
          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
        resume:
          type: boolean
          description: >
            Whether to set when to resume a subscription when creating a suspend
            amendment. Values: `true`, `false`.
        resumePeriods:
          type: string
          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`.
        resumePeriodsType:
          type: string
          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`.
        resumePolicy:
          type: string
          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.
        resumeSpecificDate:
          type: string
          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
        runBilling:
          type: boolean
          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.
          default: false
        suspendPeriods:
          type: string
          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.
        suspendPeriodsType:
          type: string
          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.
        suspendPolicy:
          type: string
          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.
        suspendSpecificDate:
          type: string
          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
        targetDate:
          type: string
          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
      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
    PUTSubscriptionType:
      allOf:
        - type: object
          properties:
            add:
              type: array
              description: |
                Container for adding one or more rate plans.
              items:
                $ref: "#/components/schemas/PUTSrpAddType"
            applyCreditBalance:
              type: boolean
              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.



                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.
            autoRenew:
              type: boolean
              description: >
                If `true`, this subscription automatically renews at the end of
                the subscription term. Default is `false`.
            collect:
              type: boolean
              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.
              default: false
            currentTerm:
              type: integer
              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. Default is `0`.
              format: int64
            currentTermPeriodType:
              type: string
              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`
            documentDate:
              type: string
              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
            includeExistingDraftDocItems:
              type: boolean
              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.
            includeExistingDraftInvoiceItems:
              type: boolean
              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.
            invoice:
              type: boolean
              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. 
            invoiceCollect:
              type: boolean
              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`.
              default: false
            invoiceSeparately:
              type: boolean
              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.
            invoiceTargetDate:
              type: string
              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
            notes:
              type: string
              description: |
                String of up to 500 characters.
            preview:
              type: boolean
              description: >
                If `true` the update is made in preview mode. The default
                setting is `false`.
            previewType:
              type: string
              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.
            remove:
              type: array
              description: |
                Container for removing one or more rate plans.
              items:
                $ref: "#/components/schemas/PUTSrpRemoveType"
            renewalSetting:
              type: string
              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`
            renewalTerm:
              type: integer
              description: >
                The length of the period for the subscription renewal term.
                Default is `0`.
              format: int64
            renewalTermPeriodType:
              type: string
              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`
            runBilling:
              type: boolean
              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.
              default: false
            targetDate:
              type: string
              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
            termStartDate:
              type: string
              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
            termType:
              type: string
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
            update:
              type: array
              description: |
                Container for updating one or more rate plans.
              items:
                $ref: "#/components/schemas/PUTSrpUpdateType"
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    PUTTaxationItemType:
      allOf:
        - required:
            - jurisdiction
            - name
            - taxAmount
            - taxRate
            - taxRateType
          type: object
          properties:
            exemptAmount:
              type: number
              description: >
                The amount of taxes or VAT for which the customer has an
                exemption.
              format: double
            financeInformation:
              type: object
              properties:
                onAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to an on account in your
                    accounting system.
                salesTaxPayableAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: |
                    The accounting code for the sales taxes payable.
              description: >
                Container for the finance information related to the taxation
                item.
            jurisdiction:
              type: string
              description: >
                The jurisdiction that applies the tax or VAT. This value is
                typically a state, province, county, or city.
            locationCode:
              type: string
              description: >
                The identifier for the location based on the value of the
                `taxCode` field. 
            name:
              type: string
              description: |
                The name of the taxation item to be updated.
            taxAmount:
              type: number
              description: |
                The amount of the tax applied to the credit or debit memo.
              format: double
            taxCode:
              type: string
              description: >
                The tax code identifies which tax rules and tax rates to apply
                to a specific credit or debit memo.
            taxCodeDescription:
              type: string
              description: |
                The description of the tax code.
            taxDate:
              type: string
              description: |
                The date when the tax is applied to the credit or debit memo.
              format: date
            taxRate:
              type: number
              description: |
                The tax rate applied to the credit or debit memo.
              format: double
            taxRateDescription:
              type: string
              description: |
                The description of the tax rate. 
            taxRateType:
              type: string
              description: |
                The type of the tax rate applied to the credit or debit memo.
              enum:
                - Percentage
                - FlatFee
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    PUTVerifyPaymentMethodResponseType:
      type: object
      properties:
        paymentMethodId:
          type: string
          description: |
            The ID of the verified payment method.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    PUTVerifyPaymentMethodType:
      type: object
      properties:
        gatewayOptions:
          type: object
          properties:
            key:
              type: string
              description: |
                The name of a gateway-specific parameter.
            value:
              type: string
              description: |
                The value of the gateway-specific parameter.
          description: >
            The field used to pass gateway-specific parameters and parameter
            values.
        paymentGatewayName:
          type: string
          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.
        securityCode:
          type: string
          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.
      example:
        gatewayOptions:
          Comments: test
          IPAddress: 192.168.1.1
        paymentGatewayName: Adyen
        securityCode: "737"
    PUTWriteOffInvoiceRequest:
      allOf:
        - type: object
          properties:
            comment:
              maxLength: 255
              minLength: 0
              type: string
              description: >
                Comments about the write-off. The comment is used as the comment
                of the credit memo generated by writing off the specified
                invoice.
            items:
              type: array
              description: |
                Container for items.
              items:
                $ref: "#/components/schemas/CreditMemoItemFromWriteOffInvoice"
            memoDate:
              type: string
              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
            reasonCode:
              type: string
              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`.
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
    PUTWriteOffInvoiceResponse:
      type: object
      properties:
        creditMemo:
          type: object
          properties:
            id:
              type: string
              description: >
                The ID of the credit memo that is created when the invoice is
                written off.
          description: >
            Container for the credit memo that is automatically generated when
            writing off invoices.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    PUT_BasicSummaryJournalEntryType:
      allOf:
        - type: object
          properties:
            journalEntryItems:
              type: array
              description: |
                Key name that represents the list of journal entry items.
              items:
                $ref: "#/components/schemas/PUTJournalEntryItemType"
            notes:
              type: string
              description: |
                Additional information about this record.

                ***Character limit:*** 2,000
            transferredToAccounting:
              type: string
              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
        - $ref: "#/components/schemas/JournalEntryObjectCustomFields"
    PaymentCollectionResponseType:
      type: object
      properties:
        nextPage:
          type: string
          description: >
            URL to retrieve the next page of the response if it exists;
            otherwise absent.
          format: URL
        payments:
          type: array
          description: |
            Container for payments.
          items:
            $ref: "#/components/schemas/GETARPaymentTypewithSuccess"
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
    PaymentDebitMemoApplicationApplyRequestType:
      title: debitMemos
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount that is applied from the payment to the debit memo.
          format: double
        debitMemoId:
          type: string
          description: |
            The unique ID of the debit memo that the payment is applied to.
        items:
          type: array
          description: >
            Container for debit memo items.


            **Note:** The Invoice Item Settlement 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/).
          items:
            $ref: "#/components/schemas/PaymentDebitMemoApplicationItemApplyRequestType"
    PaymentDebitMemoApplicationCreateRequestType:
      title: debitMemos
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the payment associated with the debit memo.
          format: double
        debitMemoId:
          type: string
          description: |
            The unique ID of the debit memo that the payment is created on.
        items:
          type: array
          description: >
            Container for debit memo items.


            **Note:** The Invoice Item Settlement 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/).
          items:
            $ref: "#/components/schemas/PaymentDebitMemoApplicationItemCreateRequestType"
    PaymentDebitMemoApplicationItemApplyRequestType:
      title: items
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: >
            The amount of the payment that is applied to the specific debit memo
            or taxation item.
          format: double
        debitMemoItemId:
          type: string
          description: |
            The ID of the specific debit memo item.
        taxItemId:
          type: string
          description: |
            The ID of the specific taxation item.
    PaymentDebitMemoApplicationItemCreateRequestType:
      title: items
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: >
            The amount of the payment associated with the specific debit memo or
            taxation item.
          format: double
        debitMemoItemId:
          type: string
          description: |
            The ID of the specific debit memo item.
        taxItemId:
          type: string
          description: |
            The ID of the specific taxation item.
    PaymentDebitMemoApplicationItemUnapplyRequestType:
      title: items
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: >
            The amount of the payment that is unapplied from the specific debit
            mem or taxation item.
          format: double
        debitMemoItemId:
          type: string
          description: |
            The ID of the specific debit memo item.
        taxItemId:
          type: string
          description: |
            The ID of the specific taxation item.
    PaymentDebitMemoApplicationUnapplyRequestType:
      title: debitMemos
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the payment that is unapplied from the debit memo.
          format: double
        debitMemoId:
          type: string
          description: |
            The unique ID of the debit memo that the payment is unapplied from.
        items:
          type: array
          description: >
            Container for debit memo items.


            **Note:** The Invoice Item Settlement 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/).
          items:
            $ref: "#/components/schemas/PaymentDebitMemoApplicationItemUnapplyRequestType"
    PaymentEntityPrefix:
      title: payment
      type: object
      properties:
        prefix:
          type: string
          description: |
            The prefix of payments.
          example: P-
        startNumber:
          type: integer
          description: |
            The starting number of payments.
          example: 10
      description: |
        Container for the prefix and starting number of payments.
    PaymentInvoiceApplicationApplyRequestType:
      title: invoices
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount that is applied from the payment to the invoice.
          format: double
        invoiceId:
          type: string
          description: |
            The unique ID of the invoice that the payment is applied to.
        items:
          type: array
          description: >
            Container for invoice items.


            **Note:** The Invoice Item Settlement 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/).
          items:
            $ref: "#/components/schemas/PaymentInvoiceApplicationItemApplyRequestType"
    PaymentInvoiceApplicationCreateRequestType:
      title: invoices
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the payment associated with the invoice.
          format: double
        invoiceId:
          type: string
          description: |
            The unique ID of the invoice that the payment is created on.
        items:
          type: array
          description: >
            Container for invoice items.


            **Note:** The Invoice Item Settlement 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/).
          items:
            $ref: "#/components/schemas/PaymentInvoiceApplicationItemCreateRequestType"
    PaymentInvoiceApplicationItemApplyRequestType:
      title: items
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: >
            The amount of the payment that is applied to the specific invoice or
            taxation item.
          format: double
        invoiceItemId:
          type: string
          description: |
            The ID of the specific invoice item.
        taxItemId:
          type: string
          description: |
            The ID of the specific taxation item.
    PaymentInvoiceApplicationItemCreateRequestType:
      title: items
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: >
            The amount of the payment associated with the specific invoice or
            taxation item.
          format: double
        invoiceItemId:
          type: string
          description: |
            The ID of the specific invoice item.
        taxItemId:
          type: string
          description: |
            The ID of the specific taxation item.
    PaymentInvoiceApplicationItemUnapplyRequestType:
      title: items
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: >
            The amount of the payment that is unapplied from the specific
            invoice or taxation item.
          format: double
        invoiceItemId:
          type: string
          description: |
            The ID of the specific invoice item.
        taxItemId:
          type: string
          description: |
            The ID of the specific taxation item.
    PaymentInvoiceApplicationUnapplyRequestType:
      title: invoices
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the payment that is unapplied from the invoice.
          format: double
        invoiceId:
          type: string
          description: |
            The unique ID of the invoice that the payment is unapplied from.
        items:
          type: array
          description: >
            Container for invoice items.


            **Note:** The Invoice Item Settlement 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/).
          items:
            $ref: "#/components/schemas/PaymentInvoiceApplicationItemUnapplyRequestType"
    PaymentMethod:
      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).
      allOf:
        - required:
            - type
          type: object
          properties:
            type:
              type: string
              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.
              enum:
                - PayPalEC
                - PayPalNativeEC
                - PayPalAdaptive
                - CreditCard
                - ACH
                - SEPA
                - Betalingsservice
                - Autogiro
                - Bacs
        - $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"
    PaymentMethodObjectCustomFields:
      title: paymentMethodFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    PaymentObjectCustomFields:
      title: paymentFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    PaymentObjectNSFields:
      title: paymentFieldsNS
      type: object
      properties:
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        Origin__NS:
          maxLength: 255
          type: string
          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).
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
        Transaction__NS:
          maxLength: 255
          type: string
          description: >
            Related transaction in NetSuite. Only available if you have
            installed the [Zuora Connector for
            NetSuite](https://www.zuora.com/connect/app/?appId=265).
      description: >
        Container for Payment fields provided by the [Zuora Connector for
        NetSuite](https://www.zuora.com/connect/app/?appId=265).
    PostBillingPreviewParam:
      required:
        - accountId
        - targetDate
      type: object
      properties:
        accountId:
          maxLength: 255
          type: string
          description: |
            ID of the customer account to which the billing preview applies.
        assumeRenewal:
          type: string
          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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
        chargeTypeToExclude:
          type: string
          description: >
            The charge types to exclude from the billing preview.


            **Possible values:** OneTime, Recurring, Usage, and any combination of these values.
        includingEvergreenSubscription:
          type: boolean
          description: >
            Indicates if evergreen subscriptions are included in the
            billingPreview call.
        targetDate:
          type: string
          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 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
      example:
        accountId: 402890b75972406c0159724cd4d00011
        assumeRenewal: None
        chargeTypeToExclude: ""
        includingEvergreenSubscription: "true"
        targetDate: 2017-05-10
    PostBillingPreviewRunParam:
      required:
        - targetDate
      type: object
      properties:
        assumeRenewal:
          type: string
          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 in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/). 
              
        batch:
          maxLength: 255
          type: string
          description: >
            The customer batch to include in the billing preview run. If not
            specified, all customer batches are included.
        chargeTypeToExclude:
          type: string
          description: >
            The charge types to exclude from the forecast run.


            **Possible values:** OneTime, Recurring, Usage, and any comma-separated combination of these values.
        includingEvergreenSubscription:
          type: boolean
          description: >
            Indicates if evergreen subscriptions are included in the billing
            preview run. By default, evergreen subscriptions are not included.
        targetDate:
          type: string
          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 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
      example:
        assumeRenewal: None
        batch: ""
        chargeTypeToExclude: ""
        includingEvergreenSubscription: "true"
        targetDate: 2017-01-10
    PostCreditMemoEmailRequestType:
      type: object
      properties:
        emailAddresses:
          type: string
          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`.
        includeAdditionalEmailAddresses:
          type: boolean
          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.
          default: false
        useEmailTemplateSetting:
          type: boolean
          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.
          default: false
      example:
        emailAddresses: contact1@example.com,contact2@example.com
        includeAdditionalEmailAddresses: false
        useEmailTemplateSetting: false
    PostCustomObjectDefinitionFieldDefinitionRequest:
      title: customObjectCustomFieldDefinition
      required:
        - label
        - type
      type: object
      properties:
        format:
          type: string
          description: The data format of the custom field
        label:
          type: string
          description: The UI label of the custom field
        type:
          type: string
          description: The data type of the custom field
    PostCustomObjectDefinitionFieldsDefinitionRequest:
      title: customObjectCustomFieldDefinitions
      type: object
      additionalProperties:
        $ref: "#/components/schemas/PostCustomObjectDefinitionFieldDefinitionRequest"
    PostCustomObjectDefinitionRequest:
      required:
        - label
        - object
      type: object
      properties:
        filterable:
          type: array
          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
        label:
          type: string
          description: A UI label for the custom object
        object:
          type: string
          description: The API name of the custom object
        properties:
          $ref: "#/components/schemas/PostCustomObjectDefinitionFieldsDefinitionRequest"
        relationships:
          type: array
          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:
            required:
              - fields
              - namespace
              - object
            type: object
            properties:
              cardinality:
                type: string
                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
              fields:
                $ref: "#/components/schemas/FieldsAdditionalPropertiesForPostDefinition"
              namespace:
                type: string
                description: The namespace where the related object is located
              object:
                type: string
                description: The API name of the related object
        required:
          type: array
          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
      example:
        label: Birth Place Custom Object
        object: birth_place_custom_object
        properties:
          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:
              city__c: Id
            namespace: default
            object: city
          - cardinality: manyToOne
            fields:
              state__c: Id
            namespace: default
            object: state
        required:
          - city__c
          - state__c
          - country__c
        type: object
    PostCustomObjectRecordsRequest:
      required:
        - records
      type: object
      properties:
        records:
          type: array
          description: A list of custom object records to be created
          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
          items:
            $ref: "#/components/schemas/CustomObjectRecordWithOnlyCustomFields"
    PostCustomObjectRecordsResponse:
      required:
        - records
        - unprocessedRecords
      type: object
      properties:
        records:
          type: array
          description: The custom object records that are succesfully created and stored
          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"
        unprocessedRecords:
          type: array
          description: The custom object records that are not successfully created and
            stored due to system errors. For example, the service is being
            throttled due to high traffic. You can try to load the unprocessed
            records again.
          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
          items:
            $ref: "#/components/schemas/CustomObjectRecordWithOnlyCustomFields"
    PostDebitMemoEmailType:
      type: object
      properties:
        emailAddresses:
          type: string
          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`.
        includeAdditionalEmailAddresses:
          type: boolean
          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.
          default: false
        useEmailTemplateSetting:
          type: boolean
          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.
          default: false
      example:
        emailAddresses: contact1@example.com,contact2@example.com
        includeAdditionalEmailAddresses: false
        useEmailTemplateSetting: false
    PostEventTriggerRequest:
      required:
        - active
        - baseObject
        - condition
        - eventType
      type: object
      properties:
        active:
          type: boolean
          description: The status of the event trigger.
        baseObject:
          maxLength: 100
          minLength: 1
          type: string
          description: "The base object that the trigger rule is defined upon. Should be
            specified in the pattern: ^[A-Z][\\\\w\\\\-]*$"
        condition:
          maxLength: 5000
          minLength: 1
          type: string
          description: The JEXL expression to be evaluated against object changes. See
            above for more information and an example.
        description:
          maxLength: 1000
          type: string
          description: The description of the event trigger.
        eventType:
          $ref: "#/components/schemas/EventType"
      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
    PostGenerateBillingDocumentType:
      type: object
      properties:
        autoPost:
          type: boolean
          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.
          default: false
        autoRenew:
          type: boolean
          description: >
            Whether to automatically renew the subscriptions with **Auto Renew**
            set to **Yes**. 
          default: false
        chargeTypeToExclude:
          type: array
          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
        effectiveDate:
          type: string
          description: >
            The date on which to generate the billing documents, in `yyyy-mm-dd`
            format.
          format: date
        subscriptionIds:
          type: array
          description: >
            The IDs of the subscriptions that you want to create the billing
            documents for. 
          items:
            type: string
        targetDate:
          type: string
          description: >
            The date used to determine which charges are to be billed, in
            `yyyy-mm-dd` format.
          format: date
      example:
        autoPost: false
        effectiveDate: 2017-05-23
        subscriptionIds:
          - 4028905558b483220158b48983dd0015
          - 6028905558b483220158b68983dd0016
        targetDate: 2017-08-23
    PostInvoiceEmailRequestType:
      type: object
      properties:
        emailAddresses:
          type: string
          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`.
        includeAdditionalEmailAddresses:
          type: boolean
          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.
          default: false
        useEmailTemplateSetting:
          type: boolean
          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.
          default: false
      example:
        emailAddresses: contact1@example.com,contact2@example.com
        includeAdditionalEmailAddresses: false
        useEmailTemplateSetting: false
    PostNonRefRefundType:
      allOf:
        - required:
            - totalAmount
            - type
          type: object
          properties:
            comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Comments about the refund.
            financeInformation:
              type: object
              properties:
                bankAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to a bank account in your
                    accounting system.
                onAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to an on account in your
                    accounting system.
                transferredToAccounting:
                  type: string
                  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
                unappliedPaymentAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: |
                    The accounting code for the unapplied payment.
              description: |
                Container for the finance information related to the refund.
            gatewayId:
              type: string
              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.
            items:
              type: array
              description: >
                Container for credit memo items.


                **Note:** The Invoice Item Settlement 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/).
              items:
                $ref: "#/components/schemas/RefundCreditMemoItemType"
            methodType:
              type: string
              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
            paymentMethodId:
              type: string
              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. 
            reasonCode:
              type: string
              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.
            referenceId:
              maxLength: 60
              minLength: 0
              type: string
              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.
            refundDate:
              type: string
              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
            secondRefundReferenceId:
              maxLength: 60
              minLength: 0
              type: string
              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.
            totalAmount:
              type: number
              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:
              type: string
              description: |
                The type of the refund.
              enum:
                - External
                - Electronic
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    PostOrderPreviewResponseType:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - type: object
          properties:
            previewResult:
              $ref: "#/components/schemas/PreviewResult"
    PostOrderResponseType:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - type: object
          properties:
            accountId:
              type: string
              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`.
            accountNumber:
              type: string
              description: The account number for the order.
            creditMemoIds:
              type: array
              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
            creditMemoNumbers:
              type: array
              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
            invoiceIds:
              type: array
              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
            invoiceNumbers:
              type: array
              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
            orderId:
              type: string
              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`.
            orderNumber:
              type: string
              description: The order number of the order created.
            paidAmount:
              type: string
              description: The total amount collected in this order request.
            paymentId:
              type: string
              description: The payment Id that collected in this order request. This field is
                returned instead of the `paymentNumber` field if the `returnIds`
                query parameter is set to `true`.
            paymentNumber:
              type: string
              description: The payment number that collected in this order request.
            status:
              type: string
              description: Status of the order. `Pending` is only applicable for an order that
                contains a `CreateSubscription` order action.
              enum:
                - Completed
                - Pending
            subscriptionIds:
              type: array
              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
            subscriptionNumbers:
              type: array
              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
            subscriptions:
              type: array
              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:
                type: object
                properties:
                  status:
                    type: string
                    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
                  subscriptionId:
                    type: string
                    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`.
                  subscriptionNumber:
                    type: string
                    description: Subscription number of the subscription included in this order.
    PostRefundType:
      allOf:
        - required:
            - totalAmount
            - type
          type: object
          properties:
            comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Comments about the refund.
            financeInformation:
              type: object
              properties:
                bankAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to a bank account in your
                    accounting system.
                transferredToAccounting:
                  type: string
                  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
                unappliedPaymentAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: |
                    The accounting code for the unapplied payment.
              description: |
                Container for the finance information related to the refund.
            methodType:
              type: string
              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
            reasonCode:
              type: string
              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.
            referenceId:
              maxLength: 60
              minLength: 0
              type: string
              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.
            refundDate:
              type: string
              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
            secondRefundReferenceId:
              maxLength: 60
              minLength: 0
              type: string
              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.
            totalAmount:
              type: number
              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:
              type: string
              description: |
                The type of the refund.
              enum:
                - External
                - Electronic
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    PreviewAccountInfo:
      title: previewAccountInfo
      required:
        - billCycleDay
        - currency
      type: object
      properties:
        billCycleDay:
          maximum: 31
          minimum: 0
          type: integer
          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".
        currency:
          maxLength: 3
          type: string
          description: |
            ISO 3-letter currency code (uppercase). For example, USD.
        customFields:
          $ref: "#/components/schemas/AccountObjectCustomFields"
        soldToContact:
          $ref: "#/components/schemas/PreviewContactInfo"
        taxInfo:
          $ref: "#/components/schemas/TaxInfo"
      description: |
        Information about the account that will own the order.
    PreviewContactInfo:
      type: object
      properties:
        city:
          maxLength: 40
          type: string
        country:
          maxLength: 64
          type: string
          description: Country; must be a valid country name or abbreviation. If using
            Zuora Tax, you must specify a country to calculate tax.
        county:
          maxLength: 32
          type: string
        postalCode:
          maxLength: 20
          type: string
        state:
          maxLength: 40
          type: string
        taxRegion:
          maxLength: 32
          type: string
    PreviewOptions:
      type: object
      properties:
        previewThruType:
          type: string
          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.
          enum:
            - SpecificDate
            - TermEnd
        previewTypes:
          type: array
          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.

            * OrderMetrics: order metrics will be returned in the response, including: `quantity`, `mrr`, `tcb`, `tcv`, and `elp`.
          items:
            type: string
            enum:
              - ChargeMetrics
              - BillingDocs
              - OrderMetrics
        specificPreviewThruDate:
          type: string
          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
    PreviewOrderChargeOverride:
      title: charge
      required:
        - productRatePlanChargeId
      type: object
      properties:
        billing:
          type: object
          properties:
            billCycleDay:
              maximum: 31
              minimum: 0
              type: integer
              description: >
                Day of the month that each billing period begins on. Only
                applicable if the value of the `billCycleType` field is
                `SpecificDayofMonth`.
            billCycleType:
              type: string
              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
            billingPeriod:
              type: string
              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
            billingPeriodAlignment:
              type: string
              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
            billingTiming:
              type: string
              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
            specificBillingPeriod:
              type: integer
              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`.
            weeklyBillCycleDay:
              type: string
              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
          description: |
            Billing information about the charge.
        chargeNumber:
          maxLength: 50
          type: string
          description: |
            Charge number of the charge. For example, C-00000307.

            If you do not set this field, Zuora will generate the charge number.
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          maxLength: 500
          type: string
          description: |
            Description of the charge.
        endDate:
          $ref: "#/components/schemas/EndConditions"
        pricing:
          type: object
          properties:
            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"
          description: |
            Pricing information about the charge.
        productRatePlanChargeId:
          type: string
          description: >
            Internal identifier of the product rate plan charge that the charge
            is based on.
        revRecCode:
          maxLength: 70
          type: string
          description: |
            Revenue Recognition Code
        revRecTriggerCondition:
          type: string
          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
        revenueRecognitionRuleName:
          type: string
          description: |
            Specifies the revenue recognition rule.

              * `Recognize upon invoicing` 
              * `Recognize daily over time`
          enum:
            - Recognize upon invoicing
            - Recognize daily over time
        startDate:
          $ref: "#/components/schemas/PreviewOrderTriggerParams"
        uniqueToken:
          maxLength: 50
          type: string
          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.
      description: |
        Charge associated with a rate plan.
    PreviewOrderChargeUpdate:
      type: object
      properties:
        billing:
          $ref: "#/components/schemas/BillingUpdate"
        chargeNumber:
          type: string
          description: |
            Read only. Identifies the charge to be updated.
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          type: string
        effectiveDate:
          $ref: "#/components/schemas/PreviewOrderTriggerParams"
        pricing:
          $ref: "#/components/schemas/PreviewOrderPricingUpdate"
        uniqueToken:
          type: string
          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.
    PreviewOrderCreateSubscription:
      title: createSubscription
      type: object
      properties:
        invoiceSeparately:
          type: boolean
          description: >
            Specifies whether the subscription appears on a separate invoice
            when Zuora generates invoices.
        newSubscriptionOwnerAccount:
          required:
            - billCycleDay
            - billToContact
            - currency
            - name
          type: object
          properties:
            accountNumber:
              maxLength: 70
              type: string
              description: |
                Account number. For example, A00000001.
            additionalEmailAddresses:
              maxLength: 1200
              type: string
              description: >
                List of additional email addresses to receive emailed invoices.
                Values should be a comma-separated list of email addresses.
            allowInvoiceEdit:
              type: boolean
              description: |
                Indicates if associated invoices can be edited.
                Values are: 

                * `true`
                * `false` (default)
            autoPay:
              type: boolean
              description: >
                Specifies whether future payments are automatically billed when
                they are due.
            batch:
              type: string
              description: >
                Name of the billing batch that the account belongs to. For
                example, Batch1.
            billCycleDay:
              maximum: 31
              minimum: 0
              type: integer
              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".
            billToContact:
              $ref: "#/components/schemas/BillToContactPostOrder"
            communicationProfileId:
              type: string
              description: >
                Internal identifier of the communication profile that Zuora uses
                when sending notifications to the account's contacts.
            creditCard:
              $ref: "#/components/schemas/creditCard"
            creditMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
            crmId:
              maxLength: 100
              type: string
              description: |
                External identifier of the account in a CRM system.
            currency:
              type: string
              description: |
                ISO 3-letter currency code (uppercase). For example, USD.
            customFields:
              $ref: "#/components/schemas/AccountObjectCustomFields"
            customerServiceRepName:
              maxLength: 50
              type: string
              description: >
                Name of the account's customer service representative, if
                applicable.
            debitMemoTemplateId:
              type: string
              description: >
                **Note**: This field is only available if you have the Invoice
                Settlement feature enabled. The Invoice Settlement 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/).


                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
            hpmCreditCardPaymentMethodId:
              type: string
              description: >
                Internal identifier of the hosted payment method (HPM) credit
                card payment method associated with the account.
            invoiceDeliveryPrefsEmail:
              type: boolean
              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.         
            invoiceDeliveryPrefsPrint:
              type: boolean
              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.
            invoiceTemplateId:
              type: string
              description: >
                Internal identifier of the invoice template that Zuora uses when
                generating invoices for the account.
            name:
              maxLength: 255
              type: string
              description: |
                Account name.
            notes:
              maxLength: 65535
              type: string
              description: >
                Notes about the account. These notes are only visible to Zuora
                users.
            parentId:
              type: string
              description: Identifier of the parent customer account for this Account object.
                Use this field if you have customer hierarchy enabled.
            paymentGateway:
              maxLength: 40
              type: string
              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.
            paymentMethod:
              $ref: "#/components/schemas/PaymentMethod"
            paymentTerm:
              type: string
              description: >
                Name of the payment term associated with the account. For
                example, "Net 30". The payment term determines the due dates of
                invoices.
            purchaseOrderNumber:
              maxLength: 100
              type: string
              description: >
                The number of the purchase order associated with this account.
                Purchase order information generally comes from customers.
            salesRep:
              maxLength: 50
              type: string
              description: >
                The name of the sales representative associated with this
                account, if applicable.
            soldToContact:
              $ref: "#/components/schemas/SoldToContactPostOrder"
            taxInfo:
              $ref: "#/components/schemas/TaxInfo"
          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.
        notes:
          maxLength: 500
          type: string
          description: >
            Notes about the subscription. These notes are only visible to Zuora
            users.
        subscribeToRatePlans:
          type: array
          description: |
            List of rate plans associated with the subscription.
          items:
            $ref: "#/components/schemas/PreviewOrderRatePlanOverride"
        subscriptionNumber:
          maxLength: 100
          type: string
          description: >
            Subscription number of the subscription. For example, A-S00000001.


            If you do not set this field, Zuora will generate the subscription number.
        subscriptionOwnerAccountNumber:
          maxLength: 70
          type: string
          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.
        terms:
          required:
            - initialTerm
          type: object
          properties:
            autoRenew:
              type: boolean
              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`.
            initialTerm:
              required:
                - termType
              type: object
              properties:
                period:
                  type: integer
                  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`.


                    The duration of the first term cannot be greater than 10 years.
                periodType:
                  type: string
                  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
                startDate:
                  type: string
                  description: |
                    Start date of the first term, in YYYY-MM-DD format.
                  format: date
                termType:
                  type: string
                  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
              description: |
                Information about the first term of the subscription.
            renewalSetting:
              type: string
              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
            renewalTerms:
              type: array
              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"
          description: |
            Container for the terms and renewal settings of the subscription.
      description: |
        Information about an order action of type `CreateSubscription`.
    PreviewOrderOrderAction:
      required:
        - type
      type: object
      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:
          type: array
          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:
          type: string
          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
        updateProduct:
          $ref: "#/components/schemas/PreviewOrderRatePlanUpdate"
    PreviewOrderPricingUpdate:
      type: object
      properties:
        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"
    PreviewOrderRatePlanOverride:
      title: ratePlan
      required:
        - productRatePlanId
      type: object
      properties:
        chargeOverrides:
          type: array
          description: |
            List of charges associated with the rate plan.
          items:
            $ref: "#/components/schemas/PreviewOrderChargeOverride"
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        productRatePlanId:
          type: string
          description: >
            Internal identifier of the product rate plan that the rate plan is
            based on.
        uniqueToken:
          maxLength: 50
          type: string
          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.
      description: |
        Rate plan associated with a subscription.
    PreviewOrderRatePlanUpdate:
      title: updateProduct
      type: object
      properties:
        chargeUpdates:
          type: array
          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"
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        ratePlanId:
          type: string
          description: >
            The id of the rate plan to be updated. It can be the latest version
            or any history version id.
        specificUpdateDate:
          type: string
          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
        uniqueToken:
          type: string
          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.
      description: |
        Information about an order action of type `UpdateProduct`.
    PreviewOrderTriggerParams:
      title: startDate
      type: object
      properties:
        specificTriggerDate:
          type: string
          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
        triggerEvent:
          type: string
          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
      description: |
        Specifies when a charge becomes active.
    PreviewResult:
      type: object
      properties:
        chargeMetrics:
          type: array
          items:
            type: object
            properties:
              charges:
                type: array
                items:
                  $ref: "#/components/schemas/ChargePreviewMetrics"
              subscriptionNumber:
                type: string
                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.
        creditMemos:
          type: array
          description: This field is only available if you have the Invoice Settlement
            feature enabled.
          items:
            type: object
            properties:
              amount:
                type: number
              amountWithoutTax:
                type: number
              creditMemoItems:
                type: array
                items:
                  $ref: "#/components/schemas/InvoiceItemPreviewResult"
              targetDate:
                type: string
                format: date
              taxAmount:
                type: number
        invoices:
          type: array
          items:
            type: object
            properties:
              amount:
                type: number
              amountWithoutTax:
                type: number
              invoiceItems:
                type: array
                items:
                  $ref: "#/components/schemas/InvoiceItemPreviewResult"
              targetDate:
                type: string
                format: date
              taxAmount:
                type: number
        orderMetrics:
          type: array
          items:
            type: object
            properties:
              orderActions:
                type: array
                items:
                  type: object
                  properties:
                    orderItems:
                      type: array
                      items:
                        $ref: "#/components/schemas/OrderItem"
                    orderMetrics:
                      type: array
                      items:
                        $ref: "#/components/schemas/orderMetric"
                    sequence:
                      type: string
                    type:
                      type: string
              subscriptionNumber:
                type: string
      description: The result of each type of preview. Returned only when the current
        request is preview call.
    PriceChangeParams:
      type: object
      properties:
        priceChangeOption:
          type: string
          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
        priceIncreasePercentage:
          minimum: -100
          type: number
          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`.
    PricingUpdate:
      type: object
      properties:
        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"
    PricingUpdateForEvergreen:
      type: object
      properties:
        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"
    ProcessingOptions:
      type: object
      properties:
        applyCreditBalance:
          type: boolean
          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.
        billingOptions:
          $ref: "#/components/schemas/BillingOptions"
        collectPayment:
          type: boolean
          description: Indicates if the current request needs to collect payments. This
            value can not be 'true' when 'runBilling' flag is 'false'.
        electronicPaymentOptions:
          type: object
          properties:
            paymentMethodId:
              type: string
              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.
          description: Container for the electronic payment options.
        runBilling:
          type: boolean
          description: Indicates if the current request needs to generate an invoice. The
            invoice will be generated against all subscriptions included in this
            order.
      description: Invoice or Payment.
    ProductFeatureObjectCustomFields:
      title: productFeatureFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    ProductObjectCustomFields:
      title: productFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    ProductObjectNSFields:
      title: productFieldsNS
      type: object
      properties:
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        ItemType__NS:
          type: string
          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
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
      description: >
        Container for Product fields provided by the [Zuora Connector for
        NetSuite](https://www.zuora.com/connect/app/?appId=265).
    ProductRatePlanChargeObjectCustomFields:
      title: productRatePlanChargeFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    ProductRatePlanChargeObjectNSFields:
      title: productRatePlanChargeFieldsNS
      type: object
      properties:
        Class__NS:
          maxLength: 255
          type: string
          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).
        DeferredRevAccount__NS:
          maxLength: 255
          type: string
          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).
        Department__NS:
          maxLength: 255
          type: string
          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).
        IncludeChildren__NS:
          type: string
          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
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        ItemType__NS:
          type: string
          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
        Location__NS:
          maxLength: 255
          type: string
          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).
        RecognizedRevAccount__NS:
          maxLength: 255
          type: string
          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).
        RevRecEnd__NS:
          type: string
          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
        RevRecStart__NS:
          type: string
          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
        RevRecTemplateType__NS:
          maxLength: 255
          type: string
          description: >
            Only available if you have installed the [Zuora Connector for
            NetSuite](https://www.zuora.com/connect/app/?appId=265).
        Subsidiary__NS:
          maxLength: 255
          type: string
          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).
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
      description: >
        Container for Product Rate Plan Charge fields provided by the [Zuora
        Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
    ProductRatePlanObjectCustomFields:
      title: productRatePlanFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    ProductRatePlanObjectNSFields:
      title: productRatePlanFieldsNS
      type: object
      properties:
        BillingPeriod__NS:
          type: string
          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
        Class__NS:
          maxLength: 255
          type: string
          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).
        Department__NS:
          maxLength: 255
          type: string
          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).
        IncludeChildren__NS:
          type: string
          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
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        ItemType__NS:
          type: string
          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
        Location__NS:
          maxLength: 255
          type: string
          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).
        MultiCurrencyPrice__NS:
          maxLength: 255
          type: string
          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).
        Price__NS:
          maxLength: 255
          type: string
          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).
        Subsidiary__NS:
          maxLength: 255
          type: string
          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).
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
      description: >
        Container for Product Rate Plan fields provided by the [Zuora Connector
        for NetSuite](https://www.zuora.com/connect/app/?appId=265).
    ProvisionEntityResponseType:
      type: object
      properties:
        success:
          type: boolean
          description: Returns `true` if the request is successful.
    ProxyActionamendRequest:
      type: object
      properties:
        requests:
          type: array
          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"
      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
    ProxyActionamendResponse:
      type: object
      properties:
        results:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/AmendResult"
    ProxyActioncreateRequest:
      required:
        - objects
        - type
      type: object
      properties:
        objects:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/zObject"
        type:
          type: string
          description: ""
      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
    ProxyActiondeleteRequest:
      required:
        - ids
        - type
      type: object
      properties:
        ids:
          type: array
          description: |
            A list of one or more IDs for the objects you want to delete.
          items:
            type: string
        type:
          type: string
          description: |
            The type of object that you are deleting.
      example:
        ids:
          - 2c93808457d787030157e031fcd34e19
        type: ProductRatePlanCharge
    ProxyActionexecuteRequest:
      required:
        - ids
        - synchronous
        - type
      type: object
      properties:
        ids:
          type: array
          description: |
            The ID of the object. **Values:** a valid InvoiceSplit object ID.
          items:
            type: string
        synchronous:
          type: boolean
          description: >
            Indicates if the call is synchronous or asynchronous. **Values:**
            `false`
        type:
          type: string
          description: |
            Specifies the type of executed item. 
          enum:
            - InvoiceSplit
      example:
        ids:
          - 2c93808457d787030157e031d5844c53
        synchronous: false
        type: InvoiceSplit
    ProxyActiongenerateRequest:
      required:
        - objects
        - type
      type: object
      properties:
        objects:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/zObject"
        type:
          type: string
          description: ""
          enum:
            - Invoice
      example:
        objects:
          - AccountId: 2c93808457d787030157e0306be53a75
            InvoiceDate: 2016-10-20
            TargetDate: 2016-10-20
        type: Invoice
    ProxyActionqueryMoreRequest:
      required:
        - queryLocator
      type: object
      properties:
        queryLocator:
          type: string
          description: ""
      example:
        queryLocator: 2c92c0f9602fb240016049ac7e0b47e7-2000
    ProxyActionqueryMoreResponse:
      type: object
      properties:
        done:
          type: boolean
          description: ""
        queryLocator:
          type: string
          description: ""
        records:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/zObject"
        size:
          type: integer
          description: ""
          format: int32
    ProxyActionqueryRequest:
      required:
        - queryString
      type: object
      properties:
        conf:
          type: object
          properties:
            batchSize:
              type: integer
              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.
          description: ""
        queryString:
          type: string
          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`.
      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'
    ProxyActionqueryResponse:
      type: object
      properties:
        done:
          type: boolean
          description: ""
        queryLocator:
          type: string
          description: ""
        records:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/zObject"
        size:
          type: integer
          description: ""
          format: int32
    ProxyActionsubscribeRequest:
      required:
        - subscribes
      type: object
      properties:
        subscribes:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/SubscribeRequest"
      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
    ProxyActionupdateRequest:
      required:
        - objects
        - type
      type: object
      properties:
        objects:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/zObject_update"
        type:
          type: string
          description: ""
      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
    ProxyBadRequestResponse:
      type: object
      properties:
        Errors:
          type: array
          items:
            type: object
            properties:
              Code:
                type: string
                description: ""
              Message:
                type: string
                description: ""
        Success:
          type: boolean
          description: ""
    ProxyCreateAccount:
      allOf:
        - required:
            - BillCycleDay
            - Currency
            - Name
            - Status
          type: object
          properties:
            AccountNumber:
              type: string
              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
            AdditionalEmailAddresses:
              type: string
              description: "List of additional email addresses to receive emailed invoices.
                **Character limit**: 120 **Values**: comma-separated list of
                email addresses "
            AllowInvoiceEdit:
              type: boolean
              description: >-2
                 Indicates if associated invoices can be edited.
                **Character limit**: 5 **Values**: `true`, `false` (default if left null) 
            AutoPay:
              type: boolean
              description: >-2
                 Indicates if future payments are automatically collected when they're due during a Payment Run.
                **Character limit**: 5 **Values**: `true`, `false` (default) 
            Batch:
              type: string
              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). 
            BcdSettingOption:
              type: string
              description: "Billing cycle day setting option. **Character limit**: 9
                **Values**: `AutoSet`, `ManualSet` "
            BillCycleDay:
              type: integer
              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
            BillToId:
              type: string
              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 "
            CommunicationProfileId:
              type: string
              description: "Associates the account with a specified communication profile.
                **Character limit**: 32 **Values**: a valid communication
                profile ID "
            CrmId:
              type: string
              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 "
            Currency:
              type: string
              description: " Currency that the customer is billed in. "
            CustomerServiceRepName:
              type: string
              description: "Name of the account's customer service representative, if
                applicable. **Character limit**: 50 **Values**: a string of 50
                characters or fewer "
            DefaultPaymentMethodId:
              type: string
              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 "
            InvoiceDeliveryPrefsEmail:
              type: boolean
              description: "Indicates if the customer wants to receive invoices through
                email.  **Character limit**: 5 **Values**: `true`, `false`
                (default if left null) "
            InvoiceDeliveryPrefsPrint:
              type: boolean
              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) "
            InvoiceTemplateId:
              type: string
              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 "
            Name:
              type: string
              description: "Name of the account as displayed in the Zuora UI. **Character
                limit**: 255 **Values**: a string of 255 characters or fewer "
            Notes:
              type: string
              description: " Comments about the account. **Character limit**: 65,535
                **Values**: a string of 65,535 characters "
            ParentId:
              type: string
              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 "
            PaymentGateway:
              type: string
              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
            PaymentTerm:
              type: string
              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 "
            PurchaseOrderNumber:
              type: string
              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 "
            SalesRepName:
              type: string
              description: "The name of the sales representative associated with this account,
                if applicable. **Character limit**: 50 **Values**: a string of
                50 characters or fewer "
            SoldToId:
              type: string
              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 "
            Status:
              maxLength: 8
              type: string
              description: |
                Status of the account in the system.
              enum:
                - Draft
                - Active
                - Canceled
            TaxCompanyCode:
              type: string
              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 
            TaxExemptCertificateID:
              type: string
              description: "ID of your customer's tax exemption certificate. **Character
                limit**: 32 **Values**: a string of 32 characters or fewer "
            TaxExemptCertificateType:
              type: string
              description: "Type of the tax exemption certificate that your customer
                holds.  **Character limit**: 32 **Values**: a string of 32
                characters or fewer "
            TaxExemptDescription:
              type: string
              description: "Description of the tax exemption certificate that your customer
                holds. **Character limit**: 500 **Values**: a string of 500
                characters or fewer "
            TaxExemptEffectiveDate:
              type: string
              description: "Date when the the customer's tax exemption starts. **Character
                limit**: 29 **Version notes**: requires Zuora Tax "
              format: date
            TaxExemptExpirationDate:
              type: string
              description: "Date when the customer's tax exemption certificate
                expires  **Character limit**: 29 **Version notes**: requires
                Zuora Tax "
              format: date
            TaxExemptIssuingJurisdiction:
              type: string
              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 "
            TaxExemptStatus:
              type: string
              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`
            VATId:
              type: string
              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 
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
    ProxyCreateBillRun:
      required:
        - InvoiceDate
        - TargetDate
      type: object
      properties:
        AccountId:
          type: string
          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
        AutoEmail:
          type: boolean
          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.
          default: false
        AutoPost:
          type: boolean
          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.
          default: false
        AutoRenewal:
          type: boolean
          description: >
            Determines whether to auto renew subscription or not by this bill
            run once the bill run completes.
          default: false
        Batch:
          type: string
          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.
        BillCycleDay:
          type: string
          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.
        ChargeTypeToExclude:
          type: string
          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
        InvoiceDate:
          type: string
          description: |
            Invoice date for this bill run.

            **Character limit:** 29
          format: date
        NoEmailForZeroAmountInvoice:
          type: boolean
          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).
          default: false
        TargetDate:
          type: string
          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
      example:
        AutoEmail: "false"
        AutoPost: "false"
        AutoRenewal: "false"
        Batch: Batch1
        BillCycleDay: "2"
        ChargeTypeToExclude: OneTime, Usage
        InvoiceDate: 2017-02-04
        NoEmailForZeroAmountInvoice: "false"
        TargetDate: 2017-02-04
    ProxyCreateContact:
      allOf:
        - required:
            - AccountId
            - FirstName
            - LastName
          type: object
          properties:
            AccountId:
              type: string
              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 
            Address1:
              type: string
              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 
            Address2:
              type: string
              description: >-2
                 The second line of the contact's address.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            City:
              type: string
              description: >-2
                 The city of the contact's address.
                **Character limit**: 40 **Values: **a string of 40 characters or fewer 
            Country:
              type: string
              description: " The country of the contact's address. "
            County:
              type: string
              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 
            Description:
              type: string
              description: >-2
                 A description for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
            Fax:
              type: string
              description: >-2
                 The contact's fax number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            FirstName:
              type: string
              description: >-2
                 The contact's first name.
                **Character limit**: 100 **Values**: a string of the contact's first name 
            HomePhone:
              type: string
              description: >-2
                 The contact's home phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            LastName:
              type: string
              description: >-2
                 The contact's last name.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
            MobilePhone:
              type: string
              description: >-2
                 The contact's mobile phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            NickName:
              type: string
              description: >-2
                 A nickname for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
            OtherPhone:
              type: string
              description: >-2
                 An additional phone number for the contact.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            OtherPhoneType:
              type: string
              description: "The type of the `OtherPhone`. **Character limit**: 20 **Values**:
                `Work`, `Mobile`, `Home`, `Other` "
            PersonalEmail:
              type: string
              description: >-2
                 The contact's personal email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
            PostalCode:
              type: string
              description: >-2
                 The zip code for the contact's address.
                **Character limit:** 20 **Values: **a string of 20 characters or fewer 
            State:
              type: string
              description: " The state or province of the contact's address. "
            TaxRegion:
              type: string
              description: "If using Zuora Tax rules "
            WorkEmail:
              type: string
              description: >-2
                 The contact's business email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
            WorkPhone:
              type: string
              description: >-2
                 The contact's business phone number.
                **Character limit**: 40 **notes**: -- **Values**: a string of 40 characters or fewer 
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    ProxyCreateCreditBalanceAdjustment:
      allOf:
        - required:
            - Amount
            - Type
          type: object
          properties:
            AccountingCode:
              maxLength: 100
              type: string
              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.
            Amount:
              type: number
              description: |
                The amount of the adjustment.
              format: double
            Comment:
              maxLength: 255
              type: string
              description: |
                Your comments about the credit balance adjustment.
            ReasonCode:
              maxLength: 32
              type: string
              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.
            ReferenceId:
              maxLength: 60
              type: string
              description: |
                The ID of the payment that the credit balance adjustment is for.
            SourceTransactionId:
              maxLength: 32
              type: string
              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 one of the following:
                 * An invoice ID
                 * A payment ID
                 * A refund ID
            SourceTransactionNumber:
              maxLength: 50
              type: string
              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 one of the following:
                 * An invoice number
                 * A payment number
                 * A refund number
            Type:
              type: string
              description: >
                Whether the credit balance adjustment increases or decrease the
                amount of the credit balance.
              enum:
                - Decrease
                - Increase
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectNSFields"
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectCustomFields"
    ProxyCreateExport:
      required:
        - Format
        - Query
      type: object
      properties:
        ConvertToCurrencies:
          type: string
          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 
        Encrypted:
          type: boolean
          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 
        FileId:
          type: string
          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 
        Format:
          type: string
          description: |-2
             The format that you want the export file to use.
            **Character limit**: 5 
          enum:
            - csv
            - html
            - Excel
        Name:
          type: string
          description: >-2
             The name of the export.
            **Character limit**: 255 **Values**: a string of 255 characters or fewer 
        Query:
          type: string
          description: >
            [Export
            ZOQL](https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL)
            query.
        Size:
          type: integer
          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
        Status:
          type: string
          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
        StatusReason:
          type: string
          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 
        Zip:
          type: boolean
          description: >-2
             Indicates if you want the resulting export file to be compressed into a zip file.
            **Character limit**: **Values**: true, false (default) 
      example:
        Format: csv
        Name: test_Export_1476935164445
        Query: select * from account
        Status: Processing
        Zip: true
    ProxyCreateInvoiceAdjustment:
      allOf:
        - required:
            - Amount
            - Type
          type: object
          properties:
            AccountId:
              type: string
              description: >-2
                 The ID of the account that owns the invoice.
                **Character limit**: 32 **Values**: inherited from Account.ID for the invoice owner 
            AccountingCode:
              type: string
              description: "The accounting code for the invoice adjustment. "
            AdjustmentDate:
              type: string
              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
            AdjustmentNumber:
              type: string
              description: |-2
                 A unique string to identify an individual invoice adjustment.
                **Character limit**: 255 **Values**: automatically generated 
            Amount:
              type: number
              description: |-2
                 The amount of the invoice adjustment.
                **Character limit**: 16 **Values**: a valid currency amount 
              format: double
            Comments:
              type: string
              description: >-2
                 Use this field to record comments about the invoice adjustment.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            CustomerName:
              type: string
              description: |-2
                 The name of the account that owns the associated invoice.
                **Character limit**: 50 **Values**: inherited from Account.Name 
            CustomerNumber:
              type: string
              description: >-2
                 The unique account number of the customer's account.
                **Character limit**: 70 **Values**: inherited from Account.AccountNumber 
            ImpactAmount:
              type: number
              description: |-2
                 The amount that changes the balance of the associated invoice.
                **Character limit**: 16 **Values**: automatically calculated 
              format: double
            InvoiceId:
              type: string
              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 
            InvoiceNumber:
              type: string
              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 
            ReasonCode:
              type: string
              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 
            ReferenceId:
              type: string
              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 
            Status:
              type: string
              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:
              type: string
              description: >-2
                 Indicates whether the adjustment credits or debits the invoice amount.
                **Character limit**: 6 **Values**: `Credit`, `Charge` 
        - $ref: "#/components/schemas/InvoiceAdjustmentObjectCustomFields"
    ProxyCreateInvoicePayment:
      required:
        - Amount
        - InvoiceId
        - PaymentId
      type: object
      properties:
        Amount:
          type: number
          description: |-2
             The amount of the payment.
            **Character limit**: 16 **Values**: a valid currency amount 
          format: double
        InvoiceId:
          type: string
          description: |-2
             The unique ID of the invoice associated with this invoice payment.
            **Character limit**: 32 **Values**: a valid invoice ID 
        PaymentId:
          type: string
          description: |-2
             The unique ID of the payment associated with this invoice payment.
            **Character limit**: 32 **V****alues**: a valid payment ID 
      example:
        Amount: 10
        InvoiceId: 2c93808457d787030157e02deadb1b6d
        PaymentId: 2c93808457d787030157e02de5fc1b57
    ProxyCreateOrModifyProductRatePlanChargeTierData:
      title: productRatePlanChargeTierData
      type: object
      properties:
        ProductRatePlanChargeTier:
          type: array
          description: >
            Array of product rate plan charge tiers.


            You should specify all relevant fields of all tiers, including pricing information for each currency. 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:
            type: object
            properties:
              Currency:
                type: string
                description: |
                  The code corresponding to the currency for the tier's price.
              DiscountAmount:
                type: number
                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
              DiscountPercentage:
                type: number
                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
              EndingUnit:
                type: number
                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
              IsOveragePrice:
                type: boolean
                description: >
                  Indicates if the price is an overage price, which is the price
                  when usage surpasses the last defined tier.
              Price:
                type: number
                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
              PriceFormat:
                type: string
                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
              StartingUnit:
                type: number
                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
      description: >
        Container for pricing information associated with the product rate plan
        charge.
    ProxyCreateOrModifyResponse:
      type: object
      properties:
        Id:
          type: string
          description: ""
        Success:
          type: boolean
          description: ""
    ProxyCreatePayment:
      allOf:
        - required:
            - AccountId
            - EffectiveDate
            - PaymentMethodId
            - Status
            - Type
          type: object
          properties:
            AccountId:
              maxLength: 32
              minLength: 0
              type: string
              description: |
                The unique account ID for the customer that the payment is for.
            AccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: >
                The aacccounting code for the payment. Accounting codes group
                transactions that contain similar accounting attributes.
            Amount:
              type: number
              description: |
                The amount of the payment.
              format: double
            AppliedCreditBalanceAmount:
              type: number
              description: >
                The amount of the payment to apply to a credit balance. This
                field is only required if the `AppliedInvoiceAmount` field value
                is null.
              format: double
            AppliedInvoiceAmount:
              type: number
              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
            AuthTransactionId:
              maxLength: 50
              minLength: 0
              type: string
              description: >
                The authorization transaction ID from the payment gateway. Use
                this field for electronic payments, such as credit cards.
            Comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Additional information related to the payment.
            EffectiveDate:
              type: string
              description: |
                The date when the payment takes effect.
              format: date
            Gateway:
              type: string
              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.
            GatewayOptionData:
              required:
                - GatewayOption
              type: object
              properties:
                GatewayOption:
                  maxItems: 200
                  minItems: 0
                  type: array
                  description: ""
                  items:
                    $ref: "#/components/schemas/GatewayOption"
              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.
            GatewayOrderId:
              maxLength: 70
              minLength: 0
              type: string
              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.
            GatewayResponse:
              maxLength: 500
              minLength: 0
              type: string
              description: >
                The message returned from the payment gateway for the payment.
                This message is gateway-dependent.
            GatewayResponseCode:
              maxLength: 20
              minLength: 0
              type: string
              description: >
                The code returned from the payment gateway for the payment. This
                code is gateway-dependent.
            GatewayState:
              type: string
              description: >
                The status of the payment in the gateway; use for reconciliation.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
            InvoiceId:
              maxLength: 32
              minLength: 0
              type: string
              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.
            InvoiceNumber:
              maxLength: 32
              minLength: 0
              type: string
              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.
            InvoicePaymentData:
              title: InvoicePaymentData
              required:
                - InvoicePayment
              type: object
              properties:
                InvoicePayment:
                  maxItems: 200
                  minItems: 0
                  type: array
                  description: ""
                  items:
                    $ref: "#/components/schemas/InvoicePayment"
              description: >
                Container for the invoice payment data. This field is only
                required if you apply a payment to multiple invoices.
            PaymentMethodId:
              maxLength: 32
              minLength: 0
              type: string
              description: |
                The ID of the payment method used for the payment. 
            PaymentNumber:
              maxLength: 32
              minLength: 0
              type: string
              description: >
                The unique identification number of the payment. For example,
                P-00000028.
            ReferenceId:
              maxLength: 60
              minLength: 0
              type: string
              description: >
                The transaction ID returned by the payment gateway. Use this
                field to reconcile payments between your gateway and Zuora
                Payments.
            SoftDescriptor:
              maxLength: 35
              minLength: 0
              type: string
              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.
            SoftDescriptorPhone:
              maxLength: 20
              minLength: 0
              type: string
              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.
            Status:
              type: string
              description: >
                The status of the payment in Zuora. The value depends on the
                type of payment.


                For electronic payments, the status can be `Processed`, `Error`, or `Voided`. For external payments, the status can be `Processed` or `Canceled`.
              enum:
                - Processed
                - Error
                - Voided
                - Canceled
            Type:
              type: string
              description: >
                The type of the payment, whether the payment is external or
                electronic.
              enum:
                - External
                - Electronic
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
    ProxyCreatePaymentMethod:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              description: >-
                The ID of the customer account associated with this payment
                method.


                **Note:** You can create a payment method without assocating it with a customer account if you want. To do it and change the `AccountId` field to optional in this operation, submit a request at [Zuora Global Support](http://support.zuora.com/). 
            AchAbaCode:
              type: string
              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 
            AchAccountName:
              type: string
              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 
            AchAccountNumber:
              type: string
              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 
            AchAccountType:
              type: string
              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`
            AchAddress1:
              type: string
              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 "
            AchAddress2:
              type: string
              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 "
            AchBankName:
              type: string
              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 
            AchCity:
              type: string
              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 
            AchCountry:
              type: string
              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 
            AchPostalCode:
              type: string
              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 
            AchState:
              type: string
              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 
            BankBranchCode:
              type: string
              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 
            BankCheckDigit:
              type: string
              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 "
            BankTransferAccountName:
              type: string
              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
            BankTransferAccountNumber:
              type: string
              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
            BankTransferAccountNumberMask:
              type: string
              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
            BankTransferType:
              maxLength: 20
              type: string
              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)
            BusinessIdentificationCode:
              type: string
              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 
            City:
              type: string
              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 
            CompanyName:
              maxLength: 80
              type: string
              description: |
                The name of the company.

                Zuora does not recommend that you use this field.
            Country:
              type: string
              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 
            CreditCardAddress1:
              type: string
              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 
            CreditCardAddress2:
              type: string
              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 
            CreditCardCity:
              type: string
              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 "
            CreditCardCountry:
              type: string
              description: " The country of the card holder's address. "
            CreditCardExpirationMonth:
              type: integer
              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
            CreditCardExpirationYear:
              type: integer
              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
            CreditCardHolderName:
              type: string
              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 
            CreditCardNumber:
              type: string
              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. "
            CreditCardPostalCode:
              type: string
              description: " The billing address's zip code. **Character limit**: 20
                **Values**: a string of 20 characters or fewer "
            CreditCardSecurityCode:
              type: string
              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_me\
                thods%3F) for more information. To ensure PCI compliance, this
                value is not stored and cannot be queried. "
            CreditCardState:
              type: string
              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. "
            CreditCardType:
              type: string
              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).
            DeviceSessionId:
              type: string
              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**: 
            Email:
              type: string
              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 
            ExistingMandate:
              type: string
              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` 
            FirstName:
              type: string
              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 
            GatewayOptionData:
              required:
                - GatewayOption
              type: object
              properties:
                GatewayOption:
                  maxItems: 200
                  minItems: 0
                  type: array
                  description: ""
                  items:
                    $ref: "#/components/schemas/GatewayOption"
              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.
            IBAN:
              type: string
              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 
            IPAddress:
              type: string
              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 
            IdentityNumber:
              type: string
              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.
            IsCompany:
              type: boolean
              description: |
                Whether the customer account is a company.

                Zuora does not recommend that you use this field. 
              default: false
            LastName:
              type: string
              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 
            LastTransactionDateTime:
              type: string
              description: |-2
                 The date of the most recent transaction.
                **Character limit**: 29 **Values**: a valid date and time value 
              format: date-time
            MandateCreationDate:
              type: string
              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
            MandateID:
              type: string
              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 
            MandateReceived:
              type: string
              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) 
            MandateUpdateDate:
              type: string
              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
            MaxConsecutivePaymentFailures:
              type: integer
              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 
            NumConsecutiveFailures:
              maximum: 100
              minimum: 0
              type: integer
              description: >
                The number of consecutive failed payments for this payment
                method. It is reset to `0` upon successful payment. 
              format: int32
            PaymentRetryWindow:
              type: integer
              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 
            PaypalBaid:
              type: string
              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 
            PaypalEmail:
              type: string
              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 
            PaypalPreapprovalKey:
              type: string
              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 
            PaypalType:
              type: string
              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` 
            Phone:
              type: string
              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 
            PostalCode:
              type: string
              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 
            SecondTokenId:
              type: string
              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 "
            SkipValidation:
              type: boolean
              description: >-
                If you set this field to true, Zuora will create the payment
                method without making Authorization calls to the gateway. The
                static field value check will remain as is.

                **Character limit**: 5 **Values**: `true` or `false` 
            State:
              type: string
              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 
            StreetName:
              type: string
              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 
            StreetNumber:
              type: string
              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 
            TokenId:
              type: string
              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:
              type: string
              description: The type of payment method. If you want to create an Amazon Pay
                payment method, specify `CreditCardReferenceTransaction` for
                this field.
              enum:
                - ACH
                - BankTransfer
                - CreditCard
                - CreditCardReferenceTransaction
                - DebitCard
                - PayPal
            UseDefaultRetryRule:
              type: boolean
              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` 
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
    ProxyCreateProduct:
      allOf:
        - required:
            - EffectiveEndDate
            - EffectiveStartDate
            - Name
          type: object
          properties:
            AllowFeatureChanges:
              type: boolean
              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) 
            Category:
              type: string
              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
            Description:
              type: string
              description: " A descriptionof the product. **Character limit**: 500 **Values**:
                a string of 500 characters or fewer "
            EffectiveEndDate:
              type: string
              description: "The date when the product expires and can't be subscribed to
                anymore, in `yyyy-mm-dd` format. **Character limit**: 29 "
              format: date
            EffectiveStartDate:
              type: string
              description: "The date when the product becomes available and can be subscribed
                to, in `yyyy-mm-dd` format. **Character limit**: 29 "
              format: date
            Name:
              type: string
              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 "
            SKU:
              type: string
              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
        - $ref: "#/components/schemas/ProductObjectNSFields"
        - $ref: "#/components/schemas/ProductObjectCustomFields"
    ProxyCreateProductRatePlan:
      allOf:
        - required:
            - Name
            - ProductId
          type: object
          properties:
            Description:
              type: string
              description: "A description of the product rate plan. **Character limit**: 500
                **Values**: a string of 500 characters or fewer "
            EffectiveEndDate:
              type: string
              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
            EffectiveStartDate:
              type: string
              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
            Name:
              type: string
              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 "
            ProductId:
              type: string
              description: "The ID of the product that contains the product rate plan.
                **Character limit**: 32 **Values**: a string of 32 characters or
                fewer "
        - $ref: "#/components/schemas/ProductRatePlanObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanObjectCustomFields"
    ProxyCreateProductRatePlanCharge:
      allOf:
        - type: object
          properties:
            AccountingCode:
              type: string
              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 "
            ApplyDiscountTo:
              type: string
              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)`
            BillCycleDay:
              type: integer
              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
            BillCycleType:
              type: string
              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.
            BillingPeriod:
              type: string
              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`. 
            BillingPeriodAlignment:
              type: string
              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`
            BillingTiming:
              type: string
              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/).

            ChargeModel:
              type: string
              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`
            ChargeType:
              type: string
              description: |2
                 Specifies the type of charge.
                **Character limit**: 9 **Values**: one of the following:

                - `OneTime`
                - `Recurring`
                - `Usage`
            DefaultQuantity:
              type: number
              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
            DeferredRevenueAccount:
              type: string
              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/).

            Description:
              type: string
              description: "A description of the charge. **Character limit**: 500 **Values**:
                a string of 500 characters or fewer "
            DiscountLevel:
              type: string
              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`
            EndDateCondition:
              type: string
              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. 
            IncludedUnits:
              type: number
              description: "Specifies the number of units in the base set of units.
                **Character limit**: 16 **Values**: a positive decimal value "
              format: double
            LegacyRevenueReporting:
              type: boolean
              description: ""
            ListPriceBase:
              type: string
              description: >
                The list price base for the product rate plan charge.
                **Values**: one of the following:


                - `Per Month`

                - `Per Billing Period`

                - `Per Week`
            MaxQuantity:
              type: number
              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
            MinQuantity:
              type: number
              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
            Name:
              type: string
              description: "The name of the product rate plan charge. **Character limit**: 100
                **Values**: a string of 100 characters or fewer "
            NumberOfPeriod:
              type: integer
              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
            OverageCalculationOption:
              type: string
              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.
            OverageUnusedUnitsCreditOption:
              type: string
              description: >2
                 Determines whether to credit the customer with unused units of usage.
                **Character limit**: 20 **Values**: one of the following:


                - `NoCredit`

                - `CreditBySpecificRate`
            PriceChangeOption:
              type: string
              description: >2
                 Applies an automatic price change when a termed subscription is renewed.
                **Character limit**: **Values**: one of the following:


                - `NoChange` (default)

                - `SpecificPercentageValue`

                - `UseLatestProductCatalogPricing`
            PriceIncreaseOption:
              type: string
              description: >
                Applies an automatic price change when a termed subscription is
                renewed.
              enum:
                - FromTenantPercentageValue
                - SpecificPercentageValue
            PriceIncreasePercentage:
              type: number
              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
            ProductRatePlanChargeTierData:
              $ref: "#/components/schemas/ProxyCreateOrModifyProductRatePlanChargeTierData"
            ProductRatePlanId:
              type: string
              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 
            RatingGroup:
              type: string
              description: >
                Specifies a rating group based on which usage records are rated.


                **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/).


                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`.
            RecognizedRevenueAccount:
              type: string
              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/).

            RevRecCode:
              type: string
              description: "Associates this product rate plan charge with a specific revenue
                recognition code. **Character limit**: 70 **Values**: a valid
                revenue recognition code "
            RevRecTriggerCondition:
              type: string
              description: |2
                 Specifies when revenue recognition begins.
                **Character limit**: 22 **Values**: one of the following:

                - `ContractEffectiveDate`
                - `ServiceActivationDate`
                - `CustomerAcceptanceDate`
            RevenueRecognitionRuleName:
              type: string
              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`
            SmoothingModel:
              type: string
              description: >2
                 Specifies the smoothing model for an overage smoothing charge model.
                **Character limit**: 22 **Values**: one of the following:


                - `RollingWindow`

                - `Rollover`
            SpecificBillingPeriod:
              type: integer
              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
            TaxCode:
              type: string
              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`. 
            TaxMode:
              type: string
              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`. 
            Taxable:
              type: boolean
              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`. 
            TriggerEvent:
              type: string
              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.
            UOM:
              type: string
              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
            UpToPeriods:
              type: integer
              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
            UpToPeriodsType:
              type: string
              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`.
            UsageRecordRatingOption:
              type: string
              description: >
                Determines how Zuora processes usage records for per-unit usage
                charges. 
              default: EndOfBillingPeriod
              enum:
                - EndOfBillingPeriod
                - OnDemand
            UseDiscountSpecificAccountingCode:
              type: boolean
              description: "Determines whether to define a new accounting code for the new
                discount charge. **Character limit**: 5 **Values**: `True`,
                `False` "
            UseTenantDefaultForPriceChange:
              type: boolean
              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` "
            WeeklyBillCycleDay:
              type: string
              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`
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectCustomFields"
    ProxyCreateRefund:
      allOf:
        - required:
            - Amount
            - Type
          type: object
          properties:
            AccountId:
              type: string
              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 
            Amount:
              type: number
              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, then you can create a partial refund. However, if the payment was applies to multiple invoices, then you can only make a partial refund through the web-based UI, not through the API.
                **Character limit**: 16 **Values**: a valid currency amount 
              format: double
            Comment:
              type: string
              description: >-2
                 Use this field to record comments about the refund.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            GatewayOptionData:
              required:
                - GatewayOption
              type: object
              properties:
                GatewayOption:
                  maxItems: 200
                  minItems: 0
                  type: array
                  description: ""
                  items:
                    $ref: "#/components/schemas/GatewayOption"
              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.
            GatewayState:
              type: string
              description: |-2
                 The status of the payment in the gateway.
                **Character limit**: 19 **Values**: automatically generated 
            MethodType:
              type: string
              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`
            PaymentMethodId:
              type: string
              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 
            ReasonCode:
              type: string
              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 
            RefundDate:
              type: string
              description: >-2
                 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.
                **Character limit**: 29 
              format: date
            RefundInvoicePaymentData:
              required:
                - RefundInvoicePayment
              type: object
              properties:
                RefundInvoicePayment:
                  maxItems: 200
                  minItems: 0
                  type: array
                  description: ""
                  items:
                    $ref: "#/components/schemas/RefundInvoicePayment"
              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.
            SoftDescriptor:
              type: string
              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
            SoftDescriptorPhone:
              type: string
              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
            SourceType:
              type: string
              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`.
                **Character limit**: 13 **Values**:


                - `Payment`

                - `CreditBalance`
            Type:
              type: string
              description: |2
                 Specifies if the refund is electronic or external.
                **Character limit**: 10 **Values**:

                - `Electronic`
                - External
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    ProxyCreateTaxationItem:
      allOf:
        - required:
            - InvoiceItemId
            - Jurisdiction
            - Name
            - TaxAmount
            - TaxDate
            - TaxRate
            - TaxRateType
          type: object
          properties:
            AccountingCode:
              type: string
              description: " The Chart of Accounts "
            ExemptAmount:
              type: number
              description: >-2
                 The amount of taxes or VAT for which the customer has an exemption.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
            InvoiceItemId:
              type: string
              description: >-2
                 The ID of the specific invoice item that the taxation information applies to.
                **Character limit**: 32 **Values**: a valid invoice item ID 
            Jurisdiction:
              type: string
              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 
            LocationCode:
              type: string
              description: >-2
                 The identifier for the location based on the value of the `TaxCode` field.
                **Character limit**: 32 **Values**: automatically generated 
            Name:
              type: string
              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 
            TaxAmount:
              type: number
              description: |-2
                 The amount of the tax applied to the charge.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
            TaxCode:
              type: string
              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 
            TaxCodeDescription:
              type: string
              description: >-2
                 The description for the tax code.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            TaxDate:
              type: string
              description: >-2
                 The date that the tax is applied to the charge, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
            TaxRate:
              type: number
              description: |-2
                 The tax rate applied to the charge.
                **Character limit**: 16 **Values**: a valid decimal value 
              format: double
            TaxRateDescription:
              type: string
              description: >-2
                 The description of the tax rate.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            TaxRateType:
              type: string
              description: |-2
                 The type of the tax rate applied to the charge.
                **Character limit**: 10 **Values**: `Percentage`, `FlatFee` 
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    ProxyCreateUnitOfMeasure:
      required:
        - DecimalPlaces
        - UomName
      type: object
      properties:
        Active:
          type: boolean
          description: >-2
             Indicates if the UOM is available for new product rate plans. The default value is `true`.
            **Character limit**: 5 **Values**: `true`, `false ` 
        DecimalPlaces:
          type: integer
          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
        DisplayedAs:
          type: string
          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 "
        RoundingMode:
          type: string
          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` 
        UomName:
          type: string
          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 
      example:
        Active: true
        DecimalPlaces: 9
        DisplayedAs: name_display_name_1476935033519
        RoundingMode: UP
        UomName: name_1476935033519
    ProxyCreateUsage:
      allOf:
        - required:
            - Quantity
            - StartDateTime
            - UOM
          type: object
          properties:
            AccountId:
              type: string
              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. 
            AccountNumber:
              type: string
              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. 
            ChargeId:
              type: string
              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. "
            ChargeNumber:
              maxLength: 50
              type: string
              description: >
                A unique number for the rate plan charge related to the usage
                record. For example, C-00000007.
            Description:
              maxLength: 200
              type: string
              description: |
                A description of the usage record.
            EndDateTime:
              type: string
              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
            Quantity:
              type: number
              description: >-2
                 Indicates the number of units used.
                **Character limit**: 16 **Values**: a valid decimal amount equal to or greater than 0 
              format: double
            StartDateTime:
              type: string
              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
            SubmissionDateTime:
              type: string
              description: |-2
                 The date when usage was submitted.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            SubscriptionId:
              maxLength: 32
              type: string
              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.
            SubscriptionNumber:
              maxLength: 100
              type: string
              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.
            UOM:
              type: string
              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 
        - $ref: "#/components/schemas/UsageObjectCustomFields"
    ProxyDeleteResponse:
      type: object
      properties:
        id:
          type: string
          description: ""
        success:
          type: boolean
          description: ""
    ProxyGetAccount:
      allOf:
        - type: object
          properties:
            AccountNumber:
              type: string
              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
            AdditionalEmailAddresses:
              type: string
              description: "List of additional email addresses to receive emailed invoices.
                **Character limit**: 120 **Values**: comma-separated list of
                email addresses "
            AllowInvoiceEdit:
              type: boolean
              description: >-2
                 Indicates if associated invoices can be edited.
                **Character limit**: 5 **Values**: `true`, `false` (default if left null) 
            AutoPay:
              type: boolean
              description: >-2
                 Indicates if future payments are automatically collected when they're due during a Payment Run.
                **Character limit**: 5 **Values**: `true`, `false` (default) 
            Balance:
              type: number
              description: "Current outstanding balance for the account. **Character limit**:
                16 **Values**: automatically generated "
              format: double
            Batch:
              type: string
              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). 
            BcdSettingOption:
              type: string
              description: "Billing cycle day setting option. **Character limit**: 9
                **Values**: `AutoSet`, `ManualSet` "
            BillCycleDay:
              type: integer
              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
            BillToId:
              type: string
              description: "ID of the person to bill for the account. **Character limit**: 32
                **Values**: a valid contact ID for the account "
            CommunicationProfileId:
              type: string
              description: "Associates the account with a specified communication profile.
                **Character limit**: 32 **Values**: a valid communication
                profile ID "
            CreatedById:
              type: string
              description: "ID of the Zuora user who created the Account object. **Character
                limit**: 32 **Values**: automatically generated "
            CreatedDate:
              type: string
              description: "Date when the Account object was created. **Character limit**: 29
                **Values**: automatically generated "
              format: date-time
            CreditBalance:
              type: number
              description: "Total credit balance for the account. **Character limit**: 16
                **Values**: automatically generated "
              format: double
            CrmId:
              type: string
              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 "
            Currency:
              type: string
              description: " Currency that the customer is billed in. "
            CustomerServiceRepName:
              type: string
              description: "Name of the account's customer service representative, if
                applicable. **Character limit**: 50 **Values**: a string of 50
                characters or fewer "
            DefaultPaymentMethodId:
              type: string
              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 "
            Id:
              type: string
              description: Object identifier.
            InvoiceDeliveryPrefsEmail:
              type: boolean
              description: "Indicates if the customer wants to receive invoices through
                email.  **Character limit**: 5 **Values**: `true`, `false`
                (default if left null) "
            InvoiceDeliveryPrefsPrint:
              type: boolean
              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) "
            InvoiceTemplateId:
              type: string
              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 "
            LastInvoiceDate:
              type: string
              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
            Name:
              type: string
              description: "Name of the account as displayed in the Zuora UI. **Character
                limit**: 255 **Values**: a string of 255 characters or fewer "
            Notes:
              type: string
              description: " Comments about the account. **Character limit**: 65,535
                **Values**: a string of 65,535 characters "
            ParentId:
              type: string
              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 "
            PaymentGateway:
              type: string
              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
            PaymentTerm:
              type: string
              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 "
            PurchaseOrderNumber:
              type: string
              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 "
            SalesRepName:
              type: string
              description: "The name of the sales representative associated with this account,
                if applicable. **Character limit**: 50 **Values**: a string of
                50 characters or fewer "
            SoldToId:
              type: string
              description: "ID of the person who bought the subscription associated with the
                account. **Character limit**: 32 **Values**: a valid contact ID
                for the account "
            Status:
              type: string
              description: |
                Status of the account in the system.
              enum:
                - Draft
                - Active
                - Canceled
            TaxCompanyCode:
              type: string
              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 
            TaxExemptCertificateID:
              type: string
              description: "ID of your customer's tax exemption certificate. **Character
                limit**: 32 **Values**: a string of 32 characters or fewer "
            TaxExemptCertificateType:
              type: string
              description: "Type of the tax exemption certificate that your customer
                holds.  **Character limit**: 32 **Values**: a string of 32
                characters or fewer "
            TaxExemptDescription:
              type: string
              description: "Description of the tax exemption certificate that your customer
                holds. **Character limit**: 500 **Values**: a string of 500
                characters or fewer "
            TaxExemptEffectiveDate:
              type: string
              description: "Date when the the customer's tax exemption starts. **Character
                limit**: 29 **Version notes**: requires Zuora Tax "
              format: date
            TaxExemptExpirationDate:
              type: string
              description: "Date when the customer's tax exemption certificate
                expires  **Character limit**: 29 **Version notes**: requires
                Zuora Tax "
              format: date
            TaxExemptIssuingJurisdiction:
              type: string
              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 "
            TaxExemptStatus:
              type: string
              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`
            TotalInvoiceBalance:
              type: number
              description: "Total balance of the account's invoices. **Character limit**: 16
                **Values**: a valid currency value "
              format: double
            UpdatedById:
              type: string
              description: "ID of the user who last updated the account. **Character limit**:
                32 **Values**: automatically generated "
            UpdatedDate:
              type: string
              description: "Date when the account was last updated. **Character limit**: 29
                **Values**: automatically generated "
              format: date-time
            VATId:
              type: string
              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 
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
    ProxyGetAmendment:
      allOf:
        - type: object
          properties:
            AutoRenew:
              type: boolean
              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 
            Code:
              type: string
              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
            ContractEffectiveDate:
              type: string
              description: >-2
                 The date when the amendment's changes become effective for billing purposes.
                **Version notes**: -- 
              format: date
            CreatedById:
              type: string
              description: |-2
                 The user ID of the person who created the amendment.
                **Character limit**: 32 **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-2
                 The date when the amendment was created.
                **Values**: automatically generated 
              format: date-time
            CurrentTerm:
              type: integer
              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
            CurrentTermPeriodType:
              type: string
              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.
            CustomerAcceptanceDate:
              type: string
              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
            Description:
              type: string
              description: |-2
                 A description of the amendment.
                **Character limit**: 500 **Values**: maximum 500 characters 
            EffectiveDate:
              type: string
              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
            Id:
              type: string
              description: Object identifier.
            Name:
              type: string
              description: >-2
                 The name of the amendment.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
            RenewalSetting:
              type: string
              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 
            RenewalTerm:
              type: integer
              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
            RenewalTermPeriodType:
              type: string
              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`
            ServiceActivationDate:
              type: string
              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
            SpecificUpdateDate:
              type: string
              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
            Status:
              type: string
              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
            SubscriptionId:
              type: string
              description: |-2
                 The ID of the subscription that the amendment changes.
                **Character limit**: 32 **Values**: a valid subscription ID 
            TermStartDate:
              type: string
              description: |-2
                 The date when the new terms and conditions take effect.


                **Version notes**: -- 
              format: date
            TermType:
              type: string
              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:
              type: string
              description: >2
                 The type of amendment.
                **Character limit**: 18 **Values**: one of the following:


                - Cancellation

                - NewProduct

                - OwnerTransfer

                - RemoveProduct

                - Renewal

                - UpdateProduct

                - TermsAndConditions

                - SuspendSubscription (This value is in **Limited Availability**.)

                - ResumeSubscription (This value is in **Limited Availability**.)
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the amendment.
                **Character limit**: 32 **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the amendment was last updated.
                **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/AmendmentObjectCustomFields"
    ProxyGetBillRun:
      type: object
      properties:
        AccountId:
          type: string
          description: |
            ID of the account used for single account bill run.

            **Character limit:** 32
        AutoEmail:
          type: boolean
          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.
        AutoPost:
          type: boolean
          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.
        AutoRenewal:
          type: boolean
          description: >
            Determines whether to auto renew subscription or not by this bill
            run once the bill run completes.
        Batch:
          type: string
          description: >
            Batch of accounts for this bill run. 


            **Character limit:** 20


            **Values:** AllBatches or Batchn where n is a number between 1 and 50.
        BillCycleDay:
          type: string
          description: |
            The day of the bill cycle.

            **Character limit:** 32

            **Values:** `AllBillCycleDays` or 01 - 31.
        BillRunNumber:
          type: string
          description: |
            Number of the bill run.

            **Character limit:** 50

            **Values:** automatically generated
        CreatedById:
          type: string
          description: |
            The user ID of the person who created the bill run.

            **Character limit:** 32

            **Values:** automatically generated         
        CreatedDate:
          type: string
          description: |
            The date and time when the bill run was created.

            **Character limit:** 29

            **Values:** automatically generated           
          format: date-time
        ExecutedDate:
          type: string
          description: |
            The date and time when the bill run was executed.
          format: date-time
        Id:
          type: string
          description: |
            ID of the object.

            **Character limit:** 32

            **Values:** automatically generated
        InvoiceDate:
          type: string
          description: |
            Invoice date for this bill run.

            **Character limit:** 29
          format: date
        InvoicesEmailed:
          type: boolean
          description: |
            Indicates whether the invoice has been sent or not. 

            **Values:** automatically generated           
        LastEmailSentTime:
          type: string
          description: |
            The last time emails were sent for this bill run.

            **Character limit:** 29

            **Values:** automatically generated
          format: date-time
        NoEmailForZeroAmountInvoice:
          type: boolean
          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).
        NumberOfAccounts:
          type: integer
          description: |
            The number of accounts processed by this bill run.

            **Values:** automatically generated
          format: int64
        NumberOfInvoices:
          type: integer
          description: |
            The number of invoices generated by this  run.

            **Values:** automatically generated
          format: int64
        Status:
          type: string
          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`
        TargetDate:
          type: string
          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
        UpdatedById:
          type: string
          description: |
            The user ID of the person who last updated the bill run.

            **Character limit:** 32

            **Values:** automatically generated         
        UpdatedDate:
          type: string
          description: |
            The date and time when the bill run was last updated.

            **Character limit:** 29

            **Values:** automatically generated 
          format: date-time
    ProxyGetCommunicationProfile:
      type: object
      properties:
        CreatedById:
          type: string
          description: ""
        CreatedDate:
          type: string
          description: ""
          format: date-time
        Description:
          type: string
          description: ""
        Id:
          type: string
          description: Object identifier.
        ProfileName:
          type: string
          description: ""
        UpdatedById:
          type: string
          description: ""
        UpdatedDate:
          type: string
          description: ""
          format: date-time
    ProxyGetContact:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              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 
            Address1:
              type: string
              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 
            Address2:
              type: string
              description: >-2
                 The second line of the contact's address.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            City:
              type: string
              description: >-2
                 The city of the contact's address.
                **Character limit**: 40 **Values: **a string of 40 characters or fewer 
            Country:
              type: string
              description: " The country of the contact's address. "
            County:
              type: string
              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 
            CreatedById:
              type: string
              description: "The ID of the Zuora user who created the contact. **Character
                limit**: 32 **Values**: automatically generated "
            CreatedDate:
              type: string
              description: "The date when the contact was created. **Character limit**: 29
                **Values**: automatically generated "
              format: date-time
            Description:
              type: string
              description: >-2
                 A description for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
            Fax:
              type: string
              description: >-2
                 The contact's fax number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            FirstName:
              type: string
              description: >-2
                 The contact's first name.
                **Character limit**: 100 **Values**: a string of the contact's first name 
            HomePhone:
              type: string
              description: >-2
                 The contact's home phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            Id:
              type: string
              description: Object identifier.
            LastName:
              type: string
              description: >-2
                 The contact's last name.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
            MobilePhone:
              type: string
              description: >-2
                 The contact's mobile phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            NickName:
              type: string
              description: >-2
                 A nickname for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
            OtherPhone:
              type: string
              description: >-2
                 An additional phone number for the contact.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            OtherPhoneType:
              type: string
              description: "The type of the `OtherPhone`. **Character limit**: 20 **Values**:
                `Work`, `Mobile`, `Home`, `Other` "
            PersonalEmail:
              type: string
              description: >-2
                 The contact's personal email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
            PostalCode:
              type: string
              description: >-2
                 The zip code for the contact's address.
                **Character limit:** 20 **Values: **a string of 20 characters or fewer 
            State:
              type: string
              description: " The state or province of the contact's address. "
            TaxRegion:
              type: string
              description: "If using Zuora Tax rules "
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who lasted updated the contact.
                **Character limit**: 32 **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the contact was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            WorkEmail:
              type: string
              description: >-2
                 The contact's business email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
            WorkPhone:
              type: string
              description: >-2
                 The contact's business phone number.
                **Character limit**: 40 **notes**: -- **Values**: a string of 40 characters or fewer 
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    ProxyGetCreditBalanceAdjustment:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              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
            AccountingCode:
              type: string
              description: " The Chart of Accounts "
            AdjustmentDate:
              type: string
              description: |-2
                 The date when the credit balance adjustment is applied.
                **Character limit**: 29 **Values**: automatically generated 
              format: date
            Amount:
              type: number
              description: |-2
                 The amount of the adjustment.
                **Character limit**: 16 **Values**: a valid currency amount 
              format: double
            CancelledOn:
              type: string
              description: |-2
                 The date when the credit balance adjustment was canceled.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            Comment:
              type: string
              description: >-2
                 Use this field to record comments about the credit balance adjustment.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            CreatedById:
              type: string
              description: >-2
                 The user ID of the person who created the credit balance adjustment.
                **Character limit**: 32 **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-2
                 The date when the credit balance adjustmentwas generated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            Id:
              type: string
              description: Object identifier.
            Number:
              type: string
              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 
            ReasonCode:
              type: string
              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 
            ReferenceId:
              type: string
              description: >-2
                 The ID of the payment that the credit balance adjustment is for.
                **Character limit**: 32 **Values**: a string of 60 characters or fewer 
            SourceTransactionId:
              type: string
              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
            SourceTransactionNumber:
              type: string
              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
            SourceTransactionType:
              type: string
              description: >2
                 The source of the credit balance adjustment.
                **Character limit**: **Values**: automatically generated; one of the following:


                - Invoice

                - Payment

                - Refund
            Status:
              type: string
              description: >2
                 The status of the credit balance adjustment.
                **Character limit**: 9 **Values**: automatically generated; one of the following:


                - Processed

                - Canceled
            TransferredToAccounting:
              type: string
              description: >
                Status of the credit balance adjustment's transfer to an
                external accounting system, such as NetSuite.
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
            Type:
              type: string
              description: Create Query Filter
            UpdatedById:
              type: string
              description: >-2
                 The ID of the user who last updated the credit balance adjustment.
                **Character limit**: 32 **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the credit balance adjustment was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectNSFields"
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectCustomFields"
    ProxyGetExport:
      type: object
      properties:
        ConvertToCurrencies:
          type: string
          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 
        CreatedById:
          type: string
          description: |-2
             The user ID of the person who created the export.
            **Character limit**: 32 **Values**: automatically generated 
        CreatedDate:
          type: string
          description: |-2
             The date when the import was created.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
        Encrypted:
          type: boolean
          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 
        FileId:
          type: string
          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 
        Format:
          type: string
          description: |-2
             The format that you want the export file to use.
            **Character limit**: 5 
          enum:
            - csv
            - html
            - Excel
        Id:
          type: string
          description: Object identifier.
        Name:
          type: string
          description: >-2
             The name of the export.
            **Character limit**: 255 **Values**: a string of 255 characters or fewer 
        Query:
          type: string
          description: >
            [Export
            ZOQL](https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL)
            query.
        Size:
          type: integer
          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
        Status:
          type: string
          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
        StatusReason:
          type: string
          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 
        UpdatedById:
          type: string
          description: |-2
             The ID of the user who last updated the export.
            **Character limit**: 32 **Values**: automatically generated 
        UpdatedDate:
          type: string
          description: |-2
             The date when the expotr was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
        Zip:
          type: boolean
          description: >-2
             Indicates if you want the resulting export file to be compressed into a zip file.
            **Character limit**: **Values**: true, false (default) 
    ProxyGetFeature:
      allOf:
        - type: object
          properties:
            CreatedById:
              type: string
              description: " Internal Zuora ID of the user who created the feature **Character
                limit**: 32 "
            CreatedDate:
              type: string
              description: " Date and time when the feature was created **Character limit**:
                29 "
              format: date-time
            Description:
              type: string
              description: " Description of the feature **Character limit**: 1000 "
            FeatureCode:
              type: string
              description: " Unique code of the feature **Character limit**: 255 "
            Id:
              type: string
              description: Object identifier.
            Name:
              type: string
              description: " Name of the feature **Character limit**: 255 "
            Status:
              type: string
              description: " Status of the feature, Active or Inactive **Character limit**: 8
                "
            UpdatedById:
              type: string
              description: " Internal Zuora ID of the user who last updated the feature
                **Character limit**: 32 "
            UpdatedDate:
              type: string
              description: " Date and time when the feature was last updated **Character
                limit**: 29 "
              format: date-time
        - $ref: "#/components/schemas/FeatureObjectCustomFields"
    ProxyGetImport:
      type: object
      properties:
        CreatedById:
          type: string
          description: |-2
             The user ID of the person who created the import.

            **Character limit**: 32

            **Values**: automatically generated 
        CreatedDate:
          type: string
          description: |-2
             The date when the import was created.

            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
        Id:
          type: string
          description: Object identifier.
        ImportType:
          type: string
          description: |-2
             The type of item imported.

            **Character limit**: 7

            **Values**: Usage 
        ImportedCount:
          type: integer
          description: |-
            The number of records successfully imported.

            **Values**: automatically generated 
          format: int32
        Md5:
          type: string
          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 
        Name:
          type: string
          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>`
        OriginalResourceUrl:
          type: string
          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 
        ResultResourceUrl:
          type: string
          description: |-2
             The URL for the import result file, which is a zipped CSV file.

            **Values**: automatic dynamically-generated URL 
        Status:
          type: string
          description: >
            The status of the import process.


            **Values**: automatically generated using one of the following values:


            - Pending

            - Processing

            - Completed

            - Failed
        StatusReason:
          type: string
          description: >-2
             The reason for the system-generated status. Use this information if the import fails.

            **Character limit**: 2000


            **Values**: automatically generated error message 
        TotalCount:
          type: integer
          description: |-2
             The number of records in the import file.

            **Character limit**:

            **Values**: automatically generated 
          format: int32
        UpdatedById:
          type: string
          description: |-2
             The ID of the user who last updated the import.

            **Character limit**: 32

            **Values**: automatically generated 
        UpdatedDate:
          type: string
          description: |-2
             The date when the import was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
    ProxyGetInvoice:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              description: ""
            AdjustmentAmount:
              type: number
              description: " The amount of the invoice adjustments associated with the
                invoice. **Character limi**t: 16 **Values**: a valid currency
                amount "
              format: double
            Amount:
              type: number
              description: |-2
                 The sum of all charges and taxes associated with the invoice.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
            AmountWithoutTax:
              type: number
              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
            Balance:
              type: number
              description: >-2
                 The remaining balance of the invoice after all payments, adjustments, and refunds are applied.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
            Body:
              type: string
              description: " Required "
            Comments:
              type: string
              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 
            CreatedById:
              type: string
              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 
            CreatedDate:
              type: string
              description: |-2
                 The date when the invoice was generated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            CreditBalanceAdjustmentAmount:
              type: number
              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
            DueDate:
              type: string
              description: |-2
                 The date by which the payment for this invoice is due.
                **Character limit**: 29 **Version notes**: -- 
              format: date
            Id:
              type: string
              description: Object identifier.
            IncludesOneTime:
              type: boolean
              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.
              default: true
            IncludesRecurring:
              type: boolean
              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.
              default: true
            IncludesUsage:
              type: boolean
              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.
              default: true
            InvoiceDate:
              type: string
              description: |-2
                 Specifies the date on which to generate the invoice.
                **Character limit**: 29 **Version notes**: -- 
              format: date
            InvoiceNumber:
              type: string
              description: >-2
                 The unique identification number for the invoice. This number is returned as a string.
                **Character limit**: 32 **Values**: automatically generated 
            LastEmailSentDate:
              type: string
              description: |-2
                 The date when the invoice was last emailed.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            PaymentAmount:
              type: number
              description: |-2
                 The amount of payments applied to the invoice.
                **Character limit**: 16 **Value**s: automatically generated 
              format: double
            PostedBy:
              type: string
              description: >-2
                 The user ID of the person who moved the invoice to Posted status.
                **Character limit**: 32 **Values**: automatically generated 
            PostedDate:
              type: string
              description: |-2
                 The date when the invoice was posted.
                **Character limit:** 29 **Values**: automatically generated 
              format: date-time
            RefundAmount:
              type: number
              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
            Status:
              type: string
              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

            TargetDate:
              type: string
              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
            TaxAmount:
              type: number
              description: |-2
                 The total amount of the taxes applied to the invoice.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
            TaxExemptAmount:
              type: number
              description: |-2
                 The total amount of the invoice that is exempt from taxation.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
            TransferredToAccounting:
              type: string
              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 
            UpdatedById:
              type: string
              description: ""
            UpdatedDate:
              type: string
              description: |-2
                 The date when the invoice was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
    ProxyGetInvoiceAdjustment:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              description: >-2
                 The ID of the account that owns the invoice.
                **Character limit**: 32 **Values**: inherited from Account.ID for the invoice owner 
            AccountingCode:
              type: string
              description: "The accounting code for the invoice adjustment. "
            AdjustmentDate:
              type: string
              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
            AdjustmentNumber:
              type: string
              description: |-2
                 A unique string to identify an individual invoice adjustment.
                **Character limit**: 255 **Values**: automatically generated 
            Amount:
              type: number
              description: |-2
                 The amount of the invoice adjustment.
                **Character limit**: 16 **Values**: a valid currency amount 
              format: double
            CancelledById:
              type: string
              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 
            CancelledOn:
              type: string
              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
            Comments:
              type: string
              description: >-2
                 Use this field to record comments about the invoice adjustment.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            CreatedById:
              type: string
              description: |-2
                 The user ID of the person who created the invoice adjustment.
                **Character limit**: 32 **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-2
                 The date the invoice adjustment was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            CustomerName:
              type: string
              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. 
            CustomerNumber:
              type: string
              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. 
            Id:
              type: string
              description: Object identifier.
            ImpactAmount:
              type: number
              description: |-2
                 The amount that changes the balance of the associated invoice.
                **Character limit**: 16 **Values**: automatically calculated 
              format: double
            InvoiceId:
              type: string
              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 
            InvoiceNumber:
              type: string
              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 
            ReasonCode:
              type: string
              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 
            ReferenceId:
              type: string
              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 
            Status:
              type: string
              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` 
            TransferredToAccounting:
              type: string
              description: >
                Indicates the status of the adjustment's transfer to an external
                accounting system, such as NetSuite.
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
            Type:
              type: string
              description: >-2
                 Indicates whether the adjustment credits or debits the invoice amount.
                **Character limit**: 6 **Values**: `Credit`, `Charge` 
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the invoice.
                **Character limit**: 32 **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the invoice was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/InvoiceAdjustmentObjectCustomFields"
    ProxyGetInvoiceItem:
      allOf:
        - type: object
          properties:
            AccountingCode:
              type: string
              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` 
            AppliedToInvoiceItemId:
              type: string
              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 
            ChargeAmount:
              type: number
              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
            ChargeDate:
              type: string
              description: |-2
                 The date when the Invoice Item is created .
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            ChargeName:
              type: string
              description: >-2
                 The name of the invoice item's charge.
                **Character limi**t: 50 **Values: **inherited from `RatePlanCharge.Name` 
            CreatedById:
              type: string
              description: |-2
                 The user ID of the person who created the invoice item.
                **Character limit**: 32 **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-2
                 The date the invoice item was created.
                **Character limit:** 29 **Values**: automatically generated 
              format: date-time
            Id:
              type: string
              description: Object identifier.
            InvoiceId:
              type: string
              description: |-2
                 The ID of the invoice that's associated with this invoice item.
                **Character limit**: 32 **Values**: inherited from `Invoice.Id` 
            ProcessingType:
              type: number
              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
            ProductDescription:
              type: string
              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. 
            ProductName:
              type: string
              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. 
            Quantity:
              type: number
              description: |-2
                 The number of units for this invoice item.
                **Values**: inherited from `RatePlanCharge.Quantity` 
              format: double
            RatePlanChargeId:
              type: string
              description: >-2
                 The ID of the rate plan charge that's associated with this invoice item.
                **Character limit**: 32 **Values**: inherited from `RatePlanCharge.Id` 
            RevRecStartDate:
              type: string
              description: >-2
                 The date when revenue recognition is triggered.
                **Character limit**: 29 **Values**: generated from `InvoiceItem.RevRecTriggerCondition` 
              format: date
            SKU:
              type: string
              description: >-2
                 The unique SKU for the product associated with this invoice item.
                **Character limit**: 255 **Values**: inherited from `Product.SKU` 
            ServiceEndDate:
              type: string
              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
            ServiceStartDate:
              type: string
              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
            SubscriptionId:
              type: string
              description: >-2
                 The ID of the subscription associated with the invoice item.
                **Character limit**: 32 **Values**: inherited from `Subscription.Id` 
            TaxAmount:
              type: number
              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
            TaxCode:
              type: string
              description: >-2
                 Specifies the tax code for taxation rules.
                **Character limit**: 6 **Values**: inherited from `ProductRatePlanCharge.TaxCode` 
            TaxExemptAmount:
              type: number
              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
            TaxMode:
              type: string
              description: >-2
                 The tax mode of the invoice item.
                **Character limit**: 12 **Values**: `TaxExclusive`, `TaxInclusive` 
            UOM:
              type: string
              description: " Specifies the units to measure usage. **Character limit**:
                **Values**: inherited from `ProductRatePlanCharge.UOM` "
            UnitPrice:
              type: number
              description: >-2
                 The per-unit price of the invoice item.
                **Character limit**: **Values**: calculated from multiple fields in ProductRatePlanCharge and ProductRatePlanChargeTier objets 
              format: double
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the invoice item.
                **Character limit**: 32 **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the invoice item was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/InvoiceItemObjectNSFields"
        - $ref: "#/components/schemas/InvoiceItemObjectCustomFields"
    ProxyGetInvoiceItemAdjustment:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              description: |-2
                 The ID of the account that owns the invoice.
                **Values**: inherited from `Account.ID` for the invoice owner 
            AccountingCode:
              type: string
              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` 
            AdjustmentDate:
              type: string
              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
            AdjustmentNumber:
              type: string
              description: >-2
                 A unique string to identify an individual invoice item adjustment.
                **Character limit**: 255 **Values**: automatically generated 
            Amount:
              type: number
              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
            CancelledById:
              type: string
              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 
            CancelledDate:
              type: string
              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
            Comment:
              type: string
              description: >-2
                 Use this field to record comments about the invoice item adjustment.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            CreatedById:
              type: string
              description: |-2
                 The user ID of the person who created the invoice item.
                **Character limit**: 32 **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-2
                 The date the invoice item was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            CustomerName:
              type: string
              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. 
            CustomerNumber:
              type: string
              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. 
            Id:
              type: string
              description: Object identifier.
            InvoiceId:
              type: string
              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 
            InvoiceItemName:
              type: string
              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` 
            InvoiceNumber:
              type: string
              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 
            ReasonCode:
              type: string
              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 
            ReferenceId:
              type: string
              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 
            ServiceEndDate:
              type: string
              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
            ServiceStartDate:
              type: string
              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
            SourceId:
              type: string
              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 
            SourceType:
              type: string
              description: |-2
                 The type of adjustment.
                **Character limit**: 13 **Values**: InvoiceDetail, Tax 
            Status:
              type: string
              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 
            TransferredToAccounting:
              type: string
              description: >
                Indicates the status of the adjustment's transfer to an external
                accounting system, such as NetSuite.
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the invoice item.
                **Character limit**: 32 **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the invoice item was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/InvoiceItemAdjustmentObjectNSFields"
        - $ref: "#/components/schemas/InvoiceItemAdjustmentObjectCustomFields"
    ProxyGetInvoicePayment:
      type: object
      properties:
        Amount:
          type: number
          description: |-2
             The amount of the payment.
            **Character limit**: 16 **Values**: a valid currency amount 
          format: double
        CreatedById:
          type: string
          description: |-2
             The user ID of the person who created the invoice payment.
            **Character limit**: 32 **V****alues**: automatically generated 
        CreatedDate:
          type: string
          description: |-2
             The date when the invoice payment was generated.
            **Character limit**: 29 **V****alues**: automatically generated 
          format: date-time
        Id:
          type: string
          description: Object identifier.
        InvoiceId:
          type: string
          description: |-2
             The unique ID of the invoice associated with this invoice payment.
            **Character limit**: 32 **Values**: a valid invoice ID 
        PaymentId:
          type: string
          description: |-2
             The unique ID of the payment associated with this invoice payment.
            **Character limit**: 32 **V****alues**: a valid payment ID 
        RefundAmount:
          type: number
          description: "Specifies the amount of a refund applied against this
            InvoicePayment. **Character limit**: 16 **Values**: automatically
            generated "
          format: double
        UpdatedById:
          type: string
          description: |-2
             The ID of the user who last updated the invoice payment.
            **Character limit**: 32 **V****alues**: automatically generated 
        UpdatedDate:
          type: string
          description: |-2
             The date when the invoice payment was last updated.
            **Character limit**: 29 **V****alues**: automatically generated 
          format: date-time
    ProxyGetInvoiceSplit:
      type: object
      properties:
        CreatedById:
          type: string
          description: "The ID of the Zuora user who created the InvoiceSplit object.
            **Character limit**: 32 **Values**: automatically generated "
        CreatedDate:
          type: string
          description: "The date when the InvoiceSplit object was created. **Character
            limit**: 29 **Values**: automatically generated "
          format: date-time
        Id:
          type: string
          description: Object identifier.
        InvoiceId:
          type: string
          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 
        UpdatedById:
          type: string
          description: "The ID of the Zuora user who last updated the invoice split.
            **Character limit**: 32 **Values**: automatically generated "
        UpdatedDate:
          type: string
          description: "The date when the invoice split was last updated. **Values**:
            automatically generated "
          format: date-time
    ProxyGetInvoiceSplitItem:
      type: object
      properties:
        CreatedById:
          type: string
          description: |-2
             The ID of the Zuora user who created the InvoiceSplitItem object.
            **Character limit**: 32 **Values**: automatically generated 
        CreatedDate:
          type: string
          description: |-2
             The date when the InvoiceSplitItem was created.
            **Values**: automatically generated 
          format: date-time
        Id:
          type: string
          description: Object identifier.
        InvoiceDate:
          type: string
          description: >-2
             The generation date of the new split invoice, in `yyyy-mm-dd` format.
            **Character limit**: 29 
          format: date
        InvoiceId:
          type: string
          description: |-2
             The new invoice after the split.
            **Character limit**: 32 **Values**: automatically generated 
        InvoiceSplitId:
          type: string
          description: >-2
             The ID of the invoice split associated with the individual invoice split item.
            **Character limit**: 32 **Values**: a valid invoice split ID 
        PaymentTerm:
          type: string
          description: |-2
             Indicates when the customer pays the split invoice.
            **Values**: a valid, active payment term 
        SplitPercentage:
          type: number
          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
        UpdatedById:
          type: string
          description: |-2
             The ID of the Zuora user who last updated the invoice split.
            **Character limit**: 32 **Values**: automatically generated 
        UpdatedDate:
          type: string
          description: |-2
             The date when the invoice split was last updated.
            **Values**: automatically generated 
          format: date-time
    ProxyGetPayment:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              description: |
                The unique account ID for the customer that the payment is for.
            AccountingCode:
              type: string
              description: >
                The aacccounting code for the payment. Accounting codes group
                transactions that contain similar accounting attributes.
            Amount:
              type: number
              description: |
                The amount of the payment.
              format: double
            AppliedCreditBalanceAmount:
              type: number
              description: |
                The amount of the payment to apply to a credit balance.
              format: double
            AuthTransactionId:
              type: string
              description: |
                The authorization transaction ID from the payment gateway. 
            BankIdentificationNumber:
              type: string
              description: >
                The first six digits of the credit card or debit card used for
                the payment, when applicable. 
            CancelledOn:
              type: string
              description: |
                The date and time when the payment was canceled.
              format: date-time
            Comment:
              type: string
              description: |
                Additional information related to the payment.
            CreatedById:
              type: string
              description: |
                The ID of the Zuora user who created the payment.
            CreatedDate:
              type: string
              description: |
                The date and time when the payment was created.
              format: date-time
            EffectiveDate:
              type: string
              description: |
                The date when the payment takes effect.
              format: date
            Gateway:
              type: string
              description: |
                The name of the gateway instance that processes the payment. 
            GatewayOrderId:
              type: string
              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.
            GatewayResponse:
              type: string
              description: >
                The message returned from the payment gateway for the payment.
                This message is gateway-dependent.
            GatewayResponseCode:
              type: string
              description: >
                The code returned from the payment gateway for the payment. This
                code is gateway-dependent.
            GatewayState:
              type: string
              description: >
                The status of the payment in the gateway; use for reconciliation.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
            Id:
              type: string
              description: >
                The unique ID of a payment. For example,
                2c92c095592623ea01596621ada84352.
            MarkedForSubmissionOn:
              type: string
              description: >
                The date and time when a payment was marked and waiting for
                batch submission to the payment process. 
              format: date-time
            PaymentMethodId:
              type: string
              description: |
                The ID of the payment method used for the payment. 
            PaymentMethodSnapshotId:
              type: string
              description: >
                The unique ID of the payment method snapshot which is a copy of
                the particular payment method used in a transaction.
            PaymentNumber:
              type: string
              description: >
                The unique identification number of the payment. For example,
                P-00000028.
            ReferenceId:
              type: string
              description: >
                The transaction ID returned by the payment gateway. Use this
                field to reconcile payments between your gateway and Zuora
                Payments.
            RefundAmount:
              type: number
              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
            SecondPaymentReferenceId:
              type: string
              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.
            SettledOn:
              type: string
              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
            SoftDescriptor:
              type: string
              description: >
                A payment gateway-specific field that maps to Zuora for the
                gateways, Orbital, Vantiv and Verifi. 
            SoftDescriptorPhone:
              type: string
              description: >
                A payment gateway-specific field that maps to Zuora for the
                gateways, Orbital, Vantiv and Verifi.
            Source:
              type: string
              description: >
                How the payment was created, whether through the API, manually,
                import, or payment run.
              enum:
                - PaymentRun
                - Import
                - Manually
                - API
            SourceName:
              type: string
              description: >
                The name of the source. The value is a Payment Run number or a
                file name.
            Status:
              type: string
              description: >
                The status of the payment in Zuora. The value depends on the
                type of payment.


                For electronic payments, the status can be `Processed`, `Processing`, `Error`, or `Voided`. For external payments, the status can be `Processed` or `Canceled`.
              enum:
                - Processed
                - Processing
                - Error
                - Voided
                - Canceled
            SubmittedOn:
              type: string
              description: |
                The date and time when the payment was submitted.
              format: date-time
            TransferredToAccounting:
              type: string
              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:
              type: string
              description: >
                The type of the payment, whether the payment is external or
                electronic.
              enum:
                - External
                - Electronic
            UpdatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the payment.
            UpdatedDate:
              type: string
              description: |
                The date and time when the payment was last updated.
              format: date-time
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
    ProxyGetPaymentMethod:
      type: object
      properties:
        AccountId:
          type: string
          description: " The ID of the customer account associated with this payment
            method. This field is not required for the account ID. "
        AchAbaCode:
          type: string
          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 
        AchAccountName:
          type: string
          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 
        AchAccountNumberMask:
          type: string
          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 
        AchAccountType:
          type: string
          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`
        AchAddress1:
          type: string
          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 
        AchAddress2:
          type: string
          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 
        AchBankName:
          type: string
          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 
        Active:
          type: boolean
          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` 
        BankBranchCode:
          type: string
          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 
        BankCheckDigit:
          type: string
          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 "
        BankCity:
          type: string
          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 
        BankCode:
          type: string
          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 
        BankIdentificationNumber:
          type: string
          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 
        BankName:
          type: string
          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 
        BankPostalCode:
          type: string
          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 
        BankStreetName:
          type: string
          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 
        BankStreetNumber:
          type: string
          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 
        BankTransferAccountName:
          type: string
          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 
        BankTransferAccountNumber:
          type: string
          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
        BankTransferAccountNumberMask:
          type: string
          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 
        BankTransferAccountType:
          type: string
          description: >-2
             The type of the customer's bank account. Use this field for direct debit payment methods.
            **Character limit**: 11 **Values**: `DirectDebit` 
        BankTransferType:
          maxLength: 20
          type: string
          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)
        BusinessIdentificationCode:
          type: string
          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 
        City:
          type: string
          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 
        CompanyName:
          type: string
          description: |
            The name of the company.
        Country:
          type: string
          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 
        CreatedById:
          type: string
          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 
        CreatedDate:
          type: string
          description: >-2
             The date when the `PaymentMethod` object was created in the Zuora system.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
        CreditCardAddress1:
          type: string
          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 
        CreditCardAddress2:
          type: string
          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 
        CreditCardCity:
          type: string
          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 "
        CreditCardCountry:
          type: string
          description: " The country of the card holder's address. "
        CreditCardExpirationMonth:
          type: integer
          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
        CreditCardExpirationYear:
          type: integer
          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
        CreditCardHolderName:
          type: string
          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 
        CreditCardMaskNumber:
          type: string
          description: |-2
             A masked version of the credit or debit card number.
            **Character limit**: 32 **Values**: automatically generated 
        CreditCardPostalCode:
          type: string
          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 
        CreditCardState:
          type: string
          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. "
        CreditCardType:
          type: string
          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).
        DeviceSessionId:
          type: string
          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 
        Email:
          type: string
          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 
        ExistingMandate:
          type: string
          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` 
        FirstName:
          type: string
          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 
        IBAN:
          type: string
          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 
        IPAddress:
          type: string
          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 
        Id:
          type: string
          description: Object identifier.
        IdentityNumber:
          type: string
          description: |
            The unique identity number of the customer account. 
        IsCompany:
          type: boolean
          description: |
            Whether the customer account is a company.
        LastFailedSaleTransactionDate:
          type: string
          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
        LastName:
          type: string
          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 
        LastTransactionDateTime:
          type: string
          description: |-2
             The date of the most recent transaction.
            **Character limit**: 29 **Values**: a valid date and time value 
          format: date-time
        LastTransactionStatus:
          type: string
          description: |-2
             The status of the most recent transaction.
            **Character limit**: 39 **Values**: automatically generated 
        MandateCreationDate:
          type: string
          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
        MandateID:
          type: string
          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 
        MandateReceived:
          type: string
          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) 
        MandateUpdateDate:
          type: string
          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
        MaxConsecutivePaymentFailures:
          type: integer
          description: >-2
             Specifies the number of allowable consecutive failures Zuora attempts with the payment method before stopping.
            **Values**: a valid number 
        Name:
          type: string
          description: The name of the payment method.
        NumConsecutiveFailures:
          maximum: 100
          minimum: 0
          type: integer
          description: >
            The number of consecutive failed payments for this payment method.
            It is reset to `0` upon successful payment. 
          format: int32
        PaymentMethodStatus:
          type: string
          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`
        PaymentRetryWindow:
          type: integer
          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 
        PaypalBaid:
          type: string
          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 
        PaypalEmail:
          type: string
          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 
        PaypalPreapprovalKey:
          type: string
          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 
        PaypalType:
          type: string
          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` 
        Phone:
          type: string
          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 
        PostalCode:
          type: string
          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 
        SecondTokenId:
          type: string
          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 "
        State:
          type: string
          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 
        StreetName:
          type: string
          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 
        StreetNumber:
          type: string
          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 
        TokenId:
          type: string
          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 
        TotalNumberOfErrorPayments:
          type: integer
          description: |-2
             The number of error payments that used this payment method.
            **Character limit**: **Values**: automatically generated 
          format: int32
        TotalNumberOfProcessedPayments:
          type: integer
          description: |-2
             The number of successful payments that used this payment method.
            **Character limit**: **Values**: automatically generated 
          format: int32
        Type:
          type: string
          description: "The type of payment method. "
          enum:
            - ACH
            - ApplePay
            - BankTransfer
            - Cash
            - Check
            - CreditCard
            - CreditCardReferenceTransaction
            - DebitCard
            - Other
            - PayPal
            - WireTransfer
        UpdatedById:
          type: string
          description: |-2
             The ID of the user who last updated the payment method.
            **Character limit**: 32 **Values**: automatically generated 
        UpdatedDate:
          type: string
          description: |-2
             The date when the payment method was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
        UseDefaultRetryRule:
          type: boolean
          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` 
    ProxyGetPaymentMethodSnapshot:
      type: object
      properties:
        AccountId:
          type: string
          description: The ID of the customer account associated with this payment method.
        AchAbaCode:
          type: string
          description: The nine-digit routing number or ABA number used by banks.
            Applicable to ACH payment methods.
        AchAccountName:
          type: string
          description: The name of the account holder, which can be either a person or a
            company. Applicable to ACH payment methods.
        AchAccountNumberMask:
          type: string
          description: "This is a masked displayable version of the ACH account number,
            used for security purposes. For example: `XXXXXXXXX54321`."
        AchAccountType:
          type: string
          description: The type of bank account associated with the ACH payment.
          enum:
            - BusinessChecking
            - Checking
            - Saving
        AchBankName:
          type: string
          description: The name of the bank where the ACH payment account is held.
        BankBranchCode:
          type: string
          description: The branch code of the bank used for direct debit.
        BankCheckDigit:
          type: string
          description: The check digit in the international bank account number, which
            confirms the validity of the account. Applicable to direct debit
            payment methods.
        BankCity:
          type: string
          description: The city of the direct debit bank.
        BankCode:
          type: string
          description: The sort code or number that identifies the bank. This is also
            known as the sort code.
        BankIdentificationNumber:
          type: string
          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.
        BankName:
          type: string
          description: The name of the direct debit bank.
        BankPostalCode:
          type: string
          description: The zip code or postal code of the direct debit bank.
        BankStreetName:
          type: string
          description: The name of the street of the direct debit bank.
        BankStreetNumber:
          type: string
          description: The number of the direct debit bank.
        BankTransferAccountName:
          type: string
          description: The name on the direct debit bank account.
        BankTransferAccountNumberMask:
          type: string
          description: "This is a masked displayable version of the bank account number,
            used for security purposes. For example: `XXXXXXXXX54321`."
        BankTransferAccountType:
          type: string
          description: The type of the customer's bank account. Applicable to direct debit
            payment methods.
        BankTransferType:
          type: string
          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
        BusinessIdentificationCode:
          type: string
          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.
        City:
          type: string
          description: The city of the customer's address. Applicable to debit payment
            methods.
        CompanyName:
          type: string
          description: |
            The name of the company.
        Country:
          type: string
          description: The two-letter country code of the customer's address. Applicable
            to direct debit payment methods.
        CreditCardAddress1:
          type: string
          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.
        CreditCardAddress2:
          type: string
          description: The second line of the card holder's address. Applicable to credit
            card and direct debit payment methods.
        CreditCardCity:
          type: string
          description: The city of the card holder's address. Applicable to credit card
            and direct debit payment methods.
        CreditCardCountry:
          type: string
          description: The country of the card holder's address.
        CreditCardExpirationMonth:
          type: integer
          description: The expiration month of the credit card or debit card. Applicable
            to credit card and direct debit payment methods.
          format: int32
        CreditCardExpirationYear:
          type: integer
          description: The expiration month of the credit card or debit card. Applicable
            to credit card and direct debit payment methods.
          format: int32
        CreditCardHolderName:
          type: string
          description: The full name of the card holder. Applicable to credit card and
            direct debit payment methods.
        CreditCardMaskNumber:
          type: string
          description: A masked version of the credit or debit card number.
        CreditCardPostalCode:
          type: string
          description: The billing address's zip code.
        CreditCardState:
          type: string
          description: The billing address's state. Applicable if `CreditCardCountry` is
            either Canada or the US.
        CreditCardType:
          type: string
          description: The type of credit card or debit card.
          enum:
            - AmericanExpress
            - Discover
            - MasterCard
            - Visa
        DeviceSessionId:
          type: string
          description: The session ID of the user when the `PaymentMethod` was created or
            updated.
        Email:
          type: string
          description: An email address for the payment method in addition to the bill to
            contact email address.
        ExistingMandate:
          type: string
          description: Indicates if the customer has an existing mandate or a new mandate.
            Only applicable to direct debit payment methods.
          enum:
            - Yes
            - No
        FirstName:
          type: string
          description: The customer's first name. Only applicable to direct debit payment
            methods.
        IBAN:
          type: string
          description: The International Bank Account Number. Only applicable to direct
            debit payment methods.
        IPAddress:
          type: string
          description: The IP address of the user when the payment method was created or
            updated.
        Id:
          type: string
          description: Object identifier.
        IdentityNumber:
          type: string
          description: |
            The unique identity number of the customer account. 
        IsCompany:
          type: boolean
          description: |
            Whether the customer account is a company.
        LastFailedSaleTransactionDate:
          type: string
          description: The date of the last failed attempt to collect payment with this
            payment method.
          format: date-time
        LastName:
          type: string
          description: The customer's last name. Only applicable to direct debit payment
            methods.
        LastTransactionDateTime:
          type: string
          description: The date of the most recent transaction.
          format: date-time
        LastTransactionStatus:
          type: string
          description: The status of the most recent transaction.
        MandateCreationDate:
          type: string
          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
        MandateID:
          type: string
          description: The ID of the mandate. A mandate is a signed authorization for UK
            and NL customers. Only applicable to direct debit payment methods.
        MandateReceived:
          type: string
          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.
        MandateUpdateDate:
          type: string
          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
        MaxConsecutivePaymentFailures:
          type: integer
          description: The number of allowable consecutive failures Zuora attempts with
            the payment method before stopping.
        Name:
          type: string
          description: The name of the payment method.
        NumConsecutiveFailures:
          type: integer
          description: The number of consecutive failed payment for the payment method.
          format: int32
        PaymentMethodId:
          type: string
          description: Object identifier of the payment method.
        PaymentMethodStatus:
          type: string
          description: Specifies the status of the payment method.
          enum:
            - Active
            - Closed
        PaymentRetryWindow:
          type: integer
          description: The retry interval setting, which prevents making a payment attempt
            if the last failed attempt was within the last specified number of
            hours.
        PaypalBaid:
          type: string
          description: The PayPal billing agreement ID, which is a contract between two
            PayPal accounts.
        PaypalEmail:
          type: string
          description: The email address associated with the account holder's PayPal
            account or of the PayPal account of the person paying for the
            service.
        PaypalPreapprovalKey:
          type: string
          description: PayPal's Adaptive Payments API key.
        PaypalType:
          type: string
          description: "Specifies the PayPal gateway: PayFlow Pro (Express Checkout) or
            Adaptive Payments."
          enum:
            - ExpressCheckout
            - AdaptivePayments
        Phone:
          type: string
          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.
        PostalCode:
          type: string
          description: The zip code of the customer's address. Only applicable to direct
            debit payment methods.
        SecondTokenId:
          type: string
          description: A gateway unique identifier that replaces sensitive payment method
            data. Applicable to CC Reference Transaction payment methods.
        State:
          type: string
          description: The state of the customer's address. Only applicable to direct
            debit payment methods.
        StreetName:
          type: string
          description: The street name of the customer's address. Only applicable to
            direct debit payment methods.
        StreetNumber:
          type: string
          description: The street number of the customer's address. Only applicable to
            direct debit payment methods.
        TokenId:
          type: string
          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.
        TotalNumberOfErrorPayments:
          type: integer
          description: The number of error payments that used this payment method.
          format: int32
        TotalNumberOfProcessedPayments:
          type: integer
          description: The number of successful payments that used this payment method.
          format: int32
        Type:
          type: string
          description: The type of payment method.
          enum:
            - ACH
            - ApplePay
            - BankTransfer
            - Cash
            - Check
            - CreditCard
            - CreditCardReferenceTransaction
            - DebitCard
            - Other
            - PayPal
            - WireTransfer
        UseDefaultRetryRule:
          type: boolean
          description: Determines whether to use the default retry rules configured in the
            Zuora Payments settings.
    ProxyGetPaymentMethodTransactionLog:
      type: object
      properties:
        Gateway:
          type: string
          description: ""
        GatewayReasonCode:
          type: string
          description: ""
        GatewayReasonCodeDescription:
          type: string
          description: ""
        GatewayTransactionType:
          type: string
          description: ""
        Id:
          type: string
          description: Object identifier.
        PaymentMethodId:
          type: string
          description: ""
        PaymentMethodType:
          type: string
          description: ""
        RequestString:
          type: string
          description: ""
        ResponseString:
          type: string
          description: ""
        TransactionDate:
          type: string
          description: ""
          format: date-time
        TransactionId:
          type: string
          description: ""
    ProxyGetPaymentTransactionLog:
      type: object
      properties:
        AVSResponseCode:
          type: string
          description: >
            The response code returned by the payment gateway referring to the
            AVS international response of the payment transaction.
        BatchId:
          type: string
          description: >
            The ID of the batch used to send the transaction if the request was
            sent in a batch.
        CVVResponseCode:
          type: string
          description: >
            The response code returned by the payment gateway referring to the
            CVV international response of the payment transaction.
        Gateway:
          type: string
          description: >
            The name of the payment gateway used to transact the current payment
            transaction log.
        GatewayReasonCode:
          type: string
          description: >
            The code returned by the payment gateway for the payment. This code
            is gateway-dependent.
        GatewayReasonCodeDescription:
          type: string
          description: >
            The message returned by the payment gateway for the payment. This
            message is gateway-dependent. 
        GatewayState:
          type: string
          description: |
            The state of the transaction at the payment gateway.
          enum:
            - MarkedForSubmission
            - Submitted
            - Settled
            - NotSubmitted
            - FailedToSettle
        GatewayTransactionType:
          type: string
          description: >
            The type of the transaction, either making a payment, or canceling a
            payment. 
          enum:
            - Authorization
            - Sale
            - Void
            - Inquiry
            - VoidAuth
        Id:
          type: string
          description: |
            The ID of the payment transaction log.
        PaymentId:
          type: string
          description: >
            The ID of the payment wherein the payment transaction log was
            recorded. 
        RequestString:
          type: string
          description: |
            The payment transaction request string sent to the payment gateway. 
        ResponseString:
          type: string
          description: >
            The payment transaction response string returned by the payment
            gateway. 
        TransactionDate:
          type: string
          description: |
            The transaction date when the payment was performed. 
          format: date-time
        TransactionId:
          type: string
          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.
    ProxyGetProduct:
      allOf:
        - type: object
          properties:
            AllowFeatureChanges:
              type: boolean
              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) 
            Category:
              type: string
              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
            CreatedById:
              type: string
              description: "The ID of the Zuora user who created the `Product` object.
                **Character limit**: 32 **Values**: automatically generated "
            CreatedDate:
              type: string
              description: |-2
                 The date when the `Product` object was created.
                **Character limit**: n/a **Values**: automatically generated 
              format: date-time
            Description:
              type: string
              description: " A descriptionof the product. **Character limit**: 500 **Values**:
                a string of 500 characters or fewer "
            EffectiveEndDate:
              type: string
              description: "The date when the product expires and can't be subscribed to
                anymore, in `yyyy-mm-dd` format. **Character limit**: 29 "
              format: date
            EffectiveStartDate:
              type: string
              description: "The date when the product becomes available and can be subscribed
                to, in `yyyy-mm-dd` format. **Character limit**: 29 "
              format: date
            Id:
              type: string
              description: Object identifier.
            Name:
              type: string
              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 "
            SKU:
              type: string
              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
            UpdatedById:
              type: string
              description: "The ID of the last user to update the object. **Character limit**:
                32 **Values**: automatically generated "
            UpdatedDate:
              type: string
              description: "The date when the object was last updated. **Character limit**: 29
                **Values**: automatically generated "
              format: date-time
        - $ref: "#/components/schemas/ProductObjectNSFields"
        - $ref: "#/components/schemas/ProductObjectCustomFields"
    ProxyGetProductFeature:
      allOf:
        - type: object
          properties:
            CreatedById:
              type: string
              description: "The ID of the Zuora user who created the Account object.
                **Character limit**: 32 **Values**: automatically generated "
            CreatedDate:
              type: string
              description: "The date when the Account object was created. **Character limit**:
                29 **Values**: automatically generated "
              format: date-time
            FeatureId:
              type: string
              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 
            Id:
              type: string
              description: Object identifier.
            ProductId:
              type: string
              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 
            UpdatedById:
              type: string
              description: "The ID of the user who last updated the account. **Character
                limit**: 32 **Values**: automatically generated "
            UpdatedDate:
              type: string
              description: "The date when the account was last updated. **Character limit**:
                29 **Values**: automatically generated "
              format: date-time
        - $ref: "#/components/schemas/ProductFeatureObjectCustomFields"
    ProxyGetProductRatePlan:
      allOf:
        - type: object
          properties:
            CreatedById:
              type: string
              description: "The ID of the Zuora user who created the `ProductRatePlan` object.
                **Character limit**: 32 **Values**: automatically generated "
            CreatedDate:
              type: string
              description: |-2
                 The date when the `ProductRatePlan` object was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            Description:
              type: string
              description: "A description of the product rate plan. **Character limit**: 500
                **Values**: a string of 500 characters or fewer "
            EffectiveEndDate:
              type: string
              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
            EffectiveStartDate:
              type: string
              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
            Id:
              type: string
              description: Object identifier.
            Name:
              type: string
              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 "
            ProductId:
              type: string
              description: "The ID of the product that contains the product rate plan.
                **Character limit**: 32 **Values**: a string of 32 characters or
                fewer "
            UpdatedById:
              type: string
              description: "The ID of the last user to update the object. **Character limit**:
                32 **Values**: automatically generated "
            UpdatedDate:
              type: string
              description: "The date when the object was last updated. **Character limit**: 29
                **Values**: automatically generated "
              format: date-time
        - $ref: "#/components/schemas/ProductRatePlanObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanObjectCustomFields"
    ProxyGetProductRatePlanCharge:
      allOf:
        - type: object
          properties:
            AccountingCode:
              type: string
              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 "
            ApplyDiscountTo:
              type: string
              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)`
            BillCycleDay:
              type: integer
              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
            BillCycleType:
              type: string
              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.
            BillingPeriod:
              type: string
              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`. 
            BillingPeriodAlignment:
              type: string
              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`
            BillingTiming:
              type: string
              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/).

            ChargeModel:
              type: string
              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`
            ChargeType:
              type: string
              description: |2
                 Specifies the type of charge.
                **Character limit**: 9 **Values**: one of the following:

                - `OneTime`
                - `Recurring`
                - `Usage`
            CreatedById:
              type: string
              description: "The ID of the Zuora user who created the `ProductRatePlanCharge`
                object. **Character limit**: 32 **Values**: automatically
                generated "
            CreatedDate:
              type: string
              description: |-2
                 The date when the  `ProductRatePlanCharge` object was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            DefaultQuantity:
              type: number
              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
            DeferredRevenueAccount:
              type: string
              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/).

            Description:
              type: string
              description: "A description of the charge. **Character limit**: 500 **Values**:
                a string of 500 characters or fewer "
            DiscountLevel:
              type: string
              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`
            EndDateCondition:
              type: string
              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. 
            Id:
              type: string
              description: Object identifier.
            IncludedUnits:
              type: number
              description: "Specifies the number of units in the base set of units.
                **Character limit**: 16 **Values**: a positive decimal value "
              format: double
            LegacyRevenueReporting:
              type: boolean
              description: ""
            ListPriceBase:
              type: string
              description: >
                The list price base for the product rate plan charge.
                **Values**: one of the following:


                - `Per Month`

                - `Per Billing Period`

                - `Per Week`
            MaxQuantity:
              type: number
              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
            MinQuantity:
              type: number
              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
            Name:
              type: string
              description: "The name of the product rate plan charge. **Character limit**: 100
                **Values**: a string of 100 characters or fewer "
            NumberOfPeriod:
              type: integer
              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
            OverageCalculationOption:
              type: string
              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.
            OverageUnusedUnitsCreditOption:
              type: string
              description: >2
                 Determines whether to credit the customer with unused units of usage.
                **Character limit**: 20 **Values**: one of the following:


                - `NoCredit`

                - `CreditBySpecificRate`
            PriceChangeOption:
              type: string
              description: >2
                 Applies an automatic price change when a termed subscription is renewed.
                **Character limit**: **Values**: one of the following:


                - `NoChange` (default)

                - `SpecificPercentageValue`

                - `UseLatestProductCatalogPricing`
            PriceIncreasePercentage:
              type: number
              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
            ProductRatePlanId:
              type: string
              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 
            RecognizedRevenueAccount:
              type: string
              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/).

            RevRecCode:
              type: string
              description: "Associates this product rate plan charge with a specific revenue
                recognition code. **Character limit**: 70 **Values**: a valid
                revenue recognition code "
            RevRecTriggerCondition:
              type: string
              description: |2
                 Specifies when revenue recognition begins.
                **Character limit**: 22 **Values**: one of the following:

                - `ContractEffectiveDate`
                - `ServiceActivationDate`
                - `CustomerAcceptanceDate`
            RevenueRecognitionRuleName:
              type: string
              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`
            SmoothingModel:
              type: string
              description: >2
                 Specifies the smoothing model for an overage smoothing charge model.
                **Character limit**: 22 **Values**: one of the following:


                - `RollingWindow`

                - `Rollover`
            SpecificBillingPeriod:
              type: integer
              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
            TaxCode:
              type: string
              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`. 
            TaxMode:
              type: string
              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`. 
            Taxable:
              type: boolean
              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`. 
            TriggerEvent:
              type: string
              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.
            UOM:
              type: string
              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
            UpToPeriods:
              type: integer
              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
            UpToPeriodsType:
              type: string
              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`.
            UpdatedById:
              type: string
              description: "The ID of the last user to update the object. **Character limit**:
                32 **Values**: automatically generated "
            UpdatedDate:
              type: string
              description: "The date when the object was last updated. **Character limit**: 29
                **Values**: automatically generated "
              format: date-time
            UseDiscountSpecificAccountingCode:
              type: boolean
              description: "Determines whether to define a new accounting code for the new
                discount charge. **Character limit**: 5 **Values**: `True`,
                `False` "
            UseTenantDefaultForPriceChange:
              type: boolean
              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` "
            WeeklyBillCycleDay:
              type: string
              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`
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectCustomFields"
    ProxyGetProductRatePlanChargeTier:
      type: object
      properties:
        CreatedById:
          type: string
          description: "The ID of the Zuora user who created the ProductRatePlanChargeTier
            object. **Character limit**: 32 **Values**: automatically generated
            "
        CreatedDate:
          type: string
          description: "The date when the ProductRatePlanChargeTier object was created.
            **Character limit**: 29 **Values**: automatically generated "
          format: date-time
        Currency:
          type: string
          description: "The code corresponding to the currency for the tier's price.
            **Character limit**: 3 **Values**: a valid currency code "
        EndingUnit:
          type: number
          description: "The end number of a range of units for the tier. **Character
            limit**: 16 **Values**: any positive decimal value "
          format: double
        Id:
          type: string
          description: Object identifier.
        Price:
          type: number
          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
        PriceFormat:
          type: string
          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. "
        StartingUnit:
          type: number
          description: |-2
             The starting number of a range of units for the tier.
            **Character limit**: 16 **Values**: any positive decimal value 
          format: double
        Tier:
          type: integer
          description: |-2
             A unique number that identifies the tier that the price applies to.
            **Character limit**: 20 **Values**: automatically generated 
          format: int32
        UpdatedById:
          type: string
          description: >-2
             The ID of the user who last updated the product rate plan charge tier.
            **Character limit**: 32 **Values**: automatically generated 
        UpdatedDate:
          type: string
          description: |-2
             The date when the product rate plan charge tier was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
    ProxyGetRatePlan:
      allOf:
        - type: object
          properties:
            AmendmentId:
              type: string
              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 
            AmendmentType:
              type: string
              description: "The type of amendment associated with the rate plan. This field
                only applies to amendment rate plans. "
            CreatedById:
              type: string
              description: "The ID of the Zuora user who created the RatePlan object.
                **Character limit**: 32 **Values**: automatically generated "
            CreatedDate:
              type: string
              description: "The date when the `RatePlan` object was last updated. **Character
                limit**: 29 **Values**: automatically generated "
              format: date-time
            Id:
              type: string
              description: Object identifier.
            Name:
              type: string
              description: |-
                The name of the rate plan.

                **Values**: inherited from `ProductRatePlan.Name` 
            SubscriptionId:
              type: string
              description: "The ID of the subscription that the rate plan belongs to.
                **Character limit**: 32 **Values**: a valid subscription ID "
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the rate plan.
                **Character limit**: 32 **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the rate plan was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
    ProxyGetRatePlanCharge:
      allOf:
        - type: object
          properties:
            AccountingCode:
              type: string
              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. 
            ApplyDiscountTo:
              type: string
              description: " Specifies the type of charges a specific discount applies to.
                **Character limit**: 21 **Values**: inherited from
                `ProductRatePlanCharge.ApplyDiscountTo` "
            BillCycleDay:
              type: integer
              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
            BillCycleType:
              type: string
              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. 
            BillingPeriod:
              type: string
              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. 
            BillingPeriodAlignment:
              type: string
              description: >-2
                 Aligns charges within the same subscription if multiple charges begin on different dates.
                **Character limit**: 24 **Values**: inherited from `ProductRatePlanCharge.BillingPeriodAlignment` 
            BillingTiming:
              type: string
              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/).

            ChargeModel:
              type: string
              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` 
            ChargeNumber:
              type: string
              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
            ChargeType:
              type: string
              description: >-2
                 Specifies the type of charge.
                **Character limit**: 9 **Values**: inherited from `ProductRatePlanCharge.ChargeType` 
            ChargedThroughDate:
              type: string
              description: >-2
                 The date through which a customer has been billed for the charge.
                **Character limit**: 29 **Values**: automatically generated 
              format: date
            CreatedById:
              type: string
              description: "The ID of the Zuora user who created the `RatePlanCharge` object.
                **Character limit**: 32 **Values**: automatically generated "
            CreatedDate:
              type: string
              description: |-2
                 The date when the `RatePlanCharge` object was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            DMRC:
              type: number
              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
            DTCV:
              type: number
              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
            Description:
              type: string
              description: >-2
                 A description of the charge.
                **Character limit**: 500 **Values**: inherited from `ProductRatePlanCharge.Description` 
            DiscountLevel:
              type: string
              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` "
            EffectiveEndDate:
              type: string
              description: |-2
                 The date when the segmented charge ends or ended.
                **Character limit**: 16 **Values**: automatically generated 
              format: date
            EffectiveStartDate:
              type: string
              description: |-2
                 The date when the segmented charge starts or started.
                **Character limit**: 16 **Values**: automatically generated 
              format: date
            EndDateCondition:
              type: string
              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. 
            Id:
              type: string
              description: Object identifier.
            IsLastSegment:
              type: boolean
              description: "Indicates if the segment of the rate plan charge is the most
                recent segment. **Character limit**: 5 **Values**: automatically
                generated: `true`, `false` "
            ListPriceBase:
              type: string
              description: >
                The list price base for the product rate plan charge.
                **Values**: one of the following:


                - `Per Month`

                - `Per Billing Period`

                - `Per Week`
            MRR:
              type: number
              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
            Name:
              type: string
              description: "The name of the rate plan charge. **Character limit**: 100
                **Values**: automatically generated "
            NumberOfPeriods:
              type: integer
              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
            OriginalId:
              type: string
              description: "The original ID of the rate plan charge. **Character limit**: 32
                **Values**: automatically generated "
            OverageCalculationOption:
              type: string
              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` "
            OverageUnusedUnitsCreditOption:
              type: string
              description: >-2
                 Determines whether to credit the customer with unused units of usage.
                **Character limit**: 20 **Values**: inherited from `ProductRatePlanCharge.OverageUnusedUnitsCreditOption` 
            PriceChangeOption:
              type: string
              description: >2
                 Applies an automatic price change when a termed subscription is renewed.
                **Character limit**: **Values**: one of the following:


                - `NoChange` (default)

                - `SpecificPercentageValue`

                - `UseLatestProductCatalogPricing`
            PriceIncreasePercentage:
              type: number
              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
            ProcessedThroughDate:
              type: string
              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
            Quantity:
              type: number
              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
            RatePlanId:
              type: string
              description: >-2
                 The ID of the rate plan associated with the rate plan charge.
                **Character limit**: 32 **Values**: inherited from `RatePlan.Id` 
            RevRecCode:
              type: string
              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. 
            RevRecTriggerCondition:
              type: string
              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. 
            RevenueRecognitionRuleName:
              type: string
              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. 
            Segment:
              type: integer
              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
            SpecificBillingPeriod:
              type: integer
              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
            SpecificEndDate:
              type: string
              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
            TCV:
              type: number
              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
            TriggerDate:
              type: string
              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
            TriggerEvent:
              type: string
              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.
            UOM:
              type: string
              description: >-2
                 Specifies the units to measure usage.
                **Character limit**: 25 **Values**: inherited from `ProductRatePlanCharge.UOM` 
            UpToPeriods:
              type: integer
              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
            UpToPeriodsType:
              type: string
              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`.
            UpdatedById:
              type: string
              description: "The ID of the last user to update the object. **Character limit**:
                32 **Values**: automatically generated "
            UpdatedDate:
              type: string
              description: |-2
                 The date when the object was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            Version:
              type: integer
              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
            WeeklyBillCycleDay:
              type: string
              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`
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
    ProxyGetRatePlanChargeTier:
      type: object
      properties:
        CreatedById:
          type: string
          description: "The ID of the Zuora user who created the RatePlanChargeTier
            object. **Character limit**: 32 **Values**: automatically generated
            "
        CreatedDate:
          type: string
          description: |-2
             The date when the RatePlanChargeTier object was created.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
        EndingUnit:
          type: number
          description: |-2
             The end number of a range of units for the tier.
            **Character limit**: 16 **Values**: any positive decimal value 
          format: double
        Id:
          type: string
          description: Object identifier.
        Price:
          type: number
          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
        PriceFormat:
          type: string
          description: |-2
             Indicates if the price is a flat fee or is per unit.
            **Character limit**: 8 **Values**: `Flat Fee`, `Per Unit` 
        RatePlanChargeId:
          type: string
          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`. 
        StartingUnit:
          type: number
          description: |-2
             The start number of a range of units for the tier.
            **Character limit**: 16 **Values**: any positive decimal value 
          format: double
        Tier:
          type: integer
          description: |-2
             A unique number that identifies the tier that the price applies to.
            **Character limit**: 20 **Values**: automatically generated 
          format: int32
        UpdatedById:
          type: string
          description: "The ID of the last user to update the object. **Character limit**:
            32 **Values**: automatically generated "
        UpdatedDate:
          type: string
          description: |-2
             The date when the object was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
    ProxyGetRefund:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              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 
            AccountingCode:
              type: string
              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 
            Amount:
              type: number
              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, then you can create a partial refund. However, if the payment was applies to multiple invoices, then you can only make a partial refund through the web-based UI, not through the API.
                **Character limit**: 16 **Values**: a valid currency amount 
              format: double
            CancelledOn:
              type: string
              description: |-2
                 The date the refund was cancelled.
                **Values**: automatically generated 
              format: date-time
            Comment:
              type: string
              description: >-2
                 Use this field to record comments about the refund.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            CreatedById:
              type: string
              description: |-2
                 The ID of the Zuora user who created the `Refund` object.
                **Character limit**: 32 **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-2
                 The date when the `Refund` object was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            Gateway:
              type: string
              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 
            GatewayResponse:
              type: string
              description: >-2
                 The message returned from the payment gateway for the refund. This message is gateway-dependent.
                **Character limit**: 500 **Values**: automatically generated 
            GatewayResponseCode:
              type: string
              description: >-2
                 The code returned from the payment gateway for the payment. This code is gateway-dependent.
                **Character limit**: 20 **System****Values**: automatically generated 
            GatewayState:
              type: string
              description: |-2
                 The status of the payment in the gateway.
                **Character limit**: 19 **Values**: automatically generated 
            Id:
              type: string
              description: Object identifier.
            MarkedForSubmissionOn:
              type: string
              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
            MethodType:
              type: string
              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`
            PaymentMethodId:
              type: string
              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 
            PaymentMethodSnapshotId:
              type: string
              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 
            ReasonCode:
              type: string
              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 
            ReferenceID:
              type: string
              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 
            RefundDate:
              type: string
              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
            RefundNumber:
              type: string
              description: |-2
                 The unique identifier of the refund.
                **Character limit**: 50 **Values**: automatically generated 
            RefundTransactionTime:
              type: string
              description: |-2
                 The date and time when the refund was issued.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            SecondRefundReferenceId:
              type: string
              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 
            SettledOn:
              type: string
              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
            SoftDescriptor:
              type: string
              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
            SoftDescriptorPhone:
              type: string
              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
            SourceType:
              type: string
              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`
            Status:
              type: string
              description: |2
                 The status of the refund.
                **Character limit**: 10 **Values**: automatically generated:

                - `Canceled`
                - `Error`
                - `Processed`
                - `Processing`
            SubmittedOn:
              type: string
              description: |-2
                 The date when the payment was submitted.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            TransferredToAccounting:
              type: string
              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:
              type: string
              description: |2
                 Specifies if the refund is electronic or external.
                **Character limit**: 10 **Values**:

                - `Electronic`
                - External
            UpdatedById:
              type: string
              description: |-2
                 The ID of the last user to update the object.
                **Character limit**: 32 **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the object was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    ProxyGetRefundInvoicePayment:
      type: object
      properties:
        CreatedById:
          type: string
          description: >-2
             The ID of the Zuora user who created the RefundInvoicePayment object.
            **Character limit**: 32 **Values**: automatically generated 
        CreatedDate:
          type: string
          description: |-2
             The date when the RefundInvoicePayment object was created.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
        Id:
          type: string
          description: Object identifier.
        InvoiceId:
          type: string
          description: >-2
             The unique ID of the invoice associated with this refund invoice payment.
            **Character limit**: 32 **Values**: a valid invoice ID 
        InvoicePaymentId:
          type: string
          description: " The ID of the `InvoicePayment.Id` "
        RefundAmount:
          type: number
          description: "Specifies the amount of a refund applied against a payment.
            **Character limit**: 16 **Values**: automatically generated "
          format: double
        RefundId:
          type: string
          description: |-2
             The ID of the Refund object
            **Character limit**: 32 **Values**: inherited from `Refund.Id` 
        UpdatedById:
          type: string
          description: |-2
             The ID of the last user to update the object.
            **Character limit**: 32 **Values**: automatically generated 
        UpdatedDate:
          type: string
          description: |-2
             The date when the object was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
    ProxyGetRefundTransactionLog:
      type: object
      properties:
        BatchId:
          type: string
          description: ""
        Gateway:
          type: string
          description: ""
        GatewayReasonCode:
          type: string
          description: ""
        GatewayReasonCodeDescription:
          type: string
          description: ""
        GatewayState:
          type: string
          description: ""
        GatewayTransactionType:
          type: string
          description: ""
        Id:
          type: string
          description: Object identifier.
        RefundId:
          type: string
          description: ""
        RequestString:
          type: string
          description: ""
        ResponseString:
          type: string
          description: ""
        TransactionDate:
          type: string
          description: ""
          format: date-time
        TransactionId:
          type: string
          description: ""
    ProxyGetSubscription:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              description: " This field can be updated when **Status** is `Draft`. The ID of a
                valid account ID. "
            AutoRenew:
              type: boolean
              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` 
            CancelledDate:
              type: string
              description: " The date on which the subscription was canceled. "
              format: date
            ContractAcceptanceDate:
              type: string
              description: " The date when the customer accepts the contract. This field can
                be updated when **Status** is `Draft`. "
              format: date
            ContractEffectiveDate:
              type: string
              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
            CreatedById:
              type: string
              description: "The user ID of the person who created the subscription.
                **Character limit**: 32 **Values**: automatically generated "
            CreatedDate:
              type: string
              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
            CreatorAccountId:
              type: string
              description: >-2
                 The account ID that created the subscription or the amended subscription.
                **Character limit**: 32 **Values**: automatically generated 
            CreatorInvoiceOwnerId:
              type: string
              description: >-2
                 The account ID that owns the invoices associated with the subscription or the amended subscription.
                **Character limit**: 32 **Values**: automatically generated 
            CurrentTerm:
              type: integer
              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
            CurrentTermPeriodType:
              type: string
              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`
            Id:
              type: string
              description: Object identifier.
            InitialTerm:
              type: integer
              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
            InitialTermPeriodType:
              type: string
              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.
            InvoiceOwnerId:
              type: string
              description: " This field can be updated when **Status** is `Draft`. A valid
                account ID. "
            IsInvoiceSeparate:
              type: boolean
              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) 
            Name:
              type: string
              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
            Notes:
              type: string
              description: >-2
                 Use this field to record comments about the subscription.
                **Character limit**: 500 **Values**: a string of 500 characters or fewer 
            OriginalCreatedDate:
              type: string
              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
            OriginalId:
              type: string
              description: |-2
                 The original ID of this subscription.
                **Values**: automatically generated 
            PreviousSubscriptionId:
              type: string
              description: >-2
                 The subscription ID immediately prior to the current subscription.
                **Character limit**: 32 **Values**: automatically generated 
            RenewalSetting:
              type: string
              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` 
            RenewalTerm:
              type: integer
              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
            RenewalTermPeriodType:
              type: string
              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`.
            ServiceActivationDate:
              type: string
              description: " The date when the subscription is activated. This field can be
                updated when **Status** is `Draft`. "
              format: date
            Status:
              type: string
              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**.)
            SubscriptionEndDate:
              type: string
              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
            SubscriptionStartDate:
              type: string
              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
            TermEndDate:
              type: string
              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
            TermStartDate:
              type: string
              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
            TermType:
              type: string
              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` 
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the subscription.
                **Character limit:** 32 **Values: **automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the subscription was last updated.
                **Character limit:** 29 **Values**: automatically generated 
              format: date-time
            Version:
              type: integer
              description: |-2
                 The version number of the subscription.
                **Values**: automatically generated 
              format: int32
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    ProxyGetSubscriptionProductFeature:
      allOf:
        - type: object
          properties:
            CreatedById:
              type: string
              description: ""
            CreatedDate:
              type: string
              description: >-2
                 Date and time when the product feature was added to the subscription.
                **Character limit**: 29 **Values**: 
              format: date-time
            Description:
              type: string
              description: |-2
                 Description of the subscription product feature.
                **Character limit**: 500 **Values**: 
            FeatureCode:
              type: string
              description: |-2
                 Unique code of the feature.
                **Character limit**: 255 **Values**: 
            FeatureId:
              type: string
              description: |-2
                 Internal Zuora ID of the feature.
                **Character limit**: 32 **Values**: 
            Id:
              type: string
              description: Object identifier.
            Name:
              type: string
              description: |-2
                 Name of the feature.
                **Character limit**: 255 **Values**: 
            RatePlanId:
              type: string
              description: |-2
                 Id of the product rate plan to which the feature belongs.
                **Character limit**: 32 **Values**: 
            UpdatedById:
              type: string
              description: >-2
                 Internal Zuora ID of the user who last updated the subscription product feature.
                **Character limit**: 32 **Values**: 
            UpdatedDate:
              type: string
              description: >-2
                 Date and time when the subscription product feature was last updated.
                **Character limit**: 29 **Values**: 
              format: date-time
        - $ref: "#/components/schemas/SubscriptionProductFeatureObjectCustomFields"
    ProxyGetTaxationItem:
      allOf:
        - type: object
          properties:
            AccountingCode:
              type: string
              description: " The Chart of Accounts "
            CreatedById:
              type: string
              description: |-2
                 The ID of the user who created the taxation item.
                **Character limit**: 32 **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-2
                 The date when the payment was created in the Zuora system.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            ExemptAmount:
              type: number
              description: >-2
                 The amount of taxes or VAT for which the customer has an exemption.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
            Id:
              type: string
              description: Object identifier.
            InvoiceItemId:
              type: string
              description: >-2
                 The ID of the specific invoice item that the taxation information applies to.
                **Character limit**: 32 **Values**: a valid invoice item ID 
            Jurisdiction:
              type: string
              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 
            LocationCode:
              type: string
              description: >-2
                 The identifier for the location based on the value of the `TaxCode` field.
                **Character limit**: 32 **Values**: automatically generated 
            Name:
              type: string
              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 
            TaxAmount:
              type: number
              description: |-2
                 The amount of the tax applied to the charge.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
            TaxCode:
              type: string
              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 
            TaxCodeDescription:
              type: string
              description: >-2
                 The description for the tax code.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            TaxDate:
              type: string
              description: >-2
                 The date that the tax is applied to the charge, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
            TaxRate:
              type: number
              description: |-2
                 The tax rate applied to the charge.
                **Character limit**: 16 **Values**: a valid decimal value 
              format: double
            TaxRateDescription:
              type: string
              description: >-2
                 The description of the tax rate.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            TaxRateType:
              type: string
              description: |-2
                 The type of the tax rate applied to the charge.
                **Character limit**: 10 **Values**: `Percentage`, `FlatFee` 
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the taxation item.
                **Character limit**: **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: "The date when the taxation item was last updated. **Character
                limit**: **Values**: automatically generated "
              format: date-time
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    ProxyGetUnitOfMeasure:
      type: object
      properties:
        Active:
          type: boolean
          description: >-2
             Indicates if the UOM is available for new product rate plans. The default value is `true`.
            **Character limit**: 5 **Values**: `true`, `false ` 
        CreatedById:
          type: string
          description: |-2
             The ID of the Zuora user who created the UOM.
            **Character limit**: 32 **Values**: automatically generated 
        CreatedDate:
          type: string
          description: |-2
             The date when the UOM was created.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
        DecimalPlaces:
          type: integer
          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
        DisplayedAs:
          type: string
          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 "
        Id:
          type: string
          description: Object identifier.
        RoundingMode:
          type: string
          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` 
        UomName:
          type: string
          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 
        UpdatedById:
          type: string
          description: "The ID of the user who lasted updated the UOM. **Character
            limit**: 32 **Values**: automatically generated "
        UpdatedDate:
          type: string
          description: |-2
             The date when the UOM was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
    ProxyGetUsage:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              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 
            AccountNumber:
              type: string
              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 
            ChargeId:
              type: string
              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 "
            CreatedById:
              type: string
              description: |-2
                 The user ID of the person who uploaded the usage records.
                **Character limit**: 32 **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-2
                 The date when the usage was generated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            Description:
              type: string
              description: |
                A description of the usage record.
            EndDateTime:
              type: string
              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
            Id:
              type: string
              description: Object identifier.
            Quantity:
              type: number
              description: >-2
                 Indicates the number of units used.
                **Character limit**: 16 **Values**: a valid decimal amount equal to or greater than 0 
              format: double
            RbeStatus:
              type: string
              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` 
            SourceType:
              type: string
              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` 
            StartDateTime:
              type: string
              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
            SubmissionDateTime:
              type: string
              description: |-2
                 The date when usage was submitted.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            SubscriptionId:
              type: string
              description: >-2
                 The ID of the subscription that contains the fees related to the usage data.
                **Character limit**: 32 **Values**: a valid subscription ID 
            SubscriptionNumber:
              type: string
              description: >
                The unique identifier number of the subscription that contains
                the fees related to the usage data.
            UOM:
              type: string
              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 
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the usage upload.
                **Character limit**: 32 **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the usage upload was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/UsageObjectCustomFields"
    ProxyModifyAccount:
      allOf:
        - type: object
          properties:
            AccountNumber:
              type: string
              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
            AdditionalEmailAddresses:
              type: string
              description: "List of additional email addresses to receive emailed invoices.
                **Character limit**: 120 **Values**: comma-separated list of
                email addresses "
            AllowInvoiceEdit:
              type: boolean
              description: >-2
                 Indicates if associated invoices can be edited.
                **Character limit**: 5 **Values**: `true`, `false` (default if left null) 
            AutoPay:
              type: boolean
              description: >-2
                 Indicates if future payments are automatically collected when they're due during a Payment Run.
                **Character limit**: 5 **Values**: `true`, `false` (default) 
            Batch:
              type: string
              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). 
            BcdSettingOption:
              type: string
              description: "Billing cycle day setting option. **Character limit**: 9
                **Values**: `AutoSet`, `ManualSet` "
            BillCycleDay:
              type: integer
              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
            BillToId:
              type: string
              description: "ID of the person to bill for the account. **Character limit**: 32
                **Values**: a valid contact ID for the account "
            CommunicationProfileId:
              type: string
              description: "Associates the account with a specified communication profile.
                **Character limit**: 32 **Values**: a valid communication
                profile ID "
            CrmId:
              type: string
              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 "
            Currency:
              type: string
              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.
            CustomerServiceRepName:
              type: string
              description: "Name of the account's customer service representative, if
                applicable. **Character limit**: 50 **Values**: a string of 50
                characters or fewer "
            DefaultPaymentMethodId:
              type: string
              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 "
            InvoiceDeliveryPrefsEmail:
              type: boolean
              description: "Indicates if the customer wants to receive invoices through
                email.  **Character limit**: 5 **Values**: `true`, `false`
                (default if left null) "
            InvoiceDeliveryPrefsPrint:
              type: boolean
              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) "
            InvoiceTemplateId:
              type: string
              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 "
            Name:
              type: string
              description: "Name of the account as displayed in the Zuora UI. **Character
                limit**: 255 **Values**: a string of 255 characters or fewer "
            Notes:
              type: string
              description: " Comments about the account. **Character limit**: 65,535
                **Values**: a string of 65,535 characters "
            ParentId:
              type: string
              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 "
            PaymentGateway:
              type: string
              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
            PaymentTerm:
              type: string
              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 "
            PurchaseOrderNumber:
              type: string
              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 "
            SalesRepName:
              type: string
              description: "The name of the sales representative associated with this account,
                if applicable. **Character limit**: 50 **Values**: a string of
                50 characters or fewer "
            SoldToId:
              type: string
              description: "ID of the person who bought the subscription associated with the
                account. **Character limit**: 32 **Values**: a valid contact ID
                for the account "
            Status:
              maxLength: 8
              type: string
              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
            TaxCompanyCode:
              type: string
              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 
            TaxExemptCertificateID:
              type: string
              description: "ID of your customer's tax exemption certificate. **Character
                limit**: 32 **Values**: a string of 32 characters or fewer "
            TaxExemptCertificateType:
              type: string
              description: "Type of the tax exemption certificate that your customer
                holds.  **Character limit**: 32 **Values**: a string of 32
                characters or fewer "
            TaxExemptDescription:
              type: string
              description: "Description of the tax exemption certificate that your customer
                holds. **Character limit**: 500 **Values**: a string of 500
                characters or fewer "
            TaxExemptEffectiveDate:
              type: string
              description: "Date when the the customer's tax exemption starts. **Character
                limit**: 29 **Version notes**: requires Zuora Tax "
              format: date
            TaxExemptExpirationDate:
              type: string
              description: "Date when the customer's tax exemption certificate
                expires  **Character limit**: 29 **Version notes**: requires
                Zuora Tax "
              format: date
            TaxExemptIssuingJurisdiction:
              type: string
              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 "
            TaxExemptStatus:
              type: string
              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`
            VATId:
              type: string
              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 
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
    ProxyModifyAmendment:
      allOf:
        - type: object
          properties:
            AutoRenew:
              type: boolean
              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 
            ContractEffectiveDate:
              type: string
              description: >-2
                 The date when the amendment's changes become effective for billing purposes.
                **Version notes**: -- 
              format: date
            CurrentTerm:
              type: integer
              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
            CurrentTermPeriodType:
              type: string
              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.
            CustomerAcceptanceDate:
              type: string
              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
            Description:
              type: string
              description: >-2
                 A description of the amendment. This field can be updated when Status is `Draft`.
                **Character limit**: 500 **Values**: maximum 500 characters 
            EffectiveDate:
              type: string
              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
            Name:
              type: string
              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 
            RenewalSetting:
              type: string
              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 
            RenewalTerm:
              type: integer
              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
            RenewalTermPeriodType:
              type: string
              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`
            ServiceActivationDate:
              type: string
              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
            SpecificUpdateDate:
              type: string
              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
            Status:
              type: string
              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
            SubscriptionId:
              type: string
              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 
            TermStartDate:
              type: string
              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
            TermType:
              type: string
              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:
              type: string
              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 (This value is in **Limited Availability**.)

                - ResumeSubscription (This value is in **Limited Availability**.)
        - $ref: "#/components/schemas/AmendmentObjectCustomFields"
    ProxyModifyBillRun:
      required:
        - Status
      type: object
      properties:
        InvoiceDate:
          type: string
          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 the Invoice Settlement feature enabled. The Invoice Settlement 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
        Status:
          type: string
          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`
      example:
        InvoiceDate: 2020-02-18
        Status: Posted
    ProxyModifyContact:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              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 
            Address1:
              type: string
              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 
            Address2:
              type: string
              description: >-2
                 The second line of the contact's address.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            City:
              type: string
              description: >-2
                 The city of the contact's address.
                **Character limit**: 40 **Values: **a string of 40 characters or fewer 
            Country:
              type: string
              description: " The country of the contact's address. "
            County:
              type: string
              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 
            Description:
              type: string
              description: >-2
                 A description for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
            Fax:
              type: string
              description: >-2
                 The contact's fax number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            FirstName:
              type: string
              description: >-2
                 The contact's first name.
                **Character limit**: 100 **Values**: a string of the contact's first name 
            HomePhone:
              type: string
              description: >-2
                 The contact's home phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            LastName:
              type: string
              description: >-2
                 The contact's last name.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
            MobilePhone:
              type: string
              description: >-2
                 The contact's mobile phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            NickName:
              type: string
              description: >-2
                 A nickname for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
            OtherPhone:
              type: string
              description: >-2
                 An additional phone number for the contact.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
            OtherPhoneType:
              type: string
              description: "The type of the `OtherPhone`. **Character limit**: 20 **Values**:
                `Work`, `Mobile`, `Home`, `Other` "
            PersonalEmail:
              type: string
              description: >-2
                 The contact's personal email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
            PostalCode:
              type: string
              description: >-2
                 The zip code for the contact's address.
                **Character limit:** 20 **Values: **a string of 20 characters or fewer 
            State:
              type: string
              description: " The state or province of the contact's address. "
            TaxRegion:
              type: string
              description: "If using Zuora Tax rules "
            WorkEmail:
              type: string
              description: >-2
                 The contact's business email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
            WorkPhone:
              type: string
              description: >-2
                 The contact's business phone number.
                **Character limit**: 40 **notes**: -- **Values**: a string of 40 characters or fewer 
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    ProxyModifyCreditBalanceAdjustment:
      allOf:
        - type: object
          properties:
            ReasonCode:
              maxLength: 32
              type: string
              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.
            Status:
              type: string
              description: |
                The status of the credit balance adjustment.
              enum:
                - Processed
                - Canceled
            TransferredToAccounting:
              type: string
              description: >
                Status of the credit balance adjustment's transfer to an
                external accounting system, such as NetSuite.
              enum:
                - Processing
                - Yes
                - Error
                - Ignore
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectNSFields"
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectCustomFields"
    ProxyModifyInvoice:
      allOf:
        - type: object
          properties:
            RegenerateInvoicePDF:
              type: boolean
              description: >
                Whether to regenerate a PDF file for an invoice that already has
                PDF files generated. 


                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."
            Status:
              type: string
              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.

                 **Character limit**: 8
                 **Values**: one of the following:
                   -  Draft (default, automatically set upon invoice creation)
                   -  Posted
                   -  Canceled
            TransferredToAccounting:
              type: string
              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 
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
    ProxyModifyInvoiceAdjustment:
      allOf:
        - type: object
          properties:
            ReasonCode:
              type: string
              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 
            Status:
              type: string
              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` 
            TransferredToAccounting:
              type: string
              description: >
                Indicates the status of the adjustment's transfer to an external
                accounting system, such as NetSuite.
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
        - $ref: "#/components/schemas/InvoiceAdjustmentObjectCustomFields"
    ProxyModifyInvoicePayment:
      type: object
      properties:
        Amount:
          type: number
          description: |-2
             The amount of the payment.
            **Character limit**: 16 **Values**: a valid currency amount 
          format: double
    ProxyModifyPayment:
      allOf:
        - type: object
          properties:
            AccountId:
              maxLength: 32
              minLength: 0
              type: string
              description: |
                The unique account ID for the customer that the payment is for.
            AccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: >
                The aacccounting code for the payment. Accounting codes group
                transactions that contain similar accounting attributes.
            Amount:
              type: number
              description: |
                The amount of the payment.
              format: double
            Comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Additional information related to the payment.
            EffectiveDate:
              type: string
              description: |
                The date when the payment takes effect.
              format: date
            PaymentMethodId:
              maxLength: 32
              minLength: 0
              type: string
              description: |
                The ID of the payment method used for the payment. 
            ReferenceId:
              maxLength: 60
              minLength: 0
              type: string
              description: >
                The transaction ID returned by the payment gateway. Use this
                field to reconcile payments between your gateway and Zuora
                Payments.
            Status:
              type: string
              description: >
                The status of the payment in Zuora. The value depends on the
                type of payment.


                For electronic payments, the status can be `Processed`, `Error`, or `Voided`. For external payments, the status can be `Processed` or `Canceled`.
              enum:
                - Processed
                - Error
                - Voided
                - Canceled
            TransferredToAccounting:
              type: string
              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:
              type: string
              description: >
                The type of the payment, whether the payment is external or
                electronic.
              enum:
                - External
                - Electronic
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
    ProxyModifyPaymentMethod:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              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. 
            AchAbaCode:
              type: string
              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 
            AchAccountName:
              type: string
              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 
            AchAccountType:
              type: string
              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`
            AchAddress1:
              type: string
              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 
            AchAddress2:
              type: string
              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 
            AchBankName:
              type: string
              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 
            AchCity:
              type: string
              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 
            AchCountry:
              type: string
              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 
            AchPostalCode:
              type: string
              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 
            AchState:
              type: string
              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 
            BankBranchCode:
              type: string
              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 
            BankCheckDigit:
              type: string
              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 
            BankTransferType:
              maxLength: 20
              type: string
              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)
            BusinessIdentificationCode:
              type: string
              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 
            City:
              type: string
              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 
            CompanyName:
              maxLength: 80
              type: string
              description: |
                The name of the company.

                Zuora does not recommend that you use this field.
            Country:
              type: string
              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 
            CreditCardAddress1:
              type: string
              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 
            CreditCardAddress2:
              type: string
              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 
            CreditCardCity:
              type: string
              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 
            CreditCardCountry:
              type: string
              description: " The country of the card holder's address. "
            CreditCardExpirationMonth:
              type: integer
              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
            CreditCardExpirationYear:
              type: integer
              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
            CreditCardHolderName:
              type: string
              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 
            CreditCardPostalCode:
              type: string
              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 
            CreditCardSecurityCode:
              type: string
              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 
            CreditCardState:
              type: string
              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. "
            CreditCardType:
              type: string
              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).
            DeviceSessionId:
              type: string
              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**: 
            Email:
              type: string
              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 
            ExistingMandate:
              type: string
              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` 
            FirstName:
              type: string
              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 
            IBAN:
              type: string
              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 
            IPAddress:
              type: string
              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 
            IdentityNumber:
              type: string
              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.
            IsCompany:
              type: boolean
              description: |
                Whether the customer account is a company.

                Zuora does not recommend that you use this field.
              default: false
            LastName:
              type: string
              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 
            LastTransactionDateTime:
              type: string
              description: |-2
                 The date of the most recent transaction.
                **Character limit**: 29 **Values**: a valid date and time value 
              format: date-time
            MandateCreationDate:
              type: string
              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
            MandateID:
              type: string
              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 
            MandateReceived:
              type: string
              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) 
            MandateUpdateDate:
              type: string
              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
            MaxConsecutivePaymentFailures:
              type: integer
              description: >-2
                 Specifies the number of allowable consecutive failures Zuora attempts with the payment method before stopping.
                **Values**: a valid number 
            NumConsecutiveFailures:
              maximum: 100
              minimum: 0
              type: integer
              description: >
                The number of consecutive failed payments for this payment
                method. It is reset to `0` upon successful payment. 
            PaymentMethodStatus:
              type: string
              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` 
            PaymentRetryWindow:
              type: integer
              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 
            Phone:
              type: string
              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 
            PostalCode:
              type: string
              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 
            SecondTokenId:
              type: string
              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 
            State:
              type: string
              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 
            StreetName:
              type: string
              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 
            StreetNumber:
              type: string
              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 
            UseDefaultRetryRule:
              type: boolean
              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` 
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
    ProxyModifyProduct:
      allOf:
        - type: object
          properties:
            AllowFeatureChanges:
              type: boolean
              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) 
            Category:
              type: string
              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
            Description:
              type: string
              description: " A descriptionof the product. **Character limit**: 500 **Values**:
                a string of 500 characters or fewer "
            EffectiveEndDate:
              type: string
              description: "The date when the product expires and can't be subscribed to
                anymore, in `yyyy-mm-dd` format. **Character limit**: 29 "
              format: date
            EffectiveStartDate:
              type: string
              description: "The date when the product becomes available and can be subscribed
                to, in `yyyy-mm-dd` format. **Character limit**: 29 "
              format: date
            Name:
              type: string
              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 "
            SKU:
              type: string
              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
        - $ref: "#/components/schemas/ProductObjectNSFields"
        - $ref: "#/components/schemas/ProductObjectCustomFields"
    ProxyModifyProductRatePlan:
      allOf:
        - type: object
          properties:
            Description:
              type: string
              description: "A description of the product rate plan. **Character limit**: 500
                **Values**: a string of 500 characters or fewer "
            EffectiveEndDate:
              type: string
              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
            EffectiveStartDate:
              type: string
              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
            Name:
              type: string
              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 "
            ProductId:
              type: string
              description: "The ID of the product that contains the product rate plan.
                **Character limit**: 32 **Values**: a string of 32 characters or
                fewer "
        - $ref: "#/components/schemas/ProductRatePlanObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanObjectCustomFields"
    ProxyModifyProductRatePlanCharge:
      allOf:
        - type: object
          properties:
            AccountingCode:
              type: string
              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 "
            ApplyDiscountTo:
              type: string
              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)`
            BillCycleDay:
              type: integer
              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
            BillCycleType:
              type: string
              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.
            BillingPeriod:
              type: string
              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`. 
            BillingPeriodAlignment:
              type: string
              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`
            BillingTiming:
              type: string
              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/).

            ChargeModel:
              type: string
              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`
            DefaultQuantity:
              type: number
              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
            DeferredRevenueAccount:
              type: string
              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/).

            Description:
              type: string
              description: "A description of the charge. **Character limit**: 500 **Values**:
                a string of 500 characters or fewer "
            DiscountLevel:
              type: string
              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`
            EndDateCondition:
              type: string
              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. 
            IncludedUnits:
              type: number
              description: "Specifies the number of units in the base set of units.
                **Character limit**: 16 **Values**: a positive decimal value "
              format: double
            LegacyRevenueReporting:
              type: boolean
              description: ""
            ListPriceBase:
              type: string
              description: >
                The list price base for the product rate plan charge.
                **Values**: one of the following:


                - `Per Month`

                - `Per Billing Period`

                - `Per Week`
            MaxQuantity:
              type: number
              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
            MinQuantity:
              type: number
              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
            Name:
              type: string
              description: "The name of the product rate plan charge. **Character limit**: 100
                **Values**: a string of 100 characters or fewer "
            NumberOfPeriod:
              type: integer
              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
            OverageCalculationOption:
              type: string
              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.
            OverageUnusedUnitsCreditOption:
              type: string
              description: >2
                 Determines whether to credit the customer with unused units of usage.
                **Character limit**: 20 **Values**: one of the following:


                - `NoCredit`

                - `CreditBySpecificRate`
            PriceChangeOption:
              type: string
              description: >2
                 Applies an automatic price change when a termed subscription is renewed.
                **Character limit**: **Values**: one of the following:


                - `NoChange` (default)

                - `SpecificPercentageValue`

                - `UseLatestProductCatalogPricing`
            PriceIncreaseOption:
              type: string
              description: >
                Applies an automatic price change when a termed subscription is
                renewed.
              enum:
                - FromTenantPercentageValue
                - SpecificPercentageValue
            PriceIncreasePercentage:
              type: number
              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
            ProductRatePlanChargeTierData:
              $ref: "#/components/schemas/ProxyCreateOrModifyProductRatePlanChargeTierData"
            ProductRatePlanId:
              type: string
              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 
            RatingGroup:
              type: string
              description: >
                Specifies a rating group based on which usage records are rated.


                **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/).


                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`.
            RecognizedRevenueAccount:
              type: string
              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/).

            RevRecCode:
              type: string
              description: "Associates this product rate plan charge with a specific revenue
                recognition code. **Character limit**: 70 **Values**: a valid
                revenue recognition code "
            RevRecTriggerCondition:
              type: string
              description: |2
                 Specifies when revenue recognition begins.
                **Character limit**: 22 **Values**: one of the following:

                - `ContractEffectiveDate`
                - `ServiceActivationDate`
                - `CustomerAcceptanceDate`
            RevenueRecognitionRuleName:
              type: string
              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`
            SmoothingModel:
              type: string
              description: >2
                 Specifies the smoothing model for an overage smoothing charge model.
                **Character limit**: 22 **Values**: one of the following:


                - `RollingWindow`

                - `Rollover`
            SpecificBillingPeriod:
              type: integer
              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
            TaxCode:
              type: string
              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`. 
            TaxMode:
              type: string
              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`. 
            Taxable:
              type: boolean
              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`. 
            TriggerEvent:
              type: string
              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.
            UOM:
              type: string
              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
            UpToPeriods:
              type: integer
              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
            UpToPeriodsType:
              type: string
              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`.
            UsageRecordRatingOption:
              type: string
              description: >
                Determines how Zuora processes usage records for per-unit usage
                charges. 
              default: EndOfBillingPeriod
              enum:
                - EndOfBillingPeriod
                - OnDemand
            UseDiscountSpecificAccountingCode:
              type: boolean
              description: "Determines whether to define a new accounting code for the new
                discount charge. **Character limit**: 5 **Values**: `True`,
                `False` "
            UseTenantDefaultForPriceChange:
              type: boolean
              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` "
            WeeklyBillCycleDay:
              type: string
              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`
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectCustomFields"
    ProxyModifyProductRatePlanChargeTier:
      type: object
      properties:
        Price:
          type: number
          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
      example:
        Price: 1.99
    ProxyModifyRatePlanCharge:
      allOf:
        - type: object
          properties:
            BillingTiming:
              type: string
              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/).

            DiscountAmount:
              type: number
              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
            DiscountPercentage:
              type: number
              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
            EndDateCondition:
              type: string
              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. 
            ListPriceBase:
              type: string
              description: >
                The list price base for the product rate plan charge.
                **Values**: one of the following:


                - `Per Month`

                - `Per Billing Period`

                - `Per Week`
            PriceChangeOption:
              type: string
              description: >2
                 Applies an automatic price change when a termed subscription is renewed.
                **Character limit**: **Values**: one of the following:


                - `NoChange` (default)

                - `SpecificPercentageValue`

                - `UseLatestProductCatalogPricing`
            PriceIncreasePercentage:
              type: number
              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
            RatingGroup:
              type: string
              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. **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/).
              enum:
                - ByBillingPeriod
                - ByUsageStartDate
                - ByUsageRecord
                - ByUsageUpload
                - ByGroupId
            RevRecCode:
              type: string
              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. 
            RevRecTriggerCondition:
              type: string
              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. 
            RevenueRecognitionRuleName:
              type: string
              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. 
            SpecificEndDate:
              type: string
              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
            TriggerDate:
              type: string
              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
            TriggerEvent:
              type: string
              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.
            UpToPeriodsType:
              type: string
              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`.
            WeeklyBillCycleDay:
              type: string
              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`
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
    ProxyModifyRefund:
      allOf:
        - type: object
          properties:
            ReasonCode:
              type: string
              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 
            Status:
              type: string
              description: |2
                 The status of the refund.
                **Character limit**: 10 **Values**: automatically generated:

                - `Canceled`
                - `Error`
                - `Processed`
                - `Processing`
            TransferredToAccounting:
              type: string
              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`
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    ProxyModifySubscription:
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              description: " This field can be updated when **Status** is `Draft`. The ID of a
                valid account ID. "
            AutoRenew:
              type: boolean
              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` 
            CancelledDate:
              type: string
              description: |-2
                 The date of the Amendment object.
                **Values**: inherited from `Amendment.EffectiveDate` 
              format: date
            ContractAcceptanceDate:
              type: string
              description: " The date when the customer accepts the contract. This field can
                be updated when **Status** is `Draft`. "
              format: date
            ContractEffectiveDate:
              type: string
              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
            CurrentTermPeriodType:
              type: string
              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`
            InitialTerm:
              type: integer
              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
            InitialTermPeriodType:
              type: string
              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.
            InvoiceOwnerId:
              type: string
              description: " This field can be updated when **Status** is `Draft`. A valid
                account ID. "
            IsInvoiceSeparate:
              type: boolean
              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) 
            Name:
              type: string
              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
            Notes:
              type: string
              description: >-2
                 Use this field to record comments about the subscription.
                **Character limit**: 500 **Values**: a string of 500 characters or fewer 
            RenewalSetting:
              type: string
              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` 
            RenewalTerm:
              type: integer
              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
            RenewalTermPeriodType:
              type: string
              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`.
            ServiceActivationDate:
              type: string
              description: >-2
                 The date when the subscription is activated. This field can be updated when **Status** is `Draft`.
                **Character limit**: 29 
              format: date
            Status:
              type: string
              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**.)
            TermStartDate:
              type: string
              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
            TermType:
              type: string
              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` 
            Version:
              type: integer
              description: |-2
                 The version number of the subscription.
                **Values**: automatically generated 
              format: int32
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    ProxyModifyTaxationItem:
      allOf:
        - type: object
          properties:
            AccountingCode:
              type: string
              description: " The Chart of Accounts "
            ExemptAmount:
              type: number
              description: >-2
                 The amount of taxes or VAT for which the customer has an exemption.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
            Jurisdiction:
              type: string
              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 
            LocationCode:
              type: string
              description: >-2
                 The identifier for the location based on the value of the `TaxCode` field.
                **Character limit**: 32 **Values**: automatically generated 
            Name:
              type: string
              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 
            TaxAmount:
              type: number
              description: |-2
                 The amount of the tax applied to the charge.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
            TaxCode:
              type: string
              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 
            TaxCodeDescription:
              type: string
              description: >-2
                 The description for the tax code.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            TaxDate:
              type: string
              description: >-2
                 The date that the tax is applied to the charge, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
            TaxRate:
              type: number
              description: |-2
                 The tax rate applied to the charge.
                **Character limit**: 16 **Values**: a valid decimal value 
              format: double
            TaxRateDescription:
              type: string
              description: >-2
                 The description of the tax rate.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
            TaxRateType:
              type: string
              description: |-2
                 The type of the tax rate applied to the charge.
                **Character limit**: 10 **Values**: `Percentage`, `FlatFee` 
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    ProxyModifyUnitOfMeasure:
      type: object
      properties:
        Active:
          type: boolean
          description: >-2
             Indicates if the UOM is available for new product rate plans. The default value is `true`.
            **Character limit**: 5 **Values**: `true`, `false ` 
        DecimalPlaces:
          type: integer
          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
        DisplayedAs:
          type: string
          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 "
        RoundingMode:
          type: string
          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` 
        UomName:
          type: string
          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 
    ProxyModifyUsage:
      allOf:
        - type: object
          properties:
            EndDateTime:
              type: string
              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
            Quantity:
              type: number
              description: >-2
                 Indicates the number of units used.
                **Character limit**: 16 **Values**: a valid decimal amount equal to or greater than 0 
              format: double
            RbeStatus:
              type: string
              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` 
            StartDateTime:
              type: string
              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
            SubmissionDateTime:
              type: string
              description: |-2
                 The date when usage was submitted.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
            UOM:
              type: string
              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 
        - $ref: "#/components/schemas/UsageObjectCustomFields"
    ProxyNoDataResponse:
      type: object
      properties:
        done:
          type: boolean
          description: ""
        records:
          type: array
          description: ""
          items:
            type: object
            properties: {}
        size:
          type: integer
          description: ""
    ProxyPostImport:
      type: object
      properties:
        Id:
          type: string
          description: |
            The ID of the Import object that was created.
        Success:
          type: boolean
          description: |
            Indicates whether the call succeeded.
    ProxyUnauthorizedResponse:
      type: object
      properties:
        message:
          type: string
          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.
    PutBatchInvoiceType:
      type: object
      properties:
        invoices:
          type: array
          description: |
            Container for invoice update details.
          items:
            $ref: "#/components/schemas/BatchInvoiceType"
      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
    PutCreditMemoTaxItemType:
      title: taxItems
      required:
        - id
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the taxation item in the credit memo item.
          format: double
        financeInformation:
          type: object
          properties:
            onAccountAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: >
                The accounting code that maps to an on account in your
                accounting system.
            salesTaxPayableAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: |
                The accounting code for the sales taxes payable.
          description: >
            Container for the finance information related to the taxation item
            in the credit memo item.
        id:
          type: string
          description: |
            The ID of the taxation item in the credit memo item.
        jurisdiction:
          type: string
          description: >
            The jurisdiction that applies the tax or VAT. This value is
            typically a state, province, county, or city.
        locationCode:
          type: string
          description: >
            The identifier for the location based on the value of the `taxCode`
            field.
        taxCode:
          type: string
          description: >
            The tax code identifies which tax rules and tax rates to apply to a
            specific credit memo.
        taxCodeDescription:
          type: string
          description: |
            The description of the tax code.
        taxDate:
          type: string
          description: >
            The date that the tax is applied to the credit memo, in `yyyy-mm-dd`
            format.
          format: date
        taxExemptAmount:
          type: number
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
        taxName:
          type: string
          description: |
            The name of taxation.
        taxRate:
          type: number
          description: |
            The tax rate applied to the credit memo.
          format: double
        taxRateDescription:
          type: string
          description: |
            The description of the tax rate. 
        taxRateType:
          type: string
          description: |
            The type of the tax rate applied to the credit memo.
          enum:
            - Percentage
            - FlatFee
    PutDebitMemoTaxItemType:
      title: taxItems
      required:
        - id
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the taxation item in the debit memo item.
          format: double
        financeInformation:
          type: object
          properties:
            salesTaxPayableAccountingCode:
              maxLength: 100
              minLength: 0
              type: string
              description: |
                The accounting code for the sales taxes payable.
          description: >
            Container for the finance information related to the taxation item
            in the debit memo item.
        id:
          type: string
          description: |
            The ID of the taxation item in the debit memo item.
        jurisdiction:
          type: string
          description: >
            The jurisdiction that applies the tax or VAT. This value is
            typically a state, province, county, or city.
        locationCode:
          type: string
          description: >
            The identifier for the location based on the value of the `taxCode`
            field.
        taxCode:
          type: string
          description: >
            The tax code identifies which tax rules and tax rates to apply to a
            specific debit memo.
        taxCodeDescription:
          type: string
          description: |
            The description of the tax code.
        taxDate:
          type: string
          description: >
            The date that the tax is applied to the debit memo, in `yyyy-mm-dd`
            format.
          format: date
        taxExemptAmount:
          type: number
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
        taxName:
          type: string
          description: |
            The name of taxation.
        taxRate:
          type: number
          description: |
            The tax rate applied to the debit memo.
          format: double
        taxRateDescription:
          type: string
          description: |
            The description of the tax rate.
        taxRateType:
          type: string
          description: |
            The type of the tax rate applied to the debit memo.
          enum:
            - Percentage
            - FlatFee
    PutEventTriggerRequest:
      type: object
      properties:
        active:
          type: boolean
          description: The status of the trigger.
        condition:
          maxLength: 5000
          minLength: 1
          type: string
          description: The JEXL expression to be evaluated against object changes. See
            above for more information and an example.
        description:
          maxLength: 1000
          type: string
          description: The description of the trigger.
        eventType:
          type: object
          properties:
            description:
              maxLength: 1000
              type: string
              description: The description for the event type.
            displayName:
              maxLength: 500
              minLength: 1
              type: string
              description: The display name for the event type.
          description: The type of events to be triggered.
      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
    PutInvoiceResponseType:
      allOf:
        - type: object
          properties:
            accountId:
              type: string
              description: |
                The ID of the customer account associated with the invoice.
            amount:
              type: number
              description: |
                The total amount of the invoice.
              format: BigDecimal
            autoPay:
              type: boolean
              description: >
                Whether invoices are automatically picked up for processing in
                the corresponding payment run. 
            balance:
              type: number
              description: |
                The balance of the invoice.
              format: BigDecimal
            cancelledById:
              type: string
              description: |
                The ID of the Zuora user who cancelled the invoice.
            cancelledOn:
              type: string
              description: >
                The date and time when the invoice was cancelled, in `yyyy-mm-dd
                hh:mm:ss` format.
              format: date-time
            comment:
              type: string
              description: |
                Comments about the invoice. 
            createdById:
              type: string
              description: |
                The ID of the Zuora user who created the invoice.
            createdDate:
              type: string
              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
            creditBalanceAdjustmentAmount:
              type: number
              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
            currency:
              type: string
              description: |
                A currency defined in the web-based UI administrative settings.
            dueDate:
              type: string
              description: |
                The date by which the payment for this invoice is due. 
              format: date
            id:
              type: string
              description: |
                The unique ID of the invoice.
            invoiceDate:
              type: string
              description: |
                The date on which to generate the invoice.
              format: date
            number:
              type: string
              description: |
                The unique identification number of the invoice.
            postedById:
              type: string
              description: |
                The ID of the Zuora user who posted the invoice.
            postedOn:
              type: string
              description: >
                The date and time when the invoice was posted, in `yyyy-mm-dd
                hh:mm:ss` format. 
              format: date-time
            status:
              type: string
              description: |
                The status of the invoice.
              enum:
                - Draft
                - Posted
                - Canceled
                - Error
            success:
              type: boolean
              description: |
                Returns `true` if the request was processed successfully.
            targetDate:
              type: string
              description: >
                The target date for the invoice, in `yyyy-mm-dd` format. For
                example, 2017-07-20. 
              format: date
            taxAmount:
              type: number
              description: |
                The amount of taxation.
              format: BigDecimal
            totalTaxExemptAmount:
              type: number
              description: >
                The total amount of taxes or VAT for which the customer has an
                exemption.
              format: BigDecimal
            transferredToAccounting:
              type: string
              description: >
                Whether the invoice was transferred to an external accounting
                system.
              enum:
                - Processing
                - Yes
                - Error
                - Ignore
            updatedById:
              type: string
              description: |
                The ID of the Zuora user who last updated the invoice.
            updatedDate:
              type: string
              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
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
    PutInvoiceType:
      type: object
      properties:
        autoPay:
          type: boolean
          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.
        dueDate:
          type: string
          description: |
            The date by which the payment for this invoice is due. 
          format: date
        invoiceDate:
          type: string
          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
        transferredToAccounting:
          type: string
          description: >
            Whether the invoice was transferred to an external accounting system.
          enum:
            - Processing
            - Yes
            - Error
            - Ignore
      example:
        autoPay: false
        invoiceDate: 2017-02-20
        transferredToAccounting: Yes
    PutReverseInvoiceResponseType:
      type: object
      properties:
        creditMemo:
          type: object
          properties:
            id:
              type: string
              description: ID of the credit memo.
          description: >
            Container for the credit memo that is auto-generated when reversing
            invoices.
        success:
          type: boolean
          description: |
            Returns `true` if the request was processed successfully.
    PutReverseInvoiceType:
      type: object
      properties:
        applyEffectiveDate:
          type: string
          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
        memoDate:
          type: string
          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
      example:
        applyEffectiveDate: 2017-02-20
        memoDate: 2017-02-20
    PutTasksRequest:
      type: object
      properties:
        data:
          type: array
          description: |
            The list of tasks to update.
          items:
            $ref: "#/components/schemas/UpdateTask"
      example:
        data:
          - action_type: If
            call_type: SOAP
            concurrent_limit: 9999999
            id: 2771
            name: If
            status: Success
            tags: []
            workflow_id: 476
    QueryCustomObjectRecordsResponse:
      required:
        - count
        - records
      type: object
      properties:
        count:
          type: integer
          description: The record count of the given custom object type
          example: 1
        records:
          type: array
          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"
    RatePlan:
      required:
        - ProductRatePlanId
      type: object
      properties:
        AmendmentId:
          type: string
          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 
        AmendmentSubscriptionRatePlanId:
          type: string
          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 
        AmendmentType:
          type: string
          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` 
        CreatedById:
          type: string
          description: |-
            The ID of the Zuora user who created the RatePlan object.

            **Character limit**: 32

            **Values**: automatically generated 
        CreatedDate:
          type: string
          description: |-
            The date when the `RatePlan` object was last updated.

            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
        Name:
          type: string
          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 
        ProductRatePlanId:
          type: string
          description: |-
            The ID of the associated product rate plan.

            **Character limit**: 32

            **Values**: a valid product rate plan ID 
        SubscriptionId:
          type: string
          description: |-
            The ID of the subscription that the rate plan belongs to.

            **Character limit**: 32

            **Values**: a valid subscription ID 
        UpdatedById:
          type: string
          description: |-2
             The ID of the user who last updated the rate plan.


            **Character limit**: 32

            **Values**: automatically generated 
        UpdatedDate:
          type: string
          description: |-2
             The date when the rate plan was last updated.


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
    RatePlanChargeData:
      required:
        - RatePlanCharge
      type: object
      properties:
        RatePlanCharge:
          $ref: "#/components/schemas/RatePlanChargeDataRatePlanCharge"
        RatePlanChargeTier:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/RatePlanChargeTier"
    RatePlanChargeDataInRatePlanData:
      title: RatePlanChargeData
      required:
        - RatePlanCharge
      type: object
      properties:
        RatePlanCharge:
          required:
            - ProductRatePlanChargeId
          type: object
          properties:
            AccountingCode:
              type: string
              description: >-
                The accounting code for the charge. Accounting codes group
                transactions that contain similar accounting attributes.


                **Character limit**: 100



                **Values**: inherited from `ProductRatePlanCharge.AccountingCode` 
            ApplyDiscountTo:
              type: string
              description: >-2
                 Specifies the type of charges a specific discount applies to.

                **Character limit**: 21



                **Values**: inherited from `ProductRatePlanCharge.ApplyDiscountTo` 
            BillCycleDay:
              type: integer
              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
            BillCycleType:
              type: string
              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. 
            BillingPeriod:
              type: string
              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. 
            BillingPeriodAlignment:
              type: string
              description: >-2
                 Aligns charges within the same subscription if multiple charges begin on different dates.


                **Character limit**: 24



                **Values**: inherited from `ProductRatePlanCharge.BillingPeriodAlignment` 
            BillingTiming:
              type: string
              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/).

            ChargeModel:
              type: string
              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` 
            ChargeNumber:
              type: string
              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
            ChargeType:
              type: string
              description: |-2
                 Specifies the type of charge.


                **Character limit**: 9


                **Values**: inherited from `ProductRatePlanCharge.ChargeType` 
            ChargedThroughDate:
              type: string
              description: >-2
                 The date through which a customer has been billed for the charge.


                **Character limit**: 29



                **Values**: automatically generated 
              format: date
            CreatedById:
              type: string
              description: >-
                The ID of the Zuora user who created the `RatePlanCharge`
                object.


                **Character limit**: 32



                **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-2
                 The date when the `RatePlanCharge` object was created.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            DMRC:
              type: number
              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
            DTCV:
              type: number
              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
            Description:
              type: string
              description: |-2
                 A description of the charge.


                **Character limit**: 500


                **Values**: inherited from `ProductRatePlanCharge.Description` 
            DiscountAmount:
              type: number
              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
            DiscountLevel:
              type: string
              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` 
            DiscountPercentage:
              type: number
              description: " Query Filter "
              format: double
            EffectiveEndDate:
              type: string
              description: |-2
                 The date when the segmented charge ends or ended.


                **Character limit**: 16


                **Values**: automatically generated 
              format: date
            EffectiveStartDate:
              type: string
              description: |-2
                 The date when the segmented charge starts or started.


                **Character limit**: 16


                **Values**: automatically generated 
              format: date
            EndDateCondition:
              type: string
              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. 
            IncludedUnits:
              type: number
              description: " Query Filter "
              format: double
            IsLastSegment:
              type: boolean
              description: >-
                Indicates if the segment of the rate plan charge is the most
                recent segment.


                **Character limit**: 5



                **Values**: automatically generated: `true`, `false` 
            ListPriceBase:
              type: string
              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`
            MRR:
              type: number
              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
            Name:
              type: string
              description: |-
                The name of the rate plan charge.

                **Character limit**: 100


                **Values**: automatically generated 
            NumberOfPeriods:
              type: integer
              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
            OriginalId:
              type: string
              description: |-
                The original ID of the rate plan charge.

                **Character limit**: 32


                **Values**: automatically generated 
            OverageCalculationOption:
              type: string
              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` 
            OveragePrice:
              type: number
              description: " Query Filter "
              format: double
            OverageUnusedUnitsCreditOption:
              type: string
              description: >-2
                 Determines whether to credit the customer with unused units of usage.


                **Character limit**: 20



                **Values**: inherited from `ProductRatePlanCharge.OverageUnusedUnitsCreditOption` 
            Price:
              type: number
              description: " Query Filter "
              format: double
            PriceChangeOption:
              type: string
              description: >2
                 Applies an automatic price change when a termed subscription is renewed.


                **Character limit**:



                **Values**: one of the following:


                - `NoChange` (default)

                - `SpecificPercentageValue`

                - `UseLatestProductCatalogPricing`
            PriceIncreasePercentage:
              type: number
              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
            ProcessedThroughDate:
              type: string
              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
            ProductRatePlanChargeId:
              type: string
              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` 
            Quantity:
              type: number
              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
            RatePlanId:
              type: string
              description: |-2
                 The ID of the rate plan associated with the rate plan charge.


                **Character limit**: 32


                **Values**: inherited from `RatePlan.Id` 
            RevRecCode:
              type: string
              description: >-2
                 Associates this product rate plan charge with a specific revenue recognition code.


                **Character limit**: 70



                **Values**: a valid revenue recognition code 
            RevRecTriggerCondition:
              type: string
              description: |+2
                 Specifies when revenue recognition begins.


                **Character limit**: 22


                **Values**: one of the following:

                -  `ContractEffectiveDate`

                -  `ServiceActivationDate`

                -  `CustomerAcceptanceDate`

            RevenueRecognitionRuleName:
              type: string
              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 
            RolloverBalance:
              type: number
              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
            Segment:
              type: integer
              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
            SpecificBillingPeriod:
              type: integer
              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
            SpecificEndDate:
              type: string
              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
            TCV:
              type: number
              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
            TriggerDate:
              type: string
              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
            TriggerEvent:
              type: string
              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.
            UOM:
              type: string
              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` 
            UnusedUnitsCreditRates:
              type: number
              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
            UpToPeriods:
              type: integer
              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
            UpToPeriodsType:
              type: string
              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`.
            UpdatedById:
              type: string
              description: |-
                The ID of the last user to update the object.

                **Character limit**: 32


                **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the object was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            UsageRecordRatingOption:
              type: string
              description: >-2
                 Determines how Zuora processes usage records for per-unit usage charges.

                **Character limit**: 18



                **Values**: automatically generated 
            UseDiscountSpecificAccountingCode:
              type: boolean
              description: >-2
                 Determines whether to define a new accounting code for the new discount charge.


                **Character limit**: 5



                **Values**: inherited from `ProductRatePlanCharge.UseDiscountSpecificAccountingCode` 
            Version:
              type: integer
              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
            WeeklyBillCycleDay:
              type: string
              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`
          description: ""
        RatePlanChargeTier:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/RatePlanChargeTier"
    RatePlanChargeDataRatePlanCharge:
      title: RatePlanCharge
      description: ""
      allOf:
        - required:
            - ProductRatePlanChargeId
          type: object
          properties:
            AccountingCode:
              type: string
              description: >-
                The accounting code for the charge. Accounting codes group
                transactions that contain similar accounting attributes.


                **Character limit**: 100



                **Values**: inherited from `ProductRatePlanCharge.AccountingCode` 
            ApplyDiscountTo:
              type: string
              description: >-2
                 Specifies the type of charges a specific discount applies to.

                **Character limit**: 21



                **Values**: inherited from `ProductRatePlanCharge.ApplyDiscountTo` 
            BillCycleDay:
              type: integer
              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
            BillCycleType:
              type: string
              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. 
            BillingPeriod:
              type: string
              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. 
            BillingPeriodAlignment:
              type: string
              description: >-2
                 Aligns charges within the same subscription if multiple charges begin on different dates.


                **Character limit**: 24



                **Values**: inherited from `ProductRatePlanCharge.BillingPeriodAlignment` 
            BillingTiming:
              type: string
              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/).

            ChargeModel:
              type: string
              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` 
            ChargeNumber:
              type: string
              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
            ChargeType:
              type: string
              description: |-2
                 Specifies the type of charge.


                **Character limit**: 9


                **Values**: inherited from `ProductRatePlanCharge.ChargeType` 
            ChargedThroughDate:
              type: string
              description: >-2
                 The date through which a customer has been billed for the charge.


                **Character limit**: 29



                **Values**: automatically generated 
              format: date
            CreatedById:
              type: string
              description: >-
                The ID of the Zuora user who created the `RatePlanCharge`
                object.


                **Character limit**: 32



                **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-2
                 The date when the `RatePlanCharge` object was created.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            DMRC:
              type: number
              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
            DTCV:
              type: number
              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
            Description:
              type: string
              description: |-2
                 A description of the charge.


                **Character limit**: 500


                **Values**: inherited from `ProductRatePlanCharge.Description` 
            DiscountAmount:
              type: number
              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
            DiscountLevel:
              type: string
              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` 
            DiscountPercentage:
              type: number
              description: " Query Filter "
              format: double
            EffectiveEndDate:
              type: string
              description: |-2
                 The date when the segmented charge ends or ended.


                **Character limit**: 16


                **Values**: automatically generated 
              format: date
            EffectiveStartDate:
              type: string
              description: |-2
                 The date when the segmented charge starts or started.


                **Character limit**: 16


                **Values**: automatically generated 
              format: date
            EndDateCondition:
              type: string
              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. 
            IncludedUnits:
              type: number
              description: " Query Filter "
              format: double
            IsLastSegment:
              type: boolean
              description: >-
                Indicates if the segment of the rate plan charge is the most
                recent segment.


                **Character limit**: 5



                **Values**: automatically generated: `true`, `false` 
            ListPriceBase:
              type: string
              description: |
                The list price base for the product rate plan charge.


                **Values**: one of the following:

                - `Per Month`
                - `Per Billing Period`
                - `Per Week`
            MRR:
              type: number
              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
            Name:
              type: string
              description: |-
                The name of the rate plan charge.

                **Character limit**: 100


                **Values**: automatically generated 
            NumberOfPeriods:
              type: integer
              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
            OriginalId:
              type: string
              description: |-
                The original ID of the rate plan charge.

                **Character limit**: 32


                **Values**: automatically generated 
            OverageCalculationOption:
              type: string
              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` 
            OveragePrice:
              type: number
              description: " Query Filter "
              format: double
            OverageUnusedUnitsCreditOption:
              type: string
              description: >-2
                 Determines whether to credit the customer with unused units of usage.


                **Character limit**: 20



                **Values**: inherited from `ProductRatePlanCharge.OverageUnusedUnitsCreditOption` 
            Price:
              type: number
              description: " Query Filter "
              format: double
            PriceChangeOption:
              type: string
              description: >2
                 Applies an automatic price change when a termed subscription is renewed.


                **Character limit**:



                **Values**: one of the following:


                - `NoChange` (default)

                - `SpecificPercentageValue`

                - `UseLatestProductCatalogPricing`
            PriceIncreasePercentage:
              type: number
              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
            ProcessedThroughDate:
              type: string
              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
            ProductRatePlanChargeId:
              type: string
              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` 
            Quantity:
              type: number
              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
            RatePlanId:
              type: string
              description: |-2
                 The ID of the rate plan associated with the rate plan charge.


                **Character limit**: 32


                **Values**: inherited from `RatePlan.Id` 
            RevRecCode:
              type: string
              description: >-2
                 Associates this product rate plan charge with a specific revenue recognition code.


                **Character limit**: 70



                **Values**: a valid revenue recognition code 
            RevRecTriggerCondition:
              type: string
              description: |+2
                 Specifies when revenue recognition begins.


                **Character limit**: 22


                **Values**: one of the following:

                -  `ContractEffectiveDate`

                -  `ServiceActivationDate`

                -  `CustomerAcceptanceDate`

            RevenueRecognitionRuleName:
              type: string
              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 
            RolloverBalance:
              type: number
              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
            Segment:
              type: integer
              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
            SpecificBillingPeriod:
              type: integer
              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
            SpecificEndDate:
              type: string
              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
            TCV:
              type: number
              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
            TriggerDate:
              type: string
              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
            TriggerEvent:
              type: string
              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.
            UOM:
              type: string
              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` 
            UnusedUnitsCreditRates:
              type: number
              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
            UpToPeriods:
              type: integer
              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
            UpToPeriodsType:
              type: string
              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`.
            UpdatedById:
              type: string
              description: |-
                The ID of the last user to update the object.

                **Character limit**: 32


                **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the object was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            UsageRecordRatingOption:
              type: string
              description: >-2
                 Determines how Zuora processes usage records for per-unit usage charges.

                **Character limit**: 18



                **Values**: automatically generated 
            UseDiscountSpecificAccountingCode:
              type: boolean
              description: >-2
                 Determines whether to define a new accounting code for the new discount charge.


                **Character limit**: 5



                **Values**: inherited from `ProductRatePlanCharge.UseDiscountSpecificAccountingCode` 
            Version:
              type: integer
              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
            WeeklyBillCycleDay:
              type: string
              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`
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
    RatePlanChargeObjectCustomFields:
      title: ratePlanChargeFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    RatePlanChargeTier:
      required:
        - RatePlanChargeId
      type: object
      properties:
        CreatedById:
          type: string
          description: |-
            The ID of the Zuora user who created the RatePlanChargeTier object.

            **Character limit**: 32


            **Values**: automatically generated 
        CreatedDate:
          type: string
          description: |-2
             The date when the RatePlanChargeTier object was created.


            **Character limit**: 29


            **Values**: automatically generated 
          format: date-time
        EndingUnit:
          type: number
          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
        IsOveragePrice:
          type: boolean
          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 
        Price:
          type: number
          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
        PriceFormat:
          type: string
          description: |-2
             Indicates if the price is a flat fee or is per unit.


            **Character limit**: 8


            **Values**: `FlatFee`, `PerUnit` 
          enum:
            - FlatFee
            - PerUnit
        RatePlanChargeId:
          type: string
          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` 
        StartingUnit:
          type: number
          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
        Tier:
          type: integer
          description: |-2
             A unique number that identifies the tier that the price applies to.


            **Character limit**: 20


            **Values**: automatically generated 
          format: int32
        UpdatedById:
          type: string
          description: |-
            The ID of the last user to update the object.

            **Character limit**: 32


            **Values**: automatically generated 
        UpdatedDate:
          type: string
          description: |-2
             The date when the object was last updated.


            **Character limit**: 29


            **Values**: automatically generated 
          format: date-time
    RatePlanData:
      required:
        - RatePlan
      type: object
      properties:
        RatePlan:
          $ref: "#/components/schemas/RatePlanDataRatePlan"
        RatePlanChargeData:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/RatePlanChargeData"
        SubscriptionProductFeatureList:
          type: object
          properties:
            SubscriptionProductFeature:
              type: array
              description: ""
              items:
                $ref: "#/components/schemas/SubscriptionProductFeature"
          description: ""
    RatePlanDataRatePlan:
      title: RatePlan
      description: ""
      allOf:
        - required:
            - ProductRatePlanId
          type: object
          properties:
            AmendmentId:
              type: string
              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 
            AmendmentSubscriptionRatePlanId:
              type: string
              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 
            AmendmentType:
              type: string
              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` 
            CreatedById:
              type: string
              description: |-
                The ID of the Zuora user who created the RatePlan object.

                **Character limit**: 32


                **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-
                The date when the `RatePlan` object was last updated.

                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            Name:
              type: string
              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 
            ProductRatePlanId:
              type: string
              description: |-
                The ID of the associated product rate plan.

                **Character limit**: 32


                **Values**: a valid product rate plan ID 
            SubscriptionId:
              type: string
              description: |-
                The ID of the subscription that the rate plan belongs to.

                **Character limit**: 32


                **Values**: a valid subscription ID 
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the rate plan.


                **Character limit**: 32


                **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the rate plan was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
    RatePlanObjectCustomFields:
      title: ratePlanFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    RatePlanOverride:
      title: ratePlan
      required:
        - productRatePlanId
      type: object
      properties:
        chargeOverrides:
          type: array
          description: |
            List of charges associated with the rate plan.
          items:
            $ref: "#/components/schemas/ChargeOverride"
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        newRatePlanId:
          type: string
          description: |
            Internal identifier of the rate plan.
        productRatePlanId:
          type: string
          description: >
            Internal identifier of the product rate plan that the rate plan is
            based on.
        uniqueToken:
          maxLength: 50
          type: string
          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.
      description: |
        Rate plan associated with a subscription.
    RatePlanOverrideForEvergreen:
      title: ratePlan
      required:
        - productRatePlanId
      type: object
      properties:
        chargeOverrides:
          type: array
          description: |
            List of charges associated with the rate plan.
          items:
            $ref: "#/components/schemas/ChargeOverrideForEvergreen"
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        newRatePlanId:
          type: string
          description: |
            Internal identifier of the rate plan.
        productRatePlanId:
          type: string
          description: >
            Internal identifier of the product rate plan that the rate plan is
            based on.
        uniqueToken:
          maxLength: 50
          type: string
          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.
      description: |
        Rate plan associated with a subscription.
    RatePlanUpdate:
      title: updateProduct
      type: object
      properties:
        chargeUpdates:
          type: array
          items:
            $ref: "#/components/schemas/ChargeUpdate"
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        newRatePlanId:
          type: string
          description: >
            Internal identifier of the updated rate plan in the new subscription
            version.
        ratePlanId:
          type: string
          description: |
            Internal identifier of the rate plan that was updated.
        specificUpdateDate:
          type: string
          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
        uniqueToken:
          type: string
          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.
      description: |
        Information about an order action of type `UpdateProduct`.
    RatePlanUpdateForEvergreen:
      title: updateProduct
      type: object
      properties:
        chargeUpdates:
          type: array
          items:
            $ref: "#/components/schemas/ChargeUpdateForEvergreen"
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        newRatePlanId:
          type: string
          description: >
            Internal identifier of the updated rate plan in the new subscription
            version.
        ratePlanId:
          type: string
          description: |
            Internal identifier of the rate plan that was updated.
        specificUpdateDate:
          type: string
          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
        uniqueToken:
          type: string
          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.
      description: |
        Information about an order action of type `UpdateProduct`.
    RecurringFlatFeePricingOverride:
      title: recurringFlatFee
      description: >
        Pricing information about a recurring charge that uses the "flat fee"
        charge model. In this charge model, the charge has a fixed price.
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            listPrice:
              type: number
              description: |
                Price of the charge in each recurring period.
            listPriceBase:
              type: string
              description: |
                Specifies the duration of each recurring period.
              enum:
                - Per_Billing_Period
                - Per_Month
                - Per_Week
    RecurringFlatFeePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            listPrice:
              type: number
    RecurringPerUnitPricingOverride:
      title: recurringPerUnit
      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.
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            listPrice:
              type: number
              description: |
                Per-unit price of the charge in each recurring period.
            listPriceBase:
              type: string
              description: |
                Specifies the duration of each recurring period.
              enum:
                - Per_Billing_Period
                - Per_Month
                - Per_Week
            quantity:
              minimum: 0
              type: number
              description: |
                Number of units purchased.
    RecurringPerUnitPricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            listPrice:
              type: number
            quantity:
              minimum: 0
              type: number
    RecurringTieredPricingOverride:
      title: recurringTiered
      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.
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            listPriceBase:
              type: string
              description: |
                Specifies the duration of each recurring period.
              enum:
                - Per_Billing_Period
                - Per_Month
                - Per_Week
            quantity:
              minimum: 0
              type: number
              description: |
                Number of units purchased.
            tiers:
              type: array
              description: |
                List of cumulative pricing tiers in the charge.
              items:
                $ref: "#/components/schemas/ChargeTier"
    RecurringTieredPricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            quantity:
              minimum: 0
              type: number
            tiers:
              type: array
              items:
                $ref: "#/components/schemas/ChargeTier"
    RecurringVolumePricingOverride:
      title: recurringVolume
      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.
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            listPriceBase:
              type: string
              description: |
                Specifies the duration of each recurring period.
              enum:
                - Per_Billing_Period
                - Per_Month
                - Per_Week
            quantity:
              minimum: 0
              type: number
              description: |
                Number of units purchased.
            tiers:
              type: array
              description: |
                List of variable pricing tiers in the charge.
              items:
                $ref: "#/components/schemas/ChargeTier"
    RecurringVolumePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            quantity:
              minimum: 0
              type: number
            tiers:
              type: array
              items:
                $ref: "#/components/schemas/ChargeTier"
    RefundCreditMemoItemType:
      title: items
      required:
        - amount
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the refund on the specific item.
          format: double
        creditMemoItemId:
          type: string
          description: |
            The ID of the credit memo item that is refunded.
        creditTaxItemId:
          type: string
          description: |
            The ID of the credit memo taxation item that is refunded.
    RefundEntityPrefix:
      title: refund
      type: object
      properties:
        prefix:
          type: string
          description: |
            The prefix of refunds.
          example: R-
        startNumber:
          type: integer
          description: |
            The starting number of refunds.
          example: 10
      description: |
        Container for the prefix and starting number of refunds.
    RefundInvoicePayment:
      required:
        - InvoiceId
        - RefundAmount
      type: object
      properties:
        InvoiceId:
          type: string
          description: |
            The ID of the invoice that the payment is applied to.
        RefundAmount:
          type: string
          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
    RefundObjectCustomFields:
      title: refundFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    RefundObjectNSFields:
      title: refundFieldsNS
      type: object
      properties:
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        Origin__NS:
          maxLength: 255
          type: string
          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).
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
        SynctoNetSuite__NS:
          maxLength: 255
          type: string
          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).
      description: >
        Container for Refund fields provided by the [Zuora Connector for
        NetSuite](https://www.zuora.com/connect/app/?appId=265).
    RefundPartResponseType:
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the refund part.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the refund part.
        createdDate:
          type: string
          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
        creditMemoId:
          type: string
          description: |
            The ID of the credit memo associated with the refund part.
        id:
          type: string
          description: |
            The ID of the refund part.
        paymentId:
          type: string
          description: |
            The ID of the payment associated with the refund part.
        success:
          type: boolean
          description: Returns `true` if the request was processed successfully.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the refund part.
        updatedDate:
          type: string
          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
    RefundPartResponseTypewithSuccess:
      title: parts
      type: object
      properties:
        amount:
          type: number
          description: |
            The amount of the refund part.
          format: double
        createdById:
          type: string
          description: |
            The ID of the Zuora user who created the refund part.
        createdDate:
          type: string
          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
        creditMemoId:
          type: string
          description: |
            The ID of the credit memo associated with the refund part.
        id:
          type: string
          description: |
            The ID of the refund part.
        paymentId:
          type: string
          description: |
            The ID of the payment associated with the refund part.
        updatedById:
          type: string
          description: |
            The ID of the Zuora user who last updated the refund part.
        updatedDate:
          type: string
          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
    RemoveProduct:
      title: removeProduct
      type: object
      properties:
        ratePlanId:
          type: string
          description: |
            Internal identifier of the rate plan to remove.
        uniqueToken:
          type: string
          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.
      description: |
        Information about an order action of type `RemoveProduct`.
    RenewalTerm:
      type: object
      properties:
        period:
          type: integer
          description: >
            Duration of the renewal term in months, years, days, or weeks,
            depending on the value of the `periodType` field.
        periodType:
          type: string
          description: |
            Unit of time that the renewal term is measured in.
          enum:
            - Month
            - Year
            - Day
            - Week
    RevenueEventItemObjectCustomFields:
      title: revenueEventItemFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    RevenueEventObjectCustomFields:
      title: revenueEventFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    RevenueScheduleItemObjectCustomFields:
      title: revenueScheduleItemFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    RevenueScheduleItemType:
      title: revenueItems
      allOf:
        - required:
            - accountingPeriodName
          type: object
          properties:
            accountingPeriodName:
              type: string
              description: >
                Name of the accounting period. The open-ended accounting period
                is named `Open-Ended`.
        - $ref: "#/components/schemas/RevenueScheduleItemObjectCustomFields"
    RevenueScheduleObjectCustomFields:
      title: revenueScheduleFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    RevproAccountingCodes:
      required:
        - adjustmentLiabilityAccount
        - adjustmentRevenueAccount
        - contractAssetAccount
        - contractLiabilityAccount
        - productRatePlanChargeId
        - recognizedRevenueAccount
        - unbilledReceivablesAccount
      type: object
      properties:
        adjustmentLiabilityAccount:
          maxLength: 100
          type: string
          description: The name of the account where the Account Type is "Adjustment
            Liability".
        adjustmentRevenueAccount:
          maxLength: 100
          type: string
          description: The name of the account where the Account Type is "Adjustment
            Revenue".
        contractAssetAccount:
          maxLength: 100
          type: string
          description: The name of the account where the Account Type is "Contract Asset".
        contractLiabilityAccount:
          maxLength: 100
          type: string
          description: The name of the account where the Account Type is "Contract
            Liability".
        productRatePlanChargeId:
          type: string
          description: The ID of your product rate plan charge.
        recognizedRevenueAccount:
          maxLength: 100
          type: string
          description: The name of the account where the Account Type is "Recognized
            Revenue".
        unbilledReceivablesAccount:
          maxLength: 100
          type: string
          description: The name of the account where the Account Type is "Unbilled
            Receivables".
      example:
        adjustmentLiabilityAccount: adjustL-1
        adjustmentRevenueAccount: adjustRev-1
        contractAssetAccount: CA-2
        contractLiabilityAccount: CL-2
        productRatePlanChargeId: 2c92c0f962470b8101624b869fcd45fc
        recognizedRevenueAccount: ContractRevRec-1
        unbilledReceivablesAccount: unbilledR-1
    SaveResult:
      type: object
      properties:
        Errors:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/ActionsErrorResponse"
        Id:
          type: string
          description: ""
        Success:
          type: boolean
          description: ""
    SettingItemHttpOperation:
      title: httpOperation
      type: object
      properties:
        method:
          type: string
          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
        parameters:
          type: array
          description: An array of paramters required by this operation.
          items:
            $ref: "#/components/schemas/SettingItemHttpRequestParameter"
        requestType:
          type: object
          properties: {}
          description: JSON Schema for the request body of this operation.
        responseType:
          type: object
          properties: {}
          description: JSON Schema for the response body of this operation.
        url:
          type: string
          description: The endpoint url of the operation method. For example,
            `/settings/billing-rules`.
    SettingItemHttpRequestParameter:
      title: httpRequestParameter
      type: object
      properties:
        description:
          type: string
          description: The description of the paramter.
        name:
          type: string
          description: The name of the parameter.
    SettingItemWithOperationsInformation:
      title: settingItem
      type: object
      properties:
        context:
          type: string
          description: The context where this setting item is effective.
          enum:
            - Tenant
            - Entity
            - User
            - None
        description:
          type: string
          description: The description of the setting item as you see from Zuora UI.
        httpOperations:
          type: array
          description: An array of HTTP operation methods that are supported on this
            setting endpoint.
          items:
            $ref: "#/components/schemas/SettingItemHttpOperation"
        key:
          type: string
          description: The unique key to distinguish the setting item.
        pathPattern:
          type: string
          description: The path pattern of the setting endpoint, relative to `/settings`.
            For example, `/billing-rules`.
    SettingValueRequest:
      title: settingsRequest
      type: object
      properties:
        body:
          $ref: "#/components/schemas/BodyInSettingValueRequest"
        children:
          type: array
          description: >
            An array of requests that can only be executed after its parent
            request has been executed successfully.
          items:
            $ref: "#/components/schemas/ChildrenSettingValueRequest"
        id:
          type: string
          description: >
            The id of the request. You can set it to any string. It must be
            unique within the whole batch.
        method:
          type: string
          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
        url:
          type: string
          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`.
    SettingValueResponse:
      title: settingsValueResponse
      type: object
      properties:
        body:
          $ref: "#/components/schemas/BodyInSettingValueReponse"
        errorMessages:
          type: array
          description: >
            An array of error messages if errors occur when executing the
            request.
          items:
            type: string
        status:
          type: string
          description: |
            User readable response status, for example, 502 BAD_GATEWAY.
    SettingValueResponseWrapper:
      title: settingsValueResponseWrapper
      type: object
      properties:
        id:
          type: string
          description: |
            The Id of the corresponding request.
        method:
          type: string
          description: >
            The HTTP method. It is the same as that of the corresponding request.
          enum:
            - GET
            - HEAD
            - POST
            - PUT
            - PATCH
            - DELETE
            - OPTIONS
            - TRACE
        response:
          $ref: "#/components/schemas/SettingValueResponse"
        url:
          type: string
          description: |
            The url as specified in the corresponding request.
    SettingsBatchRequest:
      type: object
      properties:
        requests:
          type: array
          items:
            $ref: "#/components/schemas/SettingValueRequest"
      example:
        requests:
          - id: "1"
            method: GET
            url: /billing-rules
          - id: "2"
            method: GET
            url: /accounting-rules
    SettingsBatchResponse:
      title: batchResponse
      type: object
      properties:
        responses:
          type: array
          items:
            $ref: "#/components/schemas/SettingValueResponseWrapper"
    SoldToContact:
      allOf:
        - required:
            - firstName
            - lastName
          type: object
          properties:
            address1:
              maxLength: 255
              type: string
              description: >
                First line of the contact's address. This is often a street
                address or a business name.
            address2:
              maxLength: 255
              type: string
              description: |
                Second line of the contact's address.
            city:
              maxLength: 40
              type: string
              description: |
                City of the contact's address.
            country:
              maxLength: 64
              type: string
              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.
            county:
              maxLength: 32
              type: string
              description: |
                County of the contact's address.
            fax:
              maxLength: 40
              type: string
              description: |
                Fax number of the contact.
            firstName:
              maxLength: 100
              type: string
              description: |
                First name of the contact.
            homePhone:
              maxLength: 40
              type: string
              description: |
                Home phone number of the contact.
            lastName:
              maxLength: 100
              type: string
              description: |
                Last name of the contact.
            mobilePhone:
              maxLength: 40
              type: string
              description: |
                Mobile phone number of the contact.
            nickname:
              maxLength: 100
              type: string
              description: |
                Nickname of the contact.
            otherPhone:
              maxLength: 40
              type: string
              description: >
                Additional phone number of the contact. Use the `otherPhoneType`
                field to specify the type of phone number.
            otherPhoneType:
              type: string
              description: |
                Specifies the type of phone number in the `otherPhone` field.
              enum:
                - Work
                - Mobile
                - Home
                - Other
            personalEmail:
              maxLength: 80
              type: string
              description: |
                Personal email address of the contact.
              format: email
            postalCode:
              maxLength: 20
              type: string
              description: |
                ZIP code or other postal code of the contact's address.
            state:
              maxLength: 40
              type: string
              description: |
                State or province of the contact's address.
            taxRegion:
              maxLength: 32
              type: string
              description: >
                Region defined in your taxation rules. Only applicable if you
                use Zuora Tax.
            workEmail:
              maxLength: 80
              type: string
              description: |
                Business email address of the contact.
              format: email
            workPhone:
              maxLength: 40
              type: string
              description: |
                Business phone number of the contact.
          description: |
            Contact details associated with an account.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    SoldToContactPostOrder:
      allOf:
        - required:
            - firstName
            - lastName
          type: object
          properties:
            address1:
              maxLength: 255
              type: string
              description: >
                First line of the contact's address. This is often a street
                address or a business name.
            address2:
              maxLength: 255
              type: string
              description: |
                Second line of the contact's address.
            city:
              maxLength: 40
              type: string
              description: |
                City of the contact's address.
            contactDescription:
              maxLength: 100
              type: string
              description: |
                A description for the contact.          
            country:
              maxLength: 64
              type: string
              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.
            county:
              maxLength: 32
              type: string
              description: |
                County of the contact's address.
            fax:
              maxLength: 40
              type: string
              description: |
                Fax number of the contact.
            firstName:
              maxLength: 100
              type: string
              description: |
                First name of the contact.
            homePhone:
              maxLength: 40
              type: string
              description: |
                Home phone number of the contact.
            lastName:
              maxLength: 100
              type: string
              description: |
                Last name of the contact.
            mobilePhone:
              maxLength: 40
              type: string
              description: |
                Mobile phone number of the contact.
            nickname:
              maxLength: 100
              type: string
              description: |
                Nickname of the contact.
            otherPhone:
              maxLength: 40
              type: string
              description: >
                Additional phone number of the contact. Use the `otherPhoneType`
                field to specify the type of phone number.
            otherPhoneType:
              type: string
              description: |
                Specifies the type of phone number in the `otherPhone` field.
              enum:
                - Work
                - Mobile
                - Home
                - Other
            personalEmail:
              maxLength: 80
              type: string
              description: |
                Personal email address of the contact.
              format: email
            postalCode:
              maxLength: 20
              type: string
              description: |
                ZIP code or other postal code of the contact's address.
            state:
              maxLength: 40
              type: string
              description: |
                State or province of the contact's address.
            taxRegion:
              maxLength: 32
              type: string
              description: >
                Region defined in your taxation rules. Only applicable if you
                use Zuora Tax.
            workEmail:
              maxLength: 80
              type: string
              description: |
                Business email address of the contact.
              format: email
            workPhone:
              maxLength: 40
              type: string
              description: |
                Business phone number of the contact.
          description: |
            Contact details associated with an account.
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    SubmitDataQueryRequest:
      required:
        - compression
        - output
        - outputFormat
        - query
      type: object
      properties:
        columnSeparator:
          type: string
          description: >
            The column separator. Only applicable if the `outputFormat` is `DSV`.
        compression:
          type: string
          description: |
            Specifies whether Zuora compresses the query results.
          enum:
            - NONE
            - GZIP
            - ZIP
        encryptionKey:
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
          description: >
            Base-64 encoded public key of an RSA key-pair.


            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
        output:
          required:
            - target
          type: object
          properties:
            target:
              type: string
              description: |
                Set this field to `S3`.
              enum:
                - S3
          description: |
            Additional information about the query results.
        outputFormat:
          type: string
          description: >
            Specifies the format of the query results.


            * `JSON` - Each row in the query results will be a JSON object. The query results will not be wrapped in a JSON array.

            * `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
        query:
          type: string
          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.
        readDeleted:
          type: boolean
          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.
          default: false
        useIndexJoin:
          type: boolean
          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.
      example:
        compression: NONE
        output:
          target: S3
        outputFormat: JSON
        query: SELECT accountnumber, balance FROM Account WHERE Account.balance > 100
    SubmitDataQueryResponse:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/DataQueryJob"
    SubscribeRequest:
      required:
        - Account
        - SubscriptionData
      type: object
      properties:
        Account:
          $ref: "#/components/schemas/SubscribeRequestAccount"
        BillToContact:
          $ref: "#/components/schemas/SubscribeRequestBillToContact"
        PaymentMethod:
          required:
            - Type
          type: object
          properties:
            AccountId:
              type: string
              description: " The ID of the customer account associated with this payment
                method. "
            AchAbaCode:
              type: string
              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 
            AchAccountName:
              type: string
              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 
            AchAccountNumber:
              type: string
              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 
            AchAccountNumberMask:
              type: string
              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 
            AchAccountType:
              type: string
              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`
            AchAddress1:
              type: string
              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 
            AchAddress2:
              type: string
              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 
            AchBankName:
              type: string
              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 
            Active:
              type: boolean
              description: >-2
                 Specifies whether a payment method is available in Zuora. The default value is `false`.


                **Character limit**: 5



                **Values**: `true`, `false` 
            BankBranchCode:
              type: string
              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 
            BankCheckDigit:
              type: string
              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 
            BankCity:
              type: string
              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 
            BankCode:
              type: string
              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 
            BankIdentificationNumber:
              type: string
              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 
            BankName:
              type: string
              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 
            BankPostalCode:
              type: string
              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 
            BankStreetName:
              type: string
              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 
            BankStreetNumber:
              type: string
              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 
            BankTransferAccountName:
              type: string
              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 
            BankTransferAccountNumber:
              type: string
              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 
            BankTransferAccountNumberMask:
              type: string
              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 
            BankTransferAccountType:
              type: string
              description: >-2
                 The type of the customer's bank account. Use this field for direct debit payment methods.


                **Character limit**: 11



                **Values**: `DirectDebit` 
            BankTransferType:
              type: string
              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)
            BusinessIdentificationCode:
              type: string
              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 
            City:
              type: string
              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 
            Country:
              type: string
              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 
            CreatedById:
              type: string
              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 
            CreatedDate:
              type: string
              description: >-2
                 The date when the `PaymentMethod` object was created in the Zuora system.


                **Character limit**: 29



                **Values**: automatically generated 
              format: date-time
            CreditCardAddress1:
              type: string
              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 
            CreditCardAddress2:
              type: string
              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 
            CreditCardCity:
              type: string
              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 
            CreditCardCountry:
              type: string
              description: " The country of the card holder's address."
            CreditCardExpirationMonth:
              type: integer
              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
            CreditCardExpirationYear:
              type: integer
              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
            CreditCardHolderName:
              type: string
              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 
            CreditCardMaskNumber:
              type: string
              description: |-2
                 A masked version of the credit or debit card number.


                **Character limit**: 32


                **Values**: automatically generated 
            CreditCardNumber:
              type: string
              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 
            CreditCardPostalCode:
              type: string
              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 
            CreditCardSecurityCode:
              type: string
              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 
            CreditCardState:
              type: string
              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. "
            CreditCardType:
              type: string
              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).
            DeviceSessionId:
              type: string
              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**: 
            Email:
              type: string
              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 
            ExistingMandate:
              type: string
              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` 
            FirstName:
              type: string
              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 
            GatewayOptionData:
              required:
                - GatewayOption
              type: object
              properties:
                GatewayOption:
                  type: array
                  description: ""
                  items:
                    $ref: "#/components/schemas/GatewayOption"
              description: |-2
                 Use this field to pass gateway options.


                **Character limit**: 255


                **Values**: GatewayOption 
            IBAN:
              type: string
              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 
            IPAddress:
              type: string
              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 
            Id:
              type: string
              description: >-2
                 The ID of this object. Upon creation, the ID of this object is `PaymentMethodId`.


                **Character limit**: 32



                **Values**: automatically generated 
            LastFailedSaleTransactionDate:
              type: string
              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
            LastName:
              type: string
              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 
            LastTransactionDateTime:
              type: string
              description: |-2
                 The date of the most recent transaction.


                **Character limit**: 29


                **Values**: a valid date and time value 
              format: date-time
            LastTransactionStatus:
              type: string
              description: |-2
                 The status of the most recent transaction.


                **Character limit**: 39


                **Values**: automatically generated 
            MandateCreationDate:
              type: string
              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
            MandateID:
              type: string
              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 
            MandateReceived:
              type: string
              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) 
            MandateUpdateDate:
              type: string
              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
            MaxConsecutivePaymentFailures:
              type: integer
              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 
            Name:
              type: string
              description: " Create Query Delete Filter "
            NumConsecutiveFailures:
              type: integer
              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
            PaymentMethodStatus:
              type: string
              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. 
            PaymentRetryWindow:
              type: integer
              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 
            PaypalBaid:
              type: string
              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 
            PaypalEmail:
              type: string
              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 
            PaypalPreapprovalKey:
              type: string
              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 
            PaypalType:
              type: string
              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` 
            Phone:
              type: string
              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 
            PostalCode:
              type: string
              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 
            SecondTokenId:
              type: string
              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 
            SkipValidation:
              type: boolean
              description: >-2
                 Creates the payment method even if authorization fails with the payment gateway.


                **Character limit**: 5



                **Values**: `t``rue`, `false` 
            State:
              type: string
              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 
            StreetName:
              type: string
              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 
            StreetNumber:
              type: string
              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 
            TokenId:
              type: string
              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
            TotalNumberOfErrorPayments:
              type: integer
              description: |-2
                 The number of error payments that used this payment method.


                **Character limit**:


                **Values**: automatically generated 
              format: int32
            TotalNumberOfProcessedPayments:
              type: integer
              description: >-2
                 The number of successful payments that used this payment method.


                **Character limit**:



                **Values**: automatically generated 
              format: int32
            Type:
              type: string
              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
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the payment method.


                **Character limit**: 32


                **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the payment method was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            UseDefaultRetryRule:
              type: boolean
              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` 
          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.
        PreviewOptions:
          type: object
          properties:
            EnablePreviewMode:
              type: boolean
              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.
            NumberOfPeriods:
              type: integer
              description: |
                The number of invoice periods to show in a preview.
            PreviewThroughTermEnd:
              type: boolean
              description: >
                Specifies whether to preview the charge through the end of the
                subscription term. Applicable to termed subscriptions only.
            PreviewType:
              type: string
              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
              default: InvoiceItem
              enum:
                - InvoiceItem
                - ChargeMetrics
                - InvoiceItemChargeMetrics
          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.
        SoldToContact:
          $ref: "#/components/schemas/SubscribeRequestSoldToContact"
        SubscribeOptions:
          required:
            - GenerateInvoice
            - ProcessPayments
          type: object
          properties:
            ApplyCreditBalance:
              type: boolean
              description: ""
            ElectronicPaymentOptions:
              type: object
              properties:
                PaymentMethodId:
                  type: string
                  description: ""
              description: ""
            ExternalPaymentOptions:
              type: object
              properties:
                Amount:
                  type: number
                  description: ""
                  format: double
                EffectiveDate:
                  type: string
                  description: ""
                  format: date
                GatewayOrderId:
                  type: string
                  description: ""
                PaymentMethodId:
                  type: string
                  description: ""
                ReferenceId:
                  type: string
                  description: ""
              description: ""
            GenerateInvoice:
              type: boolean
              description: ""
            ProcessPayments:
              type: boolean
              description: ""
            SubscribeInvoiceProcessingOptions:
              type: object
              properties:
                InvoiceDate:
                  type: string
                  description: ""
                  format: date
                InvoiceProcessingScope:
                  type: string
                  description: ""
                InvoiceTargetDate:
                  type: string
                  description: ""
                  format: date
              description: ""
          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. 
        SubscriptionData:
          required:
            - RatePlanData
            - Subscription
          type: object
          properties:
            RatePlanData:
              type: array
              description: ""
              items:
                $ref: "#/components/schemas/RatePlanData"
            Subscription:
              $ref: "#/components/schemas/SubscribeRequestSubscriptionDataSubscription"
          description: >-2
             This object contains the information on the contract's dates and terms.


            **Values:** A valid SubscriptionData object. 
    SubscribeRequestAccount:
      title: Account
      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.
      allOf:
        - required:
            - Batch
            - BillCycleDay
            - Currency
            - Name
          type: object
          properties:
            AccountNumber:
              type: string
              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
            AdditionalEmailAddresses:
              type: string
              description: |-
                List of additional email addresses to receive emailed invoices.

                **Character limit**: 120


                **Values**: comma-separated list of email addresses 
            AllowInvoiceEdit:
              type: boolean
              description: |-2
                 Indicates if associated invoices can be edited.


                **Character limit**: 5


                **Values**: `true`, `false` (default if left null) 
            AutoPay:
              type: boolean
              description: >-2
                 Indicates if future payments are automatically collected when they're due during a Payment Run.


                **Character limit**: 5



                **Values**: `true`, `false` (default) 
            Batch:
              type: string
              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). 
            BcdSettingOption:
              type: string
              description: |-
                Billing cycle day setting option.

                **Character limit**: 9


                **Values**: `AutoSet`, `ManualSet` 
            BillCycleDay:
              type: integer
              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
            CommunicationProfileId:
              type: string
              description: |-
                Associates the account with a specified communication profile.

                **Character limit**: 32


                **Values**: a valid communication profile ID 
            CrmId:
              type: string
              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 
            Currency:
              type: string
              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) "
            CustomerServiceRepName:
              type: string
              description: >-
                Name of the account's customer service representative, if
                applicable.


                **Character limit**: 50



                **Values**: a string of 50 characters or fewer 
            DefaultPaymentMethodId:
              type: string
              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. 
            Id:
              type: string
              description: Internal identifier of an existing account. Only set this field if
                you want to assign the subscription to an existing account.
            InvoiceDeliveryPrefsEmail:
              type: boolean
              description: >-
                Indicates if the customer wants to receive invoices through
                email.

                **Character limit**: 5



                **Values**: `true`, `false` (default if left null) 
            InvoiceDeliveryPrefsPrint:
              type: boolean
              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) 
            InvoiceTemplateId:
              type: string
              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.


            LastInvoiceDate:
              type: string
              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
            Name:
              type: string
              description: |-
                Name of the account as displayed in the Zuora UI.

                **Character limit**: 255


                **Values**: a string of 255 characters or fewer 
            Notes:
              type: string
              description: |-2
                 Comments about the account.

                **Character limit**: 65,535


                **Values**: a string of 65,535 characters 
            ParentId:
              type: string
              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 
            PaymentGateway:
              type: string
              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
            PaymentTerm:
              type: string
              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) 
            PurchaseOrderNumber:
              type: string
              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 
            SalesRepName:
              type: string
              description: >-
                The name of the sales representative associated with this
                account, if applicable.


                **Character limit**: 50



                **Values**: a string of 50 characters or fewer 
            TaxCompanyCode:
              type: string
              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 
            TaxExemptCertificateID:
              type: string
              description: |-
                ID of your customer's tax exemption certificate.

                **Character limit**: 32


                **Values**: a string of 32 characters or fewer 
            TaxExemptCertificateType:
              type: string
              description: |-
                Type of the tax exemption certificate that your customer holds.
                **Character limit**: 32


                **Values**: a string of 32 characters or fewer 
            TaxExemptDescription:
              type: string
              description: >-
                Description of the tax exemption certificate that your customer
                holds.


                **Character limit**: 500



                **Values**: a string of 500 characters or fewer 
            TaxExemptEffectiveDate:
              type: string
              description: |-
                Date when the the customer's tax exemption starts.

                **Character limit**: 29 **Version notes**: requires Z-Tax 
              format: date
            TaxExemptExpirationDate:
              type: string
              description: |-
                Date when the customer's tax exemption certificate expires
                **Character limit**: 29 **Version notes**: requires Z-Tax 
              format: date
            TaxExemptIssuingJurisdiction:
              type: string
              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 
            TaxExemptStatus:
              type: string
              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`
            TotalInvoiceBalance:
              type: number
              description: |-
                Total balance of the account's invoices.

                **Character limit**: 16


                **Values**: a valid currency value 
              format: double
            VATId:
              type: string
              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 
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
    SubscribeRequestBillToContact:
      title: Contact
      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.
      allOf:
        - required:
            - FirstName
            - LastName
          type: object
          properties:
            AccountId:
              type: string
              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 
            Address1:
              type: string
              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 
            Address2:
              type: string
              description: |-2
                 The second line of the contact's address.


                **Character limit**: 255


                **Values**: a string of 255 characters or fewer 
            City:
              type: string
              description: >-2
                 The city of the contact's address.


                **Character limit**: 40 **Values: **a string of 40 characters or fewer 
            Country:
              type: string
              description: " The country of the contact's address. This field is only required
                if you enbale taxation. "
            County:
              type: string
              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 
            CreatedById:
              type: string
              description: |-
                The ID of the Zuora user who created the contact.

                **Character limit**: 32


                **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-
                The date when the contact was created.

                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            Description:
              type: string
              description: |-2
                 A description for the contact.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
            Fax:
              type: string
              description: |-2
                 The contact's fax number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
            FirstName:
              type: string
              description: |-2
                 The contact's first name.


                **Character limit**: 100


                **Values**: a string of the contact's first name 
            HomePhone:
              type: string
              description: |-2
                 The contact's home phone number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
            LastName:
              type: string
              description: |-2
                 The contact's last name.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
            MobilePhone:
              type: string
              description: |-2
                 The contact's mobile phone number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
            NickName:
              type: string
              description: |-2
                 A nickname for the contact.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
            OtherPhone:
              type: string
              description: |-2
                 An additional phone number for the contact.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
            OtherPhoneType:
              type: string
              description: |-
                The type of the `OtherPhone`.

                **Character limit**: 20


                **Values**: `Work`, `Mobile`, `Home`, `Other` 
            PersonalEmail:
              type: string
              description: |-2
                 The contact's personal email address.


                **Character limit**: 80


                **Values**: a string of 80 characters or fewer 
            PostalCode:
              type: string
              description: >-2
                 The zip code for the contact's address.
                **Character limit:** 20 **Values: **a string of 20 characters or fewer 
            State:
              type: string
              description: " The state or province of the contact's address. "
            TaxRegion:
              type: string
              description: "If using
                [Z-Tax](https://knowledgecenter.zuora.com/CB_Billing/J_Billing_\
                Operations/L_Taxes/A_Z-Tax) tax rules "
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who lasted updated the contact.


                **Character limit**: 32


                **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the contact was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            WorkEmail:
              type: string
              description: |-2
                 The contact's business email address.


                **Character limit**: 80


                **Values**: a string of 80 characters or fewer 
            WorkPhone:
              type: string
              description: |-2
                 The contact's business phone number.


                **Character limit**: 40 **notes**: --


                **Values**: a string of 40 characters or fewer 
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    SubscribeRequestSoldToContact:
      title: Contact
      description: >-2
         Unless otherwise specified, this field defaults to the information in the `BillToContact` field.

        **Values:** A valid contact. 
      allOf:
        - type: object
          properties:
            AccountId:
              type: string
              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 
            Address1:
              type: string
              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 
            Address2:
              type: string
              description: |-2
                 The second line of the contact's address.


                **Character limit**: 255


                **Values**: a string of 255 characters or fewer 
            City:
              type: string
              description: >-2
                 The city of the contact's address.


                **Character limit**: 40 **Values: **a string of 40 characters or fewer 
            Country:
              type: string
              description: " The country of the contact's address. "
            County:
              type: string
              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 
            CreatedById:
              type: string
              description: |-
                The ID of the Zuora user who created the contact.

                **Character limit**: 32


                **Values**: automatically generated 
            CreatedDate:
              type: string
              description: |-
                The date when the contact was created.

                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            Description:
              type: string
              description: |-2
                 A description for the contact.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
            Fax:
              type: string
              description: |-2
                 The contact's fax number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
            FirstName:
              type: string
              description: |-2
                 The contact's first name.


                **Character limit**: 100


                **Values**: a string of the contact's first name 
            HomePhone:
              type: string
              description: |-2
                 The contact's home phone number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
            LastName:
              type: string
              description: |-2
                 The contact's last name.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
            MobilePhone:
              type: string
              description: |-2
                 The contact's mobile phone number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
            NickName:
              type: string
              description: |-2
                 A nickname for the contact.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
            OtherPhone:
              type: string
              description: |-2
                 An additional phone number for the contact.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
            OtherPhoneType:
              type: string
              description: |-
                The type of the `OtherPhone`.

                **Character limit**: 20


                **Values**: `Work`, `Mobile`, `Home`, `Other` 
            PersonalEmail:
              type: string
              description: |-2
                 The contact's personal email address.


                **Character limit**: 80


                **Values**: a string of 80 characters or fewer 
            PostalCode:
              type: string
              description: >-2
                 The zip code for the contact's address.
                **Character limit:** 20 **Values: **a string of 20 characters or fewer 
            State:
              type: string
              description: " The state or province of the contact's address. "
            TaxRegion:
              type: string
              description: "If using
                [Z-Tax](https://knowledgecenter.zuora.com/CB_Billing/J_Billing_\
                Operations/L_Taxes/A_Z-Tax) tax rules "
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who lasted updated the contact.


                **Character limit**: 32


                **Values**: automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the contact was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
            WorkEmail:
              type: string
              description: |-2
                 The contact's business email address.


                **Character limit**: 80


                **Values**: a string of 80 characters or fewer 
            WorkPhone:
              type: string
              description: |-2
                 The contact's business phone number.


                **Character limit**: 40 **notes**: --


                **Values**: a string of 40 characters or fewer 
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    SubscribeRequestSubscriptionDataSubscription:
      title: Subscription
      description: ""
      allOf:
        - required:
            - ContractEffectiveDate
            - TermType
          type: object
          properties:
            AccountId:
              type: string
              description: " This field can be updated when `Status` is `Draft`. "
            AncestorAccountId:
              type: string
              description: >-2
                 A filter option for querying all subscriptions under the same account hierarchy.


                **Character limit**: 32



                **Values**: a valid account ID 
            AutoRenew:
              type: boolean
              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` 
            CancelledDate:
              type: string
              description: |-2
                 The date of the amendment that canceled the subscription.



                **Values**: inherited from `Amendment`.`EffectiveDate` 
              format: date
            ContractAcceptanceDate:
              type: string
              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
            ContractEffectiveDate:
              type: string
              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
            CreatedById:
              type: string
              description: |-
                The user ID of the person who created the subscription.

                **Character limit**: 32


                **Values**: automatically generated 
            CreatedDate:
              type: string
              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
            CreatorAccountId:
              type: string
              description: >-2
                 The account ID that created the subscription or the amended subscription.


                **Character limit**: 32



                **Values**: automatically generated 
            CreatorInvoiceOwnerId:
              type: string
              description: >-
                The account ID that owns the invoices associated with the
                subscription or the amended subscription.



                **Character limit**: 32



                **Values**: automatically generated 
            CurrentTerm:
              type: integer
              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
            CurrentTermPeriodType:
              type: string
              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`
            InitialTerm:
              type: integer
              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
            InitialTermPeriodType:
              type: string
              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.
            InvoiceOwnerId:
              type: string
              description: " This field can be updated when `Status` is `Draft`. "
            IsInvoiceSeparate:
              type: boolean
              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) 
            Name:
              type: string
              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
            Notes:
              type: string
              description: |-2
                 Use this field to record comments about the subscription.


                **Character limit**: 500


                **Values**: a string of 500 characters or fewer 
            OriginalCreatedDate:
              type: string
              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
            OriginalId:
              type: string
              description: |-2
                 The original ID of this subscription.



                **Values**: automatically generated 
            PreviousSubscriptionId:
              type: string
              description: >-2
                 The subscription ID immediately prior to the current subscription.


                **Character limit**: 32



                **Values**: automatically generated 
            RenewalSetting:
              type: string
              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` 
            RenewalTerm:
              type: integer
              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
            RenewalTermPeriodType:
              type: string
              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`.
            ServiceActivationDate:
              type: string
              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
            Status:
              type: string
              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**.)
            SubscriptionEndDate:
              type: string
              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
            SubscriptionStartDate:
              type: string
              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
            TermEndDate:
              type: string
              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
            TermStartDate:
              type: string
              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
            TermType:
              type: string
              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` 
            UpdatedById:
              type: string
              description: |-2
                 The ID of the user who last updated the subscription.
                **Character limit:** 32 **Values: **automatically generated 
            UpdatedDate:
              type: string
              description: |-2
                 The date when the subscription was last updated.
                **Character limit:** 29


                **Values**: automatically generated 
              format: date-time
            Version:
              type: integer
              description: |-2
                 The version number of the subscription.



                **Values**: automatically generated 
              format: int32
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    SubscribeResult:
      type: object
      properties:
        AccountId:
          type: string
          description: ""
        AccountNumber:
          type: string
          description: ""
        ChargeMetricsData:
          type: object
          properties:
            ChargeMetrics:
              type: array
              description: ""
              items:
                $ref: "#/components/schemas/NewChargeMetrics"
          description: ""
        Errors:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/ActionsErrorResponse"
        GatewayResponse:
          type: string
          description: ""
        GatewayResponseCode:
          type: string
          description: ""
        InvoiceData:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/ActionSubscribeInvoiceData"
        InvoiceId:
          type: string
          description: ""
        InvoiceNumber:
          type: string
          description: ""
        InvoiceResult:
          type: object
          properties:
            Invoice:
              type: array
              description: ""
              items:
                type: object
                properties:
                  Id:
                    type: string
                    description: ""
                  InvoiceNumber:
                    type: string
                    description: ""
                description: ""
          description: ""
        PaymentId:
          type: string
          description: ""
        PaymentTransactionNumber:
          type: string
          description: ""
        SubscriptionId:
          type: string
          description: ""
        SubscriptionNumber:
          type: string
          description: ""
        Success:
          type: boolean
          description: ""
        TotalMrr:
          type: number
          description: ""
          format: double
        TotalTcv:
          type: number
          description: ""
          format: double
    SubscriptionObjectCustomFields:
      title: subscriptionFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    SubscriptionObjectNSFields:
      title: subscriptionFieldsNS
      type: object
      properties:
        IntegrationId__NS:
          maxLength: 255
          type: string
          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).
        IntegrationStatus__NS:
          maxLength: 255
          type: string
          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).
        Project__NS:
          maxLength: 255
          type: string
          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).
        SalesOrder__NS:
          maxLength: 255
          type: string
          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).
        SyncDate__NS:
          maxLength: 255
          type: string
          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).
      description: >
        Container for Subscription fields provided by the [Zuora Connector for
        NetSuite](https://www.zuora.com/connect/app/?appId=265).
    SubscriptionObjectQTFields:
      title: subscriptionFieldsQT
      type: object
      properties:
        CpqBundleJsonId__QT:
          maxLength: 32
          type: string
          description: >
            The Bundle product structures from Zuora Quotes if you utilize
            Bundling in Salesforce. Do not change the value in this field.
        OpportunityCloseDate__QT:
          type: string
          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
        OpportunityName__QT:
          maxLength: 100
          type: string
          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.
        QuoteBusinessType__QT:
          maxLength: 32
          type: string
          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.
        QuoteNumber__QT:
          maxLength: 32
          type: string
          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.
        QuoteType__QT:
          maxLength: 32
          type: string
          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.
      description: |
        Container for Subscription fields provided by Zuora Quotes.
    SubscriptionProductFeature:
      allOf:
        - required:
            - FeatureId
          type: object
          properties:
            CreatedById:
              type: string
              description: ""
            CreatedDate:
              type: string
              description: >-2
                 Date and time when the product feature was added to the subscription.


                **Character limit**: 29



                **Values**: 
              format: date-time
            Description:
              type: string
              description: |-2
                 Description of the subscription product feature.


                **Character limit**: 500


                **Values**: 
            FeatureCode:
              type: string
              description: |-2
                 Unique code of the feature.


                **Character limit**: 255


                **Values**: 
            FeatureId:
              type: string
              description: |-2
                 Internal Zuora ID of the feature.


                **Character limit**: 32


                **Values**: 
            Name:
              type: string
              description: |-2
                 Name of the feature.


                **Character limit**: 255


                **Values**: 
            RatePlanId:
              type: string
              description: |-2
                 Id of the product rate plan to which the feature belongs.


                **Character limit**: 32


                **Values**: 
            UpdatedById:
              type: string
              description: >-2
                 Internal Zuora ID of the user who last updated the subscription product feature.


                **Character limit**: 32



                **Values**: 
            UpdatedDate:
              type: string
              description: >-2
                 Date and time when the subscription product feature was last updated.


                **Character limit**: 29



                **Values**: 
              format: date-time
        - $ref: "#/components/schemas/SubscriptionProductFeatureObjectCustomFields"
    SubscriptionProductFeatureList:
      type: object
      properties:
        SubscriptionProductFeature:
          type: array
          description: ""
          items:
            $ref: "#/components/schemas/ActionAmendSubscriptionProductFeature"
    SubscriptionProductFeatureObjectCustomFields:
      title: subscriptionProductFeatureFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    Task:
      type: object
      properties:
        action_type:
          type: string
          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
        call_type:
          type: string
          description: |
            The type of API used.
        concurrent_limit:
          type: integer
          description: the number of concurrent tasks that are allowed to run simultaneously
        data:
          type: object
          properties: {}
          description: |
            The data payload for the task.
        end_time:
          type: string
          description: |
            If **Instance** is **true**, the end time of the task instance.
        error:
          type: string
          description: >
            If **Instance** is **true** and **status** is **Error**, the error
            reason of the task instance failure.
        error_class:
          type: string
          description: >
            If **Instance** is **true** and **status** is **Error**, the error
            class of the task instance failure.
        error_details:
          type: string
          description: >
            If **Instance** is **true** and **status** is **Error**, the error
            details of the task instance failure.
        id:
          type: integer
          description: |
            The unique ID of the task.
        instance:
          type: boolean
          description: |
            Indicates whether this task belongs to an instance of a workflow.
        name:
          type: string
          description: |
            The name of the task.
        object:
          type: string
          description: |
            The selected object for the task.
        object_id:
          type: string
          description: |
            The id of the selected object of the task.
        original_task_id:
          type: integer
          description: >
            If **Instance** is **true**, the ID of the original task in the
            original workflow.
        original_workflow_id:
          type: integer
          description: |
            If **Instance** is **true**, the ID of the original workflow.
        parameters:
          type: object
          properties: {}
          description: |
            The configuration of the task.
        start_time:
          type: string
          description: |
            If **Instance** is **true**, the start time of the task instance.
        status:
          type: string
          description: |
            If **Instance** is **true**, the status of the task instance.
          enum:
            - Queued
            - Processing
            - Pending
            - Success
            - Stopped
            - Error
        tags:
          type: array
          description: |
            The array of filter tags.
          items:
            type: string
        task_id:
          type: integer
          description: the id of this task's parent task. Will be null if this is the
            first task of the workflow
        workflow_id:
          type: integer
          description: |
            The ID of the workflow that the task belongs to.
      description: |
        A task.
    TasksResponse:
      type: object
      properties:
        data:
          type: array
          description: |
            The list of tasks retrieved.
          items:
            $ref: "#/components/schemas/Task"
        pagination:
          type: object
          properties:
            next_page:
              type: string
              description: >
                A string containing the URL where the next page of data can be
                retrieved.
            page:
              type: integer
              description: |
                An integer denoting the current page number.
            page_length:
              type: integer
              description: |
                An integer denoting the number of tasks in this response.
          description: >
            An object containing pagination information for the list of tasks
            returned by the API.
    TaxInfo:
      title: taxInfo
      type: object
      properties:
        VATId:
          maxLength: 25
          type: string
          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).
        companyCode:
          maxLength: 50
          type: string
          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).
        exemptCertificateId:
          maxLength: 32
          type: string
          description: >
            ID of the customer tax exemption certificate. Only applicable if you
            use Zuora Tax.
        exemptCertificateType:
          maxLength: 32
          type: string
          description: >
            Type of tax exemption certificate that the customer holds. Only
            applicable if you use Zuora Tax.
        exemptDescription:
          maxLength: 500
          type: string
          description: >
            Description of the tax exemption certificate that the customer
            holds. Only applicable if you use Zuora Tax.
        exemptEffectiveDate:
          type: string
          description: >
            Date when the customer tax exemption starts, in YYYY-MM-DD format.
            Only applicable if you use Zuora Tax.
          format: date
        exemptExpirationDate:
          type: string
          description: >
            Date when the customer tax exemption expires, in YYYY-MM-DD format.
            Only applicable if you use Zuora Tax.
          format: date
        exemptIssuingJurisdiction:
          maxLength: 32
          type: string
          description: >
            Jurisdiction in which the customer tax exemption certificate was
            issued.
        exemptStatus:
          type: string
          description: >
            Status of the account tax exemption. Required if you use Zuora Tax.
            Only applicable if you use Zuora Tax.
          default: No
          enum:
            - No
            - Yes
            - PendingVerification
      description: |
        Information about the tax exempt status of a customer account.
    TaxationItemObjectCustomFields:
      title: taxationItemFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    Term:
      type: object
      properties:
        endDate:
          type: string
          description: |
            The end date of the term.
          format: date
        isEvergreen:
          type: boolean
          description: |
            Indicates whether the term is evergreen.
        startDate:
          type: string
          description: |
            The start date of the term.
          format: date
        termNumber:
          type: number
          description: |
            The term number.
          format: long
      description: |
        List of terms for the subscription.
    TermsAndConditions:
      title: termsAndConditions
      type: object
      properties:
        autoRenew:
          type: boolean
        initialTerm:
          $ref: "#/components/schemas/InitialTerm"
        renewalSetting:
          type: string
          enum:
            - RENEW_WITH_SPECIFIC_TERM
            - RENEW_TO_EVERGREEN
        renewalTerms:
          type: array
          items:
            $ref: "#/components/schemas/RenewalTerm"
      description: |
        Information about an order action of type `TermsAndConditions`.
    TimeSlicedElpNetMetrics:
      type: object
      properties:
        amount:
          type: number
          description: The extended list price which is calculated by the original product
            catalog list price multiplied by the delta quantity.
        endDate:
          type: string
          description: The latest date that the metric applies.
          format: date
        generatedReason:
          type: string
          description: >
            Specify the reason why the metrics are generated by the certain
            order action.
          enum:
            - IncreaseQuantity
            - DecreaseQuantity
            - ChangePrice
            - Extension
            - Contraction
        invoiceOwner:
          type: string
          description: The acount number of the billing account that is billed for the
            subscription.
        orderItemId:
          type: string
          description: The ID of the order item referenced by the order metrics.
        startDate:
          type: string
          description: The earliest date that the metric applies.
          format: date
        subscriptionOwner:
          type: string
          description: The acount number of the billing account that owns the subscription.
        tax:
          type: number
          description: The tax amount in the metric when the tax permission is enabled.
        termNumber:
          type: number
          format: long
        type:
          type: string
          description: The type for ELP is always "Regular".
          enum:
            - Regular
            - Discount
    TimeSlicedMetrics:
      type: object
      properties:
        amount:
          type: number
        endDate:
          type: string
          format: date
        generatedReason:
          type: string
          description: >
            Specify the reason why the metrics are generated by the certain
            order action.
          enum:
            - IncreaseQuantity
            - DecreaseQuantity
            - ChangePrice
            - Extension
            - Contraction
        invoiceOwner:
          type: string
          description: The acount number of the billing account that is billed for the
            subscription.
        orderItemId:
          type: string
          description: The ID of the order item referenced by the order metrics.
        startDate:
          type: string
          format: date
        subscriptionOwner:
          type: string
          description: The acount number of the billing account that owns the subscription.
        termNumber:
          type: number
          format: long
    TimeSlicedMetricsForEvergreen:
      type: object
      properties:
        amount:
          type: number
        endDate:
          type: string
          format: date
        invoiceOwner:
          type: string
          description: The acount number of the billing account that is billed for the
            subscription.
        startDate:
          type: string
          format: date
        subscriptionOwner:
          type: string
          description: The acount number of the billing account that owns the subscription.
        termNumber:
          type: number
          format: long
    TimeSlicedNetMetrics:
      type: object
      properties:
        amount:
          type: number
        discountChargeNumber:
          type: string
        endDate:
          type: string
          format: date
        generatedReason:
          type: string
          description: >
            Specify the reason why the metrics are generated by the certain
            order action.
          enum:
            - IncreaseQuantity
            - DecreaseQuantity
            - ChangePrice
            - Extension
            - Contraction
        invoiceOwner:
          type: string
          description: The acount number of the billing account that is billed for the
            subscription.
        orderItemId:
          type: string
          description: The ID of the order item referenced by the order metrics.
        startDate:
          type: string
          format: date
        subscriptionOwner:
          type: string
          description: The acount number of the billing account that owns the subscription.
        termNumber:
          type: number
          format: long
        type:
          type: string
          description: Indicates whether this metrics is for a regular charge or a
            discount charge.
          enum:
            - Regular
            - Discount
    TimeSlicedNetMetricsForEvergreen:
      type: object
      properties:
        amount:
          type: number
        discountChargeNumber:
          type: string
        endDate:
          type: string
          format: date
        invoiceOwner:
          type: string
          description: The acount number of the billing account that is billed for the
            subscription.
        startDate:
          type: string
          format: date
        subscriptionOwner:
          type: string
          description: The acount number of the billing account that owns the subscription.
        termNumber:
          type: number
          format: long
        type:
          type: string
          description: Indicates whether this metrics is for a regular charge or a
            discount. charge.
          enum:
            - Regular
            - Discount
    TimeSlicedTcbNetMetrics:
      type: object
      properties:
        amount:
          type: number
        discountChargeNumber:
          type: string
        endDate:
          type: string
          format: date
        generatedReason:
          type: string
          description: >
            Specify the reason why the metrics are generated by the certain
            order action.
          enum:
            - IncreaseQuantity
            - DecreaseQuantity
            - ChangePrice
            - Extension
            - Contraction
        invoiceOwner:
          type: string
          description: The acount number of the billing account that is billed for the
            subscription.
        orderItemId:
          type: string
          description: The ID of the order item referenced by the order metrics.
        startDate:
          type: string
          format: date
        subscriptionOwner:
          type: string
          description: The acount number of the billing account that owns the subscription.
        tax:
          type: number
        termNumber:
          type: number
          format: long
        type:
          type: string
          description: Indicates whether this metrics is for a regular charge or a
            discount charge.
          enum:
            - Regular
            - Discount
    TimeSlicedTcbNetMetricsForEvergreen:
      type: object
      properties:
        amount:
          type: number
        discountChargeNumber:
          type: string
        endDate:
          type: string
          format: date
        invoiceOwner:
          type: string
          description: The acount number of the billing account that is billed for the
            subscription.
        startDate:
          type: string
          format: date
        subscriptionOwner:
          type: string
          description: The acount number of the billing account that owns the subscription.
        tax:
          type: number
        termNumber:
          type: number
          format: long
        type:
          type: string
          description: Indicates whether this metrics is for a regular charge or a
            discount. charge.
          enum:
            - Regular
            - Discount
    TransferPaymentType:
      type: object
      properties:
        accountId:
          type: string
          description: |
            The ID of the customer account that the payment is transferred to.
      example:
        accountId: 4028905f5a87c0ff015a88889fe500a8
    TriggerDate:
      title: triggerDate
      type: object
      properties:
        name:
          type: string
          description: |
            Name of the trigger date of the order action.
          enum:
            - ContractEffective
            - ServiceActivation
            - CustomerAcceptance
        triggerDate:
          type: string
          description: |
            Trigger date in YYYY-MM-DD format.
          format: date
    TriggerParams:
      title: startDate
      type: object
      properties:
        specificTriggerDate:
          type: string
          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
        triggerEvent:
          type: string
          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
      description: |
        Specifies when a charge becomes active.
    UnapplyCreditMemoType:
      type: object
      properties:
        debitMemos:
          type: array
          description: |
            Container for debit memos that the credit memo is unapplied from.
          items:
            $ref: "#/components/schemas/CreditMemoUnapplyDebitMemoRequestType"
        effectiveDate:
          type: string
          description: |
            The date when the credit memo is unapplied.
          format: date
        invoices:
          type: array
          description: |
            Container for invoices that the credit memo is unapplied from.
          items:
            $ref: "#/components/schemas/CreditMemoUnapplyInvoiceRequestType"
      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
    UnapplyPaymentType:
      type: object
      properties:
        debitMemos:
          type: array
          description: |
            Container for debit memos.
          items:
            $ref: "#/components/schemas/PaymentDebitMemoApplicationUnapplyRequestType"
        effectiveDate:
          type: string
          description: |
            The date when the payment is unapplied, in `yyyy-mm-dd` format.
          format: date
        invoices:
          type: array
          description: |
            Container for invoices.
          items:
            $ref: "#/components/schemas/PaymentInvoiceApplicationUnapplyRequestType"
      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
    UpdateCustomObjectCusotmField:
      type: object
      properties:
        definition:
          $ref: "#/components/schemas/CustomObjectCustomFieldDefinitionUpdate"
        name:
          type: string
          description: The name of the custom field to be updated
        required:
          type: boolean
          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.
        targetName:
          type: string
          description: Required if the `type` of the action is `renameField`
      description: A reference to a field.
    UpdateEntityResponseType:
      type: object
      properties:
        success:
          type: boolean
          description: Returns `true` if the request is successful.
    UpdateEntityType:
      type: object
      properties:
        displayName:
          maxLength: 255
          type: string
          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.
        locale:
          type: string
          description: The locale that is used in this entity.
        name:
          maxLength: 255
          type: string
          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. 
        timezone:
          type: string
          description: The time zone that is used in this entity.
      example:
        displayName: Acme-Italy
        locale: en_GB
        name: Acme-Italy
        timezone: Europe/Rome
    UpdatePaymentType:
      allOf:
        - type: object
          properties:
            comment:
              maxLength: 255
              minLength: 0
              type: string
              description: |
                Comments about the payment.
            financeInformation:
              type: object
              properties:
                bankAccountAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: >
                    The accounting code that maps to a bank account in your
                    accounting system.
                transferredToAccounting:
                  type: string
                  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
                unappliedPaymentAccountingCode:
                  maxLength: 100
                  minLength: 0
                  type: string
                  description: |
                    The accounting code for the unapplied payment.
              description: |
                Container for the finance information related to the payment.
            referenceId:
              maxLength: 60
              minLength: 0
              type: string
              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.
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
    UpdateTask:
      title: task
      required:
        - id
      type: object
      properties:
        action_type:
          type: string
          description: |
            The type of task.
        call_type:
          type: string
          description: |
            The type of the API used.
        concurrent_limit:
          maximum: 9999999
          minimum: 1
          type: integer
          description: |
            The maximum number of this task that can run concurrently.
        id:
          type: integer
          description: |
            The unique ID of the task.
        name:
          type: string
          description: |
            The name of the task.
        object:
          type: string
          description: |
            The selected object for the task.
        object_id:
          type: string
          description: |
            The ID of the selected object of the task.
        status:
          type: string
          description: |
            The status of the task instance.
          enum:
            - Queued
            - Processing
            - Pending
            - Success
            - Stopped
            - Error
        tags:
          type: array
          description: |
            The array of filter tags.
          items:
            type: string
        workflow_id:
          type: integer
          description: |
            The ID of the workflow the task belongs too.
      description: |
        A task.
    Usage:
      type: object
      properties:
        date:
          type: string
          description: |
            The date when the usage record is created.
        values:
          type: object
          properties:
            taskCount:
              type: integer
              description: |
                The amount of task runs that have been used.
      description: |
        The task usage of a particular day.
    UsageFlatFeePricingOverride:
      title: usageFlatFee
      description: >
        Pricing information about a usage charge that uses the "flat fee" charge
        model. In this charge model, the charge has a fixed price.
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            listPrice:
              type: number
              description: |
                Price of the charge.
    UsageFlatFeePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            listPrice:
              type: number
    UsageObjectCustomFields:
      title: usageFieldsCustom
      type: object
      additionalProperties:
        type: object
        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.
    UsageOveragePricingOverride:
      title: usageOverage
      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.
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            includedUnits:
              minimum: 0
              type: number
              description: |
                Number of free units that may be consumed.
            numberOfPeriods:
              minimum: 1
              type: integer
              description: >
                Number of periods that Zuora considers when calculating overage
                charges with overage smoothing.
            overagePrice:
              type: number
              description: |
                Price per overage unit consumed.
            overageUnusedUnitsCreditOption:
              type: string
              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
            unusedUnitsCreditRates:
              type: number
              description: >
                Per-unit rate at which to credit the customer for unused units.
                Only applicable if the value of the
                `overageUnusedUnitsCreditOption` field is
                `CreditBySpecificRate`.
    UsageOveragePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            includedUnits:
              type: number
              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.
            overagePrice:
              type: number
    UsagePerUnitPricingOverride:
      title: usagePerUnit
      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.
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            listPrice:
              type: number
              description: |
                Per-unit price of the charge.
            ratingGroup:
              type: string
              description: |
                Specifies how Zuora groups usage records when rating usage.
              enum:
                - ByBillingPeriod
                - ByUsageStartDate
                - ByUsageRecord
                - ByUsageUpload
    UsagePerUnitPricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            listPrice:
              type: number
    UsageTieredPricingOverride:
      title: usageTiered
      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.
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            ratingGroup:
              type: string
              description: |
                Specifies how Zuora groups usage records when rating usage.
              enum:
                - ByBillingPeriod
                - ByUsageStartDate
                - ByUsageRecord
                - ByUsageUpload
            tiers:
              type: array
              description: |
                List of cumulative pricing tiers in the charge.
              items:
                $ref: "#/components/schemas/ChargeTier"
    UsageTieredPricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            tiers:
              type: array
              items:
                $ref: "#/components/schemas/ChargeTier"
    UsageTieredWithOveragePricingOverride:
      title: usageTieredWithOverage
      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.
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            numberOfPeriods:
              minimum: 1
              type: integer
              description: >
                Number of periods that Zuora considers when calculating overage
                charges with overage smoothing.
            overagePrice:
              type: number
              description: |
                Price per overage unit consumed.
            overageUnusedUnitsCreditOption:
              type: string
              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
            tiers:
              type: array
              description: |
                List of cumulative pricing tiers in the charge.
              items:
                $ref: "#/components/schemas/ChargeTier"
            unusedUnitsCreditRates:
              type: number
              description: >
                Per-unit rate at which to credit the customer for unused units.
                Only applicable if the value of the
                `overageUnusedUnitsCreditOption` field is
                `CreditBySpecificRate`.
    UsageTieredWithOveragePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            overagePrice:
              type: number
            tiers:
              type: array
              items:
                $ref: "#/components/schemas/ChargeTier"
    UsageVolumePricingOverride:
      title: usageVolume
      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.
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            ratingGroup:
              type: string
              enum:
                - ByBillingPeriod
                - ByUsageStartDate
                - ByUsageRecord
                - ByUsageUpload
            tiers:
              type: array
              description: |
                List of variable pricing tiers in the charge.
              items:
                $ref: "#/components/schemas/ChargeTier"
    UsageVolumePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - type: object
          properties:
            tiers:
              type: array
              items:
                $ref: "#/components/schemas/ChargeTier"
    UsagesResponse:
      type: object
      properties:
        metrics:
          type: array
          description: |
            The list of tasks retrieved.
          items:
            $ref: "#/components/schemas/Usage"
    Workflow:
      title: workflow
      type: object
      properties:
        calloutTrigger:
          type: boolean
          description: >
            Indicates whether the callout trigger is enabled for the retrieved
            workflow.
        createdAt:
          type: string
          description: >
            The date and time when the workflow is created, in the `YYYY-MM-DD
            HH:MM:SS` format.
          format: datetime
        description:
          type: string
          description: |
            The description of the workflow.
        id:
          type: integer
          description: |
            The unique ID of the workflow.
        interval:
          type: string
          description: >
            The schedule of the workflow, in a CRON expression. Returns null if
            the schedued trigger is disabled.
        name:
          type: string
          description: |
            The name of the workflow.
        ondemandTrigger:
          type: boolean
          description: |
            Indicates whether the ondemand trigger is enabled for the workflow.
        scheduledTrigger:
          type: boolean
          description: |
            Indicates whether the scheduled trigger is enabled for the workflow.
        timezone:
          type: string
          description: >
            The timezone that is configured for the scheduler of the workflow.
            Returns null if the scheduled trigger is disabled.
        type:
          type: string
          description: >
            The type of the workflow. Currently the only valid value is
            'Workflow::Setup'.
          enum:
            - Workflow::Setup
            - Workflow::Instance
        updatedAt:
          type: string
          description: >
            The date and time when the workflow is updated the last time, in the
            `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
      description: |
        A workflow.
    WorkflowError:
      type: object
      properties:
        code:
          type: string
          description: A short error code describing the error
          enum:
            - invalid
        status:
          type: integer
          description: The http status code for this error
        title:
          type: string
          description: A human readable description describing the error
    WorkflowInstance:
      type: object
      properties:
        createdAt:
          type: string
          description: >
            The date and time when the workflow is created, in the `YYYY-MM-DD
            HH:MM:SS` format.
          format: datetime
        id:
          type: integer
          description: |
            The unique ID of the workflow.
        name:
          type: string
          description: |
            The run number of this workflow instance
        originalWorkflowId:
          type: integer
          description: >
            The identifier of the workflow template that is used to create this
            instance.
        status:
          type: string
          description: |
            Describes the current state of this workflow instance.
          enum:
            - Queued
            - Processing
            - Stopped
            - Stopping
            - Finished
        updatedAt:
          type: string
          description: >
            The date and time the last time when the workflow is updated, in the
            `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
      description: A instance workflow object.
    creditCard:
      type: object
      properties:
        cardHolderInfo:
          $ref: "#/components/schemas/AccountCreditCardHolder"
        cardNumber:
          type: string
          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).
        cardType:
          type: string
          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
        expirationMonth:
          maximum: 12
          minimum: 1
          type: integer
          description: |
            Expiration date of the card.
        expirationYear:
          maximum: 2500
          minimum: 1980
          type: integer
          description: |
            Expiration year of the card.
        securityCode:
          type: string
          description: >
            CVV or CVV2 security code of the card. To ensure PCI compliance,
            Zuora does not store the value of this field.
      description: >
        Default payment method associated with an account. Only credit card
        payment methods are supported.
    orderMetric:
      type: object
      properties:
        chargeNumber:
          type: string
        elp:
          type: array
          description: The extended list price which is calculated by the original product
            catalog list price multiplied by the delta quantity.
          items:
            $ref: "#/components/schemas/TimeSlicedElpNetMetrics"
        mrr:
          type: array
          items:
            $ref: "#/components/schemas/TimeSlicedNetMetrics"
        originRatePlanId:
          type: string
        productRatePlanChargeId:
          type: string
        productRatePlanId:
          type: string
        quantity:
          type: array
          items:
            $ref: "#/components/schemas/TimeSlicedMetrics"
        tcb:
          type: array
          description: Total contracted billing which is the forecast value for the total
            invoice amount.
          items:
            $ref: "#/components/schemas/TimeSlicedTcbNetMetrics"
        tcv:
          type: array
          description: Total contracted value.
          items:
            $ref: "#/components/schemas/TimeSlicedNetMetrics"
      description: The set of order metrics for an order action.
    tokenResponse:
      type: object
      properties:
        access_token:
          type: string
          description: The generated token.
        expires_in:
          type: number
          description: The number of seconds until the token expires.
        jti:
          type: string
          description: A globally unique identifier for the token.
        scope:
          type: string
          description: A space-delimited list of scopes that the token can be used to
            access.
        token_type:
          type: string
          description: The type of token that was generated, i.e., `bearer`.
    zObject:
      type: object
      additionalProperties:
        type: object
        description: |
          Field of the object.
    zObject_update:
      title: zObject
      allOf:
        - required:
            - Id
          type: object
          properties:
            Id:
              type: string
              description: ""
            fieldsToNull:
              type: array
              description: |
                Used to set a list of fields to null.
              items:
                type: string
        - $ref: "#/components/schemas/zObject"
  parameters:
    GLOBAL_HEADER_Authorization_OAuth:
      name: Authorization
      in: header
      description: |
        `Bearer {token}` for a valid OAuth token.
      required: true
      schema:
        type: string
    GLOBAL_HEADER_Zuora_Entity_Ids_Single:
      name: Zuora-Entity-Ids
      in: header
      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.
      schema:
        type: string
    GLOBAL_HEADER_Zuora_Track_Id:
      name: Zuora-Track-Id
      in: header
      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 (`'`).
      schema:
        maxLength: 64
        type: string
    GLOBAL_HEADER_If_Match:
      name: If-Match
      in: header
      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. 
      schema:
        type: string
    GLOBAL_HEADER_Cursor:
      name: cursor
      in: query
      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`.
      schema:
        type: string
    GLOBAL_HEADER_page_Usage:
      name: page
      in: query
      description: >
        The index number of the page you want to retrieve. By default, the first
        page is returned in the response. 
      schema:
        type: integer
        format: int32
        default: 0
    GLOBAL_HEADER_pageSize_Usage:
      name: pageSize
      in: query
      description: |
        The maximum number of rows in a page to return in a response. 
      schema:
        maximum: 2000
        minimum: 25
        type: integer
        format: int32
        default: 100
    GLOBAL_HEADER_entityId:
      name: entityId
      in: header
      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).
      schema:
        type: string
    GLOBAL_HEADER_entityName:
      name: entityName
      in: header
      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).
      schema:
        type: string
    GLOBAL_REQUEST_page:
      name: page
      in: query
      description: |
        Page number.
      schema:
        minimum: 1
        type: integer
        default: 1
    GLOBAL_REQUEST_pageSize:
      name: pageSize
      in: query
      description: |
        Number of rows returned per page.
      schema:
        maximum: 40
        type: integer
        default: 20
    GLOBAL_REQUEST_pageSize_catalog:
      name: pageSize
      in: query
      description: |
        Number of rows returned per page.
      schema:
        maximum: 40
        type: integer
        default: 10
    GLOBAL_REQUEST_pageSize_finance_accounting:
      name: pageSize
      in: query
      description: |
        Number of rows returned per page.
      schema:
        maximum: 300
        type: integer
        default: 300
    GLOBAL_REQUEST_pageSize_finance_revenue:
      name: pageSize
      in: query
      description: |
        Number of rows returned per page.
      schema:
        maximum: 300
        type: integer
        default: 8
    GLOBAL_REQUEST_pageSize_entityConnection:
      name: pageSize
      in: query
      description: |
        Number of rows returned per page.
      schema:
        maximum: 300
        type: integer
        default: 30
    GLOBAL_HEADER_X_Zuora_WSDL_Version:
      name: X-Zuora-WSDL-Version
      in: header
      description: |
        Zuora WSDL version number.
      schema:
        type: string
        default: "79"
    GLOBAL_HEADER_Authorization_OAuth_Notifications:
      name: Authorization
      in: header
      description: >
        `Bearer {token}` for a valid OAuth token.


        Note that you must regenerate the OAuth token after the Notification and the Configurable Event features are enabled in your Zuora tenant. The OAuth tokens generated before the features are turned on will not work.
      required: true
      schema:
        type: string
