diff --git a/README.md b/README.md index d806a2c8..a102ad98 100644 --- a/README.md +++ b/README.md @@ -31,15 +31,15 @@ The package is compatible with Python versions `3 >=3.7, <= 3.11`. Install the package from PyPi using the following pip command: ```python -pip install maxio-advanced-billing-sdk==5.1.0 +pip install maxio-advanced-billing-sdk==5.2.0 ``` You can also view the package at: -https://pypi.python.org/pypi/maxio-advanced-billing-sdk/5.1.0 +https://pypi.python.org/pypi/maxio-advanced-billing-sdk/5.2.0 ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/client.md) The following parameters are configurable for the API Client: @@ -56,7 +56,7 @@ The following parameters are configurable for the API Client: | `backoff_factor` | `float` | A backoff factor to apply between attempts after the second try.
**Default: 2** | | `retry_statuses` | `Array of int` | The http statuses on which retry is to be done.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | | `retry_methods` | `Array of string` | The http methods on which retry is to be done.
**Default: ['GET', 'PUT']** | -| `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication | +| `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication | The API client can be initialized as follows: @@ -87,46 +87,46 @@ The SDK can be configured to use a different environment for making API calls. A This API uses the following authentication schemes. -* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/subscription-products.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/subscription-products.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/controllers/webhooks.md) ## Classes Documentation -* [Utility Classes](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/utility-classes.md) -* [HttpResponse](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/http-response.md) -* [HttpRequest](https://www.github.com/maxio-com/ab-python-sdk/tree/5.1.0/doc/http-request.md) +* [Utility Classes](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/utility-classes.md) +* [HttpResponse](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/http-response.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-python-sdk/tree/5.2.0/doc/http-request.md) diff --git a/advancedbilling/controllers/api_exports_controller.py b/advancedbilling/controllers/api_exports_controller.py index bb8d619e..7e5da23e 100644 --- a/advancedbilling/controllers/api_exports_controller.py +++ b/advancedbilling/controllers/api_exports_controller.py @@ -308,8 +308,7 @@ def export_invoices(self): def export_subscriptions(self): """Does a POST request to /api_exports/subscriptions.json. - This API creates a subscriptions export and returns a batchjob - object. + This API creates a subscriptions export and returns a batchjob object. Returns: BatchJobResponse: Response from the API. Created diff --git a/advancedbilling/controllers/base_controller.py b/advancedbilling/controllers/base_controller.py index f9d0e058..9c1004cb 100644 --- a/advancedbilling/controllers/base_controller.py +++ b/advancedbilling/controllers/base_controller.py @@ -30,7 +30,7 @@ class BaseController(object): @staticmethod def user_agent(): - return 'AB SDK Python:5.1.0 on OS {os-info}' + return 'AB SDK Python:5.2.0 on OS {os-info}' @staticmethod def user_agent_parameters(): diff --git a/advancedbilling/controllers/billing_portal_controller.py b/advancedbilling/controllers/billing_portal_controller.py index fcf06917..56004c5a 100644 --- a/advancedbilling/controllers/billing_portal_controller.py +++ b/advancedbilling/controllers/billing_portal_controller.py @@ -67,8 +67,7 @@ def enable_billing_portal_for_customer(self, customer_id (int): The Chargify id of the customer auto_invite (AutoInvite, optional): When set to 1, an Invitation email will be sent to the Customer. When set to 0, or not - sent, an email will not be sent. Use in query: - `auto_invite=1`. + sent, an email will not be sent. Use in query: `auto_invite=1`. Returns: CustomerResponse: Response from the API. OK @@ -215,8 +214,7 @@ def revoke_billing_portal_access(self, You can revoke a customer's Billing Portal invitation. If you attempt to revoke an invitation when the Billing Portal is - already disabled for a Customer, you will receive a 422 error - response. + already disabled for a Customer, you will receive a 422 error response. ## Limitations This endpoint will only return a JSON response. diff --git a/advancedbilling/controllers/components_controller.py b/advancedbilling/controllers/components_controller.py index 775d6305..3eb65467 100644 --- a/advancedbilling/controllers/components_controller.py +++ b/advancedbilling/controllers/components_controller.py @@ -101,8 +101,7 @@ def create_quantity_based_component(self, **quantity_based_component** under the specified product family. Quantity Based component can then be added and “allocated” for a subscription. - When defining Quantity Based component, You can choose one of 2 - types: + When defining Quantity Based component, You can choose one of 2 types: #### Recurring Recurring quantity-based components are used to bill for the number of some unit (think monthly software user licenses or the number of pairs @@ -180,8 +179,7 @@ def create_on_off_component(self, Args: product_family_id (str): Either the product family's id or its handle prefixed with `handle:` - body (CreateOnOffComponent, optional): TODO: type description - here. + body (CreateOnOffComponent, optional): TODO: type description here. Returns: ComponentResponse: Response from the API. Created @@ -228,8 +226,7 @@ def create_prepaid_usage_component(self, This request will create a component definition of kind **prepaid_usage_component** under the specified product family. - Prepaid component can then be added and “allocated” for a - subscription. + Prepaid component can then be added and “allocated” for a subscription. Prepaid components allow customers to pre-purchase units that can be used up over time on their subscription. In a sense, they are the mirror image of metered components; while metered components charge at diff --git a/advancedbilling/controllers/coupons_controller.py b/advancedbilling/controllers/coupons_controller.py index 96df13b7..c6ff4dbe 100644 --- a/advancedbilling/controllers/coupons_controller.py +++ b/advancedbilling/controllers/coupons_controller.py @@ -37,41 +37,40 @@ def create_coupon(self, body=None): """Does a POST request to /product_families/{product_family_id}/coupons.json. - ## Coupons Documentation - Coupons can be administered in the Advanced Billing application or - created via API. Please view our section on [creating - coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Cre - ating-Editing-Deleting-Coupons) for more information. - Additionally, for documentation on how to apply a coupon to a - subscription within the Advanced Billing UI, please see our - documentation - [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupo - ns-and-Subscriptions). - ## Create Coupon - This request will create a coupon, based on the provided information. - When creating a coupon, you must specify a product family using the - `product_family_id`. If no `product_family_id` is passed, the first - product family available is used. You will also need to formulate your - URL to cite the Product Family ID in your request. - You can restrict a coupon to only apply to specific products / - components by optionally passing in hashes of `restricted_products` - and/or `restricted_components` in the format: - `{ "": boolean_value }` + ## Coupons Documentation + Coupons can be administered in the Advanced Billing application or + created via API. Please view our section on [creating + coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Cre + ating-Editing-Deleting-Coupons) for more information. + Additionally, for documentation on how to apply a coupon to a + subscription within the Advanced Billing UI, please see our + documentation + [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupo + ns-and-Subscriptions). + ## Create Coupon + This request will create a coupon, based on the provided information. + When creating a coupon, you must specify a product family using the + `product_family_id`. If no `product_family_id` is passed, the first + product family available is used. You will also need to formulate your + URL to cite the Product Family ID in your request. + You can restrict a coupon to only apply to specific products / + components by optionally passing in hashes of `restricted_products` + and/or `restricted_components` in the format: + `{ "": boolean_value }` Args: - product_family_id (int): The Advanced Billing id of the product - family to which the coupon belongs - body (CreateOrUpdateCoupon, optional): TODO: type description - here. + product_family_id (int): The Advanced Billing id of the product + family to which the coupon belongs + body (CreateOrUpdateCoupon, optional): TODO: type description here. Returns: - CouponResponse: Response from the API. Created + CouponResponse: Response from the API. Created Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -105,50 +104,50 @@ def list_coupons_for_product_family(self, options=dict()): """Does a GET request to /product_families/{product_family_id}/coupons.json. - List coupons for a specific Product Family in a Site. - If the coupon is set to `use_site_exchange_rate: true`, it will return - pricing based on the current exchange rate. If the flag is set to - false, it will return all of the defined prices for each currency. + List coupons for a specific Product Family in a Site. + If the coupon is set to `use_site_exchange_rate: true`, it will return + pricing based on the current exchange rate. If the flag is set to + false, it will return all of the defined prices for each currency. Args: - options (dict, optional): Key-value pairs for any of the - parameters to this API Endpoint. All parameters to the - endpoint are supplied through the dictionary with their names - being the key and their desired values being the value. A list + options (dict, optional): Key-value pairs for any of the + parameters to this API Endpoint. All parameters to the + endpoint are supplied through the dictionary with their names + being the key and their desired values being the value. A list of parameters that can be used are:: - - product_family_id -- int -- The Advanced Billing id of the - product family to which the coupon belongs - page -- int -- Result records are organized in pages. By - default, the first page of results is displayed. The - page parameter specifies a page number of results to - fetch. You can start navigating through the pages to - consume the results. You do this by passing in a page - parameter. Retrieve the next page by adding ?page=2 to - the query string. If there are no results to return, - then an empty result set will be returned. Use in - query `page=1`. - per_page -- int -- This parameter indicates how many - records to fetch in each request. Default value is 30. - The maximum allowed values is 200; any per_page value - over 200 will be changed to 200. Use in query - `per_page=200`. - filter -- ListCouponsFilter -- Filter to use for List - Coupons operations - currency_prices -- bool -- When fetching coupons, if you - have defined multiple currencies at the site level, - you can optionally pass the `?currency_prices=true` - query param to include an array of currency price data - in the response. Use in query `currency_prices=true`. + + product_family_id -- int -- The Advanced Billing id of the + product family to which the coupon belongs + page -- int -- Result records are organized in pages. By + default, the first page of results is displayed. The + page parameter specifies a page number of results to + fetch. You can start navigating through the pages to + consume the results. You do this by passing in a page + parameter. Retrieve the next page by adding ?page=2 to + the query string. If there are no results to return, + then an empty result set will be returned. Use in + query `page=1`. + per_page -- int -- This parameter indicates how many + records to fetch in each request. Default value is 30. + The maximum allowed values is 200; any per_page value + over 200 will be changed to 200. Use in query + `per_page=200`. + filter -- ListCouponsFilter -- Filter to use for List + Coupons operations + currency_prices -- bool -- When fetching coupons, if you + have defined multiple currencies at the site level, + you can optionally pass the `?currency_prices=true` + query param to include an array of currency price data + in the response. Use in query `currency_prices=true`. Returns: - List[CouponResponse]: Response from the API. OK + List[CouponResponse]: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -189,27 +188,27 @@ def find_coupon(self, code=None): """Does a GET request to /coupons/find.json. - You can search for a coupon via the API with the find method. By - passing a code parameter, the find will attempt to locate a coupon - that matches that code. If no coupon is found, a 404 is returned. - If you have more than one product family and if the coupon you are - trying to find does not belong to the default product family in your - site, then you will need to specify (either in the url or as a query - string param) the product family id. + You can search for a coupon via the API with the find method. By + passing a code parameter, the find will attempt to locate a coupon + that matches that code. If no coupon is found, a 404 is returned. + If you have more than one product family and if the coupon you are + trying to find does not belong to the default product family in your + site, then you will need to specify (either in the url or as a query + string param) the product family id. Args: - product_family_id (int, optional): The Advanced Billing id of the - product family to which the coupon belongs - code (str, optional): The code of the coupon + product_family_id (int, optional): The Advanced Billing id of the + product family to which the coupon belongs + code (str, optional): The code of the coupon Returns: - CouponResponse: Response from the API. OK + CouponResponse: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -238,31 +237,31 @@ def read_coupon(self, coupon_id): """Does a GET request to /product_families/{product_family_id}/coupons/{coupon_id}.json. - You can retrieve the Coupon via the API with the Show method. You must - identify the Coupon in this call by the ID parameter that Advanced - Billing assigns. - If instead you would like to find a Coupon using a Coupon code, see - the Coupon Find method. - When fetching a coupon, if you have defined multiple currencies at the - site level, you can optionally pass the `?currency_prices=true` query - param to include an array of currency price data in the response. - If the coupon is set to `use_site_exchange_rate: true`, it will return - pricing based on the current exchange rate. If the flag is set to - false, it will return all of the defined prices for each currency. + You can retrieve the Coupon via the API with the Show method. You must + identify the Coupon in this call by the ID parameter that Advanced + Billing assigns. + If instead you would like to find a Coupon using a Coupon code, see + the Coupon Find method. + When fetching a coupon, if you have defined multiple currencies at the + site level, you can optionally pass the `?currency_prices=true` query + param to include an array of currency price data in the response. + If the coupon is set to `use_site_exchange_rate: true`, it will return + pricing based on the current exchange rate. If the flag is set to + false, it will return all of the defined prices for each currency. Args: - product_family_id (int): The Advanced Billing id of the product - family to which the coupon belongs - coupon_id (int): The Advanced Billing id of the coupon + product_family_id (int): The Advanced Billing id of the product + family to which the coupon belongs + coupon_id (int): The Advanced Billing id of the coupon Returns: - CouponResponse: Response from the API. OK + CouponResponse: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -296,29 +295,28 @@ def update_coupon(self, body=None): """Does a PUT request to /product_families/{product_family_id}/coupons/{coupon_id}.json. - ## Update Coupon - You can update a Coupon via the API with a PUT request to the resource - endpoint. - You can restrict a coupon to only apply to specific products / - components by optionally passing in hashes of `restricted_products` - and/or `restricted_components` in the format: - `{ "": boolean_value }` + ## Update Coupon + You can update a Coupon via the API with a PUT request to the resource + endpoint. + You can restrict a coupon to only apply to specific products / + components by optionally passing in hashes of `restricted_products` + and/or `restricted_components` in the format: + `{ "": boolean_value }` Args: - product_family_id (int): The Advanced Billing id of the product - family to which the coupon belongs - coupon_id (int): The Advanced Billing id of the coupon - body (CreateOrUpdateCoupon, optional): TODO: type description - here. + product_family_id (int): The Advanced Billing id of the product + family to which the coupon belongs + coupon_id (int): The Advanced Billing id of the coupon + body (CreateOrUpdateCoupon, optional): TODO: type description here. Returns: - CouponResponse: Response from the API. OK + CouponResponse: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -357,25 +355,25 @@ def archive_coupon(self, coupon_id): """Does a DELETE request to /product_families/{product_family_id}/coupons/{coupon_id}.json. - You can archive a Coupon via the API with the archive method. - Archiving makes that Coupon unavailable for future use, but allows it - to remain attached and functional on existing Subscriptions that are - using it. - The `archived_at` date and time will be assigned. + You can archive a Coupon via the API with the archive method. + Archiving makes that Coupon unavailable for future use, but allows it + to remain attached and functional on existing Subscriptions that are + using it. + The `archived_at` date and time will be assigned. Args: - product_family_id (int): The Advanced Billing id of the product - family to which the coupon belongs - coupon_id (int): The Advanced Billing id of the coupon + product_family_id (int): The Advanced Billing id of the product + family to which the coupon belongs + coupon_id (int): The Advanced Billing id of the coupon Returns: - CouponResponse: Response from the API. OK + CouponResponse: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -407,48 +405,48 @@ def list_coupons(self, options=dict()): """Does a GET request to /coupons.json. - You can retrieve a list of coupons. - If the coupon is set to `use_site_exchange_rate: true`, it will return - pricing based on the current exchange rate. If the flag is set to - false, it will return all of the defined prices for each currency. + You can retrieve a list of coupons. + If the coupon is set to `use_site_exchange_rate: true`, it will return + pricing based on the current exchange rate. If the flag is set to + false, it will return all of the defined prices for each currency. Args: - options (dict, optional): Key-value pairs for any of the - parameters to this API Endpoint. All parameters to the - endpoint are supplied through the dictionary with their names - being the key and their desired values being the value. A list + options (dict, optional): Key-value pairs for any of the + parameters to this API Endpoint. All parameters to the + endpoint are supplied through the dictionary with their names + being the key and their desired values being the value. A list of parameters that can be used are:: - - page -- int -- Result records are organized in pages. By - default, the first page of results is displayed. The - page parameter specifies a page number of results to - fetch. You can start navigating through the pages to - consume the results. You do this by passing in a page - parameter. Retrieve the next page by adding ?page=2 to - the query string. If there are no results to return, - then an empty result set will be returned. Use in - query `page=1`. - per_page -- int -- This parameter indicates how many - records to fetch in each request. Default value is 30. - The maximum allowed values is 200; any per_page value - over 200 will be changed to 200. Use in query - `per_page=200`. - filter -- ListCouponsFilter -- Filter to use for List - Coupons operations - currency_prices -- bool -- When fetching coupons, if you - have defined multiple currencies at the site level, - you can optionally pass the `?currency_prices=true` - query param to include an array of currency price data - in the response. Use in query `currency_prices=true`. + + page -- int -- Result records are organized in pages. By + default, the first page of results is displayed. The + page parameter specifies a page number of results to + fetch. You can start navigating through the pages to + consume the results. You do this by passing in a page + parameter. Retrieve the next page by adding ?page=2 to + the query string. If there are no results to return, + then an empty result set will be returned. Use in + query `page=1`. + per_page -- int -- This parameter indicates how many + records to fetch in each request. Default value is 30. + The maximum allowed values is 200; any per_page value + over 200 will be changed to 200. Use in query + `per_page=200`. + filter -- ListCouponsFilter -- Filter to use for List + Coupons operations + currency_prices -- bool -- When fetching coupons, if you + have defined multiple currencies at the site level, + you can optionally pass the `?currency_prices=true` + query param to include an array of currency price data + in the response. Use in query `currency_prices=true`. Returns: - List[CouponResponse]: Response from the API. OK + List[CouponResponse]: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -484,22 +482,22 @@ def read_coupon_usage(self, coupon_id): """Does a GET request to /product_families/{product_family_id}/coupons/{coupon_id}/usage.json. - This request will provide details about the coupon usage as an array - of data hashes, one per product. + This request will provide details about the coupon usage as an array + of data hashes, one per product. Args: - product_family_id (int): The Advanced Billing id of the product - family to which the coupon belongs - coupon_id (int): The Advanced Billing id of the coupon + product_family_id (int): The Advanced Billing id of the product + family to which the coupon belongs + coupon_id (int): The Advanced Billing id of the coupon Returns: - List[CouponUsage]: Response from the API. OK + List[CouponUsage]: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -532,46 +530,46 @@ def validate_coupon(self, product_family_id=None): """Does a GET request to /coupons/validate.json. - You can verify if a specific coupon code is valid using the `validate` - method. This method is useful for validating coupon codes that are - entered by a customer. If the coupon is found and is valid, the coupon - will be returned with a 200 status code. - If the coupon is invalid, the status code will be 404 and the response - will say why it is invalid. If the coupon is valid, the status code - will be 200 and the coupon will be returned. The following reasons for - invalidity are supported: - + Coupon not found - + Coupon is invalid - + Coupon expired - If you have more than one product family and if the coupon you are - validating does not belong to the first product family in your site, - then you will need to specify the product family, either in the url or - as a query string param. This can be done by supplying the id or the - handle in the `handle:my-family` format. - Eg. - ``` - https://.chargify.com/product_families/handle:/coupons/validate.?code= - ``` - Or: - ``` - https://.chargify.com/coupons/validate.?code=&product_family_id= - ``` + You can verify if a specific coupon code is valid using the `validate` + method. This method is useful for validating coupon codes that are + entered by a customer. If the coupon is found and is valid, the coupon + will be returned with a 200 status code. + If the coupon is invalid, the status code will be 404 and the response + will say why it is invalid. If the coupon is valid, the status code + will be 200 and the coupon will be returned. The following reasons for + invalidity are supported: + + Coupon not found + + Coupon is invalid + + Coupon expired + If you have more than one product family and if the coupon you are + validating does not belong to the first product family in your site, + then you will need to specify the product family, either in the url or + as a query string param. This can be done by supplying the id or the + handle in the `handle:my-family` format. + Eg. + ``` + https://.chargify.com/product_families/handle:/coupons/validate.?code= + ``` + Or: + ``` + https://.chargify.com/coupons/validate.?code=&product_family_id= + ``` Args: - code (str): The code of the coupon - product_family_id (int, optional): The Advanced Billing id of the - product family to which the coupon belongs + code (str): The code of the coupon + product_family_id (int, optional): The Advanced Billing id of the + product family to which the coupon belongs Returns: - CouponResponse: Response from the API. OK + CouponResponse: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -602,28 +600,28 @@ def create_or_update_coupon_currency_prices(self, body=None): """Does a PUT request to /coupons/{coupon_id}/currency_prices.json. - This endpoint allows you to create and/or update currency prices for - an existing coupon. Multiple prices can be created or updated in a - single request but each of the currencies must be defined on the site - level already and the coupon must be an amount-based coupon, not - percentage. - Currency pricing for coupons must mirror the setup of the primary - coupon pricing - if the primary coupon is percentage based, you will - not be able to define pricing in non-primary currencies. + This endpoint allows you to create and/or update currency prices for + an existing coupon. Multiple prices can be created or updated in a + single request but each of the currencies must be defined on the site + level already and the coupon must be an amount-based coupon, not + percentage. + Currency pricing for coupons must mirror the setup of the primary + coupon pricing - if the primary coupon is percentage based, you will + not be able to define pricing in non-primary currencies. Args: - coupon_id (int): The Advanced Billing id of the coupon - body (CouponCurrencyRequest, optional): TODO: type description - here. + coupon_id (int): The Advanced Billing id of the coupon + body (CouponCurrencyRequest, optional): TODO: type description + here. Returns: - CouponCurrencyResponse: Response from the API. OK + CouponCurrencyResponse: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -657,60 +655,59 @@ def create_coupon_subcodes(self, body=None): """Does a POST request to /coupons/{coupon_id}/codes.json. - ## Coupon Subcodes Intro - Coupon Subcodes allow you to create a set of unique codes that allow - you to expand the use of one coupon. - For example: - Master Coupon Code: - + SPRING2020 - Coupon Subcodes: - + SPRING90210 - + DP80302 - + SPRINGBALTIMORE - Coupon subcodes can be administered in the Admin Interface or via the - API. - When creating a coupon subcode, you must specify a coupon to attach it - to using the coupon_id. Valid coupon subcodes are all capital letters, - contain only letters and numbers, and do not have any spaces. - Lowercase letters will be capitalized before the subcode is created. - ## Coupon Subcodes Documentation - Full documentation on how to create coupon subcodes in the Advanced - Billing UI can be located - [here](https://maxio.zendesk.com/hc/en-us/articles/24261208729229-Coupo - n-Codes). - Additionally, for documentation on how to apply a coupon to a - Subscription within the Advanced Billing UI, please see our - documentation - [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupo - ns-and-Subscriptions). - ## Create Coupon Subcode - This request allows you to create specific subcodes underneath an - existing coupon code. - *Note*: If you are using any of the allowed special characters ("%", - "@", "+", "-", "_", and "."), you must encode them for use in the - URL. - % to %25 - @ to %40 - + to %2B - - to %2D - _ to %5F - . to %2E - So, if the coupon subcode is `20%OFF`, the URL to delete this coupon - subcode would be: - `https://.chargify.com/coupons/567/codes/20%25OFF.` - + ## Coupon Subcodes Intro + Coupon Subcodes allow you to create a set of unique codes that allow + you to expand the use of one coupon. + For example: + Master Coupon Code: + + SPRING2020 + Coupon Subcodes: + + SPRING90210 + + DP80302 + + SPRINGBALTIMORE + Coupon subcodes can be administered in the Admin Interface or via the + API. + When creating a coupon subcode, you must specify a coupon to attach it + to using the coupon_id. Valid coupon subcodes are all capital letters, + contain only letters and numbers, and do not have any spaces. + Lowercase letters will be capitalized before the subcode is created. + ## Coupon Subcodes Documentation + Full documentation on how to create coupon subcodes in the Advanced + Billing UI can be located + [here](https://maxio.zendesk.com/hc/en-us/articles/24261208729229-Coupo + n-Codes). + Additionally, for documentation on how to apply a coupon to a + Subscription within the Advanced Billing UI, please see our + documentation + [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupo + ns-and-Subscriptions). + ## Create Coupon Subcode + This request allows you to create specific subcodes underneath an + existing coupon code. + *Note*: If you are using any of the allowed special characters ("%", + "@", "+", "-", "_", and "."), you must encode them for use in the URL. + % to %25 + @ to %40 + + to %2B + - to %2D + _ to %5F + . to %2E + So, if the coupon subcode is `20%OFF`, the URL to delete this coupon + subcode would be: + `https://.chargify.com/coupons/567/codes/20%25OFF.` + Args: - coupon_id (int): The Advanced Billing id of the coupon - body (CouponSubcodes, optional): TODO: type description here. + coupon_id (int): The Advanced Billing id of the coupon + body (CouponSubcodes, optional): TODO: type description here. Returns: - CouponSubcodesResponse: Response from the API. OK + CouponSubcodesResponse: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -743,40 +740,40 @@ def list_coupon_subcodes(self, options=dict()): """Does a GET request to /coupons/{coupon_id}/codes.json. - This request allows you to request the subcodes that are attached to a - coupon. + This request allows you to request the subcodes that are attached to a + coupon. Args: - options (dict, optional): Key-value pairs for any of the - parameters to this API Endpoint. All parameters to the - endpoint are supplied through the dictionary with their names - being the key and their desired values being the value. A list + options (dict, optional): Key-value pairs for any of the + parameters to this API Endpoint. All parameters to the + endpoint are supplied through the dictionary with their names + being the key and their desired values being the value. A list of parameters that can be used are:: - - coupon_id -- int -- The Advanced Billing id of the coupon - page -- int -- Result records are organized in pages. By - default, the first page of results is displayed. The - page parameter specifies a page number of results to - fetch. You can start navigating through the pages to - consume the results. You do this by passing in a page - parameter. Retrieve the next page by adding ?page=2 to - the query string. If there are no results to return, - then an empty result set will be returned. Use in - query `page=1`. - per_page -- int -- This parameter indicates how many - records to fetch in each request. Default value is 20. - The maximum allowed values is 200; any per_page value - over 200 will be changed to 200. Use in query - `per_page=200`. + + coupon_id -- int -- The Advanced Billing id of the coupon + page -- int -- Result records are organized in pages. By + default, the first page of results is displayed. The + page parameter specifies a page number of results to + fetch. You can start navigating through the pages to + consume the results. You do this by passing in a page + parameter. Retrieve the next page by adding ?page=2 to + the query string. If there are no results to return, + then an empty result set will be returned. Use in + query `page=1`. + per_page -- int -- This parameter indicates how many + records to fetch in each request. Default value is 20. + The maximum allowed values is 200; any per_page value + over 200 will be changed to 200. Use in query + `per_page=200`. Returns: - CouponSubcodes: Response from the API. OK + CouponSubcodes: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -810,28 +807,28 @@ def update_coupon_subcodes(self, body=None): """Does a PUT request to /coupons/{coupon_id}/codes.json. - You can update the subcodes for the given Coupon via the API with a - PUT request to the resource endpoint. - Send an array of new coupon subcodes. - **Note**: All current subcodes for that Coupon will be deleted first, - and replaced with the list of subcodes sent to this endpoint. - The response will contain: - + The created subcodes, - + Subcodes that were not created because they already exist, - + Any subcodes not created because they are invalid. + You can update the subcodes for the given Coupon via the API with a + PUT request to the resource endpoint. + Send an array of new coupon subcodes. + **Note**: All current subcodes for that Coupon will be deleted first, + and replaced with the list of subcodes sent to this endpoint. + The response will contain: + + The created subcodes, + + Subcodes that were not created because they already exist, + + Any subcodes not created because they are invalid. Args: - coupon_id (int): The Advanced Billing id of the coupon - body (CouponSubcodes, optional): TODO: type description here. + coupon_id (int): The Advanced Billing id of the coupon + body (CouponSubcodes, optional): TODO: type description here. Returns: - CouponSubcodesResponse: Response from the API. OK + CouponSubcodesResponse: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ @@ -865,41 +862,40 @@ def delete_coupon_subcode(self, subcode): """Does a DELETE request to /coupons/{coupon_id}/codes/{subcode}.json. - ## Example - Given a coupon with an ID of 567, and a coupon subcode of 20OFF, the - URL to `DELETE` this coupon subcode would be: - ``` - http://subdomain.chargify.com/coupons/567/codes/20OFF. - ``` - Note: If you are using any of the allowed special characters (“%”, - “@”, “+”, “-”, “_”, and “.”), you must encode them for use in the - URL. - | Special character | Encoding | - |-------------------|----------| - | % | %25 | - | @ | %40 | - | + | %2B | - | – | %2D | - | _ | %5F | - | . | %2E | - ## Percent Encoding Example - Or if the coupon subcode is 20%OFF, the URL to delete this coupon - subcode would be: - @https://.chargify.com/coupons/567/codes/20%25OFF. + ## Example + Given a coupon with an ID of 567, and a coupon subcode of 20OFF, the + URL to `DELETE` this coupon subcode would be: + ``` + http://subdomain.chargify.com/coupons/567/codes/20OFF. + ``` + Note: If you are using any of the allowed special characters (“%”, + “@”, “+”, “-”, “_”, and “.”), you must encode them for use in the URL. + | Special character | Encoding | + |-------------------|----------| + | % | %25 | + | @ | %40 | + | + | %2B | + | – | %2D | + | _ | %5F | + | . | %2E | + ## Percent Encoding Example + Or if the coupon subcode is 20%OFF, the URL to delete this coupon + subcode would be: + @https://.chargify.com/coupons/567/codes/20%25OFF. Args: - coupon_id (int): The Advanced Billing id of the coupon to which - the subcode belongs - subcode (str): The subcode of the coupon + coupon_id (int): The Advanced Billing id of the coupon to which + the subcode belongs + subcode (str): The subcode of the coupon Returns: - void: Response from the API. OK + void: Response from the API. OK Raises: - APIException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. + APIException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. """ diff --git a/advancedbilling/controllers/custom_fields_controller.py b/advancedbilling/controllers/custom_fields_controller.py index d5635e3d..f2df1133 100644 --- a/advancedbilling/controllers/custom_fields_controller.py +++ b/advancedbilling/controllers/custom_fields_controller.py @@ -539,8 +539,7 @@ def delete_metadata(self, subscription for which the metadata applies name (str, optional): Name of field to be removed. names (List[str], optional): Names of fields to be removed. Use in - query: - `names[]=field1&names[]=my-field&names[]=another-field`. + query: `names[]=field1&names[]=my-field&names[]=another-field`. Returns: void: Response from the API. OK diff --git a/advancedbilling/controllers/customers_controller.py b/advancedbilling/controllers/customers_controller.py index 23946cfe..e9e97439 100644 --- a/advancedbilling/controllers/customers_controller.py +++ b/advancedbilling/controllers/customers_controller.py @@ -354,8 +354,7 @@ def read_customer_by_reference(self, """Does a GET request to /customers/lookup.json. Use this method to return the customer object if you have the unique - **Reference ID (Your App)** value handy. It will return a single - match. + **Reference ID (Your App)** value handy. It will return a single match. Args: reference (str): Customer reference diff --git a/advancedbilling/controllers/events_based_billing_segments_controller.py b/advancedbilling/controllers/events_based_billing_segments_controller.py index 5a2917b7..35b36601 100644 --- a/advancedbilling/controllers/events_based_billing_segments_controller.py +++ b/advancedbilling/controllers/events_based_billing_segments_controller.py @@ -47,8 +47,7 @@ def create_segment(self, component_id (str): ID or Handle for the Component price_point_id (str): ID or Handle for the Price Point belonging to the Component - body (CreateSegmentRequest, optional): TODO: type description - here. + body (CreateSegmentRequest, optional): TODO: type description here. Returns: SegmentResponse: Response from the API. Created @@ -187,8 +186,7 @@ def update_segment(self, """Does a PUT request to /components/{component_id}/price_points/{price_point_id}/segments/{id}.json. This endpoint updates a single Segment for a Component with a - segmented Metric. It allows you to update the pricing for the - segment. + segmented Metric. It allows you to update the pricing for the segment. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. @@ -197,8 +195,7 @@ def update_segment(self, price_point_id (str): ID or Handle of the Price Point belonging to the Component id (float): The ID of the Segment - body (UpdateSegmentRequest, optional): TODO: type description - here. + body (UpdateSegmentRequest, optional): TODO: type description here. Returns: SegmentResponse: Response from the API. OK diff --git a/advancedbilling/controllers/events_controller.py b/advancedbilling/controllers/events_controller.py index c8e60ef6..514cc5dd 100644 --- a/advancedbilling/controllers/events_controller.py +++ b/advancedbilling/controllers/events_controller.py @@ -63,7 +63,7 @@ def list_events(self, "id": 351, "key": "subscription_product_change", "message": "Product changed on Marky Mark's subscription from - 'Basic' to 'Pro'", + 'Basic' to 'Pro'", "subscription_id": 205, "event_specific_data": { "new_product_id": 3, @@ -80,7 +80,7 @@ def list_events(self, "id": 353, "key": "subscription_state_change", "message": "State changed on Marky Mark's subscription to Pro - from trialing to active", + from trialing to active", "subscription_id": 205, "event_specific_data": { "new_subscription_state": "active", @@ -210,8 +210,7 @@ def list_subscription_events(self, options=dict()): """Does a GET request to /subscriptions/{subscription_id}/events.json. - The following request will return a list of events for a - subscription. + The following request will return a list of events for a subscription. Each event type has its own `event_specific_data` specified. Args: diff --git a/advancedbilling/controllers/insights_controller.py b/advancedbilling/controllers/insights_controller.py index c510a8dc..180d497e 100644 --- a/advancedbilling/controllers/insights_controller.py +++ b/advancedbilling/controllers/insights_controller.py @@ -34,8 +34,7 @@ def read_site_stats(self): """Does a GET request to /stats.json. The Stats API is a very basic view of some Site-level stats. This API - call only answers with JSON responses. An XML version is not - provided. + call only answers with JSON responses. An XML version is not provided. ## Stats Documentation There currently is not a complimentary matching set of documentation that compliments this endpoint. However, each Site's dashboard will diff --git a/advancedbilling/controllers/invoices_controller.py b/advancedbilling/controllers/invoices_controller.py index 7612b801..5dff3500 100644 --- a/advancedbilling/controllers/invoices_controller.py +++ b/advancedbilling/controllers/invoices_controller.py @@ -53,8 +53,7 @@ def refund_invoice(self, Args: uid (str): The unique identifier for the invoice, this does not refer to the public facing invoice number. - body (RefundInvoiceRequest, optional): TODO: type description - here. + body (RefundInvoiceRequest, optional): TODO: type description here. Returns: Invoice: Response from the API. OK @@ -546,8 +545,8 @@ def record_payment_for_multiple_invoices(self, This API call should be used when you want to record an external payment against multiple invoices. In order apply a payment to multiple invoices, at minimum, specify - the `amount` and `applications` (i.e., `invoice_uid` and `amount`) - details. + the `amount` and `applications` (i.e., `invoice_uid` and `amount`) + details. ``` { "payment": { @@ -752,8 +751,7 @@ def record_payment_for_subscription(self, Args: subscription_id (int): The Chargify id of the subscription - body (RecordPaymentRequest, optional): TODO: type description - here. + body (RecordPaymentRequest, optional): TODO: type description here. Returns: RecordPaymentResponse: Response from the API. OK @@ -1153,8 +1151,7 @@ def create_invoice(self, Args: subscription_id (int): The Chargify id of the subscription - body (CreateInvoiceRequest, optional): TODO: type description - here. + body (CreateInvoiceRequest, optional): TODO: type description here. Returns: InvoiceResponse: Response from the API. OK @@ -1206,8 +1203,7 @@ def send_invoice(self, Please note that if no recipient email addresses are specified in the request, then the subscription's default email configuration will be used. For example, if `recipient_emails` is left blank, then the - invoice will be delivered to the subscription's customer email - address. + invoice will be delivered to the subscription's customer email address. On success, a 204 no-content response will be returned. Please note that this does not indicate that email(s) have been delivered, but instead indicates that emails have been successfully queued for @@ -1380,8 +1376,7 @@ def issue_invoice(self, Args: uid (str): The unique identifier for the invoice, this does not refer to the public facing invoice number. - body (IssueInvoiceRequest, optional): TODO: type description - here. + body (IssueInvoiceRequest, optional): TODO: type description here. Returns: Invoice: Response from the API. OK diff --git a/advancedbilling/controllers/payment_profiles_controller.py b/advancedbilling/controllers/payment_profiles_controller.py index 38fa242c..899983bc 100644 --- a/advancedbilling/controllers/payment_profiles_controller.py +++ b/advancedbilling/controllers/payment_profiles_controller.py @@ -113,8 +113,7 @@ def create_payment_profile(self, Secure. Instead, we have provided [Chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jO jE0NjAzNDI0-overview) which is continuously improved and supports - Credit Cards (along with 3D Secure), PayPal and ApplePay payment - types. + Credit Cards (along with 3D Secure), PayPal and ApplePay payment types. ## GoCardless For more information on GoCardless, please view the following resources: @@ -179,9 +178,8 @@ def create_payment_profile(self, "current_vault": "gocardless", "bank_name": "French Bank", "bank_account_number": [Last Four Of The Existing Account Number - or IBAN if applicable], - "bank_routing_number": [Last Four Of The Existing Routing - Number], + or IBAN if applicable], + "bank_routing_number": [Last Four Of The Existing Routing Number], "payment_type": "bank_account", "billing_address": "20 Place de la Gare", "billing_city": "Colombes", @@ -297,23 +295,20 @@ def create_payment_profile(self, { "title": "This card requires 3DSecure verification.", "detail": "This card requires 3D secure authentication. - Redirect the customer to the URL from the action_link - attribute to authenticate. Attach callback_url param to - this URL if you want to be notified about the result of 3D - Secure authentication. Attach redirect_url param to this - URL if you want to redirect a customer back to your page - after 3D Secure authentication. Example: - https://checkout-test.chargifypay.test/3d-secure/checkout/p - ay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback - _url=http://localhost:4000&redirect_url=https://yourpage.co - m will do a POST request to https://localhost:4000 after - credit card is authenticated and will redirect a customer - to https://yourpage.com after 3DS authentication.", + Redirect the customer to the URL from the action_link attribute to + authenticate. Attach callback_url param to this URL if you want to be + notified about the result of 3D Secure authentication. Attach + redirect_url param to this URL if you want to redirect a customer back + to your page after 3D Secure authentication. Example: + https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5 + uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:40 + 00&redirect_url=https://yourpage.com will do a POST request to + https://localhost:4000 after credit card is authenticated and will + redirect a customer to https://yourpage.com after 3DS authentication.", "links": { "action_link": - "https://checkout-test.chargifypay.test/3d-secure/check - out/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93 - " + "https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd + 5uhkbodx5jhvkg6yeu?one_time_token_id=93" } } ] diff --git a/advancedbilling/controllers/product_families_controller.py b/advancedbilling/controllers/product_families_controller.py index cbf4a002..f60e5c92 100644 --- a/advancedbilling/controllers/product_families_controller.py +++ b/advancedbilling/controllers/product_families_controller.py @@ -284,8 +284,7 @@ def read_product_family(self, """Does a GET request to /product_families/{id}.json. This method allows to retrieve a Product Family via the - `product_family_id`. The response will contain a Product Family - object. + `product_family_id`. The response will contain a Product Family object. The product family can be specified either with the id number, or with the `handle:my-family` format. diff --git a/advancedbilling/controllers/products_controller.py b/advancedbilling/controllers/products_controller.py index 62c8b0b0..f243c0bb 100644 --- a/advancedbilling/controllers/products_controller.py +++ b/advancedbilling/controllers/products_controller.py @@ -31,8 +31,7 @@ def create_product(self, body=None): """Does a POST request to /product_families/{product_family_id}/products.json. - Use this method to create a product within your Advanced Billing - site. + Use this method to create a product within your Advanced Billing site. + [Products Documentation](https://maxio.zendesk.com/hc/en-us/articles/242610901176 45-Products-Overview) @@ -268,8 +267,7 @@ def list_products(self, options=dict()): """Does a GET request to /products.json. - This method allows to retrieve a list of Products belonging to a - Site. + This method allows to retrieve a list of Products belonging to a Site. Args: options (dict, optional): Key-value pairs for any of the diff --git a/advancedbilling/controllers/proforma_invoices_controller.py b/advancedbilling/controllers/proforma_invoices_controller.py index 38d405b6..a6957fe9 100644 --- a/advancedbilling/controllers/proforma_invoices_controller.py +++ b/advancedbilling/controllers/proforma_invoices_controller.py @@ -153,8 +153,7 @@ def read_proforma_invoice(self, proforma_invoice_uid): """Does a GET request to /proforma_invoices/{proforma_invoice_uid}.json. - Use this endpoint to read the details of an existing proforma - invoice. + Use this endpoint to read the details of an existing proforma invoice. ## Restrictions Proforma invoices are only available on Relationship Invoicing sites. @@ -361,8 +360,7 @@ def void_proforma_invoice(self, body=None): """Does a POST request to /proforma_invoices/{proforma_invoice_uid}/void.json. - This endpoint will void a proforma invoice that has the status - "draft". + This endpoint will void a proforma invoice that has the status "draft". ## Restrictions Proforma invoices are only available on Relationship Invoicing sites. Only proforma invoices that have the appropriate status may be diff --git a/advancedbilling/controllers/sales_commissions_controller.py b/advancedbilling/controllers/sales_commissions_controller.py index 66d41e76..8c6b1748 100644 --- a/advancedbilling/controllers/sales_commissions_controller.py +++ b/advancedbilling/controllers/sales_commissions_controller.py @@ -55,8 +55,7 @@ def list_sales_commission_settings(self, being the key and their desired values being the value. A list of parameters that can be used are:: - seller_id -- str -- The Chargify id of your seller - account + seller_id -- str -- The Chargify id of your seller account authorization -- str -- For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-d @@ -75,8 +74,7 @@ def list_sales_commission_settings(self, then an empty result set will be returned. Use in query `page=1`. per_page -- int -- This parameter indicates how many - records to fetch in each request. Default value is - 100. + records to fetch in each request. Default value is 100. Returns: List[SaleRepSettings]: Response from the API. OK @@ -149,8 +147,7 @@ def list_sales_reps(self, being the key and their desired values being the value. A list of parameters that can be used are:: - seller_id -- str -- The Chargify id of your seller - account + seller_id -- str -- The Chargify id of your seller account authorization -- str -- For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-d @@ -169,8 +166,7 @@ def list_sales_reps(self, then an empty result set will be returned. Use in query `page=1`. per_page -- int -- This parameter indicates how many - records to fetch in each request. Default value is - 100. + records to fetch in each request. Default value is 100. Returns: List[ListSaleRepItem]: Response from the API. OK @@ -249,8 +245,7 @@ def read_sales_rep(self, [here](https://developers.chargify.com/docs/developer-docs/ZG9j OjMyNzk5NTg0-2020-04-20-new-api-authentication). live_mode (bool, optional): This parameter indicates if records - should be fetched from live mode sites. Default value is - true. + should be fetched from live mode sites. Default value is true. page (int, optional): Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can diff --git a/advancedbilling/controllers/sites_controller.py b/advancedbilling/controllers/sites_controller.py index 62f4124d..09cc19c0 100644 --- a/advancedbilling/controllers/sites_controller.py +++ b/advancedbilling/controllers/sites_controller.py @@ -43,8 +43,8 @@ def read_site(self): "whopays_default_payer": "self" You can read more about these settings here: [Who Pays & Customer - Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533- - Customer-Hierarchies-WhoPays) + Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-C + ustomer-Hierarchies-WhoPays) Returns: SiteResponse: Response from the API. OK diff --git a/advancedbilling/controllers/subscription_components_controller.py b/advancedbilling/controllers/subscription_components_controller.py index 2e6c88f4..32d3cb9f 100644 --- a/advancedbilling/controllers/subscription_components_controller.py +++ b/advancedbilling/controllers/subscription_components_controller.py @@ -225,8 +225,7 @@ def bulk_update_subscription_components_price_points(self, body=None): """Does a POST request to /subscriptions/{subscription_id}/price_points.json. - Updates the price points on one or more of a subscription's - components. + Updates the price points on one or more of a subscription's components. The `price_point` key can take either a: 1. Price point id (integer) 2. Price point handle (string) @@ -281,8 +280,7 @@ def bulk_reset_subscription_components_price_points(self, Resets all of a subscription's components to use the current default. **Note**: this will update the price point for all of the - subscription's components, even ones that have not been allocated - yet. + subscription's components, even ones that have not been allocated yet. Args: subscription_id (int): The Chargify id of the subscription @@ -654,8 +652,7 @@ def update_prepaid_usage_allocation_expiration_date(self, call must be made to the allocation's endpoint with a new expiration date. ## Limitations - A few limitations exist when changing an allocation's expiration - date: + A few limitations exist when changing an allocation's expiration date: - An expiration date can only be changed for an allocation that belongs to a price point with expiration interval options explicitly set. @@ -737,8 +734,7 @@ def delete_prepaid_usage_allocation(self, subscription_id (int): The Chargify id of the subscription component_id (int): The Advanced Billing id of the component allocation_id (int): The Advanced Billing id of the allocation - body (CreditSchemeRequest, optional): TODO: type description - here. + body (CreditSchemeRequest, optional): TODO: type description here. Returns: void: Response from the API. OK @@ -1038,8 +1034,7 @@ def activate_event_based_component(self, component usage at renewal.* Args: - subscription_id (int): The Advanced Billing id of the - subscription + subscription_id (int): The Advanced Billing id of the subscription component_id (int): The Advanced Billing id of the component body (ActivateEventBasedComponent, optional): TODO: type description here. @@ -1088,8 +1083,7 @@ def deactivate_event_based_component(self, Billing to ignore related events at subscription renewal. Args: - subscription_id (int): The Advanced Billing id of the - subscription + subscription_id (int): The Advanced Billing id of the subscription component_id (int): The Advanced Billing id of the component Returns: diff --git a/advancedbilling/controllers/subscription_group_invoice_account_controller.py b/advancedbilling/controllers/subscription_group_invoice_account_controller.py index b735ba74..a24ccad5 100644 --- a/advancedbilling/controllers/subscription_group_invoice_account_controller.py +++ b/advancedbilling/controllers/subscription_group_invoice_account_controller.py @@ -114,8 +114,7 @@ def list_prepayments_for_subscription_group(self, Prepayments operations Returns: - ListSubscriptionGroupPrepaymentResponse: Response from the API. - OK + ListSubscriptionGroupPrepaymentResponse: Response from the API. OK Raises: APIException: When an error occurs while fetching the data from diff --git a/advancedbilling/controllers/subscription_group_status_controller.py b/advancedbilling/controllers/subscription_group_status_controller.py index b0a642ff..64be3388 100644 --- a/advancedbilling/controllers/subscription_group_status_controller.py +++ b/advancedbilling/controllers/subscription_group_status_controller.py @@ -37,8 +37,7 @@ def cancel_subscriptions_in_group(self, automatic billing or they must be prepaid. In order to cancel a subscription group while also charging for any unbilled usage on metered or prepaid components, the - `charge_unbilled_usage=true` parameter must be included in the - request. + `charge_unbilled_usage=true` parameter must be included in the request. Args: uid (str): The uid of the subscription group diff --git a/advancedbilling/controllers/subscription_products_controller.py b/advancedbilling/controllers/subscription_products_controller.py index 115d5bf4..2718fd41 100644 --- a/advancedbilling/controllers/subscription_products_controller.py +++ b/advancedbilling/controllers/subscription_products_controller.py @@ -67,23 +67,23 @@ def migrate_subscription_product(self, { "errors": [ "Your card was declined. This transaction requires 3D secure - authentication." + authentication." ], "gateway_payment_id": "pi_1F0aGoJ2UDb3Q4av7zU3sHPh", "description": "This card requires 3D secure authentication. - Redirect the customer to the URL from the action_link attribute to - authenticate. Attach callback_url param to this URL if you want to - be notified about the result of 3D Secure authentication. Attach - redirect_url param to this URL if you want to redirect a customer - back to your page after 3D Secure authentication. Example: - https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one - _time_token_id=128&callback_url=https://localhost:4000&redirect_url=h - ttps://yourpage.com will do a POST request to https://localhost:4000 - after payment is authenticated and will redirect a customer to - https://yourpage.com after 3DS authentication.", + Redirect the customer to the URL from the action_link attribute to + authenticate. Attach callback_url param to this URL if you want to be + notified about the result of 3D Secure authentication. Attach + redirect_url param to this URL if you want to redirect a customer back + to your page after 3D Secure authentication. Example: + https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_t + ime_token_id=128&callback_url=https://localhost:4000&redirect_url=https + ://yourpage.com will do a POST request to https://localhost:4000 after + payment is authenticated and will redirect a customer to + https://yourpage.com after 3DS authentication.", "action_link": - "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_t - ime_token_id=242" + "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_tim + e_token_id=242" } ``` To let the customer go through 3D Secure Authentication, they need to diff --git a/advancedbilling/controllers/subscription_status_controller.py b/advancedbilling/controllers/subscription_status_controller.py index 3b26159f..19d0f2ff 100644 --- a/advancedbilling/controllers/subscription_status_controller.py +++ b/advancedbilling/controllers/subscription_status_controller.py @@ -84,8 +84,7 @@ def cancel_subscription(self, Args: subscription_id (int): The Chargify id of the subscription - body (CancellationRequest, optional): TODO: type description - here. + body (CancellationRequest, optional): TODO: type description here. Returns: SubscriptionResponse: Response from the API. OK @@ -304,8 +303,7 @@ def reactivate_subscription(self, "Trial Ended". ## Resume the current billing period for a subscription A subscription is considered "resumable" if you are attempting to - reactivate within the billing period the subscription was canceled - in. + reactivate within the billing period the subscription was canceled in. A resumed subscription's billing date remains the same as before it was canceled. In other words, it does not start a new billing period. Payment may or may not be collected for a resumed subscription, @@ -402,7 +400,7 @@ def reactivate_subscription(self, ``` { "errors": ["Request was 'resume only', but this subscription - cannot be resumed."] + cannot be resumed."] } ``` #### Results @@ -485,8 +483,7 @@ def initiate_delayed_cancellation(self, Args: subscription_id (int): The Chargify id of the subscription - body (CancellationRequest, optional): TODO: type description - here. + body (CancellationRequest, optional): TODO: type description here. Returns: DelayedCancellationResponse: Response from the API. OK diff --git a/advancedbilling/controllers/subscriptions_controller.py b/advancedbilling/controllers/subscriptions_controller.py index 9e25e9dc..7dd7461b 100644 --- a/advancedbilling/controllers/subscriptions_controller.py +++ b/advancedbilling/controllers/subscriptions_controller.py @@ -84,8 +84,7 @@ def create_subscription(self, m-Taxes), there are a few considerations to be made regarding collecting subscription data. For subscribers to be eligible to be taxed, the following information - for the `customer` object or `payment_profile` object must by - supplied: + for the `customer` object or `payment_profile` object must by supplied: + A subscription to a [taxable product](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Pro duct-Editing#tax-settings) @@ -159,8 +158,7 @@ def create_subscription(self, For a custom priced product, pass the custom_price object in place of `product_price_point_id`. For a custom priced component, pass the `custom_price` object within the component object. - Custom prices and price points can exist in harmony on a - subscription. + Custom prices and price points can exist in harmony on a subscription. # Passing Payment Information ## Subscription with Chargify.js token The `chargify_token` can be obtained using @@ -495,23 +493,23 @@ def create_subscription(self, { "errors": [ "Your card was declined. This transaction requires 3D secure - authentication." + authentication." ], "gateway_payment_id": "pi_1F0aGoJ2UDb3Q4av7zU3sHPh", "description": "This card requires 3D secure authentication. - Redirect the customer to the URL from the action_link attribute to - authenticate. Attach callback_url param to this URL if you want to - be notified about the result of 3D Secure authentication. Attach - redirect_url param to this URL if you want to redirect a customer - back to your page after 3D Secure authentication. Example: - https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one - _time_token_id=128&callback_url=https://localhost:4000&redirect_url=h - ttps://yourpage.com will do a POST request to https://localhost:4000 - after payment is authenticated and will redirect a customer to - https://yourpage.com after 3DS authentication.", + Redirect the customer to the URL from the action_link attribute to + authenticate. Attach callback_url param to this URL if you want to be + notified about the result of 3D Secure authentication. Attach + redirect_url param to this URL if you want to redirect a customer back + to your page after 3D Secure authentication. Example: + https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_t + ime_token_id=128&callback_url=https://localhost:4000&redirect_url=https + ://yourpage.com will do a POST request to https://localhost:4000 after + payment is authenticated and will redirect a customer to + https://yourpage.com after 3DS authentication.", "action_link": - "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_t - ime_token_id=242" + "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_tim + e_token_id=242" } ``` To let the customer go through 3D Secure Authentication, they need to @@ -547,24 +545,23 @@ def create_subscription(self, { "errors": [ "Your card was declined. This transaction requires 3D secure - authentication." + authentication." ], "gateway_payment_id": "pay_6gjofv7dlyrkpizlolsuspvtiu", "description": "This card requires 3D secure authentication. - Redirect the customer to the URL from the action_link attribute to - authenticate. Attach callback_url param to this URL if you want to - be notified about the result of 3D Secure authentication. Attach - redirect_url param to this URL if you want to redirect a customer - back to your page after 3D Secure authentication. Example: - https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu? - one_time_token_id=123&callback_url=https://localhost:4000&redirect_ur - l=https://yourpage.com will do a POST request to - https://localhost:4000 after payment is authenticated and will - redirect a customer to https://yourpage.com after 3DS - authentication.", + Redirect the customer to the URL from the action_link attribute to + authenticate. Attach callback_url param to this URL if you want to be + notified about the result of 3D Secure authentication. Attach + redirect_url param to this URL if you want to redirect a customer back + to your page after 3D Secure authentication. Example: + https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?on + e_time_token_id=123&callback_url=https://localhost:4000&redirect_url=ht + tps://yourpage.com will do a POST request to https://localhost:4000 + after payment is authenticated and will redirect a customer to + https://yourpage.com after 3DS authentication.", "action_link": - "http://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu? - one_time_token_id=123" + "http://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?on + e_time_token_id=123" } ``` To let the customer go through 3D Secure Authentication, they need to @@ -807,7 +804,7 @@ def create_subscription(self, "return_refund_policy_url": "https://return_refund_policy.url", "delivery_policy_url": "https://delivery_policy.url", "secure_checkout_policy_url": - "https://secure_checkout_policy.url" + "https://secure_checkout_policy.url" } } } @@ -971,8 +968,7 @@ def list_subscriptions(self, direction -- SortingDirection -- Controls the order in which results are returned. Use in query `direction=asc`. - sort -- SubscriptionSort -- The attribute by which to - sort + sort -- SubscriptionSort -- The attribute by which to sort include -- List[SubscriptionListInclude] -- Allows including additional data in the response. Use in query: `include[]=self_service_page_token`. diff --git a/advancedbilling/models/account_balance.py b/advancedbilling/models/account_balance.py index 87c76170..89069dff 100644 --- a/advancedbilling/models/account_balance.py +++ b/advancedbilling/models/account_balance.py @@ -17,8 +17,7 @@ class AccountBalance(object): Attributes: balance_in_cents (long|int): The balance in cents. - automatic_balance_in_cents (long|int): The automatic balance in - cents. + automatic_balance_in_cents (long|int): The automatic balance in cents. remittance_balance_in_cents (long|int): The remittance balance in cents. diff --git a/advancedbilling/models/ach_agreement.py b/advancedbilling/models/ach_agreement.py index ff8e4106..8bea6d93 100644 --- a/advancedbilling/models/ach_agreement.py +++ b/advancedbilling/models/ach_agreement.py @@ -20,11 +20,9 @@ class ACHAgreement(object): agreement_terms (str): (Required when providing ACH agreement params) The ACH authorization agreement terms. authorizer_first_name (str): (Required when providing ACH agreement - params) The first name of the person authorizing the ACH - agreement. + params) The first name of the person authorizing the ACH agreement. authorizer_last_name (str): (Required when providing ACH agreement - params) The last name of the person authorizing the ACH - agreement. + params) The last name of the person authorizing the ACH agreement. ip_address (str): (Required when providing ACH agreement params) The IP address of the person authorizing the ACH agreement. diff --git a/advancedbilling/models/agreement_acceptance.py b/advancedbilling/models/agreement_acceptance.py index a11c8594..9de8fcc5 100644 --- a/advancedbilling/models/agreement_acceptance.py +++ b/advancedbilling/models/agreement_acceptance.py @@ -16,8 +16,7 @@ class AgreementAcceptance(object): Required when creating a subscription with Maxio Payments. Attributes: - ip_address (str): Required when providing agreement acceptance - params. + ip_address (str): Required when providing agreement acceptance params. terms_url (str): Required when creating a subscription with Maxio Payments. Either terms_url or provacy_policy_url required when providing agreement_acceptance params. diff --git a/advancedbilling/models/allocation.py b/advancedbilling/models/allocation.py index 23015bc4..e0fb1b13 100644 --- a/advancedbilling/models/allocation.py +++ b/advancedbilling/models/allocation.py @@ -19,8 +19,7 @@ class Allocation(object): Attributes: allocation_id (int): The allocation unique id component_id (int): The integer component ID for the allocation. This - references a component that you have created in your Product - setup + references a component that you have created in your Product setup component_handle (str): The handle of the component. This references a component that you have created in your Product setup subscription_id (int): The integer subscription ID for the allocation. diff --git a/advancedbilling/models/allocation_preview.py b/advancedbilling/models/allocation_preview.py index 55847fc2..8fd813e3 100644 --- a/advancedbilling/models/allocation_preview.py +++ b/advancedbilling/models/allocation_preview.py @@ -29,8 +29,7 @@ class AllocationPreview(object): line_items (List[AllocationPreviewLineItem]): TODO: type description here. accrue_charge (bool): TODO: type description here. - allocations (List[AllocationPreviewItem]): TODO: type description - here. + allocations (List[AllocationPreviewItem]): TODO: type description here. period_type (str): TODO: type description here. existing_balance_in_cents (long|int): An integer representing the amount of the subscription's current balance diff --git a/advancedbilling/models/apply_credit_note_event_data.py b/advancedbilling/models/apply_credit_note_event_data.py index 0d4293b1..66f11d55 100644 --- a/advancedbilling/models/apply_credit_note_event_data.py +++ b/advancedbilling/models/apply_credit_note_event_data.py @@ -26,8 +26,7 @@ class ApplyCreditNoteEventData(object): generated automatically by Chargify and has the prefix "cn_" followed by alphanumeric characters. original_amount (str): The full, original amount of the credit note. - applied_amount (str): The amount of the credit note applied to - invoice. + applied_amount (str): The amount of the credit note applied to invoice. transaction_time (datetime): The time the credit note was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" memo (str): The credit note memo. diff --git a/advancedbilling/models/apply_debit_note_event_data.py b/advancedbilling/models/apply_debit_note_event_data.py index 48e202dc..020c7d35 100644 --- a/advancedbilling/models/apply_debit_note_event_data.py +++ b/advancedbilling/models/apply_debit_note_event_data.py @@ -22,8 +22,7 @@ class ApplyDebitNoteEventData(object): generated automatically by Chargify and has the prefix "db_" followed by alphanumeric characters. original_amount (str): The full, original amount of the debit note. - applied_amount (str): The amount of the debit note applied to - invoice. + applied_amount (str): The amount of the debit note applied to invoice. memo (str): The debit note memo. transaction_time (datetime): The time the debit note was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" diff --git a/advancedbilling/models/bank_account_attributes.py b/advancedbilling/models/bank_account_attributes.py index 2026ae09..c8027a6f 100644 --- a/advancedbilling/models/bank_account_attributes.py +++ b/advancedbilling/models/bank_account_attributes.py @@ -33,8 +33,7 @@ class BankAccountAttributes(object): bank_iban (str): (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided - bank_account_holder_type (BankAccountHolderType): Defaults to - personal + bank_account_holder_type (BankAccountHolderType): Defaults to personal payment_type (PaymentType): TODO: type description here. current_vault (BankAccountVault): The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. diff --git a/advancedbilling/models/bank_account_payment_profile.py b/advancedbilling/models/bank_account_payment_profile.py index c89ddf7b..f8d1480b 100644 --- a/advancedbilling/models/bank_account_payment_profile.py +++ b/advancedbilling/models/bank_account_payment_profile.py @@ -52,8 +52,7 @@ class BankAccountPaymentProfile(object): stored bank account number with all but the last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’) bank_account_type (BankAccountType): Defaults to checking - bank_account_holder_type (BankAccountHolderType): Defaults to - personal + bank_account_holder_type (BankAccountHolderType): Defaults to personal payment_type (PaymentType): TODO: type description here. verified (bool): denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account diff --git a/advancedbilling/models/base_string_error.py b/advancedbilling/models/base_string_error.py index e1bc00cd..b722f28c 100644 --- a/advancedbilling/models/base_string_error.py +++ b/advancedbilling/models/base_string_error.py @@ -13,8 +13,7 @@ class BaseStringError(object): """Implementation of the 'Base String Error' model. - The error is base if it is not directly associated with a single - attribute. + The error is base if it is not directly associated with a single attribute. Attributes: base (List[str]): TODO: type description here. diff --git a/advancedbilling/models/bulk_update_segments_item.py b/advancedbilling/models/bulk_update_segments_item.py index ae62dd6d..d42812ec 100644 --- a/advancedbilling/models/bulk_update_segments_item.py +++ b/advancedbilling/models/bulk_update_segments_item.py @@ -21,8 +21,7 @@ class BulkUpdateSegmentsItem(object): See [Product Components](https://help.chargify.com/products/product-components.h tml) for an overview of pricing schemes. - prices (List[CreateOrUpdateSegmentPrice]): TODO: type description - here. + prices (List[CreateOrUpdateSegmentPrice]): TODO: type description here. """ diff --git a/advancedbilling/models/component.py b/advancedbilling/models/component.py index 15c111fa..499b2c4b 100644 --- a/advancedbilling/models/component.py +++ b/advancedbilling/models/component.py @@ -32,8 +32,7 @@ class Component(object): Component belongs product_family_name (str): The name of the Product Family to which the Component belongs - price_per_unit_in_cents (long|int): deprecated - use unit_price - instead + price_per_unit_in_cents (long|int): deprecated - use unit_price instead kind (ComponentKind): A handle for the component type archived (bool): Boolean flag describing whether a component is archived or not. diff --git a/advancedbilling/models/component_price_points_response.py b/advancedbilling/models/component_price_points_response.py index cfd3609c..12942349 100644 --- a/advancedbilling/models/component_price_points_response.py +++ b/advancedbilling/models/component_price_points_response.py @@ -18,8 +18,7 @@ class ComponentPricePointsResponse(object): TODO: type model description here. Attributes: - price_points (List[ComponentPricePoint]): TODO: type description - here. + price_points (List[ComponentPricePoint]): TODO: type description here. meta (ListPublicKeysMeta): TODO: type description here. """ diff --git a/advancedbilling/models/create_debit_note_event.py b/advancedbilling/models/create_debit_note_event.py index b7f66fb8..1d628252 100644 --- a/advancedbilling/models/create_debit_note_event.py +++ b/advancedbilling/models/create_debit_note_event.py @@ -23,8 +23,7 @@ class CreateDebitNoteEvent(object): timestamp (datetime): TODO: type description here. invoice (Invoice): TODO: type description here. event_type (InvoiceEventType): TODO: type description here. - event_data (DebitNote): Example schema for an `create_debit_note` - event + event_data (DebitNote): Example schema for an `create_debit_note` event """ diff --git a/advancedbilling/models/create_invoice_item.py b/advancedbilling/models/create_invoice_item.py index 415f7795..4d045a60 100644 --- a/advancedbilling/models/create_invoice_item.py +++ b/advancedbilling/models/create_invoice_item.py @@ -35,8 +35,7 @@ class CreateInvoiceItem(object): component_id (str | int | None): Component handle or component id. price_point_id (str | int | None): Price point handle or id. For component. - product_price_point_id (str | int | None): TODO: type description - here. + product_price_point_id (str | int | None): TODO: type description here. description (str): TODO: type description here. """ diff --git a/advancedbilling/models/create_invoice_payment.py b/advancedbilling/models/create_invoice_payment.py index fb283246..275e9724 100644 --- a/advancedbilling/models/create_invoice_payment.py +++ b/advancedbilling/models/create_invoice_payment.py @@ -6,6 +6,8 @@ This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). """ +import dateutil.parser + from advancedbilling.api_helper import APIHelper @@ -18,13 +20,17 @@ class CreateInvoicePayment(object): Attributes: amount (str | float | None): A string of the dollar amount to be refunded (eg. "10.50" => $10.50) - memo (str): A description to be attached to the payment. + memo (str): A description to be attached to the payment. Applicable + only to `external` payments. method (InvoicePaymentMethodType): The type of payment method used. Defaults to other. details (str): Additional information related to the payment method - (eg. Check #) + (eg. Check #). Applicable only to `external` payments. payment_profile_id (int): The ID of the payment profile to be used for the payment. + received_on (date): Date reflecting when the payment was received from + a customer. Must be in the past. Applicable only to `external` + payments. """ @@ -34,7 +40,8 @@ class CreateInvoicePayment(object): "memo": 'memo', "method": 'method', "details": 'details', - "payment_profile_id": 'payment_profile_id' + "payment_profile_id": 'payment_profile_id', + "received_on": 'received_on' } _optionals = [ @@ -43,6 +50,7 @@ class CreateInvoicePayment(object): 'method', 'details', 'payment_profile_id', + 'received_on', ] def __init__(self, @@ -51,6 +59,7 @@ def __init__(self, method=APIHelper.SKIP, details=APIHelper.SKIP, payment_profile_id=APIHelper.SKIP, + received_on=APIHelper.SKIP, additional_properties={}): """Constructor for the CreateInvoicePayment class""" @@ -65,6 +74,8 @@ def __init__(self, self.details = details if payment_profile_id is not APIHelper.SKIP: self.payment_profile_id = payment_profile_id + if received_on is not APIHelper.SKIP: + self.received_on = received_on # Add additional model properties to the instance self.additional_properties = additional_properties @@ -94,6 +105,7 @@ def from_dictionary(cls, method = dictionary.get("method") if dictionary.get("method") else APIHelper.SKIP details = dictionary.get("details") if dictionary.get("details") else APIHelper.SKIP payment_profile_id = dictionary.get("payment_profile_id") if dictionary.get("payment_profile_id") else APIHelper.SKIP + received_on = dateutil.parser.parse(dictionary.get('received_on')).date() if dictionary.get('received_on') else APIHelper.SKIP # Clean out expected properties from dictionary for key in cls._names.values(): if key in dictionary: @@ -104,4 +116,5 @@ def from_dictionary(cls, method, details, payment_profile_id, + received_on, dictionary) diff --git a/advancedbilling/models/create_payment_profile.py b/advancedbilling/models/create_payment_profile.py index 228b65fc..cdc53a8b 100644 --- a/advancedbilling/models/create_payment_profile.py +++ b/advancedbilling/models/create_payment_profile.py @@ -91,8 +91,7 @@ class CreatePaymentProfile(object): Alternatively, local bank details can be provided bank_routing_number (str): (Required when creating with ACH. Optional when creating a subscription with GoCardless). The routing number - of the bank. It becomes bank_code while passing via GoCardless - API + of the bank. It becomes bank_code while passing via GoCardless API bank_account_number (str): (Required when creating with ACH, GoCardless, Stripe BECS or BACS Direct Debit, and bank_iban is blank) The customerʼs bank account number @@ -100,8 +99,7 @@ class CreatePaymentProfile(object): required with Stripe BECS or BACS Direct Debit) Branch/Sort code. Alternatively, an IBAN can be provided bank_account_type (BankAccountType): Defaults to checking - bank_account_holder_type (BankAccountHolderType): Defaults to - personal + bank_account_holder_type (BankAccountHolderType): Defaults to personal last_four (str): (Optional) Used for creating subscription with payment profile imported using vault_token, for proper display in Advanced Billing UI diff --git a/advancedbilling/models/create_segment.py b/advancedbilling/models/create_segment.py index 70830abc..f65c5e10 100644 --- a/advancedbilling/models/create_segment.py +++ b/advancedbilling/models/create_segment.py @@ -37,8 +37,7 @@ class CreateSegment(object): See [Product Components](https://help.chargify.com/products/product-components.h tml) for an overview of pricing schemes. - prices (List[CreateOrUpdateSegmentPrice]): TODO: type description - here. + prices (List[CreateOrUpdateSegmentPrice]): TODO: type description here. """ diff --git a/advancedbilling/models/create_subscription.py b/advancedbilling/models/create_subscription.py index 8931d03a..509566e3 100644 --- a/advancedbilling/models/create_subscription.py +++ b/advancedbilling/models/create_subscription.py @@ -106,8 +106,7 @@ class CreateSubscription(object): `bank_account` > id) reference (str): The reference value (provided by your app) for the subscription itelf. - customer_attributes (CustomerAttributes): TODO: type description - here. + customer_attributes (CustomerAttributes): TODO: type description here. payment_profile_attributes (PaymentProfileAttributes): alias to credit_card_attributes credit_card_attributes (PaymentProfileAttributes): Credit Card data to diff --git a/advancedbilling/models/credit_card_payment_profile.py b/advancedbilling/models/credit_card_payment_profile.py index 69aa0321..f9fc5129 100644 --- a/advancedbilling/models/credit_card_payment_profile.py +++ b/advancedbilling/models/credit_card_payment_profile.py @@ -37,8 +37,7 @@ class CreditCardPaymentProfile(object): profile with the provided `vault_token`. Use `bogus` for testing. vault_token (str): The “token” provided by your vault storage for an already stored payment profile. - billing_address (str): The current billing street address for the - card. + billing_address (str): The current billing street address for the card. billing_city (str): The current billing address city for the card. billing_state (str): The current billing address state for the card. billing_zip (str): The current billing address zip code for the card. diff --git a/advancedbilling/models/credit_note.py b/advancedbilling/models/credit_note.py index f947391f..a5ce84cc 100644 --- a/advancedbilling/models/credit_note.py +++ b/advancedbilling/models/credit_note.py @@ -31,8 +31,7 @@ class CreditNote(object): automatically by Chargify and has the prefix "cn_" followed by alphanumeric characters. site_id (int): ID of the site to which the credit note belongs. - customer_id (int): ID of the customer to which the credit note - belongs. + customer_id (int): ID of the customer to which the credit note belongs. subscription_id (int): ID of the subscription that generated the credit note. number (str): A unique, identifying string that appears on the credit @@ -73,8 +72,7 @@ class CreditNote(object): being credited back to the customer (i.e. a credit on an earlier discount). For example, if the original purchase was $1.00 and the original discount was $0.10, a credit of $0.50 of the original - purchase (half) would have a discount credit of $0.05 (also - half). + purchase (half) would have a discount credit of $0.05 (also half). tax_amount (str): Total tax of the credit note. Note that this is a positive amount representing a previously taxex amount being credited back to the customer (i.e. a credit of an earlier tax). diff --git a/advancedbilling/models/customer.py b/advancedbilling/models/customer.py index 376256b2..a60ebeca 100644 --- a/advancedbilling/models/customer.py +++ b/advancedbilling/models/customer.py @@ -45,7 +45,7 @@ class Customer(object): country_name (str): The customer's full name of country phone (str): The phone number of the customer verified (bool): Is the customer verified to use ACH as a payment - method. Available only on Authorize.Net gateway + method. portal_customer_created_at (datetime): The timestamp of when the Billing Portal entry was created at for the customer portal_invite_last_sent_at (datetime): The timestamp of when the @@ -64,6 +64,9 @@ class Customer(object): locale (str): The locale for the customer to identify language-region default_subscription_group_uid (str): TODO: type description here. salesforce_id (str): The Salesforce ID for the customer + tax_exempt_reason (str): The Tax Exemption Reason Code for the customer + default_auto_renewal_profile_id (int): The default auto-renewal + profile ID for the customer """ @@ -96,7 +99,9 @@ class Customer(object): "parent_id": 'parent_id', "locale": 'locale', "default_subscription_group_uid": 'default_subscription_group_uid', - "salesforce_id": 'salesforce_id' + "salesforce_id": 'salesforce_id', + "tax_exempt_reason": 'tax_exempt_reason', + "default_auto_renewal_profile_id": 'default_auto_renewal_profile_id' } _optionals = [ @@ -128,6 +133,8 @@ class Customer(object): 'locale', 'default_subscription_group_uid', 'salesforce_id', + 'tax_exempt_reason', + 'default_auto_renewal_profile_id', ] _nullables = [ @@ -152,6 +159,8 @@ class Customer(object): 'locale', 'default_subscription_group_uid', 'salesforce_id', + 'tax_exempt_reason', + 'default_auto_renewal_profile_id', ] def __init__(self, @@ -183,6 +192,8 @@ def __init__(self, locale=APIHelper.SKIP, default_subscription_group_uid=APIHelper.SKIP, salesforce_id=APIHelper.SKIP, + tax_exempt_reason=APIHelper.SKIP, + default_auto_renewal_profile_id=APIHelper.SKIP, additional_properties={}): """Constructor for the Customer class""" @@ -243,6 +254,10 @@ def __init__(self, self.default_subscription_group_uid = default_subscription_group_uid if salesforce_id is not APIHelper.SKIP: self.salesforce_id = salesforce_id + if tax_exempt_reason is not APIHelper.SKIP: + self.tax_exempt_reason = tax_exempt_reason + if default_auto_renewal_profile_id is not APIHelper.SKIP: + self.default_auto_renewal_profile_id = default_auto_renewal_profile_id # Add additional model properties to the instance self.additional_properties = additional_properties @@ -303,6 +318,8 @@ def from_dictionary(cls, locale = dictionary.get("locale") if "locale" in dictionary.keys() else APIHelper.SKIP default_subscription_group_uid = dictionary.get("default_subscription_group_uid") if "default_subscription_group_uid" in dictionary.keys() else APIHelper.SKIP salesforce_id = dictionary.get("salesforce_id") if "salesforce_id" in dictionary.keys() else APIHelper.SKIP + tax_exempt_reason = dictionary.get("tax_exempt_reason") if "tax_exempt_reason" in dictionary.keys() else APIHelper.SKIP + default_auto_renewal_profile_id = dictionary.get("default_auto_renewal_profile_id") if "default_auto_renewal_profile_id" in dictionary.keys() else APIHelper.SKIP # Clean out expected properties from dictionary for key in cls._names.values(): if key in dictionary: @@ -336,6 +353,8 @@ def from_dictionary(cls, locale, default_subscription_group_uid, salesforce_id, + tax_exempt_reason, + default_auto_renewal_profile_id, dictionary) @classmethod diff --git a/advancedbilling/models/customer_attributes.py b/advancedbilling/models/customer_attributes.py index bc8705a8..cb65dd98 100644 --- a/advancedbilling/models/customer_attributes.py +++ b/advancedbilling/models/customer_attributes.py @@ -24,8 +24,7 @@ class CustomerAttributes(object): a customer via attributes. cc_emails (str): A list of emails that should be cc’d on all customer communications. Optional. - organization (str): The organization/company of the customer. - Optional. + organization (str): The organization/company of the customer. Optional. reference (str): A customer “reference”, or unique identifier from your app, stored in Chargify. Can be used so that you may reference your customer’s within Chargify using the same unique @@ -49,8 +48,7 @@ class CustomerAttributes(object): phone (str): (Optional) The phone number of the customer. verified (bool): TODO: type description here. tax_exempt (bool): (Optional) The tax_exempt status of the customer. - Acceptable values are true or 1 for true and false or 0 for - false. + Acceptable values are true or 1 for true and false or 0 for false. vat_number (str): (Optional) Supplying the VAT number allows EU customer’s to opt-out of the Value Added Tax assuming the merchant address and customer billing address are not within the same EU @@ -64,6 +62,8 @@ class CustomerAttributes(object): parent_id (int): The parent ID in Chargify if applicable. Parent is another Customer object. salesforce_id (str): (Optional) The Salesforce ID of the customer. + default_auto_renewal_profile_id (int): (Optional) The default + auto-renewal profile ID for the customer """ @@ -87,7 +87,8 @@ class CustomerAttributes(object): "vat_number": 'vat_number', "metafields": 'metafields', "parent_id": 'parent_id', - "salesforce_id": 'salesforce_id' + "salesforce_id": 'salesforce_id', + "default_auto_renewal_profile_id": 'default_auto_renewal_profile_id' } _optionals = [ @@ -110,12 +111,14 @@ class CustomerAttributes(object): 'metafields', 'parent_id', 'salesforce_id', + 'default_auto_renewal_profile_id', ] _nullables = [ 'address_2', 'parent_id', 'salesforce_id', + 'default_auto_renewal_profile_id', ] def __init__(self, @@ -138,6 +141,7 @@ def __init__(self, metafields=APIHelper.SKIP, parent_id=APIHelper.SKIP, salesforce_id=APIHelper.SKIP, + default_auto_renewal_profile_id=APIHelper.SKIP, additional_properties={}): """Constructor for the CustomerAttributes class""" @@ -180,6 +184,8 @@ def __init__(self, self.parent_id = parent_id if salesforce_id is not APIHelper.SKIP: self.salesforce_id = salesforce_id + if default_auto_renewal_profile_id is not APIHelper.SKIP: + self.default_auto_renewal_profile_id = default_auto_renewal_profile_id # Add additional model properties to the instance self.additional_properties = additional_properties @@ -222,6 +228,7 @@ def from_dictionary(cls, metafields = dictionary.get("metafields") if dictionary.get("metafields") else APIHelper.SKIP parent_id = dictionary.get("parent_id") if "parent_id" in dictionary.keys() else APIHelper.SKIP salesforce_id = dictionary.get("salesforce_id") if "salesforce_id" in dictionary.keys() else APIHelper.SKIP + default_auto_renewal_profile_id = dictionary.get("default_auto_renewal_profile_id") if "default_auto_renewal_profile_id" in dictionary.keys() else APIHelper.SKIP # Clean out expected properties from dictionary for key in cls._names.values(): if key in dictionary: @@ -246,6 +253,7 @@ def from_dictionary(cls, metafields, parent_id, salesforce_id, + default_auto_renewal_profile_id, dictionary) @classmethod diff --git a/advancedbilling/models/debit_note.py b/advancedbilling/models/debit_note.py index 14fe1ce6..33d04475 100644 --- a/advancedbilling/models/debit_note.py +++ b/advancedbilling/models/debit_note.py @@ -29,8 +29,7 @@ class DebitNote(object): automatically by Chargify and has the prefix "db_" followed by alphanumeric characters. site_id (int): ID of the site to which the debit note belongs. - customer_id (int): ID of the customer to which the debit note - belongs. + customer_id (int): ID of the customer to which the debit note belongs. subscription_id (int): ID of the subscription that generated the debit note. number (int): A unique, identifier that appears on the debit note and diff --git a/advancedbilling/models/failed_payment_event_data.py b/advancedbilling/models/failed_payment_event_data.py index d397fdd0..03571b8c 100644 --- a/advancedbilling/models/failed_payment_event_data.py +++ b/advancedbilling/models/failed_payment_event_data.py @@ -22,8 +22,7 @@ class FailedPaymentEventData(object): applied_amount (int): The monetary value of the payment, expressed in dollars. memo (str): The memo passed when the payment was created. - payment_method (InvoicePaymentMethodType): TODO: type description - here. + payment_method (InvoicePaymentMethodType): TODO: type description here. transaction_id (int): The transaction ID of the failed payment. """ diff --git a/advancedbilling/models/invoice.py b/advancedbilling/models/invoice.py index a57d8f61..c13b9b4c 100644 --- a/advancedbilling/models/invoice.py +++ b/advancedbilling/models/invoice.py @@ -56,8 +56,7 @@ class Invoice(object): `"YYYY-MM-DD"`. paid_date (date): Date the invoice became fully paid. If partial payments are applied to the invoice, this date will not be present - until payment has been made in full. The format is - `"YYYY-MM-DD"`. + until payment has been made in full. The format is `"YYYY-MM-DD"`. status (InvoiceStatus): The current status of the invoice. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/2425228782964 @@ -119,8 +118,7 @@ class Invoice(object): total_amount (str): The invoice total, which is `subtotal_amount - discount_amount + tax_amount`.' credit_amount (str): The amount of credit (from credit notes) applied - to this invoice. Credits offset the amount due from the - customer. + to this invoice. Credits offset the amount due from the customer. refund_amount (str): TODO: type description here. paid_amount (str): The amount paid on the invoice by the customer. due_amount (str): Amount due on the invoice, which is `total_amount - @@ -131,10 +129,8 @@ class Invoice(object): credits (List[InvoiceCredit]): TODO: type description here. refunds (List[InvoiceRefund]): TODO: type description here. payments (List[InvoicePayment]): TODO: type description here. - custom_fields (List[InvoiceCustomField]): TODO: type description - here. - display_settings (InvoiceDisplaySettings): TODO: type description - here. + custom_fields (List[InvoiceCustomField]): TODO: type description here. + display_settings (InvoiceDisplaySettings): TODO: type description here. public_url (str): The public URL of the invoice previous_balance_data (InvoicePreviousBalance): TODO: type description here. diff --git a/advancedbilling/models/invoice_issued.py b/advancedbilling/models/invoice_issued.py index a399c490..1891a165 100644 --- a/advancedbilling/models/invoice_issued.py +++ b/advancedbilling/models/invoice_issued.py @@ -26,8 +26,7 @@ class InvoiceIssued(object): due_date (date): TODO: type description here. issue_date (str): Invoice issue date. Can be an empty string if value is missing. - paid_date (str): Paid date. Can be an empty string if value is - missing. + paid_date (str): Paid date. Can be an empty string if value is missing. due_amount (str): TODO: type description here. paid_amount (str): TODO: type description here. tax_amount (str): TODO: type description here. diff --git a/advancedbilling/models/invoice_payment.py b/advancedbilling/models/invoice_payment.py index d1421327..d4917079 100644 --- a/advancedbilling/models/invoice_payment.py +++ b/advancedbilling/models/invoice_payment.py @@ -6,6 +6,8 @@ This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). """ +import dateutil.parser + from advancedbilling.api_helper import APIHelper from advancedbilling.models.invoice_payment_method import InvoicePaymentMethod @@ -28,6 +30,10 @@ class InvoicePayment(object): gateway_used (str): TODO: type description here. gateway_transaction_id (str): The transaction ID for the payment as returned from the payment gateway + received_on (date): Date reflecting when the payment was received from + a customer. Must be in the past. Applicable only to `external` + payments. + uid (str): TODO: type description here. """ @@ -42,7 +48,9 @@ class InvoicePayment(object): "prepayment": 'prepayment', "gateway_handle": 'gateway_handle', "gateway_used": 'gateway_used', - "gateway_transaction_id": 'gateway_transaction_id' + "gateway_transaction_id": 'gateway_transaction_id', + "received_on": 'received_on', + "uid": 'uid' } _optionals = [ @@ -56,11 +64,14 @@ class InvoicePayment(object): 'gateway_handle', 'gateway_used', 'gateway_transaction_id', + 'received_on', + 'uid', ] _nullables = [ 'gateway_handle', 'gateway_transaction_id', + 'received_on', ] def __init__(self, @@ -74,6 +85,8 @@ def __init__(self, gateway_handle=APIHelper.SKIP, gateway_used=APIHelper.SKIP, gateway_transaction_id=APIHelper.SKIP, + received_on=APIHelper.SKIP, + uid=APIHelper.SKIP, additional_properties={}): """Constructor for the InvoicePayment class""" @@ -98,6 +111,10 @@ def __init__(self, self.gateway_used = gateway_used if gateway_transaction_id is not APIHelper.SKIP: self.gateway_transaction_id = gateway_transaction_id + if received_on is not APIHelper.SKIP: + self.received_on = received_on + if uid is not APIHelper.SKIP: + self.uid = uid # Add additional model properties to the instance self.additional_properties = additional_properties @@ -131,6 +148,11 @@ def from_dictionary(cls, gateway_handle = dictionary.get("gateway_handle") if "gateway_handle" in dictionary.keys() else APIHelper.SKIP gateway_used = dictionary.get("gateway_used") if dictionary.get("gateway_used") else APIHelper.SKIP gateway_transaction_id = dictionary.get("gateway_transaction_id") if "gateway_transaction_id" in dictionary.keys() else APIHelper.SKIP + if 'received_on' in dictionary.keys(): + received_on = dateutil.parser.parse(dictionary.get('received_on')).date() if dictionary.get('received_on') else None + else: + received_on = APIHelper.SKIP + uid = dictionary.get("uid") if dictionary.get("uid") else APIHelper.SKIP # Clean out expected properties from dictionary for key in cls._names.values(): if key in dictionary: @@ -146,6 +168,8 @@ def from_dictionary(cls, gateway_handle, gateway_used, gateway_transaction_id, + received_on, + uid, dictionary) @classmethod diff --git a/advancedbilling/models/item_price_point_changed.py b/advancedbilling/models/item_price_point_changed.py index 27c6ad87..60b4a142 100644 --- a/advancedbilling/models/item_price_point_changed.py +++ b/advancedbilling/models/item_price_point_changed.py @@ -21,10 +21,8 @@ class ItemPricePointChanged(object): item_type (str): TODO: type description here. item_handle (str): TODO: type description here. item_name (str): TODO: type description here. - previous_price_point (ItemPricePointData): TODO: type description - here. - current_price_point (ItemPricePointData): TODO: type description - here. + previous_price_point (ItemPricePointData): TODO: type description here. + current_price_point (ItemPricePointData): TODO: type description here. """ diff --git a/advancedbilling/models/list_components_price_points_response.py b/advancedbilling/models/list_components_price_points_response.py index 97873b26..dde50549 100644 --- a/advancedbilling/models/list_components_price_points_response.py +++ b/advancedbilling/models/list_components_price_points_response.py @@ -16,8 +16,7 @@ class ListComponentsPricePointsResponse(object): TODO: type model description here. Attributes: - price_points (List[ComponentPricePoint]): TODO: type description - here. + price_points (List[ComponentPricePoint]): TODO: type description here. """ diff --git a/advancedbilling/models/list_coupons_filter.py b/advancedbilling/models/list_coupons_filter.py index 42387460..1d13aa87 100644 --- a/advancedbilling/models/list_coupons_filter.py +++ b/advancedbilling/models/list_coupons_filter.py @@ -19,8 +19,7 @@ class ListCouponsFilter(object): Attributes: date_field (BasicDateField): The type of filter you would like to - apply to your search. Use in query - `filter[date_field]=created_at`. + apply to your search. Use in query `filter[date_field]=created_at`. start_date (date): The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date diff --git a/advancedbilling/models/list_proforma_invoices_response.py b/advancedbilling/models/list_proforma_invoices_response.py index e9cbfd5f..bde08f60 100644 --- a/advancedbilling/models/list_proforma_invoices_response.py +++ b/advancedbilling/models/list_proforma_invoices_response.py @@ -18,8 +18,7 @@ class ListProformaInvoicesResponse(object): TODO: type model description here. Attributes: - proforma_invoices (List[ProformaInvoice]): TODO: type description - here. + proforma_invoices (List[ProformaInvoice]): TODO: type description here. meta (ListProformaInvoicesMeta): TODO: type description here. """ diff --git a/advancedbilling/models/prepaid_subscription_balance_changed.py b/advancedbilling/models/prepaid_subscription_balance_changed.py index 44b1a6cb..71e854e6 100644 --- a/advancedbilling/models/prepaid_subscription_balance_changed.py +++ b/advancedbilling/models/prepaid_subscription_balance_changed.py @@ -21,8 +21,7 @@ class PrepaidSubscriptionBalanceChanged(object): here. prepayment_account_balance_in_cents (long|int): TODO: type description here. - current_usage_amount_in_cents (long|int): TODO: type description - here. + current_usage_amount_in_cents (long|int): TODO: type description here. """ diff --git a/advancedbilling/models/product.py b/advancedbilling/models/product.py index 42d7adbf..b1cbe60e 100644 --- a/advancedbilling/models/product.py +++ b/advancedbilling/models/product.py @@ -76,8 +76,7 @@ class Product(object): request a billing address on any Self-Service Pages that are used by subscribers of this product. require_billing_address (bool): A boolean indicating whether a billing - address is required to add a payment profile, especially at - signup. + address is required to add a payment profile, especially at signup. require_shipping_address (bool): A boolean indicating whether a shipping address is required for the customer, especially at signup. diff --git a/advancedbilling/models/product_price_point.py b/advancedbilling/models/product_price_point.py index aae27e32..b7a62f6a 100644 --- a/advancedbilling/models/product_price_point.py +++ b/advancedbilling/models/product_price_point.py @@ -58,8 +58,7 @@ class ProductPricePoint(object): multiple currencies defined. mtype (PricePointType): The type of price point tax_included (bool): Whether or not the price point includes tax - subscription_id (int): The subscription id this price point belongs - to + subscription_id (int): The subscription id this price point belongs to currency_prices (List[CurrencyPrice]): An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for diff --git a/advancedbilling/models/proforma_invoice.py b/advancedbilling/models/proforma_invoice.py index 6e7e60b4..161b41b9 100644 --- a/advancedbilling/models/proforma_invoice.py +++ b/advancedbilling/models/proforma_invoice.py @@ -74,13 +74,11 @@ class ProformaInvoice(object): refund_amount (str): TODO: type description here. due_amount (str): TODO: type description here. line_items (List[InvoiceLineItem]): TODO: type description here. - discounts (List[ProformaInvoiceDiscount]): TODO: type description - here. + discounts (List[ProformaInvoiceDiscount]): TODO: type description here. taxes (List[ProformaInvoiceTax]): TODO: type description here. credits (List[ProformaInvoiceCredit]): TODO: type description here. payments (List[ProformaInvoicePayment]): TODO: type description here. - custom_fields (List[InvoiceCustomField]): TODO: type description - here. + custom_fields (List[InvoiceCustomField]): TODO: type description here. public_url (str): TODO: type description here. """ diff --git a/advancedbilling/models/reactivate_subscription_request.py b/advancedbilling/models/reactivate_subscription_request.py index fe8c3151..83dafe4b 100644 --- a/advancedbilling/models/reactivate_subscription_request.py +++ b/advancedbilling/models/reactivate_subscription_request.py @@ -32,8 +32,7 @@ class ReactivateSubscriptionRequest(object): resume (bool | ResumeOptions | None): If `true`, Chargify will attempt to resume the subscription's billing period. if not resumable, the subscription will be reactivated with a new billing period. If - `false`: Chargify will only attempt to reactivate the - subscription. + `false`: Chargify will only attempt to reactivate the subscription. """ diff --git a/advancedbilling/models/renewal_preview.py b/advancedbilling/models/renewal_preview.py index 4353a2a7..edac3aab 100644 --- a/advancedbilling/models/renewal_preview.py +++ b/advancedbilling/models/renewal_preview.py @@ -27,8 +27,7 @@ class RenewalPreview(object): total_discount_in_cents (long|int): An integer representing the amount of the coupon discounts that will be applied to the next renewal total_in_cents (long|int): An integer representing the total amount - owed, less any discounts, that will be assessed at the next - renewal + owed, less any discounts, that will be assessed at the next renewal existing_balance_in_cents (long|int): An integer representing the amount of the subscription’s current balance total_amount_due_in_cents (long|int): An integer representing the diff --git a/advancedbilling/models/sale_rep.py b/advancedbilling/models/sale_rep.py index 745dd3a2..b1f6ca62 100644 --- a/advancedbilling/models/sale_rep.py +++ b/advancedbilling/models/sale_rep.py @@ -21,8 +21,7 @@ class SaleRep(object): full_name (str): TODO: type description here. subscriptions_count (int): TODO: type description here. test_mode (bool): TODO: type description here. - subscriptions (List[SaleRepSubscription]): TODO: type description - here. + subscriptions (List[SaleRepSubscription]): TODO: type description here. """ diff --git a/advancedbilling/models/site.py b/advancedbilling/models/site.py index d7d0c64b..9e4a690a 100644 --- a/advancedbilling/models/site.py +++ b/advancedbilling/models/site.py @@ -30,8 +30,7 @@ class Site(object): customer_hierarchy_enabled (bool): TODO: type description here. whopays_enabled (bool): TODO: type description here. whopays_default_payer (str): TODO: type description here. - allocation_settings (AllocationSettings): TODO: type description - here. + allocation_settings (AllocationSettings): TODO: type description here. default_payment_collection_method (str): TODO: type description here. organization_address (OrganizationAddress): TODO: type description here. diff --git a/advancedbilling/models/subscription.py b/advancedbilling/models/subscription.py index 256c8c5c..8796852a 100644 --- a/advancedbilling/models/subscription.py +++ b/advancedbilling/models/subscription.py @@ -158,8 +158,7 @@ class Subscription(object): product (Product): TODO: type description here. credit_card (CreditCardPaymentProfile): TODO: type description here. group (NestedSubscriptionGroup): TODO: type description here. - bank_account (BankAccountPaymentProfile): TODO: type description - here. + bank_account (BankAccountPaymentProfile): TODO: type description here. payment_type (str): The payment profile type for the active profile on file. referral_code (str): The subscription's unique code that can be given @@ -208,8 +207,7 @@ class Subscription(object): charged successfully at renewal. reference (str): The reference value (provided by your app) for the subscription itelf. - on_hold_at (datetime): The timestamp of the most recent on hold - action. + on_hold_at (datetime): The timestamp of the most recent on hold action. prepaid_dunning (bool): Boolean representing whether the subscription is prepaid and currently in dunning. Only returned for Relationship Invoicing sites with the feature enabled diff --git a/advancedbilling/models/subscription_filter.py b/advancedbilling/models/subscription_filter.py index 127e2e15..7ec68553 100644 --- a/advancedbilling/models/subscription_filter.py +++ b/advancedbilling/models/subscription_filter.py @@ -27,8 +27,7 @@ class SubscriptionFilter(object): . date_field (SubscriptionListDateField): The type of filter you'd like to apply to your search. To use this filter you also have to - include the following param in the request - `include=subscription`. + include the following param in the request `include=subscription`. start_date (date): The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) diff --git a/advancedbilling/models/subscription_group_bank_account.py b/advancedbilling/models/subscription_group_bank_account.py index 2f6eda18..7a2d61d5 100644 --- a/advancedbilling/models/subscription_group_bank_account.py +++ b/advancedbilling/models/subscription_group_bank_account.py @@ -32,8 +32,7 @@ class SubscriptionGroupBankAccount(object): bank_branch_code (str): (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided bank_account_type (BankAccountType): Defaults to checking - bank_account_holder_type (BankAccountHolderType): Defaults to - personal + bank_account_holder_type (BankAccountHolderType): Defaults to personal payment_type (PaymentType): TODO: type description here. billing_address (str): TODO: type description here. billing_city (str): TODO: type description here. diff --git a/advancedbilling/models/subscription_group_prepayment_request.py b/advancedbilling/models/subscription_group_prepayment_request.py index 5c71ef3c..990772b7 100644 --- a/advancedbilling/models/subscription_group_prepayment_request.py +++ b/advancedbilling/models/subscription_group_prepayment_request.py @@ -16,8 +16,7 @@ class SubscriptionGroupPrepaymentRequest(object): TODO: type model description here. Attributes: - prepayment (SubscriptionGroupPrepayment): TODO: type description - here. + prepayment (SubscriptionGroupPrepayment): TODO: type description here. """ diff --git a/advancedbilling/models/subscription_migration_preview_options.py b/advancedbilling/models/subscription_migration_preview_options.py index 1753b34b..eea78304 100644 --- a/advancedbilling/models/subscription_migration_preview_options.py +++ b/advancedbilling/models/subscription_migration_preview_options.py @@ -23,8 +23,7 @@ class SubscriptionMigrationPreviewOptions(object): Product Family. Note: Going to another Product Family, components will not be migrated as well. product_price_point_id (int): The ID of the specified product's price - point. This can be passed to migrate to a non-default price - point. + point. This can be passed to migrate to a non-default price point. include_trial (bool): Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be diff --git a/advancedbilling/models/subscription_migration_preview_response.py b/advancedbilling/models/subscription_migration_preview_response.py index 6b3fb493..67a0a6c2 100644 --- a/advancedbilling/models/subscription_migration_preview_response.py +++ b/advancedbilling/models/subscription_migration_preview_response.py @@ -16,8 +16,7 @@ class SubscriptionMigrationPreviewResponse(object): TODO: type model description here. Attributes: - migration (SubscriptionMigrationPreview): TODO: type description - here. + migration (SubscriptionMigrationPreview): TODO: type description here. """ diff --git a/advancedbilling/models/subscription_mrr_response.py b/advancedbilling/models/subscription_mrr_response.py index 8eff417b..a3434cdc 100644 --- a/advancedbilling/models/subscription_mrr_response.py +++ b/advancedbilling/models/subscription_mrr_response.py @@ -16,8 +16,7 @@ class SubscriptionMRRResponse(object): TODO: type model description here. Attributes: - subscriptions_mrr (List[SubscriptionMRR]): TODO: type description - here. + subscriptions_mrr (List[SubscriptionMRR]): TODO: type description here. """ diff --git a/advancedbilling/models/subscription_product_migration.py b/advancedbilling/models/subscription_product_migration.py index 2c827be5..73a61f70 100644 --- a/advancedbilling/models/subscription_product_migration.py +++ b/advancedbilling/models/subscription_product_migration.py @@ -23,8 +23,7 @@ class SubscriptionProductMigration(object): Product Family. Note: Going to another Product Family, components will not be migrated as well. product_price_point_id (int): The ID of the specified product's price - point. This can be passed to migrate to a non-default price - point. + point. This can be passed to migrate to a non-default price point. include_trial (bool): Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be diff --git a/advancedbilling/models/subscription_product_migration_request.py b/advancedbilling/models/subscription_product_migration_request.py index 670670c5..fd1e6ee2 100644 --- a/advancedbilling/models/subscription_product_migration_request.py +++ b/advancedbilling/models/subscription_product_migration_request.py @@ -16,8 +16,7 @@ class SubscriptionProductMigrationRequest(object): TODO: type model description here. Attributes: - migration (SubscriptionProductMigration): TODO: type description - here. + migration (SubscriptionProductMigration): TODO: type description here. """ diff --git a/advancedbilling/models/subscription_state.py b/advancedbilling/models/subscription_state.py index 051ef170..bbc51323 100644 --- a/advancedbilling/models/subscription_state.py +++ b/advancedbilling/models/subscription_state.py @@ -15,76 +15,74 @@ class SubscriptionState(object): The state of a subscription. * **Live States** * `active` - A normal, active subscription. It is not in a trial and - is paid and up to date. + is paid and up to date. * `assessing` - An internal (transient) state that indicates a - subscription is in the middle of periodic assessment. Do not base any - access decisions in your app on this state, as it may not always be - exposed. + subscription is in the middle of periodic assessment. Do not base any + access decisions in your app on this state, as it may not always be + exposed. * `pending` - An internal (transient) state that indicates a - subscription is in the creation process. Do not base any access - decisions in your app on this state, as it may not always be exposed. + subscription is in the creation process. Do not base any access decisions + in your app on this state, as it may not always be exposed. * `trialing` - A subscription in trialing state has a valid trial - subscription. This type of subscription may transition to active once - payment is received when the trial has ended. Otherwise, it may go to - a Problem or End of Life state. + subscription. This type of subscription may transition to active once + payment is received when the trial has ended. Otherwise, it may go to a + Problem or End of Life state. * `paused` - An internal state that indicates that your account with - Advanced Billing is in arrears. + Advanced Billing is in arrears. * **Problem States** * `past_due` - Indicates that the most recent payment has failed, and - payment is past due for this subscription. If you have enabled our - automated dunning, this subscription will be in the dunning process - (additional status and callbacks from the dunning process will be - available in the future). If you are handling dunning and payment - updates yourself, you will want to use this state to initiate a - payment update from your customers. + payment is past due for this subscription. If you have enabled our + automated dunning, this subscription will be in the dunning process + (additional status and callbacks from the dunning process will be + available in the future). If you are handling dunning and payment updates + yourself, you will want to use this state to initiate a payment update + from your customers. * `soft_failure` - Indicates that normal assessment/processing of the - subscription has failed for a reason that cannot be fixed by the - Customer. For example, a Soft Fail may result from a timeout at the - gateway or incorrect credentials on your part. The subscriptions - should be retried automatically. An interface is being built for you - to review problems resulting from these events to take manual action - when needed. + subscription has failed for a reason that cannot be fixed by the Customer. + For example, a Soft Fail may result from a timeout at the gateway or + incorrect credentials on your part. The subscriptions should be retried + automatically. An interface is being built for you to review problems + resulting from these events to take manual action when needed. * `unpaid` - Indicates an unpaid subscription. A subscription is - marked unpaid if the retry period expires and you have configured your - [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Du - nning-Overview) settings to have a Final Action of `mark the - subscription unpaid`. + marked unpaid if the retry period expires and you have configured your + [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunnin + g-Overview) settings to have a Final Action of `mark the subscription + unpaid`. * **End of Life States** * `canceled` - Indicates a canceled subscription. This may happen at - your request (via the API or the web interface) or due to the - expiration of the - [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Du - nning-Overview) process without payment. See the - [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/242521095036 - 29-Reactivating-and-Resuming) documentation for info on how to restart - a canceled subscription. + your request (via the API or the web interface) or due to the expiration + of the + [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunnin + g-Overview) process without payment. See the + [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-R + eactivating-and-Resuming) documentation for info on how to restart a + canceled subscription. While a subscription is canceled, its period will not advance, it will - not accrue any new charges, and Advanced Billing will not attempt to - collect the overdue balance. + not accrue any new charges, and Advanced Billing will not attempt to + collect the overdue balance. * `expired` - Indicates a subscription that has expired due to running - its normal life cycle. Some products may be configured to have an - expiration period. An expired subscription then is one that stayed - active until it fulfilled its full period. + its normal life cycle. Some products may be configured to have an + expiration period. An expired subscription then is one that stayed active + until it fulfilled its full period. * `failed_to_create` - Indicates that signup has failed. (You may see - this state in a signup_failure webhook.) + this state in a signup_failure webhook.) * `on_hold` - Indicates that a subscription’s billing has been - temporarily stopped. While it is expected that the subscription will - resume and return to active status, this is still treated as an “End - of Life” state because the customer is not paying for services during - this time. + temporarily stopped. While it is expected that the subscription will + resume and return to active status, this is still treated as an “End of + Life” state because the customer is not paying for services during this + time. * `suspended` - Indicates that a prepaid subscription has used up all - their prepayment balance. If a prepayment is applied, it will return - to an active state. + their prepayment balance. If a prepayment is applied, it will return to an + active state. * `trial_ended` - A subscription in a trial_ended state is a - subscription that completed a no-obligation trial and did not have a - card on file at the expiration of the trial period. See [Product - Pricing – No Obligation - Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Prod - uct-Editing) for more details. + subscription that completed a no-obligation trial and did not have a card + on file at the expiration of the trial period. See [Product Pricing – No + Obligation + Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product- + Editing) for more details. See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscrip - tion-States) for more info about subscription states and state - transitions. + tion-States) for more info about subscription states and state transitions. Attributes: PENDING: TODO: type description here. diff --git a/advancedbilling/models/update_metafield.py b/advancedbilling/models/update_metafield.py index 1cea1cb2..2dadf71c 100644 --- a/advancedbilling/models/update_metafield.py +++ b/advancedbilling/models/update_metafield.py @@ -28,8 +28,7 @@ class UpdateMetafield(object): hand, dropdown and radio have a set of allowed values that can be input, and appear differently on a Public Signup Page. Defaults to 'text' - enum (List[str]): Only applicable when input_type is radio or - dropdown + enum (List[str]): Only applicable when input_type is radio or dropdown """ diff --git a/advancedbilling/models/update_segment.py b/advancedbilling/models/update_segment.py index bdd79707..f3d8e9b5 100644 --- a/advancedbilling/models/update_segment.py +++ b/advancedbilling/models/update_segment.py @@ -21,8 +21,7 @@ class UpdateSegment(object): See [Product Components](https://help.chargify.com/products/product-components.h tml) for an overview of pricing schemes. - prices (List[CreateOrUpdateSegmentPrice]): TODO: type description - here. + prices (List[CreateOrUpdateSegmentPrice]): TODO: type description here. """ diff --git a/advancedbilling/models/update_subscription.py b/advancedbilling/models/update_subscription.py index 96cae80f..cd2f48e7 100644 --- a/advancedbilling/models/update_subscription.py +++ b/advancedbilling/models/update_subscription.py @@ -48,6 +48,10 @@ class UpdateSubscription(object): `dunning_communication_delay_time_zone` attribute. dunning_communication_delay_time_zone (str): Time zone for the Dunning Communication Delay feature. + product_price_point_id (int): Set to change the current product's + price point. + product_price_point_handle (str): Set to change the current product's + price point. """ @@ -69,7 +73,9 @@ class UpdateSubscription(object): "custom_price": 'custom_price', "components": 'components', "dunning_communication_delay_enabled": 'dunning_communication_delay_enabled', - "dunning_communication_delay_time_zone": 'dunning_communication_delay_time_zone' + "dunning_communication_delay_time_zone": 'dunning_communication_delay_time_zone', + "product_price_point_id": 'product_price_point_id', + "product_price_point_handle": 'product_price_point_handle' } _optionals = [ @@ -90,6 +96,8 @@ class UpdateSubscription(object): 'components', 'dunning_communication_delay_enabled', 'dunning_communication_delay_time_zone', + 'product_price_point_id', + 'product_price_point_handle', ] _nullables = [ @@ -115,6 +123,8 @@ def __init__(self, components=APIHelper.SKIP, dunning_communication_delay_enabled=APIHelper.SKIP, dunning_communication_delay_time_zone=APIHelper.SKIP, + product_price_point_id=APIHelper.SKIP, + product_price_point_handle=APIHelper.SKIP, additional_properties={}): """Constructor for the UpdateSubscription class""" @@ -153,6 +163,10 @@ def __init__(self, self.dunning_communication_delay_enabled = dunning_communication_delay_enabled if dunning_communication_delay_time_zone is not APIHelper.SKIP: self.dunning_communication_delay_time_zone = dunning_communication_delay_time_zone + if product_price_point_id is not APIHelper.SKIP: + self.product_price_point_id = product_price_point_id + if product_price_point_handle is not APIHelper.SKIP: + self.product_price_point_handle = product_price_point_handle # Add additional model properties to the instance self.additional_properties = additional_properties @@ -198,6 +212,8 @@ def from_dictionary(cls, components = APIHelper.SKIP dunning_communication_delay_enabled = dictionary.get("dunning_communication_delay_enabled") if "dunning_communication_delay_enabled" in dictionary.keys() else APIHelper.SKIP dunning_communication_delay_time_zone = dictionary.get("dunning_communication_delay_time_zone") if "dunning_communication_delay_time_zone" in dictionary.keys() else APIHelper.SKIP + product_price_point_id = dictionary.get("product_price_point_id") if dictionary.get("product_price_point_id") else APIHelper.SKIP + product_price_point_handle = dictionary.get("product_price_point_handle") if dictionary.get("product_price_point_handle") else APIHelper.SKIP # Clean out expected properties from dictionary for key in cls._names.values(): if key in dictionary: @@ -220,4 +236,6 @@ def from_dictionary(cls, components, dunning_communication_delay_enabled, dunning_communication_delay_time_zone, + product_price_point_id, + product_price_point_handle, dictionary) diff --git a/advancedbilling/models/void_invoice_event_data.py b/advancedbilling/models/void_invoice_event_data.py index bef6bb54..70cc75ce 100644 --- a/advancedbilling/models/void_invoice_event_data.py +++ b/advancedbilling/models/void_invoice_event_data.py @@ -22,8 +22,7 @@ class VoidInvoiceEventData(object): applied_amount (str): The amount of the void. transaction_time (datetime): The time the refund was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" - is_advance_invoice (bool): If true, the invoice is an advance - invoice. + is_advance_invoice (bool): If true, the invoice is an advance invoice. reason (str): The reason for the void. """ diff --git a/doc/models/create-invoice-payment.md b/doc/models/create-invoice-payment.md index 86acd040..537b1e02 100644 --- a/doc/models/create-invoice-payment.md +++ b/doc/models/create-invoice-payment.md @@ -10,10 +10,11 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount` | str \| float \| None | Optional | This is a container for one-of cases. | -| `memo` | `str` | Optional | A description to be attached to the payment. | +| `memo` | `str` | Optional | A description to be attached to the payment. Applicable only to `external` payments. | | `method` | [`InvoicePaymentMethodType`](../../doc/models/invoice-payment-method-type.md) | Optional | The type of payment method used. Defaults to other. | -| `details` | `str` | Optional | Additional information related to the payment method (eg. Check #) | +| `details` | `str` | Optional | Additional information related to the payment method (eg. Check #). Applicable only to `external` payments. | | `payment_profile_id` | `int` | Optional | The ID of the payment profile to be used for the payment. | +| `received_on` | `date` | Optional | Date reflecting when the payment was received from a customer. Must be in the past. Applicable only to
`external` payments. | ## Example (as JSON) diff --git a/doc/models/customer-attributes.md b/doc/models/customer-attributes.md index 2052deed..3f793681 100644 --- a/doc/models/customer-attributes.md +++ b/doc/models/customer-attributes.md @@ -28,6 +28,7 @@ | `metafields` | `Dict[str, str]` | Optional | (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet. | | `parent_id` | `int` | Optional | The parent ID in Chargify if applicable. Parent is another Customer object. | | `salesforce_id` | `str` | Optional | (Optional) The Salesforce ID of the customer. | +| `default_auto_renewal_profile_id` | `int` | Optional | (Optional) The default auto-renewal profile ID for the customer | ## Example (as JSON) diff --git a/doc/models/customer.md b/doc/models/customer.md index 937a4739..89a98fcf 100644 --- a/doc/models/customer.md +++ b/doc/models/customer.md @@ -27,7 +27,7 @@ | `country` | `str` | Optional | The customer shipping address country | | `country_name` | `str` | Optional | The customer's full name of country | | `phone` | `str` | Optional | The phone number of the customer | -| `verified` | `bool` | Optional | Is the customer verified to use ACH as a payment method. Available only on Authorize.Net gateway | +| `verified` | `bool` | Optional | Is the customer verified to use ACH as a payment method. | | `portal_customer_created_at` | `datetime` | Optional | The timestamp of when the Billing Portal entry was created at for the customer | | `portal_invite_last_sent_at` | `datetime` | Optional | The timestamp of when the Billing Portal invite was last sent at | | `portal_invite_last_accepted_at` | `datetime` | Optional | The timestamp of when the Billing Portal invite was last accepted | @@ -37,6 +37,8 @@ | `locale` | `str` | Optional | The locale for the customer to identify language-region | | `default_subscription_group_uid` | `str` | Optional | - | | `salesforce_id` | `str` | Optional | The Salesforce ID for the customer | +| `tax_exempt_reason` | `str` | Optional | The Tax Exemption Reason Code for the customer | +| `default_auto_renewal_profile_id` | `int` | Optional | The default auto-renewal profile ID for the customer | ## Example (as JSON) diff --git a/doc/models/invoice-payment.md b/doc/models/invoice-payment.md index fa204fff..414155c1 100644 --- a/doc/models/invoice-payment.md +++ b/doc/models/invoice-payment.md @@ -19,6 +19,8 @@ | `gateway_handle` | `str` | Optional | - | | `gateway_used` | `str` | Optional | - | | `gateway_transaction_id` | `str` | Optional | The transaction ID for the payment as returned from the payment gateway | +| `received_on` | `date` | Optional | Date reflecting when the payment was received from a customer. Must be in the past. Applicable only to
`external` payments. | +| `uid` | `str` | Optional | - | ## Example (as JSON) diff --git a/doc/models/update-subscription.md b/doc/models/update-subscription.md index bf42c78d..928ac7b8 100644 --- a/doc/models/update-subscription.md +++ b/doc/models/update-subscription.md @@ -26,6 +26,8 @@ | `components` | [`List[UpdateSubscriptionComponent]`](../../doc/models/update-subscription-component.md) | Optional | (Optional) An array of component ids and custom prices to be added to the subscription. | | `dunning_communication_delay_enabled` | `bool` | Optional | Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute. | | `dunning_communication_delay_time_zone` | `str` | Optional | Time zone for the Dunning Communication Delay feature. | +| `product_price_point_id` | `int` | Optional | Set to change the current product's price point. | +| `product_price_point_handle` | `str` | Optional | Set to change the current product's price point. | ## Example (as JSON) diff --git a/pyproject.toml b/pyproject.toml index 28fb7e70..c4883e38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = ["setuptools>=61.0"] [project] name = "maxio-advanced-billing-sdk" description = "Ultimate billing and pricing flexibility for B2B SaaS.\nMaxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments." -version = "5.1.0" +version = "5.2.0" readme = "README.md" requires-python = ">=3.7" keywords = ["Maxio", "Advaced Billing", "Payments", "Subscription"]