diff --git a/README.md b/README.md index 0abd96b..ce65978 100644 --- a/README.md +++ b/README.md @@ -29,16 +29,16 @@ curl -u :x -H Accept:application/json -H Content-Type:application/json Install the gem from the command line: ```bash -gem install maxio-advanced-billing-sdk -v 9.0.0 +gem install maxio-advanced-billing-sdk -v 9.1.0 ``` Or add the gem to your Gemfile and run `bundle`: ```ruby -gem 'maxio-advanced-billing-sdk', '9.0.0' +gem 'maxio-advanced-billing-sdk', '9.1.0' ``` -For additional gem details, see the [RubyGems page for the maxio-advanced-billing-sdk gem](https://rubygems.org/gems/maxio-advanced-billing-sdk/versions/9.0.0). +For additional gem details, see the [RubyGems page for the maxio-advanced-billing-sdk gem](https://rubygems.org/gems/maxio-advanced-billing-sdk/versions/9.1.0). ## IRB Console Usage @@ -77,14 +77,14 @@ ruby bin/console ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/client.md) The following parameters are configurable for the API Client: | Parameter | Type | Description | | --- | --- | --- | | site | `String` | The subdomain for your Advanced Billing site.
*Default*: `'subdomain'` | -| environment | [`Environment`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/README.md#environments) | The API environment.
**Default: `Environment.US`** | +| environment | [`Environment`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/README.md#environments) | The API environment.
**Default: `Environment.US`** | | connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests | | adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests | | timeout | `Float` | The value to use for connection timeout.
**Default: 120** | @@ -94,8 +94,8 @@ The following parameters are configurable for the API Client: | retry_statuses | `Array` | A list of HTTP statuses to retry.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | | retry_methods | `Array` | A list of HTTP methods to retry.
**Default: %i[get put]** | | http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. | -| proxy_settings | [`ProxySettings`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. | -| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication | +| proxy_settings | [`ProxySettings`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. | +| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication | The API client can be initialized as follows: @@ -125,7 +125,7 @@ include AdvancedBilling client = Client.from_env ``` -See the [`Environment-Based Client Initialization`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/environment-based-client-initialization.md) section for details. +See the [`Environment-Based Client Initialization`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/environment-based-client-initialization.md) section for details. ## Environments @@ -142,58 +142,58 @@ 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-ruby-sdk/tree/9.0.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/subscription-products.md) -* [Subscription Renewals](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/subscription-renewals.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-products.md) +* [Subscription Renewals](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-renewals.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/webhooks.md) ## SDK Infrastructure ### Configuration -* [ProxySettings](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/proxy-settings.md) -* [Environment-Based Client Initialization](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/environment-based-client-initialization.md) +* [ProxySettings](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/proxy-settings.md) +* [Environment-Based Client Initialization](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/environment-based-client-initialization.md) ### HTTP -* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/http-response.md) -* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/http-request.md) +* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/http-response.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/http-request.md) ### Utilities -* [ApiHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/api-helper.md) -* [DateTimeHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.0.0/doc/date-time-helper.md) +* [ApiHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/api-helper.md) +* [DateTimeHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/date-time-helper.md) diff --git a/advanced_billing.gemspec b/advanced_billing.gemspec index 6b29f57..7376f42 100644 --- a/advanced_billing.gemspec +++ b/advanced_billing.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'maxio-advanced-billing-sdk' - s.version = '9.0.0' + s.version = '9.1.0' s.summary = 'SDK for Maxio Advanced Billing' s.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." s.authors = ['Maxio SDK'] diff --git a/doc/controllers/advance-invoice.md b/doc/controllers/advance-invoice.md index e8d5789..201c712 100644 --- a/doc/controllers/advance-invoice.md +++ b/doc/controllers/advance-invoice.md @@ -17,7 +17,7 @@ advance_invoice_controller = client.advance_invoice # Issue Advance Invoice -Generate an invoice in advance for a subscription's next renewal date. [See our docs](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance) for more information on advance invoices, including eligibility on generating one; for the most part, they function like any other invoice, except they are issued early and have special behavior upon being voided. +Generate an invoice in advance for a subscription's next renewal date. [See our docs](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance) for more information on advance invoices, including eligibility for generating one; for the most part, they function like any other invoice, except they are issued early and have special behavior upon being voided. A subscription may only have one advance invoice per billing period. Attempting to issue an advance invoice when one already exists will return an error. That said, regeneration of the invoice may be forced with the params `force: true`, which will void an advance invoice if one exists and generate a new one. If no advance invoice exists, a new one will be generated. We recommend using either the create or preview endpoints for proforma invoices to preview this advance invoice before using this endpoint to generate it. @@ -27,6 +27,10 @@ def issue_advance_invoice(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -36,6 +40,8 @@ def issue_advance_invoice(subscription_id, ## Response Type +**201**: Created + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -64,12 +70,16 @@ puts result # Read Advance Invoice -Once an advance invoice has been generated for a subscription's upcoming renewal, it can be viewed through this endpoint. There can only be one advance invoice per subscription per billing cycle. +Returns the advance invoice generated for a subscription's upcoming renewal. There can only be one advance invoice per subscription per billing cycle. ```ruby def read_advance_invoice(subscription_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -78,6 +88,8 @@ def read_advance_invoice(subscription_id) ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -106,6 +118,10 @@ def void_advance_invoice(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -115,6 +131,8 @@ def void_advance_invoice(subscription_id, ## Response Type +**201**: Created + [`Invoice`](../../doc/models/invoice.md) ## Example Usage diff --git a/doc/controllers/api-exports.md b/doc/controllers/api-exports.md index aa97dad..26f89c8 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -23,7 +23,7 @@ api_exports_controller = client.api_exports # List Exported Proforma Invoices -This API returns an array of exported proforma invoices for a provided `batch_id`. Pay close attention to pagination in order to control responses from the server. +Lists exported proforma invoices for a provided `batch_id`. Use pagination to control responses returned from the server. Example: `GET https://{subdomain}.chargify.com/api_exports/proforma_invoices/123/rows?per_page=10000&page=1`. @@ -31,6 +31,10 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/proforma_invoices/123 def list_exported_proforma_invoices(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -41,6 +45,8 @@ def list_exported_proforma_invoices(options = {}) ## Response Type +**200**: OK + [`Array[ProformaInvoice]`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -65,7 +71,7 @@ puts result # List Exported Invoices -This API returns an array of exported invoices for a provided `batch_id`. Pay close attention to pagination in order to control responses from the server. +Lists exported invoices for a provided `batch_id`. Use pagination to control responses returned from the server. Example: `GET https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per_page=10000&page=1`. @@ -73,6 +79,10 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per def list_exported_invoices(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -83,6 +93,8 @@ def list_exported_invoices(options = {}) ## Response Type +**200**: OK + [`Array[Invoice]`](../../doc/models/invoice.md) ## Example Usage @@ -107,7 +119,7 @@ puts result # List Exported Subscriptions -This API returns an array of exported subscriptions for a provided `batch_id`. Pay close attention to pagination in order to control responses from the server. +Lists exported subscriptions for a provided `batch_id`. Use pagination to control responses returned from the server. Example: `GET https://{subdomain}.chargify.com/api_exports/subscriptions/123/rows?per_page=200&page=1`. @@ -115,6 +127,10 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/subscriptions/123/row def list_exported_subscriptions(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -125,6 +141,8 @@ def list_exported_subscriptions(options = {}) ## Response Type +**200**: OK + [`Array[Subscription]`](../../doc/models/subscription.md) ## Example Usage @@ -149,7 +167,7 @@ puts result # Export Proforma Invoices -This API creates a proforma invoices export and returns a batchjob object. +Creates a proforma invoices export and returns a batch job object. It is only available for Relationship Invoicing architecture. @@ -157,8 +175,14 @@ It is only available for Relationship Invoicing architecture. def export_proforma_invoices ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**201**: Created + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -178,14 +202,20 @@ puts result # Export Invoices -This API creates an invoices export and returns a batchjob object. +Creates an invoices export and returns a batch job object. ```ruby def export_invoices ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**201**: Created + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -205,14 +235,20 @@ puts result # Export Subscriptions -This API creates a subscriptions export and returns a batchjob object. +Creates a subscriptions export and returns a batch job object. ```ruby def export_subscriptions ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**201**: Created + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -231,12 +267,16 @@ puts result # Read Proforma Invoices Export -This API returns a batchjob object for proforma invoices export. +Returns a batch job object for a proforma invoices export. ```ruby def read_proforma_invoices_export(batch_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -245,6 +285,8 @@ def read_proforma_invoices_export(batch_id) ## Response Type +**200**: OK + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -265,12 +307,16 @@ puts result # Read Invoices Export -This API returns a batchjob object for invoices export. +Returns a batch job object for an invoices export. ```ruby def read_invoices_export(batch_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -279,6 +325,8 @@ def read_invoices_export(batch_id) ## Response Type +**200**: OK + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -299,12 +347,16 @@ puts result # Read Subscriptions Export -This API returns a batchjob object for subscriptions export. +Returns a batch job object for a subscriptions export. ```ruby def read_subscriptions_export(batch_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -313,6 +365,8 @@ def read_subscriptions_export(batch_id) ## Response Type +**200**: OK + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage diff --git a/doc/controllers/billing-portal.md b/doc/controllers/billing-portal.md index 54b0a94..8d9c8e8 100644 --- a/doc/controllers/billing-portal.md +++ b/doc/controllers/billing-portal.md @@ -18,11 +18,13 @@ billing_portal_controller = client.billing_portal # Enable Billing Portal for Customer +Enables Billing Portal access for a customer, with an option to send an invitation email at the same time. + ## Billing Portal Documentation Full documentation on how the Billing Portal operates within the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24252412965133-Billing-Portal-Overview). -This documentation is focused on how the to configure the Billing Portal Settings, as well as Subscriber Interaction and Merchant Management of the Billing Portal. +This documentation is focused on how to configure the Billing Portal Settings, as well as Subscriber Interaction and Merchant Management of the Billing Portal. You can use this endpoint to enable Billing Portal access for a Customer, with the option of sending the Customer an Invitation email at the same time. @@ -39,6 +41,10 @@ def enable_billing_portal_for_customer(customer_id, auto_invite: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -48,6 +54,8 @@ def enable_billing_portal_for_customer(customer_id, ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -68,7 +76,7 @@ puts result # Read Billing Portal Link -This method will provide to the API user the exact URL required for a subscriber to access the Billing Portal. +Returns the exact URL required for a subscriber to access the Billing Portal. ## Rules for Management Link API @@ -82,6 +90,10 @@ This method will provide to the API user the exact URL required for a subscriber def read_billing_portal_link(customer_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -90,6 +102,8 @@ def read_billing_portal_link(customer_id) ## Response Type +**200**: OK + [`PortalManagementLink`](../../doc/models/portal-management-link.md) ## Example Usage @@ -124,15 +138,13 @@ puts result # Resend Billing Portal Invitation -You can resend a customer's Billing Portal invitation. +Resends a customer's Billing Portal invitation. -If you attempt to resend an invitation 5 times within 30 minutes, you will receive a `422` response with `error` message in the body. +If you attempt to resend an invitation 5 times within 30 minutes, you will receive a `422` response with an `error` message in the body. If you attempt to resend an invitation when the Billing Portal is already disabled for a Customer, you will receive a `422` error response. -If you attempt to resend an invitation when the Billing Portal is already disabled for a Customer, you will receive a `422` error response. - -If you attempt to resend an invitation when the Customer does not exist a Customer, you will receive a `404` error response. +If you attempt to resend an invitation when the Customer does not exist, you will receive a `404` error response. ## Limitations @@ -142,6 +154,10 @@ This endpoint will only return a JSON response. def resend_billing_portal_invitation(customer_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -150,6 +166,8 @@ def resend_billing_portal_invitation(customer_id) ## Response Type +**200**: OK + [`ResentInvitation`](../../doc/models/resent-invitation.md) ## Example Usage @@ -182,7 +200,7 @@ puts result # Revoke Billing Portal Access -You can revoke a customer's Billing Portal invitation. +Revokes 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. @@ -194,6 +212,10 @@ This endpoint will only return a JSON response. def revoke_billing_portal_access(customer_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -202,6 +224,8 @@ def revoke_billing_portal_access(customer_id) ## Response Type +**200**: OK + [`RevokedInvitation`](../../doc/models/revoked-invitation.md) ## Example Usage diff --git a/doc/controllers/component-price-points.md b/doc/controllers/component-price-points.md index c2a787c..5c90b46 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -37,6 +37,10 @@ def promote_component_price_point_to_default(component_id, price_point_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -46,6 +50,8 @@ def promote_component_price_point_to_default(component_id, ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -105,6 +111,10 @@ def create_component_price_point(component_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -114,6 +124,8 @@ def create_component_price_point(component_id, ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -158,7 +170,7 @@ puts result # List Component Price Points -Use this endpoint to read current price points that are associated with a component. +Lists the price points associated with a component. You may specify the component by using either the numeric id or the `handle:gold` syntax. @@ -170,6 +182,10 @@ If the price point is set to `use_site_exchange_rate: true`, it will return pric def list_component_price_points(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -182,6 +198,8 @@ def list_component_price_points(options = {}) ## Response Type +**201**: Created + [`ComponentPricePointsResponse`](../../doc/models/component-price-points-response.md) ## Example Usage @@ -250,13 +268,17 @@ puts result # Bulk Create Component Price Points -Use this endpoint to create multiple component price points in one request. +Creates multiple component price points in one request. ```ruby def bulk_create_component_price_points(component_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -266,6 +288,8 @@ def bulk_create_component_price_points(component_id, ## Response Type +**200**: OK + [`ComponentPricePointsResponse`](../../doc/models/component-price-points-response.md) ## Example Usage @@ -392,6 +416,10 @@ def clone_component_price_point(component_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -402,6 +430,8 @@ def clone_component_price_point(component_id, ## Response Type +**201**: Created + [`ComponentPricePointCurrencyOverageResponse`](../../doc/models/component-price-point-currency-overage-response.md) ## Example Usage @@ -507,7 +537,7 @@ puts result # Update Component Price Point -When updating a price point, prices can be updated as well by creating new prices or editing / removing existing ones. +Updates a component price point and its associated prices. Passing in a price bracket without an `id` will attempt to create a new price. @@ -521,6 +551,10 @@ def update_component_price_point(component_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -531,6 +565,8 @@ def update_component_price_point(component_id, ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -578,7 +614,7 @@ puts result # Read Component Price Point -Use this endpoint to retrieve details for a specific component price point. You can achieve this by using either the component price point ID or handle. +Returns details for a specific component price point. You can achieve this by using either the component price point ID or handle. ```ruby def read_component_price_point(component_id, @@ -586,6 +622,10 @@ def read_component_price_point(component_id, currency_prices: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -596,6 +636,8 @@ def read_component_price_point(component_id, ## Response Type +**200**: OK + [`ComponentPricePointCurrencyOverageResponse`](../../doc/models/component-price-point-currency-overage-response.md) ## Example Usage @@ -615,13 +657,17 @@ puts result # Archive Component Price Point -A price point can be archived at any time. Subscriptions using a price point that has been archived will continue using it until they're moved to another price point. +Archives a component price point. Subscriptions using a price point that has been archived will continue using it until they're moved to another price point. ```ruby def archive_component_price_point(component_id, price_point_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -631,6 +677,8 @@ def archive_component_price_point(component_id, ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -690,13 +738,17 @@ puts result # Unarchive Component Price Point -Use this endpoint to unarchive a component price point. +Unarchives a component price point. ```ruby def unarchive_component_price_point(component_id, price_point_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -706,6 +758,8 @@ def unarchive_component_price_point(component_id, ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -759,7 +813,7 @@ puts result # Create Currency Prices -This endpoint allows you to create currency prices for a given currency that has been defined on the site level in your settings. +Creates currency prices for a given currency defined at the site level. When creating currency prices, they need to mirror the structure of your primary pricing. For each price level defined on the component price point, there should be a matching price level created in the given currency. @@ -770,6 +824,10 @@ def create_currency_prices(price_point_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -779,6 +837,8 @@ def create_currency_prices(price_point_id, ## Response Type +**200**: OK + [`ComponentCurrencyPricesResponse`](../../doc/models/component-currency-prices-response.md) ## Example Usage @@ -834,7 +894,7 @@ puts result # Update Currency Prices -This endpoint allows you to update currency prices for a given currency that has been defined on the site level in your settings. +Updates currency prices for a given currency defined at the site level. Note: Currency Prices are not able to be updated for custom price points. @@ -843,6 +903,10 @@ def update_currency_prices(price_point_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -852,6 +916,8 @@ def update_currency_prices(price_point_id, ## Response Type +**200**: OK + [`ComponentCurrencyPricesResponse`](../../doc/models/component-currency-prices-response.md) ## Example Usage @@ -905,12 +971,16 @@ puts result # List All Component Price Points -This method allows to retrieve a list of Components Price Points belonging to a Site. +Lists all component price points belonging to a site. ```ruby def list_all_component_price_points(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -923,6 +993,8 @@ def list_all_component_price_points(options = {}) ## Response Type +**200**: OK + [`ListComponentsPricePointsResponse`](../../doc/models/list-components-price-points-response.md) ## Example Usage diff --git a/doc/controllers/components.md b/doc/controllers/components.md index 2d8a4c1..8cd13e4 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -12,7 +12,7 @@ components_controller = client.components * [Create Metered Component](../../doc/controllers/components.md#create-metered-component) * [Create Quantity Based Component](../../doc/controllers/components.md#create-quantity-based-component) -* [Create on Off Component](../../doc/controllers/components.md#create-on-off-component) +* [Create On Off Component](../../doc/controllers/components.md#create-on-off-component) * [Create Prepaid Usage Component](../../doc/controllers/components.md#create-prepaid-usage-component) * [Create Event Based Component](../../doc/controllers/components.md#create-event-based-component) * [Find Component](../../doc/controllers/components.md#find-component) @@ -26,9 +26,9 @@ components_controller = client.components # Create Metered Component -This request will create a component definition of kind **metered_component** under the specified product family. Metered component can then be added and “allocated” for a subscription. +Creates a metered component definition under the specified product family. A metered component can then be added and “allocated” for a subscription. -Metered components are used to bill for any type of unit that resets to 0 at the end of the billing period (think daily Google Adwords clicks or monthly cell phone minutes). This is most commonly associated with usage-based billing and many other pricing schemes. +Metered components are used to bill for any type of unit that resets to 0 at the end of the billing period (think daily Google Ads clicks or monthly cell phone minutes). This is most commonly associated with usage-based billing and many other pricing schemes. Note that this is different from recurring quantity-based components, which DO NOT reset to zero at the start of every billing period. If you want to bill for a quantity of something that does not change unless you change it, then you want quantity components, instead. @@ -39,6 +39,10 @@ def create_metered_component(product_family_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -48,6 +52,8 @@ def create_metered_component(product_family_id, ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -137,9 +143,9 @@ puts result # Create Quantity Based Component -This request will create a component definition of kind **quantity_based_component** under the specified product family. Quantity Based component can then be added and “allocated” for a subscription. +Creates a Quantity Based component definition under the specified product family. A 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 a Quantity Based component, you can choose one of 2 types: #### Recurring @@ -158,6 +164,10 @@ def create_quantity_based_component(product_family_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -167,6 +177,8 @@ def create_quantity_based_component(product_family_id, ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -255,9 +267,9 @@ puts result | 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | -# Create on Off Component +# Create On Off Component -This request will create a component definition of kind **on_off_component** under the specified product family. On/Off component can then be added and “allocated” for a subscription. +Creates an On/Off component definition under the specified product family. An On/Off component can then be added and “allocated” for a subscription. On/off components are used for any flat fee, recurring add on (think $99/month for tech support or a flat add on shipping fee). @@ -268,6 +280,10 @@ def create_on_off_component(product_family_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -277,6 +293,8 @@ def create_on_off_component(product_family_id, ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -352,7 +370,7 @@ puts result # Create Prepaid Usage Component -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. +Creates a prepaid usage component definition under the specified product family. A 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 the end of the period for the amount of units used, prepaid components are charged for at the time of purchase, and we subsequently keep track of the usage against the amount purchased. @@ -363,6 +381,10 @@ def create_prepaid_usage_component(product_family_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -372,6 +394,8 @@ def create_prepaid_usage_component(product_family_id, ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -485,7 +509,7 @@ puts result # Create Event Based Component -This request will create a component definition of kind **event_based_component** under the specified product family. Event-based component can then be added and “allocated” for a subscription. +Creates an event-based component definition under the specified product family. An event-based component can then be added and “allocated” for a subscription. Event-based components are similar to other component types, in that you define the component parameters (such as name and taxability) and the pricing. A key difference for the event-based component is that it must be attached to a metric. This is because the metric provides the component with the actual quantity used in computing what and how much will be billed each period for each subscription. @@ -498,6 +522,10 @@ def create_event_based_component(product_family_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -507,6 +535,8 @@ def create_event_based_component(product_family_id, ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -588,12 +618,16 @@ puts result # Find Component -This request will return information regarding a component having the handle you provide. You can identify your components with a handle so you don't have to save or reference the IDs we generate. +Returns information for a component matching the provided handle. You can identify your components with a handle so you don't have to save or reference the IDs we generate. ```ruby def find_component(handle) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -602,6 +636,8 @@ def find_component(handle) ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -655,6 +691,10 @@ def read_component(product_family_id, component_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -664,6 +704,8 @@ def read_component(product_family_id, ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -714,7 +756,7 @@ puts result # Update Product Family Component -This request will update a component from a specific product family. +Updates a component from a specific product family. You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. @@ -724,6 +766,10 @@ def update_product_family_component(product_family_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -734,6 +780,8 @@ def update_product_family_component(product_family_id, ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -796,13 +844,17 @@ puts result # Archive Component -Sending a DELETE request to this endpoint will archive the component. All current subscribers will be unffected; their subscription/purchase will continue to be charged as usual. +Archives the component; all current subscribers will continue to be charged as usual. ```ruby def archive_component(product_family_id, component_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -812,6 +864,8 @@ def archive_component(product_family_id, ## Response Type +**200**: OK + [`Component`](../../doc/models/component.md) ## Example Usage @@ -863,12 +917,16 @@ puts result # List Components -This request will return a list of components for a site. +Lists components for a site. ```ruby def list_components(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -885,6 +943,8 @@ def list_components(options = {}) ## Response Type +**200**: OK + [`Array[ComponentResponse]`](../../doc/models/component-response.md) ## Example Usage @@ -1009,7 +1069,7 @@ puts result # Update Component -This request will update a component. +Updates a component. You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. @@ -1018,6 +1078,10 @@ def update_component(component_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1027,6 +1091,8 @@ def update_component(component_id, ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -1086,12 +1152,16 @@ puts result # List Components for Product Family -This request will return a list of components for a particular product family. +Lists components for a particular product family. ```ruby def list_components_for_product_family(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1109,6 +1179,8 @@ def list_components_for_product_family(options = {}) ## Response Type +**200**: OK + [`Array[ComponentResponse]`](../../doc/models/component-response.md) ## Example Usage diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index 38e04b1..769e65f 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -28,26 +28,25 @@ coupons_controller = client.coupons # Create Coupon -## Coupons Documentation - -Coupons can be administered in the Advanced Billing application or created via API. View our section on [creating coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Creating-Editing-Deleting-Coupons) for more information. - -Additionally, for documentation on how to apply a coupon to a subscription within the Advanced Billing UI, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions). - -## Create Coupon - -This request will create a coupon, based on the provided information. - -You can create either a flat amount coupon, by specyfing `amount_in_cents`, or percentage coupon by specyfing `percentage`. +Creates a coupon under the specified product family. +You can create either a flat amount coupon by specifying amount_in_cents, or a percentage coupon by specifying percentage You can restrict a coupon to only apply to specific products / components by optionally passing in `restricted_products` and/or `restricted_components` objects in the format: `{ "": boolean_value }` +Coupons can be administered in the Advanced Billing application or created via API. See [creating coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Creating-Editing-Deleting-Coupons) for more information. + +See [Apply Coupons to Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions) for information on applying a coupon to a subscription in the Advanced Billing UI. + ```ruby def create_coupon(product_family_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -57,6 +56,8 @@ def create_coupon(product_family_id, ## Response Type +**201**: Created + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -104,12 +105,16 @@ puts result # List Coupons for Product Family -List coupons for a specific Product Family in a Site. +Lists coupons for a specific product family in a site. ```ruby def list_coupons_for_product_family(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -122,6 +127,8 @@ def list_coupons_for_product_family(options = {}) ## Response Type +**200**: OK + [`Array[CouponResponse]`](../../doc/models/coupon-response.md) ## Example Usage @@ -247,7 +254,7 @@ puts result # Find Coupon -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. +Searches for a coupon by code, returning a 404 if no coupon is found. By passing a code parameter, the find will attempt to locate a coupon that matches that code. 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. @@ -257,6 +264,10 @@ def find_coupon(product_family_id: nil, currency_prices: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -267,6 +278,8 @@ def find_coupon(product_family_id: nil, ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -281,7 +294,7 @@ puts result # Read Coupon -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. +Returns a coupon by its Advanced Billing-assigned ID. 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. @@ -294,6 +307,10 @@ def read_coupon(product_family_id, currency_prices: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -304,6 +321,8 @@ def read_coupon(product_family_id, ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -355,9 +374,7 @@ puts result # Update Coupon -## Update Coupon - -You can update a Coupon via the API with a PUT request to the resource endpoint. +Updates a coupon. 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 }` @@ -368,6 +385,10 @@ def update_coupon(product_family_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -378,6 +399,8 @@ def update_coupon(product_family_id, ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -455,7 +478,7 @@ puts result # Archive Coupon -You can archive a Coupon via the API with the archive method. +Archives a coupon, making it unavailable for future use while remaining active on existing subscriptions. 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. @@ -464,6 +487,10 @@ def archive_coupon(product_family_id, coupon_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -473,6 +500,8 @@ def archive_coupon(product_family_id, ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -521,12 +550,16 @@ puts result # List Coupons -You can retrieve a list of coupons. +Lists coupons for a site. ```ruby def list_coupons(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -538,6 +571,8 @@ def list_coupons(options = {}) ## Response Type +**200**: OK + [`Array[CouponResponse]`](../../doc/models/coupon-response.md) ## Example Usage @@ -619,13 +654,17 @@ puts result # Read Coupon Usage -This request will provide details about the coupon usage as an array of data hashes, one per product. +Lists coupon usage details, one entry per product. ```ruby def read_coupon_usage(product_family_id, coupon_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -635,6 +674,8 @@ def read_coupon_usage(product_family_id, ## Response Type +**200**: OK + [`Array[CouponUsage]`](../../doc/models/coupon-usage.md) ## Example Usage @@ -688,7 +729,7 @@ puts result # Validate Coupon -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. +Verifies whether a specific coupon code is valid. 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: @@ -715,6 +756,10 @@ def validate_coupon(code, product_family_id: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -724,6 +769,8 @@ def validate_coupon(code, ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -773,7 +820,7 @@ puts result # Create or Update Coupon Currency Prices -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. +Creates and/or updates 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. @@ -782,6 +829,10 @@ def create_or_update_coupon_currency_prices(coupon_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -791,6 +842,8 @@ def create_or_update_coupon_currency_prices(coupon_id, ## Response Type +**200**: OK + [`CouponCurrencyResponse`](../../doc/models/coupon-currency-response.md) ## Example Usage @@ -827,6 +880,8 @@ puts result # Create Coupon Subcodes +Creates subcodes for an existing coupon. + ## Coupon Subcodes Intro Coupon Subcodes allow you to create a set of unique codes that allow you to expand the use of one coupon. @@ -873,6 +928,10 @@ def create_coupon_subcodes(coupon_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -882,6 +941,8 @@ def create_coupon_subcodes(coupon_id, ## Response Type +**200**: OK + [`CouponSubcodesResponse`](../../doc/models/coupon-subcodes-response.md) ## Example Usage @@ -919,12 +980,16 @@ puts result # List Coupon Subcodes -This request allows you to request the subcodes that are attached to a coupon. +Lists the subcodes attached to a coupon. ```ruby def list_coupon_subcodes(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -935,6 +1000,8 @@ def list_coupon_subcodes(options = {}) ## Response Type +**200**: OK + [`CouponSubcodes`](../../doc/models/coupon-subcodes.md) ## Example Usage @@ -982,7 +1049,7 @@ puts result # Update Coupon Subcodes -You can update the subcodes for the given Coupon via the API with a PUT request to the resource endpoint. +Updates the subcodes for a coupon, replacing all existing subcodes with the new list. 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. @@ -999,6 +1066,10 @@ def update_coupon_subcodes(coupon_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1008,6 +1079,8 @@ def update_coupon_subcodes(coupon_id, ## Response Type +**200**: OK + [`CouponSubcodesResponse`](../../doc/models/coupon-subcodes-response.md) ## Example Usage @@ -1033,6 +1106,8 @@ puts result # Delete Coupon Subcode +Deletes a specific subcode from a coupon. + ## Example Given a coupon with an ID of 567, and a coupon subcode of 20OFF, the URL to `DELETE` this coupon subcode would be: @@ -1061,6 +1136,10 @@ def delete_coupon_subcode(coupon_id, subcode) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1070,6 +1149,8 @@ def delete_coupon_subcode(coupon_id, ## Response Type +**200**: OK + `void` ## Example Usage diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md index 23a3512..660a44b 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -43,6 +43,10 @@ def create_metafields(resource_type, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -52,6 +56,8 @@ def create_metafields(resource_type, ## Response Type +**200**: OK + [`Array[Metafield]`](../../doc/models/metafield.md) ## Example Usage @@ -129,6 +135,10 @@ Lists the metafields and their associated details for a Site and resource type. def list_metafields(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -141,6 +151,8 @@ def list_metafields(options = {}) ## Response Type +**200**: OK + [`ListMetafieldsResponse`](../../doc/models/list-metafields-response.md) ## Example Usage @@ -207,7 +219,7 @@ With this endpoint, you can: - Add new metadata to a dropdown or radio for a metafield that was created without metadata. -- Remove metadata for a dropdown or radio for a metafield. +- Remove metadata for a dropdown or radio for a metafield. > Note: Updates to metadata overwrite existing values. To remove one or more values, specify all metadata values except those you want to remove. @@ -220,6 +232,10 @@ def update_metafield(resource_type, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -229,6 +245,8 @@ def update_metafield(resource_type, ## Response Type +**200**: OK + [`Array[Metafield]`](../../doc/models/metafield.md) ## Example Usage @@ -256,6 +274,10 @@ def delete_metafield(resource_type, name: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -265,6 +287,8 @@ def delete_metafield(resource_type, ## Response Type +**200**: OK + `void` ## Example Usage @@ -296,6 +320,10 @@ def create_metadata(resource_type, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -306,6 +334,8 @@ def create_metadata(resource_type, ## Response Type +**200**: OK + [`Array[Metadata]`](../../doc/models/metadata.md) ## Example Usage @@ -351,6 +381,10 @@ Lists metadata and metafields for a specific customer or subscription. def list_metadata(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -362,6 +396,8 @@ def list_metadata(options = {}) ## Response Type +**200**: OK + [`PaginatedMetadata`](../../doc/models/paginated-metadata.md) ## Example Usage @@ -406,7 +442,7 @@ Updates metadata and metafields on the Site and the customer or subscription spe If you update metadata on a subscription or customer with a metafield that does not already exist, the metafield is created with the metadata you specify and it is always added as a text field to the Site and to the subscription or customer you specify. You can update the input_type for the metafield with the Update Metafield endpoint. -Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscription and another 100 for Customer. +Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for the Subscription resource and another 100 for the Customer resource. ```ruby def update_metadata(resource_type, @@ -414,6 +450,10 @@ def update_metadata(resource_type, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -424,6 +464,8 @@ def update_metadata(resource_type, ## Response Type +**200**: OK + [`Array[Metadata]`](../../doc/models/metadata.md) ## Example Usage @@ -458,6 +500,10 @@ def delete_metadata(resource_type, names: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -469,6 +515,8 @@ def delete_metadata(resource_type, ## Response Type +**200**: OK + `void` ## Example Usage @@ -493,12 +541,16 @@ custom_fields_controller.delete_metadata( # List Metadata for Resource Type -Lists metadata for a specified array of subscriptions or customers. +Lists metadata for a specified array of subscriptions or customers. ```ruby def list_metadata_for_resource_type(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -517,6 +569,8 @@ def list_metadata_for_resource_type(options = {}) ## Response Type +**200**: OK + [`PaginatedMetadata`](../../doc/models/paginated-metadata.md) ## Example Usage diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index ccbe528..dff9ad5 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -21,7 +21,7 @@ customers_controller = client.customers # Create Customer -You may create a new Customer at any time, or you may create a Customer at the same time you create a Subscription. The only validation restriction is that you may only create one customer for a given reference value. +Creates a new customer; can also be created alongside a new subscription. The only validation restriction is that you may only create one customer for a given reference value. If provided, the `reference` value must be unique. It represents a unique identifier for the customer from your own app, i.e. the customer’s ID. This allows you to retrieve a given customer via a piece of shared information. Alternatively, you may choose to leave `reference` blank, and store Advanced Billing’s unique ID for the customer, which is in the `id` attribute. @@ -50,6 +50,10 @@ For more: [Customer Locale](https://maxio.zendesk.com/hc/en-us/articles/24286672 def create_customer(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -58,6 +62,8 @@ def create_customer(body: nil) ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -130,7 +136,7 @@ puts result # List Customers -This request will by default list all customers associated with your Site. +Lists all customers associated with your site, or filters results using the search parameter. ## Find Customer @@ -150,6 +156,10 @@ To retrieve a single, exact match by reference, use the [lookup endpoint](https: def list_customers(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -166,6 +176,8 @@ def list_customers(options = {}) ## Response Type +**200**: OK + [`Array[CustomerResponse]`](../../doc/models/customer-response.md) ## Example Usage @@ -274,6 +286,10 @@ Retrieves the Customer properties by Advanced Billing-generated Customer ID. def read_customer(id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -282,6 +298,8 @@ def read_customer(id) ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -333,13 +351,17 @@ puts result # Update Customer -This method allows to update the Customer. +Updates the customer. ```ruby def update_customer(id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -349,6 +371,8 @@ def update_customer(id, ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -412,12 +436,16 @@ puts result # Delete Customer -This method allows you to delete the Customer. +Deletes the customer. ```ruby def delete_customer(id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -426,6 +454,8 @@ def delete_customer(id) ## Response Type +**204**: No Content + `void` ## Example Usage @@ -439,12 +469,16 @@ customers_controller.delete_customer(id) # Read Customer by Reference -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. +Returns a customer by their unique reference ID. It will return a single match. ```ruby def read_customer_by_reference(reference) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -453,6 +487,8 @@ def read_customer_by_reference(reference) ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -467,12 +503,16 @@ puts result # List Customer Subscriptions -This method lists all subscriptions that belong to a customer. +Lists all subscriptions that belong to a customer. ```ruby def list_customer_subscriptions(customer_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -481,6 +521,8 @@ def list_customer_subscriptions(customer_id) ## Response Type +**200**: OK + [`Array[SubscriptionResponse]`](../../doc/models/subscription-response.md) ## Example Usage diff --git a/doc/controllers/events-based-billing-segments.md b/doc/controllers/events-based-billing-segments.md index 5355ad5..e6a8752 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -20,7 +20,7 @@ events_based_billing_segments_controller = client.events_based_billing_segments # Create Segment -This endpoint creates a new Segment for a Component with segmented Metric. It allows you to specify properties to bill upon and prices for each Segment. You can only pass as many "property_values" as the related Metric has segmenting properties defined. +Creates a new segment for a component with a segmented metric. It allows you to specify properties to bill upon and prices for each Segment. You can only pass as many "property_values" as the related Metric has segmenting properties defined. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. @@ -30,6 +30,10 @@ def create_segment(component_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -40,6 +44,8 @@ def create_segment(component_id, ## Response Type +**201**: Created + [`SegmentResponse`](../../doc/models/segment-response.md) ## Example Usage @@ -86,7 +92,7 @@ puts result # List Segments for Price Point -This endpoint allows you to fetch Segments created for a given Price Point. They will be returned in the order of creation. +Lists segments created for a given price point, in order of creation. You can pass `page` and `per_page` parameters in order to access all of the segments. By default it will return `30` records. You can set `per_page` to `200` at most. @@ -96,6 +102,10 @@ You may specify component and/or price point by using either the numeric ID or t def list_segments_for_price_point(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -108,6 +118,8 @@ def list_segments_for_price_point(options = {}) ## Response Type +**200**: OK + [`ListSegmentsResponse`](../../doc/models/list-segments-response.md) ## Example Usage @@ -137,7 +149,7 @@ puts result # Update Segment -This endpoint updates a single Segment for a Component with a segmented Metric. It allows you to update the pricing for the segment. +Updates a single segment for a component with a 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. @@ -148,6 +160,10 @@ def update_segment(component_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -159,6 +175,8 @@ def update_segment(component_id, ## Response Type +**200**: OK + [`SegmentResponse`](../../doc/models/segment-response.md) ## Example Usage @@ -188,7 +206,7 @@ puts result # Delete Segment -This endpoint allows you to delete a Segment with specified ID. +Deletes a segment with the specified ID. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. @@ -198,6 +216,10 @@ def delete_segment(component_id, id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -208,6 +230,8 @@ def delete_segment(component_id, ## Response Type +**204**: No Content + `void` ## Example Usage @@ -236,7 +260,7 @@ events_based_billing_segments_controller.delete_segment( # Bulk Create Segments -This endpoint allows you to create multiple segments in one request. The array of segments can contain up to `2000` records. +Creates multiple segments in one request. The array of segments can contain up to `2000` records. If any of the records contain an error the whole request would fail and none of the requested segments get created. The error response contains a message for only the one segment that failed validation, with the corresponding index in the array. @@ -248,6 +272,10 @@ def bulk_create_segments(component_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -258,6 +286,8 @@ def bulk_create_segments(component_id, ## Response Type +**201**: Created + [`ListSegmentsResponse`](../../doc/models/list-segments-response.md) ## Example Usage @@ -284,7 +314,7 @@ puts result # Bulk Update Segments -This endpoint allows you to update multiple segments in one request. The array of segments can contain up to `1000` records. +Updates multiple segments in one request. The array of segments can contain up to `1000` records. If any of the records contain an error the whole request would fail and none of the requested segments get updated. The error response contains a message for only the one segment that failed validation, with the corresponding index in the array. @@ -296,6 +326,10 @@ def bulk_update_segments(component_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -306,6 +340,8 @@ def bulk_update_segments(component_id, ## Response Type +**200**: OK + [`ListSegmentsResponse`](../../doc/models/list-segments-response.md) ## Example Usage diff --git a/doc/controllers/events.md b/doc/controllers/events.md index b9b0b0a..1dead8c 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -17,11 +17,13 @@ events_controller = client.events # List Events +Lists events for a site. + ## Events Intro Advanced Billing Events include various activity that happens around a Site. This information is **especially** useful to track down issues that arise when subscriptions are not created due to errors. -Within the Advanced Billing UI, "Events" are referred to as "Site Activity". Full documentation on how to record view Events / Site Activty in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). +Within the Advanced Billing UI, "Events" are referred to as "Site Activity". Full documentation on how to view Events / Site Activity in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). ## List Events for a Site @@ -90,6 +92,10 @@ Here’s an example event for the `subscription_state_change` event: def list_events(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -108,6 +114,8 @@ def list_events(options = {}) ## Response Type +**200**: OK + [`Array[EventResponse]`](../../doc/models/event-response.md) ## Example Usage @@ -193,7 +201,7 @@ puts result # List Subscription Events -The following request will return a list of events for a subscription. +Lists events for a subscription. ## Event Key @@ -209,6 +217,10 @@ For precise mappings from key to event_specific_data, refer to [Event](../../doc def list_subscription_events(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -223,6 +235,8 @@ def list_subscription_events(options = {}) ## Response Type +**200**: OK + [`Array[EventResponse]`](../../doc/models/event-response.md) ## Example Usage @@ -289,12 +303,16 @@ puts result # Read Events Count -Get a count of all the events for a given site by using this method. +Returns the total count of events for a given site. ```ruby def read_events_count(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -308,6 +326,8 @@ def read_events_count(options = {}) ## Response Type +**200**: OK + [`CountResponse`](../../doc/models/count-response.md) ## Example Usage diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md index d6915d7..30f32ca 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -13,12 +13,12 @@ insights_controller = client.insights * [Read Site Stats](../../doc/controllers/insights.md#read-site-stats) * [Read Mrr](../../doc/controllers/insights.md#read-mrr) * [List Mrr Movements](../../doc/controllers/insights.md#list-mrr-movements) -* [List Mrr Per Subscription](../../doc/controllers/insights.md#list-mrr-per-subscription) +* [List Mrr per Subscription](../../doc/controllers/insights.md#list-mrr-per-subscription) # Read Site Stats -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. +Returns basic site-level stats. This API call only answers with JSON responses. An XML version is not provided. ## Stats Documentation @@ -32,8 +32,14 @@ https://subdomain.chargify.com/dashboard def read_site_stats ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**200**: OK + [`SiteSummary`](../../doc/models/site-summary.md) ## Example Usage @@ -67,13 +73,17 @@ puts result **This endpoint is deprecated.** -This endpoint returns your site's current MRR, including plan and usage breakouts. +Returns your site's current MRR, including plan and usage breakouts. ```ruby def read_mrr(at_time: nil, subscription_id: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -83,6 +93,8 @@ def read_mrr(at_time: nil, ## Response Type +**200**: OK + [`MRRResponse`](../../doc/models/mrr-response.md) ## Example Usage @@ -117,7 +129,7 @@ puts result **This endpoint is deprecated.** -This endpoint returns your site's MRR movements. +Lists your site's MRR movements. ## Understanding MRR movements @@ -146,6 +158,10 @@ Usage includes revenue from: def list_mrr_movements(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -157,6 +173,8 @@ def list_mrr_movements(options = {}) ## Response Type +**200**: OK + [`ListMRRResponse`](../../doc/models/list-mrr-response.md) ## Example Usage @@ -224,7 +242,7 @@ puts result ``` -# List Mrr Per Subscription +# List Mrr per Subscription **This endpoint is deprecated.** @@ -234,6 +252,10 @@ This endpoint returns your site's current MRR, including plan and usage breakout def list_mrr_per_subscription(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -246,6 +268,8 @@ def list_mrr_per_subscription(options = {}) ## Response Type +**200**: OK + [`SubscriptionMRRResponse`](../../doc/models/subscription-mrr-response.md) ## Example Usage diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md index 24db06e..d2f76a2 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -37,13 +37,17 @@ Refund an invoice, segment, or consolidated invoice. A refund less than the total of a consolidated invoice will be split across its segments. -A $50.00 refund on a $100.00 consolidated invoice with one $60.00 and one $40.00 segment, the refunded amount will be applied as 50% of each ($30.00 and $20.00 respectively). +For a $50.00 refund on a $100.00 consolidated invoice with one $60.00 segment and one $40.00 segment, the refunded amount will be applied as 50% of each ($30.00 and $20.00, respectively). ```ruby def refund_invoice(uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -53,6 +57,8 @@ def refund_invoice(uid, ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -93,6 +99,10 @@ By default, invoices returned on the index will only include totals, not detaile def list_invoices(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -123,6 +133,8 @@ def list_invoices(options = {}) ## Response Type +**200**: OK + [`ListInvoicesResponse`](../../doc/models/list-invoices-response.md) ## Example Usage @@ -455,6 +467,10 @@ Response: A single Invoice. def read_invoice(uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -463,6 +479,8 @@ def read_invoice(uid) ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -551,6 +569,7 @@ puts result "subtotal_amount": "100.0", "discount_amount": "0.0", "tax_amount": "0.0", + "tax_included": false, "total_amount": "100.0", "tiered_unit_price": false, "period_range_start": "2018-07-26", @@ -615,6 +634,10 @@ Note - invoice events that occurred prior to 09/05/2018 __will not__ contain an def list_invoice_events(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -629,6 +652,8 @@ def list_invoice_events(options = {}) ## Response Type +**200**: OK + [`ListInvoiceEventsResponse`](../../doc/models/list-invoice-events-response.md) ## Example Usage @@ -746,6 +771,7 @@ puts result "subtotal_amount": "99.0", "discount_amount": "9.9", "tax_amount": "6.01425", + "tax_included": false, "total_amount": "95.11425", "tiered_unit_price": false, "period_range_start": "2018-08-01", @@ -766,6 +792,7 @@ puts result "subtotal_amount": "15.5", "discount_amount": "1.55", "tax_amount": "0.941625", + "tax_included": false, "total_amount": "14.891625", "tiered_unit_price": true, "period_range_start": "2018-07-22", @@ -814,6 +841,7 @@ puts result "subtotal_amount": "47.0", "discount_amount": "4.7", "tax_amount": "2.85525", + "tax_included": false, "total_amount": "45.15525", "tiered_unit_price": true, "period_range_start": "2018-07-22", @@ -862,6 +890,7 @@ puts result "subtotal_amount": "14.0", "discount_amount": "1.4", "tax_amount": "0.8505", + "tax_included": false, "total_amount": "13.4505", "tiered_unit_price": false, "period_range_start": "2018-08-01", @@ -1036,6 +1065,10 @@ def record_payment_for_invoice(uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1045,6 +1078,8 @@ def record_payment_for_invoice(uid, ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -1079,7 +1114,7 @@ puts result 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. +To apply a payment to multiple invoices, at minimum, specify the `amount` and `applications` (i.e., `invoice_uid` and `amount`) details. ``` { @@ -1108,6 +1143,10 @@ Note that the invoice payment amounts must be greater than 0. Total amount must def record_payment_for_multiple_invoices(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1116,6 +1155,8 @@ def record_payment_for_multiple_invoices(body: nil) ## Response Type +**200**: OK + [`MultiInvoicePaymentResponse`](../../doc/models/multi-invoice-payment-response.md) ## Example Usage @@ -1185,6 +1226,10 @@ By default, the credit notes returned by this endpoint will exclude the arrays o def list_credit_notes(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1200,6 +1245,8 @@ def list_credit_notes(options = {}) ## Response Type +**200**: OK + [`ListCreditNotesResponse`](../../doc/models/list-credit-notes-response.md) ## Example Usage @@ -1288,6 +1335,7 @@ puts result "subtotal_amount": "1.971004", "discount_amount": "0.19862831", "tax_amount": "0.11963536", + "tax_included": false, "total_amount": "1.89201105", "tiered_unit_price": false, "period_range_start": "2018-11-30", @@ -1306,6 +1354,7 @@ puts result "subtotal_amount": "114.21127834", "discount_amount": "11.42112783", "tax_amount": "6.93833516", + "tax_included": false, "total_amount": "109.72848567", "tiered_unit_price": false, "period_range_start": "2018-12-30", @@ -1324,6 +1373,7 @@ puts result "subtotal_amount": "9.16746047", "discount_amount": "0.91674605", "tax_amount": "0.55692322", + "tax_included": false, "total_amount": "8.80763764", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1342,6 +1392,7 @@ puts result "subtotal_amount": "72.57572871", "discount_amount": "7.25757287", "tax_amount": "4.40897552", + "tax_included": false, "total_amount": "69.72713136", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1360,6 +1411,7 @@ puts result "subtotal_amount": "3.12839588", "discount_amount": "0.31322157", "tax_amount": "0.19002427", + "tax_included": false, "total_amount": "3.00519858", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1378,6 +1430,7 @@ puts result "subtotal_amount": "7.63955039", "discount_amount": "0.76395504", "tax_amount": "0.46410269", + "tax_included": false, "total_amount": "7.33969804", "tiered_unit_price": false, "period_range_start": "2018-12-30", @@ -1529,6 +1582,10 @@ Use this endpoint to retrieve the details for a credit note. def read_credit_note(uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1537,6 +1594,8 @@ def read_credit_note(uid) ## Response Type +**200**: OK + [`CreditNote`](../../doc/models/credit-note.md) ## Example Usage @@ -1615,6 +1674,7 @@ puts result "subtotal_amount": "1.971004", "discount_amount": "0.19862831", "tax_amount": "0.11963536", + "tax_included": false, "total_amount": "1.89201105", "tiered_unit_price": false, "period_range_start": "2018-11-30", @@ -1635,6 +1695,7 @@ puts result "subtotal_amount": "114.21127834", "discount_amount": "11.42112783", "tax_amount": "6.93833516", + "tax_included": false, "total_amount": "109.72848567", "tiered_unit_price": false, "period_range_start": "2018-12-30", @@ -1655,6 +1716,7 @@ puts result "subtotal_amount": "9.16746047", "discount_amount": "0.91674605", "tax_amount": "0.55692322", + "tax_included": false, "total_amount": "8.80763764", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1675,6 +1737,7 @@ puts result "subtotal_amount": "72.57572871", "discount_amount": "7.25757287", "tax_amount": "4.40897552", + "tax_included": false, "total_amount": "69.72713136", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1695,6 +1758,7 @@ puts result "subtotal_amount": "3.12839588", "discount_amount": "0.31322157", "tax_amount": "0.19002427", + "tax_included": false, "total_amount": "3.00519858", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1715,6 +1779,7 @@ puts result "subtotal_amount": "7.63955039", "discount_amount": "0.76395504", "tax_amount": "0.46410269", + "tax_included": false, "total_amount": "7.33969804", "tiered_unit_price": false, "period_range_start": "2018-12-30", @@ -1873,6 +1938,10 @@ def record_payment_for_subscription(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1882,6 +1951,8 @@ def record_payment_for_subscription(subscription_id, ## Response Type +**201**: OK + [`RecordPaymentResponse`](../../doc/models/record-payment-response.md) ## Example Usage @@ -1953,6 +2024,10 @@ When reopening a consolidated invoice, all of its canceled segments will also be def reopen_invoice(uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1961,6 +2036,8 @@ def reopen_invoice(uid) ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -1989,6 +2066,10 @@ def void_invoice(uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1998,6 +2079,8 @@ def void_invoice(uid, ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -2034,6 +2117,10 @@ Invoice segments returned on the index will only include totals, not detailed br def list_consolidated_invoice_segments(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2045,6 +2132,8 @@ def list_consolidated_invoice_segments(options = {}) ## Response Type +**200**: OK + [`ConsolidatedInvoice`](../../doc/models/consolidated-invoice.md) ## Example Usage @@ -2376,13 +2465,13 @@ Instead of creating custom products like in above example, You can pass existing The price for each line item will be calculated as well as a total due amount for the invoice. Multiple line items can be sent. -### Line items types +### Line item types -When defining line item, You can choose one of 3 types for one line item: +When defining a line item, You can choose one of 3 types for a line item: #### Custom item -Like in basic behavior example above, You can pass `title` and `unit_price` for custom item. +As shown in the basic behavior example, You can pass `title` and `unit_price` for custom item. #### Product id @@ -2390,7 +2479,7 @@ Product handle (with handle: prefix) or id from the scope of current subscriptio #### Component id -Component handle (with handle: prefix) or id from the scope of current subscription's site can be provided with `component_id`. If `component_id` is used, following fields cannot be used: `title`, `product_id`. By default `unit_price` is taken from product's default price point, but can be overwritten by passing `unit_price` or `price_point_id`. At this moment price points are supportted only for quantity based, on/off and metered components. For prepaid and event based billing components `unit_price` is required. +Component handle (with handle: prefix) or id from the scope of current subscription's site can be provided with `component_id`. If `component_id` is used, following fields cannot be used: `title`, `product_id`. By default `unit_price` is taken from product's default price point, but can be overwritten by passing `unit_price` or `price_point_id`. At this moment price points are supported only for quantity based, on/off and metered components. For prepaid and event based billing components `unit_price` is required. ### Coupons @@ -2527,7 +2616,7 @@ Optional `description` parameter, it will overwrite default generated descriptio #### Issue Date -By default, invoices will be created with a issue date set to today. `issue_date` parameter can be send to alter that. Only dates in the past can be send. `issue_date` should be send in `YYYY-MM-DD` format. +By default, invoices will be created with a issue date set to today in your site's time zone. The `issue_date` parameter can be sent to alter the default. Only today or dates in the past are accepted. This date is interpreted and validated in your site's time zone. The format for `issue_date` is `YYYY-MM-DD`. #### Net Terms @@ -2539,7 +2628,7 @@ The seller, shipping and billing addresses can be sent to override the site's de #### Memo and Payment Instructions -A custom memo can be sent with the `memo` parameter to override the site's default. Likewise, custom payment instructions can be sent with the `payment_instrucions` parameter. +A custom memo can be sent with the `memo` parameter to override the site's default. Likewise, custom payment instructions can be sent with the `payment_instructions` parameter. #### Status @@ -2550,6 +2639,10 @@ def create_invoice(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2559,6 +2652,8 @@ def create_invoice(subscription_id, ## Response Type +**200**: OK + [`InvoiceResponse`](../../doc/models/invoice-response.md) ## Example Usage @@ -2666,6 +2761,7 @@ puts result "subtotal_amount": "1800.0", "discount_amount": "0.0", "tax_amount": "0.0", + "tax_included": false, "total_amount": "1800.0", "tiered_unit_price": false, "period_range_start": "2020-12-02", @@ -2704,6 +2800,10 @@ def send_invoice(uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2713,6 +2813,8 @@ def send_invoice(uid, ## Response Type +**204**: No Content + `void` ## Example Usage @@ -2747,7 +2849,7 @@ invoices_controller.send_invoice( # Preview Customer Information Changes -Customer information may change after an invoice is issued which may lead to a mismatch between customer information that are present on an open invoice and actual customer information. This endpoint allows to preview these differences, if any. +Customer information may change after an invoice is issued, which may lead to a mismatch between customer information that is present on an open invoice and actual customer information. This endpoint allows you to preview these differences, if any. The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. @@ -2755,6 +2857,10 @@ The endpoint doesn't accept a request body. Customer information differences are def preview_customer_information_changes(uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2763,6 +2869,8 @@ def preview_customer_information_changes(uid) ## Response Type +**200**: OK + [`CustomerChangesPreviewResponse`](../../doc/models/customer-changes-preview-response.md) ## Example Usage @@ -2837,7 +2945,7 @@ puts result # Update Customer Information -This endpoint updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint before. +This endpoint updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint first. The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. @@ -2845,6 +2953,10 @@ The endpoint doesn't accept a request body. Customer information differences are def update_customer_information(uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2853,6 +2965,8 @@ def update_customer_information(uid) ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -3066,9 +3180,9 @@ This endpoint allows you to issue an invoice that is in "pending" or "draft" sta You cannot issue a pending child invoice that was created for a member subscription in a group. -For Remittance subscriptions, the invoice will go into "open" status and payment won't be attempted. The value for `on_failed_payment` would be rejected if sent. Any prepayments or service credits that exist on subscription will be automatically applied. Additionally, if setting is on, an email will be sent for issued invoice. +For Remittance subscriptions, the invoice will go into "open" status and payment won't be attempted. The value for `on_failed_payment` would be rejected if sent. Any prepayments or service credits that exist on the subscription will be automatically applied. Additionally, if the setting is enabled, an email will be sent for the issued invoice. -For Automatic subscriptions, prepayments and service credits will apply to the invoice and before payment is attempted. On successful payment, the invoice will go into "paid" status and email will be sent to the customer (if setting applies). When payment fails, the next event depends on the `on_failed_payment` value: +For Automatic subscriptions, prepayments and service credits will apply to the invoice before payment is attempted. On successful payment, the invoice will go into "paid" status and email will be sent to the customer (if setting applies). When payment fails, the next event depends on the `on_failed_payment` value: - `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option. - `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history. @@ -3079,6 +3193,10 @@ def issue_invoice(uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -3088,6 +3206,8 @@ def issue_invoice(uid, ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md index f89b9d8..efab388 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -19,7 +19,7 @@ offers_controller = client.offers # Create Offer -Create an offer within your Advanced Billing site by sending a POST request. +Creates an offer within your Advanced Billing site. ## Documentation @@ -37,6 +37,10 @@ You can optionally pass in a `product_price_point_id` that corresponds with the def create_offer(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -45,6 +49,8 @@ def create_offer(body: nil) ## Response Type +**201**: Created + [`OfferResponse`](../../doc/models/offer-response.md) ## Example Usage @@ -124,12 +130,16 @@ puts result # List Offers -This endpoint will list offers for a site. +Lists offers for a site. ```ruby def list_offers(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -140,6 +150,8 @@ def list_offers(options = {}) ## Response Type +**200**: OK + [`ListOffersResponse`](../../doc/models/list-offers-response.md) ## Example Usage @@ -219,12 +231,16 @@ puts result # Read Offer -This method allows you to list a specific offer's attributes. This is different than list all offers for a site, as it requires an `offer_id`. +Returns a specific offer's attributes. This is different from listing all offers for a site, as it requires an `offer_id`. ```ruby def read_offer(offer_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -233,6 +249,8 @@ def read_offer(offer_id) ## Response Type +**200**: OK + [`OfferResponse`](../../doc/models/offer-response.md) ## Example Usage @@ -247,12 +265,16 @@ puts result # Archive Offer -Archive an existing offer. Please provide an `offer_id` in order to archive the correct item. +Archives an existing offer. Please provide an `offer_id` in order to archive the correct item. ```ruby def archive_offer(offer_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -261,6 +283,8 @@ def archive_offer(offer_id) ## Response Type +**200**: OK + `void` ## Example Usage @@ -274,12 +298,16 @@ offers_controller.archive_offer(offer_id) # Unarchive Offer -Unarchive a previously archived offer. Please provide an `offer_id` in order to un-archive the correct item. +Unarchives a previously archived offer. Please provide an `offer_id` in order to unarchive the correct item. ```ruby def unarchive_offer(offer_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -288,6 +316,8 @@ def unarchive_offer(offer_id) ## Response Type +**200**: OK + `void` ## Example Usage diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index 8b3b1b8..8f5e0ac 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -34,7 +34,7 @@ Select an option from the **Request Examples** drop-down on the right side of th Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox. -Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information. +Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Maxio.js (formerly Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information. See the following articles to learn more about subscriptions and payments: @@ -42,73 +42,32 @@ See the following articles to learn more about subscriptions and payments: + [Self Service Pages](https://maxio.zendesk.com/hc/en-us/articles/24261425318541-Self-Service-Pages) (Allows credit card updates by Subscriber) + [Public Signup Pages payment settings](https://maxio.zendesk.com/hc/en-us/articles/24261368332557-Individual-Page-Settings) + [Taxes](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-signups#taxes) -+ [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview) - + [Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ) - + [Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) - + [Chargify.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) - + [Chargify.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7) - + [Chargify.js with Stripe BECS Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway) - + [Chargify.js with Stripe BECS Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway) ++ [Maxio.js (formerly Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview) + + [Maxio.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ) + + [Maxio.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) + + [Maxio.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) + + [Maxio.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7) + + [Maxio.js with Stripe BECS Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway) + + [Maxio.js with Stripe BECS Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway) + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless) + [Full documentation on Stripe SEPA Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) + [Full documentation on Stripe BECS Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) + [Full documentation on Stripe BACS Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) -## 3D Secure Authentication during payment profile creation. +## 3D Secure (3DS) Authentication post-authentication flow -When a payment requires 3D Secure Authentication to adhear to Strong Customer Authentication (SCA) during payment profile creation, the request enters a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). In this case, a 422 Unprocessable Entity status is returned with the following response: +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. -```json -{ - "jsonapi": { - "version": "1.0" - }, - "errors": [ - { - "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/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&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/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93" - } - } - ] -} -``` - -To let the customer go through 3D Secure Authentication, they need to be redirected to the URL specified in `action_link`. - -Optionally, you can specify the `callback_url` parameter in the `action_link` URL to receive notification about the result of 3D Secure Authentication. - -The `callback_url` will return the following information: - -- whether the authentication was successful (`success`) -- the payment profile ID (`payment_profile_id`) - -You can also specify a `redirect_url` parameter in the `action_link` URL to redirect the customer back to your site. - -You cannot use action_link in an iframe inside a custom application. You must redirect the customer directly to the `action_link` and use the `redirect_url` or `callback_url` to be notified of the result. - -The final URL that you send a customer to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: - -`https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&redirect_url=https://yourpage.com` - -### Example Redirect Flow - -Here's an example flow to redirect customers to different pages depending on whether SCA was performed successfully: - -1. Create a payment profile via the API; it requires 3DS. -2. You receive an `action_link` in the response. -3. Use this `action_link` to, for example, connect with your internal resources or generate a `session_id`. -4. Include one of those attributes inside the `callback_url` and `redirect_url` to be aware which “session” this applies to. -5. Redirect the customer to the `action_link` with `callback_url` and `redirect_url` applied -6. After the customer completes 3DS authentication, we notify you of the result via the applied `callback_url`. -7. After that, we redirect the customer to the `redirect_url`; at this point the result of authentication is known. -8. Optionally, you can use the applied "msg" param in the `redirect_url` to determine if the redirect was successful. +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```ruby def create_payment_profile(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -117,6 +76,8 @@ def create_payment_profile(body: nil) ## Response Type +**200**: OK + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -172,12 +133,16 @@ puts result # List Payment Profiles -This method will return all of the active `payment_profiles` for a Site, or for one Customer within a site. If no payment profiles are found, this endpoint will return an empty array, not a 404. +Returns all active payment profiles for a site, or for one customer within a site. If no payment profiles are found, this endpoint will return an empty array, not a 404. ```ruby def list_payment_profiles(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -188,6 +153,8 @@ def list_payment_profiles(options = {}) ## Response Type +**200**: OK + [`Array[PaymentProfileResponse]`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -268,7 +235,7 @@ puts result # Read Payment Profile -Using the GET method you can retrieve a Payment Profile identified by its unique ID. +Returns a payment profile identified by its unique ID. Note that a different JSON object will be returned if the card method on file is a bank account. @@ -310,6 +277,10 @@ Example response for Bank Account: def read_payment_profile(payment_profile_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -318,6 +289,8 @@ def read_payment_profile(payment_profile_id) ## Response Type +**200**: OK + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -369,6 +342,8 @@ puts result # Update Payment Profile +Updates a payment profile. + ## Partial Card Updates In the event that you are using the Authorize.net, Stripe, Cybersource, Forte or Braintree Blue payment gateways, you can update just the billing and contact information for a payment method. Note the lack of credit-card related data contained in the JSON payload. @@ -409,6 +384,10 @@ def update_payment_profile(payment_profile_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -418,6 +397,8 @@ def update_payment_profile(payment_profile_id, ## Response Type +**200**: OK + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -482,6 +463,10 @@ If the payment profile is in use by one or more subscriptions or groups, a 422 a def delete_unused_payment_profile(payment_profile_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -490,6 +475,8 @@ def delete_unused_payment_profile(payment_profile_id) ## Response Type +**204**: No Content + `void` ## Example Usage @@ -521,6 +508,10 @@ def delete_subscriptions_payment_profile(subscription_id, payment_profile_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -530,6 +521,8 @@ def delete_subscriptions_payment_profile(subscription_id, ## Response Type +**204**: No Content + `void` ## Example Usage @@ -548,13 +541,17 @@ payment_profiles_controller.delete_subscriptions_payment_profile( # Verify Bank Account -Submit the two small deposit amounts the customer received in their bank account in order to verify the bank account. (Stripe only) +Verifies a bank account. Submit the two small deposit amounts the customer received in their bank account to verify the bank account. (Stripe only) ```ruby def verify_bank_account(bank_account_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -564,6 +561,8 @@ def verify_bank_account(bank_account_id, ## Response Type +**200**: OK + [`BankAccountResponse`](../../doc/models/bank-account-response.md) ## Example Usage @@ -632,6 +631,10 @@ def delete_subscription_group_payment_profile(uid, payment_profile_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -641,6 +644,8 @@ def delete_subscription_group_payment_profile(uid, ## Response Type +**204**: No Content + `void` ## Example Usage @@ -659,7 +664,7 @@ payment_profiles_controller.delete_subscription_group_payment_profile( # Change Subscription Default Payment Profile -This will change the default payment profile on the subscription to the existing payment profile with the id specified. +Changes the default payment profile on the subscription to the existing payment profile with the specified ID. You must elect to change the existing payment profile to a new payment profile ID in order to receive a satisfactory response from this endpoint. @@ -668,6 +673,10 @@ def change_subscription_default_payment_profile(subscription_id, payment_profile_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -677,6 +686,8 @@ def change_subscription_default_payment_profile(subscription_id, ## Response Type +**201**: Created + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -743,6 +754,10 @@ def change_subscription_group_default_payment_profile(uid, payment_profile_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -752,6 +767,8 @@ def change_subscription_group_default_payment_profile(uid, ## Response Type +**201**: Created + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -816,6 +833,10 @@ To obtain a One Time Token you have to use [Chargify.js](https://docs.maxio.com/ def read_one_time_token(chargify_token) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -824,6 +845,8 @@ def read_one_time_token(chargify_token) ## Response Type +**200**: OK + [`GetOneTimeTokenRequest`](../../doc/models/get-one-time-token-request.md) ## Example Usage @@ -856,6 +879,10 @@ These error responses are designed to prevent excessive or invalid requests, and def send_request_update_payment_email(subscription_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -864,6 +891,8 @@ def send_request_update_payment_email(subscription_id) ## Response Type +**201**: Created + `void` ## Example Usage diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index 6679351..ef157d6 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -24,6 +24,10 @@ Retrieves a list of Products belonging to a Product Family. def list_products_for_product_family(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -42,6 +46,8 @@ def list_products_for_product_family(options = {}) ## Response Type +**200**: OK + [`Array[ProductResponse]`](../../doc/models/product-response.md) ## Example Usage @@ -174,7 +180,7 @@ puts result # Create Product Family -Creates a Product Family within your Advanced Billing site. Create a Product Family to act as a container for your products, components and coupons. +Creates a Product Family within your Advanced Billing site. Create a Product Family to act as a container for your products, components, and coupons. Full documentation on how Product Families operate within the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261098936205-Product-Families). @@ -182,6 +188,10 @@ Full documentation on how Product Families operate within the Advanced Billing U def create_product_family(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -190,6 +200,8 @@ def create_product_family(body: nil) ## Response Type +**201**: Created + [`ProductFamilyResponse`](../../doc/models/product-family-response.md) ## Example Usage @@ -229,12 +241,16 @@ puts result # List Product Families -Retrieve a list of Product Families for a site. +Returns a list of Product Families for a site. ```ruby def list_product_families(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -247,6 +263,8 @@ def list_product_families(options = {}) ## Response Type +**200**: OK + [`Array[ProductFamilyResponse]`](../../doc/models/product-family-response.md) ## Example Usage @@ -302,6 +320,10 @@ The product family can be specified either with the id number, or with the `hand def read_product_family(id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -310,6 +332,8 @@ def read_product_family(id) ## Response Type +**200**: OK + [`ProductFamilyResponse`](../../doc/models/product-family-response.md) ## Example Usage diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md index db95360..8dc2e28 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -32,6 +32,10 @@ def create_product_price_point(product_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -41,6 +45,8 @@ def create_product_price_point(product_id, ## Response Type +**201**: Created + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -115,6 +121,10 @@ Retrieves a list of product price points. def list_product_price_points(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -128,6 +138,8 @@ def list_product_price_points(options = {}) ## Response Type +**200**: OK + [`ListProductPricePointsResponse`](../../doc/models/list-product-price-points-response.md) ## Example Usage @@ -186,6 +198,10 @@ def update_product_price_point(product_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -196,6 +212,8 @@ def update_product_price_point(product_id, ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -250,7 +268,7 @@ puts result # Read Product Price Point -Use this endpoint to retrieve details for a specific product price point. You can achieve this by using either the product price point ID or handle. +Returns details for a specific product price point. You can achieve this by using either the product price point ID or handle. ```ruby def read_product_price_point(product_id, @@ -258,6 +276,10 @@ def read_product_price_point(product_id, currency_prices: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -268,6 +290,8 @@ def read_product_price_point(product_id, ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -321,6 +345,10 @@ def archive_product_price_point(product_id, price_point_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -330,6 +358,8 @@ def archive_product_price_point(product_id, ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -382,13 +412,17 @@ puts result # Unarchive Product Price Point -Use this endpoint to unarchive an archived product price point. +Unarchives an archived product price point. ```ruby def unarchive_product_price_point(product_id, price_point_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -398,6 +432,8 @@ def unarchive_product_price_point(product_id, ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -453,6 +489,10 @@ def promote_product_price_point_to_default(product_id, price_point_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -462,6 +502,8 @@ def promote_product_price_point_to_default(product_id, ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -541,6 +583,10 @@ def bulk_create_product_price_points(product_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -550,6 +596,8 @@ def bulk_create_product_price_points(product_id, ## Response Type +**201**: Created + [`BulkCreateProductPricePointsResponse`](../../doc/models/bulk-create-product-price-points-response.md) ## Example Usage @@ -648,6 +696,10 @@ def create_product_currency_prices(product_price_point_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -657,6 +709,8 @@ def create_product_currency_prices(product_price_point_id, ## Response Type +**200**: OK + [`CurrencyPricesResponse`](../../doc/models/currency-prices-response.md) ## Example Usage @@ -728,6 +782,10 @@ def update_product_currency_prices(product_price_point_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -737,6 +795,8 @@ def update_product_currency_prices(product_price_point_id, ## Response Type +**200**: OK + [`CurrencyPricesResponse`](../../doc/models/currency-prices-response.md) ## Example Usage @@ -790,12 +850,16 @@ puts result # List All Product Price Points -This method allows retrieval of a list of Products Price Points belonging to a Site. +Lists Product Price Points belonging to a site. ```ruby def list_all_product_price_points(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -808,6 +872,8 @@ def list_all_product_price_points(options = {}) ## Response Type +**200**: OK + [`ListProductPricePointsResponse`](../../doc/models/list-product-price-points-response.md) ## Example Usage diff --git a/doc/controllers/products.md b/doc/controllers/products.md index 2f16057..046993f 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -22,7 +22,7 @@ products_controller = client.products Creates a product in your Advanced Billing site. -See the following product docuemation for more information: +See the following product documentation for more information: + [Products Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-Products-Overview) + [Changing a Subscription's Product](https://maxio.zendesk.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations) @@ -32,6 +32,10 @@ def create_product(product_family_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -41,6 +45,8 @@ def create_product(product_family_id, ## Response Type +**201**: Created + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -134,6 +140,10 @@ Reads the current details of a product. def read_product(product_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -142,6 +152,8 @@ def read_product(product_id) ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -214,6 +226,10 @@ def update_product(product_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -223,6 +239,8 @@ def update_product(product_id, ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -291,7 +309,7 @@ puts result # Archive Product -Archives the product. All current subscribers will be unffected; their subscription/purchase will continue to be charged monthly. +Archives the product. All current subscribers will be unaffected; their subscription/purchase will continue to be charged monthly. This will restrict the option to chose the product for purchase via the Billing Portal, as well as disable Public Signup Pages for the product. @@ -299,6 +317,10 @@ This will restrict the option to chose the product for purchase via the Billing def archive_product(product_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -307,6 +329,8 @@ def archive_product(product_id) ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -376,6 +400,10 @@ Retrieves a Product object by its `api_handle`. def read_product_by_handle(api_handle) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -384,6 +412,8 @@ def read_product_by_handle(api_handle) ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -466,12 +496,16 @@ puts result # List Products -This method allows to retrieve a list of Products belonging to a Site. +Lists products belonging to a site. ```ruby def list_products(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -489,6 +523,8 @@ def list_products(options = {}) ## Response Type +**200**: OK + [`Array[ProductResponse]`](../../doc/models/product-response.md) ## Example Usage diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md index 75574a3..5dd8bbc 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -24,7 +24,7 @@ proforma_invoices_controller = client.proforma_invoices # Create Consolidated Proforma Invoice -This endpoint will trigger the creation of a consolidated proforma invoice asynchronously. It will return a 201 with no message, or a 422 with any errors. To find and view the new consolidated proforma invoice, you may poll the subscription group listing for proforma invoices; only one consolidated proforma invoice may be created per group at a time. +Creates a consolidated proforma invoice asynchronously. It will return a 201 with no message, or a 422 with any errors. To find and view the new consolidated proforma invoice, you may poll the subscription group listing for proforma invoices; only one consolidated proforma invoice may be created per group at a time. If the information becomes outdated, simply void the old consolidated proforma invoice and generate a new one. @@ -36,6 +36,10 @@ Proforma invoices are only available on Relationship Invoicing sites. To create def create_consolidated_proforma_invoice(uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -44,6 +48,8 @@ def create_consolidated_proforma_invoice(uid) ## Response Type +**201**: Created + `void` ## Example Usage @@ -63,7 +69,7 @@ proforma_invoices_controller.create_consolidated_proforma_invoice(uid) # List Subscription Group Proforma Invoices -Only proforma invoices with a `consolidation_level` of parent are returned. +Lists proforma invoices with a `consolidation_level` of parent for the subscription group. By default, proforma invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to true. @@ -71,6 +77,10 @@ By default, proforma invoices returned on the index will only include totals, no def list_subscription_group_proforma_invoices(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -85,6 +95,8 @@ def list_subscription_group_proforma_invoices(options = {}) ## Response Type +**200**: OK + [`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md) ## Example Usage @@ -113,7 +125,7 @@ puts result # Read Proforma Invoice -Use this endpoint to read the details of an existing proforma invoice. +Returns the details of an existing proforma invoice. ## Restrictions @@ -123,6 +135,10 @@ Proforma invoices are only available on Relationship Invoicing sites. def read_proforma_invoice(proforma_invoice_uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -131,6 +147,8 @@ def read_proforma_invoice(proforma_invoice_uid) ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -151,7 +169,7 @@ puts result # Create Proforma Invoice -This endpoint will create a proforma invoice and return it as a response. If the information becomes outdated, simply void the old proforma invoice and generate a new one. +Creates a proforma invoice and returns it as a response. If the information becomes outdated, simply void the old proforma invoice and generate a new one. If you would like to preview the next billing amounts without generating a full proforma invoice, use the renewal preview endpoint. @@ -163,6 +181,10 @@ Proforma invoices are only available on Relationship Invoicing sites. To create def create_proforma_invoice(subscription_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -171,6 +193,8 @@ def create_proforma_invoice(subscription_id) ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -191,12 +215,16 @@ puts result # List Proforma Invoices -By default, proforma invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. +Lists proforma invoices for a subscription. By default, results only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. ```ruby def list_proforma_invoices(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -217,6 +245,8 @@ def list_proforma_invoices(options = {}) ## Response Type +**200**: OK + [`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md) ## Example Usage @@ -242,7 +272,7 @@ puts result # Deliver Proforma Invoice -Allows for proforma invoices to be programmatically delivered via email. Supports email +Delivers a proforma invoice programmatically via email. Supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients. If `recipient_emails` is omitted, the system will fall back to the primary recipient derived from the invoice or @@ -254,6 +284,10 @@ def deliver_proforma_invoice(proforma_invoice_uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -263,6 +297,8 @@ def deliver_proforma_invoice(proforma_invoice_uid, ## Response Type +**201**: Created + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -299,7 +335,7 @@ puts result # Void Proforma Invoice -This endpoint will void a proforma invoice that has the status "draft". +Voids a proforma invoice that has the status "draft". ## Restrictions @@ -314,6 +350,10 @@ def void_proforma_invoice(proforma_invoice_uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -323,6 +363,8 @@ def void_proforma_invoice(proforma_invoice_uid, ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -344,7 +386,7 @@ puts result # Preview Proforma Invoice -Return a preview of the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. +Returns a preview of the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. The preview endpoint is subject to all the same conditions as the proforma invoice endpoint. For example, previews are only available on the Relationship Invoicing architecture, and previews cannot be made for end-of-life subscriptions. @@ -356,6 +398,10 @@ Alternatively, if you have some proforma invoices already, you may make a previe def preview_proforma_invoice(subscription_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -364,6 +410,8 @@ def preview_proforma_invoice(subscription_id) ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -385,9 +433,7 @@ puts result # Create Signup Proforma Invoice -This endpoint is only available for Relationship Invoicing sites. It cannot be used to create consolidated proforma invoices or preview prepaid subscriptions. - -Create a proforma invoice to preview costs before a subscription's signup. Like other proforma invoices, it can be emailed to the customer, voided, and publicly viewed on the chargifypay domain. +Creates a proforma invoice to preview costs before a subscription's signup. This endpoint is only available for Relationship Invoicing sites and cannot be used to create consolidated proforma invoices or preview prepaid subscriptions. Like other proforma invoices, it can be emailed to the customer, voided, and publicly viewed on the chargifypay domain. Pass a payload that resembles a subscription create or signup preview request. For example, you can specify components, coupons/a referral, offers, custom pricing, and an existing customer or payment profile to populate a shipping or billing address. @@ -397,6 +443,10 @@ A product and customer first name, last name, and email are the minimum requirem def create_signup_proforma_invoice(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -405,6 +455,8 @@ def create_signup_proforma_invoice(body: nil) ## Response Type +**201**: Created + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -435,9 +487,7 @@ puts result # Preview Signup Proforma Invoice -This endpoint is only available for Relationship Invoicing sites. It cannot be used to create consolidated proforma invoice previews or preview prepaid subscriptions. - -Create a signup preview in the format of a proforma invoice to preview costs before a subscription's signup. You have the option of optionally previewing the first renewal's costs as well. The proforma invoice preview will not be persisted. +Creates a signup preview in the format of a proforma invoice to preview costs before a subscription's signup. This endpoint is only available for Relationship Invoicing sites and cannot be used to create consolidated proforma invoice previews or preview prepaid subscriptions. You have the option of previewing the first renewal's costs as well. The proforma invoice preview will not be persisted. Pass a payload that resembles a subscription create or signup preview request. For example, you can specify components, coupons/a referral, offers, custom pricing, and an existing customer or payment profile to populate a shipping or billing address. @@ -448,6 +498,10 @@ def preview_signup_proforma_invoice(include: nil, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -457,6 +511,8 @@ def preview_signup_proforma_invoice(include: nil, ## Response Type +**201**: Created + [`SignupProformaPreviewResponse`](../../doc/models/signup-proforma-preview-response.md) ## Example Usage diff --git a/doc/controllers/reason-codes.md b/doc/controllers/reason-codes.md index 7515fe2..231ca64 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -19,9 +19,11 @@ reason_codes_controller = client.reason_codes # Create Reason Code +Creates a reason code for a given site. + # Reason Codes Intro -ReasonCodes are a way to gain a high level view of why your customers are cancelling the subscription to your product or service. +Reason Codes are a way to gain a high-level view of why your customers are cancelling the subscription to your product or service. Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel. @@ -33,12 +35,16 @@ Full documentation on how Reason Codes operate within Advanced Billing can be lo ## Create Reason Code -This method gives a merchant the option to create a reason codes for a given Site. +This method gives a merchant the option to create reason codes for a given site. ```ruby def create_reason_code(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -47,6 +53,8 @@ def create_reason_code(body: nil) ## Response Type +**200**: OK + [`ReasonCodeResponse`](../../doc/models/reason-code-response.md) ## Example Usage @@ -73,12 +81,16 @@ puts result # List Reason Codes -This method gives a merchant the option to retrieve a list of all of the current churn codes for a given site. +Lists all current churn codes for a given site. ```ruby def list_reason_codes(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -88,6 +100,8 @@ def list_reason_codes(options = {}) ## Response Type +**200**: OK + [`Array[ReasonCodeResponse]`](../../doc/models/reason-code-response.md) ## Example Usage @@ -151,12 +165,16 @@ puts result # Read Reason Code -This method gives a merchant the option to retrieve a list of a particular code for a given Site by providing the unique numerical ID of the code. +Returns a particular churn reason code for a given site by its unique ID. ```ruby def read_reason_code(reason_code_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -165,6 +183,8 @@ def read_reason_code(reason_code_id) ## Response Type +**200**: OK + [`ReasonCodeResponse`](../../doc/models/reason-code-response.md) ## Example Usage @@ -185,13 +205,17 @@ puts result # Update Reason Code -This method gives a merchant the option to update an existing reason code for a given site. +Updates an existing reason code for a given site. ```ruby def update_reason_code(reason_code_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -201,6 +225,8 @@ def update_reason_code(reason_code_id, ## Response Type +**200**: OK + [`ReasonCodeResponse`](../../doc/models/reason-code-response.md) ## Example Usage @@ -222,12 +248,16 @@ puts result # Delete Reason Code -This method gives a merchant the option to delete one reason code from the Churn Reason Codes. This code will be immediately removed. This action is not reversible. +Deletes a reason code from the Churn Reason Codes. This code will be immediately removed. This action is not reversible. ```ruby def delete_reason_code(reason_code_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -236,6 +266,8 @@ def delete_reason_code(reason_code_id) ## Response Type +**200**: OK + [`OkResponse`](../../doc/models/ok-response.md) ## Example Usage diff --git a/doc/controllers/referral-codes.md b/doc/controllers/referral-codes.md index b6b9b27..f358057 100644 --- a/doc/controllers/referral-codes.md +++ b/doc/controllers/referral-codes.md @@ -11,7 +11,7 @@ referral_codes_controller = client.referral_codes # Validate Referral Code -Use this method to determine if the referral code is valid and applicable within your Site. This method is useful for validating referral codes that are entered by a customer. +Validates whether a referral code is valid and applicable within your site. This method is useful for validating referral codes that are entered by a customer. ## Referrals Documentation @@ -25,6 +25,10 @@ If the referral code is valid the status code will be `200` and the referral cod def validate_referral_code(code) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -33,6 +37,8 @@ def validate_referral_code(code) ## Response Type +**200**: OK + [`ReferralValidationResponse`](../../doc/models/referral-validation-response.md) ## Example Usage diff --git a/doc/controllers/sales-commissions.md b/doc/controllers/sales-commissions.md index 046e895..726ac7f 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -17,7 +17,7 @@ sales_commissions_controller = client.sales_commissions # List Sales Commission Settings -Endpoint returns subscriptions with associated sales reps +Lists subscriptions with associated sales reps. ## Modified Authentication Process @@ -31,6 +31,10 @@ Access to the Sales Commission API endpoints is available to users with financia def list_sales_commission_settings(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -43,6 +47,8 @@ def list_sales_commission_settings(options = {}) ## Response Type +**200**: OK + [`Array[SaleRepSettings]`](../../doc/models/sale-rep-settings.md) ## Example Usage @@ -96,7 +102,7 @@ puts result # List Sales Reps -Endpoint returns sales rep list with details +Returns a sales rep list with details. ## Modified Authentication Process @@ -110,6 +116,10 @@ Access to the Sales Commission API endpoints is available to users with financia def list_sales_reps(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -122,6 +132,8 @@ def list_sales_reps(options = {}) ## Response Type +**200**: OK + [`Array[ListSaleRepItem]`](../../doc/models/list-sale-rep-item.md) ## Example Usage @@ -224,7 +236,7 @@ puts result # Read Sales Rep -Endpoint returns sales rep and attached subscriptions details. +Returns a sales rep and attached subscription details. ## Modified Authentication Process @@ -243,6 +255,10 @@ def read_sales_rep(seller_id, per_page: 100) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -256,6 +272,8 @@ def read_sales_rep(seller_id, ## Response Type +**200**: OK + [`SaleRep`](../../doc/models/sale-rep.md) ## Example Usage diff --git a/doc/controllers/sites.md b/doc/controllers/sites.md index a7d6e76..d4402cb 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -17,15 +17,15 @@ sites_controller = client.sites # Read Site -This endpoint allows you to fetch some site data. +Retrieves site data. Full documentation on Sites in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/sections/24250550707085-Sites). -Specifically, the [Clearing Site Data](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing-Site-Data) section is extremely relevant to this endpoint documentation. +Specifically, the [Clearing Site Data](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing-Site-Data) section is relevant to this endpoint documentation. #### Relationship invoicing enabled -If site has RI enabled then you will see more settings like: +If the site has RI enabled then you will see more settings like: "customer_hierarchy_enabled": true, "whopays_enabled": true, @@ -38,8 +38,14 @@ You can read more about these settings here: def read_site ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**200**: OK + [`SiteResponse`](../../doc/models/site-response.md) ## Example Usage @@ -103,7 +109,7 @@ puts result # Clear Site -This call is asynchronous and there may be a delay before the site data is fully deleted. If you are clearing site data for an automated test, you will need to build in a delay and/or check that there are no products, etc., in the site before proceeding. +Clears all data from a test site asynchronously. This call is asynchronous and there may be a delay before the site data is fully deleted. If you are clearing site data for an automated test, you will need to build in a delay and/or check that there are no products, etc., in the site before proceeding. **This functionality will only work on sites in TEST mode. Attempts to perform this on sites in “live” mode will result in a response of 403 FORBIDDEN.** @@ -111,6 +117,10 @@ This call is asynchronous and there may be a delay before the site data is fully def clear_site(cleanup_scope: CleanupScope::ALL) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -119,6 +129,8 @@ def clear_site(cleanup_scope: CleanupScope::ALL) ## Response Type +**200**: OK + `void` ## Example Usage @@ -132,12 +144,16 @@ sites_controller.clear_site(cleanup_scope: cleanup_scope) # List Chargify Js Public Keys -This endpoint returns public keys used for Chargify.js. +Returns public keys used for Maxio.js (formerly Chargify.js). ```ruby def list_chargify_js_public_keys(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -147,6 +163,8 @@ def list_chargify_js_public_keys(options = {}) ## Response Type +**200**: OK + [`ListPublicKeysResponse`](../../doc/models/list-public-keys-response.md) ## Example Usage diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index f9ae110..d458089 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -31,13 +31,17 @@ subscription_components_controller = client.subscription_components # Read Subscription Component -This request will list information regarding a specific component owned by a subscription. +Returns information for a specific component on a subscription. ```ruby def read_subscription_component(subscription_id, component_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -47,6 +51,8 @@ def read_subscription_component(subscription_id, ## Response Type +**200**: OK + [`SubscriptionComponentResponse`](../../doc/models/subscription-component-response.md) ## Example Usage @@ -91,7 +97,7 @@ puts result # List Subscription Components -This request will list a subscription's applied components. +Lists a subscription's applied components. ## Archived Components @@ -101,6 +107,10 @@ When requesting to list components for a given subscription, if the subscription def list_subscription_components(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -121,6 +131,8 @@ def list_subscription_components(options = {}) ## Response Type +**200**: OK + [`Array[SubscriptionComponentResponse]`](../../doc/models/subscription-component-response.md) ## Example Usage @@ -198,6 +210,10 @@ def bulk_update_subscription_components_price_points(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -207,6 +223,8 @@ def bulk_update_subscription_components_price_points(subscription_id, ## Response Type +**200**: OK + [`BulkComponentsPricePointAssignment`](../../doc/models/bulk-components-price-point-assignment.md) ## Example Usage @@ -272,6 +290,10 @@ Resets all of a subscription's components to use the current default. def bulk_reset_subscription_components_price_points(subscription_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -280,6 +302,8 @@ def bulk_reset_subscription_components_price_points(subscription_id) ## Response Type +**201**: Created + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -398,7 +422,7 @@ Creates an allocation, sets the current allocated quantity for the component, an When creating an allocation via the API, you can pass the `upgrade_charge`, `downgrade_credit`, and `accrue_charge` to be applied. -> **Note:** These proration and accural fields are ignored for Prepaid Components since this component type always generate charges immediately without proration. +> **Note:** These proration and accrual fields are ignored for Prepaid Components since this component type always generates charges immediately without proration. For information on prorated components and upgrade/downgrade schemes, see [Setting Component Allocations.](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration) @@ -416,7 +440,7 @@ For information on prorated components and upgrade/downgrade schemes, see [Setti > **Note:** Proration uses the current price of the component as well as the current tax rates. Changes to either may cause the prorated charge/credit to be wrong. -For more informaiton see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product Documentation. +For more information, see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product Documentation. ```ruby def allocate_component(subscription_id, @@ -424,6 +448,10 @@ def allocate_component(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -434,6 +462,8 @@ def allocate_component(subscription_id, ## Response Type +**200**: OK + [`AllocationResponse`](../../doc/models/allocation-response.md) ## Example Usage @@ -531,7 +561,7 @@ puts result # List Allocations -This endpoint returns the 50 most recent Allocations, ordered by most recent first. +Returns the 50 most recent Allocations, ordered by most recent first. ## On/Off Components @@ -543,6 +573,10 @@ def list_allocations(subscription_id, page: 1) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -553,6 +587,8 @@ def list_allocations(subscription_id, ## Response Type +**200**: OK + [`Array[AllocationResponse]`](../../doc/models/allocation-response.md) ## Example Usage @@ -627,7 +663,7 @@ puts result # Allocate Components -Creates multiple allocations, sets the current allocated quantity for each of the components, and recording a memo. A `component_id` is required for each allocation. +Creates multiple allocations, sets the current allocated quantity for each of the components, and records a memo. A `component_id` is required for each allocation. The charges and/or credits that are created will be rolled up into a single total which is used to determine whether this is an upgrade or a downgrade. @@ -645,13 +681,17 @@ The charges and/or credits that are created will be rolled up into a single tota > **Note:** Proration uses the current price of the component as well as the current tax rates. Changes to either may cause the prorated charge/credit to be wrong. -For more informaiton see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product Documentation. +For more information, see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product documentation. ```ruby def allocate_components(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -661,6 +701,8 @@ def allocate_components(subscription_id, ## Response Type +**200**: OK + [`Array[AllocationResponse]`](../../doc/models/allocation-response.md) ## Example Usage @@ -745,7 +787,7 @@ puts result # Preview Allocations -Advanced Billing offers the ability to preview a potential subscription's **quantity-based** or **on/off** component allocation in the middle of the current billing period. This is useful if you want users to be able to see the effect of a component operation before actually doing it. +Previews a potential subscription's **quantity-based** or **on/off** component allocation in the middle of the current billing period. This is useful if you want users to be able to see the effect of a component operation before actually doing it. ## Fine-grained Component Control: Use with multiple `upgrade_charge`s or `downgrade_credits` @@ -758,6 +800,10 @@ def preview_allocations(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -767,6 +813,8 @@ def preview_allocations(subscription_id, ## Response Type +**200**: OK + [`AllocationPreviewResponse`](../../doc/models/allocation-preview-response.md) ## Example Usage @@ -907,7 +955,7 @@ puts result # Update Prepaid Usage Allocation Expiration Date -When the expiration interval options are selected on a prepaid usage component price point, all allocations will be created with an expiration date. This expiration date can be changed after the fact to allow for extending or shortening the allocation's active window. +Updates the expiration date for a prepaid usage allocation. This expiration date can be changed after the fact to allow for extending or shortening the allocation's active window. In order to change a prepaid usage allocation's expiration date, a PUT call must be made to the allocation's endpoint with a new expiration date. @@ -926,6 +974,10 @@ def update_prepaid_usage_allocation_expiration_date(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -937,6 +989,8 @@ def update_prepaid_usage_allocation_expiration_date(subscription_id, ## Response Type +**204**: OK + `void` ## Example Usage @@ -972,7 +1026,9 @@ subscription_components_controller.update_prepaid_usage_allocation_expiration_da # Delete Prepaid Usage Allocation -Prepaid Usage components are unique in that their allocations are always additive. In order to reduce a subscription's allocated quantity for a prepaid usage component each allocation must be destroyed individually via this endpoint. +Deletes a prepaid usage allocation. + +Prepaid Usage components are unique in that their allocations are always additive. In order to reduce a subscription's allocated quantity for a prepaid usage component, each allocation must be destroyed individually via this endpoint. ## Credit Scheme @@ -989,6 +1045,10 @@ def delete_prepaid_usage_allocation(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1000,6 +1060,8 @@ def delete_prepaid_usage_allocation(subscription_id, ## Response Type +**200**: OK + `void` ## Example Usage @@ -1039,11 +1101,11 @@ You can report metered or prepaid usage to Advanced Billing as often as you wish Full documentation on how to create Components in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). Additionally, for information on how to record component usage against a subscription, see the following resources: -It is not possible to record metered usage for more than one component at a time Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each. +It is not possible to record metered usage for more than one component at a time. Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each. -See the following product documention articles for more information: +See the following product documentation articles for more information: -- [Create and Manage Components](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). A +- [Create and Manage Components](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components) - [Recording Metered Component Usage](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-metered-component-usage) - [Reporting Prepaid Component Status](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-prepaid-component-status) @@ -1091,6 +1153,10 @@ def create_usage(subscription_id_or_reference, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1101,6 +1167,8 @@ def create_usage(subscription_id_or_reference, ## Response Type +**200**: OK + [`UsageResponse`](../../doc/models/usage-response.md) ## Example Usage @@ -1152,7 +1220,7 @@ puts result # List Usages -This request will return a list of the usages associated with a subscription for a particular metered component. This will display the previously recorded components for a subscription. +Returns a list of usages associated with a subscription for a particular metered component. This will display the previously recorded components for a subscription. This endpoint is not compatible with quantity-based components. @@ -1172,6 +1240,10 @@ Use this endpoint to read the previously recorded components for a subscription. def list_usages(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1187,6 +1259,8 @@ def list_usages(options = {}) ## Response Type +**200**: OK + [`Array[UsageResponse]`](../../doc/models/usage-response.md) ## Example Usage @@ -1237,6 +1311,8 @@ puts result # Activate Event Based Component +Activates an event-based component for a single subscription. + In order to bill your subscribers on your Events data under the Events-Based Billing feature, the components must be activated for the subscriber. Learn more about the role of activation in the [Events-Based Billing docs](https://maxio.zendesk.com/hc/en-us/articles/24260323329805-Events-Based-Billing-Overview). @@ -1251,6 +1327,10 @@ def activate_event_based_component(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1261,6 +1341,8 @@ def activate_event_based_component(subscription_id, ## Response Type +**200**: OK + `void` ## Example Usage @@ -1300,13 +1382,17 @@ subscription_components_controller.activate_event_based_component( # Deactivate Event Based Component -Use this endpoint to deactivate an event-based component for a single subscription. Deactivating the event-based component causes Advanced Billing to ignore related events at subscription renewal. +Deactivates an event-based component for a single subscription. Deactivating the event-based component causes Advanced Billing to ignore related events at subscription renewal. ```ruby def deactivate_event_based_component(subscription_id, component_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1316,6 +1402,8 @@ def deactivate_event_based_component(subscription_id, ## Response Type +**200**: OK + `void` ## Example Usage @@ -1334,6 +1422,8 @@ subscription_components_controller.deactivate_event_based_component( # Record Event +Records a single event for Events-Based Billing. + ## Documentation Events-Based Billing is an evolved form of metered billing that is based on data-rich events streamed in real-time from your system to Advanced Billing. @@ -1360,6 +1450,10 @@ def record_event(api_handle, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1374,6 +1468,8 @@ def record_event(api_handle, ## Response Type +**201**: Created + `void` ## Example Usage @@ -1397,7 +1493,7 @@ subscription_components_controller.record_event( # Bulk Record Events -Use this endpoint to record a collection of events. +Records a collection of events. *Note: this endpoint differs from the standard Chargify API endpoints in that the subdomain will be `events` and your site subdomain will be included in the URL path.* @@ -1409,6 +1505,10 @@ def bulk_record_events(api_handle, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1423,6 +1523,8 @@ def bulk_record_events(api_handle, ## Response Type +**201**: Created + `void` ## Example Usage @@ -1448,12 +1550,16 @@ subscription_components_controller.bulk_record_events( # List Subscription Components for Site -This request will list components applied to each subscription. +Lists components applied to each subscription. ```ruby def list_subscription_components_for_site(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1475,6 +1581,8 @@ def list_subscription_components_for_site(options = {}) ## Response Type +**200**: OK + [`ListSubscriptionComponentsResponse`](../../doc/models/list-subscription-components-response.md) ## Example Usage diff --git a/doc/controllers/subscription-group-invoice-account.md b/doc/controllers/subscription-group-invoice-account.md index 27fa044..dc906cc 100644 --- a/doc/controllers/subscription-group-invoice-account.md +++ b/doc/controllers/subscription-group-invoice-account.md @@ -18,13 +18,17 @@ subscription_group_invoice_account_controller = client.subscription_group_invoic # Create Subscription Group Prepayment -A prepayment can be added for a subscription group identified by the group's `uid`. This endpoint requires a `amount`, `details`, `method`, and `memo`. On success, the prepayment will be added to the group's prepayment balance. +Adds a prepayment for a subscription group. This endpoint requires an `amount`, `details`, `method`, and `memo`. On success, the prepayment will be added to the group's prepayment balance. ```ruby def create_subscription_group_prepayment(uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -34,6 +38,8 @@ def create_subscription_group_prepayment(uid, ## Response Type +**200**: OK + [`SubscriptionGroupPrepaymentResponse`](../../doc/models/subscription-group-prepayment-response.md) ## Example Usage @@ -66,12 +72,16 @@ puts result # List Prepayments for Subscription Group -This request will list a subscription group's prepayments. +Lists a subscription group's prepayments. ```ruby def list_prepayments_for_subscription_group(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -83,6 +93,8 @@ def list_prepayments_for_subscription_group(options = {}) ## Response Type +**200**: OK + [`ListSubscriptionGroupPrepaymentResponse`](../../doc/models/list-subscription-group-prepayment-response.md) ## Example Usage @@ -134,13 +146,17 @@ puts result # Issue Subscription Group Service Credit -Credit can be issued for a subscription group identified by the group's `uid`. Credit will be added to the group in the amount specified in the request body. The credit will be applied to group member invoices as they are generated. +Issues service credit for a subscription group. Credit will be added to the group in the amount specified in the request body. The credit will be applied to group member invoices as they are generated. ```ruby def issue_subscription_group_service_credit(uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -150,6 +166,8 @@ def issue_subscription_group_service_credit(uid, ## Response Type +**200**: OK + [`ServiceCreditResponse`](../../doc/models/service-credit-response.md) ## Example Usage @@ -194,13 +212,17 @@ puts result # Deduct Subscription Group Service Credit -Credit can be deducted for a subscription group identified by the group's `uid`. Credit will be deducted from the group in the amount specified in the request body. +Deducts service credit for a subscription group. Credit will be deducted from the group in the amount specified in the request body. ```ruby def deduct_subscription_group_service_credit(uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -210,6 +232,8 @@ def deduct_subscription_group_service_credit(uid, ## Response Type +**201**: Created + [`ServiceCredit`](../../doc/models/service-credit.md) ## Example Usage diff --git a/doc/controllers/subscription-group-status.md b/doc/controllers/subscription-group-status.md index e94842c..9f1f508 100644 --- a/doc/controllers/subscription-group-status.md +++ b/doc/controllers/subscription-group-status.md @@ -27,6 +27,10 @@ def cancel_subscriptions_in_group(uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -36,6 +40,8 @@ def cancel_subscriptions_in_group(uid, ## Response Type +**200**: OK + `void` ## Example Usage @@ -62,7 +68,7 @@ subscription_group_status_controller.cancel_subscriptions_in_group( # Initiate Delayed Cancellation for Group -This endpoint will schedule all subscriptions within the specified group to be canceled at the end of their billing period. The group is identified by its uid passed in the URL. +Schedules all subscriptions within the specified group to be canceled at the end of their billing period. The group is identified by its uid passed in the URL. All subscriptions in the group must be on automatic billing in order to successfully cancel them, and the group must not be in a "past_due" state. @@ -70,6 +76,10 @@ All subscriptions in the group must be on automatic billing in order to successf def initiate_delayed_cancellation_for_group(uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -78,6 +88,8 @@ def initiate_delayed_cancellation_for_group(uid) ## Response Type +**200**: OK + `void` ## Example Usage @@ -97,12 +109,18 @@ subscription_group_status_controller.initiate_delayed_cancellation_for_group(uid # Cancel Delayed Cancellation for Group +Removes the delayed cancellation on a subscription group. + Removing the delayed cancellation on a subscription group will ensure that the subscriptions do not get canceled at the end of the period. The request will reset the `cancel_at_end_of_period` flag to false on each member in the group. ```ruby def cancel_delayed_cancellation_for_group(uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -111,6 +129,8 @@ def cancel_delayed_cancellation_for_group(uid) ## Response Type +**200**: OK + `void` ## Example Usage @@ -130,15 +150,15 @@ subscription_group_status_controller.cancel_delayed_cancellation_for_group(uid) # Reactivate Subscription Group -This endpoint will attempt to reactivate or resume a cancelled subscription group. Upon reactivation, any canceled invoices created after the beginning of the primary subscription's billing period will be reopened and payment will be attempted on them. If the subscription group is being reactivated (as opposed to resumed), new charges will also be assessed for the new billing period. +Reactivates or resumes a cancelled subscription group. Upon reactivation, any canceled invoices created after the beginning of the primary subscription's billing period will be reopened and payment will be attempted on them. If the subscription group is being reactivated (as opposed to resumed), new charges will also be assessed for the new billing period. Whether a subscription group is reactivated (a new billing period is created) or resumed (the current billing period is respected) will depend on the parameters that are sent with the request as well as the date of the request relative to the primary subscription's period. ## Reactivating within the current period -If a subscription group is cancelled and reactivated within the primary subscription's current period, we can choose to either start a new billing period or maintain the existing one. If we want to maintain the existing billing period the `resume=true` option must be passed in request parameters. +If a subscription group is cancelled and reactivated within the primary subscription's current period, we can choose to either start a new billing period or maintain the existing one. If we want to maintain the existing billing period, the `resume=true` option must be passed in request parameters. -An exception to the above are subscriptions that are on calendar billing. These subscriptions cannot be reactivated within the current period. If the `resume=true` option is not passed the request will return an error. +An exception to the above are subscriptions that are on calendar billing. These subscriptions cannot be reactivated within the current period. If the `resume=true` option is not passed, the request will return an error. The `resume_members` option is ignored in this case. All eligible group members will be automatically resumed. @@ -150,11 +170,21 @@ Member subscriptions can have billing periods that are longer than the primary ( For calendar billing subscriptions, the new billing period created will be a partial one, spanning from the date of reactivation to the next corresponding calendar renewal date. +## 3D Secure (3DS) Authentication post-authentication flow + +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. + +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. + ```ruby def reactivate_subscription_group(uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -164,6 +194,8 @@ def reactivate_subscription_group(uid, ## Response Type +**200**: OK + [`ReactivateSubscriptionGroupResponse`](../../doc/models/reactivate-subscription-group-response.md) ## Example Usage diff --git a/doc/controllers/subscription-groups.md b/doc/controllers/subscription-groups.md index 515f3a8..2c4bf8f 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -10,7 +10,7 @@ subscription_groups_controller = client.subscription_groups ## Methods -* [Signup With Subscription Group](../../doc/controllers/subscription-groups.md#signup-with-subscription-group) +* [Signup with Subscription Group](../../doc/controllers/subscription-groups.md#signup-with-subscription-group) * [Create Subscription Group](../../doc/controllers/subscription-groups.md#create-subscription-group) * [List Subscription Groups](../../doc/controllers/subscription-groups.md#list-subscription-groups) * [Read Subscription Group](../../doc/controllers/subscription-groups.md#read-subscription-group) @@ -18,12 +18,12 @@ subscription_groups_controller = client.subscription_groups * [Delete Subscription Group](../../doc/controllers/subscription-groups.md#delete-subscription-group) * [Find Subscription Group](../../doc/controllers/subscription-groups.md#find-subscription-group) * [Add Subscription to Group](../../doc/controllers/subscription-groups.md#add-subscription-to-group) -* [Remove Subscription From Group](../../doc/controllers/subscription-groups.md#remove-subscription-from-group) +* [Remove Subscription from Group](../../doc/controllers/subscription-groups.md#remove-subscription-from-group) -# Signup With Subscription Group +# Signup with Subscription Group -Create multiple subscriptions at once under the same customer and consolidate them into a subscription group. +Creates multiple subscriptions at once under the same customer and consolidates them into a subscription group. You must provide one and only one of the `payer_id`/`payer_reference`/`payer_attributes` for the customer attached to the group. @@ -31,14 +31,18 @@ You must provide one and only one of the `payment_profile_id`/`credit_card_attri Only one of the `subscriptions` can have `"primary": true` attribute set. -When passing product to a subscription you can use either `product_id` or `product_handle` or `offer_id`. You can also use `custom_price` instead. +When passing a product to a subscription you can use either `product_id` or `product_handle` or `offer_id`. You can also use `custom_price` instead. The subscription request examples below will be split into two sections. -The first section, "Subscription Customization", will focus on passing different information with a subscription, such as components, calendar billing, and custom fields. These examples will presume you are using a secure chargify_token generated by Chargify.js. +The first section, "Subscription Customization", will focus on passing different information with a subscription, such as components, calendar billing, and custom fields. These examples will presume you are using a secure chargify_token generated by Maxio.js (formerly Chargify.js). ```ruby def signup_with_subscription_group(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -47,6 +51,8 @@ def signup_with_subscription_group(body: nil) ## Response Type +**201**: Created + [`SubscriptionGroupSignupResponse`](../../doc/models/subscription-group-signup-response.md) ## Example Usage @@ -90,6 +96,10 @@ Creates a subscription group with given members. def create_subscription_group(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -98,6 +108,8 @@ def create_subscription_group(body: nil) ## Response Type +**200**: OK + [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) ## Example Usage @@ -160,6 +172,10 @@ Account balance information for the subscription groups is not returned by defau def list_subscription_groups(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -170,6 +186,8 @@ def list_subscription_groups(options = {}) ## Response Type +**200**: OK + [`ListSubscriptionGroupsResponse`](../../doc/models/list-subscription-groups-response.md) ## Example Usage @@ -228,7 +246,7 @@ puts result # Read Subscription Group -Use this endpoint to find subscription group details. +Returns subscription group details. #### Current Billing Amount in Cents @@ -239,6 +257,10 @@ def read_subscription_group(uid, include: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -248,6 +270,8 @@ def read_subscription_group(uid, ## Response Type +**200**: OK + [`FullSubscriptionGroupResponse`](../../doc/models/full-subscription-group-response.md) ## Example Usage @@ -311,14 +335,18 @@ puts result # Update Subscription Group Members -Use this endpoint to update subscription group members. -`"member_ids"` should contain an array of both subscription IDs to set as group members and subscription IDs already present in the groups. Not including them will result in removing them from subscription group. To clean up members, just leave the array empty. +Updates subscription group members. +`"member_ids"` should contain an array of both subscription IDs to set as group members and subscription IDs already present in the groups. Not including them will result in removing them from the subscription group. To clean up members, just leave the array empty. ```ruby def update_subscription_group_members(uid, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -328,6 +356,8 @@ def update_subscription_group_members(uid, ## Response Type +**200**: OK + [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) ## Example Usage @@ -389,6 +419,10 @@ Only groups without members can be deleted. def delete_subscription_group(uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -397,6 +431,8 @@ def delete_subscription_group(uid) ## Response Type +**200**: OK + [`DeleteSubscriptionGroupResponse`](../../doc/models/delete-subscription-group-response.md) ## Example Usage @@ -426,14 +462,18 @@ puts result # Find Subscription Group -Use this endpoint to find subscription group associated with subscription. +Finds the subscription group associated with a subscription. -If the subscription is not in a group endpoint will return 404 code. +If the subscription is not in a group, the endpoint will return a 404 code. ```ruby def find_subscription_group(subscription_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -442,6 +482,8 @@ def find_subscription_group(subscription_id) ## Response Type +**200**: OK + [`FullSubscriptionGroupResponse`](../../doc/models/full-subscription-group-response.md) ## Example Usage @@ -523,6 +565,10 @@ def add_subscription_to_group(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -532,6 +578,8 @@ def add_subscription_to_group(subscription_id, ## Response Type +**200**: OK + [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) ## Example Usage @@ -583,14 +631,18 @@ puts result ``` -# Remove Subscription From Group +# Remove Subscription from Group -For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays#customer-hierarchies) features, it is possible to remove existing subscription from subscription group. +For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays#customer-hierarchies) features, it is possible to remove an existing subscription from a subscription group. ```ruby def remove_subscription_from_group(subscription_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -599,6 +651,8 @@ def remove_subscription_from_group(subscription_id) ## Response Type +**204**: No Content + `void` ## Example Usage diff --git a/doc/controllers/subscription-invoice-account.md b/doc/controllers/subscription-invoice-account.md index 534a858..4c2135a 100644 --- a/doc/controllers/subscription-invoice-account.md +++ b/doc/controllers/subscription-invoice-account.md @@ -27,6 +27,10 @@ Returns the `balance_in_cents` of the Subscription's Pending Discount, Service C def read_account_balances(subscription_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -35,6 +39,8 @@ def read_account_balances(subscription_id) ## Response Type +**200**: OK + [`AccountBalances`](../../doc/models/account-balances.md) ## Example Usage @@ -49,7 +55,7 @@ puts result # Create Prepayment -## Create Prepayment +Creates a prepayment for a subscription. In order to specify a prepayment made against a subscription, specify the `amount, memo, details, method`. @@ -57,11 +63,21 @@ When the `method` specified is `"credit_card_on_file"`, the prepayment amount wi Note that passing `amount_in_cents` is now allowed. +## 3D Secure (3DS) Authentication post-authentication flow + +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. + +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. + ```ruby def create_prepayment(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -71,6 +87,8 @@ def create_prepayment(subscription_id, ## Response Type +**201**: Created + [`CreatePrepaymentResponse`](../../doc/models/create-prepayment-response.md) ## Example Usage @@ -119,12 +137,16 @@ puts result # List Prepayments -This request will list a subscription's prepayments. +Lists a subscription's prepayments. ```ruby def list_prepayments(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -136,6 +158,8 @@ def list_prepayments(options = {}) ## Response Type +**200**: OK + [`PrepaymentsResponse`](../../doc/models/prepayments-response.md) ## Example Usage @@ -186,13 +210,17 @@ puts result # Issue Service Credit -Credit will be added to the subscription in the amount specified in the request body. The credit is subsequently applied to the next generated invoice. +Adds a service credit to the subscription in the specified amount. The credit is subsequently applied to the next generated invoice. ```ruby def issue_service_credit(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -202,6 +230,8 @@ def issue_service_credit(subscription_id, ## Response Type +**201**: Created + [`ServiceCredit`](../../doc/models/service-credit.md) ## Example Usage @@ -243,13 +273,17 @@ puts result # Deduct Service Credit -Credit will be removed from the subscription in the amount specified in the request body. The credit amount being deducted must be equal to or less than the current credit balance. +Deducts a service credit from the subscription in the specified amount. The credit amount being deducted must be equal to or less than the current credit balance. ```ruby def deduct_service_credit(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -259,6 +293,8 @@ def deduct_service_credit(subscription_id, ## Response Type +**201**: OK + `void` ## Example Usage @@ -288,7 +324,7 @@ subscription_invoice_account_controller.deduct_service_credit( # List Service Credits -This request will list a subscription's service credits. +Lists a subscription's service credits. ```ruby def list_service_credits(subscription_id, @@ -297,6 +333,10 @@ def list_service_credits(subscription_id, direction: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -308,6 +348,8 @@ def list_service_credits(subscription_id, ## Response Type +**200**: OK + [`ListServiceCreditsResponse`](../../doc/models/list-service-credits-response.md) ## Example Usage @@ -366,7 +408,7 @@ puts result # Refund Prepayment -This endpoint will refund, completely or partially, a particular prepayment applied to a subscription. The `prepayment_id` will be the account transaction ID of the original payment. The prepayment must have some amount remaining in order to be refunded. +Refunds a prepayment applied to a subscription, either fully or partially. The `prepayment_id` will be the account transaction ID of the original payment. The prepayment must have some amount remaining in order to be refunded. The amount may be passed either as a decimal, with `amount`, or an integer in cents, with `amount_in_cents`. @@ -376,6 +418,10 @@ def refund_prepayment(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -386,6 +432,8 @@ def refund_prepayment(subscription_id, ## Response Type +**201**: Created + [`PrepaymentResponse`](../../doc/models/prepayment-response.md) ## Example Usage diff --git a/doc/controllers/subscription-notes.md b/doc/controllers/subscription-notes.md index 4227078..6ec186e 100644 --- a/doc/controllers/subscription-notes.md +++ b/doc/controllers/subscription-notes.md @@ -19,7 +19,7 @@ subscription_notes_controller = client.subscription_notes # Create Subscription Note -Use the following method to create a note for a subscription. +Creates a note for a subscription. ## How to Use Subscription Notes @@ -34,6 +34,10 @@ def create_subscription_note(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -43,6 +47,8 @@ def create_subscription_note(subscription_id, ## Response Type +**200**: OK + [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -73,12 +79,16 @@ puts result # List Subscription Notes -Use this method to retrieve a list of Notes associated with a Subscription. The response will be an array of Notes. +Retrieves a list of notes associated with a subscription. The response will be an array of Notes. ```ruby def list_subscription_notes(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -89,6 +99,8 @@ def list_subscription_notes(options = {}) ## Response Type +**200**: OK + [`Array[SubscriptionNoteResponse]`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -140,13 +152,17 @@ puts result # Read Subscription Note -Once you have obtained the ID of the note you wish to read, use this method to show a particular note attached to a subscription. +Retrieves a specific note attached to a subscription. ```ruby def read_subscription_note(subscription_id, note_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -156,6 +172,8 @@ def read_subscription_note(subscription_id, ## Response Type +**200**: OK + [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -190,7 +208,7 @@ puts result # Update Subscription Note -Use the following method to update a note for a Subscription. +Updates a note for a subscription. ```ruby def update_subscription_note(subscription_id, @@ -198,6 +216,10 @@ def update_subscription_note(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -208,6 +230,8 @@ def update_subscription_note(subscription_id, ## Response Type +**200**: OK + [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -248,6 +272,10 @@ def delete_subscription_note(subscription_id, note_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -257,6 +285,8 @@ def delete_subscription_note(subscription_id, ## Response Type +**200**: OK + `void` ## Example Usage diff --git a/doc/controllers/subscription-products.md b/doc/controllers/subscription-products.md index bf3adba..d9bacd6 100644 --- a/doc/controllers/subscription-products.md +++ b/doc/controllers/subscription-products.md @@ -16,6 +16,8 @@ subscription_products_controller = client.subscription_products # Migrate Subscription Product +Migrates a subscription to a different product. + In order to create a migration, you must pass the `product_id` or `product_handle` in the object when you send a POST request. You may also pass either a `product_price_point_id` or `product_price_point_handle` to choose which price point the subscription is moved to. If no price point identifier is passed the subscription will be moved to the products default price point. The response will be the updated subscription. ## Valid Subscriptions @@ -30,54 +32,23 @@ Full documentation on how to record Migrations in the Advanced Billing UI can be ## Failed Migrations -Importaint note: One of the most common ways that a migration can fail is when the attempt is made to migrate a subscription to its current product. - -## Migration 3D Secure - Stripe - -When a payment requires 3D Secure Authentication to adhear to Strong Customer Authentication (SCA) when the subscription is migrated to a new product, the request enters a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response: - -```json -{ - "errors": [ - "Your card was declined. This transaction requires 3D secure 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=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_time_token_id=242" -} -``` - -To let the customer go through 3D Secure Authentication, they need to be redirected to the URL specified in `action_link`. -Optionally, you can specify `callback_url` parameter in the `action_link` URL if you’d like to be notified about the result of 3D Secure Authentication. The `callback_url` will return the following information: - -- whether the authentication was successful (`success`) -- the gateway ID for the payment (`gateway_payment_id`) -- the subscription ID (`subscription_id`) +Important note: One of the most common ways that a migration can fail is when the attempt is made to migrate a subscription to its current product. -Lastly, you can also specify a `redirect_url` within the `action_link` URL if you’d like to redirect a customer back to your site. +## 3D Secure (3DS) Authentication post-authentication flow -It is not possible to use `action_link` in an iframe inside a custom application. You have to redirect the customer directly to the `action_link`, then, to be notified about the result, use `redirect_url` or `callback_url`. +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. -The final URL that you send a customer to to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com` - -### Example Redirect Flow - -You may wish to redirect customers to different pages depending on whether SCA was performed successfully. Here's an example flow to use as a reference: - -1. Create a migration via API; it requires 3DS -2. You receive a `gateway_payment_id` in the `action_link` along other params in the response. -3. Use this `gateway_payment_id` to, for example, connect with your internal resources or generate a session_id -4. Include 1 of those attributes inside the `callback_url` and `redirect_url` to be aware which “session” this applies to -5. Redirect the customer to the `action_link` with `callback_url` and `redirect_url` applied -6. After the customer finishes 3DS authentication, we let you know the result by making a request to applied `callback_url`. -7. After that, we redirect the customer to the `redirect_url`; at this point the result of authentication is known -8. Optionally, you can use the applied "msg" param in the `redirect_url` to determine whether it was successful or not. +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```ruby def migrate_subscription_product(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -87,6 +58,8 @@ def migrate_subscription_product(subscription_id, ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -244,9 +217,11 @@ puts result # Preview Subscription Product Migration +Previews the charges resulting from migrating a subscription to a different product. + ## Previewing a future date -It is also possible to preview the migration for a date in the future, as long as it's still within the subscription's current billing period, by passing a `proration_date` along with the request (eg: `"proration_date": "2020-12-18T18:25:43.511Z"`). +It is also possible to preview the migration for a date in the future, as long as it's still within the subscription's current billing period, by passing a `proration_date` along with the request (e.g., `"proration_date": "2020-12-18T18:25:43.511Z"`). This will calculate the prorated adjustment, charge, payment and credit applied values assuming the migration is done at that date in the future as opposed to right now. @@ -255,6 +230,10 @@ def preview_subscription_product_migration(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -264,6 +243,8 @@ def preview_subscription_product_migration(subscription_id, ## Response Type +**200**: OK + [`SubscriptionMigrationPreviewResponse`](../../doc/models/subscription-migration-preview-response.md) ## Example Usage diff --git a/doc/controllers/subscription-renewals.md b/doc/controllers/subscription-renewals.md index fbcb4fe..20b5d3e 100644 --- a/doc/controllers/subscription-renewals.md +++ b/doc/controllers/subscription-renewals.md @@ -32,6 +32,10 @@ def create_scheduled_renewal_configuration(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -41,6 +45,8 @@ def create_scheduled_renewal_configuration(subscription_id, ## Response Type +**201**: Created + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -123,6 +129,10 @@ def list_scheduled_renewal_configurations(subscription_id, status: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -132,6 +142,8 @@ def list_scheduled_renewal_configurations(subscription_id, ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationsResponse`](../../doc/models/scheduled-renewal-configurations-response.md) ## Example Usage @@ -198,6 +210,10 @@ def read_scheduled_renewal_configuration(subscription_id, id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -207,6 +223,8 @@ def read_scheduled_renewal_configuration(subscription_id, ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -277,6 +295,10 @@ def update_scheduled_renewal_configuration(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -287,6 +309,8 @@ def update_scheduled_renewal_configuration(subscription_id, ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -372,6 +396,10 @@ def schedule_scheduled_renewal_lock_in(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -382,6 +410,8 @@ def schedule_scheduled_renewal_lock_in(subscription_id, ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -462,6 +492,10 @@ def lock_in_scheduled_renewal_immediately(subscription_id, id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -471,6 +505,8 @@ def lock_in_scheduled_renewal_immediately(subscription_id, ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -545,6 +581,10 @@ def unpublish_scheduled_renewal_configuration(subscription_id, id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -554,6 +594,8 @@ def unpublish_scheduled_renewal_configuration(subscription_id, ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -620,6 +662,10 @@ def cancel_scheduled_renewal_configuration(subscription_id, id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -629,6 +675,8 @@ def cancel_scheduled_renewal_configuration(subscription_id, ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -696,6 +744,10 @@ def create_scheduled_renewal_configuration_item(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -706,6 +758,8 @@ def create_scheduled_renewal_configuration_item(subscription_id, ## Response Type +**201**: Created + [`ScheduledRenewalConfigurationItemResponse`](../../doc/models/scheduled-renewal-configuration-item-response.md) ## Example Usage @@ -779,6 +833,10 @@ def update_scheduled_renewal_configuration_item(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -790,6 +848,8 @@ def update_scheduled_renewal_configuration_item(subscription_id, ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationItemResponse`](../../doc/models/scheduled-renewal-configuration-item-response.md) ## Example Usage @@ -865,6 +925,10 @@ def delete_scheduled_renewal_configuration_item(subscription_id, id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -875,6 +939,8 @@ def delete_scheduled_renewal_configuration_item(subscription_id, ## Response Type +**204**: No Content + `void` ## Example Usage diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md index 7790579..149fb71 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -24,20 +24,22 @@ subscription_status_controller = client.subscription_status # Retry Subscription -Advanced Billing offers the ability to retry collecting the balance due on a past due Subscription without waiting for the next scheduled attempt. +Retries collecting the balance due on a past-due subscription without waiting for the next scheduled attempt. -## Successful Reactivation +## 3D Secure (3DS) Authentication post-authentication flow -The response will be `200 OK` with the updated Subscription. +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. -## Failed Reactivation - -The response will be `422 "Unprocessable Entity`. +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```ruby def retry_subscription(subscription_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -46,6 +48,8 @@ def retry_subscription(subscription_id) ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -210,6 +214,10 @@ def cancel_subscription(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -219,6 +227,8 @@ def cancel_subscription(subscription_id, ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -376,13 +386,17 @@ puts result # Resume Subscription -Resume a paused (on-hold) subscription. If the normal next renewal date has not passed, the subscription will return to active and will renew on that date. Otherwise, it will behave like a reactivation, setting the billing date to 'now' and charging the subscriber. +Resumes a paused (on-hold) subscription. If the normal next renewal date has not passed, the subscription will return to active and will renew on that date. Otherwise, it will behave like a reactivation, setting the billing date to 'now' and charging the subscriber. ```ruby def resume_subscription(subscription_id, calendar_billing_resumption_charge: ResumptionCharge::PRORATED) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -392,6 +406,8 @@ def resume_subscription(subscription_id, ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -521,7 +537,7 @@ puts result # Pause Subscription -This will place the subscription in the on_hold state and it will not renew. +Places the subscription on hold, preventing it from renewing. ## Limitations @@ -532,6 +548,10 @@ def pause_subscription(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -541,6 +561,8 @@ def pause_subscription(subscription_id, ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -679,19 +701,23 @@ puts result # Update Automatic Subscription Resumption -Once a subscription has been paused / put on hold, you can update the date which was specified to automatically resume the subscription. +Updates the date on which a paused subscription will automatically resume. To update a subscription's resume date, use this method to change or update the `automatically_resume_at` date. ### Remove the resume date -Alternately, you can change the `automatically_resume_at` to `null` if you would like the subscription to not have a resume date. +Alternatively, you can change the `automatically_resume_at` to `null` if you would like the subscription to not have a resume date. ```ruby def update_automatic_subscription_resumption(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -701,6 +727,8 @@ def update_automatic_subscription_resumption(subscription_id, ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -850,7 +878,7 @@ puts result # Reactivate Subscription -Reactivate a previously canceled subscription. For details on how the reactivation works, and how to reactivate subscriptions through the application, see [reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming). +Reactivates a previously canceled subscription. For details on how the reactivation works, and how to reactivate subscriptions through the application, see [reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming). **Note: The term "resume" is used also during another process in Advanced Billing. This occurs when an on-hold subscription is "resumed". This returns the subscription to an active state.** @@ -871,7 +899,7 @@ If a reactivation with `resume: true` were attempted _before_ what would have be If a reactivation with `resume: true` were attempted _after_ what would have been the next billing date of July 1st, then Advanced Billing would not resume the subscription, and instead it would be reactivated with a new billing period. -If a reactivation with `resume: false`, or where 'resume" is omited were attempted, then Advanced Billing would reactivate the subscription with a new billing period regardless of whether or not resuming the previous billing period were possible. +If a reactivation with `resume: false`, or where 'resume' is omitted were attempted, then Advanced Billing would reactivate the subscription with a new billing period regardless of whether or not resuming the previous billing period was possible. | Canceled | Reactivation | Resumable? | |---|---|---| @@ -1011,11 +1039,21 @@ PUT request sent to: + The next billing date should not have changed + Any product-related charges should have been collected +## 3D Secure (3DS) Authentication post-authentication flow + +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. + +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. + ```ruby def reactivate_subscription(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1025,6 +1063,8 @@ def reactivate_subscription(subscription_id, ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -1176,6 +1216,10 @@ def initiate_delayed_cancellation(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1185,6 +1229,8 @@ def initiate_delayed_cancellation(subscription_id, ## Response Type +**200**: OK + [`DelayedCancellationResponse`](../../doc/models/delayed-cancellation-response.md) ## Example Usage @@ -1206,7 +1252,7 @@ puts result # Cancel Delayed Cancellation -Removing the delayed cancellation on a subscription will ensure that it doesn't get canceled at the end of the period that it is in. The request will reset the `cancel_at_end_of_period` flag to `false`. +Removes the delayed cancellation from a subscription, ensuring it is not canceled at the end of the current period. The request will reset the `cancel_at_end_of_period` flag to `false`. This endpoint is idempotent. If the subscription was not set to cancel in the future, removing the delayed cancellation has no effect and the call will be successful. @@ -1214,6 +1260,10 @@ This endpoint is idempotent. If the subscription was not set to cancel in the fu def cancel_delayed_cancellation(subscription_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1222,6 +1272,8 @@ def cancel_delayed_cancellation(subscription_id) ## Response Type +**200**: OK + [`DelayedCancellationResponse`](../../doc/models/delayed-cancellation-response.md) ## Example Usage @@ -1250,12 +1302,16 @@ puts result # Cancel Dunning -If a subscription is currently in dunning, the subscription will be set to active and the active Dunner will be resolved. +Cancels the active dunning process for a subscription and sets it to active. ```ruby def cancel_dunning(subscription_id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1264,6 +1320,8 @@ def cancel_dunning(subscription_id) ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -1284,7 +1342,7 @@ puts result # Preview Renewal -The Chargify API allows you to preview a renewal by posting to the renewals endpoint. Renewal Preview is an object representing a subscription’s next assessment. You can retrieve it to see a snapshot of how much your customer will be charged on their next renewal. +Previews a subscription’s next renewal assessment. Renewal Preview is an object representing a subscription’s next assessment. You can retrieve it to see a snapshot of how much your customer will be charged on their next renewal. The "Next Billing" amount and "Next Billing" date are already represented in the UI on each Subscriber's Summary. For more information, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). @@ -1312,6 +1370,10 @@ def preview_renewal(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1321,6 +1383,8 @@ def preview_renewal(subscription_id, ## Response Type +**200**: OK + [`RenewalPreviewResponse`](../../doc/models/renewal-preview-response.md) ## Example Usage diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md index 4a8883c..663af6c 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -20,32 +20,44 @@ subscriptions_controller = client.subscriptions * [Update Prepaid Subscription Configuration](../../doc/controllers/subscriptions.md#update-prepaid-subscription-configuration) * [Preview Subscription](../../doc/controllers/subscriptions.md#preview-subscription) * [Apply Coupons to Subscription](../../doc/controllers/subscriptions.md#apply-coupons-to-subscription) -* [Remove Coupon From Subscription](../../doc/controllers/subscriptions.md#remove-coupon-from-subscription) +* [Remove Coupon from Subscription](../../doc/controllers/subscriptions.md#remove-coupon-from-subscription) * [Activate Subscription](../../doc/controllers/subscriptions.md#activate-subscription) # Create Subscription -Creates a Subscription for a customer and product +Creates a Subscription for a customer and product. -Specify the product with `product_id` or `product_handle`. To set a specific product pricepPoint, use `product_price_point_handle` or `product_price_point_id`. +Specify the product with `product_id` or `product_handle`. To set a specific product price point, use `product_price_point_handle` or `product_price_point_id`. Identify an existing customer with `customer_id` or `customer_reference`. Optionally, include an existing payment profile using `payment_profile_id`. To create a new customer, pass customer_attributes. Select an option from the **Request Examples** drop-down on the right side of the portal to see examples of common scenarios for creating subscriptions. +See the [Subscription Signups](page:introduction/basic-concepts/subscription-signup) article for more information on working with subscriptions in Advanced Billing. + +## Payment information + Payment information may be required to create a subscription, depending on the options for the Product being subscribed. See [product options](https://docs.maxio.com/hc/en-us/articles/24261076617869-Edit-Products) for more information. See the [Payments Profile](../../doc/controllers/payment-profiles.md#create-payment-profile) endpoint for details on payment parameters. Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox. -Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information. +Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Maxio.js (formerly Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information. -See the [Subscription Signups](page:introduction/basic-concepts/subscription-signup) article for more information on working with subscriptions in Advanced Billing. +## 3D Secure (3DS) Authentication post-authentication flow + +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. + +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```ruby def create_subscription(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -54,6 +66,8 @@ def create_subscription(body: nil) ## Response Type +**201**: Created + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -232,7 +246,7 @@ puts result # List Subscriptions -returns an array of subscriptions from a Site. Pay close attention to query string filters and pagination in order to control responses from the server. +Returns an array of subscriptions from a Site. Pay close attention to query string filters and pagination in order to control responses from the server. ## Search for a subscription @@ -246,6 +260,10 @@ Self-Service Page token for the subscriptions is not returned by default. If thi def list_subscriptions(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -269,6 +287,8 @@ def list_subscriptions(options = {}) ## Response Type +**200**: OK + [`Array[SubscriptionResponse]`](../../doc/models/subscription-response.md) ## Example Usage @@ -328,27 +348,31 @@ You can also perform a delayed change to the price point by passing in either `p ## Billing Date Changes -You can update dates for a subscrption. +You can update dates for a subscription. ### Regular Billing Date Changes Send the `next_billing_at` to set the next billing date for the subscription. After that date passes and the subscription is processed, the following billing date will be set according to the subscription's product period. -> Note: If you pass an invalid date, the correct date is automatically set to he correct date. For example, if February 30 is passed, the next billing would be set to March 2nd in a non-leap year. +> Note: If you pass an invalid date, the correct date is automatically set to the correct date. For example, if February 30 is passed, the next billing would be set to March 2nd in a non-leap year. The server response will not return data under the key/value pair of `next_billing_at`. View the key/value pair of `current_period_ends_at` to verify that the `next_billing_at` date has been changed successfully. -### Calendar Billing and Snap Day Changes +### Calendar Billing and Snap Day Changes For a subscription using Calendar Billing, setting the next billing date is a bit different. Send the `snap_day` attribute to change the calendar billing date for **a subscription using a product eligible for calendar billing**. -> Note: If you change the product associated with a subscription that contains a `snap_day` and immediately `READ/GET` the subscription data, it will still contain original `snap_day`. The `snap_day`will will reset to 'null on the next billing cycle. This is because a product change is instantanous and only affects the product associated with a subscription. +> Note: If you change the product associated with a subscription that contains a `snap_day` and immediately `READ/GET` the subscription data, it will still contain original `snap_day`. The `snap_day` will reset to null on the next billing cycle. This is because a product change is instantaneous and only affects the product associated with a subscription. ```ruby def update_subscription(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -358,6 +382,8 @@ def update_subscription(subscription_id, ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -509,6 +535,10 @@ def read_subscription(subscription_id, include: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -518,6 +548,8 @@ def read_subscription(subscription_id, ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -679,7 +711,7 @@ puts result # Override Subscription -This API endpoint allows you to set certain subscription fields that are usually managed for you automatically. Some of the fields can be set via the normal Subscriptions Update API, but others can only be set using this endpoint. +Sets certain subscription fields that are usually managed automatically. Some of the fields can be set via the normal Subscriptions Update API, but others can only be set using this endpoint. This endpoint is provided for cases where you need to “align” Advanced Billing data with data that happened in your system, perhaps before you started using Advanced Billing. For example, you may choose to import your historical subscription data, and would like the activation and cancellation dates in Advanced Billing to match your existing historical dates. Advanced Billing does not backfill historical events (i.e. from the Events API), but some static data can be changed via this API. @@ -704,6 +736,10 @@ def override_subscription(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -713,6 +749,8 @@ def override_subscription(subscription_id, ## Response Type +**204**: No Content + `void` ## Example Usage @@ -744,12 +782,16 @@ subscriptions_controller.override_subscription( # Find Subscription -Use this endpoint to find a subscription by its reference. +Finds a subscription by its reference. ```ruby def find_subscription(reference: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -758,6 +800,8 @@ def find_subscription(reference: nil) ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -776,7 +820,7 @@ puts result # Purge Subscription -For sites in test mode, you may purge individual subscriptions. +Purges an individual subscription for sites in test mode. Provide the subscription ID in the url. To confirm, supply the customer ID in the query string `ack` parameter. You may also delete the customer record and/or payment profiles by passing `cascade` parameters. For example, to delete just the customer record, the query params would be: `?ack={customer_id}&cascade[]=customer` @@ -792,6 +836,10 @@ def purge_subscription(subscription_id, cascade: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -802,6 +850,8 @@ def purge_subscription(subscription_id, ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -833,13 +883,17 @@ puts result # Update Prepaid Subscription Configuration -Use this endpoint to update a subscription's prepaid configuration. +Updates a subscription's prepaid configuration. ```ruby def update_prepaid_subscription_configuration(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -849,6 +903,8 @@ def update_prepaid_subscription_configuration(subscription_id, ## Response Type +**200**: OK + [`PrepaidConfigurationResponse`](../../doc/models/prepaid-configuration-response.md) ## Example Usage @@ -895,7 +951,7 @@ puts result # Preview Subscription -The Chargify API allows you to preview a subscription by POSTing the same JSON or XML as for a subscription creation. +Previews a subscription by POSTing the same JSON or XML as for a subscription creation. The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. @@ -925,6 +981,10 @@ If you'd like to calculate subscriptions that do not include tax you may leave o def preview_subscription(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -933,6 +993,8 @@ def preview_subscription(body: nil) ## Response Type +**200**: OK + [`SubscriptionPreviewResponse`](../../doc/models/subscription-preview-response.md) ## Example Usage @@ -1071,6 +1133,8 @@ puts result # Apply Coupons to Subscription +Applies one or more coupon codes to an existing subscription. + An existing subscription can accommodate multiple discounts/coupon codes. This is only applicable if each coupon is stackable. For more information on stackable coupons, we recommend reviewing our [coupon documentation.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#stackability-rules) ## Query Parameters vs Request Body Parameters @@ -1085,6 +1149,10 @@ def apply_coupons_to_subscription(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1095,6 +1163,8 @@ def apply_coupons_to_subscription(subscription_id, ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -1273,17 +1343,21 @@ puts result | 422 | Unprocessable Entity (WebDAV) | [`SubscriptionAddCouponErrorException`](../../doc/models/subscription-add-coupon-error-exception.md) | -# Remove Coupon From Subscription +# Remove Coupon from Subscription -Use this endpoint to remove a coupon from an existing subscription. +Removes a coupon from an existing subscription. -For more information on the expected behaviour of removing a coupon from a subscription, See our documentation [here.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon) +For more information on the expected behavior of removing a coupon from a subscription, see our documentation [here.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon) ```ruby def remove_coupon_from_subscription(subscription_id, coupon_code: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1293,6 +1367,8 @@ def remove_coupon_from_subscription(subscription_id, ## Response Type +**200**: OK + `String` ## Example Usage @@ -1319,7 +1395,7 @@ puts result # Activate Subscription -Advanced Billing offers the ability to activate awaiting signup and trialing subscriptions. This feature is only available on the Relationship Invoicing architecture. Subscriptions in a group may not be activated immediately. +Activates awaiting signup and trialing subscriptions. This feature is only available on the Relationship Invoicing architecture. Subscriptions in a group may not be activated immediately. For details on how the activation works, and how to activate subscriptions through the application, see [activation](#). @@ -1368,6 +1444,10 @@ def activate_subscription(subscription_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1377,6 +1457,8 @@ def activate_subscription(subscription_id, ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md index b16e72f..2028cd6 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -20,12 +20,16 @@ webhooks_controller = client.webhooks # List Webhooks -Allows you to view a list of webhooks. You can pass query parameters if you want to filter webhooks. See the [Webhooks](page:introduction/webhooks/webhooks) documentation for more information. +Retrieves a list of webhooks. You can pass query parameters if you want to filter webhooks. See the [Webhooks](page:introduction/webhooks/webhooks) documentation for more information. ```ruby def list_webhooks(options = {}) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -40,6 +44,8 @@ def list_webhooks(options = {}) ## Response Type +**201**: OK + [`Array[WebhookResponse]`](../../doc/models/webhook-response.md) ## Example Usage @@ -96,12 +102,16 @@ puts result # Enable Webhooks -Allows you to enable webhooks for your site +Enables webhooks for your site. ```ruby def enable_webhooks(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -110,6 +120,8 @@ def enable_webhooks(body: nil) ## Response Type +**200**: OK + [`EnableWebhooksResponse`](../../doc/models/enable-webhooks-response.md) ## Example Usage @@ -140,6 +152,10 @@ Replays webhooks. Posting to this endpoint does not immediately resend the webho def replay_webhooks(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -148,6 +164,8 @@ def replay_webhooks(body: nil) ## Response Type +**200**: OK + [`ReplayWebhooksResponse`](../../doc/models/replay-webhooks-response.md) ## Example Usage @@ -175,13 +193,17 @@ puts result # Create Endpoint -Creates an endpoint and assigns a list of webhooks subscriptions (events) to it. +Creates an endpoint and assigns a list of webhook subscriptions (events) to it. See the [Webhooks Reference](page:introduction/webhooks/webhooks-reference#events) page for available events. ```ruby def create_endpoint(body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -190,6 +212,8 @@ def create_endpoint(body: nil) ## Response Type +**200**: OK + [`EndpointResponse`](../../doc/models/endpoint-response.md) ## Example Usage @@ -200,7 +224,8 @@ body = CreateOrUpdateEndpointRequest.new( url: 'https://your.site/webhooks', webhook_subscriptions: [ WebhookSubscription::PAYMENT_SUCCESS, - WebhookSubscription::PAYMENT_FAILURE + WebhookSubscription::PAYMENT_FAILURE, + WebhookSubscription::INVOICE_PENDING ] ) ) @@ -220,7 +245,8 @@ puts result "status": "enabled", "webhook_subscriptions": [ "payment_success", - "payment_failure" + "payment_failure", + "invoice_pending" ] } } @@ -241,8 +267,14 @@ Returns created endpoints for a site. def list_endpoints ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**200**: OK + [`Array[Endpoint]`](../../doc/models/endpoint.md) ## Example Usage @@ -263,7 +295,8 @@ puts result "status": "enabled", "webhook_subscriptions": [ "payment_success", - "payment_failure" + "payment_failure", + "invoice_pending" ] }, { @@ -287,13 +320,17 @@ Updates an Endpoint. You can change the `url` of your endpoint or the list of `w Always send a complete list of events to which you want to subscribe. Sending a PUT request for an existing endpoint with an empty list of `webhook_subscriptions` will unsubscribe all events. -If you want unsubscribe from a specific event, send a list of `webhook_subscriptions` without the specific event key. +If you want to unsubscribe from a specific event, send a list of `webhook_subscriptions` without the specific event key. ```ruby def update_endpoint(endpoint_id, body: nil) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -303,6 +340,8 @@ def update_endpoint(endpoint_id, ## Response Type +**200**: OK + [`EndpointResponse`](../../doc/models/endpoint-response.md) ## Example Usage @@ -316,7 +355,8 @@ body = CreateOrUpdateEndpointRequest.new( webhook_subscriptions: [ WebhookSubscription::PAYMENT_FAILURE, WebhookSubscription::PAYMENT_SUCCESS, - WebhookSubscription::REFUND_FAILURE + WebhookSubscription::REFUND_FAILURE, + WebhookSubscription::INVOICE_PENDING ] ) ) diff --git a/doc/models/activate-event-based-component.md b/doc/models/activate-event-based-component.md index ba7bd02..37ee98f 100644 --- a/doc/models/activate-event-based-component.md +++ b/doc/models/activate-event-based-component.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_point_id` | `Integer` | Optional | The Chargify id of the price point | -| `billing_schedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. This only works for site with Multifrequency enabled. | +| `billing_schedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | | `custom_price` | [`ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | ## Example (as JSON) diff --git a/doc/models/bank-account-payment-profile.md b/doc/models/bank-account-payment-profile.md index 8bfa60c..68a15e4 100644 --- a/doc/models/bank-account-payment-profile.md +++ b/doc/models/bank-account-payment-profile.md @@ -14,7 +14,7 @@ | `last_name` | `String` | Optional | The last name of the bank account holder | | `customer_id` | `Integer` | Optional | The Chargify-assigned id for the customer record to which the bank account belongs | | `current_vault` | [`BankAccountVault`](../../doc/models/bank-account-vault.md) | Optional | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | -| `vault_token` | `String` | Optional | The “token” provided by your vault storage for an already stored payment profile | +| `vault_token` | `String` | Optional | The "token" provided by your vault storage for an already stored payment profile | | `billing_address` | `String` | Optional | The current billing street address for the bank account | | `billing_city` | `String` | Optional | The current billing address city for the bank account | | `billing_state` | `String` | Optional | The current billing address state for the bank account | @@ -23,8 +23,8 @@ | `customer_vault_token` | `String` | Optional | (only for Authorize.Net CIM storage): the customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token. | | `billing_address_2` | `String` | Optional | The current billing street address, second line, for the bank account | | `bank_name` | `String` | Optional | The bank where the account resides | -| `masked_bank_routing_number` | `String` | Optional | A string representation of the stored bank routing number with all but the last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’). payment_type will be bank_account | -| `masked_bank_account_number` | `String` | Required | A string representation of the stored bank account number with all but the last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’) | +| `masked_bank_routing_number` | `String` | Optional | A string representation of the stored bank routing number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account | +| `masked_bank_account_number` | `String` | Optional | A string representation of the stored bank account number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111') | | `bank_account_type` | [`BankAccountType`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking | | `bank_account_holder_type` | [`BankAccountHolderType`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | | `payment_type` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType::BANK_ACCOUNT` | @@ -38,7 +38,6 @@ ```json { - "masked_bank_account_number": "masked_bank_account_number8", "payment_type": "bank_account", "verified": false, "id": 188, diff --git a/doc/models/bank-account-response.md b/doc/models/bank-account-response.md index 6c1a92a..6b72b30 100644 --- a/doc/models/bank-account-response.md +++ b/doc/models/bank-account-response.md @@ -16,7 +16,6 @@ ```json { "payment_profile": { - "masked_bank_account_number": "masked_bank_account_number6", "payment_type": "bank_account", "verified": false, "id": 44, diff --git a/doc/models/billing-schedule.md b/doc/models/billing-schedule.md index e49e2e7..d6cef77 100644 --- a/doc/models/billing-schedule.md +++ b/doc/models/billing-schedule.md @@ -1,7 +1,7 @@ # Billing Schedule -This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. This only works for site with Multifrequency enabled. +Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. ## Structure @@ -11,13 +11,13 @@ This attribute is particularly useful when you need to align billing events for | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `initial_billing_at` | `Date` | Optional | The initial_billing_at attribute in Maxio allows you to specify a custom starting date for billing cycles associated with components that have their own billing frequency set. Only ISO8601 format is supported. | +| `initial_billing_at` | `Date` | Optional | Custom start date (ISO 8601 date, YYYY-MM-DD) for the component's first billing period. If omitted or null, billing aligns with the product schedule. If provided, date must be on or after the minimum allowed date for the subscription or component. | ## Example (as JSON) ```json { - "initial_billing_at": "2024-01-01" + "initial_billing_at": "2026-01-01" } ``` diff --git a/doc/models/chjs-tokenization-failure.md b/doc/models/chjs-tokenization-failure.md new file mode 100644 index 0000000..008974d --- /dev/null +++ b/doc/models/chjs-tokenization-failure.md @@ -0,0 +1,27 @@ + +# Chjs Tokenization Failure + +## Structure + +`ChjsTokenizationFailure` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `errors` | `String` | Required | - | +| `payment_profile_params` | [`PaymentProfileParams`](../../doc/models/payment-profile-params.md) | Optional | PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. | + +## Example (as JSON) + +```json +{ + "errors": "errors2", + "payment_profile_params": { + "first_name": "first_name2", + "last_name": "last_name0", + "card_type": "card_type2" + } +} +``` + diff --git a/doc/models/chjs-tokenization-success.md b/doc/models/chjs-tokenization-success.md new file mode 100644 index 0000000..a098c0d --- /dev/null +++ b/doc/models/chjs-tokenization-success.md @@ -0,0 +1,28 @@ + +# Chjs Tokenization Success + +## Structure + +`ChjsTokenizationSuccess` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `payment_profile` | [`TokenizedPaymentProfile`](../../doc/models/tokenized-payment-profile.md) | Required | - | +| `gateway_customer_id` | `Integer` | Optional | - | + +## Example (as JSON) + +```json +{ + "payment_profile": { + "id": 44, + "vault_token": "vault_token6", + "gateway_handle": "gateway_handle4", + "customer_vault_token": "customer_vault_token2" + }, + "gateway_customer_id": 44 +} +``` + diff --git a/doc/models/containers/allocation-preview-item-previous-quantity.md b/doc/models/containers/allocation-preview-item-previous-quantity.md index 5906213..51dad06 100644 --- a/doc/models/containers/allocation-preview-item-previous-quantity.md +++ b/doc/models/containers/allocation-preview-item-previous-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/allocation-preview-item-quantity.md b/doc/models/containers/allocation-preview-item-quantity.md index 28cd91d..6e54b67 100644 --- a/doc/models/containers/allocation-preview-item-quantity.md +++ b/doc/models/containers/allocation-preview-item-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/allocation-previous-quantity.md b/doc/models/containers/allocation-previous-quantity.md index 895ca6b..08048ab 100644 --- a/doc/models/containers/allocation-previous-quantity.md +++ b/doc/models/containers/allocation-previous-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/allocation-quantity.md b/doc/models/containers/allocation-quantity.md index 1842772..ae4df5a 100644 --- a/doc/models/containers/allocation-quantity.md +++ b/doc/models/containers/allocation-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/archive-component-price-point-component-id.md b/doc/models/containers/archive-component-price-point-component-id.md index 63eb8d1..e544f58 100644 --- a/doc/models/containers/archive-component-price-point-component-id.md +++ b/doc/models/containers/archive-component-price-point-component-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/archive-component-price-point-price-point-id.md b/doc/models/containers/archive-component-price-point-price-point-id.md index 1afea57..3e36bc7 100644 --- a/doc/models/containers/archive-component-price-point-price-point-id.md +++ b/doc/models/containers/archive-component-price-point-price-point-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/archive-product-price-point-price-point-id.md b/doc/models/containers/archive-product-price-point-price-point-id.md index 7953efc..aa56a43 100644 --- a/doc/models/containers/archive-product-price-point-price-point-id.md +++ b/doc/models/containers/archive-product-price-point-price-point-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/archive-product-price-point-product-id.md b/doc/models/containers/archive-product-price-point-product-id.md index 36cd0a0..197a2c7 100644 --- a/doc/models/containers/archive-product-price-point-product-id.md +++ b/doc/models/containers/archive-product-price-point-product-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/calendar-billing-snap-day.md b/doc/models/containers/calendar-billing-snap-day.md index 6e04756..08b4915 100644 --- a/doc/models/containers/calendar-billing-snap-day.md +++ b/doc/models/containers/calendar-billing-snap-day.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/clone-component-price-point-component-id.md b/doc/models/containers/clone-component-price-point-component-id.md index a7ef7ac..0e001c2 100644 --- a/doc/models/containers/clone-component-price-point-component-id.md +++ b/doc/models/containers/clone-component-price-point-component-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/clone-component-price-point-price-point-id.md b/doc/models/containers/clone-component-price-point-price-point-id.md index 31804e8..c093200 100644 --- a/doc/models/containers/clone-component-price-point-price-point-id.md +++ b/doc/models/containers/clone-component-price-point-price-point-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/component-allocation-change-allocated-quantity.md b/doc/models/containers/component-allocation-change-allocated-quantity.md index 537e19e..b685a04 100644 --- a/doc/models/containers/component-allocation-change-allocated-quantity.md +++ b/doc/models/containers/component-allocation-change-allocated-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/component-price-point-assignment-price-point.md b/doc/models/containers/component-price-point-assignment-price-point.md index 130ff1f..13eefef 100644 --- a/doc/models/containers/component-price-point-assignment-price-point.md +++ b/doc/models/containers/component-price-point-assignment-price-point.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/coupon-payload-percentage.md b/doc/models/containers/coupon-payload-percentage.md index 8800999..49ebcda 100644 --- a/doc/models/containers/coupon-payload-percentage.md +++ b/doc/models/containers/coupon-payload-percentage.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-allocation-price-point-id.md b/doc/models/containers/create-allocation-price-point-id.md index 2cb38cf..1dcd6cd 100644 --- a/doc/models/containers/create-allocation-price-point-id.md +++ b/doc/models/containers/create-allocation-price-point-id.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-component-price-point-request-price-point.md b/doc/models/containers/create-component-price-point-request-price-point.md index 1832c26..1d209e2 100644 --- a/doc/models/containers/create-component-price-point-request-price-point.md +++ b/doc/models/containers/create-component-price-point-request-price-point.md @@ -12,3 +12,46 @@ | [`CreateComponentPricePoint`](../../../doc/models/create-component-price-point.md) | | [`CreatePrepaidUsageComponentPricePoint`](../../../doc/models/create-prepaid-usage-component-price-point.md) | +## CreateComponentPricePoint + +### Initialization Code + +#### Example + +```ruby +value = CreateComponentPricePoint.new( + name: 'name0', + pricing_scheme: PricingScheme::PER_UNIT, + prices: [ + Price.new( + starting_quantity: 242, + unit_price: 23.26 + ) + ], + use_site_exchange_rate: true +) +``` + +## CreatePrepaidUsageComponentPricePoint + +### Initialization Code + +#### Example + +```ruby +value = CreatePrepaidUsageComponentPricePoint.new( + name: 'name0', + pricing_scheme: PricingScheme::PER_UNIT, + prices: [ + Price.new( + starting_quantity: 242, + unit_price: 23.26 + ) + ], + overage_pricing: OveragePricing.new( + pricing_scheme: PricingScheme::STAIRSTEP + ), + use_site_exchange_rate: true +) +``` + diff --git a/doc/models/containers/create-component-price-points-request-price-points.md b/doc/models/containers/create-component-price-points-request-price-points.md index 6c4e227..0b4ac8d 100644 --- a/doc/models/containers/create-component-price-points-request-price-points.md +++ b/doc/models/containers/create-component-price-points-request-price-points.md @@ -12,3 +12,46 @@ | [`CreateComponentPricePoint`](../../../doc/models/create-component-price-point.md) | | [`CreatePrepaidUsageComponentPricePoint`](../../../doc/models/create-prepaid-usage-component-price-point.md) | +## CreateComponentPricePoint + +### Initialization Code + +#### Example + +```ruby +value = CreateComponentPricePoint.new( + name: 'name0', + pricing_scheme: PricingScheme::PER_UNIT, + prices: [ + Price.new( + starting_quantity: 242, + unit_price: 23.26 + ) + ], + use_site_exchange_rate: true +) +``` + +## CreatePrepaidUsageComponentPricePoint + +### Initialization Code + +#### Example + +```ruby +value = CreatePrepaidUsageComponentPricePoint.new( + name: 'name0', + pricing_scheme: PricingScheme::PER_UNIT, + prices: [ + Price.new( + starting_quantity: 242, + unit_price: 23.26 + ) + ], + overage_pricing: OveragePricing.new( + pricing_scheme: PricingScheme::STAIRSTEP + ), + use_site_exchange_rate: true +) +``` + diff --git a/doc/models/containers/create-invoice-coupon-amount.md b/doc/models/containers/create-invoice-coupon-amount.md index 4bffa96..d46270d 100644 --- a/doc/models/containers/create-invoice-coupon-amount.md +++ b/doc/models/containers/create-invoice-coupon-amount.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-invoice-coupon-percentage.md b/doc/models/containers/create-invoice-coupon-percentage.md index d783331..6b1682b 100644 --- a/doc/models/containers/create-invoice-coupon-percentage.md +++ b/doc/models/containers/create-invoice-coupon-percentage.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-invoice-coupon-product-family-id.md b/doc/models/containers/create-invoice-coupon-product-family-id.md index 31086dc..061b8ec 100644 --- a/doc/models/containers/create-invoice-coupon-product-family-id.md +++ b/doc/models/containers/create-invoice-coupon-product-family-id.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-invoice-item-component-id.md b/doc/models/containers/create-invoice-item-component-id.md index 1f14648..dba8fec 100644 --- a/doc/models/containers/create-invoice-item-component-id.md +++ b/doc/models/containers/create-invoice-item-component-id.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-invoice-item-price-point-id.md b/doc/models/containers/create-invoice-item-price-point-id.md index 50cc067..ed15477 100644 --- a/doc/models/containers/create-invoice-item-price-point-id.md +++ b/doc/models/containers/create-invoice-item-price-point-id.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-invoice-item-product-id.md b/doc/models/containers/create-invoice-item-product-id.md index 084725c..2577ecd 100644 --- a/doc/models/containers/create-invoice-item-product-id.md +++ b/doc/models/containers/create-invoice-item-product-id.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-invoice-item-product-price-point-id.md b/doc/models/containers/create-invoice-item-product-price-point-id.md index 382d5bd..7b62c0a 100644 --- a/doc/models/containers/create-invoice-item-product-price-point-id.md +++ b/doc/models/containers/create-invoice-item-product-price-point-id.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-invoice-item-quantity.md b/doc/models/containers/create-invoice-item-quantity.md index 8fe8649..3673032 100644 --- a/doc/models/containers/create-invoice-item-quantity.md +++ b/doc/models/containers/create-invoice-item-quantity.md @@ -12,3 +12,23 @@ | `Float` | | `String` | +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/create-invoice-item-unit-price.md b/doc/models/containers/create-invoice-item-unit-price.md index 5477df3..48d060b 100644 --- a/doc/models/containers/create-invoice-item-unit-price.md +++ b/doc/models/containers/create-invoice-item-unit-price.md @@ -12,3 +12,23 @@ | `Float` | | `String` | +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/create-invoice-payment-amount.md b/doc/models/containers/create-invoice-payment-amount.md index a5ce061..cda3157 100644 --- a/doc/models/containers/create-invoice-payment-amount.md +++ b/doc/models/containers/create-invoice-payment-amount.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-metafields-request-metafields.md b/doc/models/containers/create-metafields-request-metafields.md index b561ff2..9a7200c 100644 --- a/doc/models/containers/create-metafields-request-metafields.md +++ b/doc/models/containers/create-metafields-request-metafields.md @@ -12,3 +12,39 @@ | [`CreateMetafield`](../../../doc/models/create-metafield.md) | | [`Array[CreateMetafield]`](../../../doc/models/create-metafield.md) | +## CreateMetafield + +### Initialization Code + +#### Example + +```ruby +value = CreateMetafield.new( + name: 'my_field', + scope: MetafieldScope.new( + csv: IncludeOption::EXCLUDE, + invoices: IncludeOption::EXCLUDE, + statements: IncludeOption::EXCLUDE, + portal: IncludeOption::EXCLUDE, + public_show: IncludeOption::EXCLUDE, + public_edit: IncludeOption::EXCLUDE + ), + input_type: MetafieldInput::TEXT, + enum: [ + 'string' + ] +) +``` + +## Array[CreateMetafield] + +### Initialization Code + +#### Example + +```ruby +value = [ + CreateMetafield.new +] +``` + diff --git a/doc/models/containers/create-multi-invoice-payment-amount.md b/doc/models/containers/create-multi-invoice-payment-amount.md index 58387aa..7f90b50 100644 --- a/doc/models/containers/create-multi-invoice-payment-amount.md +++ b/doc/models/containers/create-multi-invoice-payment-amount.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-or-update-segment-price-unit-price.md b/doc/models/containers/create-or-update-segment-price-unit-price.md index 42a4da1..e265bed 100644 --- a/doc/models/containers/create-or-update-segment-price-unit-price.md +++ b/doc/models/containers/create-or-update-segment-price-unit-price.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-payment-profile-expiration-month.md b/doc/models/containers/create-payment-profile-expiration-month.md index a0ed244..7dfa8de 100644 --- a/doc/models/containers/create-payment-profile-expiration-month.md +++ b/doc/models/containers/create-payment-profile-expiration-month.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/create-payment-profile-expiration-year.md b/doc/models/containers/create-payment-profile-expiration-year.md index 8cb1a89..5035d22 100644 --- a/doc/models/containers/create-payment-profile-expiration-year.md +++ b/doc/models/containers/create-payment-profile-expiration-year.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/create-product-price-point-product-id.md b/doc/models/containers/create-product-price-point-product-id.md index d1f7777..edc31a7 100644 --- a/doc/models/containers/create-product-price-point-product-id.md +++ b/doc/models/containers/create-product-price-point-product-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/create-segment-segment-property-1-value.md b/doc/models/containers/create-segment-segment-property-1-value.md index 2a04b05..8565027 100644 --- a/doc/models/containers/create-segment-segment-property-1-value.md +++ b/doc/models/containers/create-segment-segment-property-1-value.md @@ -14,3 +14,43 @@ | `Integer` | | `TrueClass \| FalseClass` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## TrueClass | FalseClass + +### Initialization Code + +#### Example + +```ruby +value = false +``` + diff --git a/doc/models/containers/create-segment-segment-property-2-value.md b/doc/models/containers/create-segment-segment-property-2-value.md index f183ba4..0fad00f 100644 --- a/doc/models/containers/create-segment-segment-property-2-value.md +++ b/doc/models/containers/create-segment-segment-property-2-value.md @@ -14,3 +14,43 @@ | `Integer` | | `TrueClass \| FalseClass` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## TrueClass | FalseClass + +### Initialization Code + +#### Example + +```ruby +value = false +``` + diff --git a/doc/models/containers/create-segment-segment-property-3-value.md b/doc/models/containers/create-segment-segment-property-3-value.md index c1b86e0..c4a1441 100644 --- a/doc/models/containers/create-segment-segment-property-3-value.md +++ b/doc/models/containers/create-segment-segment-property-3-value.md @@ -14,3 +14,43 @@ | `Integer` | | `TrueClass \| FalseClass` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## TrueClass | FalseClass + +### Initialization Code + +#### Example + +```ruby +value = false +``` + diff --git a/doc/models/containers/create-segment-segment-property-4-value.md b/doc/models/containers/create-segment-segment-property-4-value.md index 5154dbf..3f1ef19 100644 --- a/doc/models/containers/create-segment-segment-property-4-value.md +++ b/doc/models/containers/create-segment-segment-property-4-value.md @@ -14,3 +14,43 @@ | `Integer` | | `TrueClass \| FalseClass` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## TrueClass | FalseClass + +### Initialization Code + +#### Example + +```ruby +value = false +``` + diff --git a/doc/models/containers/create-subscription-component-allocated-quantity.md b/doc/models/containers/create-subscription-component-allocated-quantity.md index eb2dad1..b17fece 100644 --- a/doc/models/containers/create-subscription-component-allocated-quantity.md +++ b/doc/models/containers/create-subscription-component-allocated-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/create-subscription-component-component-id.md b/doc/models/containers/create-subscription-component-component-id.md index e437249..f627e26 100644 --- a/doc/models/containers/create-subscription-component-component-id.md +++ b/doc/models/containers/create-subscription-component-component-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/create-subscription-component-price-point-id.md b/doc/models/containers/create-subscription-component-price-point-id.md index 4090a71..a794e89 100644 --- a/doc/models/containers/create-subscription-component-price-point-id.md +++ b/doc/models/containers/create-subscription-component-price-point-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/create-subscription-offer-id.md b/doc/models/containers/create-subscription-offer-id.md index 97a38f5..21a180f 100644 --- a/doc/models/containers/create-subscription-offer-id.md +++ b/doc/models/containers/create-subscription-offer-id.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/create-usage-component-id.md b/doc/models/containers/create-usage-component-id.md index 7b2ac58..0c1dbe2 100644 --- a/doc/models/containers/create-usage-component-id.md +++ b/doc/models/containers/create-usage-component-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/create-usage-subscription-id-or-reference.md b/doc/models/containers/create-usage-subscription-id-or-reference.md index 5e3897f..28f9dc7 100644 --- a/doc/models/containers/create-usage-subscription-id-or-reference.md +++ b/doc/models/containers/create-usage-subscription-id-or-reference.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/customer-error-response-errors.md b/doc/models/containers/customer-error-response-errors.md index d528718..f8f6fc5 100644 --- a/doc/models/containers/customer-error-response-errors.md +++ b/doc/models/containers/customer-error-response-errors.md @@ -12,3 +12,25 @@ | [`CustomerError`](../../../doc/models/customer-error.md) | | `Array[String]` | +## CustomerError + +### Initialization Code + +#### Example + +```ruby +value = CustomerError.new +``` + +## Array[String] + +### Initialization Code + +#### Example + +```ruby +value = [ + 'String1' +] +``` + diff --git a/doc/models/containers/deduct-service-credit-amount.md b/doc/models/containers/deduct-service-credit-amount.md index 3bbd3c7..eb1399f 100644 --- a/doc/models/containers/deduct-service-credit-amount.md +++ b/doc/models/containers/deduct-service-credit-amount.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/ebb-component-unit-price.md b/doc/models/containers/ebb-component-unit-price.md index 1c71ccb..1d7cc41 100644 --- a/doc/models/containers/ebb-component-unit-price.md +++ b/doc/models/containers/ebb-component-unit-price.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/event-event-specific-data.md b/doc/models/containers/event-event-specific-data.md index 1fae19f..485d469 100644 --- a/doc/models/containers/event-event-specific-data.md +++ b/doc/models/containers/event-event-specific-data.md @@ -3,7 +3,7 @@ ## Data Type -`SubscriptionProductChange | SubscriptionStateChange | PaymentRelatedEvents | RefundSuccess | ComponentAllocationChange | MeteredUsage | PrepaidUsage | DunningStepReached | InvoiceIssued | PendingCancellationChange | PrepaidSubscriptionBalanceChanged | ProformaInvoiceIssued | SubscriptionGroupSignupEventData | CreditAccountBalanceChanged | PrepaymentAccountBalanceChanged | PaymentCollectionMethodChanged | ItemPricePointChanged | CustomFieldValueChange` +`SubscriptionProductChange | SubscriptionStateChange | PaymentRelatedEvents | RefundSuccess | ComponentAllocationChange | MeteredUsage | PrepaidUsage | DunningStepReached | InvoiceIssued | PendingCancellationChange | PrepaidSubscriptionBalanceChanged | ProformaInvoiceIssued | SubscriptionGroupSignupEventData | CreditAccountBalanceChanged | PrepaymentAccountBalanceChanged | PaymentCollectionMethodChanged | ItemPricePointChanged | CustomFieldValueChange | ChjsTokenizationSuccess | ChjsTokenizationFailure` ## Cases @@ -27,4 +27,347 @@ | [`PaymentCollectionMethodChanged`](../../../doc/models/payment-collection-method-changed.md) | | [`ItemPricePointChanged`](../../../doc/models/item-price-point-changed.md) | | [`CustomFieldValueChange`](../../../doc/models/custom-field-value-change.md) | +| [`ChjsTokenizationSuccess`](../../../doc/models/chjs-tokenization-success.md) | +| [`ChjsTokenizationFailure`](../../../doc/models/chjs-tokenization-failure.md) | + +## SubscriptionProductChange + +### Initialization Code + +#### Example + +```ruby +value = SubscriptionProductChange.new( + previous_product_id: 126, + new_product_id: 12 +) +``` + +## SubscriptionStateChange + +### Initialization Code + +#### Example + +```ruby +value = SubscriptionStateChange.new( + previous_subscription_state: 'previous_subscription_state2', + new_subscription_state: 'new_subscription_state6' +) +``` + +## PaymentRelatedEvents + +### Initialization Code + +#### Example + +```ruby +value = PaymentRelatedEvents.new( + product_id: 42, + account_transaction_id: 58 +) +``` + +## RefundSuccess + +### Initialization Code + +#### Example + +```ruby +value = RefundSuccess.new( + refund_id: 12, + gateway_transaction_id: 182, + product_id: 168 +) +``` + +## ComponentAllocationChange + +### Initialization Code + +#### Example + +```ruby +value = ComponentAllocationChange.new( + previous_allocation: 94, + new_allocation: 102, + component_id: 88, + component_handle: 'component_handle8', + memo: 'memo2', + allocation_id: 158 +) +``` + +## MeteredUsage + +### Initialization Code + +#### Example + +```ruby +value = MeteredUsage.new( + previous_unit_balance: 'previous_unit_balance6', + new_unit_balance: 80, + usage_quantity: 42, + component_id: 4, + component_handle: 'component_handle8', + memo: 'memo2' +) +``` + +## PrepaidUsage + +### Initialization Code + +#### Example + +```ruby +value = PrepaidUsage.new( + previous_unit_balance: 'previous_unit_balance0', + previous_overage_unit_balance: 'previous_overage_unit_balance4', + new_unit_balance: 252, + new_overage_unit_balance: 224, + usage_quantity: 214, + overage_usage_quantity: 106, + component_id: 176, + component_handle: 'component_handle4', + memo: 'memo8', + allocation_details: [ + PrepaidUsageAllocationDetail.new + ] +) +``` + +## DunningStepReached + +### Initialization Code + +#### Example + +```ruby +value = DunningStepReached.new( + dunner: DunnerData.new( + state: 'state8', + subscription_id: 194, + revenue_at_risk_in_cents: 98, + created_at: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + attempts: 42, + last_attempted_at: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z') + ), + current_step: DunningStepData.new( + day_threshold: 198, + action: 'action4', + send_email: false, + send_bcc_email: false, + send_sms: false + ), + next_step: DunningStepData.new( + day_threshold: 30, + action: 'action4', + send_email: false, + send_bcc_email: false, + send_sms: false + ) +) +``` + +## InvoiceIssued + +### Initialization Code + +#### Example + +```ruby +value = InvoiceIssued.new( + uid: 'uid4', + number: 'number8', + role: 'role2', + due_date: Date.iso8601('2016-03-13'), + issue_date: 'issue_date0', + paid_date: 'paid_date6', + due_amount: 'due_amount6', + paid_amount: 'paid_amount4', + tax_amount: 'tax_amount2', + refund_amount: 'refund_amount0', + total_amount: 'total_amount0', + status_amount: 'status_amount4', + product_name: 'product_name0', + consolidation_level: 'consolidation_level4', + line_items: [ + InvoiceLineItemEventData.new + ] +) +``` + +## PendingCancellationChange + +### Initialization Code + +#### Example + +```ruby +value = PendingCancellationChange.new( + cancellation_state: 'cancellation_state8', + cancels_at: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z') +) +``` + +## PrepaidSubscriptionBalanceChanged + +### Initialization Code + +#### Example + +```ruby +value = PrepaidSubscriptionBalanceChanged.new( + reason: 'reason8', + current_account_balance_in_cents: 250, + prepayment_account_balance_in_cents: 44, + current_usage_amount_in_cents: 242 +) +``` + +## ProformaInvoiceIssued + +### Initialization Code + +#### Example + +```ruby +value = ProformaInvoiceIssued.new( + uid: 'uid0', + number: 'number2', + role: 'role6', + delivery_date: Date.iso8601('2016-03-13'), + created_at: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + due_amount: 'due_amount2', + paid_amount: 'paid_amount8', + tax_amount: 'tax_amount6', + total_amount: 'total_amount6', + product_name: 'product_name6', + line_items: [ + InvoiceLineItemEventData.new + ] +) +``` + +## SubscriptionGroupSignupEventData + +### Initialization Code + +#### Example + +```ruby +value = SubscriptionGroupSignupEventData.new( + subscription_group: SubscriptionGroupSignupFailureData.new, + customer: Customer.new +) +``` + +## CreditAccountBalanceChanged + +### Initialization Code + +#### Example + +```ruby +value = CreditAccountBalanceChanged.new( + reason: 'reason8', + service_credit_account_balance_in_cents: 10, + service_credit_balance_change_in_cents: 116, + currency_code: 'currency_code8', + at_time: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z') +) +``` + +## PrepaymentAccountBalanceChanged + +### Initialization Code + +#### Example + +```ruby +value = PrepaymentAccountBalanceChanged.new( + reason: 'reason4', + prepayment_account_balance_in_cents: 182, + prepayment_balance_change_in_cents: 206, + currency_code: 'currency_code4' +) +``` + +## PaymentCollectionMethodChanged + +### Initialization Code + +#### Example + +```ruby +value = PaymentCollectionMethodChanged.new( + previous_value: 'previous_value4', + current_value: 'current_value2' +) +``` + +## ItemPricePointChanged + +### Initialization Code + +#### Example + +```ruby +value = ItemPricePointChanged.new( + item_id: 66, + item_type: 'item_type6', + item_handle: 'item_handle4', + item_name: 'item_name8', + previous_price_point: ItemPricePointData.new, + current_price_point: ItemPricePointData.new +) +``` + +## CustomFieldValueChange + +### Initialization Code + +#### Example + +```ruby +value = CustomFieldValueChange.new( + event_type: 'event_type2', + metafield_name: 'metafield_name6', + metafield_id: 78, + old_value: 'old_value2', + new_value: 'new_value8', + resource_type: 'resource_type2', + resource_id: 74 +) +``` + +## ChjsTokenizationSuccess + +### Initialization Code + +#### Example + +```ruby +value = ChjsTokenizationSuccess.new( + payment_profile: TokenizedPaymentProfile.new( + id: 44 + ) +) +``` + +## ChjsTokenizationFailure + +### Initialization Code + +#### Example + +```ruby +value = ChjsTokenizationFailure.new( + errors: 'errors2' +) +``` diff --git a/doc/models/containers/invoice-event-payment.md b/doc/models/containers/invoice-event-payment.md index 339d419..30148bb 100644 --- a/doc/models/containers/invoice-event-payment.md +++ b/doc/models/containers/invoice-event-payment.md @@ -1,6 +1,8 @@ # Invoice-Event-Payment +A nested data structure detailing the method of payment + ## Data Type `PaymentMethodApplePay | PaymentMethodBankAccount | PaymentMethodCreditCard | PaymentMethodExternal | PaymentMethodPaypal` @@ -15,3 +17,71 @@ | [`PaymentMethodExternal`](../../../doc/models/payment-method-external.md) | | [`PaymentMethodPaypal`](../../../doc/models/payment-method-paypal.md) | +## PaymentMethodApplePay + +### Initialization Code + +#### Example + +```ruby +value = PaymentMethodApplePay.new( + type: InvoiceEventPaymentMethod::APPLE_PAY +) +``` + +## PaymentMethodBankAccount + +### Initialization Code + +#### Example + +```ruby +value = PaymentMethodBankAccount.new( + masked_account_number: 'masked_account_number2', + masked_routing_number: 'masked_routing_number2', + type: InvoiceEventPaymentMethod::BANK_ACCOUNT +) +``` + +## PaymentMethodCreditCard + +### Initialization Code + +#### Example + +```ruby +value = PaymentMethodCreditCard.new( + card_brand: 'card_brand4', + masked_card_number: 'masked_card_number0', + type: InvoiceEventPaymentMethod::CREDIT_CARD +) +``` + +## PaymentMethodExternal + +### Initialization Code + +#### Example + +```ruby +value = PaymentMethodExternal.new( + details: 'details4', + kind: 'kind2', + memo: 'memo8', + type: InvoiceEventPaymentMethod::EXTERNAL +) +``` + +## PaymentMethodPaypal + +### Initialization Code + +#### Example + +```ruby +value = PaymentMethodPaypal.new( + email: 'email2', + type: InvoiceEventPaymentMethod::PAYPAL_ACCOUNT +) +``` + diff --git a/doc/models/containers/invoice-event.md b/doc/models/containers/invoice-event.md index 94c8fa4..0c62727 100644 --- a/doc/models/containers/invoice-event.md +++ b/doc/models/containers/invoice-event.md @@ -25,3 +25,390 @@ | [`VoidInvoiceEvent`](../../../doc/models/void-invoice-event.md) | | [`VoidRemainderEvent`](../../../doc/models/void-remainder-event.md) | +## ApplyCreditNoteEvent + +### Initialization Code + +#### Example + +```ruby +value = ApplyCreditNoteEvent.new( + id: 214, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::APPLY_CREDIT_NOTE, + event_data: ApplyCreditNoteEventData.new( + uid: 'uid6', + credit_note_number: 'credit_note_number0', + credit_note_uid: 'credit_note_uid0', + original_amount: 'original_amount0', + applied_amount: 'applied_amount2' + ) +) +``` + +## ApplyDebitNoteEvent + +### Initialization Code + +#### Example + +```ruby +value = ApplyDebitNoteEvent.new( + id: 164, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::APPLY_DEBIT_NOTE, + event_data: ApplyDebitNoteEventData.new( + debit_note_number: 'debit_note_number6', + debit_note_uid: 'debit_note_uid2', + original_amount: 'original_amount0', + applied_amount: 'applied_amount2' + ) +) +``` + +## ApplyPaymentEvent + +### Initialization Code + +#### Example + +```ruby +value = ApplyPaymentEvent.new( + id: 234, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::APPLY_PAYMENT, + event_data: ApplyPaymentEventData.new( + consolidation_level: InvoiceConsolidationLevel::CHILD, + memo: 'memo0', + original_amount: 'original_amount0', + applied_amount: 'applied_amount2', + transaction_time: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + payment_method: PaymentMethodApplePay.new( + type: InvoiceEventPaymentMethod::APPLE_PAY + ) + ) +) +``` + +## BackportInvoiceEvent + +### Initialization Code + +#### Example + +```ruby +value = BackportInvoiceEvent.new( + id: 78, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::BACKPORT_INVOICE, + event_data: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ) +) +``` + +## ChangeChargebackStatusEvent + +### Initialization Code + +#### Example + +```ruby +value = ChangeChargebackStatusEvent.new( + id: 214, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::CHANGE_CHARGEBACK_STATUS, + event_data: ChangeChargebackStatusEventData.new( + chargeback_status: ChargebackStatus::WON + ) +) +``` + +## ChangeInvoiceCollectionMethodEvent + +### Initialization Code + +#### Example + +```ruby +value = ChangeInvoiceCollectionMethodEvent.new( + id: 246, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::CHANGE_INVOICE_COLLECTION_METHOD, + event_data: ChangeInvoiceCollectionMethodEventData.new( + from_collection_method: 'from_collection_method4', + to_collection_method: 'to_collection_method8' + ) +) +``` + +## ChangeInvoiceStatusEvent + +### Initialization Code + +#### Example + +```ruby +value = ChangeInvoiceStatusEvent.new( + id: 92, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::CHANGE_INVOICE_STATUS, + event_data: ChangeInvoiceStatusEventData.new( + from_status: InvoiceStatus::OPEN, + to_status: InvoiceStatus::PENDING + ) +) +``` + +## CreateCreditNoteEvent + +### Initialization Code + +#### Example + +```ruby +value = CreateCreditNoteEvent.new( + id: 28, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::CREATE_CREDIT_NOTE, + event_data: CreditNote.new +) +``` + +## CreateDebitNoteEvent + +### Initialization Code + +#### Example + +```ruby +value = CreateDebitNoteEvent.new( + id: 98, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::CREATE_DEBIT_NOTE, + event_data: DebitNote.new +) +``` + +## FailedPaymentEvent + +### Initialization Code + +#### Example + +```ruby +value = FailedPaymentEvent.new( + id: 120, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::FAILED_PAYMENT, + event_data: FailedPaymentEventData.new( + amount_in_cents: 220, + applied_amount: 194, + payment_method: InvoicePaymentMethodType::CASH, + transaction_id: 78 + ) +) +``` + +## IssueInvoiceEvent + +### Initialization Code + +#### Example + +```ruby +value = IssueInvoiceEvent.new( + id: 130, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::ISSUE_INVOICE, + event_data: IssueInvoiceEventData.new( + consolidation_level: InvoiceConsolidationLevel::CHILD, + from_status: InvoiceStatus::OPEN, + to_status: InvoiceStatus::PENDING, + due_amount: 'due_amount8', + total_amount: 'total_amount2' + ) +) +``` + +## RefundInvoiceEvent + +### Initialization Code + +#### Example + +```ruby +value = RefundInvoiceEvent.new( + id: 54, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::REFUND_INVOICE, + event_data: RefundInvoiceEventData.new( + apply_credit: false, + credit_note_attributes: CreditNote.new, + payment_id: 204, + refund_amount: 'refund_amount8', + refund_id: 248, + transaction_time: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z') + ) +) +``` + +## RemovePaymentEvent + +### Initialization Code + +#### Example + +```ruby +value = RemovePaymentEvent.new( + id: 236, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::REMOVE_PAYMENT, + event_data: RemovePaymentEventData.new( + transaction_id: 78, + memo: 'memo0', + applied_amount: 'applied_amount2', + transaction_time: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + payment_method: PaymentMethodApplePay.new( + type: InvoiceEventPaymentMethod::APPLE_PAY + ), + prepayment: false + ) +) +``` + +## VoidInvoiceEvent + +### Initialization Code + +#### Example + +```ruby +value = VoidInvoiceEvent.new( + id: 16, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::VOID_INVOICE, + event_data: VoidInvoiceEventData.new( + credit_note_attributes: CreditNote.new, + memo: 'memo0', + applied_amount: 'applied_amount2', + transaction_time: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + is_advance_invoice: false, + reason: 'reason2' + ) +) +``` + +## VoidRemainderEvent + +### Initialization Code + +#### Example + +```ruby +value = VoidRemainderEvent.new( + id: 128, + timestamp: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z'), + invoice: Invoice.new( + issue_date: Date.iso8601('2024-01-01'), + due_date: Date.iso8601('2024-01-01'), + paid_date: Date.iso8601('2024-01-01'), + public_url_expires_on: Date.iso8601('2024-01-21') + ), + event_type: InvoiceEventType::VOID_REMAINDER, + event_data: VoidRemainderEventData.new( + credit_note_attributes: CreditNote.new, + memo: 'memo0', + applied_amount: 'applied_amount2', + transaction_time: DateTimeHelper.from_rfc3339('2016-03-13T12:52:32.123Z') + ) +) +``` + diff --git a/doc/models/containers/issue-service-credit-amount.md b/doc/models/containers/issue-service-credit-amount.md index b206f36..e32ee9f 100644 --- a/doc/models/containers/issue-service-credit-amount.md +++ b/doc/models/containers/issue-service-credit-amount.md @@ -12,3 +12,23 @@ | `Float` | | `String` | +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/list-product-price-points-input-product-id.md b/doc/models/containers/list-product-price-points-input-product-id.md index 7c12a17..d423969 100644 --- a/doc/models/containers/list-product-price-points-input-product-id.md +++ b/doc/models/containers/list-product-price-points-input-product-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/list-usages-input-component-id.md b/doc/models/containers/list-usages-input-component-id.md index b3b5364..37cad7c 100644 --- a/doc/models/containers/list-usages-input-component-id.md +++ b/doc/models/containers/list-usages-input-component-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/list-usages-input-subscription-id-or-reference.md b/doc/models/containers/list-usages-input-subscription-id-or-reference.md index 704961c..ad12a16 100644 --- a/doc/models/containers/list-usages-input-subscription-id-or-reference.md +++ b/doc/models/containers/list-usages-input-subscription-id-or-reference.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/metafield-enum.md b/doc/models/containers/metafield-enum.md index 855b51a..d91b457 100644 --- a/doc/models/containers/metafield-enum.md +++ b/doc/models/containers/metafield-enum.md @@ -12,3 +12,25 @@ | `String` | | `Array[String]` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Array[String] + +### Initialization Code + +#### Example + +```ruby +value = [ + 'String1' +] +``` + diff --git a/doc/models/containers/metered-component-unit-price.md b/doc/models/containers/metered-component-unit-price.md index 4ce635a..46e6c59 100644 --- a/doc/models/containers/metered-component-unit-price.md +++ b/doc/models/containers/metered-component-unit-price.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/on-off-component-unit-price.md b/doc/models/containers/on-off-component-unit-price.md index 35b367c..2cf9f99 100644 --- a/doc/models/containers/on-off-component-unit-price.md +++ b/doc/models/containers/on-off-component-unit-price.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/payment-profile-attributes-expiration-month.md b/doc/models/containers/payment-profile-attributes-expiration-month.md index 79f25a2..f47486f 100644 --- a/doc/models/containers/payment-profile-attributes-expiration-month.md +++ b/doc/models/containers/payment-profile-attributes-expiration-month.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/payment-profile-attributes-expiration-year.md b/doc/models/containers/payment-profile-attributes-expiration-year.md index c9fef2c..08ea490 100644 --- a/doc/models/containers/payment-profile-attributes-expiration-year.md +++ b/doc/models/containers/payment-profile-attributes-expiration-year.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/payment-profile.md b/doc/models/containers/payment-profile.md index 797ccec..a6e1290 100644 --- a/doc/models/containers/payment-profile.md +++ b/doc/models/containers/payment-profile.md @@ -14,3 +14,71 @@ | [`CreditCardPaymentProfile`](../../../doc/models/credit-card-payment-profile.md) | | [`PaypalPaymentProfile`](../../../doc/models/paypal-payment-profile.md) | +## ApplePayPaymentProfile + +### Initialization Code + +#### Example + +```ruby +value = ApplePayPaymentProfile.new( + payment_type: PaymentType::APPLE_PAY +) +``` + +## BankAccountPaymentProfile + +### Initialization Code + +#### Example + +```ruby +value = BankAccountPaymentProfile.new( + payment_type: PaymentType::BANK_ACCOUNT, + verified: false +) +``` + +## CreditCardPaymentProfile + +### Initialization Code + +#### Example + +```ruby +value = CreditCardPaymentProfile.new( + payment_type: PaymentType::CREDIT_CARD, + id: 10088716, + first_name: 'Test', + last_name: 'Subscription', + masked_card_number: 'XXXX-XXXX-XXXX-1', + card_type: CardType::BOGUS, + expiration_month: 1, + expiration_year: 2022, + customer_id: 14543792, + current_vault: CreditCardVault::BOGUS, + vault_token: '1', + billing_address: '123 Montana Way', + billing_city: 'Billings', + billing_state: 'MT', + billing_zip: '59101', + billing_country: 'US', + customer_vault_token: 'customer_vault_token2', + billing_address_2: '', + site_gateway_setting_id: 1, + gateway_handle: 'gateway_handle8' +) +``` + +## PaypalPaymentProfile + +### Initialization Code + +#### Example + +```ruby +value = PaypalPaymentProfile.new( + payment_type: PaymentType::PAYPAL_ACCOUNT +) +``` + diff --git a/doc/models/containers/prepaid-usage-component-unit-price.md b/doc/models/containers/prepaid-usage-component-unit-price.md index d2a25ac..030e1a8 100644 --- a/doc/models/containers/prepaid-usage-component-unit-price.md +++ b/doc/models/containers/prepaid-usage-component-unit-price.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/price-ending-quantity.md b/doc/models/containers/price-ending-quantity.md index 0e33c87..bb105e8 100644 --- a/doc/models/containers/price-ending-quantity.md +++ b/doc/models/containers/price-ending-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/price-starting-quantity.md b/doc/models/containers/price-starting-quantity.md index aa4d32c..d015304 100644 --- a/doc/models/containers/price-starting-quantity.md +++ b/doc/models/containers/price-starting-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/price-unit-price.md b/doc/models/containers/price-unit-price.md index 6170c75..6aa137a 100644 --- a/doc/models/containers/price-unit-price.md +++ b/doc/models/containers/price-unit-price.md @@ -12,3 +12,23 @@ | `Float` | | `String` | +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/quantity-based-component-unit-price.md b/doc/models/containers/quantity-based-component-unit-price.md index f9ac2f3..bfa4203 100644 --- a/doc/models/containers/quantity-based-component-unit-price.md +++ b/doc/models/containers/quantity-based-component-unit-price.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/reactivate-subscription-request-resume.md b/doc/models/containers/reactivate-subscription-request-resume.md index fb43ef5..cb2945b 100644 --- a/doc/models/containers/reactivate-subscription-request-resume.md +++ b/doc/models/containers/reactivate-subscription-request-resume.md @@ -12,3 +12,23 @@ | `TrueClass \| FalseClass` | | [`ResumeOptions`](../../../doc/models/resume-options.md) | +## TrueClass | FalseClass + +### Initialization Code + +#### Example + +```ruby +value = false +``` + +## ResumeOptions + +### Initialization Code + +#### Example + +```ruby +value = ResumeOptions.new +``` + diff --git a/doc/models/containers/read-component-price-point-component-id.md b/doc/models/containers/read-component-price-point-component-id.md index 472686c..8280c6e 100644 --- a/doc/models/containers/read-component-price-point-component-id.md +++ b/doc/models/containers/read-component-price-point-component-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/read-component-price-point-price-point-id.md b/doc/models/containers/read-component-price-point-price-point-id.md index 6e257ba..a202fdd 100644 --- a/doc/models/containers/read-component-price-point-price-point-id.md +++ b/doc/models/containers/read-component-price-point-price-point-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/read-product-price-point-price-point-id.md b/doc/models/containers/read-product-price-point-price-point-id.md index f97fddc..2938386 100644 --- a/doc/models/containers/read-product-price-point-price-point-id.md +++ b/doc/models/containers/read-product-price-point-price-point-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/read-product-price-point-product-id.md b/doc/models/containers/read-product-price-point-product-id.md index 9ba8cbe..73a5bfc 100644 --- a/doc/models/containers/read-product-price-point-product-id.md +++ b/doc/models/containers/read-product-price-point-product-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/refund-consolidated-invoice-segment-uids.md b/doc/models/containers/refund-consolidated-invoice-segment-uids.md index b7011da..e37acec 100644 --- a/doc/models/containers/refund-consolidated-invoice-segment-uids.md +++ b/doc/models/containers/refund-consolidated-invoice-segment-uids.md @@ -12,3 +12,25 @@ | `Array[String]` | | `String` | +## Array[String] + +### Initialization Code + +#### Example + +```ruby +value = [ + 'String1' +] +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/refund-invoice-request-refund.md b/doc/models/containers/refund-invoice-request-refund.md index 9cb056d..d1518cb 100644 --- a/doc/models/containers/refund-invoice-request-refund.md +++ b/doc/models/containers/refund-invoice-request-refund.md @@ -12,3 +12,34 @@ | [`RefundInvoice`](../../../doc/models/refund-invoice.md) | | [`RefundConsolidatedInvoice`](../../../doc/models/refund-consolidated-invoice.md) | +## RefundInvoice + +### Initialization Code + +#### Example + +```ruby +value = RefundInvoice.new( + amount: 'amount8', + memo: 'memo0', + payment_id: 0 +) +``` + +## RefundConsolidatedInvoice + +### Initialization Code + +#### Example + +```ruby +value = RefundConsolidatedInvoice.new( + memo: 'memo0', + payment_id: 46, + segment_uids: [ + 'String0', + 'String1' + ] +) +``` + diff --git a/doc/models/containers/refund-prepayment-amount.md b/doc/models/containers/refund-prepayment-amount.md index 5cca82c..ee24960 100644 --- a/doc/models/containers/refund-prepayment-amount.md +++ b/doc/models/containers/refund-prepayment-amount.md @@ -12,3 +12,23 @@ | `String` | | `Float` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/renewal-preview-component-component-id.md b/doc/models/containers/renewal-preview-component-component-id.md index c080bb5..6bbe14e 100644 --- a/doc/models/containers/renewal-preview-component-component-id.md +++ b/doc/models/containers/renewal-preview-component-component-id.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/renewal-preview-component-price-point-id.md b/doc/models/containers/renewal-preview-component-price-point-id.md index 8771e05..416d870 100644 --- a/doc/models/containers/renewal-preview-component-price-point-id.md +++ b/doc/models/containers/renewal-preview-component-price-point-id.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md b/doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md index 8810848..96da55c 100644 --- a/doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md +++ b/doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md @@ -12,3 +12,29 @@ | [`ScheduledRenewalItemRequestBodyComponent`](../../../doc/models/scheduled-renewal-item-request-body-component.md) | | [`ScheduledRenewalItemRequestBodyProduct`](../../../doc/models/scheduled-renewal-item-request-body-product.md) | +## ScheduledRenewalItemRequestBodyComponent + +### Initialization Code + +#### Example + +```ruby +value = ScheduledRenewalItemRequestBodyComponent.new( + item_type: 'Component', + item_id: 108 +) +``` + +## ScheduledRenewalItemRequestBodyProduct + +### Initialization Code + +#### Example + +```ruby +value = ScheduledRenewalItemRequestBodyProduct.new( + item_type: 'Product', + item_id: 32 +) +``` + diff --git a/doc/models/containers/scheduled-renewal-product-price-point-interval.md b/doc/models/containers/scheduled-renewal-product-price-point-interval.md index a067375..a5b6e4d 100644 --- a/doc/models/containers/scheduled-renewal-product-price-point-interval.md +++ b/doc/models/containers/scheduled-renewal-product-price-point-interval.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md b/doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md index 59a0156..c7b6571 100644 --- a/doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md +++ b/doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md b/doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md index b6d6cce..1bbe7e4 100644 --- a/doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md +++ b/doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md @@ -12,3 +12,29 @@ | [`ScheduledRenewalItemRequestBodyComponent`](../../../doc/models/scheduled-renewal-item-request-body-component.md) | | [`ScheduledRenewalItemRequestBodyProduct`](../../../doc/models/scheduled-renewal-item-request-body-product.md) | +## ScheduledRenewalItemRequestBodyComponent + +### Initialization Code + +#### Example + +```ruby +value = ScheduledRenewalItemRequestBodyComponent.new( + item_type: 'Component', + item_id: 108 +) +``` + +## ScheduledRenewalItemRequestBodyProduct + +### Initialization Code + +#### Example + +```ruby +value = ScheduledRenewalItemRequestBodyProduct.new( + item_type: 'Product', + item_id: 32 +) +``` + diff --git a/doc/models/containers/segment-segment-property-1-value.md b/doc/models/containers/segment-segment-property-1-value.md index 33d6768..d647784 100644 --- a/doc/models/containers/segment-segment-property-1-value.md +++ b/doc/models/containers/segment-segment-property-1-value.md @@ -14,3 +14,43 @@ | `Integer` | | `TrueClass \| FalseClass` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## TrueClass | FalseClass + +### Initialization Code + +#### Example + +```ruby +value = false +``` + diff --git a/doc/models/containers/segment-segment-property-2-value.md b/doc/models/containers/segment-segment-property-2-value.md index faa56f5..0e64f50 100644 --- a/doc/models/containers/segment-segment-property-2-value.md +++ b/doc/models/containers/segment-segment-property-2-value.md @@ -14,3 +14,43 @@ | `Integer` | | `TrueClass \| FalseClass` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## TrueClass | FalseClass + +### Initialization Code + +#### Example + +```ruby +value = false +``` + diff --git a/doc/models/containers/segment-segment-property-3-value.md b/doc/models/containers/segment-segment-property-3-value.md index a44ab68..5f14eed 100644 --- a/doc/models/containers/segment-segment-property-3-value.md +++ b/doc/models/containers/segment-segment-property-3-value.md @@ -14,3 +14,43 @@ | `Integer` | | `TrueClass \| FalseClass` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## TrueClass | FalseClass + +### Initialization Code + +#### Example + +```ruby +value = false +``` + diff --git a/doc/models/containers/segment-segment-property-4-value.md b/doc/models/containers/segment-segment-property-4-value.md index af8b329..74126b2 100644 --- a/doc/models/containers/segment-segment-property-4-value.md +++ b/doc/models/containers/segment-segment-property-4-value.md @@ -14,3 +14,43 @@ | `Integer` | | `TrueClass \| FalseClass` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## TrueClass | FalseClass + +### Initialization Code + +#### Example + +```ruby +value = false +``` + diff --git a/doc/models/containers/subscription-component-allocated-quantity.md b/doc/models/containers/subscription-component-allocated-quantity.md index 11f9592..cbc38a3 100644 --- a/doc/models/containers/subscription-component-allocated-quantity.md +++ b/doc/models/containers/subscription-component-allocated-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/subscription-custom-price-expiration-interval.md b/doc/models/containers/subscription-custom-price-expiration-interval.md index df197b9..8e0b05c 100644 --- a/doc/models/containers/subscription-custom-price-expiration-interval.md +++ b/doc/models/containers/subscription-custom-price-expiration-interval.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-custom-price-initial-charge-in-cents.md b/doc/models/containers/subscription-custom-price-initial-charge-in-cents.md index 610258f..cb56b78 100644 --- a/doc/models/containers/subscription-custom-price-initial-charge-in-cents.md +++ b/doc/models/containers/subscription-custom-price-initial-charge-in-cents.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-custom-price-interval.md b/doc/models/containers/subscription-custom-price-interval.md index 1a20310..dcd5001 100644 --- a/doc/models/containers/subscription-custom-price-interval.md +++ b/doc/models/containers/subscription-custom-price-interval.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-custom-price-price-in-cents.md b/doc/models/containers/subscription-custom-price-price-in-cents.md index eb73495..75e9769 100644 --- a/doc/models/containers/subscription-custom-price-price-in-cents.md +++ b/doc/models/containers/subscription-custom-price-price-in-cents.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-custom-price-trial-interval.md b/doc/models/containers/subscription-custom-price-trial-interval.md index 60bafdd..af3b9d2 100644 --- a/doc/models/containers/subscription-custom-price-trial-interval.md +++ b/doc/models/containers/subscription-custom-price-trial-interval.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-custom-price-trial-price-in-cents.md b/doc/models/containers/subscription-custom-price-trial-price-in-cents.md index ea48954..38732b5 100644 --- a/doc/models/containers/subscription-custom-price-trial-price-in-cents.md +++ b/doc/models/containers/subscription-custom-price-trial-price-in-cents.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-group-create-error-response-errors.md b/doc/models/containers/subscription-group-create-error-response-errors.md index 4048cdf..e232fd4 100644 --- a/doc/models/containers/subscription-group-create-error-response-errors.md +++ b/doc/models/containers/subscription-group-create-error-response-errors.md @@ -13,3 +13,39 @@ | [`SubscriptionGroupSingleError`](../../../doc/models/subscription-group-single-error.md) | | `String` | +## SubscriptionGroupMembersArrayError + +### Initialization Code + +#### Example + +```ruby +value = SubscriptionGroupMembersArrayError.new( + members: [ + 'members6' + ] +) +``` + +## SubscriptionGroupSingleError + +### Initialization Code + +#### Example + +```ruby +value = SubscriptionGroupSingleError.new( + subscription_group: 'subscription_group2' +) +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/subscription-group-credit-card-expiration-month.md b/doc/models/containers/subscription-group-credit-card-expiration-month.md index dd6577e..ffccc6b 100644 --- a/doc/models/containers/subscription-group-credit-card-expiration-month.md +++ b/doc/models/containers/subscription-group-credit-card-expiration-month.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-group-credit-card-expiration-year.md b/doc/models/containers/subscription-group-credit-card-expiration-year.md index d9d4568..471e948 100644 --- a/doc/models/containers/subscription-group-credit-card-expiration-year.md +++ b/doc/models/containers/subscription-group-credit-card-expiration-year.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-group-credit-card-full-number.md b/doc/models/containers/subscription-group-credit-card-full-number.md index ff811c5..89494d3 100644 --- a/doc/models/containers/subscription-group-credit-card-full-number.md +++ b/doc/models/containers/subscription-group-credit-card-full-number.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-group-signup-component-allocated-quantity.md b/doc/models/containers/subscription-group-signup-component-allocated-quantity.md index 7de7e42..9d22f3e 100644 --- a/doc/models/containers/subscription-group-signup-component-allocated-quantity.md +++ b/doc/models/containers/subscription-group-signup-component-allocated-quantity.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-group-signup-component-component-id.md b/doc/models/containers/subscription-group-signup-component-component-id.md index ac4afe9..ff26c65 100644 --- a/doc/models/containers/subscription-group-signup-component-component-id.md +++ b/doc/models/containers/subscription-group-signup-component-component-id.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-group-signup-component-price-point-id.md b/doc/models/containers/subscription-group-signup-component-price-point-id.md index 4678893..5830e08 100644 --- a/doc/models/containers/subscription-group-signup-component-price-point-id.md +++ b/doc/models/containers/subscription-group-signup-component-price-point-id.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/subscription-group-signup-component-unit-balance.md b/doc/models/containers/subscription-group-signup-component-unit-balance.md index 125c563..ffda551 100644 --- a/doc/models/containers/subscription-group-signup-component-unit-balance.md +++ b/doc/models/containers/subscription-group-signup-component-unit-balance.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/update-component-price-point-component-id.md b/doc/models/containers/update-component-price-point-component-id.md index 3f71cd9..e370fa8 100644 --- a/doc/models/containers/update-component-price-point-component-id.md +++ b/doc/models/containers/update-component-price-point-component-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/update-component-price-point-price-point-id.md b/doc/models/containers/update-component-price-point-price-point-id.md index 3c256ca..2608d3a 100644 --- a/doc/models/containers/update-component-price-point-price-point-id.md +++ b/doc/models/containers/update-component-price-point-price-point-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/update-metafields-request-metafields.md b/doc/models/containers/update-metafields-request-metafields.md index ed76f85..3a222b2 100644 --- a/doc/models/containers/update-metafields-request-metafields.md +++ b/doc/models/containers/update-metafields-request-metafields.md @@ -12,3 +12,25 @@ | [`UpdateMetafield`](../../../doc/models/update-metafield.md) | | [`Array[UpdateMetafield]`](../../../doc/models/update-metafield.md) | +## UpdateMetafield + +### Initialization Code + +#### Example + +```ruby +value = UpdateMetafield.new +``` + +## Array[UpdateMetafield] + +### Initialization Code + +#### Example + +```ruby +value = [ + UpdateMetafield.new +] +``` + diff --git a/doc/models/containers/update-price-ending-quantity.md b/doc/models/containers/update-price-ending-quantity.md index b6d923e..1349d3f 100644 --- a/doc/models/containers/update-price-ending-quantity.md +++ b/doc/models/containers/update-price-ending-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/update-price-starting-quantity.md b/doc/models/containers/update-price-starting-quantity.md index 41716f4..b6310fe 100644 --- a/doc/models/containers/update-price-starting-quantity.md +++ b/doc/models/containers/update-price-starting-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/update-price-unit-price.md b/doc/models/containers/update-price-unit-price.md index b58b2bf..3b2eafc 100644 --- a/doc/models/containers/update-price-unit-price.md +++ b/doc/models/containers/update-price-unit-price.md @@ -12,3 +12,23 @@ | `Float` | | `String` | +## Float + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/update-product-price-point-price-point-id.md b/doc/models/containers/update-product-price-point-price-point-id.md index afa5dd7..3b37a4a 100644 --- a/doc/models/containers/update-product-price-point-price-point-id.md +++ b/doc/models/containers/update-product-price-point-price-point-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/update-product-price-point-product-id.md b/doc/models/containers/update-product-price-point-product-id.md index 11a08dd..ce04ac5 100644 --- a/doc/models/containers/update-product-price-point-product-id.md +++ b/doc/models/containers/update-product-price-point-product-id.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/containers/update-subscription-net-terms.md b/doc/models/containers/update-subscription-net-terms.md index 03d198b..01d07b9 100644 --- a/doc/models/containers/update-subscription-net-terms.md +++ b/doc/models/containers/update-subscription-net-terms.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/update-subscription-snap-day.md b/doc/models/containers/update-subscription-snap-day.md index dd4d7fd..e5a99bc 100644 --- a/doc/models/containers/update-subscription-snap-day.md +++ b/doc/models/containers/update-subscription-snap-day.md @@ -12,3 +12,23 @@ | `String` | | `Integer` | +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + diff --git a/doc/models/containers/usage-quantity.md b/doc/models/containers/usage-quantity.md index b6f395e..a0d0aaa 100644 --- a/doc/models/containers/usage-quantity.md +++ b/doc/models/containers/usage-quantity.md @@ -12,3 +12,23 @@ | `Integer` | | `String` | +## Integer + +### Initialization Code + +#### Example + +```ruby +value = 0 +``` + +## String + +### Initialization Code + +#### Example + +```ruby +value = 'String0' +``` + diff --git a/doc/models/create-allocation.md b/doc/models/create-allocation.md index d386fb2..8c093e5 100644 --- a/doc/models/create-allocation.md +++ b/doc/models/create-allocation.md @@ -22,7 +22,7 @@ | `accrue_charge` | `TrueClass \| FalseClass` | Optional | "If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately.

`true` - Attempt to charge the customer at the next renewal.

`false` - Attempt to charge the customer right away. If it fails, the charge will be accrued until the next renewal.

Defaults to the site setting if unspecified in the request. | | `initiate_dunning` | `TrueClass \| FalseClass` | Optional | If set to true, if the immediate component payment fails, initiate dunning for the subscription.
Otherwise, leave the charges on the subscription to pay for at renewal. Defaults to false. | | `price_point_id` | String \| Integer \| nil | Optional | This is a container for one-of cases. | -| `billing_schedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. This only works for site with Multifrequency enabled. | +| `billing_schedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | | `custom_price` | [`ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | ## Example (as JSON) diff --git a/doc/models/create-invoice.md b/doc/models/create-invoice.md index 0613f2b..457d3cc 100644 --- a/doc/models/create-invoice.md +++ b/doc/models/create-invoice.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `line_items` | [`Array[CreateInvoiceItem]`](../../doc/models/create-invoice-item.md) | Optional | - | -| `issue_date` | `Date` | Optional | - | +| `issue_date` | `Date` | Optional | Date on which the invoice will be issued (format YYYY-MM-DD). This date is interpreted and validated in your site's time zone. It must be today or a date in the past — future dates are not accepted. If omitted, defaults to today in your site's time zone. | | `net_terms` | `Integer` | Optional | By default, invoices will be created with a due date matching the date of invoice creation. If a different due date is desired, the net_terms parameter can be sent indicating the number of days in advance the due date should be. | | `payment_instructions` | `String` | Optional | - | | `memo` | `String` | Optional | A custom memo can be sent to override the site's default. | diff --git a/doc/models/create-on-off-component.md b/doc/models/create-on-off-component.md index 606acd5..a87d8fc 100644 --- a/doc/models/create-on-off-component.md +++ b/doc/models/create-on-off-component.md @@ -1,5 +1,5 @@ -# Create on Off Component +# Create On Off Component ## Structure diff --git a/doc/models/create-or-update-endpoint-request.md b/doc/models/create-or-update-endpoint-request.md index 1f5787c..787658e 100644 --- a/doc/models/create-or-update-endpoint-request.md +++ b/doc/models/create-or-update-endpoint-request.md @@ -20,7 +20,7 @@ Used to Create or Update Endpoint "endpoint": { "url": "url2", "webhook_subscriptions": [ - "dunning_step_reached" + "subscription_prepayment_account_balance_changed" ] } } diff --git a/doc/models/create-or-update-endpoint.md b/doc/models/create-or-update-endpoint.md index 1ae5c65..19b5d1c 100644 --- a/doc/models/create-or-update-endpoint.md +++ b/doc/models/create-or-update-endpoint.md @@ -20,7 +20,7 @@ Used to Create or Update Endpoint { "url": "url8", "webhook_subscriptions": [ - "payment_success" + "refund_success" ] } ``` diff --git a/doc/models/create-payment-profile.md b/doc/models/create-payment-profile.md index f229b86..fae2203 100644 --- a/doc/models/create-payment-profile.md +++ b/doc/models/create-payment-profile.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `chargify_token` | `String` | Optional | Token received after sending billing information using chargify.js. | +| `chargify_token` | `String` | Optional | Token received after sending billing information using Maxio.js (formerly Chargify.js). | | `id` | `Integer` | Optional | - | | `payment_type` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | - | | `first_name` | `String` | Optional | First name on card or bank account. If omitted, the first_name from customer attributes will be used. | @@ -29,8 +29,8 @@ | `vault_token` | `String` | Optional | The “token” provided by your vault storage for an already stored payment profile | | `customer_vault_token` | `String` | Optional | (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | | `customer_id` | `Integer` | Optional | (Required when creating a new payment profile) The Chargify customer id. | -| `paypal_email` | `String` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. | -| `payment_method_nonce` | `String` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. | +| `paypal_email` | `String` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. | +| `payment_method_nonce` | `String` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. | | `gateway_handle` | `String` | Optional | This attribute is only available if MultiGateway feature is enabled for your Site. This feature is in the Private Beta currently. gateway_handle is used to directly select a gateway where a payment profile will be stored in. Every connected gateway must have a unique gateway handle specified. Read [Multigateway description](https://chargify.zendesk.com/hc/en-us/articles/4407761759643#connecting-with-multiple-gateways) to learn more about new concepts that MultiGateway introduces and the default behavior when this attribute is not passed. | | `cvv` | `String` | Optional | The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway. | | `bank_name` | `String` | Optional | (Required when creating with ACH or GoCardless, optional with Stripe Direct Debit). The name of the bank where the customerʼs account resides | diff --git a/doc/models/create-subscription-request.md b/doc/models/create-subscription-request.md index 117b150..3c5137b 100644 --- a/doc/models/create-subscription-request.md +++ b/doc/models/create-subscription-request.md @@ -23,7 +23,6 @@ }, "dunning_communication_delay_enabled": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", - "skip_billing_manifest_taxes": false, "product_handle": "product_handle6", "product_id": 206, "product_price_point_handle": "product_price_point_handle2", diff --git a/doc/models/create-subscription.md b/doc/models/create-subscription.md index 1cce19e..125d47e 100644 --- a/doc/models/create-subscription.md +++ b/doc/models/create-subscription.md @@ -58,7 +58,7 @@ | `ach_agreement` | [`ACHAgreement`](../../doc/models/ach-agreement.md) | Optional | (Optional) If passed, the proof of the authorized ACH agreement terms will be persisted. | | `dunning_communication_delay_enabled` | `TrueClass \| FalseClass` | 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.

**Default**: `false` | | `dunning_communication_delay_time_zone` | `String` | Optional | Time zone for the Dunning Communication Delay feature. | -| `skip_billing_manifest_taxes` | `TrueClass \| FalseClass` | Optional | Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests.

**Default**: `false` | +| `skip_billing_manifest_taxes` | `TrueClass \| FalseClass` | Optional | Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests. Defaults to `false` when not provided. | ## Example (as JSON) @@ -71,7 +71,6 @@ }, "dunning_communication_delay_enabled": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", - "skip_billing_manifest_taxes": false, "product_handle": "product_handle6", "product_id": 212, "product_price_point_handle": "product_price_point_handle0", diff --git a/doc/models/create-usage.md b/doc/models/create-usage.md index 4958417..6dad891 100644 --- a/doc/models/create-usage.md +++ b/doc/models/create-usage.md @@ -12,7 +12,7 @@ | `quantity` | `Float` | Optional | integer by default or decimal number if fractional quantities are enabled for the component | | `price_point_id` | `String` | Optional | - | | `memo` | `String` | Optional | - | -| `billing_schedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. This only works for site with Multifrequency enabled. | +| `billing_schedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | | `custom_price` | [`ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | ## Example (as JSON) diff --git a/doc/models/credit-card-payment-profile.md b/doc/models/credit-card-payment-profile.md index db5948f..893b2e2 100644 --- a/doc/models/credit-card-payment-profile.md +++ b/doc/models/credit-card-payment-profile.md @@ -28,7 +28,7 @@ | `billing_address_2` | `String` | Optional | The current billing street address, second line, for the card. | | `payment_type` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType::CREDIT_CARD` | | `disabled` | `TrueClass \| FalseClass` | Optional | - | -| `chargify_token` | `String` | Optional | Token received after sending billing information using chargify.js. This token will only be received if passed as a sole attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | +| `chargify_token` | `String` | Optional | Token received after sending billing information using Maxio.js (formerly Chargify.js). This token will only be received if passed as a sole attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | | `site_gateway_setting_id` | `Integer` | Optional | - | | `gateway_handle` | `String` | Optional | An identifier of connected gateway. | | `created_at` | `DateTime` | Optional | A timestamp indicating when this payment profile was created | diff --git a/doc/models/credit-note-line-item.md b/doc/models/credit-note-line-item.md index 8ada1dc..2ebeb0b 100644 --- a/doc/models/credit-note-line-item.md +++ b/doc/models/credit-note-line-item.md @@ -17,6 +17,7 @@ | `subtotal_amount` | `String` | Optional | The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount). | | `discount_amount` | `String` | Optional | The approximate discount of just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors. | | `tax_amount` | `String` | Optional | The approximate tax of just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors. | +| `tax_included` | `TrueClass \| FalseClass` | Optional | Whether the unit price for this line item is tax-inclusive.

When `true`, `unit_price` already includes tax and `tax_amount` represents the portion of the price attributable to tax. When `false`, any applicable tax is added on top of the price.

The value is inherited from the source price point's `tax_included` setting. Custom or ad-hoc line items (which have no associated price point) always return `false`. | | `total_amount` | `String` | Optional | The non-canonical total amount for the line.

`subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. | | `tiered_unit_price` | `TrueClass \| FalseClass` | Optional | When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units. | | `period_range_start` | `Date` | Optional | Start date for the period credited by this line. The format is `"YYYY-MM-DD"`. | @@ -27,6 +28,7 @@ | `price_point_id` | `Integer` | Optional | The price point ID of the component being credited. Will be `nil` for non-component credits. | | `billing_schedule_item_id` | `Integer` | Optional | - | | `custom_item` | `TrueClass \| FalseClass` | Optional | - | +| `prepaid_allocation_expires_at` | `Date` | Optional | The date a prepaid allocation is set to expire. Only present on line items representing prepaid component allocations. The format is `"YYYY-MM-DD"`. | ## Example (as JSON) diff --git a/doc/models/customer.md b/doc/models/customer.md index 7dfc202..b6c0565 100644 --- a/doc/models/customer.md +++ b/doc/models/customer.md @@ -39,6 +39,7 @@ | `salesforce_id` | `String` | Optional | The Salesforce ID for the customer | | `tax_exempt_reason` | `String` | Optional | The Tax Exemption Reason Code for the customer | | `default_auto_renewal_profile_id` | `Integer` | Optional | The default auto-renewal profile ID for the customer | +| `maxioid` | `String` | Optional | The Maxio-generated unique identifier for the customer. | ## Example (as JSON) diff --git a/doc/models/event-key.md b/doc/models/event-key.md index feb4046..a400739 100644 --- a/doc/models/event-key.md +++ b/doc/models/event-key.md @@ -42,6 +42,7 @@ | `TRIAL_END_NOTICE` | | `DUNNING_STEP_REACHED` | | `INVOICE_ISSUED` | +| `INVOICE_PENDING` | | `PREPAID_SUBSCRIPTION_BALANCE_CHANGED` | | `SUBSCRIPTION_GROUP_SIGNUP_SUCCESS` | | `SUBSCRIPTION_GROUP_SIGNUP_FAILURE` | @@ -85,6 +86,8 @@ | `CHARGEBACK_WON` | | `PAYMENT_COLLECTION_METHOD_CHANGED` | | `COMPONENT_BILLING_DATE_CHANGED` | +| `CHJS_TOKENIZATION_FAILURE` | +| `CHJS_TOKENIZATION_SUCCESS` | | `SUBSCRIPTION_TERM_RENEWAL_SCHEDULED` | | `SUBSCRIPTION_TERM_RENEWAL_PENDING` | | `SUBSCRIPTION_TERM_RENEWAL_ACTIVATED` | diff --git a/doc/models/event-response.md b/doc/models/event-response.md index 75b1061..1c4163a 100644 --- a/doc/models/event-response.md +++ b/doc/models/event-response.md @@ -17,7 +17,7 @@ { "event": { "id": 242, - "key": "subscription_state_change", + "key": "maxio_payments_direct_debit_payment_rejected", "message": "message0", "subscription_id": 96, "customer_id": 24, diff --git a/doc/models/event.md b/doc/models/event.md index 5155854..2aa9494 100644 --- a/doc/models/event.md +++ b/doc/models/event.md @@ -15,14 +15,14 @@ | `subscription_id` | `Integer` | Required | - | | `customer_id` | `Integer` | Required | - | | `created_at` | `DateTime` | Required | - | -| `event_specific_data` | [Subscription Product Change](../../doc/models/subscription-product-change.md) \| [Subscription State Change](../../doc/models/subscription-state-change.md) \| [Payment Related Events](../../doc/models/payment-related-events.md) \| [Refund Success](../../doc/models/refund-success.md) \| [Component Allocation Change](../../doc/models/component-allocation-change.md) \| [Metered Usage](../../doc/models/metered-usage.md) \| [Prepaid Usage](../../doc/models/prepaid-usage.md) \| [Dunning Step Reached](../../doc/models/dunning-step-reached.md) \| [Invoice Issued](../../doc/models/invoice-issued.md) \| [Pending Cancellation Change](../../doc/models/pending-cancellation-change.md) \| [Prepaid Subscription Balance Changed](../../doc/models/prepaid-subscription-balance-changed.md) \| [Proforma Invoice Issued](../../doc/models/proforma-invoice-issued.md) \| [Subscription Group Signup Event Data](../../doc/models/subscription-group-signup-event-data.md) \| [Credit Account Balance Changed](../../doc/models/credit-account-balance-changed.md) \| [Prepayment Account Balance Changed](../../doc/models/prepayment-account-balance-changed.md) \| [Payment Collection Method Changed](../../doc/models/payment-collection-method-changed.md) \| [Item Price Point Changed](../../doc/models/item-price-point-changed.md) \| [Custom Field Value Change](../../doc/models/custom-field-value-change.md) \| nil | Required | This is a container for one-of cases. | +| `event_specific_data` | [Subscription Product Change](../../doc/models/subscription-product-change.md) \| [Subscription State Change](../../doc/models/subscription-state-change.md) \| [Payment Related Events](../../doc/models/payment-related-events.md) \| [Refund Success](../../doc/models/refund-success.md) \| [Component Allocation Change](../../doc/models/component-allocation-change.md) \| [Metered Usage](../../doc/models/metered-usage.md) \| [Prepaid Usage](../../doc/models/prepaid-usage.md) \| [Dunning Step Reached](../../doc/models/dunning-step-reached.md) \| [Invoice Issued](../../doc/models/invoice-issued.md) \| [Pending Cancellation Change](../../doc/models/pending-cancellation-change.md) \| [Prepaid Subscription Balance Changed](../../doc/models/prepaid-subscription-balance-changed.md) \| [Proforma Invoice Issued](../../doc/models/proforma-invoice-issued.md) \| [Subscription Group Signup Event Data](../../doc/models/subscription-group-signup-event-data.md) \| [Credit Account Balance Changed](../../doc/models/credit-account-balance-changed.md) \| [Prepayment Account Balance Changed](../../doc/models/prepayment-account-balance-changed.md) \| [Payment Collection Method Changed](../../doc/models/payment-collection-method-changed.md) \| [Item Price Point Changed](../../doc/models/item-price-point-changed.md) \| [Custom Field Value Change](../../doc/models/custom-field-value-change.md) \| [Chjs Tokenization Success](../../doc/models/chjs-tokenization-success.md) \| [Chjs Tokenization Failure](../../doc/models/chjs-tokenization-failure.md) \| nil | Required | This is a container for one-of cases. | ## Example (as JSON) ```json { "id": 40, - "key": "invoice_issued", + "key": "subscription_group_signup_success", "message": "message8", "subscription_id": 150, "customer_id": 78, diff --git a/doc/models/invoice-line-item.md b/doc/models/invoice-line-item.md index 407f90b..a153733 100644 --- a/doc/models/invoice-line-item.md +++ b/doc/models/invoice-line-item.md @@ -17,6 +17,7 @@ | `subtotal_amount` | `String` | Optional | The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount). | | `discount_amount` | `String` | Optional | The approximate discount applied to just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors. | | `tax_amount` | `String` | Optional | The approximate tax applied to just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors. | +| `tax_included` | `TrueClass \| FalseClass` | Optional | Whether the unit price for this line item is tax-inclusive.

When `true`, `unit_price` already includes tax and `tax_amount` represents the portion of the price attributable to tax. When `false`, any applicable tax is added on top of the price.

The value is inherited from the source price point's `tax_included` setting. Custom or ad-hoc line items (which have no associated price point) always return `false`. | | `total_amount` | `String` | Optional | The non-canonical total amount for the line.

`subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. | | `tiered_unit_price` | `TrueClass \| FalseClass` | Optional | When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units. | | `period_range_start` | `Date` | Optional | Start date for the period covered by this line. The format is `"YYYY-MM-DD"`.

* For periodic charges paid in advance, this date will match the billing date, and the end date will be in the future.
* For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the previous billing, and the end date will be the current billing date.
* For non-periodic charges, this date and the end date will match. | @@ -32,6 +33,7 @@ | `product_price_point_id` | `Integer` | Optional | The price point ID of the line item's product | | `custom_item` | `TrueClass \| FalseClass` | Optional | - | | `kind` | `String` | Optional | - | +| `prepaid_allocation_expires_at` | `Date` | Optional | The date a prepaid allocation is set to expire. Only present on line items representing prepaid component allocations. The format is `"YYYY-MM-DD"`. | ## Example (as JSON) diff --git a/doc/models/payment-profile-attributes.md b/doc/models/payment-profile-attributes.md index 1a9fa8f..d352438 100644 --- a/doc/models/payment-profile-attributes.md +++ b/doc/models/payment-profile-attributes.md @@ -11,7 +11,7 @@ alias to credit_card_attributes | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `chargify_token` | `String` | Optional | (Optional) Token received after sending billing information using chargify.js. This token must be passed as a sole attribute of `payment_profile_attributes` (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | +| `chargify_token` | `String` | Optional | (Optional) Token received after sending billing information using Maxio.js (formerly Chargify.js). This token must be passed as a sole attribute of `payment_profile_attributes` (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | | `id` | `Integer` | Optional | - | | `payment_type` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | - | | `first_name` | `String` | Optional | (Optional) First name on card or bank account. If omitted, the first_name from customer attributes will be used. | diff --git a/doc/models/payment-profile-params.md b/doc/models/payment-profile-params.md new file mode 100644 index 0000000..1fe97b6 --- /dev/null +++ b/doc/models/payment-profile-params.md @@ -0,0 +1,27 @@ + +# Payment Profile Params + +PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. + +## Structure + +`PaymentProfileParams` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `first_name` | `String` | Optional | - | +| `last_name` | `String` | Optional | - | +| `card_type` | `String` | Optional | - | + +## Example (as JSON) + +```json +{ + "first_name": "first_name2", + "last_name": "last_name0", + "card_type": "card_type8" +} +``` + diff --git a/doc/models/site.md b/doc/models/site.md index 079ac20..2b1f82d 100644 --- a/doc/models/site.md +++ b/doc/models/site.md @@ -25,6 +25,9 @@ | `organization_address` | [`OrganizationAddress`](../../doc/models/organization-address.md) | Optional | - | | `tax_configuration` | [`TaxConfiguration`](../../doc/models/tax-configuration.md) | Optional | - | | `net_terms` | [`NetTerms`](../../doc/models/net-terms.md) | Optional | - | +| `multi_frequency_enabled` | `TrueClass \| FalseClass` | Optional | Whether the site has the multi-frequency billing feature enabled. Only present when relationship invoicing is active. | +| `auto_renewals_enabled` | `TrueClass \| FalseClass` | Optional | Whether the auto-renewals feature is enabled for this site. | +| `portal_enabled` | `TrueClass \| FalseClass` | Optional | Whether the Billing Portal is enabled for this site. | | `test` | `TrueClass \| FalseClass` | Optional | - | ## Example (as JSON) diff --git a/doc/models/tokenized-payment-profile.md b/doc/models/tokenized-payment-profile.md new file mode 100644 index 0000000..b030464 --- /dev/null +++ b/doc/models/tokenized-payment-profile.md @@ -0,0 +1,27 @@ + +# Tokenized Payment Profile + +## Structure + +`TokenizedPaymentProfile` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `Integer` | Required | - | +| `vault_token` | `String` | Optional | - | +| `gateway_handle` | `String` | Optional | - | +| `customer_vault_token` | `String` | Optional | - | + +## Example (as JSON) + +```json +{ + "id": 72, + "vault_token": "vault_token2", + "gateway_handle": "gateway_handle8", + "customer_vault_token": "customer_vault_token8" +} +``` + diff --git a/doc/models/webhook-subscription.md b/doc/models/webhook-subscription.md index ced689e..85990e5 100644 --- a/doc/models/webhook-subscription.md +++ b/doc/models/webhook-subscription.md @@ -11,12 +11,15 @@ | --- | | `BILLING_DATE_CHANGE` | | `COMPONENT_ALLOCATION_CHANGE` | +| `CHJS_TOKENIZATION_FAILURE` | +| `CHJS_TOKENIZATION_SUCCESS` | | `CUSTOMER_CREATE` | | `CUSTOMER_UPDATE` | | `DUNNING_STEP_REACHED` | | `EXPIRING_CARD` | | `EXPIRATION_DATE_CHANGE` | | `INVOICE_ISSUED` | +| `INVOICE_PENDING` | | `METERED_USAGE` | | `PAYMENT_FAILURE` | | `PAYMENT_SUCCESS` | diff --git a/lib/advanced_billing.rb b/lib/advanced_billing.rb index 5cb171b..d89c52b 100644 --- a/lib/advanced_billing.rb +++ b/lib/advanced_billing.rb @@ -31,681 +31,685 @@ # Models require_relative 'advanced_billing/models/base_model' require_relative 'advanced_billing/models/payment_method_apple_pay' -require_relative 'advanced_billing/models/refund_invoice_event' -require_relative 'advanced_billing/models/void_invoice_event' -require_relative 'advanced_billing/models/list_invoice_events_response' -require_relative 'advanced_billing/models/bank_account_payment_profile' -require_relative 'advanced_billing/models/credit_card_payment_profile' -require_relative 'advanced_billing/models/account_balance' -require_relative 'advanced_billing/models/activate_event_based_component' -require_relative 'advanced_billing/models/allocate_components' -require_relative 'advanced_billing/models/allocation_preview_item' -require_relative 'advanced_billing/models/payment_method_credit_card' -require_relative 'advanced_billing/models/apply_credit_note_event' -require_relative 'advanced_billing/models/apply_debit_note_event' -require_relative 'advanced_billing/models/change_chargeback_status_event' -require_relative 'advanced_billing/models/create_credit_note_event' -require_relative 'advanced_billing/models/remove_payment_event' -require_relative 'advanced_billing/models/paypal_payment_profile' -require_relative 'advanced_billing/models/add_subscription_to_a_group' -require_relative 'advanced_billing/models/address_change' -require_relative 'advanced_billing/models/allocation' require_relative 'advanced_billing/models/payment_method_bank_account' +require_relative 'advanced_billing/models/payment_method_credit_card' require_relative 'advanced_billing/models/payment_method_external' -require_relative 'advanced_billing/models/backport_invoice_event' -require_relative 'advanced_billing/models/void_remainder_event' -require_relative 'advanced_billing/models/allocation_expiration_date' require_relative 'advanced_billing/models/payment_method_paypal' +require_relative 'advanced_billing/models/apply_credit_note_event' +require_relative 'advanced_billing/models/apply_debit_note_event' require_relative 'advanced_billing/models/apply_payment_event' +require_relative 'advanced_billing/models/backport_invoice_event' +require_relative 'advanced_billing/models/change_chargeback_status_event' require_relative 'advanced_billing/models/' \ 'change_invoice_collection_method_event' require_relative 'advanced_billing/models/change_invoice_status_event' +require_relative 'advanced_billing/models/create_credit_note_event' require_relative 'advanced_billing/models/create_debit_note_event' require_relative 'advanced_billing/models/failed_payment_event' require_relative 'advanced_billing/models/issue_invoice_event' +require_relative 'advanced_billing/models/refund_invoice_event' +require_relative 'advanced_billing/models/remove_payment_event' +require_relative 'advanced_billing/models/void_invoice_event' +require_relative 'advanced_billing/models/void_remainder_event' +require_relative 'advanced_billing/models/list_invoice_events_response' require_relative 'advanced_billing/models/apple_pay_payment_profile' +require_relative 'advanced_billing/models/bank_account_payment_profile' +require_relative 'advanced_billing/models/credit_card_payment_profile' +require_relative 'advanced_billing/models/paypal_payment_profile' +require_relative 'advanced_billing/models/account_balance' require_relative 'advanced_billing/models/account_balances' require_relative 'advanced_billing/models/ach_agreement' +require_relative 'advanced_billing/models/activate_event_based_component' require_relative 'advanced_billing/models/activate_subscription_request' require_relative 'advanced_billing/models/add_coupons_request' +require_relative 'advanced_billing/models/add_subscription_to_a_group' +require_relative 'advanced_billing/models/address_change' require_relative 'advanced_billing/models/agreement_acceptance' +require_relative 'advanced_billing/models/allocate_components' +require_relative 'advanced_billing/models/allocation' +require_relative 'advanced_billing/models/allocation_expiration_date' require_relative 'advanced_billing/models/allocation_preview' +require_relative 'advanced_billing/models/allocation_preview_item' require_relative 'advanced_billing/models/allocation_preview_line_item' -require_relative 'advanced_billing/models/apply_debit_note_event_data' -require_relative 'advanced_billing/models/bank_account_attributes' -require_relative 'advanced_billing/models/base_string_error' -require_relative 'advanced_billing/models/batch_job' -require_relative 'advanced_billing/models/' \ - 'bulk_create_product_price_points_response' -require_relative 'advanced_billing/models/chargify_ebb' -require_relative 'advanced_billing/models/component_allocation_change' -require_relative 'advanced_billing/models/component_allocation_error_item' -require_relative 'advanced_billing/models/component_custom_price' +require_relative 'advanced_billing/models/allocation_preview_response' require_relative 'advanced_billing/models/allocation_response' require_relative 'advanced_billing/models/allocation_settings' require_relative 'advanced_billing/models/applied_credit_note_data' +require_relative 'advanced_billing/models/apply_credit_note_event_data' +require_relative 'advanced_billing/models/apply_debit_note_event_data' +require_relative 'advanced_billing/models/apply_payment_event_data' require_relative 'advanced_billing/models/attribute_error' require_relative 'advanced_billing/models/auto_resume' +require_relative 'advanced_billing/models/available_actions' +require_relative 'advanced_billing/models/bank_account_attributes' +require_relative 'advanced_billing/models/bank_account_response' require_relative 'advanced_billing/models/bank_account_verification' +require_relative 'advanced_billing/models/bank_account_verification_request' +require_relative 'advanced_billing/models/base_refund_error' +require_relative 'advanced_billing/models/base_string_error' +require_relative 'advanced_billing/models/batch_job_response' +require_relative 'advanced_billing/models/batch_job' +require_relative 'advanced_billing/models/billing_manifest' +require_relative 'advanced_billing/models/billing_manifest_item' require_relative 'advanced_billing/models/billing_schedule' require_relative 'advanced_billing/models/breakouts' require_relative 'advanced_billing/models/' \ 'bulk_components_price_point_assignment' require_relative 'advanced_billing/models/' \ 'bulk_create_product_price_points_request' -require_relative 'advanced_billing/models/cancellation_options' -require_relative 'advanced_billing/models/cancellation_request' require_relative 'advanced_billing/models/' \ - 'change_invoice_collection_method_event_data' -require_relative 'advanced_billing/models/change_invoice_status_event_data' -require_relative 'advanced_billing/models/component_currency_price' -require_relative 'advanced_billing/models/allocation_preview_response' -require_relative 'advanced_billing/models/apply_credit_note_event_data' -require_relative 'advanced_billing/models/apply_payment_event_data' -require_relative 'advanced_billing/models/available_actions' -require_relative 'advanced_billing/models/bank_account_response' -require_relative 'advanced_billing/models/batch_job_response' -require_relative 'advanced_billing/models/calendar_billing' -require_relative 'advanced_billing/models/change_chargeback_status_event_data' -require_relative 'advanced_billing/models/component' -require_relative 'advanced_billing/models/component_currency_prices_response' -require_relative 'advanced_billing/models/component_price' -require_relative 'advanced_billing/models/bank_account_verification_request' -require_relative 'advanced_billing/models/base_refund_error' -require_relative 'advanced_billing/models/billing_manifest' -require_relative 'advanced_billing/models/billing_manifest_item' + 'bulk_create_product_price_points_response' require_relative 'advanced_billing/models/bulk_create_segments' require_relative 'advanced_billing/models/bulk_update_segments' require_relative 'advanced_billing/models/bulk_update_segments_item' +require_relative 'advanced_billing/models/calendar_billing' require_relative 'advanced_billing/models/cancel_grouped_subscriptions_request' +require_relative 'advanced_billing/models/cancellation_options' +require_relative 'advanced_billing/models/cancellation_request' +require_relative 'advanced_billing/models/change_chargeback_status_event_data' +require_relative 'advanced_billing/models/' \ + 'change_invoice_collection_method_event_data' +require_relative 'advanced_billing/models/change_invoice_status_event_data' +require_relative 'advanced_billing/models/chargify_ebb' +require_relative 'advanced_billing/models/chjs_tokenization_failure' +require_relative 'advanced_billing/models/chjs_tokenization_success' require_relative 'advanced_billing/models/clone_component_price_point' require_relative 'advanced_billing/models/clone_component_price_point_request' +require_relative 'advanced_billing/models/component' +require_relative 'advanced_billing/models/component_allocation_change' +require_relative 'advanced_billing/models/component_allocation_error_item' require_relative 'advanced_billing/models/component_cost_data' require_relative 'advanced_billing/models/component_cost_data_rate_tier' +require_relative 'advanced_billing/models/component_currency_price' +require_relative 'advanced_billing/models/component_currency_prices_response' +require_relative 'advanced_billing/models/component_custom_price' +require_relative 'advanced_billing/models/component_price' require_relative 'advanced_billing/models/component_price_point' +require_relative 'advanced_billing/models/component_price_point_assignment' +require_relative 'advanced_billing/models/' \ + 'component_price_point_currency_overage_response' require_relative 'advanced_billing/models/component_price_point_item' +require_relative 'advanced_billing/models/component_price_point_response' require_relative 'advanced_billing/models/component_price_points_response' +require_relative 'advanced_billing/models/component_price_point_error_item' require_relative 'advanced_billing/models/component_response' require_relative 'advanced_billing/models/consolidated_invoice' +require_relative 'advanced_billing/models/contract' require_relative 'advanced_billing/models/count_response' require_relative 'advanced_billing/models/coupon' +require_relative 'advanced_billing/models/coupon_currency' require_relative 'advanced_billing/models/coupon_currency_request' -require_relative 'advanced_billing/models/coupon_response' -require_relative 'advanced_billing/models/coupon_usage' -require_relative 'advanced_billing/models/create_allocation' -require_relative 'advanced_billing/models/create_currency_prices_request' -require_relative 'advanced_billing/models/create_invoice_payment_application' -require_relative 'advanced_billing/models/create_metadata' -require_relative 'advanced_billing/models/create_metafield' -require_relative 'advanced_billing/models/create_multi_invoice_payment' -require_relative 'advanced_billing/models/create_offer' -require_relative 'advanced_billing/models/create_or_update_endpoint' -require_relative 'advanced_billing/models/create_payment_profile_request' -require_relative 'advanced_billing/models/create_prepayment' -require_relative 'advanced_billing/models/create_product_family' -require_relative 'advanced_billing/models/create_product_family_request' -require_relative 'advanced_billing/models/create_usage_request' -require_relative 'advanced_billing/models/credit_note' -require_relative 'advanced_billing/models/credit_note_application' -require_relative 'advanced_billing/models/deduct_service_credit_request' -require_relative 'advanced_billing/models/deliver_proforma_invoice_request' -require_relative 'advanced_billing/models/dunner_data' -require_relative 'advanced_billing/models/dunning_step_reached' -require_relative 'advanced_billing/models/ebb_component' -require_relative 'advanced_billing/models/ebb_event' -require_relative 'advanced_billing/models/enable_webhooks_request' -require_relative 'advanced_billing/models/enable_webhooks_response' -require_relative 'advanced_billing/models/invoice_discount' -require_relative 'advanced_billing/models/invoice_line_item' -require_relative 'advanced_billing/models/invoice_previous_balance' -require_relative 'advanced_billing/models/invoice_refund' -require_relative 'advanced_billing/models/coupon_request' -require_relative 'advanced_billing/models/create_currency_price' -require_relative 'advanced_billing/models/create_invoice' -require_relative 'advanced_billing/models/create_invoice_address' -require_relative 'advanced_billing/models/create_offer_request' -require_relative 'advanced_billing/models/create_or_update_product' -require_relative 'advanced_billing/models/create_prepaid_component' -require_relative 'advanced_billing/models/' \ - 'create_prepaid_usage_component_price_point' -require_relative 'advanced_billing/models/create_subscription_group_request' -require_relative 'advanced_billing/models/create_usage' -require_relative 'advanced_billing/models/customer_attributes' -require_relative 'advanced_billing/models/customer_error' -require_relative 'advanced_billing/models/delete_subscription_group_response' -require_relative 'advanced_billing/models/errors' -require_relative 'advanced_billing/models/event_based_billing_segment_error' -require_relative 'advanced_billing/models/failed_payment_event_data' -require_relative 'advanced_billing/models/invoice_balance_item' -require_relative 'advanced_billing/models/invoice_credit' -require_relative 'advanced_billing/models/invoice_line_item_component_cost_data' -require_relative 'advanced_billing/models/invoice_payer' -require_relative 'advanced_billing/models/invoice_payment' -require_relative 'advanced_billing/models/invoice_payment_application' -require_relative 'advanced_billing/models/invoice_pre_payment' -require_relative 'advanced_billing/models/invoice_seller' -require_relative 'advanced_billing/models/component_price_point_error_item' +require_relative 'advanced_billing/models/coupon_currency_response' require_relative 'advanced_billing/models/coupon_payload' +require_relative 'advanced_billing/models/coupon_request' +require_relative 'advanced_billing/models/coupon_response' +require_relative 'advanced_billing/models/coupon_restriction' require_relative 'advanced_billing/models/coupon_subcodes' require_relative 'advanced_billing/models/coupon_subcodes_response' +require_relative 'advanced_billing/models/coupon_usage' +require_relative 'advanced_billing/models/create_allocation' +require_relative 'advanced_billing/models/create_allocation_request' +require_relative 'advanced_billing/models/create_component_price_point' require_relative 'advanced_billing/models/create_component_price_point_request' +require_relative 'advanced_billing/models/create_component_price_points_request' +require_relative 'advanced_billing/models/create_currency_price' +require_relative 'advanced_billing/models/create_currency_prices_request' require_relative 'advanced_billing/models/create_customer' +require_relative 'advanced_billing/models/create_customer_request' require_relative 'advanced_billing/models/create_ebb_component' +require_relative 'advanced_billing/models/create_invoice' +require_relative 'advanced_billing/models/create_invoice_address' require_relative 'advanced_billing/models/create_invoice_coupon' +require_relative 'advanced_billing/models/create_invoice_item' require_relative 'advanced_billing/models/create_invoice_payment' +require_relative 'advanced_billing/models/create_invoice_payment_application' require_relative 'advanced_billing/models/create_invoice_payment_request' require_relative 'advanced_billing/models/create_invoice_request' +require_relative 'advanced_billing/models/create_metadata' +require_relative 'advanced_billing/models/create_metadata_request' +require_relative 'advanced_billing/models/create_metafield' require_relative 'advanced_billing/models/create_metafields_request' +require_relative 'advanced_billing/models/create_metered_component' +require_relative 'advanced_billing/models/create_multi_invoice_payment' require_relative 'advanced_billing/models/create_multi_invoice_payment_request' +require_relative 'advanced_billing/models/create_offer' require_relative 'advanced_billing/models/create_offer_component' +require_relative 'advanced_billing/models/create_offer_request' +require_relative 'advanced_billing/models/create_on_off_component' +require_relative 'advanced_billing/models/create_or_update_endpoint' require_relative 'advanced_billing/models/create_or_update_endpoint_request' +require_relative 'advanced_billing/models/create_or_update_product' +require_relative 'advanced_billing/models/create_or_update_product_request' require_relative 'advanced_billing/models/create_or_update_segment_price' require_relative 'advanced_billing/models/create_payment' +require_relative 'advanced_billing/models/create_payment_profile' +require_relative 'advanced_billing/models/create_payment_profile_request' +require_relative 'advanced_billing/models/create_prepaid_component' +require_relative 'advanced_billing/models/' \ + 'create_prepaid_usage_component_price_point' +require_relative 'advanced_billing/models/create_prepayment' +require_relative 'advanced_billing/models/create_prepayment_request' require_relative 'advanced_billing/models/create_prepayment_response' +require_relative 'advanced_billing/models/create_product_currency_price' require_relative 'advanced_billing/models/' \ 'create_product_currency_prices_request' +require_relative 'advanced_billing/models/create_product_family' +require_relative 'advanced_billing/models/create_product_family_request' +require_relative 'advanced_billing/models/create_product_price_point' require_relative 'advanced_billing/models/create_product_price_point_request' require_relative 'advanced_billing/models/create_quantity_based_component' require_relative 'advanced_billing/models/create_reason_code' +require_relative 'advanced_billing/models/create_reason_code_request' require_relative 'advanced_billing/models/create_segment' require_relative 'advanced_billing/models/create_segment_request' -require_relative 'advanced_billing/models/credit_account_balance_changed' -require_relative 'advanced_billing/models/credit_note_line_item' -require_relative 'advanced_billing/models/currency_overage_prices' -require_relative 'advanced_billing/models/currency_prices_response' -require_relative 'advanced_billing/models/custom_field_value_change' -require_relative 'advanced_billing/models/customer' -require_relative 'advanced_billing/models/customer_change' -require_relative 'advanced_billing/models/customer_changes_preview_response' -require_relative 'advanced_billing/models/customer_payer_change' -require_relative 'advanced_billing/models/delayed_cancellation_response' -require_relative 'advanced_billing/models/dunning_step_data' -require_relative 'advanced_billing/models/endpoint' -require_relative 'advanced_billing/models/event_response' -require_relative 'advanced_billing/models/full_subscription_group_response' -require_relative 'advanced_billing/models/group_settings' -require_relative 'advanced_billing/models/group_target' -require_relative 'advanced_billing/models/historic_usage' -require_relative 'advanced_billing/models/component_price_point_assignment' -require_relative 'advanced_billing/models/' \ - 'component_price_point_currency_overage_response' -require_relative 'advanced_billing/models/component_price_point_response' -require_relative 'advanced_billing/models/contract' -require_relative 'advanced_billing/models/coupon_currency' -require_relative 'advanced_billing/models/coupon_currency_response' -require_relative 'advanced_billing/models/coupon_restriction' -require_relative 'advanced_billing/models/create_allocation_request' -require_relative 'advanced_billing/models/create_component_price_point' -require_relative 'advanced_billing/models/create_component_price_points_request' -require_relative 'advanced_billing/models/create_customer_request' -require_relative 'advanced_billing/models/create_invoice_item' -require_relative 'advanced_billing/models/create_metadata_request' -require_relative 'advanced_billing/models/create_metered_component' -require_relative 'advanced_billing/models/create_on_off_component' -require_relative 'advanced_billing/models/create_or_update_product_request' -require_relative 'advanced_billing/models/create_payment_profile' -require_relative 'advanced_billing/models/create_prepayment_request' -require_relative 'advanced_billing/models/create_product_currency_price' -require_relative 'advanced_billing/models/create_product_price_point' -require_relative 'advanced_billing/models/create_reason_code_request' require_relative 'advanced_billing/models/create_subscription' require_relative 'advanced_billing/models/create_subscription_component' require_relative 'advanced_billing/models/create_subscription_group' +require_relative 'advanced_billing/models/create_subscription_group_request' require_relative 'advanced_billing/models/create_subscription_request' +require_relative 'advanced_billing/models/create_usage' +require_relative 'advanced_billing/models/create_usage_request' require_relative 'advanced_billing/models/created_prepayment' +require_relative 'advanced_billing/models/credit_account_balance_changed' require_relative 'advanced_billing/models/credit_card_attributes' +require_relative 'advanced_billing/models/credit_note' +require_relative 'advanced_billing/models/credit_note_application' +require_relative 'advanced_billing/models/credit_note_line_item' require_relative 'advanced_billing/models/credit_scheme_request' +require_relative 'advanced_billing/models/currency_overage_prices' require_relative 'advanced_billing/models/currency_price' +require_relative 'advanced_billing/models/currency_prices_response' +require_relative 'advanced_billing/models/custom_field_value_change' +require_relative 'advanced_billing/models/customer' +require_relative 'advanced_billing/models/customer_attributes' +require_relative 'advanced_billing/models/customer_change' +require_relative 'advanced_billing/models/customer_changes_preview_response' require_relative 'advanced_billing/models/customer_custom_fields_change' +require_relative 'advanced_billing/models/customer_error' +require_relative 'advanced_billing/models/customer_payer_change' require_relative 'advanced_billing/models/customer_response' require_relative 'advanced_billing/models/debit_note' require_relative 'advanced_billing/models/deduct_service_credit' +require_relative 'advanced_billing/models/deduct_service_credit_request' +require_relative 'advanced_billing/models/delayed_cancellation_response' +require_relative 'advanced_billing/models/delete_subscription_group_response' +require_relative 'advanced_billing/models/deliver_proforma_invoice_request' +require_relative 'advanced_billing/models/dunner_data' +require_relative 'advanced_billing/models/dunning_step_data' +require_relative 'advanced_billing/models/dunning_step_reached' +require_relative 'advanced_billing/models/ebb_component' +require_relative 'advanced_billing/models/ebb_event' +require_relative 'advanced_billing/models/enable_webhooks_request' +require_relative 'advanced_billing/models/enable_webhooks_response' +require_relative 'advanced_billing/models/endpoint' require_relative 'advanced_billing/models/endpoint_response' +require_relative 'advanced_billing/models/errors' require_relative 'advanced_billing/models/event' +require_relative 'advanced_billing/models/event_based_billing_segment_error' +require_relative 'advanced_billing/models/event_response' +require_relative 'advanced_billing/models/failed_payment_event_data' +require_relative 'advanced_billing/models/full_subscription_group_response' require_relative 'advanced_billing/models/get_one_time_token_payment_profile' require_relative 'advanced_billing/models/get_one_time_token_request' require_relative 'advanced_billing/models/group_billing' +require_relative 'advanced_billing/models/group_settings' +require_relative 'advanced_billing/models/group_target' +require_relative 'advanced_billing/models/historic_usage' require_relative 'advanced_billing/models/invoice' +require_relative 'advanced_billing/models/invoice_address' require_relative 'advanced_billing/models/invoice_avatax_details' +require_relative 'advanced_billing/models/invoice_balance_item' +require_relative 'advanced_billing/models/invoice_credit' require_relative 'advanced_billing/models/invoice_custom_field' require_relative 'advanced_billing/models/invoice_customer' require_relative 'advanced_billing/models/invoice_debit' +require_relative 'advanced_billing/models/invoice_discount' require_relative 'advanced_billing/models/invoice_discount_breakout' require_relative 'advanced_billing/models/invoice_display_settings' require_relative 'advanced_billing/models/invoice_issued' -require_relative 'advanced_billing/models/invoice_response' -require_relative 'advanced_billing/models/invoice_address' +require_relative 'advanced_billing/models/invoice_line_item' +require_relative 'advanced_billing/models/invoice_line_item_component_cost_data' require_relative 'advanced_billing/models/invoice_line_item_event_data' require_relative 'advanced_billing/models/invoice_line_item_pricing_detail' +require_relative 'advanced_billing/models/invoice_payer' require_relative 'advanced_billing/models/invoice_payer_change' +require_relative 'advanced_billing/models/invoice_payment' +require_relative 'advanced_billing/models/invoice_payment_application' require_relative 'advanced_billing/models/invoice_payment_method' +require_relative 'advanced_billing/models/invoice_pre_payment' +require_relative 'advanced_billing/models/invoice_previous_balance' +require_relative 'advanced_billing/models/invoice_refund' +require_relative 'advanced_billing/models/invoice_response' +require_relative 'advanced_billing/models/invoice_seller' require_relative 'advanced_billing/models/invoice_tax' -require_relative 'advanced_billing/models/list_coupons_filter' -require_relative 'advanced_billing/models/list_offers_response' -require_relative 'advanced_billing/models/list_prepayments_filter' -require_relative 'advanced_billing/models/list_price_points_filter' -require_relative 'advanced_billing/models/list_product_price_points_response' -require_relative 'advanced_billing/models/list_products_filter' -require_relative 'advanced_billing/models/list_proforma_invoices_response' -require_relative 'advanced_billing/models/list_public_keys_meta' -require_relative 'advanced_billing/models/list_subscription_components_filter' -require_relative 'advanced_billing/models/list_subscription_groups_meta' -require_relative 'advanced_billing/models/metadata' -require_relative 'advanced_billing/models/metered_usage' -require_relative 'advanced_billing/models/multi_invoice_payment_response' -require_relative 'advanced_billing/models/net_terms' -require_relative 'advanced_billing/models/offer_signup_page' +require_relative 'advanced_billing/models/invoice_tax_breakout' require_relative 'advanced_billing/models/invoice_tax_component_breakout' require_relative 'advanced_billing/models/issue_advance_invoice_request' require_relative 'advanced_billing/models/issue_invoice_event_data' +require_relative 'advanced_billing/models/issue_invoice_request' require_relative 'advanced_billing/models/issue_service_credit' +require_relative 'advanced_billing/models/issue_service_credit_request' require_relative 'advanced_billing/models/item_price_point_changed' require_relative 'advanced_billing/models/item_price_point_data' +require_relative 'advanced_billing/models/list_components_filter' require_relative 'advanced_billing/models/list_components_price_points_response' +require_relative 'advanced_billing/models/list_coupons_filter' require_relative 'advanced_billing/models/list_credit_notes_response' require_relative 'advanced_billing/models/list_invoices_response' +require_relative 'advanced_billing/models/list_metafields_response' require_relative 'advanced_billing/models/list_mrr_filter' require_relative 'advanced_billing/models/list_mrr_response' require_relative 'advanced_billing/models/list_mrr_response_result' +require_relative 'advanced_billing/models/list_offers_response' +require_relative 'advanced_billing/models/list_prepayments_filter' +require_relative 'advanced_billing/models/list_price_points_filter' +require_relative 'advanced_billing/models/list_product_price_points_response' +require_relative 'advanced_billing/models/list_products_filter' +require_relative 'advanced_billing/models/list_proforma_invoices_meta' +require_relative 'advanced_billing/models/list_proforma_invoices_response' +require_relative 'advanced_billing/models/list_public_keys_meta' require_relative 'advanced_billing/models/list_public_keys_response' +require_relative 'advanced_billing/models/list_sale_rep_item' +require_relative 'advanced_billing/models/list_segments_filter' require_relative 'advanced_billing/models/list_segments_response' +require_relative 'advanced_billing/models/list_service_credits_response' +require_relative 'advanced_billing/models/' \ + 'list_subcription_group_prepayment_item' +require_relative 'advanced_billing/models/list_subscription_components_filter' require_relative 'advanced_billing/models/' \ 'list_subscription_components_for_site_filter' +require_relative 'advanced_billing/models/list_subscription_components_response' require_relative 'advanced_billing/models/list_subscription_group_prepayment' +require_relative 'advanced_billing/models/' \ + 'list_subscription_group_prepayment_response' +require_relative 'advanced_billing/models/list_subscription_groups_item' +require_relative 'advanced_billing/models/list_subscription_groups_meta' require_relative 'advanced_billing/models/list_subscription_groups_response' +require_relative 'advanced_billing/models/metadata' require_relative 'advanced_billing/models/metafield' require_relative 'advanced_billing/models/metafield_scope' -require_relative 'advanced_billing/models/movement_line_item' -require_relative 'advanced_billing/models/mrr_movement' -require_relative 'advanced_billing/models/offer' -require_relative 'advanced_billing/models/offer_response' -require_relative 'advanced_billing/models/issue_invoice_request' -require_relative 'advanced_billing/models/issue_service_credit_request' -require_relative 'advanced_billing/models/list_metafields_response' -require_relative 'advanced_billing/models/list_sale_rep_item' -require_relative 'advanced_billing/models/' \ - 'list_subcription_group_prepayment_item' -require_relative 'advanced_billing/models/list_subscription_components_response' -require_relative 'advanced_billing/models/' \ - 'list_subscription_group_prepayment_response' require_relative 'advanced_billing/models/metered_component' -require_relative 'advanced_billing/models/multi_invoice_payment' -require_relative 'advanced_billing/models/invoice_tax_breakout' -require_relative 'advanced_billing/models/list_components_filter' -require_relative 'advanced_billing/models/list_proforma_invoices_meta' -require_relative 'advanced_billing/models/list_segments_filter' -require_relative 'advanced_billing/models/list_service_credits_response' -require_relative 'advanced_billing/models/list_subscription_groups_item' +require_relative 'advanced_billing/models/metered_usage' require_relative 'advanced_billing/models/movement' +require_relative 'advanced_billing/models/movement_line_item' require_relative 'advanced_billing/models/mrr' +require_relative 'advanced_billing/models/mrr_movement' require_relative 'advanced_billing/models/mrr_response' +require_relative 'advanced_billing/models/multi_invoice_payment' +require_relative 'advanced_billing/models/multi_invoice_payment_response' require_relative 'advanced_billing/models/nested_subscription_group' +require_relative 'advanced_billing/models/net_terms' +require_relative 'advanced_billing/models/offer' require_relative 'advanced_billing/models/offer_discount' require_relative 'advanced_billing/models/offer_item' +require_relative 'advanced_billing/models/offer_response' +require_relative 'advanced_billing/models/offer_signup_page' require_relative 'advanced_billing/models/ok_response' +require_relative 'advanced_billing/models/on_off_component' +require_relative 'advanced_billing/models/organization_address' require_relative 'advanced_billing/models/origin_invoice' -require_relative 'advanced_billing/models/override_subscription_request' -require_relative 'advanced_billing/models/payment_profile_attributes' -require_relative 'advanced_billing/models/pending_cancellation_change' -require_relative 'advanced_billing/models/product_family_response' -require_relative 'advanced_billing/models/product_response' -require_relative 'advanced_billing/models/proforma_invoice_credit' -require_relative 'advanced_billing/models/reactivate_subscription_request' -require_relative 'advanced_billing/models/referral_code' -require_relative 'advanced_billing/models/refund_invoice' -require_relative 'advanced_billing/models/refund_prepayment_base_refund_error' -require_relative 'advanced_billing/models/register' -require_relative 'advanced_billing/models/resent_invitation' -require_relative 'advanced_billing/models/sale_rep_item_mrr' -require_relative 'advanced_billing/models/sale_rep_settings' -require_relative 'advanced_billing/models/' \ - 'scheduled_renewal_component_custom_price' -require_relative 'advanced_billing/models/segment_response' -require_relative 'advanced_billing/models/service_credit' -require_relative 'advanced_billing/models/signup_proforma_preview_response' -require_relative 'advanced_billing/models/site' -require_relative 'advanced_billing/models/site_statistics' -require_relative 'advanced_billing/models/site_summary' -require_relative 'advanced_billing/models/subscription_custom_price' -require_relative 'advanced_billing/models/subscription_group_balances' -require_relative 'advanced_billing/models/subscription_group_credit_card' +require_relative 'advanced_billing/models/overage_pricing' require_relative 'advanced_billing/models/override_subscription' +require_relative 'advanced_billing/models/override_subscription_request' require_relative 'advanced_billing/models/paginated_metadata' require_relative 'advanced_billing/models/paid_invoice' -require_relative 'advanced_billing/models/payment_related_events' -require_relative 'advanced_billing/models/prepaid_configuration' -require_relative 'advanced_billing/models/prepayment' -require_relative 'advanced_billing/models/preview_allocations_request' -require_relative 'advanced_billing/models/product_price_point_errors' -require_relative 'advanced_billing/models/' \ - 'reactivate_subscription_group_response' -require_relative 'advanced_billing/models/reactivation_billing' -require_relative 'advanced_billing/models/reason_code' -require_relative 'advanced_billing/models/reason_code_response' -require_relative 'advanced_billing/models/record_payment_request' -require_relative 'advanced_billing/models/record_payment_response' -require_relative 'advanced_billing/models/refund_consolidated_invoice' -require_relative 'advanced_billing/models/refund_invoice_event_data' -require_relative 'advanced_billing/models/refund_prepayment_request' -require_relative 'advanced_billing/models/remove_payment_event_data' -require_relative 'advanced_billing/models/renewal_preview' -require_relative 'advanced_billing/models/replay_webhooks_request' -require_relative 'advanced_billing/models/replay_webhooks_response' -require_relative 'advanced_billing/models/resume_options' -require_relative 'advanced_billing/models/sale_rep_subscription' -require_relative 'advanced_billing/models/' \ - 'scheduled_renewal_configuration_item_response' -require_relative 'advanced_billing/models/' \ - 'scheduled_renewal_configuration_request_body' -require_relative 'advanced_billing/models/' \ - 'scheduled_renewal_configurations_response' -require_relative 'advanced_billing/models/segment' -require_relative 'advanced_billing/models/send_invoice_request' -require_relative 'advanced_billing/models/send_email' -require_relative 'advanced_billing/models/service_credit1' -require_relative 'advanced_billing/models/site_response' -require_relative 'advanced_billing/models/subscription' -require_relative 'advanced_billing/models/overage_pricing' require_relative 'advanced_billing/models/pause_request' require_relative 'advanced_billing/models/payer_attributes' +require_relative 'advanced_billing/models/payer_error' require_relative 'advanced_billing/models/payment_collection_method_changed' +require_relative 'advanced_billing/models/payment_for_allocation' +require_relative 'advanced_billing/models/payment_profile_attributes' require_relative 'advanced_billing/models/payment_profile_response' +require_relative 'advanced_billing/models/payment_related_events' +require_relative 'advanced_billing/models/payment_profile_params' +require_relative 'advanced_billing/models/pending_cancellation_change' +require_relative 'advanced_billing/models/portal_management_link' +require_relative 'advanced_billing/models/prepaid_configuration' require_relative 'advanced_billing/models/prepaid_configuration_response' require_relative 'advanced_billing/models/prepaid_product_price_point_filter' require_relative 'advanced_billing/models/prepaid_subscription_balance_changed' -require_relative 'advanced_billing/models/prepayment_response' -require_relative 'advanced_billing/models/proforma_error' -require_relative 'advanced_billing/models/proforma_invoice' -require_relative 'advanced_billing/models/proforma_invoice_tax' -require_relative 'advanced_billing/models/proration' -require_relative 'advanced_billing/models/public_signup_page' -require_relative 'advanced_billing/models/refund_prepayment' -require_relative 'advanced_billing/models/refund_success' -require_relative 'advanced_billing/models/renewal_preview_request' -require_relative 'advanced_billing/models/revoked_invitation' -require_relative 'advanced_billing/models/sale_rep' -require_relative 'advanced_billing/models/' \ - 'scheduled_renewal_configuration_item_request' -require_relative 'advanced_billing/models/' \ - 'scheduled_renewal_configuration_request' -require_relative 'advanced_billing/models/' \ - 'scheduled_renewal_configuration_response' -require_relative 'advanced_billing/models/' \ - 'scheduled_renewal_item_request_body_component' -require_relative 'advanced_billing/models/scheduled_renewal_product_price_point' -require_relative 'advanced_billing/models/service_credit_response' -require_relative 'advanced_billing/models/signup_proforma_preview' -require_relative 'advanced_billing/models/subscription_component' -require_relative 'advanced_billing/models/' \ - 'subscription_component_allocation_error_item' -require_relative 'advanced_billing/models/subscription_component_subscription' -require_relative 'advanced_billing/models/subscription_filter' -require_relative 'advanced_billing/models/subscription_group' -require_relative 'advanced_billing/models/subscription_group_bank_account' -require_relative 'advanced_billing/models/on_off_component' -require_relative 'advanced_billing/models/organization_address' -require_relative 'advanced_billing/models/payer_error' -require_relative 'advanced_billing/models/payment_for_allocation' -require_relative 'advanced_billing/models/portal_management_link' require_relative 'advanced_billing/models/prepaid_usage' require_relative 'advanced_billing/models/prepaid_usage_allocation_detail' require_relative 'advanced_billing/models/prepaid_usage_component' +require_relative 'advanced_billing/models/prepayment' require_relative 'advanced_billing/models/prepayment_account_balance_changed' +require_relative 'advanced_billing/models/prepayment_response' require_relative 'advanced_billing/models/prepayments_response' +require_relative 'advanced_billing/models/preview_allocations_request' require_relative 'advanced_billing/models/price' require_relative 'advanced_billing/models/product' require_relative 'advanced_billing/models/product_family' +require_relative 'advanced_billing/models/product_family_response' require_relative 'advanced_billing/models/product_price_point' +require_relative 'advanced_billing/models/product_price_point_errors' require_relative 'advanced_billing/models/product_price_point_response' +require_relative 'advanced_billing/models/product_response' +require_relative 'advanced_billing/models/proforma_error' +require_relative 'advanced_billing/models/proforma_invoice' +require_relative 'advanced_billing/models/proforma_invoice_credit' require_relative 'advanced_billing/models/proforma_invoice_discount' require_relative 'advanced_billing/models/proforma_invoice_issued' require_relative 'advanced_billing/models/proforma_invoice_payment' +require_relative 'advanced_billing/models/proforma_invoice_tax' +require_relative 'advanced_billing/models/proration' require_relative 'advanced_billing/models/public_key' +require_relative 'advanced_billing/models/public_signup_page' require_relative 'advanced_billing/models/quantity_based_component' require_relative 'advanced_billing/models/reactivate_subscription_group_request' +require_relative 'advanced_billing/models/' \ + 'reactivate_subscription_group_response' +require_relative 'advanced_billing/models/reactivate_subscription_request' +require_relative 'advanced_billing/models/reactivation_billing' +require_relative 'advanced_billing/models/reason_code' +require_relative 'advanced_billing/models/reason_code_response' +require_relative 'advanced_billing/models/record_payment_request' +require_relative 'advanced_billing/models/record_payment_response' +require_relative 'advanced_billing/models/referral_code' require_relative 'advanced_billing/models/referral_validation_response' +require_relative 'advanced_billing/models/refund_consolidated_invoice' +require_relative 'advanced_billing/models/refund_invoice' +require_relative 'advanced_billing/models/refund_invoice_event_data' require_relative 'advanced_billing/models/refund_invoice_request' +require_relative 'advanced_billing/models/refund_prepayment' +require_relative 'advanced_billing/models/refund_prepayment_base_refund_error' +require_relative 'advanced_billing/models/refund_prepayment_request' +require_relative 'advanced_billing/models/refund_success' +require_relative 'advanced_billing/models/register' +require_relative 'advanced_billing/models/remove_payment_event_data' +require_relative 'advanced_billing/models/renewal_preview' require_relative 'advanced_billing/models/renewal_preview_component' require_relative 'advanced_billing/models/renewal_preview_line_item' +require_relative 'advanced_billing/models/renewal_preview_request' require_relative 'advanced_billing/models/renewal_preview_response' +require_relative 'advanced_billing/models/replay_webhooks_request' +require_relative 'advanced_billing/models/replay_webhooks_response' +require_relative 'advanced_billing/models/resent_invitation' +require_relative 'advanced_billing/models/resume_options' +require_relative 'advanced_billing/models/revoked_invitation' +require_relative 'advanced_billing/models/sale_rep' +require_relative 'advanced_billing/models/sale_rep_item_mrr' +require_relative 'advanced_billing/models/sale_rep_settings' +require_relative 'advanced_billing/models/sale_rep_subscription' +require_relative 'advanced_billing/models/' \ + 'scheduled_renewal_component_custom_price' require_relative 'advanced_billing/models/scheduled_renewal_configuration' require_relative 'advanced_billing/models/scheduled_renewal_configuration_item' +require_relative 'advanced_billing/models/' \ + 'scheduled_renewal_configuration_item_request' +require_relative 'advanced_billing/models/' \ + 'scheduled_renewal_configuration_item_response' +require_relative 'advanced_billing/models/' \ + 'scheduled_renewal_configuration_request' +require_relative 'advanced_billing/models/' \ + 'scheduled_renewal_configuration_request_body' +require_relative 'advanced_billing/models/' \ + 'scheduled_renewal_configuration_response' +require_relative 'advanced_billing/models/' \ + 'scheduled_renewal_configurations_response' +require_relative 'advanced_billing/models/' \ + 'scheduled_renewal_item_request_body_component' require_relative 'advanced_billing/models/' \ 'scheduled_renewal_item_request_body_product' require_relative 'advanced_billing/models/scheduled_renewal_lock_in_request' +require_relative 'advanced_billing/models/scheduled_renewal_product_price_point' require_relative 'advanced_billing/models/scheduled_renewal_update_request' +require_relative 'advanced_billing/models/segment' require_relative 'advanced_billing/models/segment_price' +require_relative 'advanced_billing/models/segment_response' +require_relative 'advanced_billing/models/send_invoice_request' +require_relative 'advanced_billing/models/send_email' +require_relative 'advanced_billing/models/service_credit' +require_relative 'advanced_billing/models/service_credit_response' +require_relative 'advanced_billing/models/service_credit1' +require_relative 'advanced_billing/models/signup_proforma_preview' +require_relative 'advanced_billing/models/signup_proforma_preview_response' +require_relative 'advanced_billing/models/site' +require_relative 'advanced_billing/models/site_response' +require_relative 'advanced_billing/models/site_statistics' +require_relative 'advanced_billing/models/site_summary' +require_relative 'advanced_billing/models/subscription' +require_relative 'advanced_billing/models/subscription_component' +require_relative 'advanced_billing/models/' \ + 'subscription_component_allocation_error_item' require_relative 'advanced_billing/models/subscription_component_response' +require_relative 'advanced_billing/models/subscription_component_subscription' +require_relative 'advanced_billing/models/subscription_custom_price' +require_relative 'advanced_billing/models/subscription_filter' +require_relative 'advanced_billing/models/subscription_group' +require_relative 'advanced_billing/models/subscription_group_balances' +require_relative 'advanced_billing/models/subscription_group_bank_account' require_relative 'advanced_billing/models/' \ 'subscription_group_component_custom_price' +require_relative 'advanced_billing/models/subscription_group_credit_card' +require_relative 'advanced_billing/models/subscription_group_customer' +require_relative 'advanced_billing/models/subscription_group_item' require_relative 'advanced_billing/models/' \ 'subscription_group_members_array_error' +require_relative 'advanced_billing/models/subscription_group_payment_profile' require_relative 'advanced_billing/models/subscription_group_prepayment' require_relative 'advanced_billing/models/subscription_group_prepayment_request' -require_relative 'advanced_billing/models/subscription_mrr_breakout' -require_relative 'advanced_billing/models/subscription_mrr_response' -require_relative 'advanced_billing/models/subscription_preview_response' -require_relative 'advanced_billing/models/subscription_product_migration' -require_relative 'advanced_billing/models/update_component_price_point' -require_relative 'advanced_billing/models/update_component_price_point_request' -require_relative 'advanced_billing/models/update_coupon_currency' -require_relative 'advanced_billing/models/update_currency_price' -require_relative 'advanced_billing/models/update_metadata' -require_relative 'advanced_billing/models/update_metadata_request' -require_relative 'advanced_billing/models/update_metafield' -require_relative 'advanced_billing/models/update_reason_code_request' -require_relative 'advanced_billing/models/update_segment_request' -require_relative 'advanced_billing/models/upsert_prepaid_configuration' -require_relative 'advanced_billing/models/void_invoice_request' -require_relative 'advanced_billing/models/webhook_response' -require_relative 'advanced_billing/models/subscription_group_customer' -require_relative 'advanced_billing/models/subscription_group_payment_profile' require_relative 'advanced_billing/models/' \ 'subscription_group_prepayment_response' +require_relative 'advanced_billing/models/subscription_group_response' require_relative 'advanced_billing/models/subscription_group_signup' require_relative 'advanced_billing/models/subscription_group_signup_component' -require_relative 'advanced_billing/models/subscription_migration_preview' -require_relative 'advanced_billing/models/' \ - 'subscription_migration_preview_options' -require_relative 'advanced_billing/models/subscription_note' -require_relative 'advanced_billing/models/update_component' -require_relative 'advanced_billing/models/update_payment_profile' -require_relative 'advanced_billing/models/update_price' -require_relative 'advanced_billing/models/update_product_price_point_request' -require_relative 'advanced_billing/models/update_subscription_component' -require_relative 'advanced_billing/models/update_subscription_note_request' -require_relative 'advanced_billing/models/upsert_prepaid_configuration_request' -require_relative 'advanced_billing/models/void_invoice' require_relative 'advanced_billing/models/subscription_group_signup_error' require_relative 'advanced_billing/models/subscription_group_signup_event_data' require_relative 'advanced_billing/models/' \ 'subscription_group_signup_failure_data' require_relative 'advanced_billing/models/subscription_group_signup_item' +require_relative 'advanced_billing/models/subscription_group_signup_request' require_relative 'advanced_billing/models/subscription_group_signup_response' +require_relative 'advanced_billing/models/subscription_group_single_error' +require_relative 'advanced_billing/models/subscription_group_subscription_error' +require_relative 'advanced_billing/models/subscription_group_update_error' +require_relative 'advanced_billing/models/subscription_included_coupon' +require_relative 'advanced_billing/models/subscription_migration_preview' +require_relative 'advanced_billing/models/' \ + 'subscription_migration_preview_options' +require_relative 'advanced_billing/models/' \ + 'subscription_migration_preview_request' require_relative 'advanced_billing/models/' \ 'subscription_migration_preview_response' require_relative 'advanced_billing/models/subscription_mrr' +require_relative 'advanced_billing/models/subscription_mrr_breakout' +require_relative 'advanced_billing/models/subscription_mrr_response' +require_relative 'advanced_billing/models/subscription_note' require_relative 'advanced_billing/models/subscription_note_response' +require_relative 'advanced_billing/models/subscription_preview' +require_relative 'advanced_billing/models/subscription_preview_response' require_relative 'advanced_billing/models/subscription_product_change' +require_relative 'advanced_billing/models/subscription_product_migration' require_relative 'advanced_billing/models/' \ 'subscription_product_migration_request' +require_relative 'advanced_billing/models/subscription_response' require_relative 'advanced_billing/models/subscription_state_change' +require_relative 'advanced_billing/models/tax_configuration' +require_relative 'advanced_billing/models/tokenized_payment_profile' require_relative 'advanced_billing/models/too_many_management_link_requests' require_relative 'advanced_billing/models/update_allocation_expiration_date' +require_relative 'advanced_billing/models/update_component' +require_relative 'advanced_billing/models/update_component_price_point' +require_relative 'advanced_billing/models/update_component_price_point_request' require_relative 'advanced_billing/models/update_component_request' +require_relative 'advanced_billing/models/update_coupon_currency' +require_relative 'advanced_billing/models/update_currency_price' +require_relative 'advanced_billing/models/update_currency_prices_request' +require_relative 'advanced_billing/models/update_customer' require_relative 'advanced_billing/models/update_customer_request' +require_relative 'advanced_billing/models/update_metadata' +require_relative 'advanced_billing/models/update_metadata_request' +require_relative 'advanced_billing/models/update_metafield' require_relative 'advanced_billing/models/update_metafields_request' +require_relative 'advanced_billing/models/update_payment_profile' require_relative 'advanced_billing/models/update_payment_profile_request' +require_relative 'advanced_billing/models/update_price' require_relative 'advanced_billing/models/update_product_price_point' +require_relative 'advanced_billing/models/update_product_price_point_request' +require_relative 'advanced_billing/models/update_reason_code' +require_relative 'advanced_billing/models/update_reason_code_request' +require_relative 'advanced_billing/models/update_segment' +require_relative 'advanced_billing/models/update_segment_request' require_relative 'advanced_billing/models/update_subscription' +require_relative 'advanced_billing/models/update_subscription_component' require_relative 'advanced_billing/models/update_subscription_group' +require_relative 'advanced_billing/models/update_subscription_group_request' require_relative 'advanced_billing/models/update_subscription_note' +require_relative 'advanced_billing/models/update_subscription_note_request' +require_relative 'advanced_billing/models/update_subscription_request' +require_relative 'advanced_billing/models/upsert_prepaid_configuration' +require_relative 'advanced_billing/models/upsert_prepaid_configuration_request' require_relative 'advanced_billing/models/usage' require_relative 'advanced_billing/models/usage_response' +require_relative 'advanced_billing/models/void_invoice' require_relative 'advanced_billing/models/void_invoice_event_data' +require_relative 'advanced_billing/models/void_invoice_request' require_relative 'advanced_billing/models/void_remainder_event_data' -require_relative 'advanced_billing/models/subscription_group_item' -require_relative 'advanced_billing/models/subscription_group_response' -require_relative 'advanced_billing/models/subscription_group_signup_request' -require_relative 'advanced_billing/models/subscription_group_single_error' -require_relative 'advanced_billing/models/subscription_group_subscription_error' -require_relative 'advanced_billing/models/subscription_group_update_error' -require_relative 'advanced_billing/models/subscription_included_coupon' -require_relative 'advanced_billing/models/' \ - 'subscription_migration_preview_request' -require_relative 'advanced_billing/models/subscription_preview' -require_relative 'advanced_billing/models/subscription_response' -require_relative 'advanced_billing/models/tax_configuration' -require_relative 'advanced_billing/models/update_currency_prices_request' -require_relative 'advanced_billing/models/update_customer' -require_relative 'advanced_billing/models/update_reason_code' -require_relative 'advanced_billing/models/update_segment' -require_relative 'advanced_billing/models/update_subscription_group_request' -require_relative 'advanced_billing/models/update_subscription_request' require_relative 'advanced_billing/models/webhook' -require_relative 'advanced_billing/models/allocation_preview_direction' +require_relative 'advanced_billing/models/webhook_response' require_relative 'advanced_billing/models/all_vaults' -require_relative 'advanced_billing/models/bank_account_type' -require_relative 'advanced_billing/models/basic_date_field' -require_relative 'advanced_billing/models/card_type' -require_relative 'advanced_billing/models/component_kind' +require_relative 'advanced_billing/models/allocation_preview_direction' require_relative 'advanced_billing/models/allocation_preview_line_item_kind' +require_relative 'advanced_billing/models/apple_pay_vault' require_relative 'advanced_billing/models/auto_invite' require_relative 'advanced_billing/models/bank_account_holder_type' +require_relative 'advanced_billing/models/bank_account_type' require_relative 'advanced_billing/models/bank_account_vault' -require_relative 'advanced_billing/models/collection_method' -require_relative 'advanced_billing/models/apple_pay_vault' +require_relative 'advanced_billing/models/basic_date_field' require_relative 'advanced_billing/models/billing_manifest_line_item_kind' require_relative 'advanced_billing/models/cancellation_method' +require_relative 'advanced_billing/models/card_type' require_relative 'advanced_billing/models/chargeback_status' require_relative 'advanced_billing/models/cleanup_scope' +require_relative 'advanced_billing/models/collection_method' +require_relative 'advanced_billing/models/component_kind' require_relative 'advanced_billing/models/compounding_strategy' +require_relative 'advanced_billing/models/create_invoice_status' +require_relative 'advanced_billing/models/create_prepayment_method' require_relative 'advanced_billing/models/' \ 'create_signup_proforma_preview_include' +require_relative 'advanced_billing/models/credit_card_vault' require_relative 'advanced_billing/models/credit_note_status' +require_relative 'advanced_billing/models/credit_scheme' +require_relative 'advanced_billing/models/credit_type' +require_relative 'advanced_billing/models/currency_price_role' require_relative 'advanced_billing/models/custom_field_owner' +require_relative 'advanced_billing/models/debit_note_role' +require_relative 'advanced_billing/models/debit_note_status' require_relative 'advanced_billing/models/direction' -require_relative 'advanced_billing/models/downgrade_credit_credit_type' -require_relative 'advanced_billing/models/expiration_interval_unit' -require_relative 'advanced_billing/models/invoice_discount_source_type' -require_relative 'advanced_billing/models/invoice_event_type' -require_relative 'advanced_billing/models/create_invoice_status' -require_relative 'advanced_billing/models/credit_card_vault' -require_relative 'advanced_billing/models/credit_scheme' require_relative 'advanced_billing/models/discount_type' +require_relative 'advanced_billing/models/downgrade_credit_credit_type' require_relative 'advanced_billing/models/event_key' +require_relative 'advanced_billing/models/expiration_interval_unit' require_relative 'advanced_billing/models/failed_payment_action' +require_relative 'advanced_billing/models/first_charge_type' require_relative 'advanced_billing/models/group_target_type' require_relative 'advanced_billing/models/group_type' -require_relative 'advanced_billing/models/interval_unit' -require_relative 'advanced_billing/models/invoice_date_field' -require_relative 'advanced_billing/models/currency_price_role' require_relative 'advanced_billing/models/include_not_null' require_relative 'advanced_billing/models/include_null_or_not_null' -require_relative 'advanced_billing/models/create_prepayment_method' -require_relative 'advanced_billing/models/credit_type' -require_relative 'advanced_billing/models/debit_note_role' -require_relative 'advanced_billing/models/debit_note_status' -require_relative 'advanced_billing/models/first_charge_type' require_relative 'advanced_billing/models/include_option' -require_relative 'advanced_billing/models/invoice_discount_type' -require_relative 'advanced_billing/models/invoice_payment_method_type' -require_relative 'advanced_billing/models/invoice_role' +require_relative 'advanced_billing/models/interval_unit' require_relative 'advanced_billing/models/invoice_consolidation_level' +require_relative 'advanced_billing/models/invoice_date_field' +require_relative 'advanced_billing/models/invoice_discount_source_type' +require_relative 'advanced_billing/models/invoice_discount_type' require_relative 'advanced_billing/models/invoice_event_payment_method' +require_relative 'advanced_billing/models/invoice_event_type' +require_relative 'advanced_billing/models/invoice_payment_method_type' require_relative 'advanced_billing/models/invoice_payment_type' +require_relative 'advanced_billing/models/invoice_role' require_relative 'advanced_billing/models/invoice_sort_field' require_relative 'advanced_billing/models/invoice_status' +require_relative 'advanced_billing/models/item_category' require_relative 'advanced_billing/models/line_item_kind' +require_relative 'advanced_billing/models/line_item_transaction_type' +require_relative 'advanced_billing/models/list_components_price_points_include' require_relative 'advanced_billing/models/list_events_date_field' -require_relative 'advanced_billing/models/metafield_input' require_relative 'advanced_billing/models/list_prepayment_date_field' require_relative 'advanced_billing/models/list_products_include' require_relative 'advanced_billing/models/list_products_price_points_include' require_relative 'advanced_billing/models/list_subscription_components_include' require_relative 'advanced_billing/models/list_subscription_components_sort' -require_relative 'advanced_billing/models/item_category' -require_relative 'advanced_billing/models/line_item_transaction_type' -require_relative 'advanced_billing/models/list_components_price_points_include' -require_relative 'advanced_billing/models/proforma_invoice_discount_source_type' -require_relative 'advanced_billing/models/proforma_invoice_status' -require_relative 'advanced_billing/models/resource_type' +require_relative 'advanced_billing/models/metafield_input' require_relative 'advanced_billing/models/payment_type' -require_relative 'advanced_billing/models/pricing_scheme' -require_relative 'advanced_billing/models/proforma_invoice_role' require_relative 'advanced_billing/models/pay_pal_vault' -require_relative 'advanced_billing/models/price_point_type' -require_relative 'advanced_billing/models/recurring_scheme' -require_relative 'advanced_billing/models/resumption_charge' -require_relative 'advanced_billing/models/subscription_date_field' require_relative 'advanced_billing/models/prepayment_method' +require_relative 'advanced_billing/models/price_point_type' +require_relative 'advanced_billing/models/pricing_scheme' +require_relative 'advanced_billing/models/proforma_invoice_discount_source_type' +require_relative 'advanced_billing/models/proforma_invoice_role' +require_relative 'advanced_billing/models/proforma_invoice_status' require_relative 'advanced_billing/models/proforma_invoice_tax_source_type' require_relative 'advanced_billing/models/reactivation_charge' +require_relative 'advanced_billing/models/recurring_scheme' +require_relative 'advanced_billing/models/resource_type' require_relative 'advanced_billing/models/restriction_type' +require_relative 'advanced_billing/models/resumption_charge' require_relative 'advanced_billing/models/service_credit_type' require_relative 'advanced_billing/models/sorting_direction' require_relative 'advanced_billing/models/status' -require_relative 'advanced_billing/models/subscription_group_prepayment_method' -require_relative 'advanced_billing/models/tax_configuration_kind' -require_relative 'advanced_billing/models/tax_destination_address' -require_relative 'advanced_billing/models/trial_type' -require_relative 'advanced_billing/models/webhook_order' -require_relative 'advanced_billing/models/webhook_subscription' +require_relative 'advanced_billing/models/subscription_date_field' require_relative 'advanced_billing/models/subscription_group_include' +require_relative 'advanced_billing/models/subscription_group_prepayment_method' +require_relative 'advanced_billing/models/subscription_groups_list_include' require_relative 'advanced_billing/models/subscription_include' -require_relative 'advanced_billing/models/subscription_list_include' -require_relative 'advanced_billing/models/subscription_state_filter' -require_relative 'advanced_billing/models/upgrade_charge_credit_type' require_relative 'advanced_billing/models/subscription_list_date_field' -require_relative 'advanced_billing/models/subscription_groups_list_include' +require_relative 'advanced_billing/models/subscription_list_include' require_relative 'advanced_billing/models/subscription_purge_type' require_relative 'advanced_billing/models/subscription_sort' require_relative 'advanced_billing/models/subscription_state' +require_relative 'advanced_billing/models/subscription_state_filter' +require_relative 'advanced_billing/models/tax_configuration_kind' +require_relative 'advanced_billing/models/tax_destination_address' +require_relative 'advanced_billing/models/trial_type' +require_relative 'advanced_billing/models/upgrade_charge_credit_type' +require_relative 'advanced_billing/models/webhook_order' require_relative 'advanced_billing/models/webhook_status' +require_relative 'advanced_billing/models/webhook_subscription' # Exceptions require_relative 'advanced_billing/exceptions/api_exception' require_relative 'advanced_billing/exceptions/' \ 'component_allocation_error_exception' +require_relative 'advanced_billing/exceptions/' \ + 'component_price_point_error_exception' require_relative 'advanced_billing/exceptions/customer_error_response_exception' require_relative 'advanced_billing/exceptions/' \ 'error_array_map_response_exception' -require_relative 'advanced_billing/exceptions/' \ - 'error_string_map_response_exception' require_relative 'advanced_billing/exceptions/error_list_response_exception' require_relative 'advanced_billing/exceptions/' \ - 'component_price_point_error_exception' + 'error_string_map_response_exception' require_relative 'advanced_billing/exceptions/' \ 'event_based_billing_list_segments_errors_exception' +require_relative 'advanced_billing/exceptions/' \ + 'event_based_billing_segment_exception' require_relative 'advanced_billing/exceptions/' \ 'event_based_billing_segment_errors_exception' require_relative 'advanced_billing/exceptions/' \ - 'event_based_billing_segment_exception' + 'product_price_point_error_response_exception' require_relative 'advanced_billing/exceptions/' \ 'proforma_bad_request_error_response_exception' -require_relative 'advanced_billing/exceptions/single_error_response_exception' require_relative 'advanced_billing/exceptions/' \ 'refund_prepayment_base_errors_response_exception' +require_relative 'advanced_billing/exceptions/single_error_response_exception' require_relative 'advanced_billing/exceptions/' \ 'single_string_error_response_exception' -require_relative 'advanced_billing/exceptions/' \ - 'subscription_group_create_error_response_exception' -require_relative 'advanced_billing/exceptions/' \ - 'product_price_point_error_response_exception' require_relative 'advanced_billing/exceptions/' \ 'subscription_add_coupon_error_exception' require_relative 'advanced_billing/exceptions/' \ 'subscription_component_allocation_error_exception' +require_relative 'advanced_billing/exceptions/' \ + 'subscription_group_create_error_response_exception' require_relative 'advanced_billing/exceptions/' \ 'subscription_group_signup_error_response_exception' +require_relative 'advanced_billing/exceptions/' \ + 'subscription_group_update_error_response_exception' require_relative 'advanced_billing/exceptions/' \ 'subscription_remove_coupon_errors_exception' require_relative 'advanced_billing/exceptions/' \ 'subscription_response_error_exception' require_relative 'advanced_billing/exceptions/' \ 'subscriptions_mrr_error_response_exception' -require_relative 'advanced_billing/exceptions/' \ - 'subscription_group_update_error_response_exception' require_relative 'advanced_billing/exceptions/' \ 'too_many_management_link_requests_error_exception' diff --git a/lib/advanced_billing/controllers/advance_invoice_controller.rb b/lib/advanced_billing/controllers/advance_invoice_controller.rb index dfa60cb..0bdc1a8 100644 --- a/lib/advanced_billing/controllers/advance_invoice_controller.rb +++ b/lib/advanced_billing/controllers/advance_invoice_controller.rb @@ -10,7 +10,7 @@ class AdvanceInvoiceController < BaseController # [See our # docs](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Inv # oice-In-Advance) for more information on advance invoices, including - # eligibility on generating one; for the most part, they function like any + # eligibility for generating one; for the most part, they function like any # other invoice, except they are issued early and have special behavior upon # being voided. # A subscription may only have one advance invoice per billing period. @@ -55,9 +55,9 @@ def issue_advance_invoice(subscription_id, .execute end - # Once an advance invoice has been generated for a subscription's upcoming - # renewal, it can be viewed through this endpoint. There can only be one - # advance invoice per subscription per billing cycle. + # Returns the advance invoice generated for a subscription's upcoming + # renewal. There can only be one advance invoice per subscription per + # billing cycle. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @return [Invoice] Response from the API call. diff --git a/lib/advanced_billing/controllers/api_exports_controller.rb b/lib/advanced_billing/controllers/api_exports_controller.rb index 24849fd..a34874f 100644 --- a/lib/advanced_billing/controllers/api_exports_controller.rb +++ b/lib/advanced_billing/controllers/api_exports_controller.rb @@ -6,9 +6,8 @@ module AdvancedBilling # APIExportsController class APIExportsController < BaseController - # This API returns an array of exported proforma invoices for a provided - # `batch_id`. Pay close attention to pagination in order to control - # responses from the server. + # Lists exported proforma invoices for a provided `batch_id`. Use pagination + # to control responses returned from the server. # Example: `GET # https://{subdomain}.chargify.com/api_exports/proforma_invoices/123/rows?pe # r_page=10000&page=1`. @@ -47,9 +46,8 @@ def list_exported_proforma_invoices(options = {}) .execute end - # This API returns an array of exported invoices for a provided `batch_id`. - # Pay close attention to pagination in order to control responses from the - # server. + # Lists exported invoices for a provided `batch_id`. Use pagination to + # control responses returned from the server. # Example: `GET # https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per_page=10 # 000&page=1`. @@ -88,9 +86,8 @@ def list_exported_invoices(options = {}) .execute end - # This API returns an array of exported subscriptions for a provided - # `batch_id`. Pay close attention to pagination in order to control - # responses from the server. + # Lists exported subscriptions for a provided `batch_id`. Use pagination to + # control responses returned from the server. # Example: `GET # https://{subdomain}.chargify.com/api_exports/subscriptions/123/rows?per_pa # ge=200&page=1`. @@ -129,7 +126,7 @@ def list_exported_subscriptions(options = {}) .execute end - # This API creates a proforma invoices export and returns a batchjob object. + # Creates a proforma invoices export and returns a batch job object. # It is only available for Relationship Invoicing architecture. # @return [BatchJobResponse] Response from the API call. def export_proforma_invoices @@ -152,7 +149,7 @@ def export_proforma_invoices .execute end - # This API creates an invoices export and returns a batchjob object. + # Creates an invoices export and returns a batch job object. # @return [BatchJobResponse] Response from the API call. def export_invoices @api_call @@ -174,7 +171,7 @@ def export_invoices .execute end - # This API creates a subscriptions export and returns a batchjob object. + # Creates a subscriptions export and returns a batch job object. # @return [BatchJobResponse] Response from the API call. def export_subscriptions @api_call @@ -193,7 +190,7 @@ def export_subscriptions .execute end - # This API returns a batchjob object for proforma invoices export. + # Returns a batch job object for a proforma invoices export. # @param [String] batch_id Required parameter: Id of a Batch Job. # @return [BatchJobResponse] Response from the API call. def read_proforma_invoices_export(batch_id) @@ -215,7 +212,7 @@ def read_proforma_invoices_export(batch_id) .execute end - # This API returns a batchjob object for invoices export. + # Returns a batch job object for an invoices export. # @param [String] batch_id Required parameter: Id of a Batch Job. # @return [BatchJobResponse] Response from the API call. def read_invoices_export(batch_id) @@ -237,7 +234,7 @@ def read_invoices_export(batch_id) .execute end - # This API returns a batchjob object for subscriptions export. + # Returns a batch job object for a subscriptions export. # @param [String] batch_id Required parameter: Id of a Batch Job. # @return [BatchJobResponse] Response from the API call. def read_subscriptions_export(batch_id) diff --git a/lib/advanced_billing/controllers/base_controller.rb b/lib/advanced_billing/controllers/base_controller.rb index 002a87d..1f1beee 100644 --- a/lib/advanced_billing/controllers/base_controller.rb +++ b/lib/advanced_billing/controllers/base_controller.rb @@ -10,7 +10,7 @@ class BaseController attr_accessor :config, :http_call_back def self.user_agent - 'AB SDK Ruby:9.0.0 on OS {os-info}' + 'AB SDK Ruby:9.1.0 on OS {os-info}' end def self.user_agent_parameters diff --git a/lib/advanced_billing/controllers/billing_portal_controller.rb b/lib/advanced_billing/controllers/billing_portal_controller.rb index ffb93ce..7aca990 100644 --- a/lib/advanced_billing/controllers/billing_portal_controller.rb +++ b/lib/advanced_billing/controllers/billing_portal_controller.rb @@ -6,12 +6,14 @@ module AdvancedBilling # BillingPortalController class BillingPortalController < BaseController + # Enables Billing Portal access for a customer, with an option to send an + # invitation email at the same time. # ## Billing Portal Documentation # Full documentation on how the Billing Portal operates within the Advanced # Billing UI can be located # [here](https://maxio.zendesk.com/hc/en-us/articles/24252412965133-Billing- # Portal-Overview). - # This documentation is focused on how the to configure the Billing Portal + # This documentation is focused on how to configure the Billing Portal # Settings, as well as Subscriber Interaction and Merchant Management of the # Billing Portal. # You can use this endpoint to enable Billing Portal access for a Customer, @@ -60,8 +62,8 @@ def enable_billing_portal_for_customer(customer_id, .execute end - # This method will provide to the API user the exact URL required for a - # subscriber to access the Billing Portal. + # Returns the exact URL required for a subscriber to access the Billing + # Portal. # ## Rules for Management Link API # + When retrieving a management URL, multiple requests for the same # customer in a short period will return the **same** URL @@ -99,15 +101,13 @@ def read_billing_portal_link(customer_id) .execute end - # You can resend a customer's Billing Portal invitation. + # Resends a customer's Billing Portal invitation. # If you attempt to resend an invitation 5 times within 30 minutes, you will - # receive a `422` response with `error` message in the body. + # receive a `422` response with an `error` message in the body. # If you attempt to resend an invitation when the Billing Portal is already # disabled for a Customer, you will receive a `422` error response. - # If you attempt to resend an invitation when the Billing Portal is already - # disabled for a Customer, you will receive a `422` error response. - # If you attempt to resend an invitation when the Customer does not exist a - # Customer, you will receive a `404` error response. + # If you attempt to resend an invitation when the Customer does not exist, + # you will receive a `404` error response. # ## Limitations # This endpoint will only return a JSON response. # @param [Integer] customer_id Required parameter: The Chargify id of the @@ -136,7 +136,7 @@ def resend_billing_portal_invitation(customer_id) .execute end - # You can revoke a customer's Billing Portal invitation. + # Revokes 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. # ## Limitations diff --git a/lib/advanced_billing/controllers/component_price_points_controller.rb b/lib/advanced_billing/controllers/component_price_points_controller.rb index 8d5aa96..ce9629b 100644 --- a/lib/advanced_billing/controllers/component_price_points_controller.rb +++ b/lib/advanced_billing/controllers/component_price_points_controller.rb @@ -70,8 +70,7 @@ def create_component_price_point(component_id, .execute end - # Use this endpoint to read current price points that are associated with a - # component. + # Lists the price points associated with a component. # You may specify the component by using either the numeric id or the # `handle:gold` syntax. # When fetching a component's price points, if you have defined multiple @@ -120,8 +119,7 @@ def list_component_price_points(options = {}) .execute end - # Use this endpoint to create multiple component price points in one - # request. + # Creates multiple component price points in one request. # @param [String] component_id Required parameter: The Advanced Billing id # of the component for which you want to fetch price points. # @param [CreateComponentPricePointsRequest] body Optional parameter: TODO: @@ -211,8 +209,7 @@ def clone_component_price_point(component_id, .execute end - # When updating a price point, prices can be updated as well by creating new - # prices or editing / removing existing ones. + # Updates a component price point and its associated prices. # Passing in a price bracket without an `id` will attempt to create a new # price. # Including an `id` will update the corresponding price, and including the @@ -266,9 +263,8 @@ def update_component_price_point(component_id, .execute end - # Use this endpoint to retrieve details for a specific component price - # point. You can achieve this by using either the component price point ID - # or handle. + # Returns details for a specific component price point. You can achieve this + # by using either the component price point ID or handle. # @param [Integer | String] component_id Required parameter: The id or # handle of the component. When using the handle, it must be prefixed with # `handle:`. Example: `123` for an integer ID, or @@ -310,9 +306,9 @@ def read_component_price_point(component_id, .execute end - # A price point can be archived at any time. Subscriptions using a price - # point that has been archived will continue using it until they're moved to - # another price point. + # Archives a component price point. Subscriptions using a price point that + # has been archived will continue using it until they're moved to another + # price point. # @param [Integer | String] component_id Required parameter: The id or # handle of the component. When using the handle, it must be prefixed with # `handle:`. Example: `123` for an integer ID, or @@ -354,7 +350,7 @@ def archive_component_price_point(component_id, .execute end - # Use this endpoint to unarchive a component price point. + # Unarchives a component price point. # @param [Integer] component_id Required parameter: The Advanced Billing id # of the component to which the price point belongs # @param [Integer] price_point_id Required parameter: The Advanced Billing @@ -380,8 +376,7 @@ def unarchive_component_price_point(component_id, .execute end - # This endpoint allows you to create currency prices for a given currency - # that has been defined on the site level in your settings. + # Creates currency prices for a given currency defined at the site level. # When creating currency prices, they need to mirror the structure of your # primary pricing. For each price level defined on the component price # point, there should be a matching price level created in the given @@ -416,8 +411,7 @@ def create_currency_prices(price_point_id, .execute end - # This endpoint allows you to update currency prices for a given currency - # that has been defined on the site level in your settings. + # Updates currency prices for a given currency defined at the site level. # Note: Currency Prices are not able to be updated for custom price points. # @param [Integer] price_point_id Required parameter: The Advanced Billing # id of the price point @@ -448,8 +442,7 @@ def update_currency_prices(price_point_id, .execute end - # This method allows to retrieve a list of Components Price Points belonging - # to a Site. + # Lists all component price points belonging to a site. # @param [ListComponentsPricePointsInclude] include Optional parameter: # Allows including additional data in the response. Use in query: # `include=currency_prices`. diff --git a/lib/advanced_billing/controllers/components_controller.rb b/lib/advanced_billing/controllers/components_controller.rb index 5b9c729..a7700ff 100644 --- a/lib/advanced_billing/controllers/components_controller.rb +++ b/lib/advanced_billing/controllers/components_controller.rb @@ -6,13 +6,12 @@ module AdvancedBilling # ComponentsController class ComponentsController < BaseController - # This request will create a component definition of kind - # **metered_component** under the specified product family. Metered - # component can then be added and “allocated” for a subscription. + # Creates a metered component definition under the specified product family. + # A metered component can then be added and “allocated” for a subscription. # Metered components are used to bill for any type of unit that resets to 0 - # at the end of the billing period (think daily Google Adwords clicks or - # monthly cell phone minutes). This is most commonly associated with - # usage-based billing and many other pricing schemes. + # at the end of the billing period (think daily Google Ads clicks or monthly + # cell phone minutes). This is most commonly associated with usage-based + # billing and many other pricing schemes. # Note that this is different from recurring quantity-based components, # which DO NOT reset to zero at the start of every billing period. If you # want to bill for a quantity of something that does not change unless you @@ -52,10 +51,10 @@ def create_metered_component(product_family_id, .execute end - # This request will create a component definition of kind - # **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: + # Creates a Quantity Based component definition under the specified product + # family. A Quantity Based component can then be added and “allocated” for a + # subscription. + # When defining a 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 of @@ -102,9 +101,8 @@ def create_quantity_based_component(product_family_id, .execute end - # This request will create a component definition of kind - # **on_off_component** under the specified product family. On/Off component - # can then be added and “allocated” for a subscription. + # Creates an On/Off component definition under the specified product family. + # An On/Off component can then be added and “allocated” for a subscription. # On/off components are used for any flat fee, recurring add on (think # $99/month for tech support or a flat add on shipping fee). # For more information on components, see our documentation @@ -142,9 +140,9 @@ def create_on_off_component(product_family_id, .execute end - # 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. + # Creates a prepaid usage component definition under the specified product + # family. A 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 the end of the @@ -186,9 +184,9 @@ def create_prepaid_usage_component(product_family_id, .execute end - # This request will create a component definition of kind - # **event_based_component** under the specified product family. Event-based - # component can then be added and “allocated” for a subscription. + # Creates an event-based component definition under the specified product + # family. An event-based component can then be added and “allocated” for a + # subscription. # Event-based components are similar to other component types, in that you # define the component parameters (such as name and taxability) and the # pricing. A key difference for the event-based component is that it must be @@ -233,9 +231,9 @@ def create_event_based_component(product_family_id, .execute end - # This request will return information regarding a component having the - # handle you provide. You can identify your components with a handle so you - # don't have to save or reference the IDs we generate. + # Returns information for a component matching the provided handle. You can + # identify your components with a handle so you don't have to save or + # reference the IDs we generate. # @param [String] handle Required parameter: The handle of the component to # find # @return [ComponentResponse] Response from the API call. @@ -283,7 +281,7 @@ def read_component(product_family_id, .execute end - # This request will update a component from a specific product family. + # Updates a component from a specific product family. # You may read the component by either the component's id or handle. When # using the handle, it must be prefixed with `handle:`. # @param [Integer] product_family_id Required parameter: The Advanced @@ -322,9 +320,8 @@ def update_product_family_component(product_family_id, .execute end - # Sending a DELETE request to this endpoint will archive the component. All - # current subscribers will be unffected; their subscription/purchase will - # continue to be charged as usual. + # Archives the component; all current subscribers will continue to be + # charged as usual. # @param [Integer] product_family_id Required parameter: The Advanced # Billing id of the product family to which the component belongs # @param [String] component_id Required parameter: Either the Advanced @@ -355,7 +352,7 @@ def archive_component(product_family_id, .execute end - # This request will return a list of components for a site. + # Lists components for a site. # @param [BasicDateField] date_field Optional parameter: The type of filter # you would like to apply to your search. # @param [String] start_date Optional parameter: The start date (format @@ -417,7 +414,7 @@ def list_components(options = {}) .execute end - # This request will update a component. + # Updates a component. # You may read the component by either the component's id or handle. When # using the handle, it must be prefixed with `handle:`. # @param [String] component_id Required parameter: The id or handle of the @@ -449,8 +446,7 @@ def update_component(component_id, .execute end - # This request will return a list of components for a particular product - # family. + # Lists components for a particular product family. # @param [Integer] product_family_id Required parameter: The Advanced # Billing id of the product family # @param [TrueClass | FalseClass] include_archived Optional parameter: diff --git a/lib/advanced_billing/controllers/coupons_controller.rb b/lib/advanced_billing/controllers/coupons_controller.rb index 9e897a4..072dbcb 100644 --- a/lib/advanced_billing/controllers/coupons_controller.rb +++ b/lib/advanced_billing/controllers/coupons_controller.rb @@ -6,23 +6,21 @@ module AdvancedBilling # CouponsController class CouponsController < BaseController - # ## Coupons Documentation - # Coupons can be administered in the Advanced Billing application or created - # via API. View our section on [creating - # coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Creati - # ng-Editing-Deleting-Coupons) for more information. - # Additionally, for documentation on how to apply a coupon to a subscription - # within the Advanced Billing UI, see our documentation - # [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons- - # and-Subscriptions). - # ## Create Coupon - # This request will create a coupon, based on the provided information. - # You can create either a flat amount coupon, by specyfing - # `amount_in_cents`, or percentage coupon by specyfing `percentage`. + # Creates a coupon under the specified product family. + # You can create either a flat amount coupon by specifying amount_in_cents, + # or a percentage coupon by specifying percentage # You can restrict a coupon to only apply to specific products / components # by optionally passing in `restricted_products` and/or # `restricted_components` objects in the format: # `{ "": boolean_value }` + # Coupons can be administered in the Advanced Billing application or created + # via API. See [creating + # coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Creati + # ng-Editing-Deleting-Coupons) for more information. + # See [Apply Coupons to + # Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101- + # Coupons-and-Subscriptions) for information on applying a coupon to a + # subscription in the Advanced Billing UI. # @param [Integer] product_family_id Required parameter: The Advanced # Billing id of the product family to which the coupon belongs # @param [CouponRequest] body Optional parameter: TODO: type description @@ -52,7 +50,7 @@ def create_coupon(product_family_id, .execute end - # List coupons for a specific Product Family in a Site. + # Lists coupons for a specific product family in a site. # @param [Integer] product_family_id Required parameter: The Advanced # Billing id of the product family to which the coupon belongs # @param [Integer] page Optional parameter: Result records are organized in @@ -96,9 +94,9 @@ def list_coupons_for_product_family(options = {}) .execute end - # 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. + # Searches for a coupon by code, returning a 404 if no coupon is found. By + # passing a code parameter, the find will attempt to locate a coupon that + # matches that code. # 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) @@ -129,9 +127,8 @@ def find_coupon(product_family_id: nil, .execute end - # 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. + # Returns a coupon by its Advanced Billing-assigned ID. 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 @@ -171,9 +168,7 @@ def read_coupon(product_family_id, .execute end - # ## Update Coupon - # You can update a Coupon via the API with a PUT request to the resource - # endpoint. + # Updates a coupon. # 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: @@ -213,7 +208,8 @@ def update_coupon(product_family_id, .execute end - # You can archive a Coupon via the API with the archive method. + # Archives a coupon, making it unavailable for future use while remaining + # active on existing subscriptions. # Archiving makes that Coupon unavailable for future use, but allows it to # remain attached and functional on existing Subscriptions that are using # it. @@ -243,7 +239,7 @@ def archive_coupon(product_family_id, .execute end - # You can retrieve a list of coupons. + # Lists coupons for a site. # @param [Integer] page Optional parameter: 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 @@ -282,8 +278,7 @@ def list_coupons(options = {}) .execute end - # This request will provide details about the coupon usage as an array of - # data hashes, one per product. + # Lists coupon usage details, one entry per product. # @param [Integer] product_family_id Required parameter: The Advanced # Billing id of the product family to which the coupon belongs. # @param [Integer] coupon_id Required parameter: The Advanced Billing id of @@ -310,10 +305,9 @@ def read_coupon_usage(product_family_id, .execute end - # 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. + # Verifies whether a specific coupon code is valid. 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 @@ -360,10 +354,10 @@ def validate_coupon(code, .execute end - # 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. + # Creates and/or updates 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. @@ -396,6 +390,7 @@ def create_or_update_coupon_currency_prices(coupon_id, .execute end + # Creates subcodes for an existing coupon. # ## Coupon Subcodes Intro # Coupon Subcodes allow you to create a set of unique codes that allow you # to expand the use of one coupon. @@ -459,8 +454,7 @@ def create_coupon_subcodes(coupon_id, .execute end - # This request allows you to request the subcodes that are attached to a - # coupon. + # Lists the subcodes attached to a coupon. # @param [Integer] coupon_id Required parameter: The Advanced Billing id of # the coupon # @param [Integer] page Optional parameter: Result records are organized in @@ -493,8 +487,8 @@ def list_coupon_subcodes(options = {}) .execute end - # You can update the subcodes for the given Coupon via the API with a PUT - # request to the resource endpoint. + # Updates the subcodes for a coupon, replacing all existing subcodes with + # the new list. # 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. @@ -527,6 +521,7 @@ def update_coupon_subcodes(coupon_id, .execute end + # Deletes a specific subcode from a coupon. # ## Example # Given a coupon with an ID of 567, and a coupon subcode of 20OFF, the URL # to `DELETE` this coupon subcode would be: diff --git a/lib/advanced_billing/controllers/custom_fields_controller.rb b/lib/advanced_billing/controllers/custom_fields_controller.rb index 33474bb..df123b7 100644 --- a/lib/advanced_billing/controllers/custom_fields_controller.rb +++ b/lib/advanced_billing/controllers/custom_fields_controller.rb @@ -123,7 +123,7 @@ def list_metafields(options = {}) # must specify all metadata values including the new value you want to add. # - Add new metadata to a dropdown or radio for a metafield that was created # without metadata. - # - Remove metadata for a dropdown or radio for a metafield. + # - Remove metadata for a dropdown or radio for a metafield. # >Note: Updates to metadata overwrite existing values. To remove one or # more values, specify all metadata values except those you want to remove. # - Add or update scope settings for a metafield. @@ -279,7 +279,8 @@ def list_metadata(options = {}) # subscription or customer you specify. You can update the input_type for # the metafield with the Update Metafield endpoint. # Each site is limited to 100 unique metafields per resource. This means you - # can have 100 metafields for Subscription and another 100 for Customer. + # can have 100 metafields for the Subscription resource and another 100 for + # the Customer resource. # @param [ResourceType] resource_type Required parameter: The resource type # to which the metafields belong. # @param [Integer] resource_id Required parameter: The Advanced Billing id @@ -353,7 +354,7 @@ def delete_metadata(resource_type, .execute end - # Lists metadata for a specified array of subscriptions or customers. + # Lists metadata for a specified array of subscriptions or customers. # @param [ResourceType] resource_type Required parameter: The resource type # to which the metafields belong. # @param [Integer] page Optional parameter: Result records are organized in diff --git a/lib/advanced_billing/controllers/customers_controller.rb b/lib/advanced_billing/controllers/customers_controller.rb index ea653c7..76b63ae 100644 --- a/lib/advanced_billing/controllers/customers_controller.rb +++ b/lib/advanced_billing/controllers/customers_controller.rb @@ -6,9 +6,9 @@ module AdvancedBilling # CustomersController class CustomersController < BaseController - # You may create a new Customer at any time, or you may create a Customer at - # the same time you create a Subscription. The only validation restriction - # is that you may only create one customer for a given reference value. + # Creates a new customer; can also be created alongside a new subscription. + # The only validation restriction is that you may only create one customer + # for a given reference value. # If provided, the `reference` value must be unique. It represents a unique # identifier for the customer from your own app, i.e. the customer’s ID. # This allows you to retrieve a given customer via a piece of shared @@ -64,7 +64,8 @@ def create_customer(body: nil) .execute end - # This request will by default list all customers associated with your Site. + # Lists all customers associated with your site, or filters results using + # the search parameter. # ## Find Customer # Use the search feature with the `q` query parameter to retrieve an array # of customers that matches the search query. @@ -158,7 +159,7 @@ def read_customer(id) .execute end - # This method allows to update the Customer. + # Updates the customer. # @param [Integer] id Required parameter: The Advanced Billing id of the # customer # @param [UpdateCustomerRequest] body Optional parameter: TODO: type @@ -191,7 +192,7 @@ def update_customer(id, .execute end - # This method allows you to delete the Customer. + # Deletes the customer. # @param [Integer] id Required parameter: The Advanced Billing id of the # customer # @return [void] Response from the API call. @@ -209,8 +210,8 @@ def delete_customer(id) .execute end - # 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. + # Returns a customer by their unique reference ID. It will return a single + # match. # @param [String] reference Required parameter: Customer reference # @return [CustomerResponse] Response from the API call. def read_customer_by_reference(reference) @@ -228,7 +229,7 @@ def read_customer_by_reference(reference) .execute end - # This method lists all subscriptions that belong to a customer. + # Lists all subscriptions that belong to a customer. # @param [Integer] customer_id Required parameter: The Chargify id of the # customer # @return [Array[SubscriptionResponse]] Response from the API call. diff --git a/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb b/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb index f8bd727..9bfe35d 100644 --- a/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +++ b/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb @@ -6,10 +6,10 @@ module AdvancedBilling # EventsBasedBillingSegmentsController class EventsBasedBillingSegmentsController < BaseController - # This endpoint creates a new Segment for a Component with segmented Metric. - # It allows you to specify properties to bill upon and prices for each - # Segment. You can only pass as many "property_values" as the related Metric - # has segmenting properties defined. + # Creates a new segment for a component with a segmented metric. It allows + # you to specify properties to bill upon and prices for each Segment. You + # can only pass as many "property_values" as the related Metric has + # segmenting properties defined. # You may specify component and/or price point by using either the numeric # ID or the `handle:gold` syntax. # @param [String] component_id Required parameter: ID or Handle for the @@ -50,8 +50,7 @@ def create_segment(component_id, .execute end - # This endpoint allows you to fetch Segments created for a given Price - # Point. They will be returned in the order of creation. + # Lists segments created for a given price point, in order of creation. # You can pass `page` and `per_page` parameters in order to access all of # the segments. By default it will return `30` records. You can set # `per_page` to `200` at most. @@ -105,8 +104,8 @@ def list_segments_for_price_point(options = {}) .execute end - # This endpoint updates a single Segment for a Component with a segmented - # Metric. It allows you to update the pricing for the segment. + # Updates a single segment for a component with a 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. # @param [String] component_id Required parameter: ID or Handle of the @@ -152,7 +151,7 @@ def update_segment(component_id, .execute end - # This endpoint allows you to delete a Segment with specified ID. + # Deletes a segment with the specified ID. # You may specify component and/or price point by using either the numeric # ID or the `handle:gold` syntax. # @param [String] component_id Required parameter: ID or Handle of the @@ -190,8 +189,8 @@ def delete_segment(component_id, .execute end - # This endpoint allows you to create multiple segments in one request. The - # array of segments can contain up to `2000` records. + # Creates multiple segments in one request. The array of segments can + # contain up to `2000` records. # If any of the records contain an error the whole request would fail and # none of the requested segments get created. The error response contains a # message for only the one segment that failed validation, with the @@ -236,8 +235,8 @@ def bulk_create_segments(component_id, .execute end - # This endpoint allows you to update multiple segments in one request. The - # array of segments can contain up to `1000` records. + # Updates multiple segments in one request. The array of segments can + # contain up to `1000` records. # If any of the records contain an error the whole request would fail and # none of the requested segments get updated. The error response contains a # message for only the one segment that failed validation, with the diff --git a/lib/advanced_billing/controllers/events_controller.rb b/lib/advanced_billing/controllers/events_controller.rb index d9eac70..ea53425 100644 --- a/lib/advanced_billing/controllers/events_controller.rb +++ b/lib/advanced_billing/controllers/events_controller.rb @@ -6,13 +6,14 @@ module AdvancedBilling # EventsController class EventsController < BaseController + # Lists events for a site. # ## Events Intro # Advanced Billing Events include various activity that happens around a # Site. This information is **especially** useful to track down issues that # arise when subscriptions are not created due to errors. # Within the Advanced Billing UI, "Events" are referred to as "Site - # Activity". Full documentation on how to record view Events / Site Activty - # in the Advanced Billing UI can be located + # Activity". Full documentation on how to view Events / Site Activity in + # the Advanced Billing UI can be located # [here](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Act # ivity). # ## List Events for a Site @@ -141,7 +142,7 @@ def list_events(options = {}) .execute end - # The following request will return a list of events for a subscription. + # Lists events for a subscription. # ## Event Key # The event type is identified by the key property. You can check supported # keys [here]($m/Event%20Key). @@ -199,7 +200,7 @@ def list_subscription_events(options = {}) .execute end - # Get a count of all the events for a given site by using this method. + # Returns the total count of events for a given site. # @param [Integer] page Optional parameter: 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 diff --git a/lib/advanced_billing/controllers/insights_controller.rb b/lib/advanced_billing/controllers/insights_controller.rb index 0b6ec31..19ace1f 100644 --- a/lib/advanced_billing/controllers/insights_controller.rb +++ b/lib/advanced_billing/controllers/insights_controller.rb @@ -6,8 +6,8 @@ module AdvancedBilling # InsightsController class InsightsController < BaseController - # 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. + # Returns basic site-level stats. This API 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 reflect the @@ -29,8 +29,7 @@ def read_site_stats .execute end - # This endpoint returns your site's current MRR, including plan and usage - # breakouts. + # Returns your site's current MRR, including plan and usage breakouts. # @param [DateTime] at_time Optional parameter: submit a timestamp in # ISO8601 format to request MRR for a historic time # @param [Integer] subscription_id Optional parameter: submit the id of a @@ -53,7 +52,7 @@ def read_mrr(at_time: nil, .execute end - # This endpoint returns your site's MRR movements. + # Lists your site's MRR movements. # ## Understanding MRR movements # This endpoint will aid in accessing your site's [MRR # Report](https://maxio.zendesk.com/hc/en-us/articles/24285894587021-MRR-Ana diff --git a/lib/advanced_billing/controllers/invoices_controller.rb b/lib/advanced_billing/controllers/invoices_controller.rb index 8eade0d..fb9fa83 100644 --- a/lib/advanced_billing/controllers/invoices_controller.rb +++ b/lib/advanced_billing/controllers/invoices_controller.rb @@ -10,9 +10,9 @@ class InvoicesController < BaseController # ## Partial Refund for Consolidated Invoice # A refund less than the total of a consolidated invoice will be split # across its segments. - # A $50.00 refund on a $100.00 consolidated invoice with one $60.00 and one - # $40.00 segment, the refunded amount will be applied as 50% of each ($30.00 - # and $20.00 respectively). + # For a $50.00 refund on a $100.00 consolidated invoice with one $60.00 + # segment and one $40.00 segment, the refunded amount will be applied as 50% + # of each ($30.00 and $20.00, respectively). # @param [String] uid Required parameter: The unique identifier for the # invoice, this does not refer to the public facing invoice number. # @param [RefundInvoiceRequest] body Optional parameter: TODO: type @@ -297,8 +297,8 @@ def record_payment_for_invoice(uid, # 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. + # To apply a payment to multiple invoices, at minimum, specify the `amount` + # and `applications` (i.e., `invoice_uid` and `amount`) details. # ``` # { # "payment": { @@ -604,10 +604,10 @@ def list_consolidated_invoice_segments(options = {}) # ``` # The price for each line item will be calculated as well as a total due # amount for the invoice. Multiple line items can be sent. - # ### Line items types - # When defining line item, You can choose one of 3 types for one line item: + # ### Line item types + # When defining a line item, You can choose one of 3 types for a line item: # #### Custom item - # Like in basic behavior example above, You can pass `title` and + # As shown in the basic behavior example, You can pass `title` and # `unit_price` for custom item. # #### Product id # Product handle (with handle: prefix) or id from the scope of current @@ -622,7 +622,7 @@ def list_consolidated_invoice_segments(options = {}) # is used, following fields cannot be used: `title`, `product_id`. By # default `unit_price` is taken from product's default price point, but can # be overwritten by passing `unit_price` or `price_point_id`. At this moment - # price points are supportted only for quantity based, on/off and metered + # price points are supported only for quantity based, on/off and metered # components. For prepaid and event based billing components `unit_price` is # required. # ### Coupons @@ -750,9 +750,11 @@ def list_consolidated_invoice_segments(options = {}) # description for line item. # ### Invoice Options # #### Issue Date - # By default, invoices will be created with a issue date set to today. - # `issue_date` parameter can be send to alter that. Only dates in the past - # can be send. `issue_date` should be send in `YYYY-MM-DD` format. + # By default, invoices will be created with a issue date set to today in + # your site's time zone. The `issue_date` parameter can be sent to alter the + # default. Only today or dates in the past are accepted. This date is + # interpreted and validated in your site's time zone. The format for + # `issue_date` is `YYYY-MM-DD`. # #### Net Terms # By default, invoices will be created with a due date matching the date of # invoice creation. If a different due date is desired, the `net_terms` @@ -766,7 +768,7 @@ def list_consolidated_invoice_segments(options = {}) # #### Memo and Payment Instructions # A custom memo can be sent with the `memo` parameter to override the site's # default. Likewise, custom payment instructions can be sent with the - # `payment_instrucions` parameter. + # `payment_instructions` parameter. # #### Status # By default, invoices will be created with open status. Possible # alternative is `draft`. @@ -844,10 +846,10 @@ def send_invoice(uid, .execute end - # Customer information may change after an invoice is issued which may lead - # to a mismatch between customer information that are present on an open - # invoice and actual customer information. This endpoint allows to preview - # these differences, if any. + # Customer information may change after an invoice is issued, which may lead + # to a mismatch between customer information that is present on an open + # invoice and actual customer information. This endpoint allows you to + # preview these differences, if any. # The endpoint doesn't accept a request body. Customer information # differences are calculated on the application side. # @param [String] uid Required parameter: The unique identifier for the @@ -879,7 +881,7 @@ def preview_customer_information_changes(uid) # This endpoint updates customer information on an open invoice and returns # the updated invoice. If you would like to preview changes that will be # applied, use the `/invoices/{uid}/customer_information/preview.json` - # endpoint before. + # endpoint first. # The endpoint doesn't accept a request body. Customer information # differences are calculated on the application side. # @param [String] uid Required parameter: The unique identifier for the @@ -916,11 +918,11 @@ def update_customer_information(uid) # subscription in a group. # For Remittance subscriptions, the invoice will go into "open" status and # payment won't be attempted. The value for `on_failed_payment` would be - # rejected if sent. Any prepayments or service credits that exist on - # subscription will be automatically applied. Additionally, if setting is - # on, an email will be sent for issued invoice. + # rejected if sent. Any prepayments or service credits that exist on the + # subscription will be automatically applied. Additionally, if the setting + # is enabled, an email will be sent for the issued invoice. # For Automatic subscriptions, prepayments and service credits will apply to - # the invoice and before payment is attempted. On successful payment, the + # the invoice before payment is attempted. On successful payment, the # invoice will go into "paid" status and email will be sent to the customer # (if setting applies). When payment fails, the next event depends on the # `on_failed_payment` value: diff --git a/lib/advanced_billing/controllers/offers_controller.rb b/lib/advanced_billing/controllers/offers_controller.rb index 3a61f00..617b1f7 100644 --- a/lib/advanced_billing/controllers/offers_controller.rb +++ b/lib/advanced_billing/controllers/offers_controller.rb @@ -6,8 +6,7 @@ module AdvancedBilling # OffersController class OffersController < BaseController - # Create an offer within your Advanced Billing site by sending a POST - # request. + # Creates an offer within your Advanced Billing site. # ## Documentation # Offers allow you to package complicated combinations of products, # components and coupons into a convenient package which can then be @@ -46,7 +45,7 @@ def create_offer(body: nil) .execute end - # This endpoint will list offers for a site. + # Lists offers for a site. # @param [Integer] page Optional parameter: 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 @@ -81,8 +80,8 @@ def list_offers(options = {}) .execute end - # This method allows you to list a specific offer's attributes. This is - # different than list all offers for a site, as it requires an `offer_id`. + # Returns a specific offer's attributes. This is different from listing all + # offers for a site, as it requires an `offer_id`. # @param [Integer] offer_id Required parameter: The Chargify id of the # offer # @return [OfferResponse] Response from the API call. @@ -102,7 +101,7 @@ def read_offer(offer_id) .execute end - # Archive an existing offer. Please provide an `offer_id` in order to + # Archives an existing offer. Please provide an `offer_id` in order to # archive the correct item. # @param [Integer] offer_id Required parameter: The Chargify id of the # offer @@ -121,8 +120,8 @@ def archive_offer(offer_id) .execute end - # Unarchive a previously archived offer. Please provide an `offer_id` in - # order to un-archive the correct item. + # Unarchives a previously archived offer. Please provide an `offer_id` in + # order to unarchive the correct item. # @param [Integer] offer_id Required parameter: The Chargify id of the # offer # @return [void] Response from the API call. diff --git a/lib/advanced_billing/controllers/payment_profiles_controller.rb b/lib/advanced_billing/controllers/payment_profiles_controller.rb index 2186c51..6ea6ac5 100644 --- a/lib/advanced_billing/controllers/payment_profiles_controller.rb +++ b/lib/advanced_billing/controllers/payment_profiles_controller.rb @@ -22,8 +22,8 @@ class PaymentProfilesController < BaseController # [PCI # compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Co # mpliance#pci-compliance-0-0) on your end. If your business is not PCI - # compliant, use - # [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Char + # compliant, use [Maxio.js (formerly + # Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Char # gify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank # account information. # See the following articles to learn more about subscriptions and payments: @@ -39,26 +39,26 @@ class PaymentProfilesController < BaseController # + # [Taxes](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e- # signups#taxes) - # + - # [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Char + # + [Maxio.js (formerly + # Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Char # gify-js-Overview) - # + [Chargify.js with GoCardless - minimal + # + [Maxio.js with GoCardless - minimal # example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples# # h_01K0PJ15QQZKCER8CFK40MR6XJ) - # + [Chargify.js with GoCardless - full + # + [Maxio.js with GoCardless - full # example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples# # h_01K0PJ15QR09JVHWW0MCA7HVJV) - # + [Chargify.js with Stripe Direct Debit - minimal + # + [Maxio.js with Stripe Direct Debit - minimal # example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples# # h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) - # + [Chargify.js with Stripe Direct Debit - full + # + [Maxio.js with Stripe Direct Debit - full # example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples# # h_01K0PJ15QRECQQ4ECS3ZA55GY7) - # + [Chargify.js with Stripe BECS Direct Debit - minimal + # + [Maxio.js with Stripe BECS Direct Debit - minimal # example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN # DIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway # ) - # + [Chargify.js with Stripe BECS Direct Debit - full + # + [Maxio.js with Stripe BECS Direct Debit - full # example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN # DIy-examples#full-example-with-sepa-direct-debit-stripe-gateway) # + [Full documentation on @@ -73,79 +73,15 @@ class PaymentProfilesController < BaseController # + [Full documentation on Stripe BACS Direct # Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-S # EPA-and-BECS-Direct-Debit) - # ## 3D Secure Authentication during payment profile creation. - # When a payment requires 3D Secure Authentication to adhear to Strong - # Customer Authentication (SCA) during payment profile creation, the request - # enters a [post-authentication - # flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-I - # mplementing-3D-Secure#psd2-flows-pre-authentication-and-post-authenticatio - # n). In this case, a 422 Unprocessable Entity status is returned with the - # following response: - # ```json - # { - # "jsonapi": { - # "version": "1.0" - # }, - # "errors": [ - # { - # "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/pay_uerzhsxd5uhk - # bodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&red - # irect_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/checkout/pay_uerzhsxd5uh - # kbodx5jhvkg6yeu?one_time_token_id=93" - # } - # } - # ] - # } - # ``` - # To let the customer go through 3D Secure Authentication, they need to be - # redirected to the URL specified in `action_link`. - # Optionally, you can specify the `callback_url` parameter in the - # `action_link` URL to receive notification about the result of 3D Secure - # Authentication. - # The `callback_url` will return the following information: - # - whether the authentication was successful (`success`) - # - the payment profile ID (`payment_profile_id`) - # You can also specify a `redirect_url` parameter in the `action_link` URL - # to redirect the customer back to your site. - # You cannot use action_link in an iframe inside a custom application. You - # must redirect the customer directly to the `action_link` and use the - # `redirect_url` or `callback_url` to be notified of the result. - # The final URL that you send a customer to complete 3D Secure may resemble - # the following, where the first half is the `action_link` and the second - # half contains a `redirect_url` and `callback_url`: - # - # `https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uh - # kbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&re - # direct_url=https://yourpage.com` - # ### Example Redirect Flow - # Here's an example flow to redirect customers to different pages depending - # on whether SCA was performed successfully: - # 1. Create a payment profile via the API; it requires 3DS. - # 2. You receive an `action_link` in the response. - # 3. Use this `action_link` to, for example, connect with your internal - # resources or generate a `session_id`. - # 4. Include one of those attributes inside the `callback_url` and - # `redirect_url` to be aware which “session” this applies to. - # 5. Redirect the customer to the `action_link` with `callback_url` and - # `redirect_url` applied - # 6. After the customer completes 3DS authentication, we notify you of the - # result via the applied `callback_url`. - # 7. After that, we redirect the customer to the `redirect_url`; at this - # point the result of authentication is known. - # 8. Optionally, you can use the applied "msg" param in the `redirect_url` - # to determine if the redirect was successful. + # ## 3D Secure (3DS) Authentication post-authentication flow + # When a payment requires 3DS Authentication to adhere to Strong Customer + # Authentication (SCA), the request enters a post-authentication flow where + # a 422 Unprocessable Entity status is returned with an action_link that + # will direct the customer through 3DS Authentication. + # See the [3D Secure Post-Authentication + # Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Po + # st-Authentication-Flow) article in the product documentation to learn how + # to manage the redirect flow. # @param [CreatePaymentProfileRequest] body Optional parameter: When # following the IBAN or the Local Bank details examples, a customer, bank # account and mandate will be created in your current vault. If the @@ -175,9 +111,9 @@ def create_payment_profile(body: nil) .execute end - # This method will return all of the active `payment_profiles` for a Site, - # or for one Customer within a site. If no payment profiles are found, this - # endpoint will return an empty array, not a 404. + # Returns all active payment profiles for a site, or for one customer within + # a site. If no payment profiles are found, this endpoint will return an + # empty array, not a 404. # @param [Integer] page Optional parameter: 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 @@ -209,8 +145,7 @@ def list_payment_profiles(options = {}) .execute end - # Using the GET method you can retrieve a Payment Profile identified by its - # unique ID. + # Returns a payment profile identified by its unique ID. # Note that a different JSON object will be returned if the card method on # file is a bank account. # ### Response for Bank Account @@ -266,6 +201,7 @@ def read_payment_profile(payment_profile_id) .execute end + # Updates a payment profile. # ## Partial Card Updates # In the event that you are using the Authorize.net, Stripe, Cybersource, # Forte or Braintree Blue payment gateways, you can update just the billing @@ -399,8 +335,8 @@ def delete_subscriptions_payment_profile(subscription_id, .execute end - # Submit the two small deposit amounts the customer received in their bank - # account in order to verify the bank account. (Stripe only) + # Verifies a bank account. Submit the two small deposit amounts the customer + # received in their bank account to verify the bank account. (Stripe only) # @param [Integer] bank_account_id Required parameter: Identifier of the # bank account in the system. # @param [BankAccountVerificationRequest] body Optional parameter: TODO: @@ -459,8 +395,8 @@ def delete_subscription_group_payment_profile(uid, .execute end - # This will change the default payment profile on the subscription to the - # existing payment profile with the id specified. + # Changes the default payment profile on the subscription to the existing + # payment profile with the specified ID. # You must elect to change the existing payment profile to a new payment # profile ID in order to receive a satisfactory response from this endpoint. # @param [Integer] subscription_id Required parameter: The Chargify id of diff --git a/lib/advanced_billing/controllers/product_families_controller.rb b/lib/advanced_billing/controllers/product_families_controller.rb index 34f689b..22e5cd0 100644 --- a/lib/advanced_billing/controllers/product_families_controller.rb +++ b/lib/advanced_billing/controllers/product_families_controller.rb @@ -82,7 +82,7 @@ def list_products_for_product_family(options = {}) end # Creates a Product Family within your Advanced Billing site. Create a - # Product Family to act as a container for your products, components and + # Product Family to act as a container for your products, components, and # coupons. # Full documentation on how Product Families operate within the Advanced # Billing UI can be located @@ -111,7 +111,7 @@ def create_product_family(body: nil) .execute end - # Retrieve a list of Product Families for a site. + # Returns a list of Product Families for a site. # @param [BasicDateField] date_field Optional parameter: The type of filter # you would like to apply to your search. Use in query: # `date_field=created_at`. diff --git a/lib/advanced_billing/controllers/product_price_points_controller.rb b/lib/advanced_billing/controllers/product_price_points_controller.rb index 49cccda..0e60ed7 100644 --- a/lib/advanced_billing/controllers/product_price_points_controller.rb +++ b/lib/advanced_billing/controllers/product_price_points_controller.rb @@ -141,8 +141,8 @@ def update_product_price_point(product_id, .execute end - # Use this endpoint to retrieve details for a specific product price point. - # You can achieve this by using either the product price point ID or handle. + # Returns details for a specific product price point. You can achieve this + # by using either the product price point ID or handle. # @param [Integer | String] product_id Required parameter: The id or handle # of the product. When using the handle, it must be prefixed with `handle:`. # Example: `123` for an integer ID, or `handle:example-product-handle` for a @@ -231,7 +231,7 @@ def archive_product_price_point(product_id, .execute end - # Use this endpoint to unarchive an archived product price point. + # Unarchives an archived product price point. # @param [Integer] product_id Required parameter: The Advanced Billing id of # the product to which the price point belongs # @param [Integer] price_point_id Required parameter: The Advanced Billing @@ -386,8 +386,7 @@ def update_product_currency_prices(product_price_point_id, .execute end - # This method allows retrieval of a list of Products Price Points belonging - # to a Site. + # Lists Product Price Points belonging to a site. # @param [SortingDirection] direction Optional parameter: Controls the order # in which results are returned. Use in query `direction=asc`. # @param [ListPricePointsFilter] filter Optional parameter: Filter to use diff --git a/lib/advanced_billing/controllers/products_controller.rb b/lib/advanced_billing/controllers/products_controller.rb index 22e540b..8f18721 100644 --- a/lib/advanced_billing/controllers/products_controller.rb +++ b/lib/advanced_billing/controllers/products_controller.rb @@ -7,7 +7,7 @@ module AdvancedBilling # ProductsController class ProductsController < BaseController # Creates a product in your Advanced Billing site. - # See the following product docuemation for more information: + # See the following product documentation for more information: # + [Products # Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645- # Products-Overview) @@ -100,7 +100,7 @@ def update_product(product_id, .execute end - # Archives the product. All current subscribers will be unffected; their + # Archives the product. All current subscribers will be unaffected; their # subscription/purchase will continue to be charged monthly. # This will restrict the option to chose the product for purchase via the # Billing Portal, as well as disable Public Signup Pages for the product. @@ -146,7 +146,7 @@ def read_product_by_handle(api_handle) .execute end - # This method allows to retrieve a list of Products belonging to a Site. + # Lists products belonging to a site. # @param [BasicDateField] date_field Optional parameter: The type of filter # you would like to apply to your search. Use in query: # `date_field=created_at`. diff --git a/lib/advanced_billing/controllers/proforma_invoices_controller.rb b/lib/advanced_billing/controllers/proforma_invoices_controller.rb index 59062ad..18452ef 100644 --- a/lib/advanced_billing/controllers/proforma_invoices_controller.rb +++ b/lib/advanced_billing/controllers/proforma_invoices_controller.rb @@ -6,11 +6,11 @@ module AdvancedBilling # ProformaInvoicesController class ProformaInvoicesController < BaseController - # This endpoint will trigger the creation of a consolidated proforma invoice - # asynchronously. It will return a 201 with no message, or a 422 with any - # errors. To find and view the new consolidated proforma invoice, you may - # poll the subscription group listing for proforma invoices; only one - # consolidated proforma invoice may be created per group at a time. + # Creates a consolidated proforma invoice asynchronously. It will return a + # 201 with no message, or a 422 with any errors. To find and view the new + # consolidated proforma invoice, you may poll the subscription group listing + # for proforma invoices; only one consolidated proforma invoice may be + # created per group at a time. # If the information becomes outdated, simply void the old consolidated # proforma invoice and generate a new one. # ## Restrictions @@ -38,8 +38,8 @@ def create_consolidated_proforma_invoice(uid) .execute end - # Only proforma invoices with a `consolidation_level` of parent are - # returned. + # Lists proforma invoices with a `consolidation_level` of parent for the + # subscription group. # By default, proforma invoices returned on the index will only include # totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, # `credits`, `payments`, `custom_fields`. To include breakdowns, pass the @@ -84,7 +84,7 @@ def list_subscription_group_proforma_invoices(options = {}) .execute end - # Use this endpoint to read the details of an existing proforma invoice. + # Returns the details of an existing proforma invoice. # ## Restrictions # Proforma invoices are only available on Relationship Invoicing sites. # @param [String] proforma_invoice_uid Required parameter: The uid of the @@ -109,9 +109,9 @@ def read_proforma_invoice(proforma_invoice_uid) .execute end - # This endpoint will create a proforma invoice and return it as a response. - # If the information becomes outdated, simply void the old proforma invoice - # and generate a new one. + # Creates a proforma invoice and returns it as a response. If the + # information becomes outdated, simply void the old proforma invoice and + # generate a new one. # If you would like to preview the next billing amounts without generating a # full proforma invoice, use the renewal preview endpoint. # ## Restrictions @@ -141,10 +141,10 @@ def create_proforma_invoice(subscription_id) .execute end - # By default, proforma invoices returned on the index will only include - # totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, - # `credits`, `payments`, or `custom_fields`. To include breakdowns, pass the - # specific field as a key in the query with a value set to `true`. + # Lists proforma invoices for a subscription. By default, results only + # include totals, not detailed breakdowns for `line_items`, `discounts`, + # `taxes`, `credits`, `payments`, or `custom_fields`. To include breakdowns, + # pass the specific field as a key in the query with a value set to `true`. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [String] start_date Optional parameter: The beginning date range @@ -208,8 +208,7 @@ def list_proforma_invoices(options = {}) .execute end - # Allows for proforma invoices to be programmatically delivered via email. - # Supports email + # Delivers a proforma invoice programmatically via email. Supports email # delivery to direct recipients, carbon-copy (cc) recipients, and blind # carbon-copy (bcc) recipients. # If `recipient_emails` is omitted, the system will fall back to the primary @@ -249,7 +248,7 @@ def deliver_proforma_invoice(proforma_invoice_uid, .execute end - # This endpoint will void a proforma invoice that has the status "draft". + # Voids 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 reopened. @@ -290,7 +289,7 @@ def void_proforma_invoice(proforma_invoice_uid, .execute end - # Return a preview of the data that will be included on a given + # Returns a preview of the data that will be included on a given # subscription's proforma invoice if one were to be generated. It will have # similar line items and totals as a renewal preview, but the response will # be presented in the format of a proforma invoice. Consequently it will @@ -333,12 +332,11 @@ def preview_proforma_invoice(subscription_id) .execute end - # This endpoint is only available for Relationship Invoicing sites. It - # cannot be used to create consolidated proforma invoices or preview prepaid - # subscriptions. - # Create a proforma invoice to preview costs before a subscription's signup. - # Like other proforma invoices, it can be emailed to the customer, voided, - # and publicly viewed on the chargifypay domain. + # Creates a proforma invoice to preview costs before a subscription's + # signup. This endpoint is only available for Relationship Invoicing sites + # and cannot be used to create consolidated proforma invoices or preview + # prepaid subscriptions. Like other proforma invoices, it can be emailed to + # the customer, voided, and publicly viewed on the chargifypay domain. # Pass a payload that resembles a subscription create or signup preview # request. For example, you can specify components, coupons/a referral, # offers, custom pricing, and an existing customer or payment profile to @@ -374,13 +372,12 @@ def create_signup_proforma_invoice(body: nil) .execute end - # This endpoint is only available for Relationship Invoicing sites. It - # cannot be used to create consolidated proforma invoice previews or preview - # prepaid subscriptions. - # Create a signup preview in the format of a proforma invoice to preview - # costs before a subscription's signup. You have the option of optionally - # previewing the first renewal's costs as well. The proforma invoice preview - # will not be persisted. + # Creates a signup preview in the format of a proforma invoice to preview + # costs before a subscription's signup. This endpoint is only available for + # Relationship Invoicing sites and cannot be used to create consolidated + # proforma invoice previews or preview prepaid subscriptions. You have the + # option of previewing the first renewal's costs as well. The proforma + # invoice preview will not be persisted. # Pass a payload that resembles a subscription create or signup preview # request. For example, you can specify components, coupons/a referral, # offers, custom pricing, and an existing customer or payment profile to diff --git a/lib/advanced_billing/controllers/reason_codes_controller.rb b/lib/advanced_billing/controllers/reason_codes_controller.rb index 2404694..e26fdac 100644 --- a/lib/advanced_billing/controllers/reason_codes_controller.rb +++ b/lib/advanced_billing/controllers/reason_codes_controller.rb @@ -6,8 +6,9 @@ module AdvancedBilling # ReasonCodesController class ReasonCodesController < BaseController + # Creates a reason code for a given site. # # Reason Codes Intro - # ReasonCodes are a way to gain a high level view of why your customers are + # Reason Codes are a way to gain a high-level view of why your customers are # cancelling the subscription to your product or service. # Add a set of churn reason codes to be displayed in-app and/or the Maxio # Billing Portal. As your subscribers decide to cancel their subscription, @@ -19,8 +20,8 @@ class ReasonCodesController < BaseController # Codes](https://maxio.zendesk.com/hc/en-us/articles/24286647554701-Churn-Re # ason-Codes) # ## Create Reason Code - # This method gives a merchant the option to create a reason codes for a - # given Site. + # This method gives a merchant the option to create reason codes for a given + # site. # @param [CreateReasonCodeRequest] body Optional parameter: TODO: type # description here # @return [ReasonCodeResponse] Response from the API call. @@ -44,8 +45,7 @@ def create_reason_code(body: nil) .execute end - # This method gives a merchant the option to retrieve a list of all of the - # current churn codes for a given site. + # Lists all current churn codes for a given site. # @param [Integer] page Optional parameter: 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 @@ -78,8 +78,7 @@ def list_reason_codes(options = {}) .execute end - # This method gives a merchant the option to retrieve a list of a particular - # code for a given Site by providing the unique numerical ID of the code. + # Returns a particular churn reason code for a given site by its unique ID. # @param [Integer] reason_code_id Required parameter: The Advanced Billing # id of the reason code # @return [ReasonCodeResponse] Response from the API call. @@ -102,8 +101,7 @@ def read_reason_code(reason_code_id) .execute end - # This method gives a merchant the option to update an existing reason code - # for a given site. + # Updates an existing reason code for a given site. # @param [Integer] reason_code_id Required parameter: The Advanced Billing # id of the reason code # @param [UpdateReasonCodeRequest] body Optional parameter: TODO: type @@ -136,9 +134,8 @@ def update_reason_code(reason_code_id, .execute end - # This method gives a merchant the option to delete one reason code from the - # Churn Reason Codes. This code will be immediately removed. This action is - # not reversible. + # Deletes a reason code from the Churn Reason Codes. This code will be + # immediately removed. This action is not reversible. # @param [Integer] reason_code_id Required parameter: The Advanced Billing # id of the reason code # @return [OkResponse] Response from the API call. diff --git a/lib/advanced_billing/controllers/referral_codes_controller.rb b/lib/advanced_billing/controllers/referral_codes_controller.rb index 18af077..6660815 100644 --- a/lib/advanced_billing/controllers/referral_codes_controller.rb +++ b/lib/advanced_billing/controllers/referral_codes_controller.rb @@ -6,9 +6,9 @@ module AdvancedBilling # ReferralCodesController class ReferralCodesController < BaseController - # Use this method to determine if the referral code is valid and applicable - # within your Site. This method is useful for validating referral codes that - # are entered by a customer. + # Validates whether a referral code is valid and applicable within your + # site. This method is useful for validating referral codes that are entered + # by a customer. # ## Referrals Documentation # Full documentation on how to use the referrals feature in the Advanced # Billing UI can be located diff --git a/lib/advanced_billing/controllers/sales_commissions_controller.rb b/lib/advanced_billing/controllers/sales_commissions_controller.rb index f2d2326..94b3fbd 100644 --- a/lib/advanced_billing/controllers/sales_commissions_controller.rb +++ b/lib/advanced_billing/controllers/sales_commissions_controller.rb @@ -6,7 +6,7 @@ module AdvancedBilling # SalesCommissionsController class SalesCommissionsController < BaseController - # Endpoint returns subscriptions with associated sales reps + # Lists subscriptions with associated sales reps. # ## Modified Authentication Process # The Sales Commission API differs from other Chargify API endpoints. This # resource is associated with the seller itself. Up to now all available @@ -63,7 +63,7 @@ def list_sales_commission_settings(options = {}) .execute end - # Endpoint returns sales rep list with details + # Returns a sales rep list with details. # ## Modified Authentication Process # The Sales Commission API differs from other Chargify API endpoints. This # resource is associated with the seller itself. Up to now all available @@ -120,7 +120,7 @@ def list_sales_reps(options = {}) .execute end - # Endpoint returns sales rep and attached subscriptions details. + # Returns a sales rep and attached subscription details. # ## Modified Authentication Process # The Sales Commission API differs from other Chargify API endpoints. This # resource is associated with the seller itself. Up to now all available diff --git a/lib/advanced_billing/controllers/sites_controller.rb b/lib/advanced_billing/controllers/sites_controller.rb index f533017..3d9475d 100644 --- a/lib/advanced_billing/controllers/sites_controller.rb +++ b/lib/advanced_billing/controllers/sites_controller.rb @@ -6,14 +6,14 @@ module AdvancedBilling # SitesController class SitesController < BaseController - # This endpoint allows you to fetch some site data. + # Retrieves site data. # Full documentation on Sites in the Advanced Billing UI can be located # [here](https://maxio.zendesk.com/hc/en-us/sections/24250550707085-Sites). # Specifically, the [Clearing Site # Data](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing- - # Site-Data) section is extremely relevant to this endpoint documentation. + # Site-Data) section is relevant to this endpoint documentation. # #### Relationship invoicing enabled - # If site has RI enabled then you will see more settings like: + # If the site has RI enabled then you will see more settings like: # "customer_hierarchy_enabled": true, # "whopays_enabled": true, # "whopays_default_payer": "self" @@ -35,10 +35,11 @@ def read_site .execute end - # This call is asynchronous and there may be a delay before the site data is - # fully deleted. If you are clearing site data for an automated test, you - # will need to build in a delay and/or check that there are no products, - # etc., in the site before proceeding. + # Clears all data from a test site asynchronously. This call is asynchronous + # and there may be a delay before the site data is fully deleted. If you are + # clearing site data for an automated test, you will need to build in a + # delay and/or check that there are no products, etc., in the site before + # proceeding. # **This functionality will only work on sites in TEST mode. Attempts to # perform this on sites in “live” mode will result in a response of 403 # FORBIDDEN.** @@ -60,7 +61,7 @@ def clear_site(cleanup_scope: CleanupScope::ALL) .execute end - # This endpoint returns public keys used for Chargify.js. + # Returns public keys used for Maxio.js (formerly Chargify.js). # @param [Integer] page Optional parameter: 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 diff --git a/lib/advanced_billing/controllers/subscription_components_controller.rb b/lib/advanced_billing/controllers/subscription_components_controller.rb index 2163bd3..fa2faa7 100644 --- a/lib/advanced_billing/controllers/subscription_components_controller.rb +++ b/lib/advanced_billing/controllers/subscription_components_controller.rb @@ -6,8 +6,7 @@ module AdvancedBilling # SubscriptionComponentsController class SubscriptionComponentsController < BaseController - # This request will list information regarding a specific component owned by - # a subscription. + # Returns information for a specific component on a subscription. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [Integer] component_id Required parameter: The Advanced Billing id @@ -37,7 +36,7 @@ def read_subscription_component(subscription_id, .execute end - # This request will list a subscription's applied components. + # Lists a subscription's applied components. # ## Archived Components # When requesting to list components for a given subscription, if the # subscription contains **archived** components they will be listed in the @@ -177,8 +176,8 @@ def bulk_reset_subscription_components_price_points(subscription_id) # Quantity, On/Off, and Prepaid Components. # When creating an allocation via the API, you can pass the # `upgrade_charge`, `downgrade_credit`, and `accrue_charge` to be applied. - # > **Note:** These proration and accural fields are ignored for Prepaid - # Components since this component type always generate charges immediately + # > **Note:** These proration and accrual fields are ignored for Prepaid + # Components since this component type always generates charges immediately # without proration. # For information on prorated components and upgrade/downgrade schemes, see # [Setting Component @@ -202,7 +201,7 @@ def bulk_reset_subscription_components_price_points(subscription_id) # > **Note:** Proration uses the current price of the component as well as # the current tax rates. Changes to either may cause the prorated # charge/credit to be wrong. - # For more informaiton see the [Component + # For more information, see the [Component # Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Co # mponent-Allocations-Overview) product Documentation. # @param [Integer] subscription_id Required parameter: The Chargify id of @@ -240,8 +239,7 @@ def allocate_component(subscription_id, .execute end - # This endpoint returns the 50 most recent Allocations, ordered by most - # recent first. + # Returns the 50 most recent Allocations, ordered by most recent first. # ## On/Off Components # When a subscription's on/off component has been toggled to on (`1`) or off # (`0`), usage will be logged in this response. @@ -288,8 +286,8 @@ def list_allocations(subscription_id, end # Creates multiple allocations, sets the current allocated quantity for each - # of the components, and recording a memo. A `component_id` is required - # for each allocation. + # of the components, and records a memo. A `component_id` is required for + # each allocation. # The charges and/or credits that are created will be rolled up into a # single total which is used to determine whether this is an upgrade or a # downgrade. @@ -311,9 +309,9 @@ def list_allocations(subscription_id, # > **Note:** Proration uses the current price of the component as well as # the current tax rates. Changes to either may cause the prorated # charge/credit to be wrong. - # For more informaiton see the [Component + # For more information, see the [Component # Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Co - # mponent-Allocations-Overview) product Documentation. + # mponent-Allocations-Overview) product documentation. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [AllocateComponents] body Optional parameter: TODO: type @@ -347,10 +345,10 @@ def allocate_components(subscription_id, .execute end - # Advanced Billing offers the ability to preview a potential subscription's - # **quantity-based** or **on/off** component allocation in the middle of the - # current billing period. This is useful if you want users to be able to - # see the effect of a component operation before actually doing it. + # Previews a potential subscription's **quantity-based** or **on/off** + # component allocation in the middle of the current billing period. This is + # useful if you want users to be able to see the effect of a component + # operation before actually doing it. # ## Fine-grained Component Control: Use with multiple `upgrade_charge`s or # `downgrade_credits` # When the allocation uses multiple different types of `upgrade_charge`s or @@ -388,10 +386,9 @@ def preview_allocations(subscription_id, .execute end - # When the expiration interval options are selected on a prepaid usage - # component price point, all allocations will be created with an expiration - # date. This expiration date can be changed after the fact to allow for - # extending or shortening the allocation's active window. + # Updates the expiration date for a prepaid usage allocation. This + # expiration date can be changed after the fact to allow for extending or + # shortening the allocation's active window. # In order to change a prepaid usage allocation's expiration date, a PUT # call must be made to the allocation's endpoint with a new expiration date. # ## Limitations @@ -444,10 +441,11 @@ def update_prepaid_usage_allocation_expiration_date(subscription_id, .execute end + # Deletes a prepaid usage allocation. # Prepaid Usage components are unique in that their allocations are always # additive. In order to reduce a subscription's allocated quantity for a - # prepaid usage component each allocation must be destroyed individually via - # this endpoint. + # prepaid usage component, each allocation must be destroyed individually + # via this endpoint. # ## Credit Scheme # By default, destroying an allocation will generate a service credit on the # subscription. This behavior can be modified with the optional @@ -512,13 +510,13 @@ def delete_prepaid_usage_allocation(subscription_id, # record component usage against a subscription, see the following # resources: # It is not possible to record metered usage for more than one component at - # a time Usage should be reported as one API call per component on a single + # a time. Usage should be reported as one API call per component on a single # subscription. For example, to record that a subscriber has sent both an # SMS Message and an Email, send an API call for each. - # See the following product documention articles for more information: + # See the following product documentation articles for more information: # - [Create and Manage # Components](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Cre - # ate-Edit-and-Archive-Components). A + # ate-Edit-and-Archive-Components) # - [Recording Metered Component # Usage](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reportin # g-Component-Allocations#reporting-metered-component-usage) @@ -610,9 +608,9 @@ def create_usage(subscription_id_or_reference, .execute end - # This request will return a list of the usages associated with a - # subscription for a particular metered component. This will display the - # previously recorded components for a subscription. + # Returns a list of usages associated with a subscription for a particular + # metered component. This will display the previously recorded components + # for a subscription. # This endpoint is not compatible with quantity-based components. # ## Since Date and Until Date Usage # Note: The `since_date` and `until_date` attributes each default to @@ -692,6 +690,7 @@ def list_usages(options = {}) .execute end + # Activates an event-based component for a single subscription. # In order to bill your subscribers on your Events data under the # Events-Based Billing feature, the components must be activated for the # subscriber. @@ -734,9 +733,9 @@ def activate_event_based_component(subscription_id, .execute end - # Use this endpoint to deactivate an event-based component for a single - # subscription. Deactivating the event-based component causes Advanced - # Billing to ignore related events at subscription renewal. + # Deactivates an event-based component for a single subscription. + # Deactivating the event-based component causes Advanced Billing to ignore + # related events at subscription renewal. # @param [Integer] subscription_id Required parameter: The Advanced Billing # id of the subscription # @param [Integer] component_id Required parameter: The Advanced Billing id @@ -760,6 +759,7 @@ def deactivate_event_based_component(subscription_id, .execute end + # Records a single event for Events-Based Billing. # ## Documentation # Events-Based Billing is an evolved form of metered billing that is based # on data-rich events streamed in real-time from your system to Advanced @@ -806,7 +806,7 @@ def record_event(api_handle, .execute end - # Use this endpoint to record a collection of events. + # Records a collection of events. # *Note: this endpoint differs from the standard Chargify API endpoints in # that the subdomain will be `events` and your site subdomain will be # included in the URL path.* @@ -840,7 +840,7 @@ def bulk_record_events(api_handle, .execute end - # This request will list components applied to each subscription. + # Lists components applied to each subscription. # @param [Integer] page Optional parameter: 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 diff --git a/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb b/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb index a5e1483..b95cfce 100644 --- a/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +++ b/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb @@ -6,10 +6,9 @@ module AdvancedBilling # SubscriptionGroupInvoiceAccountController class SubscriptionGroupInvoiceAccountController < BaseController - # A prepayment can be added for a subscription group identified by the - # group's `uid`. This endpoint requires a `amount`, `details`, `method`, and - # `memo`. On success, the prepayment will be added to the group's prepayment - # balance. + # Adds a prepayment for a subscription group. This endpoint requires an + # `amount`, `details`, `method`, and `memo`. On success, the prepayment will + # be added to the group's prepayment balance. # @param [String] uid Required parameter: The uid of the subscription # group # @param [SubscriptionGroupPrepaymentRequest] body Optional parameter: TODO: @@ -39,7 +38,7 @@ def create_subscription_group_prepayment(uid, .execute end - # This request will list a subscription group's prepayments. + # Lists a subscription group's prepayments. # @param [String] uid Required parameter: The uid of the subscription # group # @param [Integer] page Optional parameter: Result records are organized in @@ -79,10 +78,9 @@ def list_prepayments_for_subscription_group(options = {}) .execute end - # Credit can be issued for a subscription group identified by the group's - # `uid`. Credit will be added to the group in the amount specified in the - # request body. The credit will be applied to group member invoices as they - # are generated. + # Issues service credit for a subscription group. Credit will be added to + # the group in the amount specified in the request body. The credit will be + # applied to group member invoices as they are generated. # @param [String] uid Required parameter: The uid of the subscription # group # @param [IssueServiceCreditRequest] body Optional parameter: TODO: type @@ -112,9 +110,8 @@ def issue_subscription_group_service_credit(uid, .execute end - # Credit can be deducted for a subscription group identified by the group's - # `uid`. Credit will be deducted from the group in the amount specified in - # the request body. + # Deducts service credit for a subscription group. Credit will be deducted + # from the group in the amount specified in the request body. # @param [String] uid Required parameter: The uid of the subscription # group # @param [DeductServiceCreditRequest] body Optional parameter: TODO: type diff --git a/lib/advanced_billing/controllers/subscription_group_status_controller.rb b/lib/advanced_billing/controllers/subscription_group_status_controller.rb index 34316d5..1eca8c8 100644 --- a/lib/advanced_billing/controllers/subscription_group_status_controller.rb +++ b/lib/advanced_billing/controllers/subscription_group_status_controller.rb @@ -41,9 +41,9 @@ def cancel_subscriptions_in_group(uid, .execute end - # This endpoint will schedule all subscriptions within the specified group - # to be canceled at the end of their billing period. The group is identified - # by its uid passed in the URL. + # Schedules all subscriptions within the specified group to be canceled at + # the end of their billing period. The group is identified by its uid passed + # in the URL. # All subscriptions in the group must be on automatic billing in order to # successfully cancel them, and the group must not be in a "past_due" state. # @param [String] uid Required parameter: The uid of the subscription @@ -67,6 +67,7 @@ def initiate_delayed_cancellation_for_group(uid) .execute end + # Removes the delayed cancellation on a subscription group. # Removing the delayed cancellation on a subscription group will ensure that # the subscriptions do not get canceled at the end of the period. The # request will reset the `cancel_at_end_of_period` flag to false on each @@ -92,12 +93,12 @@ def cancel_delayed_cancellation_for_group(uid) .execute end - # This endpoint will attempt to reactivate or resume a cancelled - # subscription group. Upon reactivation, any canceled invoices created after - # the beginning of the primary subscription's billing period will be - # reopened and payment will be attempted on them. If the subscription group - # is being reactivated (as opposed to resumed), new charges will also be - # assessed for the new billing period. + # Reactivates or resumes a cancelled subscription group. Upon reactivation, + # any canceled invoices created after the beginning of the primary + # subscription's billing period will be reopened and payment will be + # attempted on them. If the subscription group is being reactivated (as + # opposed to resumed), new charges will also be assessed for the new billing + # period. # Whether a subscription group is reactivated (a new billing period is # created) or resumed (the current billing period is respected) will depend # on the parameters that are sent with the request as well as the date of @@ -106,11 +107,11 @@ def cancel_delayed_cancellation_for_group(uid) # If a subscription group is cancelled and reactivated within the primary # subscription's current period, we can choose to either start a new billing # period or maintain the existing one. If we want to maintain the existing - # billing period the `resume=true` option must be passed in request + # billing period, the `resume=true` option must be passed in request # parameters. # An exception to the above are subscriptions that are on calendar billing. # These subscriptions cannot be reactivated within the current period. If - # the `resume=true` option is not passed the request will return an error. + # the `resume=true` option is not passed, the request will return an error. # The `resume_members` option is ignored in this case. All eligible group # members will be automatically resumed. # ## Reactivating beyond the current period @@ -125,6 +126,15 @@ def cancel_delayed_cancellation_for_group(uid) # For calendar billing subscriptions, the new billing period created will be # a partial one, spanning from the date of reactivation to the next # corresponding calendar renewal date. + # ## 3D Secure (3DS) Authentication post-authentication flow + # When a payment requires 3DS Authentication to adhere to Strong Customer + # Authentication (SCA), the request enters a post-authentication flow where + # a 422 Unprocessable Entity status is returned with an action_link that + # will direct the customer through 3DS Authentication. + # See the [3D Secure Post-Authentication + # Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Po + # st-Authentication-Flow) article in the product documentation to learn how + # to manage the redirect flow. # @param [String] uid Required parameter: The uid of the subscription # group # @param [ReactivateSubscriptionGroupRequest] body Optional parameter: TODO: diff --git a/lib/advanced_billing/controllers/subscription_groups_controller.rb b/lib/advanced_billing/controllers/subscription_groups_controller.rb index 74ae982..ea30b65 100644 --- a/lib/advanced_billing/controllers/subscription_groups_controller.rb +++ b/lib/advanced_billing/controllers/subscription_groups_controller.rb @@ -6,8 +6,8 @@ module AdvancedBilling # SubscriptionGroupsController class SubscriptionGroupsController < BaseController - # Create multiple subscriptions at once under the same customer and - # consolidate them into a subscription group. + # Creates multiple subscriptions at once under the same customer and + # consolidates them into a subscription group. # You must provide one and only one of the # `payer_id`/`payer_reference`/`payer_attributes` for the customer attached # to the group. @@ -15,13 +15,14 @@ class SubscriptionGroupsController < BaseController # `payment_profile_id`/`credit_card_attributes`/`bank_account_attributes` # for the payment profile attached to the group. # Only one of the `subscriptions` can have `"primary": true` attribute set. - # When passing product to a subscription you can use either `product_id` or - # `product_handle` or `offer_id`. You can also use `custom_price` instead. + # When passing a product to a subscription you can use either `product_id` + # or `product_handle` or `offer_id`. You can also use `custom_price` + # instead. # The subscription request examples below will be split into two sections. # The first section, "Subscription Customization", will focus on passing # different information with a subscription, such as components, calendar # billing, and custom fields. These examples will presume you are using a - # secure chargify_token generated by Chargify.js. + # secure chargify_token generated by Maxio.js (formerly Chargify.js). # @param [SubscriptionGroupSignupRequest] body Optional parameter: TODO: # type description here # @return [SubscriptionGroupSignupResponse] Response from the API call. @@ -108,7 +109,7 @@ def list_subscription_groups(options = {}) .execute end - # Use this endpoint to find subscription group details. + # Returns subscription group details. # #### Current Billing Amount in Cents # Current billing amount for the subscription group is not returned by # default. If this information is desired, the @@ -139,11 +140,11 @@ def read_subscription_group(uid, .execute end - # Use this endpoint to update subscription group members. + # Updates subscription group members. # `"member_ids"` should contain an array of both subscription IDs to set as # group members and subscription IDs already present in the groups. Not - # including them will result in removing them from subscription group. To - # clean up members, just leave the array empty. + # including them will result in removing them from the subscription group. + # To clean up members, just leave the array empty. # @param [String] uid Required parameter: The uid of the subscription # group # @param [UpdateSubscriptionGroupRequest] body Optional parameter: TODO: @@ -197,8 +198,9 @@ def delete_subscription_group(uid) .execute end - # Use this endpoint to find subscription group associated with subscription. - # If the subscription is not in a group endpoint will return 404 code. + # Finds the subscription group associated with a subscription. + # If the subscription is not in a group, the endpoint will return a 404 + # code. # @param [String] subscription_id Required parameter: The Advanced Billing # id of the subscription associated with the subscription group # @return [FullSubscriptionGroupResponse] Response from the API call. @@ -280,7 +282,7 @@ def add_subscription_to_group(subscription_id, # ed-Billing-Invoices-Overview) and [Customer # Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Cust # omer-Hierarchies-WhoPays#customer-hierarchies) features, it is possible to - # remove existing subscription from subscription group. + # remove an existing subscription from a subscription group. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @return [void] Response from the API call. diff --git a/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb b/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb index d078bd5..925e1a0 100644 --- a/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +++ b/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb @@ -28,7 +28,7 @@ def read_account_balances(subscription_id) .execute end - # ## Create Prepayment + # Creates a prepayment for a subscription. # In order to specify a prepayment made against a subscription, specify the # `amount, memo, details, method`. # When the `method` specified is `"credit_card_on_file"`, the prepayment @@ -36,6 +36,15 @@ def read_account_balances(subscription_id) # applied to the prepayment account balance. This is especially useful for # manual replenishment of prepaid subscriptions. # Note that passing `amount_in_cents` is now allowed. + # ## 3D Secure (3DS) Authentication post-authentication flow + # When a payment requires 3DS Authentication to adhere to Strong Customer + # Authentication (SCA), the request enters a post-authentication flow where + # a 422 Unprocessable Entity status is returned with an action_link that + # will direct the customer through 3DS Authentication. + # See the [3D Secure Post-Authentication + # Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Po + # st-Authentication-Flow) article in the product documentation to learn how + # to manage the redirect flow. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [CreatePrepaymentRequest] body Optional parameter: TODO: type @@ -65,7 +74,7 @@ def create_prepayment(subscription_id, .execute end - # This request will list a subscription's prepayments. + # Lists a subscription's prepayments. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [Integer] page Optional parameter: Result records are organized in @@ -105,9 +114,8 @@ def list_prepayments(options = {}) .execute end - # Credit will be added to the subscription in the amount specified in the - # request body. The credit is subsequently applied to the next generated - # invoice. + # Adds a service credit to the subscription in the specified amount. The + # credit is subsequently applied to the next generated invoice. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [IssueServiceCreditRequest] body Optional parameter: TODO: type @@ -137,9 +145,9 @@ def issue_service_credit(subscription_id, .execute end - # Credit will be removed from the subscription in the amount specified in - # the request body. The credit amount being deducted must be equal to or - # less than the current credit balance. + # Deducts a service credit from the subscription in the specified amount. + # The credit amount being deducted must be equal to or less than the current + # credit balance. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [DeductServiceCreditRequest] body Optional parameter: TODO: type @@ -167,7 +175,7 @@ def deduct_service_credit(subscription_id, .execute end - # This request will list a subscription's service credits. + # Lists a subscription's service credits. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [Integer] page Optional parameter: Result records are organized in @@ -213,10 +221,10 @@ def list_service_credits(subscription_id, .execute end - # This endpoint will refund, completely or partially, a particular - # prepayment applied to a subscription. The `prepayment_id` will be the - # account transaction ID of the original payment. The prepayment must have - # some amount remaining in order to be refunded. + # Refunds a prepayment applied to a subscription, either fully or partially. + # The `prepayment_id` will be the account transaction ID of the original + # payment. The prepayment must have some amount remaining in order to be + # refunded. # The amount may be passed either as a decimal, with `amount`, or an integer # in cents, with `amount_in_cents`. # @param [Integer] subscription_id Required parameter: The Chargify id of diff --git a/lib/advanced_billing/controllers/subscription_notes_controller.rb b/lib/advanced_billing/controllers/subscription_notes_controller.rb index b5d4892..0b43c6e 100644 --- a/lib/advanced_billing/controllers/subscription_notes_controller.rb +++ b/lib/advanced_billing/controllers/subscription_notes_controller.rb @@ -6,7 +6,7 @@ module AdvancedBilling # SubscriptionNotesController class SubscriptionNotesController < BaseController - # Use the following method to create a note for a subscription. + # Creates a note for a subscription. # ## How to Use Subscription Notes # Notes allow you to record information about a particular Subscription in a # free text format. @@ -45,8 +45,8 @@ def create_subscription_note(subscription_id, .execute end - # Use this method to retrieve a list of Notes associated with a - # Subscription. The response will be an array of Notes. + # Retrieves a list of notes associated with a subscription. The response + # will be an array of Notes. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [Integer] page Optional parameter: Result records are organized in @@ -84,8 +84,7 @@ def list_subscription_notes(options = {}) .execute end - # Once you have obtained the ID of the note you wish to read, use this - # method to show a particular note attached to a subscription. + # Retrieves a specific note attached to a subscription. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [Integer] note_id Required parameter: The Advanced Billing id of @@ -111,7 +110,7 @@ def read_subscription_note(subscription_id, .execute end - # Use the following method to update a note for a Subscription. + # Updates a note for a subscription. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [Integer] note_id Required parameter: The Advanced Billing id of diff --git a/lib/advanced_billing/controllers/subscription_products_controller.rb b/lib/advanced_billing/controllers/subscription_products_controller.rb index 8dbeb29..8ab5ac5 100644 --- a/lib/advanced_billing/controllers/subscription_products_controller.rb +++ b/lib/advanced_billing/controllers/subscription_products_controller.rb @@ -6,6 +6,7 @@ module AdvancedBilling # SubscriptionProductsController class SubscriptionProductsController < BaseController + # Migrates a subscription to a different product. # In order to create a migration, you must pass the `product_id` or # `product_handle` in the object when you send a POST request. You may also # pass either a `product_price_point_id` or `product_price_point_handle` to @@ -26,78 +27,17 @@ class SubscriptionProductsController < BaseController # [here](https://maxio.zendesk.com/hc/en-us/articles/24181589372429-Data-Mig # ration-to-Advanced-Billing). # ## Failed Migrations - # Importaint note: One of the most common ways that a migration can fail is + # Important note: One of the most common ways that a migration can fail is # when the attempt is made to migrate a subscription to its current product. - # ## Migration 3D Secure - Stripe - # When a payment requires 3D Secure Authentication to adhear to Strong - # Customer Authentication (SCA) when the subscription is migrated to a new - # product, the request enters a [post-authentication - # flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-I - # mplementing-3D-Secure#psd2-flows-pre-authentication-and-post-authenticatio - # n). The server returns `422 Unprocessable Entity` in this case with the - # following response: - # ```json - # { - # "errors": [ - # "Your card was declined. This transaction requires 3D secure - # 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=https://you - # rpage.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_time_t - # oken_id=242" - # } - # ``` - # To let the customer go through 3D Secure Authentication, they need to be - # redirected to the URL specified in `action_link`. - # Optionally, you can specify `callback_url` parameter in the `action_link` - # URL if you’d like to be notified about the result of 3D Secure - # Authentication. The `callback_url` will return the following information: - # - whether the authentication was successful (`success`) - # - the gateway ID for the payment (`gateway_payment_id`) - # - the subscription ID (`subscription_id`) - # Lastly, you can also specify a `redirect_url` within the `action_link` URL - # if you’d like to redirect a customer back to your site. - # It is not possible to use `action_link` in an iframe inside a custom - # application. You have to redirect the customer directly to the - # `action_link`, then, to be notified about the result, use `redirect_url` - # or `callback_url`. - # The final URL that you send a customer to to complete 3D Secure may - # resemble the following, where the first half is the `action_link` and the - # second half contains a `redirect_url` and `callback_url`: - # `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_tim - # e_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yo - # urpage.com` - # ### Example Redirect Flow - # You may wish to redirect customers to different pages depending on whether - # SCA was performed successfully. Here's an example flow to use as a - # reference: - # 1. Create a migration via API; it requires 3DS - # 2. You receive a `gateway_payment_id` in the `action_link` along other - # params in the response. - # 3. Use this `gateway_payment_id` to, for example, connect with your - # internal resources or generate a session_id - # 4. Include 1 of those attributes inside the `callback_url` and - # `redirect_url` to be aware which “session” this applies to - # 5. Redirect the customer to the `action_link` with `callback_url` and - # `redirect_url` applied - # 6. After the customer finishes 3DS authentication, we let you know the - # result by making a request to applied `callback_url`. - # 7. After that, we redirect the customer to the `redirect_url`; at this - # point the result of authentication is known - # 8. Optionally, you can use the applied "msg" param in the `redirect_url` - # to determine whether it was successful or not. + # ## 3D Secure (3DS) Authentication post-authentication flow + # When a payment requires 3DS Authentication to adhere to Strong Customer + # Authentication (SCA), the request enters a post-authentication flow where + # a 422 Unprocessable Entity status is returned with an action_link that + # will direct the customer through 3DS Authentication. + # See the [3D Secure Post-Authentication + # Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Po + # st-Authentication-Flow) article in the product documentation to learn how + # to manage the redirect flow. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [SubscriptionProductMigrationRequest] body Optional parameter: @@ -127,11 +67,13 @@ def migrate_subscription_product(subscription_id, .execute end + # Previews the charges resulting from migrating a subscription to a + # different product. # ## Previewing a future date # It is also possible to preview the migration for a date in the future, as # long as it's still within the subscription's current billing period, by - # passing a `proration_date` along with the request (eg: `"proration_date": - # "2020-12-18T18:25:43.511Z"`). + # passing a `proration_date` along with the request (e.g., + # `"proration_date": "2020-12-18T18:25:43.511Z"`). # This will calculate the prorated adjustment, charge, payment and credit # applied values assuming the migration is done at that date in the future # as opposed to right now. diff --git a/lib/advanced_billing/controllers/subscription_status_controller.rb b/lib/advanced_billing/controllers/subscription_status_controller.rb index 3da7957..275283a 100644 --- a/lib/advanced_billing/controllers/subscription_status_controller.rb +++ b/lib/advanced_billing/controllers/subscription_status_controller.rb @@ -6,12 +6,17 @@ module AdvancedBilling # SubscriptionStatusController class SubscriptionStatusController < BaseController - # Advanced Billing offers the ability to retry collecting the balance due on - # a past due Subscription without waiting for the next scheduled attempt. - # ## Successful Reactivation - # The response will be `200 OK` with the updated Subscription. - # ## Failed Reactivation - # The response will be `422 "Unprocessable Entity`. + # Retries collecting the balance due on a past-due subscription without + # waiting for the next scheduled attempt. + # ## 3D Secure (3DS) Authentication post-authentication flow + # When a payment requires 3DS Authentication to adhere to Strong Customer + # Authentication (SCA), the request enters a post-authentication flow where + # a 422 Unprocessable Entity status is returned with an action_link that + # will direct the customer through 3DS Authentication. + # See the [3D Secure Post-Authentication + # Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Po + # st-Authentication-Flow) article in the product documentation to learn how + # to manage the redirect flow. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @return [SubscriptionResponse] Response from the API call. @@ -72,7 +77,7 @@ def cancel_subscription(subscription_id, .execute end - # Resume a paused (on-hold) subscription. If the normal next renewal date + # Resumes a paused (on-hold) subscription. If the normal next renewal date # has not passed, the subscription will return to active and will renew on # that date. Otherwise, it will behave like a reactivation, setting the # billing date to 'now' and charging the subscriber. @@ -104,8 +109,7 @@ def resume_subscription(subscription_id, .execute end - # This will place the subscription in the on_hold state and it will not - # renew. + # Places the subscription on hold, preventing it from renewing. # ## Limitations # You may not place a subscription on hold if the `next_billing_at` date is # within 24 hours. @@ -138,13 +142,12 @@ def pause_subscription(subscription_id, .execute end - # Once a subscription has been paused / put on hold, you can update the date - # which was specified to automatically resume the subscription. + # Updates the date on which a paused subscription will automatically resume. # To update a subscription's resume date, use this method to change or # update the `automatically_resume_at` date. # ### Remove the resume date - # Alternately, you can change the `automatically_resume_at` to `null` if you - # would like the subscription to not have a resume date. + # Alternatively, you can change the `automatically_resume_at` to `null` if + # you would like the subscription to not have a resume date. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [PauseRequest] body Optional parameter: TODO: type description @@ -174,7 +177,7 @@ def update_automatic_subscription_resumption(subscription_id, .execute end - # Reactivate a previously canceled subscription. For details on how the + # Reactivates a previously canceled subscription. For details on how the # reactivation works, and how to reactivate subscriptions through the # application, see # [reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629- @@ -205,10 +208,10 @@ def update_automatic_subscription_resumption(subscription_id, # have been the next billing date of July 1st, then Advanced Billing would # not resume the subscription, and instead it would be reactivated with a # new billing period. - # If a reactivation with `resume: false`, or where 'resume" is omited were + # If a reactivation with `resume: false`, or where 'resume' is omitted were # attempted, then Advanced Billing would reactivate the subscription with a # new billing period regardless of whether or not resuming the previous - # billing period were possible. + # billing period was possible. # | Canceled | Reactivation | Resumable? | # |---|---|---| # | Jun 15 | June 28 | Yes | @@ -315,6 +318,15 @@ def update_automatic_subscription_resumption(subscription_id, # + The subscription will transition to active # + The next billing date should not have changed # + Any product-related charges should have been collected + # ## 3D Secure (3DS) Authentication post-authentication flow + # When a payment requires 3DS Authentication to adhere to Strong Customer + # Authentication (SCA), the request enters a post-authentication flow where + # a 422 Unprocessable Entity status is returned with an action_link that + # will direct the customer through 3DS Authentication. + # See the [3D Secure Post-Authentication + # Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Po + # st-Authentication-Flow) article in the product documentation to learn how + # to manage the redirect flow. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [ReactivateSubscriptionRequest] body Optional parameter: TODO: type @@ -380,9 +392,9 @@ def initiate_delayed_cancellation(subscription_id, .execute end - # Removing the delayed cancellation on a subscription will ensure that it - # doesn't get canceled at the end of the period that it is in. The request - # will reset the `cancel_at_end_of_period` flag to `false`. + # Removes the delayed cancellation from a subscription, ensuring it is not + # canceled at the end of the current period. The request will reset the + # `cancel_at_end_of_period` flag to `false`. # This endpoint is idempotent. If the subscription was not set to cancel in # the future, removing the delayed cancellation has no effect and the call # will be successful. @@ -408,8 +420,8 @@ def cancel_delayed_cancellation(subscription_id) .execute end - # If a subscription is currently in dunning, the subscription will be set to - # active and the active Dunner will be resolved. + # Cancels the active dunning process for a subscription and sets it to + # active. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @return [SubscriptionResponse] Response from the API call. @@ -433,10 +445,10 @@ def cancel_dunning(subscription_id) .execute end - # The Chargify API allows you to preview a renewal by posting to the - # renewals endpoint. Renewal Preview is an object representing a - # subscription’s next assessment. You can retrieve it to see a snapshot of - # how much your customer will be charged on their next renewal. + # Previews a subscription’s next renewal assessment. Renewal Preview is an + # object representing a subscription’s next assessment. You can retrieve it + # to see a snapshot of how much your customer will be charged on their next + # renewal. # The "Next Billing" amount and "Next Billing" date are already represented # in the UI on each Subscriber's Summary. For more information, see our # documentation diff --git a/lib/advanced_billing/controllers/subscriptions_controller.rb b/lib/advanced_billing/controllers/subscriptions_controller.rb index c966c6f..a544a46 100644 --- a/lib/advanced_billing/controllers/subscriptions_controller.rb +++ b/lib/advanced_billing/controllers/subscriptions_controller.rb @@ -6,9 +6,9 @@ module AdvancedBilling # SubscriptionsController class SubscriptionsController < BaseController - # Creates a Subscription for a customer and product + # Creates a Subscription for a customer and product. # Specify the product with `product_id` or `product_handle`. To set a - # specific product pricepPoint, use `product_price_point_handle` or + # specific product price point, use `product_price_point_handle` or # `product_price_point_id`. # Identify an existing customer with `customer_id` or `customer_reference`. # Optionally, include an existing payment profile using @@ -16,6 +16,10 @@ class SubscriptionsController < BaseController # Select an option from the **Request Examples** drop-down on the right side # of the portal to see examples of common scenarios for creating # subscriptions. + # See the [Subscription + # Signups](page:introduction/basic-concepts/subscription-signup) article for + # more information on working with subscriptions in Advanced Billing. + # ## Payment information # Payment information may be required to create a subscription, depending on # the options for the Product being subscribed. See [product # options](https://docs.maxio.com/hc/en-us/articles/24261076617869-Edit-Prod @@ -30,13 +34,19 @@ class SubscriptionsController < BaseController # [PCI # compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Co # mpliance#pci-compliance-0-0) on your end. If your business is not PCI - # compliant, use - # [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Char + # compliant, use [Maxio.js (formerly + # Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Char # gify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank # account information. - # See the [Subscription - # Signups](page:introduction/basic-concepts/subscription-signup) article for - # more information on working with subscriptions in Advanced Billing. + # ## 3D Secure (3DS) Authentication post-authentication flow + # When a payment requires 3DS Authentication to adhere to Strong Customer + # Authentication (SCA), the request enters a post-authentication flow where + # a 422 Unprocessable Entity status is returned with an action_link that + # will direct the customer through 3DS Authentication. + # See the [3D Secure Post-Authentication + # Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Po + # st-Authentication-Flow) article in the product documentation to learn how + # to manage the redirect flow. # @param [CreateSubscriptionRequest] body Optional parameter: TODO: type # description here # @return [SubscriptionResponse] Response from the API call. @@ -60,7 +70,7 @@ def create_subscription(body: nil) .execute end - # returns an array of subscriptions from a Site. Pay close attention to + # Returns an array of subscriptions from a Site. Pay close attention to # query string filters and pagination in order to control responses from the # server. # ## Search for a subscription @@ -209,28 +219,28 @@ def list_subscriptions(options = {}) # > **Note:** To cancel a delayed product change, set `next_product_id` to # an empty string. # ## Billing Date Changes - # You can update dates for a subscrption. + # You can update dates for a subscription. # ### Regular Billing Date Changes # Send the `next_billing_at` to set the next billing date for the # subscription. After that date passes and the subscription is processed, # the following billing date will be set according to the subscription's # product period. # > Note: If you pass an invalid date, the correct date is automatically set - # to he correct date. For example, if February 30 is passed, the next + # to the correct date. For example, if February 30 is passed, the next # billing would be set to March 2nd in a non-leap year. # The server response will not return data under the key/value pair of # `next_billing_at`. View the key/value pair of `current_period_ends_at` to # verify that the `next_billing_at` date has been changed successfully. - # ### Calendar Billing and Snap Day Changes + # ### Calendar Billing and Snap Day Changes # For a subscription using Calendar Billing, setting the next billing date # is a bit different. Send the `snap_day` attribute to change the calendar # billing date for **a subscription using a product eligible for calendar # billing**. # > Note: If you change the product associated with a subscription that # contains a `snap_day` and immediately `READ/GET` the subscription data, it - # will still contain original `snap_day`. The `snap_day`will will reset to - # 'null on the next billing cycle. This is because a product change is - # instantanous and only affects the product associated with a subscription. + # will still contain original `snap_day`. The `snap_day` will reset to null + # on the next billing cycle. This is because a product change is + # instantaneous and only affects the product associated with a subscription. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [UpdateSubscriptionRequest] body Optional parameter: TODO: type @@ -290,10 +300,9 @@ def read_subscription(subscription_id, .execute end - # This API endpoint allows you to set certain subscription fields that are - # usually managed for you automatically. Some of the fields can be set via - # the normal Subscriptions Update API, but others can only be set using this - # endpoint. + # Sets certain subscription fields that are usually managed automatically. + # Some of the fields can be set via the normal Subscriptions Update API, but + # others can only be set using this endpoint. # This endpoint is provided for cases where you need to “align” Advanced # Billing data with data that happened in your system, perhaps before you # started using Advanced Billing. For example, you may choose to import your @@ -349,7 +358,7 @@ def override_subscription(subscription_id, .execute end - # Use this endpoint to find a subscription by its reference. + # Finds a subscription by its reference. # @param [String] reference Optional parameter: Subscription reference # @return [SubscriptionResponse] Response from the API call. def find_subscription(reference: nil) @@ -369,7 +378,7 @@ def find_subscription(reference: nil) .execute end - # For sites in test mode, you may purge individual subscriptions. + # Purges an individual subscription for sites in test mode. # Provide the subscription ID in the url. To confirm, supply the customer # ID in the query string `ack` parameter. You may also delete the customer # record and/or payment profiles by passing `cascade` parameters. For @@ -413,7 +422,7 @@ def purge_subscription(subscription_id, .execute end - # Use this endpoint to update a subscription's prepaid configuration. + # Updates a subscription's prepaid configuration. # @param [Integer] subscription_id Required parameter: The Chargify id of # the subscription. # @param [UpsertPrepaidConfigurationRequest] body Optional parameter: TODO: @@ -443,8 +452,8 @@ def update_prepaid_subscription_configuration(subscription_id, .execute end - # The Chargify API allows you to preview a subscription by POSTing the same - # JSON or XML as for a subscription creation. + # Previews a subscription by POSTing the same JSON or XML as for a + # subscription creation. # The "Next Billing" amount and "Next Billing" date are represented in each # Subscriber's Summary. # A subscription will not be created by utilizing this endpoint; it is meant @@ -497,6 +506,7 @@ def preview_subscription(body: nil) .execute end + # Applies one or more coupon codes to an existing subscription. # An existing subscription can accommodate multiple discounts/coupon codes. # This is only applicable if each coupon is stackable. For more information # on stackable coupons, we recommend reviewing our [coupon @@ -543,9 +553,9 @@ def apply_coupons_to_subscription(subscription_id, .execute end - # Use this endpoint to remove a coupon from an existing subscription. - # For more information on the expected behaviour of removing a coupon from a - # subscription, See our documentation + # Removes a coupon from an existing subscription. + # For more information on the expected behavior of removing a coupon from a + # subscription, see our documentation # [here.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons # -and-Subscriptions#removing-a-coupon) # @param [Integer] subscription_id Required parameter: The Chargify id of @@ -574,10 +584,9 @@ def remove_coupon_from_subscription(subscription_id, .execute end - # Advanced Billing offers the ability to activate awaiting signup and - # trialing subscriptions. This feature is only available on the Relationship - # Invoicing architecture. Subscriptions in a group may not be activated - # immediately. + # Activates awaiting signup and trialing subscriptions. This feature is only + # available on the Relationship Invoicing architecture. Subscriptions in a + # group may not be activated immediately. # For details on how the activation works, and how to activate subscriptions # through the application, see [activation](#). # The `revert_on_failure` parameter controls the behavior upon activation diff --git a/lib/advanced_billing/controllers/webhooks_controller.rb b/lib/advanced_billing/controllers/webhooks_controller.rb index 6bfc885..3a731aa 100644 --- a/lib/advanced_billing/controllers/webhooks_controller.rb +++ b/lib/advanced_billing/controllers/webhooks_controller.rb @@ -6,8 +6,8 @@ module AdvancedBilling # WebhooksController class WebhooksController < BaseController - # Allows you to view a list of webhooks. You can pass query parameters if - # you want to filter webhooks. See the + # Retrieves a list of webhooks. You can pass query parameters if you want + # to filter webhooks. See the # [Webhooks](page:introduction/webhooks/webhooks) documentation for more # information. # @param [WebhookStatus] status Optional parameter: Webhooks with matching @@ -55,7 +55,7 @@ def list_webhooks(options = {}) .execute end - # Allows you to enable webhooks for your site + # Enables webhooks for your site. # @param [EnableWebhooksRequest] body Optional parameter: TODO: type # description here # @return [EnableWebhooksResponse] Response from the API call. @@ -98,7 +98,7 @@ def replay_webhooks(body: nil) .execute end - # Creates an endpoint and assigns a list of webhooks subscriptions (events) + # Creates an endpoint and assigns a list of webhook subscriptions (events) # to it. # See the [Webhooks # Reference](page:introduction/webhooks/webhooks-reference#events) page for @@ -149,7 +149,7 @@ def list_endpoints # Always send a complete list of events to which you want to subscribe. # Sending a PUT request for an existing endpoint with an empty list of # `webhook_subscriptions` will unsubscribe all events. - # If you want unsubscribe from a specific event, send a list of + # If you want to unsubscribe from a specific event, send a list of # `webhook_subscriptions` without the specific event key. # @param [Integer] endpoint_id Required parameter: The Advanced Billing id # for the endpoint that should be updated diff --git a/lib/advanced_billing/models/activate_event_based_component.rb b/lib/advanced_billing/models/activate_event_based_component.rb index 0c58ff1..1305984 100644 --- a/lib/advanced_billing/models/activate_event_based_component.rb +++ b/lib/advanced_billing/models/activate_event_based_component.rb @@ -13,9 +13,10 @@ class ActivateEventBasedComponent < BaseModel # @return [Integer] attr_accessor :price_point_id - # This attribute is particularly useful when you need to align billing - # events for different components on distinct schedules within a - # subscription. This only works for site with Multifrequency enabled. + # Billing schedule settings for component allocations or usages on + # multi-frequency subscriptions. Use this to start a component's billing + # period on a custom date instead of aligning with the product charge + # schedule. # @return [BillingSchedule] attr_accessor :billing_schedule diff --git a/lib/advanced_billing/models/bank_account_payment_profile.rb b/lib/advanced_billing/models/bank_account_payment_profile.rb index e67a0bd..e8efffa 100644 --- a/lib/advanced_billing/models/bank_account_payment_profile.rb +++ b/lib/advanced_billing/models/bank_account_payment_profile.rb @@ -34,7 +34,7 @@ class BankAccountPaymentProfile < BaseModel # @return [BankAccountVault] attr_accessor :current_vault - # The “token” provided by your vault storage for an already stored payment + # The "token" provided by your vault storage for an already stored payment # profile # @return [String] attr_accessor :vault_token @@ -73,13 +73,13 @@ class BankAccountPaymentProfile < BaseModel attr_accessor :bank_name # A string representation of the stored bank routing number with all but the - # last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’). payment_type will be + # last 4 digits marked with X's (i.e. 'XXXXXXX1111'). payment_type will be # bank_account # @return [String] attr_accessor :masked_bank_routing_number # A string representation of the stored bank account number with all but the - # last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’) + # last 4 digits marked with X's (i.e. 'XXXXXXX1111') # @return [String] attr_accessor :masked_bank_account_number @@ -166,6 +166,7 @@ def self.optionals billing_address_2 bank_name masked_bank_routing_number + masked_bank_account_number bank_account_type bank_account_holder_type verified @@ -186,20 +187,22 @@ def self.nullables billing_country customer_vault_token billing_address_2 + masked_bank_routing_number + masked_bank_account_number site_gateway_setting_id gateway_handle ] end - def initialize(masked_bank_account_number:, - payment_type: PaymentType::BANK_ACCOUNT, id: SKIP, + def initialize(payment_type: PaymentType::BANK_ACCOUNT, id: SKIP, first_name: SKIP, last_name: SKIP, customer_id: SKIP, current_vault: SKIP, vault_token: SKIP, billing_address: SKIP, billing_city: SKIP, billing_state: SKIP, billing_zip: SKIP, billing_country: SKIP, customer_vault_token: SKIP, billing_address_2: SKIP, bank_name: SKIP, - masked_bank_routing_number: SKIP, bank_account_type: SKIP, + masked_bank_routing_number: SKIP, + masked_bank_account_number: SKIP, bank_account_type: SKIP, bank_account_holder_type: SKIP, verified: false, site_gateway_setting_id: SKIP, gateway_handle: SKIP, created_at: SKIP, updated_at: SKIP, @@ -227,7 +230,10 @@ def initialize(masked_bank_account_number:, @masked_bank_routing_number = masked_bank_routing_number end - @masked_bank_account_number = masked_bank_account_number + unless masked_bank_account_number == SKIP + @masked_bank_account_number = + masked_bank_account_number + end @bank_account_type = bank_account_type unless bank_account_type == SKIP @bank_account_holder_type = bank_account_holder_type unless bank_account_holder_type == SKIP @payment_type = payment_type @@ -243,8 +249,6 @@ def self.from_hash(hash) return nil unless hash # Extract variables from the hash. - masked_bank_account_number = - hash.key?('masked_bank_account_number') ? hash['masked_bank_account_number'] : nil payment_type = hash['payment_type'] ||= PaymentType::BANK_ACCOUNT id = hash.key?('id') ? hash['id'] : SKIP first_name = hash.key?('first_name') ? hash['first_name'] : SKIP @@ -266,6 +270,8 @@ def self.from_hash(hash) bank_name = hash.key?('bank_name') ? hash['bank_name'] : SKIP masked_bank_routing_number = hash.key?('masked_bank_routing_number') ? hash['masked_bank_routing_number'] : SKIP + masked_bank_account_number = + hash.key?('masked_bank_account_number') ? hash['masked_bank_account_number'] : SKIP bank_account_type = hash.key?('bank_account_type') ? hash['bank_account_type'] : SKIP bank_account_holder_type = @@ -290,8 +296,7 @@ def self.from_hash(hash) additional_properties = hash.reject { |k, _| names.value?(k) } # Create object from extracted values. - BankAccountPaymentProfile.new(masked_bank_account_number: masked_bank_account_number, - payment_type: payment_type, + BankAccountPaymentProfile.new(payment_type: payment_type, id: id, first_name: first_name, last_name: last_name, @@ -307,6 +312,7 @@ def self.from_hash(hash) billing_address_2: billing_address_2, bank_name: bank_name, masked_bank_routing_number: masked_bank_routing_number, + masked_bank_account_number: masked_bank_account_number, bank_account_type: bank_account_type, bank_account_holder_type: bank_account_holder_type, verified: verified, @@ -329,22 +335,14 @@ def to_custom_updated_at # @param [BankAccountPaymentProfile | Hash] The value against the validation is performed. def self.validate(value) if value.instance_of? self - return ( - APIHelper.valid_type?(value.masked_bank_account_number, - ->(val) { val.instance_of? String }) and - APIHelper.valid_type?(value.payment_type, - ->(val) { PaymentType.validate(val) }) - ) + return APIHelper.valid_type?(value.payment_type, + ->(val) { PaymentType.validate(val) }) end return false unless value.instance_of? Hash - ( - APIHelper.valid_type?(value['masked_bank_account_number'], - ->(val) { val.instance_of? String }) and - APIHelper.valid_type?(value['payment_type'], - ->(val) { PaymentType.validate(val) }) - ) + APIHelper.valid_type?(value['payment_type'], + ->(val) { PaymentType.validate(val) }) end # Provides a human-readable string representation of the object. diff --git a/lib/advanced_billing/models/billing_schedule.rb b/lib/advanced_billing/models/billing_schedule.rb index 1e21971..1d8d1ec 100644 --- a/lib/advanced_billing/models/billing_schedule.rb +++ b/lib/advanced_billing/models/billing_schedule.rb @@ -4,16 +4,18 @@ # APIMATIC v3.0 ( https://www.apimatic.io ). module AdvancedBilling - # This attribute is particularly useful when you need to align billing events - # for different components on distinct schedules within a subscription. This - # only works for site with Multifrequency enabled. + # Billing schedule settings for component allocations or usages on + # multi-frequency subscriptions. Use this to start a component's billing + # period on a custom date instead of aligning with the product charge + # schedule. class BillingSchedule < BaseModel SKIP = Object.new private_constant :SKIP - # The initial_billing_at attribute in Maxio allows you to specify a custom - # starting date for billing cycles associated with components that have - # their own billing frequency set. Only ISO8601 format is supported. + # Custom start date (ISO 8601 date, YYYY-MM-DD) for the component's first + # billing period. If omitted or null, billing aligns with the product + # schedule. If provided, date must be on or after the minimum allowed date + # for the subscription or component. # @return [Date] attr_accessor :initial_billing_at @@ -33,7 +35,9 @@ def self.optionals # An array for nullable fields def self.nullables - [] + %w[ + initial_billing_at + ] end def initialize(initial_billing_at: SKIP, additional_properties: {}) diff --git a/lib/advanced_billing/models/chjs_tokenization_failure.rb b/lib/advanced_billing/models/chjs_tokenization_failure.rb new file mode 100644 index 0000000..a42d7d7 --- /dev/null +++ b/lib/advanced_billing/models/chjs_tokenization_failure.rb @@ -0,0 +1,98 @@ +# advanced_billing +# +# This file was automatically generated for Maxio by +# APIMATIC v3.0 ( https://www.apimatic.io ). + +module AdvancedBilling + # ChjsTokenizationFailure Model. + class ChjsTokenizationFailure < BaseModel + SKIP = Object.new + private_constant :SKIP + + # TODO: Write general description for this method + # @return [String] + attr_accessor :errors + + # PCI-safe cardholder fields only. Full card numbers, CVV, and billing + # address are never included. + # @return [PaymentProfileParams] + attr_accessor :payment_profile_params + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['errors'] = 'errors' + @_hash['payment_profile_params'] = 'payment_profile_params' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + payment_profile_params + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(errors:, payment_profile_params: SKIP, + additional_properties: {}) + # Add additional model properties to the instance. + additional_properties.each do |_name, _value| + instance_variable_set("@#{_name}", _value) + end + + @errors = errors + @payment_profile_params = payment_profile_params unless payment_profile_params == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + errors = hash.key?('errors') ? hash['errors'] : nil + payment_profile_params = PaymentProfileParams.from_hash(hash['payment_profile_params']) if + hash['payment_profile_params'] + + # Clean out expected properties from Hash. + additional_properties = hash.reject { |k, _| names.value?(k) } + + # Create object from extracted values. + ChjsTokenizationFailure.new(errors: errors, + payment_profile_params: payment_profile_params, + additional_properties: additional_properties) + end + + # Validates an instance of the object from a given value. + # @param [ChjsTokenizationFailure | Hash] The value against the validation is performed. + def self.validate(value) + if value.instance_of? self + return APIHelper.valid_type?(value.errors, + ->(val) { val.instance_of? String }) + end + + return false unless value.instance_of? Hash + + APIHelper.valid_type?(value['errors'], + ->(val) { val.instance_of? String }) + end + + # Provides a human-readable string representation of the object. + def to_s + class_name = self.class.name.split('::').last + "<#{class_name} errors: #{@errors}, payment_profile_params: #{@payment_profile_params},"\ + " additional_properties: #{get_additional_properties}>" + end + + # Provides a debugging-friendly string with detailed object information. + def inspect + class_name = self.class.name.split('::').last + "<#{class_name} errors: #{@errors.inspect}, payment_profile_params:"\ + " #{@payment_profile_params.inspect}, additional_properties: #{get_additional_properties}>" + end + end +end diff --git a/lib/advanced_billing/models/chjs_tokenization_success.rb b/lib/advanced_billing/models/chjs_tokenization_success.rb new file mode 100644 index 0000000..88c79ba --- /dev/null +++ b/lib/advanced_billing/models/chjs_tokenization_success.rb @@ -0,0 +1,102 @@ +# advanced_billing +# +# This file was automatically generated for Maxio by +# APIMATIC v3.0 ( https://www.apimatic.io ). + +module AdvancedBilling + # ChjsTokenizationSuccess Model. + class ChjsTokenizationSuccess < BaseModel + SKIP = Object.new + private_constant :SKIP + + # TODO: Write general description for this method + # @return [TokenizedPaymentProfile] + attr_accessor :payment_profile + + # TODO: Write general description for this method + # @return [Integer] + attr_accessor :gateway_customer_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['payment_profile'] = 'payment_profile' + @_hash['gateway_customer_id'] = 'gateway_customer_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + gateway_customer_id + ] + end + + # An array for nullable fields + def self.nullables + %w[ + gateway_customer_id + ] + end + + def initialize(payment_profile:, gateway_customer_id: SKIP, + additional_properties: {}) + # Add additional model properties to the instance. + additional_properties.each do |_name, _value| + instance_variable_set("@#{_name}", _value) + end + + @payment_profile = payment_profile + @gateway_customer_id = gateway_customer_id unless gateway_customer_id == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + payment_profile = TokenizedPaymentProfile.from_hash(hash['payment_profile']) if + hash['payment_profile'] + gateway_customer_id = + hash.key?('gateway_customer_id') ? hash['gateway_customer_id'] : SKIP + + # Clean out expected properties from Hash. + additional_properties = hash.reject { |k, _| names.value?(k) } + + # Create object from extracted values. + ChjsTokenizationSuccess.new(payment_profile: payment_profile, + gateway_customer_id: gateway_customer_id, + additional_properties: additional_properties) + end + + # Validates an instance of the object from a given value. + # @param [ChjsTokenizationSuccess | Hash] The value against the validation is performed. + def self.validate(value) + if value.instance_of? self + return APIHelper.valid_type?(value.payment_profile, + ->(val) { TokenizedPaymentProfile.validate(val) }, + is_model_hash: true) + end + + return false unless value.instance_of? Hash + + APIHelper.valid_type?(value['payment_profile'], + ->(val) { TokenizedPaymentProfile.validate(val) }, + is_model_hash: true) + end + + # Provides a human-readable string representation of the object. + def to_s + class_name = self.class.name.split('::').last + "<#{class_name} payment_profile: #{@payment_profile}, gateway_customer_id:"\ + " #{@gateway_customer_id}, additional_properties: #{get_additional_properties}>" + end + + # Provides a debugging-friendly string with detailed object information. + def inspect + class_name = self.class.name.split('::').last + "<#{class_name} payment_profile: #{@payment_profile.inspect}, gateway_customer_id:"\ + " #{@gateway_customer_id.inspect}, additional_properties: #{get_additional_properties}>" + end + end +end diff --git a/lib/advanced_billing/models/create_allocation.rb b/lib/advanced_billing/models/create_allocation.rb index 7de2b7f..74df733 100644 --- a/lib/advanced_billing/models/create_allocation.rb +++ b/lib/advanced_billing/models/create_allocation.rb @@ -90,9 +90,10 @@ class CreateAllocation < BaseModel # @return [Object] attr_accessor :price_point_id - # This attribute is particularly useful when you need to align billing - # events for different components on distinct schedules within a - # subscription. This only works for site with Multifrequency enabled. + # Billing schedule settings for component allocations or usages on + # multi-frequency subscriptions. Use this to start a component's billing + # period on a custom date instead of aligning with the product charge + # schedule. # @return [BillingSchedule] attr_accessor :billing_schedule diff --git a/lib/advanced_billing/models/create_invoice.rb b/lib/advanced_billing/models/create_invoice.rb index 552400b..b0c441d 100644 --- a/lib/advanced_billing/models/create_invoice.rb +++ b/lib/advanced_billing/models/create_invoice.rb @@ -13,7 +13,10 @@ class CreateInvoice < BaseModel # @return [Array[CreateInvoiceItem]] attr_accessor :line_items - # TODO: Write general description for this method + # Date on which the invoice will be issued (format YYYY-MM-DD). This date is + # interpreted and validated in your site's time zone. It must be today or a + # date in the past — future dates are not accepted. If omitted, defaults to + # today in your site's time zone. # @return [Date] attr_accessor :issue_date diff --git a/lib/advanced_billing/models/create_payment_profile.rb b/lib/advanced_billing/models/create_payment_profile.rb index f456831..c32693d 100644 --- a/lib/advanced_billing/models/create_payment_profile.rb +++ b/lib/advanced_billing/models/create_payment_profile.rb @@ -9,15 +9,18 @@ class CreatePaymentProfile < BaseModel SKIP = Object.new private_constant :SKIP - # Token received after sending billing information using chargify.js. + # Token received after sending billing information using Maxio.js (formerly + # Chargify.js). # @return [String] attr_accessor :chargify_token - # Token received after sending billing information using chargify.js. + # Token received after sending billing information using Maxio.js (formerly + # Chargify.js). # @return [Integer] attr_accessor :id - # Token received after sending billing information using chargify.js. + # Token received after sending billing information using Maxio.js (formerly + # Chargify.js). # @return [PaymentType] attr_accessor :payment_type @@ -112,12 +115,12 @@ class CreatePaymentProfile < BaseModel attr_accessor :customer_id # used by merchants that implemented BraintreeBlue javaScript libraries on - # their own. We recommend using Chargify.js instead. + # their own. We recommend using Maxio.js (formerly Chargify.js) instead. # @return [String] attr_accessor :paypal_email # used by merchants that implemented BraintreeBlue javaScript libraries on - # their own. We recommend using Chargify.js instead. + # their own. We recommend using Maxio.js (formerly Chargify.js) instead. # @return [String] attr_accessor :payment_method_nonce diff --git a/lib/advanced_billing/models/create_subscription.rb b/lib/advanced_billing/models/create_subscription.rb index 2b4fe7e..f08abd4 100644 --- a/lib/advanced_billing/models/create_subscription.rb +++ b/lib/advanced_billing/models/create_subscription.rb @@ -319,6 +319,7 @@ class CreateSubscription < BaseModel # Valid only for the Subscription Preview endpoint. When set to `true` it # skips calculating taxes for the current and next billing manifests. + # Defaults to `false` when not provided. # @return [TrueClass | FalseClass] attr_accessor :skip_billing_manifest_taxes @@ -472,8 +473,7 @@ def initialize(product_handle: SKIP, product_id: SKIP, agreement_acceptance: SKIP, ach_agreement: SKIP, dunning_communication_delay_enabled: false, dunning_communication_delay_time_zone: SKIP, - skip_billing_manifest_taxes: false, - additional_properties: {}) + skip_billing_manifest_taxes: SKIP, additional_properties: {}) # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) @@ -675,7 +675,7 @@ def self.from_hash(hash) dunning_communication_delay_time_zone = hash.key?('dunning_communication_delay_time_zone') ? hash['dunning_communication_delay_time_zone'] : SKIP skip_billing_manifest_taxes = - hash['skip_billing_manifest_taxes'] ||= false + hash.key?('skip_billing_manifest_taxes') ? hash['skip_billing_manifest_taxes'] : SKIP # Clean out expected properties from Hash. additional_properties = hash.reject { |k, _| names.value?(k) } diff --git a/lib/advanced_billing/models/create_usage.rb b/lib/advanced_billing/models/create_usage.rb index 1abf9ff..a69dd9d 100644 --- a/lib/advanced_billing/models/create_usage.rb +++ b/lib/advanced_billing/models/create_usage.rb @@ -24,9 +24,10 @@ class CreateUsage < BaseModel # @return [String] attr_accessor :memo - # This attribute is particularly useful when you need to align billing - # events for different components on distinct schedules within a - # subscription. This only works for site with Multifrequency enabled. + # Billing schedule settings for component allocations or usages on + # multi-frequency subscriptions. Use this to start a component's billing + # period on a custom date instead of aligning with the product charge + # schedule. # @return [BillingSchedule] attr_accessor :billing_schedule diff --git a/lib/advanced_billing/models/credit_card_payment_profile.rb b/lib/advanced_billing/models/credit_card_payment_profile.rb index ed6f6ff..d857bb7 100644 --- a/lib/advanced_billing/models/credit_card_payment_profile.rb +++ b/lib/advanced_billing/models/credit_card_payment_profile.rb @@ -94,15 +94,15 @@ class CreditCardPaymentProfile < BaseModel # @return [TrueClass | FalseClass] attr_accessor :disabled - # Token received after sending billing information using chargify.js. This - # token will only be received if passed as a sole attribute of - # credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) + # Token received after sending billing information using Maxio.js (formerly + # Chargify.js). This token will only be received if passed as a sole + # attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) # @return [String] attr_accessor :chargify_token - # Token received after sending billing information using chargify.js. This - # token will only be received if passed as a sole attribute of - # credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) + # Token received after sending billing information using Maxio.js (formerly + # Chargify.js). This token will only be received if passed as a sole + # attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) # @return [Integer] attr_accessor :site_gateway_setting_id diff --git a/lib/advanced_billing/models/credit_note_line_item.rb b/lib/advanced_billing/models/credit_note_line_item.rb index 8420bb9..d63d551 100644 --- a/lib/advanced_billing/models/credit_note_line_item.rb +++ b/lib/advanced_billing/models/credit_note_line_item.rb @@ -64,6 +64,16 @@ class CreditNoteLineItem < BaseModel # @return [String] attr_accessor :tax_amount + # Whether the unit price for this line item is tax-inclusive. + # When `true`, `unit_price` already includes tax and `tax_amount` represents + # the portion of the price attributable to tax. When `false`, any applicable + # tax is added on top of the price. + # The value is inherited from the source price point's `tax_included` + # setting. Custom or ad-hoc line items (which have no associated price + # point) always return `false`. + # @return [TrueClass | FalseClass] + attr_accessor :tax_included + # The non-canonical total amount for the line. # `subtotal_amount` is the canonical amount for a line. The invoice # `total_amount` is derived from the sum of the line `subtotal_amount`s and @@ -118,6 +128,11 @@ class CreditNoteLineItem < BaseModel # @return [TrueClass | FalseClass] attr_accessor :custom_item + # The date a prepaid allocation is set to expire. Only present on line items + # representing prepaid component allocations. The format is `"YYYY-MM-DD"`. + # @return [Date] + attr_accessor :prepaid_allocation_expires_at + # A mapping from model property names to API property names. def self.names @_hash = {} if @_hash.nil? @@ -129,6 +144,7 @@ def self.names @_hash['subtotal_amount'] = 'subtotal_amount' @_hash['discount_amount'] = 'discount_amount' @_hash['tax_amount'] = 'tax_amount' + @_hash['tax_included'] = 'tax_included' @_hash['total_amount'] = 'total_amount' @_hash['tiered_unit_price'] = 'tiered_unit_price' @_hash['period_range_start'] = 'period_range_start' @@ -139,6 +155,8 @@ def self.names @_hash['price_point_id'] = 'price_point_id' @_hash['billing_schedule_item_id'] = 'billing_schedule_item_id' @_hash['custom_item'] = 'custom_item' + @_hash['prepaid_allocation_expires_at'] = + 'prepaid_allocation_expires_at' @_hash end @@ -153,6 +171,7 @@ def self.optionals subtotal_amount discount_amount tax_amount + tax_included total_amount tiered_unit_price period_range_start @@ -163,6 +182,7 @@ def self.optionals price_point_id billing_schedule_item_id custom_item + prepaid_allocation_expires_at ] end @@ -172,17 +192,19 @@ def self.nullables component_id price_point_id billing_schedule_item_id + prepaid_allocation_expires_at ] end def initialize(uid: SKIP, title: SKIP, description: SKIP, quantity: SKIP, unit_price: SKIP, subtotal_amount: SKIP, - discount_amount: SKIP, tax_amount: SKIP, total_amount: SKIP, - tiered_unit_price: SKIP, period_range_start: SKIP, - period_range_end: SKIP, product_id: SKIP, - product_version: SKIP, component_id: SKIP, + discount_amount: SKIP, tax_amount: SKIP, tax_included: SKIP, + total_amount: SKIP, tiered_unit_price: SKIP, + period_range_start: SKIP, period_range_end: SKIP, + product_id: SKIP, product_version: SKIP, component_id: SKIP, price_point_id: SKIP, billing_schedule_item_id: SKIP, - custom_item: SKIP, additional_properties: {}) + custom_item: SKIP, prepaid_allocation_expires_at: SKIP, + additional_properties: {}) # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) @@ -196,6 +218,7 @@ def initialize(uid: SKIP, title: SKIP, description: SKIP, quantity: SKIP, @subtotal_amount = subtotal_amount unless subtotal_amount == SKIP @discount_amount = discount_amount unless discount_amount == SKIP @tax_amount = tax_amount unless tax_amount == SKIP + @tax_included = tax_included unless tax_included == SKIP @total_amount = total_amount unless total_amount == SKIP @tiered_unit_price = tiered_unit_price unless tiered_unit_price == SKIP @period_range_start = period_range_start unless period_range_start == SKIP @@ -206,6 +229,10 @@ def initialize(uid: SKIP, title: SKIP, description: SKIP, quantity: SKIP, @price_point_id = price_point_id unless price_point_id == SKIP @billing_schedule_item_id = billing_schedule_item_id unless billing_schedule_item_id == SKIP @custom_item = custom_item unless custom_item == SKIP + unless prepaid_allocation_expires_at == SKIP + @prepaid_allocation_expires_at = + prepaid_allocation_expires_at + end end # Creates an instance of the object from a hash. @@ -223,6 +250,7 @@ def self.from_hash(hash) discount_amount = hash.key?('discount_amount') ? hash['discount_amount'] : SKIP tax_amount = hash.key?('tax_amount') ? hash['tax_amount'] : SKIP + tax_included = hash.key?('tax_included') ? hash['tax_included'] : SKIP total_amount = hash.key?('total_amount') ? hash['total_amount'] : SKIP tiered_unit_price = hash.key?('tiered_unit_price') ? hash['tiered_unit_price'] : SKIP @@ -239,6 +267,8 @@ def self.from_hash(hash) billing_schedule_item_id = hash.key?('billing_schedule_item_id') ? hash['billing_schedule_item_id'] : SKIP custom_item = hash.key?('custom_item') ? hash['custom_item'] : SKIP + prepaid_allocation_expires_at = + hash.key?('prepaid_allocation_expires_at') ? hash['prepaid_allocation_expires_at'] : SKIP # Clean out expected properties from Hash. additional_properties = hash.reject { |k, _| names.value?(k) } @@ -252,6 +282,7 @@ def self.from_hash(hash) subtotal_amount: subtotal_amount, discount_amount: discount_amount, tax_amount: tax_amount, + tax_included: tax_included, total_amount: total_amount, tiered_unit_price: tiered_unit_price, period_range_start: period_range_start, @@ -262,6 +293,7 @@ def self.from_hash(hash) price_point_id: price_point_id, billing_schedule_item_id: billing_schedule_item_id, custom_item: custom_item, + prepaid_allocation_expires_at: prepaid_allocation_expires_at, additional_properties: additional_properties) end @@ -280,12 +312,13 @@ def to_s class_name = self.class.name.split('::').last "<#{class_name} uid: #{@uid}, title: #{@title}, description: #{@description}, quantity:"\ " #{@quantity}, unit_price: #{@unit_price}, subtotal_amount: #{@subtotal_amount},"\ - " discount_amount: #{@discount_amount}, tax_amount: #{@tax_amount}, total_amount:"\ - " #{@total_amount}, tiered_unit_price: #{@tiered_unit_price}, period_range_start:"\ - " #{@period_range_start}, period_range_end: #{@period_range_end}, product_id:"\ - " #{@product_id}, product_version: #{@product_version}, component_id: #{@component_id},"\ - " price_point_id: #{@price_point_id}, billing_schedule_item_id:"\ - " #{@billing_schedule_item_id}, custom_item: #{@custom_item}, additional_properties:"\ + " discount_amount: #{@discount_amount}, tax_amount: #{@tax_amount}, tax_included:"\ + " #{@tax_included}, total_amount: #{@total_amount}, tiered_unit_price:"\ + " #{@tiered_unit_price}, period_range_start: #{@period_range_start}, period_range_end:"\ + " #{@period_range_end}, product_id: #{@product_id}, product_version: #{@product_version},"\ + " component_id: #{@component_id}, price_point_id: #{@price_point_id},"\ + " billing_schedule_item_id: #{@billing_schedule_item_id}, custom_item: #{@custom_item},"\ + " prepaid_allocation_expires_at: #{@prepaid_allocation_expires_at}, additional_properties:"\ " #{get_additional_properties}>" end @@ -295,13 +328,14 @@ def inspect "<#{class_name} uid: #{@uid.inspect}, title: #{@title.inspect}, description:"\ " #{@description.inspect}, quantity: #{@quantity.inspect}, unit_price:"\ " #{@unit_price.inspect}, subtotal_amount: #{@subtotal_amount.inspect}, discount_amount:"\ - " #{@discount_amount.inspect}, tax_amount: #{@tax_amount.inspect}, total_amount:"\ - " #{@total_amount.inspect}, tiered_unit_price: #{@tiered_unit_price.inspect},"\ - " period_range_start: #{@period_range_start.inspect}, period_range_end:"\ - " #{@period_range_end.inspect}, product_id: #{@product_id.inspect}, product_version:"\ - " #{@product_version.inspect}, component_id: #{@component_id.inspect}, price_point_id:"\ - " #{@price_point_id.inspect}, billing_schedule_item_id:"\ + " #{@discount_amount.inspect}, tax_amount: #{@tax_amount.inspect}, tax_included:"\ + " #{@tax_included.inspect}, total_amount: #{@total_amount.inspect}, tiered_unit_price:"\ + " #{@tiered_unit_price.inspect}, period_range_start: #{@period_range_start.inspect},"\ + " period_range_end: #{@period_range_end.inspect}, product_id: #{@product_id.inspect},"\ + " product_version: #{@product_version.inspect}, component_id: #{@component_id.inspect},"\ + " price_point_id: #{@price_point_id.inspect}, billing_schedule_item_id:"\ " #{@billing_schedule_item_id.inspect}, custom_item: #{@custom_item.inspect},"\ + " prepaid_allocation_expires_at: #{@prepaid_allocation_expires_at.inspect},"\ " additional_properties: #{get_additional_properties}>" end end diff --git a/lib/advanced_billing/models/customer.rb b/lib/advanced_billing/models/customer.rb index 445034f..dbac2ff 100644 --- a/lib/advanced_billing/models/customer.rb +++ b/lib/advanced_billing/models/customer.rb @@ -140,6 +140,10 @@ class Customer < BaseModel # @return [Integer] attr_accessor :default_auto_renewal_profile_id + # The Maxio-generated unique identifier for the customer. + # @return [String] + attr_accessor :maxioid + # A mapping from model property names to API property names. def self.names @_hash = {} if @_hash.nil? @@ -176,6 +180,7 @@ def self.names @_hash['tax_exempt_reason'] = 'tax_exempt_reason' @_hash['default_auto_renewal_profile_id'] = 'default_auto_renewal_profile_id' + @_hash['maxioid'] = 'maxioid' @_hash end @@ -212,6 +217,7 @@ def self.optionals salesforce_id tax_exempt_reason default_auto_renewal_profile_id + maxioid ] end @@ -241,6 +247,7 @@ def self.nullables salesforce_id tax_exempt_reason default_auto_renewal_profile_id + maxioid ] end @@ -255,7 +262,7 @@ def initialize(first_name: SKIP, last_name: SKIP, email: SKIP, vat_number: SKIP, parent_id: SKIP, locale: SKIP, default_subscription_group_uid: SKIP, salesforce_id: SKIP, tax_exempt_reason: SKIP, - default_auto_renewal_profile_id: SKIP, + default_auto_renewal_profile_id: SKIP, maxioid: SKIP, additional_properties: {}) # Add additional model properties to the instance. additional_properties.each do |_name, _value| @@ -307,6 +314,7 @@ def initialize(first_name: SKIP, last_name: SKIP, email: SKIP, @default_auto_renewal_profile_id = default_auto_renewal_profile_id end + @maxioid = maxioid unless maxioid == SKIP end # Creates an instance of the object from a hash. @@ -367,6 +375,7 @@ def self.from_hash(hash) hash.key?('tax_exempt_reason') ? hash['tax_exempt_reason'] : SKIP default_auto_renewal_profile_id = hash.key?('default_auto_renewal_profile_id') ? hash['default_auto_renewal_profile_id'] : SKIP + maxioid = hash.key?('maxioid') ? hash['maxioid'] : SKIP # Clean out expected properties from Hash. additional_properties = hash.reject { |k, _| names.value?(k) } @@ -402,6 +411,7 @@ def self.from_hash(hash) salesforce_id: salesforce_id, tax_exempt_reason: tax_exempt_reason, default_auto_renewal_profile_id: default_auto_renewal_profile_id, + maxioid: maxioid, additional_properties: additional_properties) end @@ -449,8 +459,8 @@ def to_s " #{@tax_exempt}, vat_number: #{@vat_number}, parent_id: #{@parent_id}, locale: #{@locale},"\ " default_subscription_group_uid: #{@default_subscription_group_uid}, salesforce_id:"\ " #{@salesforce_id}, tax_exempt_reason: #{@tax_exempt_reason},"\ - " default_auto_renewal_profile_id: #{@default_auto_renewal_profile_id},"\ - " additional_properties: #{get_additional_properties}>" + " default_auto_renewal_profile_id: #{@default_auto_renewal_profile_id}, maxioid:"\ + " #{@maxioid}, additional_properties: #{get_additional_properties}>" end # Provides a debugging-friendly string with detailed object information. @@ -471,8 +481,8 @@ def inspect " #{@locale.inspect}, default_subscription_group_uid:"\ " #{@default_subscription_group_uid.inspect}, salesforce_id: #{@salesforce_id.inspect},"\ " tax_exempt_reason: #{@tax_exempt_reason.inspect}, default_auto_renewal_profile_id:"\ - " #{@default_auto_renewal_profile_id.inspect}, additional_properties:"\ - " #{get_additional_properties}>" + " #{@default_auto_renewal_profile_id.inspect}, maxioid: #{@maxioid.inspect},"\ + " additional_properties: #{get_additional_properties}>" end end end diff --git a/lib/advanced_billing/models/event.rb b/lib/advanced_billing/models/event.rb index 6f45b0a..2ef8b0f 100644 --- a/lib/advanced_billing/models/event.rb +++ b/lib/advanced_billing/models/event.rb @@ -61,6 +61,8 @@ class Event < BaseModel # CreditAccountBalanceChanged # * `item_price_point_changed` - ItemPricePointChanged # * `custom_field_value_change` - CustomFieldValueChange + # * `chjs_tokenization_success` - ChjsTokenizationSuccess + # * `chjs_tokenization_failure` - ChjsTokenizationFailure # * The rest, that is `delayed_signup_creation_failure`, # `billing_date_change`, `expiration_date_change`, `expiring_card`, # `customer_update`, `customer_create`, `customer_delete`, diff --git a/lib/advanced_billing/models/event_key.rb b/lib/advanced_billing/models/event_key.rb index d0d2527..ce123c6 100644 --- a/lib/advanced_billing/models/event_key.rb +++ b/lib/advanced_billing/models/event_key.rb @@ -106,6 +106,9 @@ class EventKey # TODO: Write general description for INVOICE_ISSUED INVOICE_ISSUED = 'invoice_issued'.freeze, + # TODO: Write general description for INVOICE_PENDING + INVOICE_PENDING = 'invoice_pending'.freeze, + # TODO: Write general description for PREPAID_SUBSCRIPTION_BALANCE_CHANGED PREPAID_SUBSCRIPTION_BALANCE_CHANGED = 'prepaid_subscription_balance_changed'.freeze, @@ -242,6 +245,12 @@ class EventKey # TODO: Write general description for COMPONENT_BILLING_DATE_CHANGED COMPONENT_BILLING_DATE_CHANGED = 'component_billing_date_changed'.freeze, + # TODO: Write general description for CHJS_TOKENIZATION_FAILURE + CHJS_TOKENIZATION_FAILURE = 'chjs_tokenization_failure'.freeze, + + # TODO: Write general description for CHJS_TOKENIZATION_SUCCESS + CHJS_TOKENIZATION_SUCCESS = 'chjs_tokenization_success'.freeze, + # TODO: Write general description for SUBSCRIPTION_TERM_RENEWAL_SCHEDULED SUBSCRIPTION_TERM_RENEWAL_SCHEDULED = 'subscription_term_renewal_scheduled'.freeze, @@ -300,6 +309,7 @@ def self.from_value(value, default_value = PAYMENT_SUCCESS) when 'trial_end_notice' then TRIAL_END_NOTICE when 'dunning_step_reached' then DUNNING_STEP_REACHED when 'invoice_issued' then INVOICE_ISSUED + when 'invoice_pending' then INVOICE_PENDING when 'prepaid_subscription_balance_changed' then PREPAID_SUBSCRIPTION_BALANCE_CHANGED when 'subscription_group_signup_success' then SUBSCRIPTION_GROUP_SIGNUP_SUCCESS when 'subscription_group_signup_failure' then SUBSCRIPTION_GROUP_SIGNUP_FAILURE @@ -343,6 +353,8 @@ def self.from_value(value, default_value = PAYMENT_SUCCESS) when 'chargeback_won' then CHARGEBACK_WON when 'payment_collection_method_changed' then PAYMENT_COLLECTION_METHOD_CHANGED when 'component_billing_date_changed' then COMPONENT_BILLING_DATE_CHANGED + when 'chjs_tokenization_failure' then CHJS_TOKENIZATION_FAILURE + when 'chjs_tokenization_success' then CHJS_TOKENIZATION_SUCCESS when 'subscription_term_renewal_scheduled' then SUBSCRIPTION_TERM_RENEWAL_SCHEDULED when 'subscription_term_renewal_pending' then SUBSCRIPTION_TERM_RENEWAL_PENDING when 'subscription_term_renewal_activated' then SUBSCRIPTION_TERM_RENEWAL_ACTIVATED diff --git a/lib/advanced_billing/models/invoice_line_item.rb b/lib/advanced_billing/models/invoice_line_item.rb index 7fce066..2990e73 100644 --- a/lib/advanced_billing/models/invoice_line_item.rb +++ b/lib/advanced_billing/models/invoice_line_item.rb @@ -64,6 +64,16 @@ class InvoiceLineItem < BaseModel # @return [String] attr_accessor :tax_amount + # Whether the unit price for this line item is tax-inclusive. + # When `true`, `unit_price` already includes tax and `tax_amount` represents + # the portion of the price attributable to tax. When `false`, any applicable + # tax is added on top of the price. + # The value is inherited from the source price point's `tax_included` + # setting. Custom or ad-hoc line items (which have no associated price + # point) always return `false`. + # @return [TrueClass | FalseClass] + attr_accessor :tax_included + # The non-canonical total amount for the line. # `subtotal_amount` is the canonical amount for a line. The invoice # `total_amount` is derived from the sum of the line `subtotal_amount`s and @@ -156,6 +166,11 @@ class InvoiceLineItem < BaseModel # @return [String] attr_accessor :kind + # The date a prepaid allocation is set to expire. Only present on line items + # representing prepaid component allocations. The format is `"YYYY-MM-DD"`. + # @return [Date] + attr_accessor :prepaid_allocation_expires_at + # A mapping from model property names to API property names. def self.names @_hash = {} if @_hash.nil? @@ -167,6 +182,7 @@ def self.names @_hash['subtotal_amount'] = 'subtotal_amount' @_hash['discount_amount'] = 'discount_amount' @_hash['tax_amount'] = 'tax_amount' + @_hash['tax_included'] = 'tax_included' @_hash['total_amount'] = 'total_amount' @_hash['tiered_unit_price'] = 'tiered_unit_price' @_hash['period_range_start'] = 'period_range_start' @@ -182,6 +198,8 @@ def self.names @_hash['product_price_point_id'] = 'product_price_point_id' @_hash['custom_item'] = 'custom_item' @_hash['kind'] = 'kind' + @_hash['prepaid_allocation_expires_at'] = + 'prepaid_allocation_expires_at' @_hash end @@ -196,6 +214,7 @@ def self.optionals subtotal_amount discount_amount tax_amount + tax_included total_amount tiered_unit_price period_range_start @@ -211,6 +230,7 @@ def self.optionals product_price_point_id custom_item kind + prepaid_allocation_expires_at ] end @@ -224,18 +244,21 @@ def self.nullables billing_schedule_item_id component_cost_data product_price_point_id + prepaid_allocation_expires_at ] end def initialize(uid: SKIP, title: SKIP, description: SKIP, quantity: SKIP, unit_price: SKIP, subtotal_amount: SKIP, - discount_amount: SKIP, tax_amount: SKIP, total_amount: SKIP, - tiered_unit_price: SKIP, period_range_start: SKIP, - period_range_end: SKIP, transaction_id: SKIP, - product_id: SKIP, product_version: SKIP, component_id: SKIP, + discount_amount: SKIP, tax_amount: SKIP, tax_included: SKIP, + total_amount: SKIP, tiered_unit_price: SKIP, + period_range_start: SKIP, period_range_end: SKIP, + transaction_id: SKIP, product_id: SKIP, + product_version: SKIP, component_id: SKIP, price_point_id: SKIP, billing_schedule_item_id: SKIP, hide: SKIP, component_cost_data: SKIP, product_price_point_id: SKIP, custom_item: SKIP, kind: SKIP, + prepaid_allocation_expires_at: SKIP, additional_properties: {}) # Add additional model properties to the instance. additional_properties.each do |_name, _value| @@ -250,6 +273,7 @@ def initialize(uid: SKIP, title: SKIP, description: SKIP, quantity: SKIP, @subtotal_amount = subtotal_amount unless subtotal_amount == SKIP @discount_amount = discount_amount unless discount_amount == SKIP @tax_amount = tax_amount unless tax_amount == SKIP + @tax_included = tax_included unless tax_included == SKIP @total_amount = total_amount unless total_amount == SKIP @tiered_unit_price = tiered_unit_price unless tiered_unit_price == SKIP @period_range_start = period_range_start unless period_range_start == SKIP @@ -265,6 +289,10 @@ def initialize(uid: SKIP, title: SKIP, description: SKIP, quantity: SKIP, @product_price_point_id = product_price_point_id unless product_price_point_id == SKIP @custom_item = custom_item unless custom_item == SKIP @kind = kind unless kind == SKIP + unless prepaid_allocation_expires_at == SKIP + @prepaid_allocation_expires_at = + prepaid_allocation_expires_at + end end # Creates an instance of the object from a hash. @@ -282,6 +310,7 @@ def self.from_hash(hash) discount_amount = hash.key?('discount_amount') ? hash['discount_amount'] : SKIP tax_amount = hash.key?('tax_amount') ? hash['tax_amount'] : SKIP + tax_included = hash.key?('tax_included') ? hash['tax_included'] : SKIP total_amount = hash.key?('total_amount') ? hash['total_amount'] : SKIP tiered_unit_price = hash.key?('tiered_unit_price') ? hash['tiered_unit_price'] : SKIP @@ -307,6 +336,8 @@ def self.from_hash(hash) hash.key?('product_price_point_id') ? hash['product_price_point_id'] : SKIP custom_item = hash.key?('custom_item') ? hash['custom_item'] : SKIP kind = hash.key?('kind') ? hash['kind'] : SKIP + prepaid_allocation_expires_at = + hash.key?('prepaid_allocation_expires_at') ? hash['prepaid_allocation_expires_at'] : SKIP # Clean out expected properties from Hash. additional_properties = hash.reject { |k, _| names.value?(k) } @@ -320,6 +351,7 @@ def self.from_hash(hash) subtotal_amount: subtotal_amount, discount_amount: discount_amount, tax_amount: tax_amount, + tax_included: tax_included, total_amount: total_amount, tiered_unit_price: tiered_unit_price, period_range_start: period_range_start, @@ -335,6 +367,7 @@ def self.from_hash(hash) product_price_point_id: product_price_point_id, custom_item: custom_item, kind: kind, + prepaid_allocation_expires_at: prepaid_allocation_expires_at, additional_properties: additional_properties) end @@ -353,15 +386,16 @@ def to_s class_name = self.class.name.split('::').last "<#{class_name} uid: #{@uid}, title: #{@title}, description: #{@description}, quantity:"\ " #{@quantity}, unit_price: #{@unit_price}, subtotal_amount: #{@subtotal_amount},"\ - " discount_amount: #{@discount_amount}, tax_amount: #{@tax_amount}, total_amount:"\ - " #{@total_amount}, tiered_unit_price: #{@tiered_unit_price}, period_range_start:"\ - " #{@period_range_start}, period_range_end: #{@period_range_end}, transaction_id:"\ - " #{@transaction_id}, product_id: #{@product_id}, product_version: #{@product_version},"\ - " component_id: #{@component_id}, price_point_id: #{@price_point_id},"\ - " billing_schedule_item_id: #{@billing_schedule_item_id}, hide: #{@hide},"\ - " component_cost_data: #{@component_cost_data}, product_price_point_id:"\ + " discount_amount: #{@discount_amount}, tax_amount: #{@tax_amount}, tax_included:"\ + " #{@tax_included}, total_amount: #{@total_amount}, tiered_unit_price:"\ + " #{@tiered_unit_price}, period_range_start: #{@period_range_start}, period_range_end:"\ + " #{@period_range_end}, transaction_id: #{@transaction_id}, product_id: #{@product_id},"\ + " product_version: #{@product_version}, component_id: #{@component_id}, price_point_id:"\ + " #{@price_point_id}, billing_schedule_item_id: #{@billing_schedule_item_id}, hide:"\ + " #{@hide}, component_cost_data: #{@component_cost_data}, product_price_point_id:"\ " #{@product_price_point_id}, custom_item: #{@custom_item}, kind: #{@kind},"\ - " additional_properties: #{get_additional_properties}>" + " prepaid_allocation_expires_at: #{@prepaid_allocation_expires_at}, additional_properties:"\ + " #{get_additional_properties}>" end # Provides a debugging-friendly string with detailed object information. @@ -370,16 +404,19 @@ def inspect "<#{class_name} uid: #{@uid.inspect}, title: #{@title.inspect}, description:"\ " #{@description.inspect}, quantity: #{@quantity.inspect}, unit_price:"\ " #{@unit_price.inspect}, subtotal_amount: #{@subtotal_amount.inspect}, discount_amount:"\ - " #{@discount_amount.inspect}, tax_amount: #{@tax_amount.inspect}, total_amount:"\ - " #{@total_amount.inspect}, tiered_unit_price: #{@tiered_unit_price.inspect},"\ - " period_range_start: #{@period_range_start.inspect}, period_range_end:"\ - " #{@period_range_end.inspect}, transaction_id: #{@transaction_id.inspect}, product_id:"\ - " #{@product_id.inspect}, product_version: #{@product_version.inspect}, component_id:"\ - " #{@component_id.inspect}, price_point_id: #{@price_point_id.inspect},"\ - " billing_schedule_item_id: #{@billing_schedule_item_id.inspect}, hide: #{@hide.inspect},"\ - " component_cost_data: #{@component_cost_data.inspect}, product_price_point_id:"\ + " #{@discount_amount.inspect}, tax_amount: #{@tax_amount.inspect}, tax_included:"\ + " #{@tax_included.inspect}, total_amount: #{@total_amount.inspect}, tiered_unit_price:"\ + " #{@tiered_unit_price.inspect}, period_range_start: #{@period_range_start.inspect},"\ + " period_range_end: #{@period_range_end.inspect}, transaction_id:"\ + " #{@transaction_id.inspect}, product_id: #{@product_id.inspect}, product_version:"\ + " #{@product_version.inspect}, component_id: #{@component_id.inspect}, price_point_id:"\ + " #{@price_point_id.inspect}, billing_schedule_item_id:"\ + " #{@billing_schedule_item_id.inspect}, hide: #{@hide.inspect}, component_cost_data:"\ + " #{@component_cost_data.inspect}, product_price_point_id:"\ " #{@product_price_point_id.inspect}, custom_item: #{@custom_item.inspect}, kind:"\ - " #{@kind.inspect}, additional_properties: #{get_additional_properties}>" + " #{@kind.inspect}, prepaid_allocation_expires_at:"\ + " #{@prepaid_allocation_expires_at.inspect}, additional_properties:"\ + " #{get_additional_properties}>" end end end diff --git a/lib/advanced_billing/models/payment_profile_attributes.rb b/lib/advanced_billing/models/payment_profile_attributes.rb index 3020435..eae26b6 100644 --- a/lib/advanced_billing/models/payment_profile_attributes.rb +++ b/lib/advanced_billing/models/payment_profile_attributes.rb @@ -9,20 +9,20 @@ class PaymentProfileAttributes < BaseModel SKIP = Object.new private_constant :SKIP - # (Optional) Token received after sending billing information using - # chargify.js. This token must be passed as a sole attribute of + # (Optional) Token received after sending billing information using Maxio.js + # (formerly Chargify.js). This token must be passed as a sole attribute of # `payment_profile_attributes` (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) # @return [String] attr_accessor :chargify_token - # (Optional) Token received after sending billing information using - # chargify.js. This token must be passed as a sole attribute of + # (Optional) Token received after sending billing information using Maxio.js + # (formerly Chargify.js). This token must be passed as a sole attribute of # `payment_profile_attributes` (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) # @return [Integer] attr_accessor :id - # (Optional) Token received after sending billing information using - # chargify.js. This token must be passed as a sole attribute of + # (Optional) Token received after sending billing information using Maxio.js + # (formerly Chargify.js). This token must be passed as a sole attribute of # `payment_profile_attributes` (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) # @return [PaymentType] attr_accessor :payment_type diff --git a/lib/advanced_billing/models/payment_profile_params.rb b/lib/advanced_billing/models/payment_profile_params.rb new file mode 100644 index 0000000..b6f2797 --- /dev/null +++ b/lib/advanced_billing/models/payment_profile_params.rb @@ -0,0 +1,103 @@ +# advanced_billing +# +# This file was automatically generated for Maxio by +# APIMATIC v3.0 ( https://www.apimatic.io ). + +module AdvancedBilling + # PCI-safe cardholder fields only. Full card numbers, CVV, and billing address + # are never included. + class PaymentProfileParams < BaseModel + SKIP = Object.new + private_constant :SKIP + + # TODO: Write general description for this method + # @return [String] + attr_accessor :first_name + + # TODO: Write general description for this method + # @return [String] + attr_accessor :last_name + + # TODO: Write general description for this method + # @return [String] + attr_accessor :card_type + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['first_name'] = 'first_name' + @_hash['last_name'] = 'last_name' + @_hash['card_type'] = 'card_type' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + first_name + last_name + card_type + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(first_name: SKIP, last_name: SKIP, card_type: SKIP, + additional_properties: {}) + # Add additional model properties to the instance. + additional_properties.each do |_name, _value| + instance_variable_set("@#{_name}", _value) + end + + @first_name = first_name unless first_name == SKIP + @last_name = last_name unless last_name == SKIP + @card_type = card_type unless card_type == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + first_name = hash.key?('first_name') ? hash['first_name'] : SKIP + last_name = hash.key?('last_name') ? hash['last_name'] : SKIP + card_type = hash.key?('card_type') ? hash['card_type'] : SKIP + + # Clean out expected properties from Hash. + additional_properties = hash.reject { |k, _| names.value?(k) } + + # Create object from extracted values. + PaymentProfileParams.new(first_name: first_name, + last_name: last_name, + card_type: card_type, + additional_properties: additional_properties) + end + + # Validates an instance of the object from a given value. + # @param [PaymentProfileParams | Hash] The value against the validation is performed. + def self.validate(value) + return true if value.instance_of? self + + return false unless value.instance_of? Hash + + true + end + + # Provides a human-readable string representation of the object. + def to_s + class_name = self.class.name.split('::').last + "<#{class_name} first_name: #{@first_name}, last_name: #{@last_name}, card_type:"\ + " #{@card_type}, additional_properties: #{get_additional_properties}>" + end + + # Provides a debugging-friendly string with detailed object information. + def inspect + class_name = self.class.name.split('::').last + "<#{class_name} first_name: #{@first_name.inspect}, last_name: #{@last_name.inspect},"\ + " card_type: #{@card_type.inspect}, additional_properties: #{get_additional_properties}>" + end + end +end diff --git a/lib/advanced_billing/models/site.rb b/lib/advanced_billing/models/site.rb index c61fde5..c631199 100644 --- a/lib/advanced_billing/models/site.rb +++ b/lib/advanced_billing/models/site.rb @@ -73,7 +73,20 @@ class Site < BaseModel # @return [NetTerms] attr_accessor :net_terms - # TODO: Write general description for this method + # Whether the site has the multi-frequency billing feature enabled. Only + # present when relationship invoicing is active. + # @return [TrueClass | FalseClass] + attr_accessor :multi_frequency_enabled + + # Whether the auto-renewals feature is enabled for this site. + # @return [TrueClass | FalseClass] + attr_accessor :auto_renewals_enabled + + # Whether the Billing Portal is enabled for this site. + # @return [TrueClass | FalseClass] + attr_accessor :portal_enabled + + # Whether the Billing Portal is enabled for this site. # @return [TrueClass | FalseClass] attr_accessor :test @@ -99,6 +112,9 @@ def self.names @_hash['organization_address'] = 'organization_address' @_hash['tax_configuration'] = 'tax_configuration' @_hash['net_terms'] = 'net_terms' + @_hash['multi_frequency_enabled'] = 'multi_frequency_enabled' + @_hash['auto_renewals_enabled'] = 'auto_renewals_enabled' + @_hash['portal_enabled'] = 'portal_enabled' @_hash['test'] = 'test' @_hash end @@ -122,6 +138,9 @@ def self.optionals organization_address tax_configuration net_terms + multi_frequency_enabled + auto_renewals_enabled + portal_enabled test ] end @@ -139,7 +158,9 @@ def initialize(id: SKIP, name: SKIP, subdomain: SKIP, currency: SKIP, whopays_default_payer: SKIP, allocation_settings: SKIP, default_payment_collection_method: SKIP, organization_address: SKIP, tax_configuration: SKIP, - net_terms: SKIP, test: SKIP, additional_properties: {}) + net_terms: SKIP, multi_frequency_enabled: SKIP, + auto_renewals_enabled: SKIP, portal_enabled: SKIP, + test: SKIP, additional_properties: {}) # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) @@ -173,6 +194,9 @@ def initialize(id: SKIP, name: SKIP, subdomain: SKIP, currency: SKIP, @organization_address = organization_address unless organization_address == SKIP @tax_configuration = tax_configuration unless tax_configuration == SKIP @net_terms = net_terms unless net_terms == SKIP + @multi_frequency_enabled = multi_frequency_enabled unless multi_frequency_enabled == SKIP + @auto_renewals_enabled = auto_renewals_enabled unless auto_renewals_enabled == SKIP + @portal_enabled = portal_enabled unless portal_enabled == SKIP @test = test unless test == SKIP end @@ -207,6 +231,12 @@ def self.from_hash(hash) tax_configuration = TaxConfiguration.from_hash(hash['tax_configuration']) if hash['tax_configuration'] net_terms = NetTerms.from_hash(hash['net_terms']) if hash['net_terms'] + multi_frequency_enabled = + hash.key?('multi_frequency_enabled') ? hash['multi_frequency_enabled'] : SKIP + auto_renewals_enabled = + hash.key?('auto_renewals_enabled') ? hash['auto_renewals_enabled'] : SKIP + portal_enabled = + hash.key?('portal_enabled') ? hash['portal_enabled'] : SKIP test = hash.key?('test') ? hash['test'] : SKIP # Clean out expected properties from Hash. @@ -229,6 +259,9 @@ def self.from_hash(hash) organization_address: organization_address, tax_configuration: tax_configuration, net_terms: net_terms, + multi_frequency_enabled: multi_frequency_enabled, + auto_renewals_enabled: auto_renewals_enabled, + portal_enabled: portal_enabled, test: test, additional_properties: additional_properties) end @@ -245,7 +278,9 @@ def to_s " whopays_default_payer: #{@whopays_default_payer}, allocation_settings:"\ " #{@allocation_settings}, default_payment_collection_method:"\ " #{@default_payment_collection_method}, organization_address: #{@organization_address},"\ - " tax_configuration: #{@tax_configuration}, net_terms: #{@net_terms}, test: #{@test},"\ + " tax_configuration: #{@tax_configuration}, net_terms: #{@net_terms},"\ + " multi_frequency_enabled: #{@multi_frequency_enabled}, auto_renewals_enabled:"\ + " #{@auto_renewals_enabled}, portal_enabled: #{@portal_enabled}, test: #{@test},"\ " additional_properties: #{get_additional_properties}>" end @@ -263,8 +298,10 @@ def inspect " #{@allocation_settings.inspect}, default_payment_collection_method:"\ " #{@default_payment_collection_method.inspect}, organization_address:"\ " #{@organization_address.inspect}, tax_configuration: #{@tax_configuration.inspect},"\ - " net_terms: #{@net_terms.inspect}, test: #{@test.inspect}, additional_properties:"\ - " #{get_additional_properties}>" + " net_terms: #{@net_terms.inspect}, multi_frequency_enabled:"\ + " #{@multi_frequency_enabled.inspect}, auto_renewals_enabled:"\ + " #{@auto_renewals_enabled.inspect}, portal_enabled: #{@portal_enabled.inspect}, test:"\ + " #{@test.inspect}, additional_properties: #{get_additional_properties}>" end end end diff --git a/lib/advanced_billing/models/tokenized_payment_profile.rb b/lib/advanced_billing/models/tokenized_payment_profile.rb new file mode 100644 index 0000000..ba59acf --- /dev/null +++ b/lib/advanced_billing/models/tokenized_payment_profile.rb @@ -0,0 +1,121 @@ +# advanced_billing +# +# This file was automatically generated for Maxio by +# APIMATIC v3.0 ( https://www.apimatic.io ). + +module AdvancedBilling + # TokenizedPaymentProfile Model. + class TokenizedPaymentProfile < BaseModel + SKIP = Object.new + private_constant :SKIP + + # TODO: Write general description for this method + # @return [Integer] + attr_accessor :id + + # TODO: Write general description for this method + # @return [String] + attr_accessor :vault_token + + # TODO: Write general description for this method + # @return [String] + attr_accessor :gateway_handle + + # TODO: Write general description for this method + # @return [String] + attr_accessor :customer_vault_token + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['vault_token'] = 'vault_token' + @_hash['gateway_handle'] = 'gateway_handle' + @_hash['customer_vault_token'] = 'customer_vault_token' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + vault_token + gateway_handle + customer_vault_token + ] + end + + # An array for nullable fields + def self.nullables + %w[ + gateway_handle + customer_vault_token + ] + end + + def initialize(id:, vault_token: SKIP, gateway_handle: SKIP, + customer_vault_token: SKIP, additional_properties: {}) + # Add additional model properties to the instance. + additional_properties.each do |_name, _value| + instance_variable_set("@#{_name}", _value) + end + + @id = id + @vault_token = vault_token unless vault_token == SKIP + @gateway_handle = gateway_handle unless gateway_handle == SKIP + @customer_vault_token = customer_vault_token unless customer_vault_token == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : nil + vault_token = hash.key?('vault_token') ? hash['vault_token'] : SKIP + gateway_handle = + hash.key?('gateway_handle') ? hash['gateway_handle'] : SKIP + customer_vault_token = + hash.key?('customer_vault_token') ? hash['customer_vault_token'] : SKIP + + # Clean out expected properties from Hash. + additional_properties = hash.reject { |k, _| names.value?(k) } + + # Create object from extracted values. + TokenizedPaymentProfile.new(id: id, + vault_token: vault_token, + gateway_handle: gateway_handle, + customer_vault_token: customer_vault_token, + additional_properties: additional_properties) + end + + # Validates an instance of the object from a given value. + # @param [TokenizedPaymentProfile | Hash] The value against the validation is performed. + def self.validate(value) + if value.instance_of? self + return APIHelper.valid_type?(value.id, + ->(val) { val.instance_of? Integer }) + end + + return false unless value.instance_of? Hash + + APIHelper.valid_type?(value['id'], + ->(val) { val.instance_of? Integer }) + end + + # Provides a human-readable string representation of the object. + def to_s + class_name = self.class.name.split('::').last + "<#{class_name} id: #{@id}, vault_token: #{@vault_token}, gateway_handle:"\ + " #{@gateway_handle}, customer_vault_token: #{@customer_vault_token}, additional_properties:"\ + " #{get_additional_properties}>" + end + + # Provides a debugging-friendly string with detailed object information. + def inspect + class_name = self.class.name.split('::').last + "<#{class_name} id: #{@id.inspect}, vault_token: #{@vault_token.inspect}, gateway_handle:"\ + " #{@gateway_handle.inspect}, customer_vault_token: #{@customer_vault_token.inspect},"\ + " additional_properties: #{get_additional_properties}>" + end + end +end diff --git a/lib/advanced_billing/models/webhook_subscription.rb b/lib/advanced_billing/models/webhook_subscription.rb index ac5796b..7b79899 100644 --- a/lib/advanced_billing/models/webhook_subscription.rb +++ b/lib/advanced_billing/models/webhook_subscription.rb @@ -13,6 +13,12 @@ class WebhookSubscription # TODO: Write general description for COMPONENT_ALLOCATION_CHANGE COMPONENT_ALLOCATION_CHANGE = 'component_allocation_change'.freeze, + # TODO: Write general description for CHJS_TOKENIZATION_FAILURE + CHJS_TOKENIZATION_FAILURE = 'chjs_tokenization_failure'.freeze, + + # TODO: Write general description for CHJS_TOKENIZATION_SUCCESS + CHJS_TOKENIZATION_SUCCESS = 'chjs_tokenization_success'.freeze, + # TODO: Write general description for CUSTOMER_CREATE CUSTOMER_CREATE = 'customer_create'.freeze, @@ -31,6 +37,9 @@ class WebhookSubscription # TODO: Write general description for INVOICE_ISSUED INVOICE_ISSUED = 'invoice_issued'.freeze, + # TODO: Write general description for INVOICE_PENDING + INVOICE_PENDING = 'invoice_pending'.freeze, + # TODO: Write general description for METERED_USAGE METERED_USAGE = 'metered_usage'.freeze, @@ -129,12 +138,15 @@ def self.from_value(value, default_value = BILLING_DATE_CHANGE) case str.downcase when 'billing_date_change' then BILLING_DATE_CHANGE when 'component_allocation_change' then COMPONENT_ALLOCATION_CHANGE + when 'chjs_tokenization_failure' then CHJS_TOKENIZATION_FAILURE + when 'chjs_tokenization_success' then CHJS_TOKENIZATION_SUCCESS when 'customer_create' then CUSTOMER_CREATE when 'customer_update' then CUSTOMER_UPDATE when 'dunning_step_reached' then DUNNING_STEP_REACHED when 'expiring_card' then EXPIRING_CARD when 'expiration_date_change' then EXPIRATION_DATE_CHANGE when 'invoice_issued' then INVOICE_ISSUED + when 'invoice_pending' then INVOICE_PENDING when 'metered_usage' then METERED_USAGE when 'payment_failure' then PAYMENT_FAILURE when 'payment_success' then PAYMENT_SUCCESS diff --git a/lib/advanced_billing/utilities/union_type_lookup.rb b/lib/advanced_billing/utilities/union_type_lookup.rb index af8075b..ee60c9f 100644 --- a/lib/advanced_billing/utilities/union_type_lookup.rb +++ b/lib/advanced_billing/utilities/union_type_lookup.rb @@ -633,7 +633,9 @@ def self.union_types LeafType.new(PrepaymentAccountBalanceChanged), LeafType.new(PaymentCollectionMethodChanged), LeafType.new(ItemPricePointChanged), - LeafType.new(CustomFieldValueChange) + LeafType.new(CustomFieldValueChange), + LeafType.new(ChjsTokenizationSuccess), + LeafType.new(ChjsTokenizationFailure) ], UnionTypeContext.new( is_nullable: true