From 8b4eef154871e853d3fcff11ed744589e60bfe9e Mon Sep 17 00:00:00 2001 From: lucassus Date: Tue, 9 Jun 2026 19:58:07 +0000 Subject: [PATCH 1/5] Automated commit message --- README.md | 90 ++-- doc/controllers/advance-invoice.md | 18 + doc/controllers/api-exports.md | 54 +++ doc/controllers/billing-portal.md | 24 ++ doc/controllers/component-price-points.md | 72 ++++ doc/controllers/components.md | 78 +++- doc/controllers/coupons.md | 84 ++++ doc/controllers/custom-fields.md | 54 +++ doc/controllers/customers.md | 42 ++ .../events-based-billing-segments.md | 36 ++ doc/controllers/events.md | 18 + doc/controllers/insights.md | 28 +- doc/controllers/invoices.md | 144 ++++++- doc/controllers/offers.md | 30 ++ doc/controllers/payment-profiles.md | 139 ++++--- doc/controllers/product-families.md | 24 ++ doc/controllers/product-price-points.md | 66 +++ doc/controllers/products.md | 36 ++ doc/controllers/proforma-invoices.md | 60 +++ doc/controllers/reason-codes.md | 30 ++ doc/controllers/referral-codes.md | 6 + doc/controllers/sales-commissions.md | 18 + doc/controllers/sites.md | 28 +- doc/controllers/subscription-components.md | 142 ++++++- .../subscription-group-invoice-account.md | 32 +- doc/controllers/subscription-group-status.md | 40 +- doc/controllers/subscription-groups.md | 80 +++- .../subscription-invoice-account.md | 60 ++- doc/controllers/subscription-notes.md | 38 +- doc/controllers/subscription-products.md | 61 +-- doc/controllers/subscription-renewals.md | 66 +++ doc/controllers/subscription-status.md | 94 ++++- doc/controllers/subscriptions.md | 120 +++++- doc/controllers/webhooks.md | 56 ++- doc/models/activate-event-based-component.md | 2 +- doc/models/bank-account-payment-profile.md | 7 +- doc/models/bank-account-response.md | 1 - doc/models/billing-schedule.md | 6 +- ...location-preview-item-previous-quantity.md | 20 + .../allocation-preview-item-quantity.md | 20 + .../allocation-previous-quantity.md | 20 + doc/models/containers/allocation-quantity.md | 20 + ...hive-component-price-point-component-id.md | 20 + ...ve-component-price-point-price-point-id.md | 20 + ...hive-product-price-point-price-point-id.md | 20 + .../archive-product-price-point-product-id.md | 20 + .../containers/calendar-billing-snap-day.md | 20 + ...lone-component-price-point-component-id.md | 20 + ...ne-component-price-point-price-point-id.md | 20 + ...nt-allocation-change-allocated-quantity.md | 20 + ...nent-price-point-assignment-price-point.md | 20 + .../containers/coupon-payload-percentage.md | 20 + .../create-allocation-price-point-id.md | 20 + ...mponent-price-point-request-price-point.md | 45 ++ ...onent-price-points-request-price-points.md | 45 ++ .../create-invoice-coupon-amount.md | 20 + .../create-invoice-coupon-percentage.md | 20 + ...create-invoice-coupon-product-family-id.md | 20 + .../create-invoice-item-component-id.md | 20 + .../create-invoice-item-price-point-id.md | 20 + .../create-invoice-item-product-id.md | 20 + ...ate-invoice-item-product-price-point-id.md | 20 + .../create-invoice-item-quantity.md | 20 + .../create-invoice-item-unit-price.md | 20 + .../create-invoice-payment-amount.md | 20 + .../create-metafields-request-metafields.md | 40 ++ .../create-multi-invoice-payment-amount.md | 20 + ...eate-or-update-segment-price-unit-price.md | 20 + ...create-payment-profile-expiration-month.md | 20 + .../create-payment-profile-expiration-year.md | 20 + .../create-product-price-point-product-id.md | 20 + ...create-segment-segment-property-1-value.md | 40 ++ ...create-segment-segment-property-2-value.md | 40 ++ ...create-segment-segment-property-3-value.md | 40 ++ ...create-segment-segment-property-4-value.md | 40 ++ ...bscription-component-allocated-quantity.md | 20 + ...ate-subscription-component-component-id.md | 20 + ...e-subscription-component-price-point-id.md | 20 + .../create-subscription-offer-id.md | 20 + .../containers/create-usage-component-id.md | 20 + ...eate-usage-subscription-id-or-reference.md | 20 + .../customer-error-response-errors.md | 22 + .../deduct-service-credit-amount.md | 20 + .../containers/ebb-component-unit-price.md | 20 + .../containers/event-event-specific-data.md | 319 ++++++++++++++ .../containers/invoice-event-payment.md | 71 ++++ doc/models/containers/invoice-event.md | 390 ++++++++++++++++++ .../containers/issue-service-credit-amount.md | 20 + ...t-product-price-points-input-product-id.md | 20 + .../list-usages-input-component-id.md | 20 + ...ages-input-subscription-id-or-reference.md | 20 + doc/models/containers/metafield-enum.md | 22 + .../metered-component-unit-price.md | 20 + .../containers/on-off-component-unit-price.md | 20 + ...ent-profile-attributes-expiration-month.md | 20 + ...ment-profile-attributes-expiration-year.md | 20 + doc/models/containers/payment-profile.md | 70 ++++ .../prepaid-usage-component-unit-price.md | 20 + .../containers/price-ending-quantity.md | 20 + .../containers/price-starting-quantity.md | 20 + doc/models/containers/price-unit-price.md | 20 + .../quantity-based-component-unit-price.md | 20 + .../reactivate-subscription-request-resume.md | 20 + ...read-component-price-point-component-id.md | 20 + ...ad-component-price-point-price-point-id.md | 20 + ...read-product-price-point-price-point-id.md | 20 + .../read-product-price-point-product-id.md | 20 + ...efund-consolidated-invoice-segment-uids.md | 22 + .../refund-invoice-request-refund.md | 31 ++ .../containers/refund-prepayment-amount.md | 20 + .../renewal-preview-component-component-id.md | 20 + ...enewal-preview-component-price-point-id.md | 20 + ...item-request-renewal-configuration-item.md | 24 ++ ...ed-renewal-product-price-point-interval.md | 20 + ...ewal-product-price-point-price-in-cents.md | 20 + ...date-request-renewal-configuration-item.md | 24 ++ .../segment-segment-property-1-value.md | 40 ++ .../segment-segment-property-2-value.md | 40 ++ .../segment-segment-property-3-value.md | 40 ++ .../segment-segment-property-4-value.md | 40 ++ ...bscription-component-allocated-quantity.md | 20 + ...iption-custom-price-expiration-interval.md | 20 + ...on-custom-price-initial-charge-in-cents.md | 20 + .../subscription-custom-price-interval.md | 20 + ...ubscription-custom-price-price-in-cents.md | 20 + ...ubscription-custom-price-trial-interval.md | 20 + ...ption-custom-price-trial-price-in-cents.md | 20 + ...tion-group-create-error-response-errors.md | 36 ++ ...tion-group-credit-card-expiration-month.md | 20 + ...ption-group-credit-card-expiration-year.md | 20 + ...scription-group-credit-card-full-number.md | 20 + ...oup-signup-component-allocated-quantity.md | 20 + ...ion-group-signup-component-component-id.md | 20 + ...n-group-signup-component-price-point-id.md | 20 + ...ion-group-signup-component-unit-balance.md | 20 + ...date-component-price-point-component-id.md | 20 + ...te-component-price-point-price-point-id.md | 20 + .../update-metafields-request-metafields.md | 22 + .../update-price-ending-quantity.md | 20 + .../update-price-starting-quantity.md | 20 + .../containers/update-price-unit-price.md | 20 + ...date-product-price-point-price-point-id.md | 20 + .../update-product-price-point-product-id.md | 20 + .../update-subscription-net-terms.md | 20 + .../update-subscription-snap-day.md | 20 + doc/models/containers/usage-quantity.md | 20 + doc/models/create-allocation.md | 2 +- doc/models/create-invoice.md | 2 +- doc/models/create-on-off-component.md | 2 +- doc/models/create-or-update-endpoint.md | 2 +- doc/models/create-payment-profile.md | 6 +- doc/models/create-usage.md | 2 +- doc/models/credit-card-payment-profile.md | 2 +- doc/models/credit-note-line-item.md | 1 + doc/models/event-key.md | 1 + doc/models/event-response.md | 2 +- doc/models/event.md | 2 +- doc/models/invoice-line-item.md | 1 + doc/models/payment-profile-attributes.md | 2 +- doc/models/webhook-subscription.md | 1 + src/AdvancedBillingClient.php | 2 +- src/Controllers/ComponentsController.php | 2 +- src/Controllers/InvoicesController.php | 39 +- src/Controllers/PaymentProfilesController.php | 100 +---- src/Controllers/SitesController.php | 15 +- .../SubscriptionComponentsController.php | 55 +-- ...scriptionGroupInvoiceAccountController.php | 17 +- .../SubscriptionGroupStatusController.php | 30 +- .../SubscriptionGroupsController.php | 18 +- .../SubscriptionInvoiceAccountController.php | 30 +- .../SubscriptionNotesController.php | 10 +- .../SubscriptionProductsController.php | 90 +--- .../SubscriptionStatusController.php | 59 +-- src/Controllers/SubscriptionsController.php | 63 +-- src/Controllers/WebhooksController.php | 10 +- src/Models/ActivateEventBasedComponent.php | 10 +- src/Models/BankAccountPaymentProfile.php | 75 ++-- src/Models/BillingSchedule.php | 48 ++- .../BankAccountPaymentProfileBuilder.php | 34 +- .../Builders/BillingScheduleBuilder.php | 9 + .../Builders/CreditNoteLineItemBuilder.php | 11 + .../Builders/InvoiceLineItemBuilder.php | 11 + src/Models/CreateAllocation.php | 10 +- src/Models/CreateInvoice.php | 6 + src/Models/CreatePaymentProfile.php | 12 +- src/Models/CreateUsage.php | 10 +- src/Models/CreditCardPaymentProfile.php | 10 +- src/Models/CreditNoteLineItem.php | 41 ++ src/Models/EventKey.php | 3 + src/Models/InvoiceLineItem.php | 41 ++ src/Models/PaymentProfileAttributes.php | 10 +- src/Models/WebhookSubscription.php | 3 + 192 files changed, 5450 insertions(+), 649 deletions(-) diff --git a/README.md b/README.md index b00986e7..d9d24861 100644 --- a/README.md +++ b/README.md @@ -29,30 +29,30 @@ curl -u :x -H Accept:application/json -H Content-Type:application/json Run the following command to install the package and automatically add the dependency to your composer.json file: ```bash -composer require "maxio/advanced-billing-sdk:9.0.0" +composer require "maxio/advanced-billing-sdk:9.1.0" ``` Or add it to the composer.json file manually as given below: ```json "require": { - "maxio/advanced-billing-sdk": "9.0.0" + "maxio/advanced-billing-sdk": "9.1.0" } ``` You can also view the package at: -https://packagist.org/packages/maxio/advanced-billing-sdk#9.0.0 +https://packagist.org/packages/maxio/advanced-billing-sdk#9.1.0 ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-php-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-php-sdk/tree/9.0.0/README.md#environments) | The API environment.
**Default: `Environment.US`** | +| environment | [`Environment`](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/README.md#environments) | The API environment.
**Default: `Environment.US`** | | timeout | `int` | Timeout for API calls in seconds.
*Default*: `120` | | enableRetries | `bool` | Whether to enable retries and backoff feature.
*Default*: `false` | | numberOfRetries | `int` | The number of retries to make.
*Default*: `0` | @@ -62,8 +62,8 @@ The following parameters are configurable for the API Client: | retryOnTimeout | `bool` | Whether to retry on request timeout.
*Default*: `true` | | httpStatusCodesToRetry | `array` | Http status codes to retry against.
*Default*: `408, 413, 429, 500, 502, 503, 504, 521, 522, 524` | | httpMethodsToRetry | `array` | Http methods to retry against.
*Default*: `'GET', 'PUT'` | -| proxyConfiguration | [`ProxyConfigurationBuilder`](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/proxy-configuration-builder.md) | Represents the proxy configurations for API calls | -| basicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | +| proxyConfiguration | [`ProxyConfigurationBuilder`](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/proxy-configuration-builder.md) | Represents the proxy configurations for API calls | +| basicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | The API client can be initialized as follows: @@ -99,56 +99,56 @@ 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-php-sdk/tree/9.0.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/subscription-products.md) -* [Subscription Renewals](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/subscription-renewals.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/subscription-products.md) +* [Subscription Renewals](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/subscription-renewals.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/controllers/webhooks.md) ## SDK Infrastructure ### Configuration -* [ProxyConfigurationBuilder](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/proxy-configuration-builder.md) +* [ProxyConfigurationBuilder](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/proxy-configuration-builder.md) ### HTTP -* [HttpRequest](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/http-request.md) -* [HttpResponse](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/http-response.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/http-request.md) +* [HttpResponse](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/http-response.md) ### Utilities -* [ApiException](https://www.github.com/maxio-com/ab-php-sdk/tree/9.0.0/doc/api-exception.md) +* [ApiException](https://www.github.com/maxio-com/ab-php-sdk/tree/9.1.0/doc/api-exception.md) diff --git a/doc/controllers/advance-invoice.md b/doc/controllers/advance-invoice.md index 24226431..63f07b25 100644 --- a/doc/controllers/advance-invoice.md +++ b/doc/controllers/advance-invoice.md @@ -26,6 +26,10 @@ We recommend using either the create or preview endpoints for proforma invoices function issueAdvanceInvoice(int $subscriptionId, ?IssueAdvanceInvoiceRequest $body = null): Invoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -35,6 +39,8 @@ function issueAdvanceInvoice(int $subscriptionId, ?IssueAdvanceInvoiceRequest $b ## Response Type +**201**: Created + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -78,6 +84,10 @@ Once an advance invoice has been generated for a subscription's upcoming renewal function readAdvanceInvoice(int $subscriptionId): Invoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -86,6 +96,8 @@ function readAdvanceInvoice(int $subscriptionId): Invoice ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -120,6 +132,10 @@ A `reason` is required in order to void, and the invoice must have an open statu function voidAdvanceInvoice(int $subscriptionId, ?VoidInvoiceRequest $body = null): Invoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -129,6 +145,8 @@ function voidAdvanceInvoice(int $subscriptionId, ?VoidInvoiceRequest $body = nul ## 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 3f3d66bb..867dbfc0 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -31,6 +31,10 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/proforma_invoices/123 function listExportedProformaInvoices(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -41,6 +45,8 @@ function listExportedProformaInvoices(array $options): array ## Response Type +**200**: OK + [`ProformaInvoice[]`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -80,6 +86,10 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per function listExportedInvoices(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -90,6 +100,8 @@ function listExportedInvoices(array $options): array ## Response Type +**200**: OK + [`Invoice[]`](../../doc/models/invoice.md) ## Example Usage @@ -129,6 +141,10 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/subscriptions/123/row function listExportedSubscriptions(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -139,6 +155,8 @@ function listExportedSubscriptions(array $options): array ## Response Type +**200**: OK + [`Subscription[]`](../../doc/models/subscription.md) ## Example Usage @@ -178,8 +196,14 @@ It is only available for Relationship Invoicing architecture. function exportProformaInvoices(): BatchJobResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**201**: Created + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -214,8 +238,14 @@ This API creates an invoices export and returns a batchjob object. function exportInvoices(): BatchJobResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**201**: Created + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -250,8 +280,14 @@ This API creates a subscriptions export and returns a batchjob object. function exportSubscriptions(): BatchJobResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**201**: Created + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -285,6 +321,10 @@ This API returns a batchjob object for proforma invoices export. function readProformaInvoicesExport(string $batchId): BatchJobResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -293,6 +333,8 @@ function readProformaInvoicesExport(string $batchId): BatchJobResponse ## Response Type +**200**: OK + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -326,6 +368,10 @@ This API returns a batchjob object for invoices export. function readInvoicesExport(string $batchId): BatchJobResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -334,6 +380,8 @@ function readInvoicesExport(string $batchId): BatchJobResponse ## Response Type +**200**: OK + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -367,6 +415,10 @@ This API returns a batchjob object for subscriptions export. function readSubscriptionsExport(string $batchId): BatchJobResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -375,6 +427,8 @@ function readSubscriptionsExport(string $batchId): BatchJobResponse ## 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 f154dd8f..78645c49 100644 --- a/doc/controllers/billing-portal.md +++ b/doc/controllers/billing-portal.md @@ -38,6 +38,10 @@ In order to prevent abuse & overuse, we ask that you request a new URL only when function enableBillingPortalForCustomer(int $customerId, ?int $autoInvite = null): CustomerResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -47,6 +51,8 @@ function enableBillingPortalForCustomer(int $customerId, ?int $autoInvite = null ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -90,6 +96,10 @@ This method will provide to the API user the exact URL required for a subscriber function readBillingPortalLink(int $customerId): PortalManagementLink ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -98,6 +108,8 @@ function readBillingPortalLink(int $customerId): PortalManagementLink ## Response Type +**200**: OK + [`PortalManagementLink`](../../doc/models/portal-management-link.md) ## Example Usage @@ -161,6 +173,10 @@ This endpoint will only return a JSON response. function resendBillingPortalInvitation(int $customerId): ResentInvitation ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -169,6 +185,8 @@ function resendBillingPortalInvitation(int $customerId): ResentInvitation ## Response Type +**200**: OK + [`ResentInvitation`](../../doc/models/resent-invitation.md) ## Example Usage @@ -222,6 +240,10 @@ This endpoint will only return a JSON response. function revokeBillingPortalAccess(int $customerId): RevokedInvitation ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -230,6 +252,8 @@ function revokeBillingPortalAccess(int $customerId): RevokedInvitation ## 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 0948579f..4a129898 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -36,6 +36,10 @@ Note: Custom price points are not able to be set as the default for a component. function promoteComponentPricePointToDefault(int $componentId, int $pricePointId): ComponentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -45,6 +49,8 @@ function promoteComponentPricePointToDefault(int $componentId, int $pricePointId ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -113,6 +119,10 @@ function createComponentPricePoint( ): ComponentPricePointResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -122,6 +132,8 @@ function createComponentPricePoint( ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -194,6 +206,10 @@ If the price point is set to `use_site_exchange_rate: true`, it will return pric function listComponentPricePoints(array $options): ComponentPricePointsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -206,6 +222,8 @@ function listComponentPricePoints(array $options): ComponentPricePointsResponse ## Response Type +**201**: Created + [`ComponentPricePointsResponse`](../../doc/models/component-price-points-response.md) ## Example Usage @@ -290,6 +308,10 @@ function bulkCreateComponentPricePoints( ): ComponentPricePointsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -299,6 +321,8 @@ function bulkCreateComponentPricePoints( ## Response Type +**200**: OK + [`ComponentPricePointsResponse`](../../doc/models/component-price-points-response.md) ## Example Usage @@ -439,6 +463,10 @@ function cloneComponentPricePoint( ): ComponentPricePointCurrencyOverageResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -449,6 +477,8 @@ function cloneComponentPricePoint( ## Response Type +**201**: Created + [`ComponentPricePointCurrencyOverageResponse`](../../doc/models/component-price-point-currency-overage-response.md) ## Example Usage @@ -579,6 +609,10 @@ function updateComponentPricePoint( ): ComponentPricePointResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -589,6 +623,8 @@ function updateComponentPricePoint( ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -667,6 +703,10 @@ function readComponentPricePoint( ): ComponentPricePointCurrencyOverageResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -677,6 +717,8 @@ function readComponentPricePoint( ## Response Type +**200**: OK + [`ComponentPricePointCurrencyOverageResponse`](../../doc/models/component-price-point-currency-overage-response.md) ## Example Usage @@ -709,6 +751,10 @@ A price point can be archived at any time. Subscriptions using a price point tha function archiveComponentPricePoint($componentId, $pricePointId): ComponentPricePointResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -718,6 +764,8 @@ function archiveComponentPricePoint($componentId, $pricePointId): ComponentPrice ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -792,6 +840,10 @@ Use this endpoint to unarchive a component price point. function unarchiveComponentPricePoint(int $componentId, int $pricePointId): ComponentPricePointResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -801,6 +853,8 @@ function unarchiveComponentPricePoint(int $componentId, int $pricePointId): Comp ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -874,6 +928,10 @@ function createCurrencyPrices( ): ComponentCurrencyPricesResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -883,6 +941,8 @@ function createCurrencyPrices( ## Response Type +**200**: OK + [`ComponentCurrencyPricesResponse`](../../doc/models/component-currency-prices-response.md) ## Example Usage @@ -958,6 +1018,10 @@ function updateCurrencyPrices( ): ComponentCurrencyPricesResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -967,6 +1031,8 @@ function updateCurrencyPrices( ## Response Type +**200**: OK + [`ComponentCurrencyPricesResponse`](../../doc/models/component-currency-prices-response.md) ## Example Usage @@ -1035,6 +1101,10 @@ This method allows to retrieve a list of Components Price Points belonging to a function listAllComponentPricePoints(array $options): ListComponentsPricePointsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1047,6 +1117,8 @@ function listAllComponentPricePoints(array $options): ListComponentsPricePointsR ## 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 63dab575..4d0b57bf 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -12,7 +12,7 @@ $componentsController = $client->getComponentsController(); * [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) @@ -28,7 +28,7 @@ $componentsController = $client->getComponentsController(); 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. -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. @@ -41,6 +41,10 @@ function createMeteredComponent( ): ComponentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -50,6 +54,8 @@ function createMeteredComponent( ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -173,6 +179,10 @@ function createQuantityBasedComponent( ): ComponentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -182,6 +192,8 @@ function createQuantityBasedComponent( ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -284,7 +296,7 @@ try { | 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. @@ -296,6 +308,10 @@ For more information on components, see our documentation [here](https://maxio.z function createOnOffComponent(string $productFamilyId, ?CreateOnOffComponent $body = null): ComponentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -305,6 +321,8 @@ function createOnOffComponent(string $productFamilyId, ?CreateOnOffComponent $bo ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -405,6 +423,10 @@ function createPrepaidUsageComponent( ): ComponentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -414,6 +436,8 @@ function createPrepaidUsageComponent( ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -556,6 +580,10 @@ For more information on components, see our documentation [here](https://maxio.z function createEventBasedComponent(string $productFamilyId, ?CreateEBBComponent $body = null): ComponentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -565,6 +593,8 @@ function createEventBasedComponent(string $productFamilyId, ?CreateEBBComponent ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -663,6 +693,10 @@ This request will return information regarding a component having the handle you function findComponent(string $handle): ComponentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -671,6 +705,8 @@ function findComponent(string $handle): ComponentResponse ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -730,6 +766,10 @@ You can read the component by either the component's id or handle. When using th function readComponent(int $productFamilyId, string $componentId): ComponentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -739,6 +779,8 @@ function readComponent(int $productFamilyId, string $componentId): ComponentResp ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -808,6 +850,10 @@ function updateProductFamilyComponent( ): ComponentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -818,6 +864,8 @@ function updateProductFamilyComponent( ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -895,6 +943,10 @@ Sending a DELETE request to this endpoint will archive the component. All curren function archiveComponent(int $productFamilyId, string $componentId): Component ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -904,6 +956,8 @@ function archiveComponent(int $productFamilyId, string $componentId): Component ## Response Type +**200**: OK + [`Component`](../../doc/models/component.md) ## Example Usage @@ -970,6 +1024,10 @@ This request will return a list of components for a site. function listComponents(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -986,6 +1044,8 @@ function listComponents(array $options): array ## Response Type +**200**: OK + [`ComponentResponse[]`](../../doc/models/component-response.md) ## Example Usage @@ -1127,6 +1187,10 @@ You may read the component by either the component's id or handle. When using th function updateComponent(string $componentId, ?UpdateComponentRequest $body = null): ComponentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1136,6 +1200,8 @@ function updateComponent(string $componentId, ?UpdateComponentRequest $body = nu ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -1210,6 +1276,10 @@ This request will return a list of components for a particular product family. function listComponentsForProductFamily(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1227,6 +1297,8 @@ function listComponentsForProductFamily(array $options): array ## Response Type +**200**: OK + [`ComponentResponse[]`](../../doc/models/component-response.md) ## Example Usage diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index 69545281..790b23a5 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -47,6 +47,10 @@ You can restrict a coupon to only apply to specific products / components by opt function createCoupon(int $productFamilyId, ?CouponRequest $body = null): CouponResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -56,6 +60,8 @@ function createCoupon(int $productFamilyId, ?CouponRequest $body = null): Coupon ## Response Type +**201**: Created + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -126,6 +132,10 @@ List coupons for a specific Product Family in a Site. function listCouponsForProductFamily(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -138,6 +148,8 @@ function listCouponsForProductFamily(array $options): array ## Response Type +**200**: OK + [`CouponResponse[]`](../../doc/models/coupon-response.md) ## Example Usage @@ -286,6 +298,10 @@ function findCoupon( ): CouponResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -296,6 +312,8 @@ function findCoupon( ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -332,6 +350,10 @@ If the coupon is set to `use_site_exchange_rate: true`, it will return pricing b function readCoupon(int $productFamilyId, int $couponId, ?bool $currencyPrices = null): CouponResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -342,6 +364,8 @@ function readCoupon(int $productFamilyId, int $couponId, ?bool $currencyPrices = ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -411,6 +435,10 @@ You can restrict a coupon to only apply to specific products / components by opt function updateCoupon(int $productFamilyId, int $couponId, ?CouponRequest $body = null): CouponResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -421,6 +449,8 @@ function updateCoupon(int $productFamilyId, int $couponId, ?CouponRequest $body ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -523,6 +553,10 @@ The `archived_at` date and time will be assigned. function archiveCoupon(int $productFamilyId, int $couponId): CouponResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -532,6 +566,8 @@ function archiveCoupon(int $productFamilyId, int $couponId): CouponResponse ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -593,6 +629,10 @@ You can retrieve a list of coupons. function listCoupons(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -604,6 +644,8 @@ function listCoupons(array $options): array ## Response Type +**200**: OK + [`CouponResponse[]`](../../doc/models/coupon-response.md) ## Example Usage @@ -702,6 +744,10 @@ This request will provide details about the coupon usage as an array of data has function readCouponUsage(int $productFamilyId, int $couponId): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -711,6 +757,8 @@ function readCouponUsage(int $productFamilyId, int $couponId): array ## Response Type +**200**: OK + [`CouponUsage[]`](../../doc/models/coupon-usage.md) ## Example Usage @@ -797,6 +845,10 @@ https://.chargify.com/coupons/validate.?code=&pr function validateCoupon(string $code, ?int $productFamilyId = null): CouponResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -806,6 +858,8 @@ function validateCoupon(string $code, ?int $productFamilyId = null): CouponRespo ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -875,6 +929,10 @@ function createOrUpdateCouponCurrencyPrices( ): CouponCurrencyResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -884,6 +942,8 @@ function createOrUpdateCouponCurrencyPrices( ## Response Type +**200**: OK + [`CouponCurrencyResponse`](../../doc/models/coupon-currency-response.md) ## Example Usage @@ -974,6 +1034,10 @@ So, if the coupon subcode is `20%OFF`, the URL to delete this coupon subcode wou function createCouponSubcodes(int $couponId, ?CouponSubcodes $body = null): CouponSubcodesResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -983,6 +1047,8 @@ function createCouponSubcodes(int $couponId, ?CouponSubcodes $body = null): Coup ## Response Type +**200**: OK + [`CouponSubcodesResponse`](../../doc/models/coupon-subcodes-response.md) ## Example Usage @@ -1035,6 +1101,10 @@ This request allows you to request the subcodes that are attached to a coupon. function listCouponSubcodes(array $options): CouponSubcodes ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1045,6 +1115,8 @@ function listCouponSubcodes(array $options): CouponSubcodes ## Response Type +**200**: OK + [`CouponSubcodes`](../../doc/models/coupon-subcodes.md) ## Example Usage @@ -1115,6 +1187,10 @@ The response will contain: function updateCouponSubcodes(int $couponId, ?CouponSubcodes $body = null): CouponSubcodesResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1124,6 +1200,8 @@ function updateCouponSubcodes(int $couponId, ?CouponSubcodes $body = null): Coup ## Response Type +**200**: OK + [`CouponSubcodesResponse`](../../doc/models/coupon-subcodes-response.md) ## Example Usage @@ -1185,6 +1263,10 @@ Or if the coupon subcode is 20%OFF, the URL to delete this coupon subcode would function deleteCouponSubcode(int $couponId, string $subcode): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1194,6 +1276,8 @@ function deleteCouponSubcode(int $couponId, string $subcode): void ## Response Type +**200**: OK + `void` ## Example Usage diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md index e4fafae4..16b23983 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -42,6 +42,10 @@ See [Custom Fields Reference](https://docs.maxio.com/hc/en-us/articles/242661408 function createMetafields(string $resourceType, ?CreateMetafieldsRequest $body = null): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -51,6 +55,8 @@ function createMetafields(string $resourceType, ?CreateMetafieldsRequest $body = ## Response Type +**200**: OK + [`Metafield[]`](../../doc/models/metafield.md) ## Example Usage @@ -141,6 +147,10 @@ Lists the metafields and their associated details for a Site and resource type. function listMetafields(array $options): ListMetafieldsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -153,6 +163,8 @@ function listMetafields(array $options): ListMetafieldsResponse ## Response Type +**200**: OK + [`ListMetafieldsResponse`](../../doc/models/list-metafields-response.md) ## Example Usage @@ -238,6 +250,10 @@ With this endpoint, you can: function updateMetafield(string $resourceType, ?UpdateMetafieldsRequest $body = null): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -247,6 +263,8 @@ function updateMetafield(string $resourceType, ?UpdateMetafieldsRequest $body = ## Response Type +**200**: OK + [`Metafield[]`](../../doc/models/metafield.md) ## Example Usage @@ -282,6 +300,10 @@ Deletes a metafield from your Site. Removes the metafield and associated metadat function deleteMetafield(string $resourceType, ?string $name = null): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -291,6 +313,8 @@ function deleteMetafield(string $resourceType, ?string $name = null): void ## Response Type +**200**: OK + `void` ## Example Usage @@ -326,6 +350,10 @@ If you create metadata on a subscription or customer with a metafield that does function createMetadata(string $resourceType, int $resourceId, ?CreateMetadataRequest $body = null): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -336,6 +364,8 @@ function createMetadata(string $resourceType, int $resourceId, ?CreateMetadataRe ## Response Type +**200**: OK + [`Metadata[]`](../../doc/models/metadata.md) ## Example Usage @@ -390,6 +420,10 @@ Lists metadata and metafields for a specific customer or subscription. function listMetadata(array $options): PaginatedMetadata ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -401,6 +435,8 @@ function listMetadata(array $options): PaginatedMetadata ## Response Type +**200**: OK + [`PaginatedMetadata`](../../doc/models/paginated-metadata.md) ## Example Usage @@ -458,6 +494,10 @@ Each site is limited to 100 unique metafields per resource. This means you can h function updateMetadata(string $resourceType, int $resourceId, ?UpdateMetadataRequest $body = null): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -468,6 +508,8 @@ function updateMetadata(string $resourceType, int $resourceId, ?UpdateMetadataRe ## Response Type +**200**: OK + [`Metadata[]`](../../doc/models/metadata.md) ## Example Usage @@ -508,6 +550,10 @@ Deletes one or more metafields (and associated metadata) from the specified subs function deleteMetadata(string $resourceType, int $resourceId, ?string $name = null, ?array $names = null): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -519,6 +565,8 @@ function deleteMetadata(string $resourceType, int $resourceId, ?string $name = n ## Response Type +**200**: OK + `void` ## Example Usage @@ -555,6 +603,10 @@ Lists metadata for a specified array of subscriptions or customers. function listMetadataForResourceType(array $options): PaginatedMetadata ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -573,6 +625,8 @@ function listMetadataForResourceType(array $options): PaginatedMetadata ## 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 cc853ba6..e2d8cefe 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -50,6 +50,10 @@ For more: [Customer Locale](https://maxio.zendesk.com/hc/en-us/articles/24286672 function createCustomer(?CreateCustomerRequest $body = null): CustomerResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -58,6 +62,8 @@ function createCustomer(?CreateCustomerRequest $body = null): CustomerResponse ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -160,6 +166,10 @@ To retrieve a single, exact match by reference, use the [lookup endpoint](https: function listCustomers(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -176,6 +186,8 @@ function listCustomers(array $options): array ## Response Type +**200**: OK + [`CustomerResponse[]`](../../doc/models/customer-response.md) ## Example Usage @@ -291,6 +303,10 @@ Retrieves the Customer properties by Advanced Billing-generated Customer ID. function readCustomer(int $id): CustomerResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -299,6 +315,8 @@ function readCustomer(int $id): CustomerResponse ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -363,6 +381,10 @@ This method allows to update the Customer. function updateCustomer(int $id, ?UpdateCustomerRequest $body = null): CustomerResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -372,6 +394,8 @@ function updateCustomer(int $id, ?UpdateCustomerRequest $body = null): CustomerR ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -450,6 +474,10 @@ This method allows you to delete the Customer. function deleteCustomer(int $id): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -458,6 +486,8 @@ function deleteCustomer(int $id): void ## Response Type +**204**: No Content + `void` ## Example Usage @@ -483,6 +513,10 @@ Use this method to return the customer object if you have the unique **Reference function readCustomerByReference(string $reference): CustomerResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -491,6 +525,8 @@ function readCustomerByReference(string $reference): CustomerResponse ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -518,6 +554,10 @@ This method lists all subscriptions that belong to a customer. function listCustomerSubscriptions(int $customerId): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -526,6 +566,8 @@ function listCustomerSubscriptions(int $customerId): array ## Response Type +**200**: OK + [`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 ef25bcfa..2d2af477 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -32,6 +32,10 @@ function createSegment( ): SegmentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -42,6 +46,8 @@ function createSegment( ## Response Type +**201**: Created + [`SegmentResponse`](../../doc/models/segment-response.md) ## Example Usage @@ -116,6 +122,10 @@ You may specify component and/or price point by using either the numeric ID or t function listSegmentsForPricePoint(array $options): ListSegmentsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -128,6 +138,8 @@ function listSegmentsForPricePoint(array $options): ListSegmentsResponse ## Response Type +**200**: OK + [`ListSegmentsResponse`](../../doc/models/list-segments-response.md) ## Example Usage @@ -179,6 +191,10 @@ function updateSegment( ): SegmentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -190,6 +206,8 @@ function updateSegment( ## Response Type +**200**: OK + [`SegmentResponse`](../../doc/models/segment-response.md) ## Example Usage @@ -236,6 +254,10 @@ You may specify component and/or price point by using either the numeric ID or t function deleteSegment(string $componentId, string $pricePointId, float $id): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -246,6 +268,8 @@ function deleteSegment(string $componentId, string $pricePointId, float $id): vo ## Response Type +**204**: No Content + `void` ## Example Usage @@ -294,6 +318,10 @@ function bulkCreateSegments( ): ListSegmentsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -304,6 +332,8 @@ function bulkCreateSegments( ## Response Type +**201**: Created + [`ListSegmentsResponse`](../../doc/models/list-segments-response.md) ## Example Usage @@ -353,6 +383,10 @@ function bulkUpdateSegments( ): ListSegmentsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -363,6 +397,8 @@ function bulkUpdateSegments( ## 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 1e2ec85d..3cea1c12 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -90,6 +90,10 @@ Here’s an example event for the `subscription_state_change` event: function listEvents(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -108,6 +112,8 @@ function listEvents(array $options): array ## Response Type +**200**: OK + [`EventResponse[]`](../../doc/models/event-response.md) ## Example Usage @@ -216,6 +222,10 @@ For precise mappings from key to event_specific_data, refer to [Event](../../doc function listSubscriptionEvents(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -230,6 +240,8 @@ function listSubscriptionEvents(array $options): array ## Response Type +**200**: OK + [`EventResponse[]`](../../doc/models/event-response.md) ## Example Usage @@ -309,6 +321,10 @@ Get a count of all the events for a given site by using this method. function readEventsCount(array $options): CountResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -322,6 +338,8 @@ function readEventsCount(array $options): CountResponse ## 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 afb1c923..a37dad9e 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -13,7 +13,7 @@ $insightsController = $client->getInsightsController(); * [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 @@ -32,8 +32,14 @@ https://subdomain.chargify.com/dashboard function readSiteStats(): SiteSummary ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**200**: OK + [`SiteSummary`](../../doc/models/site-summary.md) ## Example Usage @@ -80,6 +86,10 @@ This endpoint returns your site's current MRR, including plan and usage breakout function readMrr(?\DateTime $atTime = null, ?int $subscriptionId = null): MRRResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -89,6 +99,8 @@ function readMrr(?\DateTime $atTime = null, ?int $subscriptionId = null): MRRRes ## Response Type +**200**: OK + [`MRRResponse`](../../doc/models/mrr-response.md) ## Example Usage @@ -159,6 +171,10 @@ Usage includes revenue from: function listMrrMovements(array $options): ListMRRResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -170,6 +186,8 @@ function listMrrMovements(array $options): ListMRRResponse ## Response Type +**200**: OK + [`ListMRRResponse`](../../doc/models/list-mrr-response.md) ## Example Usage @@ -244,7 +262,7 @@ try { ``` -# List Mrr Per Subscription +# List Mrr per Subscription **This endpoint is deprecated.** @@ -254,6 +272,10 @@ This endpoint returns your site's current MRR, including plan and usage breakout function listMrrPerSubscription(array $options): SubscriptionMRRResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -266,6 +288,8 @@ function listMrrPerSubscription(array $options): SubscriptionMRRResponse ## 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 fa22ebce..fd159b98 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -37,12 +37,16 @@ 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). ```php function refundInvoice(string $uid, ?RefundInvoiceRequest $body = null): Invoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -52,6 +56,8 @@ function refundInvoice(string $uid, ?RefundInvoiceRequest $body = null): Invoice ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -102,6 +108,10 @@ By default, invoices returned on the index will only include totals, not detaile function listInvoices(array $options): ListInvoicesResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -132,6 +142,8 @@ function listInvoices(array $options): ListInvoicesResponse ## Response Type +**200**: OK + [`ListInvoicesResponse`](../../doc/models/list-invoices-response.md) ## Example Usage @@ -471,6 +483,10 @@ Response: A single Invoice. function readInvoice(string $uid): Invoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -479,6 +495,8 @@ function readInvoice(string $uid): Invoice ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -574,6 +592,7 @@ try { "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", @@ -638,6 +657,10 @@ Note - invoice events that occurred prior to 09/05/2018 __will not__ contain an function listInvoiceEvents(array $options): ListInvoiceEventsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -652,6 +675,8 @@ function listInvoiceEvents(array $options): ListInvoiceEventsResponse ## Response Type +**200**: OK + [`ListInvoiceEventsResponse`](../../doc/models/list-invoice-events-response.md) ## Example Usage @@ -776,6 +801,7 @@ try { "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", @@ -796,6 +822,7 @@ try { "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", @@ -844,6 +871,7 @@ try { "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", @@ -892,6 +920,7 @@ try { "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", @@ -1065,6 +1094,10 @@ Applies a payment of a given type against a specific invoice. If you would like function recordPaymentForInvoice(string $uid, ?CreateInvoicePaymentRequest $body = null): Invoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1074,6 +1107,8 @@ function recordPaymentForInvoice(string $uid, ?CreateInvoicePaymentRequest $body ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -1119,7 +1154,7 @@ try { 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. ``` { @@ -1150,6 +1185,10 @@ function recordPaymentForMultipleInvoices( ): MultiInvoicePaymentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1158,6 +1197,8 @@ function recordPaymentForMultipleInvoices( ## Response Type +**200**: OK + [`MultiInvoicePaymentResponse`](../../doc/models/multi-invoice-payment-response.md) ## Example Usage @@ -1237,6 +1278,10 @@ By default, the credit notes returned by this endpoint will exclude the arrays o function listCreditNotes(array $options): ListCreditNotesResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1252,6 +1297,8 @@ function listCreditNotes(array $options): ListCreditNotesResponse ## Response Type +**200**: OK + [`ListCreditNotesResponse`](../../doc/models/list-credit-notes-response.md) ## Example Usage @@ -1347,6 +1394,7 @@ try { "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", @@ -1365,6 +1413,7 @@ try { "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", @@ -1383,6 +1432,7 @@ try { "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", @@ -1401,6 +1451,7 @@ try { "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", @@ -1419,6 +1470,7 @@ try { "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", @@ -1437,6 +1489,7 @@ try { "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", @@ -1588,6 +1641,10 @@ Use this endpoint to retrieve the details for a credit note. function readCreditNote(string $uid): CreditNote ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1596,6 +1653,8 @@ function readCreditNote(string $uid): CreditNote ## Response Type +**200**: OK + [`CreditNote`](../../doc/models/credit-note.md) ## Example Usage @@ -1681,6 +1740,7 @@ try { "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", @@ -1701,6 +1761,7 @@ try { "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", @@ -1721,6 +1782,7 @@ try { "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", @@ -1741,6 +1803,7 @@ try { "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", @@ -1761,6 +1824,7 @@ try { "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", @@ -1781,6 +1845,7 @@ try { "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", @@ -1941,6 +2006,10 @@ function recordPaymentForSubscription( ): RecordPaymentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1950,6 +2019,8 @@ function recordPaymentForSubscription( ## Response Type +**201**: OK + [`RecordPaymentResponse`](../../doc/models/record-payment-response.md) ## Example Usage @@ -2030,6 +2101,10 @@ When reopening a consolidated invoice, all of its canceled segments will also be function reopenInvoice(string $uid): Invoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2038,6 +2113,8 @@ function reopenInvoice(string $uid): Invoice ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -2074,6 +2151,10 @@ This endpoint allows you to void any invoice with the "open" or "canceled" statu function voidInvoice(string $uid, ?VoidInvoiceRequest $body = null): Invoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2083,6 +2164,8 @@ function voidInvoice(string $uid, ?VoidInvoiceRequest $body = null): Invoice ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -2128,6 +2211,10 @@ Invoice segments returned on the index will only include totals, not detailed br function listConsolidatedInvoiceSegments(array $options): ConsolidatedInvoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2139,6 +2226,8 @@ function listConsolidatedInvoiceSegments(array $options): ConsolidatedInvoice ## Response Type +**200**: OK + [`ConsolidatedInvoice`](../../doc/models/consolidated-invoice.md) ## Example Usage @@ -2477,13 +2566,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 @@ -2491,7 +2580,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 @@ -2628,7 +2717,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 @@ -2640,7 +2729,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 @@ -2650,6 +2739,10 @@ By default, invoices will be created with open status. Possible alternative is ` function createInvoice(int $subscriptionId, ?CreateInvoiceRequest $body = null): InvoiceResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2659,6 +2752,8 @@ function createInvoice(int $subscriptionId, ?CreateInvoiceRequest $body = null): ## Response Type +**200**: OK + [`InvoiceResponse`](../../doc/models/invoice-response.md) ## Example Usage @@ -2781,6 +2876,7 @@ try { "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", @@ -2818,6 +2914,10 @@ On success, a 204 no-content response will be returned. The response does not in function sendInvoice(string $uid, ?SendInvoiceRequest $body = null): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2827,6 +2927,8 @@ function sendInvoice(string $uid, ?SendInvoiceRequest $body = null): void ## Response Type +**204**: No Content + `void` ## Example Usage @@ -2875,7 +2977,7 @@ try { # 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. @@ -2883,6 +2985,10 @@ The endpoint doesn't accept a request body. Customer information differences are function previewCustomerInformationChanges(string $uid): CustomerChangesPreviewResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2891,6 +2997,8 @@ function previewCustomerInformationChanges(string $uid): CustomerChangesPreviewR ## Response Type +**200**: OK + [`CustomerChangesPreviewResponse`](../../doc/models/customer-changes-preview-response.md) ## Example Usage @@ -2974,7 +3082,7 @@ try { # 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. @@ -2982,6 +3090,10 @@ The endpoint doesn't accept a request body. Customer information differences are function updateCustomerInformation(string $uid): Invoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2990,6 +3102,8 @@ function updateCustomerInformation(string $uid): Invoice ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -3212,9 +3326,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. @@ -3224,6 +3338,10 @@ For Automatic subscriptions, prepayments and service credits will apply to the i function issueInvoice(string $uid, ?IssueInvoiceRequest $body = null): Invoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -3233,6 +3351,8 @@ function issueInvoice(string $uid, ?IssueInvoiceRequest $body = null): Invoice ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md index 520b0737..ab0e1c00 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -37,6 +37,10 @@ You can optionally pass in a `product_price_point_id` that corresponds with the function createOffer(?CreateOfferRequest $body = null): OfferResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -45,6 +49,8 @@ function createOffer(?CreateOfferRequest $body = null): OfferResponse ## Response Type +**201**: Created + [`OfferResponse`](../../doc/models/offer-response.md) ## Example Usage @@ -144,6 +150,10 @@ This endpoint will list offers for a site. function listOffers(array $options): ListOffersResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -154,6 +164,8 @@ function listOffers(array $options): ListOffersResponse ## Response Type +**200**: OK + [`ListOffersResponse`](../../doc/models/list-offers-response.md) ## Example Usage @@ -248,6 +260,10 @@ This method allows you to list a specific offer's attributes. This is different function readOffer(int $offerId): OfferResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -256,6 +272,8 @@ function readOffer(int $offerId): OfferResponse ## Response Type +**200**: OK + [`OfferResponse`](../../doc/models/offer-response.md) ## Example Usage @@ -283,6 +301,10 @@ Archive an existing offer. Please provide an `offer_id` in order to archive the function archiveOffer(int $offerId): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -291,6 +313,8 @@ function archiveOffer(int $offerId): void ## Response Type +**200**: OK + `void` ## Example Usage @@ -316,6 +340,10 @@ Unarchive a previously archived offer. Please provide an `offer_id` in order to function unarchiveOffer(int $offerId): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -324,6 +352,8 @@ function unarchiveOffer(int $offerId): void ## Response Type +**200**: OK + `void` ## Example Usage diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index f0d95257..ef712955 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) + + [CMaxio.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. ```php function createPaymentProfile(?CreatePaymentProfileRequest $body = null): PaymentProfileResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -117,6 +76,8 @@ function createPaymentProfile(?CreatePaymentProfileRequest $body = null): Paymen ## Response Type +**200**: OK + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -187,6 +148,10 @@ This method will return all of the active `payment_profiles` for a Site, or for function listPaymentProfiles(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -197,6 +162,8 @@ function listPaymentProfiles(array $options): array ## Response Type +**200**: OK + [`PaymentProfileResponse[]`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -326,6 +293,10 @@ Example response for Bank Account: function readPaymentProfile(int $paymentProfileId): PaymentProfileResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -334,6 +305,8 @@ function readPaymentProfile(int $paymentProfileId): PaymentProfileResponse ## Response Type +**200**: OK + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -434,6 +407,10 @@ function updatePaymentProfile( ): PaymentProfileResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -443,6 +420,8 @@ function updatePaymentProfile( ## Response Type +**200**: OK + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -516,6 +495,10 @@ If the payment profile is in use by one or more subscriptions or groups, a 422 a function deleteUnusedPaymentProfile(int $paymentProfileId): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -524,6 +507,8 @@ function deleteUnusedPaymentProfile(int $paymentProfileId): void ## Response Type +**204**: No Content + `void` ## Example Usage @@ -562,6 +547,10 @@ Deletes a payment profile belonging to the customer on the subscription. function deleteSubscriptionsPaymentProfile(int $subscriptionId, int $paymentProfileId): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -571,6 +560,8 @@ function deleteSubscriptionsPaymentProfile(int $subscriptionId, int $paymentProf ## Response Type +**204**: No Content + `void` ## Example Usage @@ -604,6 +595,10 @@ function verifyBankAccount( ): BankAccountResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -613,6 +608,8 @@ function verifyBankAccount( ## Response Type +**200**: OK + [`BankAccountResponse`](../../doc/models/bank-account-response.md) ## Example Usage @@ -689,6 +686,10 @@ Deletes a Payment Profile belonging to a Subscription Group. function deleteSubscriptionGroupPaymentProfile(string $uid, int $paymentProfileId): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -698,6 +699,8 @@ function deleteSubscriptionGroupPaymentProfile(string $uid, int $paymentProfileI ## Response Type +**204**: No Content + `void` ## Example Usage @@ -733,6 +736,10 @@ function changeSubscriptionDefaultPaymentProfile( ): PaymentProfileResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -742,6 +749,8 @@ function changeSubscriptionDefaultPaymentProfile( ## Response Type +**201**: Created + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -819,6 +828,10 @@ function changeSubscriptionGroupDefaultPaymentProfile( ): PaymentProfileResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -828,6 +841,8 @@ function changeSubscriptionGroupDefaultPaymentProfile( ## Response Type +**201**: Created + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -901,6 +916,10 @@ To obtain a One Time Token you have to use [Chargify.js](https://docs.maxio.com/ function readOneTimeToken(string $chargifyToken): GetOneTimeTokenRequest ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -909,6 +928,8 @@ function readOneTimeToken(string $chargifyToken): GetOneTimeTokenRequest ## Response Type +**200**: OK + [`GetOneTimeTokenRequest`](../../doc/models/get-one-time-token-request.md) ## Example Usage @@ -950,6 +971,10 @@ These error responses are designed to prevent excessive or invalid requests, and function sendRequestUpdatePaymentEmail(int $subscriptionId): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -958,6 +983,8 @@ function sendRequestUpdatePaymentEmail(int $subscriptionId): void ## Response Type +**201**: Created + `void` ## Example Usage diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index ea82d472..ded047d9 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. function listProductsForProductFamily(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -42,6 +46,8 @@ function listProductsForProductFamily(array $options): array ## Response Type +**200**: OK + [`ProductResponse[]`](../../doc/models/product-response.md) ## Example Usage @@ -191,6 +197,10 @@ Full documentation on how Product Families operate within the Advanced Billing U function createProductFamily(?CreateProductFamilyRequest $body = null): ProductFamilyResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -199,6 +209,8 @@ function createProductFamily(?CreateProductFamilyRequest $body = null): ProductF ## Response Type +**201**: Created + [`ProductFamilyResponse`](../../doc/models/product-family-response.md) ## Example Usage @@ -254,6 +266,10 @@ Retrieve a list of Product Families for a site. function listProductFamilies(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -266,6 +282,8 @@ function listProductFamilies(array $options): array ## Response Type +**200**: OK + [`ProductFamilyResponse[]`](../../doc/models/product-family-response.md) ## Example Usage @@ -328,6 +346,10 @@ The product family can be specified either with the id number, or with the `hand function readProductFamily(int $id): ProductFamilyResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -336,6 +358,8 @@ function readProductFamily(int $id): ProductFamilyResponse ## 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 b0a22b08..2567d846 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -34,6 +34,10 @@ function createProductPricePoint( ): ProductPricePointResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -43,6 +47,8 @@ function createProductPricePoint( ## Response Type +**201**: Created + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -127,6 +133,10 @@ Retrieves a list of product price points. function listProductPricePoints(array $options): ListProductPricePointsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -140,6 +150,8 @@ function listProductPricePoints(array $options): ListProductPricePointsResponse ## Response Type +**200**: OK + [`ListProductPricePointsResponse`](../../doc/models/list-product-price-points-response.md) ## Example Usage @@ -207,6 +219,10 @@ function updateProductPricePoint( ): ProductPricePointResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -217,6 +233,8 @@ function updateProductPricePoint( ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -288,6 +306,10 @@ function readProductPricePoint( ): ProductPricePointResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -298,6 +320,8 @@ function readProductPricePoint( ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -357,6 +381,10 @@ Archives a product price point. function archiveProductPricePoint($productId, $pricePointId): ProductPricePointResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -366,6 +394,8 @@ function archiveProductPricePoint($productId, $pricePointId): ProductPricePointR ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -433,6 +463,10 @@ Use this endpoint to unarchive an archived product price point. function unarchiveProductPricePoint(int $productId, int $pricePointId): ProductPricePointResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -442,6 +476,8 @@ function unarchiveProductPricePoint(int $productId, int $pricePointId): ProductP ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -503,6 +539,10 @@ Note: Custom product price points cannot be set as the default for a product. function promoteProductPricePointToDefault(int $productId, int $pricePointId): ProductResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -512,6 +552,8 @@ function promoteProductPricePointToDefault(int $productId, int $pricePointId): P ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -600,6 +642,10 @@ function bulkCreateProductPricePoints( ): BulkCreateProductPricePointsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -609,6 +655,8 @@ function bulkCreateProductPricePoints( ## Response Type +**201**: Created + [`BulkCreateProductPricePointsResponse`](../../doc/models/bulk-create-product-price-points-response.md) ## Example Usage @@ -718,6 +766,10 @@ function createProductCurrencyPrices( ): CurrencyPricesResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -727,6 +779,8 @@ function createProductCurrencyPrices( ## Response Type +**200**: OK + [`CurrencyPricesResponse`](../../doc/models/currency-prices-response.md) ## Example Usage @@ -809,6 +863,10 @@ function updateProductCurrencyPrices( ): CurrencyPricesResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -818,6 +876,8 @@ function updateProductCurrencyPrices( ## Response Type +**200**: OK + [`CurrencyPricesResponse`](../../doc/models/currency-prices-response.md) ## Example Usage @@ -886,6 +946,10 @@ This method allows retrieval of a list of Products Price Points belonging to a S function listAllProductPricePoints(array $options): ListProductPricePointsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -898,6 +962,8 @@ function listAllProductPricePoints(array $options): ListProductPricePointsRespon ## 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 d0d1371f..f1cb971c 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -31,6 +31,10 @@ See the following product docuemation for more information: function createProduct(string $productFamilyId, ?CreateOrUpdateProductRequest $body = null): ProductResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -40,6 +44,8 @@ function createProduct(string $productFamilyId, ?CreateOrUpdateProductRequest $b ## Response Type +**201**: Created + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -143,6 +149,10 @@ Reads the current details of a product. function readProduct(int $productId): ProductResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -151,6 +161,8 @@ function readProduct(int $productId): ProductResponse ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -229,6 +241,10 @@ Updating a product using this endpoint will create a new price point and set it function updateProduct(int $productId, ?CreateOrUpdateProductRequest $body = null): ProductResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -238,6 +254,8 @@ function updateProduct(int $productId, ?CreateOrUpdateProductRequest $body = nul ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -323,6 +341,10 @@ This will restrict the option to chose the product for purchase via the Billing function archiveProduct(int $productId): ProductResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -331,6 +353,8 @@ function archiveProduct(int $productId): ProductResponse ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -409,6 +433,10 @@ Retrieves a Product object by its `api_handle`. function readProductByHandle(string $apiHandle): ProductResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -417,6 +445,8 @@ function readProductByHandle(string $apiHandle): ProductResponse ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -512,6 +542,10 @@ This method allows to retrieve a list of Products belonging to a Site. function listProducts(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -529,6 +563,8 @@ function listProducts(array $options): array ## Response Type +**200**: OK + [`ProductResponse[]`](../../doc/models/product-response.md) ## Example Usage diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md index 84f143ec..25fa0787 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -36,6 +36,10 @@ Proforma invoices are only available on Relationship Invoicing sites. To create function createConsolidatedProformaInvoice(string $uid): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -44,6 +48,8 @@ function createConsolidatedProformaInvoice(string $uid): void ## Response Type +**201**: Created + `void` ## Example Usage @@ -79,6 +85,10 @@ By default, proforma invoices returned on the index will only include totals, no function listSubscriptionGroupProformaInvoices(array $options): ListProformaInvoicesResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -93,6 +103,8 @@ function listSubscriptionGroupProformaInvoices(array $options): ListProformaInvo ## Response Type +**200**: OK + [`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md) ## Example Usage @@ -138,6 +150,10 @@ Proforma invoices are only available on Relationship Invoicing sites. function readProformaInvoice(string $proformaInvoiceUid): ProformaInvoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -146,6 +162,8 @@ function readProformaInvoice(string $proformaInvoiceUid): ProformaInvoice ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -185,6 +203,10 @@ Proforma invoices are only available on Relationship Invoicing sites. To create function createProformaInvoice(int $subscriptionId): ProformaInvoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -193,6 +215,8 @@ function createProformaInvoice(int $subscriptionId): ProformaInvoice ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -228,6 +252,10 @@ By default, proforma invoices returned on the index will only include totals, no function listProformaInvoices(array $options): ListProformaInvoicesResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -248,6 +276,8 @@ function listProformaInvoices(array $options): ListProformaInvoicesResponse ## Response Type +**200**: OK + [`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md) ## Example Usage @@ -294,6 +324,10 @@ function deliverProformaInvoice( ): ProformaInvoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -303,6 +337,8 @@ function deliverProformaInvoice( ## Response Type +**201**: Created + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -368,6 +404,10 @@ A reason for the void operation is required to be included in the request body. function voidProformaInvoice(string $proformaInvoiceUid, ?VoidInvoiceRequest $body = null): ProformaInvoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -377,6 +417,8 @@ function voidProformaInvoice(string $proformaInvoiceUid, ?VoidInvoiceRequest $bo ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -419,6 +461,10 @@ Alternatively, if you have some proforma invoices already, you may make a previe function previewProformaInvoice(int $subscriptionId): ProformaInvoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -427,6 +473,8 @@ function previewProformaInvoice(int $subscriptionId): ProformaInvoice ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -469,6 +517,10 @@ A product and customer first name, last name, and email are the minimum requirem function createSignupProformaInvoice(?CreateSubscriptionRequest $body = null): ProformaInvoice ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -477,6 +529,8 @@ function createSignupProformaInvoice(?CreateSubscriptionRequest $body = null): P ## Response Type +**201**: Created + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -535,6 +589,10 @@ function previewSignupProformaInvoice( ): SignupProformaPreviewResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -544,6 +602,8 @@ function previewSignupProformaInvoice( ## 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 7c5da3f3..17eb4387 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -39,6 +39,10 @@ This method gives a merchant the option to create a reason codes for a given Sit function createReasonCode(?CreateReasonCodeRequest $body = null): ReasonCodeResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -47,6 +51,8 @@ function createReasonCode(?CreateReasonCodeRequest $body = null): ReasonCodeResp ## Response Type +**200**: OK + [`ReasonCodeResponse`](../../doc/models/reason-code-response.md) ## Example Usage @@ -89,6 +95,10 @@ This method gives a merchant the option to retrieve a list of all of the current function listReasonCodes(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -98,6 +108,8 @@ function listReasonCodes(array $options): array ## Response Type +**200**: OK + [`ReasonCodeResponse[]`](../../doc/models/reason-code-response.md) ## Example Usage @@ -176,6 +188,10 @@ This method gives a merchant the option to retrieve a list of a particular code function readReasonCode(int $reasonCodeId): ReasonCodeResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -184,6 +200,8 @@ function readReasonCode(int $reasonCodeId): ReasonCodeResponse ## Response Type +**200**: OK + [`ReasonCodeResponse`](../../doc/models/reason-code-response.md) ## Example Usage @@ -217,6 +235,10 @@ This method gives a merchant the option to update an existing reason code for a function updateReasonCode(int $reasonCodeId, ?UpdateReasonCodeRequest $body = null): ReasonCodeResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -226,6 +248,8 @@ function updateReasonCode(int $reasonCodeId, ?UpdateReasonCodeRequest $body = nu ## Response Type +**200**: OK + [`ReasonCodeResponse`](../../doc/models/reason-code-response.md) ## Example Usage @@ -262,6 +286,10 @@ This method gives a merchant the option to delete one reason code from the Churn function deleteReasonCode(int $reasonCodeId): OkResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -270,6 +298,8 @@ function deleteReasonCode(int $reasonCodeId): OkResponse ## 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 7161f8eb..98afe92d 100644 --- a/doc/controllers/referral-codes.md +++ b/doc/controllers/referral-codes.md @@ -25,6 +25,10 @@ If the referral code is valid the status code will be `200` and the referral cod function validateReferralCode(string $code): ReferralValidationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -33,6 +37,8 @@ function validateReferralCode(string $code): ReferralValidationResponse ## 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 64698e10..9066a8b2 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -31,6 +31,10 @@ Access to the Sales Commission API endpoints is available to users with financia function listSalesCommissionSettings(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -43,6 +47,8 @@ function listSalesCommissionSettings(array $options): array ## Response Type +**200**: OK + [`SaleRepSettings[]`](../../doc/models/sale-rep-settings.md) ## Example Usage @@ -117,6 +123,10 @@ Access to the Sales Commission API endpoints is available to users with financia function listSalesReps(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -129,6 +139,8 @@ function listSalesReps(array $options): array ## Response Type +**200**: OK + [`ListSaleRepItem[]`](../../doc/models/list-sale-rep-item.md) ## Example Usage @@ -259,6 +271,10 @@ function readSalesRep( ): SaleRep ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -272,6 +288,8 @@ function readSalesRep( ## 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 3285fc74..0e9776c5 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -17,15 +17,15 @@ $sitesController = $client->getSitesController(); # 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: function readSite(): SiteResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**200**: OK + [`SiteResponse`](../../doc/models/site-response.md) ## Example Usage @@ -110,7 +116,7 @@ try { # 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.** @@ -118,6 +124,10 @@ This call is asynchronous and there may be a delay before the site data is fully function clearSite(?string $cleanupScope = CleanupScope::ALL): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -126,6 +136,8 @@ function clearSite(?string $cleanupScope = CleanupScope::ALL): void ## Response Type +**200**: OK + `void` ## Example Usage @@ -145,12 +157,16 @@ try { # List Chargify Js Public Keys -This endpoint returns public keys used for Chargify.js. +Returns public keys used for Maxio.js (formerly Chargify.js). ```php function listChargifyJsPublicKeys(array $options): ListPublicKeysResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -160,6 +176,8 @@ function listChargifyJsPublicKeys(array $options): ListPublicKeysResponse ## 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 16d76dee..d8d8313b 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -31,12 +31,16 @@ $subscriptionComponentsController = $client->getSubscriptionComponentsController # 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. ```php function readSubscriptionComponent(int $subscriptionId, int $componentId): SubscriptionComponentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -46,6 +50,8 @@ function readSubscriptionComponent(int $subscriptionId, int $componentId): Subsc ## Response Type +**200**: OK + [`SubscriptionComponentResponse`](../../doc/models/subscription-component-response.md) ## Example Usage @@ -97,7 +103,7 @@ try { # List Subscription Components -This request will list a subscription's applied components. +Lists a subscription's applied components. ## Archived Components @@ -107,6 +113,10 @@ When requesting to list components for a given subscription, if the subscription function listSubscriptionComponents(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -127,6 +137,8 @@ function listSubscriptionComponents(array $options): array ## Response Type +**200**: OK + [`SubscriptionComponentResponse[]`](../../doc/models/subscription-component-response.md) ## Example Usage @@ -215,6 +227,10 @@ function bulkUpdateSubscriptionComponentsPricePoints( ): BulkComponentsPricePointAssignment ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -224,6 +240,8 @@ function bulkUpdateSubscriptionComponentsPricePoints( ## Response Type +**200**: OK + [`BulkComponentsPricePointAssignment`](../../doc/models/bulk-components-price-point-assignment.md) ## Example Usage @@ -306,6 +324,10 @@ Resets all of a subscription's components to use the current default. function bulkResetSubscriptionComponentsPricePoints(int $subscriptionId): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -314,6 +336,8 @@ function bulkResetSubscriptionComponentsPricePoints(int $subscriptionId): Subscr ## Response Type +**201**: Created + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -439,7 +463,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) @@ -457,7 +481,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. ```php function allocateComponent( @@ -467,6 +491,10 @@ function allocateComponent( ): AllocationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -477,6 +505,8 @@ function allocateComponent( ## Response Type +**200**: OK + [`AllocationResponse`](../../doc/models/allocation-response.md) ## Example Usage @@ -597,7 +627,7 @@ try { # 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 @@ -607,6 +637,10 @@ When a subscription's on/off component has been toggled to on (`1`) or off (`0`) function listAllocations(int $subscriptionId, int $componentId, ?int $page = 1): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -617,6 +651,8 @@ function listAllocations(int $subscriptionId, int $componentId, ?int $page = 1): ## Response Type +**200**: OK + [`AllocationResponse[]`](../../doc/models/allocation-response.md) ## Example Usage @@ -700,7 +736,7 @@ try { # 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. @@ -718,12 +754,16 @@ 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. ```php function allocateComponents(int $subscriptionId, ?AllocateComponents $body = null): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -733,6 +773,8 @@ function allocateComponents(int $subscriptionId, ?AllocateComponents $body = nul ## Response Type +**200**: OK + [`AllocationResponse[]`](../../doc/models/allocation-response.md) ## Example Usage @@ -830,7 +872,7 @@ try { # 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` @@ -845,6 +887,10 @@ function previewAllocations( ): AllocationPreviewResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -854,6 +900,8 @@ function previewAllocations( ## Response Type +**200**: OK + [`AllocationPreviewResponse`](../../doc/models/allocation-preview-response.md) ## Example Usage @@ -1007,7 +1055,7 @@ try { # 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. @@ -1028,6 +1076,10 @@ function updatePrepaidUsageAllocationExpirationDate( ): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1039,6 +1091,8 @@ function updatePrepaidUsageAllocationExpirationDate( ## Response Type +**204**: OK + `void` ## Example Usage @@ -1084,7 +1138,9 @@ try { # 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 @@ -1103,6 +1159,10 @@ function deletePrepaidUsageAllocation( ): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1114,6 +1174,8 @@ function deletePrepaidUsageAllocation( ## Response Type +**200**: OK + `void` ## Example Usage @@ -1161,11 +1223,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) @@ -1211,6 +1273,10 @@ The `unit_balance` has a floor of `0`; negative unit balances are never allowed. function createUsage($subscriptionIdOrReference, $componentId, ?CreateUsageRequest $body = null): UsageResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1221,6 +1287,8 @@ function createUsage($subscriptionIdOrReference, $componentId, ?CreateUsageReque ## Response Type +**200**: OK + [`UsageResponse`](../../doc/models/usage-response.md) ## Example Usage @@ -1281,7 +1349,7 @@ try { # 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. @@ -1301,6 +1369,10 @@ Use this endpoint to read the previously recorded components for a subscription. function listUsages(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1316,6 +1388,8 @@ function listUsages(array $options): array ## Response Type +**200**: OK + [`UsageResponse[]`](../../doc/models/usage-response.md) ## Example Usage @@ -1373,6 +1447,8 @@ try { # 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). @@ -1389,6 +1465,10 @@ function activateEventBasedComponent( ): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1399,6 +1479,8 @@ function activateEventBasedComponent( ## Response Type +**200**: OK + `void` ## Example Usage @@ -1452,12 +1534,16 @@ try { # 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. ```php function deactivateEventBasedComponent(int $subscriptionId, int $componentId): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1467,6 +1553,8 @@ function deactivateEventBasedComponent(int $subscriptionId, int $componentId): v ## Response Type +**200**: OK + `void` ## Example Usage @@ -1491,6 +1579,8 @@ try { # 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. @@ -1515,6 +1605,10 @@ https://events.chargify.com/my-site-subdomain/events/my-stream-api-handle function recordEvent(string $apiHandle, ?string $storeUid = null, ?EBBEvent $body = null): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1525,6 +1619,8 @@ function recordEvent(string $apiHandle, ?string $storeUid = null, ?EBBEvent $bod ## Response Type +**201**: Created + `void` ## Example Usage @@ -1557,7 +1653,7 @@ try { # 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.* @@ -1567,6 +1663,10 @@ A maximum of 1000 events can be published in a single request. A 422 will be ret function bulkRecordEvents(string $apiHandle, ?string $storeUid = null, ?array $body = null): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1577,6 +1677,8 @@ function bulkRecordEvents(string $apiHandle, ?string $storeUid = null, ?array $b ## Response Type +**201**: Created + `void` ## Example Usage @@ -1611,12 +1713,16 @@ try { # List Subscription Components for Site -This request will list components applied to each subscription. +Lists components applied to each subscription. ```php function listSubscriptionComponentsForSite(array $options): ListSubscriptionComponentsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1638,6 +1744,8 @@ function listSubscriptionComponentsForSite(array $options): ListSubscriptionComp ## 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 4204f089..ddbca07b 100644 --- a/doc/controllers/subscription-group-invoice-account.md +++ b/doc/controllers/subscription-group-invoice-account.md @@ -18,7 +18,7 @@ $subscriptionGroupInvoiceAccountController = $client->getSubscriptionGroupInvoic # 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. ```php function createSubscriptionGroupPrepayment( @@ -27,6 +27,10 @@ function createSubscriptionGroupPrepayment( ): SubscriptionGroupPrepaymentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -36,6 +40,8 @@ function createSubscriptionGroupPrepayment( ## Response Type +**200**: OK + [`SubscriptionGroupPrepaymentResponse`](../../doc/models/subscription-group-prepayment-response.md) ## Example Usage @@ -77,12 +83,16 @@ try { # List Prepayments for Subscription Group -This request will list a subscription group's prepayments. +Lists a subscription group's prepayments. ```php function listPrepaymentsForSubscriptionGroup(array $options): ListSubscriptionGroupPrepaymentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -94,6 +104,8 @@ function listPrepaymentsForSubscriptionGroup(array $options): ListSubscriptionGr ## Response Type +**200**: OK + [`ListSubscriptionGroupPrepaymentResponse`](../../doc/models/list-subscription-group-prepayment-response.md) ## Example Usage @@ -152,7 +164,7 @@ try { # 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. ```php function issueSubscriptionGroupServiceCredit( @@ -161,6 +173,10 @@ function issueSubscriptionGroupServiceCredit( ): ServiceCreditResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -170,6 +186,8 @@ function issueSubscriptionGroupServiceCredit( ## Response Type +**200**: OK + [`ServiceCreditResponse`](../../doc/models/service-credit-response.md) ## Example Usage @@ -224,7 +242,7 @@ try { # 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. ```php function deductSubscriptionGroupServiceCredit( @@ -233,6 +251,10 @@ function deductSubscriptionGroupServiceCredit( ): ServiceCredit ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -242,6 +264,8 @@ function deductSubscriptionGroupServiceCredit( ## 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 13ce287b..adab185e 100644 --- a/doc/controllers/subscription-group-status.md +++ b/doc/controllers/subscription-group-status.md @@ -26,6 +26,10 @@ To cancel a subscription group while also charging for any unbilled usage on met function cancelSubscriptionsInGroup(string $uid, ?CancelGroupedSubscriptionsRequest $body = null): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -35,6 +39,8 @@ function cancelSubscriptionsInGroup(string $uid, ?CancelGroupedSubscriptionsRequ ## Response Type +**200**: OK + `void` ## Example Usage @@ -69,7 +75,7 @@ try { # 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. @@ -77,6 +83,10 @@ All subscriptions in the group must be on automatic billing in order to successf function initiateDelayedCancellationForGroup(string $uid): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -85,6 +95,8 @@ function initiateDelayedCancellationForGroup(string $uid): void ## Response Type +**200**: OK + `void` ## Example Usage @@ -112,12 +124,18 @@ try { # 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. ```php function cancelDelayedCancellationForGroup(string $uid): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -126,6 +144,8 @@ function cancelDelayedCancellationForGroup(string $uid): void ## Response Type +**200**: OK + `void` ## Example Usage @@ -153,15 +173,15 @@ try { # 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. @@ -173,6 +193,12 @@ 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. + ```php function reactivateSubscriptionGroup( string $uid, @@ -180,6 +206,10 @@ function reactivateSubscriptionGroup( ): ReactivateSubscriptionGroupResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -189,6 +219,8 @@ function reactivateSubscriptionGroup( ## 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 5da43515..149929d9 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -10,7 +10,7 @@ $subscriptionGroupsController = $client->getSubscriptionGroupsController(); ## 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 @@ $subscriptionGroupsController = $client->getSubscriptionGroupsController(); * [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,9 +31,9 @@ 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). ```php function signupWithSubscriptionGroup( @@ -41,6 +41,10 @@ function signupWithSubscriptionGroup( ): SubscriptionGroupSignupResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -49,6 +53,8 @@ function signupWithSubscriptionGroup( ## Response Type +**201**: Created + [`SubscriptionGroupSignupResponse`](../../doc/models/subscription-group-signup-response.md) ## Example Usage @@ -102,6 +108,10 @@ Creates a subscription group with given members. function createSubscriptionGroup(?CreateSubscriptionGroupRequest $body = null): SubscriptionGroupResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -110,6 +120,8 @@ function createSubscriptionGroup(?CreateSubscriptionGroupRequest $body = null): ## Response Type +**200**: OK + [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) ## Example Usage @@ -184,6 +196,10 @@ Account balance information for the subscription groups is not returned by defau function listSubscriptionGroups(array $options): ListSubscriptionGroupsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -194,6 +210,8 @@ function listSubscriptionGroups(array $options): ListSubscriptionGroupsResponse ## Response Type +**200**: OK + [`ListSubscriptionGroupsResponse`](../../doc/models/list-subscription-groups-response.md) ## Example Usage @@ -259,7 +277,7 @@ try { # Read Subscription Group -Use this endpoint to find subscription group details. +Returns subscription group details. #### Current Billing Amount in Cents @@ -269,6 +287,10 @@ Current billing amount for the subscription group is not returned by default. If function readSubscriptionGroup(string $uid, ?array $mInclude = null): FullSubscriptionGroupResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -278,6 +300,8 @@ function readSubscriptionGroup(string $uid, ?array $mInclude = null): FullSubscr ## Response Type +**200**: OK + [`FullSubscriptionGroupResponse`](../../doc/models/full-subscription-group-response.md) ## Example Usage @@ -348,8 +372,8 @@ try { # 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. ```php function updateSubscriptionGroupMembers( @@ -358,6 +382,10 @@ function updateSubscriptionGroupMembers( ): SubscriptionGroupResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -367,6 +395,8 @@ function updateSubscriptionGroupMembers( ## Response Type +**200**: OK + [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) ## Example Usage @@ -439,6 +469,10 @@ Only groups without members can be deleted. function deleteSubscriptionGroup(string $uid): DeleteSubscriptionGroupResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -447,6 +481,8 @@ function deleteSubscriptionGroup(string $uid): DeleteSubscriptionGroupResponse ## Response Type +**200**: OK + [`DeleteSubscriptionGroupResponse`](../../doc/models/delete-subscription-group-response.md) ## Example Usage @@ -483,14 +519,18 @@ try { # 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. ```php function findSubscriptionGroup(string $subscriptionId): FullSubscriptionGroupResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -499,6 +539,8 @@ function findSubscriptionGroup(string $subscriptionId): FullSubscriptionGroupRes ## Response Type +**200**: OK + [`FullSubscriptionGroupResponse`](../../doc/models/full-subscription-group-response.md) ## Example Usage @@ -589,6 +631,10 @@ function addSubscriptionToGroup( ): SubscriptionGroupResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -598,6 +644,8 @@ function addSubscriptionToGroup( ## Response Type +**200**: OK + [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) ## Example Usage @@ -662,14 +710,18 @@ try { ``` -# 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. ```php function removeSubscriptionFromGroup(int $subscriptionId): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -678,6 +730,8 @@ function removeSubscriptionFromGroup(int $subscriptionId): void ## 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 e818b423..75472cd1 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 function readAccountBalances(int $subscriptionId): AccountBalances ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -35,6 +39,8 @@ function readAccountBalances(int $subscriptionId): AccountBalances ## Response Type +**200**: OK + [`AccountBalances`](../../doc/models/account-balances.md) ## Example Usage @@ -56,7 +62,7 @@ try { # 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`. @@ -64,10 +70,20 @@ 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. + ```php function createPrepayment(int $subscriptionId, ?CreatePrepaymentRequest $body = null): CreatePrepaymentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -77,6 +93,8 @@ function createPrepayment(int $subscriptionId, ?CreatePrepaymentRequest $body = ## Response Type +**201**: Created + [`CreatePrepaymentResponse`](../../doc/models/create-prepayment-response.md) ## Example Usage @@ -132,12 +150,16 @@ try { # List Prepayments -This request will list a subscription's prepayments. +Lists a subscription's prepayments. ```php function listPrepayments(array $options): PrepaymentsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -149,6 +171,8 @@ function listPrepayments(array $options): PrepaymentsResponse ## Response Type +**200**: OK + [`PrepaymentsResponse`](../../doc/models/prepayments-response.md) ## Example Usage @@ -206,12 +230,16 @@ try { # 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. ```php function issueServiceCredit(int $subscriptionId, ?IssueServiceCreditRequest $body = null): ServiceCredit ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -221,6 +249,8 @@ function issueServiceCredit(int $subscriptionId, ?IssueServiceCreditRequest $bod ## Response Type +**201**: Created + [`ServiceCredit`](../../doc/models/service-credit.md) ## Example Usage @@ -269,12 +299,16 @@ try { # 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. ```php function deductServiceCredit(int $subscriptionId, ?DeductServiceCreditRequest $body = null): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -284,6 +318,8 @@ function deductServiceCredit(int $subscriptionId, ?DeductServiceCreditRequest $b ## Response Type +**201**: OK + `void` ## Example Usage @@ -320,7 +356,7 @@ try { # List Service Credits -This request will list a subscription's service credits. +Lists a subscription's service credits. ```php function listServiceCredits( @@ -331,6 +367,10 @@ function listServiceCredits( ): ListServiceCreditsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -342,6 +382,8 @@ function listServiceCredits( ## Response Type +**200**: OK + [`ListServiceCreditsResponse`](../../doc/models/list-service-credits-response.md) ## Example Usage @@ -409,7 +451,7 @@ try { # 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`. @@ -421,6 +463,10 @@ function refundPrepayment( ): PrepaymentResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -431,6 +477,8 @@ function refundPrepayment( ## 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 c92fc6c5..6cd425a8 100644 --- a/doc/controllers/subscription-notes.md +++ b/doc/controllers/subscription-notes.md @@ -19,7 +19,7 @@ $subscriptionNotesController = $client->getSubscriptionNotesController(); # 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 @@ -36,6 +36,10 @@ function createSubscriptionNote( ): SubscriptionNoteResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -45,6 +49,8 @@ function createSubscriptionNote( ## Response Type +**200**: OK + [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -84,12 +90,16 @@ try { # 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. ```php function listSubscriptionNotes(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -100,6 +110,8 @@ function listSubscriptionNotes(array $options): array ## Response Type +**200**: OK + [`SubscriptionNoteResponse[]`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -160,12 +172,16 @@ try { # 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. ```php function readSubscriptionNote(int $subscriptionId, int $noteId): SubscriptionNoteResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -175,6 +191,8 @@ function readSubscriptionNote(int $subscriptionId, int $noteId): SubscriptionNot ## Response Type +**200**: OK + [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -216,7 +234,7 @@ try { # Update Subscription Note -Use the following method to update a note for a Subscription. +Updates a note for a subscription. ```php function updateSubscriptionNote( @@ -226,6 +244,10 @@ function updateSubscriptionNote( ): SubscriptionNoteResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -236,6 +258,8 @@ function updateSubscriptionNote( ## Response Type +**200**: OK + [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -284,6 +308,10 @@ Deletes a note for a Subscription. function deleteSubscriptionNote(int $subscriptionId, int $noteId): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -293,6 +321,8 @@ function deleteSubscriptionNote(int $subscriptionId, int $noteId): void ## Response Type +**200**: OK + `void` ## Example Usage diff --git a/doc/controllers/subscription-products.md b/doc/controllers/subscription-products.md index e88c7d3f..cf5ef18a 100644 --- a/doc/controllers/subscription-products.md +++ b/doc/controllers/subscription-products.md @@ -16,6 +16,8 @@ $subscriptionProductsController = $client->getSubscriptionProductsController(); # 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,48 +32,13 @@ 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. ```php function migrateSubscriptionProduct( @@ -80,6 +47,10 @@ function migrateSubscriptionProduct( ): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -89,6 +60,8 @@ function migrateSubscriptionProduct( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -255,9 +228,11 @@ try { # 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. @@ -268,6 +243,10 @@ function previewSubscriptionProductMigration( ): SubscriptionMigrationPreviewResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -277,6 +256,8 @@ function previewSubscriptionProductMigration( ## 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 124c32f5..5cdc14cd 100644 --- a/doc/controllers/subscription-renewals.md +++ b/doc/controllers/subscription-renewals.md @@ -34,6 +34,10 @@ function createScheduledRenewalConfiguration( ): ScheduledRenewalConfigurationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -43,6 +47,8 @@ function createScheduledRenewalConfiguration( ## Response Type +**201**: Created + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -136,6 +142,10 @@ function listScheduledRenewalConfigurations( ): ScheduledRenewalConfigurationsResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -145,6 +155,8 @@ function listScheduledRenewalConfigurations( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationsResponse`](../../doc/models/scheduled-renewal-configurations-response.md) ## Example Usage @@ -217,6 +229,10 @@ Retrieves the configuration settings for the scheduled renewal. function readScheduledRenewalConfiguration(int $subscriptionId, int $id): ScheduledRenewalConfigurationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -226,6 +242,8 @@ function readScheduledRenewalConfiguration(int $subscriptionId, int $id): Schedu ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -305,6 +323,10 @@ function updateScheduledRenewalConfiguration( ): ScheduledRenewalConfigurationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -315,6 +337,8 @@ function updateScheduledRenewalConfiguration( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -411,6 +435,10 @@ function scheduleScheduledRenewalLockIn( ): ScheduledRenewalConfigurationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -421,6 +449,8 @@ function scheduleScheduledRenewalLockIn( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -509,6 +539,10 @@ Locks in the renewal immediately. function lockInScheduledRenewalImmediately(int $subscriptionId, int $id): ScheduledRenewalConfigurationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -518,6 +552,8 @@ function lockInScheduledRenewalImmediately(int $subscriptionId, int $id): Schedu ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -603,6 +639,10 @@ function unpublishScheduledRenewalConfiguration( ): ScheduledRenewalConfigurationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -612,6 +652,8 @@ function unpublishScheduledRenewalConfiguration( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -689,6 +731,10 @@ function cancelScheduledRenewalConfiguration( ): ScheduledRenewalConfigurationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -698,6 +744,8 @@ function cancelScheduledRenewalConfiguration( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -776,6 +824,10 @@ function createScheduledRenewalConfigurationItem( ): ScheduledRenewalConfigurationItemResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -786,6 +838,8 @@ function createScheduledRenewalConfigurationItem( ## Response Type +**201**: Created + [`ScheduledRenewalConfigurationItemResponse`](../../doc/models/scheduled-renewal-configuration-item-response.md) ## Example Usage @@ -874,6 +928,10 @@ function updateScheduledRenewalConfigurationItem( ): ScheduledRenewalConfigurationItemResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -885,6 +943,8 @@ function updateScheduledRenewalConfigurationItem( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationItemResponse`](../../doc/models/scheduled-renewal-configuration-item-response.md) ## Example Usage @@ -975,6 +1035,10 @@ function deleteScheduledRenewalConfigurationItem( ): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -985,6 +1049,8 @@ function deleteScheduledRenewalConfigurationItem( ## Response Type +**204**: No Content + `void` ## Example Usage diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md index 68e004ee..6142d420 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -24,20 +24,22 @@ $subscriptionStatusController = $client->getSubscriptionStatusController(); # 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. ```php function retrySubscription(int $subscriptionId): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -46,6 +48,8 @@ function retrySubscription(int $subscriptionId): SubscriptionResponse ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -218,6 +222,10 @@ To cancel the subscription immediately, omit any schedule parameters from the re function cancelSubscription(int $subscriptionId, ?CancellationRequest $body = null): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -227,6 +235,8 @@ function cancelSubscription(int $subscriptionId, ?CancellationRequest $body = nu ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -391,7 +401,7 @@ try { # 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. ```php function resumeSubscription( @@ -400,6 +410,10 @@ function resumeSubscription( ): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -409,6 +423,8 @@ function resumeSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -547,7 +563,7 @@ try { # 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 @@ -557,6 +573,10 @@ You may not place a subscription on hold if the `next_billing_at` date is within function pauseSubscription(int $subscriptionId, ?PauseRequest $body = null): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -566,6 +586,8 @@ function pauseSubscription(int $subscriptionId, ?PauseRequest $body = null): Sub ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -715,13 +737,13 @@ try { # 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. ```php function updateAutomaticSubscriptionResumption( @@ -730,6 +752,10 @@ function updateAutomaticSubscriptionResumption( ): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -739,6 +765,8 @@ function updateAutomaticSubscriptionResumption( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -899,7 +927,7 @@ try { # 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.** @@ -920,7 +948,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? | |---|---|---| @@ -1060,6 +1088,12 @@ 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. + ```php function reactivateSubscription( int $subscriptionId, @@ -1067,6 +1101,10 @@ function reactivateSubscription( ): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1076,6 +1114,8 @@ function reactivateSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -1242,6 +1282,10 @@ function initiateDelayedCancellation( ): DelayedCancellationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1251,6 +1295,8 @@ function initiateDelayedCancellation( ## Response Type +**200**: OK + [`DelayedCancellationResponse`](../../doc/models/delayed-cancellation-response.md) ## Example Usage @@ -1281,7 +1327,7 @@ try { # 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. @@ -1289,6 +1335,10 @@ This endpoint is idempotent. If the subscription was not set to cancel in the fu function cancelDelayedCancellation(int $subscriptionId): DelayedCancellationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1297,6 +1347,8 @@ function cancelDelayedCancellation(int $subscriptionId): DelayedCancellationResp ## Response Type +**200**: OK + [`DelayedCancellationResponse`](../../doc/models/delayed-cancellation-response.md) ## Example Usage @@ -1332,12 +1384,16 @@ try { # 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. ```php function cancelDunning(int $subscriptionId): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1346,6 +1402,8 @@ function cancelDunning(int $subscriptionId): SubscriptionResponse ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -1375,7 +1433,7 @@ try { # 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). @@ -1402,6 +1460,10 @@ You can request a `POST` to obtain this data from the endpoint without any side function previewRenewal(int $subscriptionId, ?RenewalPreviewRequest $body = null): RenewalPreviewResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1411,6 +1473,8 @@ function previewRenewal(int $subscriptionId, ?RenewalPreviewRequest $body = null ## 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 8cbcdd73..a355660b 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -20,32 +20,44 @@ $subscriptionsController = $client->getSubscriptionsController(); * [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. ```php function createSubscription(?CreateSubscriptionRequest $body = null): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -54,6 +66,8 @@ function createSubscription(?CreateSubscriptionRequest $body = null): Subscripti ## Response Type +**201**: Created + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -243,7 +257,7 @@ try { # 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 @@ -257,6 +271,10 @@ Self-Service Page token for the subscriptions is not returned by default. If thi function listSubscriptions(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -280,6 +298,8 @@ function listSubscriptions(array $options): array ## Response Type +**200**: OK + [`SubscriptionResponse[]`](../../doc/models/subscription-response.md) ## Example Usage @@ -346,26 +366,30 @@ 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. ```php function updateSubscription(int $subscriptionId, ?UpdateSubscriptionRequest $body = null): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -375,6 +399,8 @@ function updateSubscription(int $subscriptionId, ?UpdateSubscriptionRequest $bod ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -534,6 +560,10 @@ Self-Service Page token for the subscription is not returned by default. If this function readSubscription(int $subscriptionId, ?array $mInclude = null): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -543,6 +573,8 @@ function readSubscription(int $subscriptionId, ?array $mInclude = null): Subscri ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -711,7 +743,7 @@ try { # 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. @@ -735,6 +767,10 @@ If unpermitted parameters are sent, a 400 HTTP response is sent along with a str function overrideSubscription(int $subscriptionId, ?OverrideSubscriptionRequest $body = null): void ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -744,6 +780,8 @@ function overrideSubscription(int $subscriptionId, ?OverrideSubscriptionRequest ## Response Type +**204**: No Content + `void` ## Example Usage @@ -783,12 +821,16 @@ try { # Find Subscription -Use this endpoint to find a subscription by its reference. +Finds a subscription by its reference. ```php function findSubscription(?string $reference = null): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -797,6 +839,8 @@ function findSubscription(?string $reference = null): SubscriptionResponse ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -822,7 +866,7 @@ try { # 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` @@ -836,6 +880,10 @@ The query params will be: `?ack={customer_id}&cascade[]=customer&cascade[]=payme function purgeSubscription(int $subscriptionId, int $ack, ?array $cascade = null): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -846,6 +894,8 @@ function purgeSubscription(int $subscriptionId, int $ack, ?array $cascade = null ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -886,7 +936,7 @@ try { # Update Prepaid Subscription Configuration -Use this endpoint to update a subscription's prepaid configuration. +Updates a subscription's prepaid configuration. ```php function updatePrepaidSubscriptionConfiguration( @@ -895,6 +945,10 @@ function updatePrepaidSubscriptionConfiguration( ): PrepaidConfigurationResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -904,6 +958,8 @@ function updatePrepaidSubscriptionConfiguration( ## Response Type +**200**: OK + [`PrepaidConfigurationResponse`](../../doc/models/prepaid-configuration-response.md) ## Example Usage @@ -957,7 +1013,7 @@ try { # 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. @@ -987,6 +1043,10 @@ If you'd like to calculate subscriptions that do not include tax you may leave o function previewSubscription(?CreateSubscriptionRequest $body = null): SubscriptionPreviewResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -995,6 +1055,8 @@ function previewSubscription(?CreateSubscriptionRequest $body = null): Subscript ## Response Type +**200**: OK + [`SubscriptionPreviewResponse`](../../doc/models/subscription-preview-response.md) ## Example Usage @@ -1140,6 +1202,8 @@ try { # 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 @@ -1156,6 +1220,10 @@ function applyCouponsToSubscription( ): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1166,6 +1234,8 @@ function applyCouponsToSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -1356,16 +1426,20 @@ try { | 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) ```php function removeCouponFromSubscription(int $subscriptionId, ?string $couponCode = null): string ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1375,6 +1449,8 @@ function removeCouponFromSubscription(int $subscriptionId, ?string $couponCode = ## Response Type +**200**: OK + `string` ## Example Usage @@ -1410,7 +1486,7 @@ try { # 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](#). @@ -1461,6 +1537,10 @@ function activateSubscription( ): SubscriptionResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1470,6 +1550,8 @@ function activateSubscription( ## 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 06e35433..31fbaabc 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -20,12 +20,16 @@ $webhooksController = $client->getWebhooksController(); # 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. ```php function listWebhooks(array $options): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -40,6 +44,8 @@ function listWebhooks(array $options): array ## Response Type +**201**: OK + [`WebhookResponse[]`](../../doc/models/webhook-response.md) ## Example Usage @@ -103,12 +109,16 @@ try { # Enable Webhooks -Allows you to enable webhooks for your site +Enables webhooks for your site. ```php function enableWebhooks(?EnableWebhooksRequest $body = null): EnableWebhooksResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -117,6 +127,8 @@ function enableWebhooks(?EnableWebhooksRequest $body = null): EnableWebhooksResp ## Response Type +**200**: OK + [`EnableWebhooksResponse`](../../doc/models/enable-webhooks-response.md) ## Example Usage @@ -154,6 +166,10 @@ Replays webhooks. Posting to this endpoint does not immediately resend the webho function replayWebhooks(?ReplayWebhooksRequest $body = null): ReplayWebhooksResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -162,6 +178,8 @@ function replayWebhooks(?ReplayWebhooksRequest $body = null): ReplayWebhooksResp ## Response Type +**200**: OK + [`ReplayWebhooksResponse`](../../doc/models/replay-webhooks-response.md) ## Example Usage @@ -196,13 +214,17 @@ try { # 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. ```php function createEndpoint(?CreateOrUpdateEndpointRequest $body = null): EndpointResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -211,6 +233,8 @@ function createEndpoint(?CreateOrUpdateEndpointRequest $body = null): EndpointRe ## Response Type +**200**: OK + [`EndpointResponse`](../../doc/models/endpoint-response.md) ## Example Usage @@ -221,7 +245,8 @@ $body = CreateOrUpdateEndpointRequestBuilder::init( 'https://your.site/webhooks', [ WebhookSubscription::PAYMENT_SUCCESS, - WebhookSubscription::PAYMENT_FAILURE + WebhookSubscription::PAYMENT_FAILURE, + WebhookSubscription::INVOICE_PENDING ] )->build() )->build(); @@ -250,7 +275,8 @@ try { "status": "enabled", "webhook_subscriptions": [ "payment_success", - "payment_failure" + "payment_failure", + "invoice_pending" ] } } @@ -271,8 +297,14 @@ Returns created endpoints for a site. function listEndpoints(): array ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**200**: OK + [`Endpoint[]`](../../doc/models/endpoint.md) ## Example Usage @@ -300,7 +332,8 @@ try { "status": "enabled", "webhook_subscriptions": [ "payment_success", - "payment_failure" + "payment_failure", + "invoice_pending" ] }, { @@ -324,12 +357,16 @@ 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. ```php function updateEndpoint(int $endpointId, ?CreateOrUpdateEndpointRequest $body = null): EndpointResponse ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -339,6 +376,8 @@ function updateEndpoint(int $endpointId, ?CreateOrUpdateEndpointRequest $body = ## Response Type +**200**: OK + [`EndpointResponse`](../../doc/models/endpoint-response.md) ## Example Usage @@ -352,7 +391,8 @@ $body = CreateOrUpdateEndpointRequestBuilder::init( [ WebhookSubscription::PAYMENT_FAILURE, WebhookSubscription::PAYMENT_SUCCESS, - WebhookSubscription::REFUND_FAILURE + WebhookSubscription::REFUND_FAILURE, + WebhookSubscription::INVOICE_PENDING ] )->build() )->build(); diff --git a/doc/models/activate-event-based-component.md b/doc/models/activate-event-based-component.md index 14456b06..e9e68f80 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 | Getter | Setter | | --- | --- | --- | --- | --- | --- | | `pricePointId` | `?int` | Optional | The Chargify id of the price point | getPricePointId(): ?int | setPricePointId(?int pricePointId): void | -| `billingSchedule` | [`?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. | getBillingSchedule(): ?BillingSchedule | setBillingSchedule(?BillingSchedule billingSchedule): void | +| `billingSchedule` | [`?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. | getBillingSchedule(): ?BillingSchedule | setBillingSchedule(?BillingSchedule billingSchedule): void | | `customPrice` | [`?ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | getCustomPrice(): ?ComponentCustomPrice | setCustomPrice(?ComponentCustomPrice customPrice): void | ## Example (as JSON) diff --git a/doc/models/bank-account-payment-profile.md b/doc/models/bank-account-payment-profile.md index 3d16f14d..f4b09bdf 100644 --- a/doc/models/bank-account-payment-profile.md +++ b/doc/models/bank-account-payment-profile.md @@ -14,7 +14,7 @@ | `lastName` | `?string` | Optional | The last name of the bank account holder | getLastName(): ?string | setLastName(?string lastName): void | | `customerId` | `?int` | Optional | The Chargify-assigned id for the customer record to which the bank account belongs | getCustomerId(): ?int | setCustomerId(?int customerId): void | | `currentVault` | [`?string(BankAccountVault)`](../../doc/models/bank-account-vault.md) | Optional | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | getCurrentVault(): ?string | setCurrentVault(?string currentVault): void | -| `vaultToken` | `?string` | Optional | The “token” provided by your vault storage for an already stored payment profile | getVaultToken(): ?string | setVaultToken(?string vaultToken): void | +| `vaultToken` | `?string` | Optional | The "token" provided by your vault storage for an already stored payment profile | getVaultToken(): ?string | setVaultToken(?string vaultToken): void | | `billingAddress` | `?string` | Optional | The current billing street address for the bank account | getBillingAddress(): ?string | setBillingAddress(?string billingAddress): void | | `billingCity` | `?string` | Optional | The current billing address city for the bank account | getBillingCity(): ?string | setBillingCity(?string billingCity): void | | `billingState` | `?string` | Optional | The current billing address state for the bank account | getBillingState(): ?string | setBillingState(?string billingState): void | @@ -23,8 +23,8 @@ | `customerVaultToken` | `?string` | Optional | (only for Authorize.Net CIM storage): the customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token. | getCustomerVaultToken(): ?string | setCustomerVaultToken(?string customerVaultToken): void | | `billingAddress2` | `?string` | Optional | The current billing street address, second line, for the bank account | getBillingAddress2(): ?string | setBillingAddress2(?string billingAddress2): void | | `bankName` | `?string` | Optional | The bank where the account resides | getBankName(): ?string | setBankName(?string bankName): void | -| `maskedBankRoutingNumber` | `?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 | getMaskedBankRoutingNumber(): ?string | setMaskedBankRoutingNumber(?string maskedBankRoutingNumber): void | -| `maskedBankAccountNumber` | `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’) | getMaskedBankAccountNumber(): string | setMaskedBankAccountNumber(string maskedBankAccountNumber): void | +| `maskedBankRoutingNumber` | `?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 | getMaskedBankRoutingNumber(): ?string | setMaskedBankRoutingNumber(?string maskedBankRoutingNumber): void | +| `maskedBankAccountNumber` | `?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') | getMaskedBankAccountNumber(): ?string | setMaskedBankAccountNumber(?string maskedBankAccountNumber): void | | `bankAccountType` | [`?string(BankAccountType)`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking | getBankAccountType(): ?string | setBankAccountType(?string bankAccountType): void | | `bankAccountHolderType` | [`?string(BankAccountHolderType)`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | getBankAccountHolderType(): ?string | setBankAccountHolderType(?string bankAccountHolderType): void | | `paymentType` | [`string(PaymentType)`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType::BANK_ACCOUNT` | getPaymentType(): string | setPaymentType(string paymentType): void | @@ -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 67453f58..d62b421d 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 32fd738b..8a57fefa 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 | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `initialBillingAt` | `?DateTime` | 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. | getInitialBillingAt(): ?\DateTime | setInitialBillingAt(?\DateTime initialBillingAt): void | +| `initialBillingAt` | `?DateTime` | 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. | getInitialBillingAt(): ?\DateTime | setInitialBillingAt(?\DateTime initialBillingAt): void | ## Example (as JSON) ```json { - "initial_billing_at": "2024-01-01" + "initial_billing_at": "2026-01-01" } ``` diff --git a/doc/models/containers/allocation-preview-item-previous-quantity.md b/doc/models/containers/allocation-preview-item-previous-quantity.md index b8931096..79e19be4 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/allocation-preview-item-quantity.md b/doc/models/containers/allocation-preview-item-quantity.md index 140933b5..a300c670 100644 --- a/doc/models/containers/allocation-preview-item-quantity.md +++ b/doc/models/containers/allocation-preview-item-quantity.md @@ -12,3 +12,23 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/allocation-previous-quantity.md b/doc/models/containers/allocation-previous-quantity.md index 5ebfa08c..28cfcf57 100644 --- a/doc/models/containers/allocation-previous-quantity.md +++ b/doc/models/containers/allocation-previous-quantity.md @@ -12,3 +12,23 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/allocation-quantity.md b/doc/models/containers/allocation-quantity.md index 3e1019d8..257fbdf7 100644 --- a/doc/models/containers/allocation-quantity.md +++ b/doc/models/containers/allocation-quantity.md @@ -12,3 +12,23 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 8e9079eb..fad71e11 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 8767996d..94869898 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 9f849465..f70ac567 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 408c7ce6..6c24b991 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/calendar-billing-snap-day.md b/doc/models/containers/calendar-billing-snap-day.md index b8637b72..41f8e2a5 100644 --- a/doc/models/containers/calendar-billing-snap-day.md +++ b/doc/models/containers/calendar-billing-snap-day.md @@ -12,3 +12,23 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 b7005927..0707a722 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 471c8cfa..fc9603a3 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 92e933b4..695c5590 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 af0278a7..6d84b2b4 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/coupon-payload-percentage.md b/doc/models/containers/coupon-payload-percentage.md index 13617892..36cd8f8d 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$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 208457ff..9b0f0629 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 2b4320e2..ec9b354c 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,48 @@ | [`CreateComponentPricePoint`](../../../doc/models/create-component-price-point.md) | | [`CreatePrepaidUsageComponentPricePoint`](../../../doc/models/create-prepaid-usage-component-price-point.md) | +## CreateComponentPricePoint + +### Initialization Code + +#### Example + +```php +$value = CreateComponentPricePointBuilder::init( + 'name0', + PricingScheme::PER_UNIT, + [ + PriceBuilder::init( + 242, + 23.26 + )->build() + ] +) + ->useSiteExchangeRate(true) + ->build(); +``` + +## CreatePrepaidUsageComponentPricePoint + +### Initialization Code + +#### Example + +```php +$value = CreatePrepaidUsageComponentPricePointBuilder::init( + 'name0', + PricingScheme::PER_UNIT, + [ + PriceBuilder::init( + 242, + 23.26 + )->build() + ], + OveragePricingBuilder::init( + PricingScheme::STAIRSTEP + )->build() +) + ->useSiteExchangeRate(true) + ->build(); +``` + 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 1ec1ac5a..173e4f20 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,48 @@ | [`CreateComponentPricePoint`](../../../doc/models/create-component-price-point.md) | | [`CreatePrepaidUsageComponentPricePoint`](../../../doc/models/create-prepaid-usage-component-price-point.md) | +## CreateComponentPricePoint + +### Initialization Code + +#### Example + +```php +$value = CreateComponentPricePointBuilder::init( + 'name0', + PricingScheme::PER_UNIT, + [ + PriceBuilder::init( + 242, + 23.26 + )->build() + ] +) + ->useSiteExchangeRate(true) + ->build(); +``` + +## CreatePrepaidUsageComponentPricePoint + +### Initialization Code + +#### Example + +```php +$value = CreatePrepaidUsageComponentPricePointBuilder::init( + 'name0', + PricingScheme::PER_UNIT, + [ + PriceBuilder::init( + 242, + 23.26 + )->build() + ], + OveragePricingBuilder::init( + PricingScheme::STAIRSTEP + )->build() +) + ->useSiteExchangeRate(true) + ->build(); +``` + diff --git a/doc/models/containers/create-invoice-coupon-amount.md b/doc/models/containers/create-invoice-coupon-amount.md index b90b216e..a3bb6f45 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/create-invoice-coupon-percentage.md b/doc/models/containers/create-invoice-coupon-percentage.md index bc1bf484..8a08bcc1 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$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 c5e8a22d..033cb590 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 1de203fc..37c8cace 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 1570a9c0..dd5ff901 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 879d11d0..20cc49f3 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 f64de1d8..06a1a205 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/create-invoice-item-quantity.md b/doc/models/containers/create-invoice-item-quantity.md index 493b68c6..f4b797fc 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 + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 0b393fca..be8e78b6 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 + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/create-invoice-payment-amount.md b/doc/models/containers/create-invoice-payment-amount.md index 14226994..422083db 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/create-metafields-request-metafields.md b/doc/models/containers/create-metafields-request-metafields.md index 1296c120..2d0384c3 100644 --- a/doc/models/containers/create-metafields-request-metafields.md +++ b/doc/models/containers/create-metafields-request-metafields.md @@ -12,3 +12,43 @@ | [`CreateMetafield`](../../../doc/models/create-metafield.md) | | [`CreateMetafield[]`](../../../doc/models/create-metafield.md) | +## CreateMetafield + +### Initialization Code + +#### Example + +```php +$value = CreateMetafieldBuilder::init() + ->name('my_field') + ->scope( + MetafieldScopeBuilder::init() + ->csv(IncludeOption::EXCLUDE) + ->invoices(IncludeOption::EXCLUDE) + ->statements(IncludeOption::EXCLUDE) + ->portal(IncludeOption::EXCLUDE) + ->publicShow(IncludeOption::EXCLUDE) + ->publicEdit(IncludeOption::EXCLUDE) + ->build() + ) + ->inputType(MetafieldInput::TEXT) + ->enum( + [ + 'string' + ] + ) + ->build(); +``` + +## CreateMetafield[] + +### Initialization Code + +#### Example + +```php +$value = [ + CreateMetafieldBuilder::init()->build() +]; +``` + diff --git a/doc/models/containers/create-multi-invoice-payment-amount.md b/doc/models/containers/create-multi-invoice-payment-amount.md index 6631493b..3e90bd3a 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$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 5bc155ee..72d8e9be 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$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 21648793..793e59c2 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 7513594d..62401e49 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 6851d8d8..b21f0c6c 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 842b3ddf..4998ca93 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 @@ | `int` | | `bool` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## bool + +### Initialization Code + +#### Example + +```php +$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 ee8e70d6..79dba8fc 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 @@ | `int` | | `bool` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## bool + +### Initialization Code + +#### Example + +```php +$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 db4a54a5..f2314ed5 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 @@ | `int` | | `bool` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## bool + +### Initialization Code + +#### Example + +```php +$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 82bc3331..3688353c 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 @@ | `int` | | `bool` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## bool + +### Initialization Code + +#### Example + +```php +$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 a433a698..09927a37 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 399c429d..35cd6b6f 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 5eb14186..c8bb002b 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/create-subscription-offer-id.md b/doc/models/containers/create-subscription-offer-id.md index 0fd7b91c..9095f6e2 100644 --- a/doc/models/containers/create-subscription-offer-id.md +++ b/doc/models/containers/create-subscription-offer-id.md @@ -12,3 +12,23 @@ | `string` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/create-usage-component-id.md b/doc/models/containers/create-usage-component-id.md index b3fcae8b..1785a6c6 100644 --- a/doc/models/containers/create-usage-component-id.md +++ b/doc/models/containers/create-usage-component-id.md @@ -12,3 +12,23 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 4a570a0c..eb8a6253 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/customer-error-response-errors.md b/doc/models/containers/customer-error-response-errors.md index bebf1a39..1fa17122 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) | | `string[]` | +## CustomerError + +### Initialization Code + +#### Example + +```php +$value = CustomerErrorBuilder::init()->build(); +``` + +## string[] + +### Initialization Code + +#### Example + +```php +$value = [ + 'String1' +]; +``` + diff --git a/doc/models/containers/deduct-service-credit-amount.md b/doc/models/containers/deduct-service-credit-amount.md index 4c46e392..ed175580 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/ebb-component-unit-price.md b/doc/models/containers/ebb-component-unit-price.md index 2a9083cf..077b3552 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/event-event-specific-data.md b/doc/models/containers/event-event-specific-data.md index 8e9946f6..5db09c5e 100644 --- a/doc/models/containers/event-event-specific-data.md +++ b/doc/models/containers/event-event-specific-data.md @@ -28,3 +28,322 @@ | [`ItemPricePointChanged`](../../../doc/models/item-price-point-changed.md) | | [`CustomFieldValueChange`](../../../doc/models/custom-field-value-change.md) | +## SubscriptionProductChange + +### Initialization Code + +#### Example + +```php +$value = SubscriptionProductChangeBuilder::init( + 126, + 12 +)->build(); +``` + +## SubscriptionStateChange + +### Initialization Code + +#### Example + +```php +$value = SubscriptionStateChangeBuilder::init( + 'previous_subscription_state2', + 'new_subscription_state6' +)->build(); +``` + +## PaymentRelatedEvents + +### Initialization Code + +#### Example + +```php +$value = PaymentRelatedEventsBuilder::init( + 42, + 58 +)->build(); +``` + +## RefundSuccess + +### Initialization Code + +#### Example + +```php +$value = RefundSuccessBuilder::init( + 12, + 182, + 168 +)->build(); +``` + +## ComponentAllocationChange + +### Initialization Code + +#### Example + +```php +$value = ComponentAllocationChangeBuilder::init( + 94, + 102, + 88, + 'component_handle8', + 'memo2', + 158 +)->build(); +``` + +## MeteredUsage + +### Initialization Code + +#### Example + +```php +$value = MeteredUsageBuilder::init( + 'previous_unit_balance6', + 80, + 42, + 4, + 'component_handle8', + 'memo2' +)->build(); +``` + +## PrepaidUsage + +### Initialization Code + +#### Example + +```php +$value = PrepaidUsageBuilder::init( + 'previous_unit_balance0', + 'previous_overage_unit_balance4', + 252, + 224, + 214, + 106, + 176, + 'component_handle4', + 'memo8', + [ + PrepaidUsageAllocationDetailBuilder::init()->build() + ] +)->build(); +``` + +## DunningStepReached + +### Initialization Code + +#### Example + +```php +$value = DunningStepReachedBuilder::init( + DunnerDataBuilder::init( + 'state8', + 194, + 98, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + 42, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z') + )->build(), + DunningStepDataBuilder::init( + 198, + 'action4', + false, + false, + false + )->build(), + DunningStepDataBuilder::init( + 30, + 'action4', + false, + false, + false + )->build() +)->build(); +``` + +## InvoiceIssued + +### Initialization Code + +#### Example + +```php +$value = InvoiceIssuedBuilder::init( + 'uid4', + 'number8', + 'role2', + 'issue_date0', + 'paid_date6', + 'due_amount6', + 'paid_amount4', + 'tax_amount2', + 'refund_amount0', + 'total_amount0', + 'status_amount4', + 'product_name0', + 'consolidation_level4', + [ + InvoiceLineItemEventDataBuilder::init()->build() + ] +) + ->dueDate(DateTimeHelper::fromSimpleDate('2016-03-13')) + ->build(); +``` + +## PendingCancellationChange + +### Initialization Code + +#### Example + +```php +$value = PendingCancellationChangeBuilder::init( + 'cancellation_state8', + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z') +)->build(); +``` + +## PrepaidSubscriptionBalanceChanged + +### Initialization Code + +#### Example + +```php +$value = PrepaidSubscriptionBalanceChangedBuilder::init( + 'reason8', + 250, + 44, + 242 +)->build(); +``` + +## ProformaInvoiceIssued + +### Initialization Code + +#### Example + +```php +$value = ProformaInvoiceIssuedBuilder::init( + 'uid0', + 'number2', + 'role6', + DateTimeHelper::fromSimpleDateRequired('2016-03-13'), + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + 'due_amount2', + 'paid_amount8', + 'tax_amount6', + 'total_amount6', + 'product_name6', + [ + InvoiceLineItemEventDataBuilder::init()->build() + ] +)->build(); +``` + +## SubscriptionGroupSignupEventData + +### Initialization Code + +#### Example + +```php +$value = SubscriptionGroupSignupEventDataBuilder::init( + SubscriptionGroupSignupFailureDataBuilder::init()->build() +) + ->customer( + CustomerBuilder::init()->build() + )->build(); +``` + +## CreditAccountBalanceChanged + +### Initialization Code + +#### Example + +```php +$value = CreditAccountBalanceChangedBuilder::init( + 'reason8', + 10, + 116, + 'currency_code8', + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z') +)->build(); +``` + +## PrepaymentAccountBalanceChanged + +### Initialization Code + +#### Example + +```php +$value = PrepaymentAccountBalanceChangedBuilder::init( + 'reason4', + 182, + 206, + 'currency_code4' +)->build(); +``` + +## PaymentCollectionMethodChanged + +### Initialization Code + +#### Example + +```php +$value = PaymentCollectionMethodChangedBuilder::init( + 'previous_value4', + 'current_value2' +)->build(); +``` + +## ItemPricePointChanged + +### Initialization Code + +#### Example + +```php +$value = ItemPricePointChangedBuilder::init( + 66, + 'item_type6', + 'item_handle4', + 'item_name8', + ItemPricePointDataBuilder::init()->build(), + ItemPricePointDataBuilder::init()->build() +)->build(); +``` + +## CustomFieldValueChange + +### Initialization Code + +#### Example + +```php +$value = CustomFieldValueChangeBuilder::init( + 'event_type2', + 'metafield_name6', + 78, + 'resource_type2', + 74 +) + ->oldValue('old_value2') + ->newValue('new_value8') + ->build(); +``` + diff --git a/doc/models/containers/invoice-event-payment.md b/doc/models/containers/invoice-event-payment.md index afe98ec9..a659daa5 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,72 @@ | [`PaymentMethodExternal`](../../../doc/models/payment-method-external.md) | | [`PaymentMethodPaypal`](../../../doc/models/payment-method-paypal.md) | +## PaymentMethodApplePay + +### Initialization Code + +#### Example + +```php +$value = PaymentMethodApplePayBuilder::init( + InvoiceEventPaymentMethod::APPLE_PAY +)->build(); +``` + +## PaymentMethodBankAccount + +### Initialization Code + +#### Example + +```php +$value = PaymentMethodBankAccountBuilder::init( + 'masked_account_number2', + 'masked_routing_number2', + InvoiceEventPaymentMethod::BANK_ACCOUNT +)->build(); +``` + +## PaymentMethodCreditCard + +### Initialization Code + +#### Example + +```php +$value = PaymentMethodCreditCardBuilder::init( + 'card_brand4', + 'masked_card_number0', + InvoiceEventPaymentMethod::CREDIT_CARD +)->build(); +``` + +## PaymentMethodExternal + +### Initialization Code + +#### Example + +```php +$value = PaymentMethodExternalBuilder::init( + 'kind2', + InvoiceEventPaymentMethod::EXTERNAL +) + ->details('details4') + ->memo('memo8') + ->build(); +``` + +## PaymentMethodPaypal + +### Initialization Code + +#### Example + +```php +$value = PaymentMethodPaypalBuilder::init( + 'email2', + InvoiceEventPaymentMethod::PAYPAL_ACCOUNT +)->build(); +``` + diff --git a/doc/models/containers/invoice-event.md b/doc/models/containers/invoice-event.md index ab66f4b2..40690217 100644 --- a/doc/models/containers/invoice-event.md +++ b/doc/models/containers/invoice-event.md @@ -25,3 +25,393 @@ | [`VoidInvoiceEvent`](../../../doc/models/void-invoice-event.md) | | [`VoidRemainderEvent`](../../../doc/models/void-remainder-event.md) | +## ApplyCreditNoteEvent + +### Initialization Code + +#### Example + +```php +$value = ApplyCreditNoteEventBuilder::init( + 214, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::APPLY_CREDIT_NOTE, + ApplyCreditNoteEventDataBuilder::init( + 'uid6', + 'credit_note_number0', + 'credit_note_uid0', + 'original_amount0', + 'applied_amount2' + )->build() +)->build(); +``` + +## ApplyDebitNoteEvent + +### Initialization Code + +#### Example + +```php +$value = ApplyDebitNoteEventBuilder::init( + 164, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::APPLY_DEBIT_NOTE, + ApplyDebitNoteEventDataBuilder::init( + 'debit_note_number6', + 'debit_note_uid2', + 'original_amount0', + 'applied_amount2' + )->build() +)->build(); +``` + +## ApplyPaymentEvent + +### Initialization Code + +#### Example + +```php +$value = ApplyPaymentEventBuilder::init( + 234, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::APPLY_PAYMENT, + ApplyPaymentEventDataBuilder::init( + InvoiceConsolidationLevel::CHILD, + 'memo0', + 'original_amount0', + 'applied_amount2', + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + PaymentMethodApplePayBuilder::init( + InvoiceEventPaymentMethod::APPLE_PAY + )->build() + )->build() +)->build(); +``` + +## BackportInvoiceEvent + +### Initialization Code + +#### Example + +```php +$value = BackportInvoiceEventBuilder::init( + 78, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::BACKPORT_INVOICE, + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build() +)->build(); +``` + +## ChangeChargebackStatusEvent + +### Initialization Code + +#### Example + +```php +$value = ChangeChargebackStatusEventBuilder::init( + 214, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::CHANGE_CHARGEBACK_STATUS, + ChangeChargebackStatusEventDataBuilder::init( + ChargebackStatus::WON + )->build() +)->build(); +``` + +## ChangeInvoiceCollectionMethodEvent + +### Initialization Code + +#### Example + +```php +$value = ChangeInvoiceCollectionMethodEventBuilder::init( + 246, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::CHANGE_INVOICE_COLLECTION_METHOD, + ChangeInvoiceCollectionMethodEventDataBuilder::init( + 'from_collection_method4', + 'to_collection_method8' + )->build() +)->build(); +``` + +## ChangeInvoiceStatusEvent + +### Initialization Code + +#### Example + +```php +$value = ChangeInvoiceStatusEventBuilder::init( + 92, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::CHANGE_INVOICE_STATUS, + ChangeInvoiceStatusEventDataBuilder::init( + InvoiceStatus::OPEN, + InvoiceStatus::PENDING + )->build() +)->build(); +``` + +## CreateCreditNoteEvent + +### Initialization Code + +#### Example + +```php +$value = CreateCreditNoteEventBuilder::init( + 28, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::CREATE_CREDIT_NOTE, + CreditNoteBuilder::init()->build() +)->build(); +``` + +## CreateDebitNoteEvent + +### Initialization Code + +#### Example + +```php +$value = CreateDebitNoteEventBuilder::init( + 98, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::CREATE_DEBIT_NOTE, + DebitNoteBuilder::init()->build() +)->build(); +``` + +## FailedPaymentEvent + +### Initialization Code + +#### Example + +```php +$value = FailedPaymentEventBuilder::init( + 120, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::FAILED_PAYMENT, + FailedPaymentEventDataBuilder::init( + 220, + 194, + InvoicePaymentMethodType::CASH, + 78 + )->build() +)->build(); +``` + +## IssueInvoiceEvent + +### Initialization Code + +#### Example + +```php +$value = IssueInvoiceEventBuilder::init( + 130, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::ISSUE_INVOICE, + IssueInvoiceEventDataBuilder::init( + InvoiceConsolidationLevel::CHILD, + InvoiceStatus::OPEN, + InvoiceStatus::PENDING, + 'due_amount8', + 'total_amount2' + )->build() +)->build(); +``` + +## RefundInvoiceEvent + +### Initialization Code + +#### Example + +```php +$value = RefundInvoiceEventBuilder::init( + 54, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::REFUND_INVOICE, + RefundInvoiceEventDataBuilder::init( + false, + CreditNoteBuilder::init()->build(), + 204, + 'refund_amount8', + 248, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z') + )->build() +)->build(); +``` + +## RemovePaymentEvent + +### Initialization Code + +#### Example + +```php +$value = RemovePaymentEventBuilder::init( + 236, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::REMOVE_PAYMENT, + RemovePaymentEventDataBuilder::init( + 78, + 'memo0', + 'applied_amount2', + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + PaymentMethodApplePayBuilder::init( + InvoiceEventPaymentMethod::APPLE_PAY + )->build(), + false + )->build() +)->build(); +``` + +## VoidInvoiceEvent + +### Initialization Code + +#### Example + +```php +$value = VoidInvoiceEventBuilder::init( + 16, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::VOID_INVOICE, + VoidInvoiceEventDataBuilder::init( + false, + 'reason2' + ) + ->creditNoteAttributes( + CreditNoteBuilder::init()->build() + ) + ->memo('memo0') + ->appliedAmount('applied_amount2') + ->transactionTime(DateTimeHelper::fromRfc3339DateTime('2016-03-13T12:52:32.123Z')) + ->build() +)->build(); +``` + +## VoidRemainderEvent + +### Initialization Code + +#### Example + +```php +$value = VoidRemainderEventBuilder::init( + 128, + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z'), + InvoiceBuilder::init() + ->issueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->dueDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->paidDate(DateTimeHelper::fromSimpleDate('2024-01-01')) + ->publicUrlExpiresOn(DateTimeHelper::fromSimpleDate('2024-01-21')) + ->build(), + InvoiceEventType::VOID_REMAINDER, + VoidRemainderEventDataBuilder::init( + CreditNoteBuilder::init()->build(), + 'memo0', + 'applied_amount2', + DateTimeHelper::fromRfc3339DateTimeRequired('2016-03-13T12:52:32.123Z') + )->build() +)->build(); +``` + diff --git a/doc/models/containers/issue-service-credit-amount.md b/doc/models/containers/issue-service-credit-amount.md index e1777579..70c6eeee 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 + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 c1187c6d..db59cf9c 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 6f6cf7b5..8b2be637 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 372c1033..2ec3e7eb 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/metafield-enum.md b/doc/models/containers/metafield-enum.md index bc435e9e..71ba2bd0 100644 --- a/doc/models/containers/metafield-enum.md +++ b/doc/models/containers/metafield-enum.md @@ -12,3 +12,25 @@ | `string` | | `string[]` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## string[] + +### Initialization Code + +#### Example + +```php +$value = [ + 'String1' +]; +``` + diff --git a/doc/models/containers/metered-component-unit-price.md b/doc/models/containers/metered-component-unit-price.md index 355178cb..59efed13 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$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 f1623230..74683172 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$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 3ecf8850..ed8d8674 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 603348c9..39079409 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/payment-profile.md b/doc/models/containers/payment-profile.md index e64ab23c..d89f4af4 100644 --- a/doc/models/containers/payment-profile.md +++ b/doc/models/containers/payment-profile.md @@ -14,3 +14,73 @@ | [`CreditCardPaymentProfile`](../../../doc/models/credit-card-payment-profile.md) | | [`PaypalPaymentProfile`](../../../doc/models/paypal-payment-profile.md) | +## ApplePayPaymentProfile + +### Initialization Code + +#### Example + +```php +$value = ApplePayPaymentProfileBuilder::init( + PaymentType::APPLE_PAY +)->build(); +``` + +## BankAccountPaymentProfile + +### Initialization Code + +#### Example + +```php +$value = BankAccountPaymentProfileBuilder::init( + PaymentType::BANK_ACCOUNT +) + ->verified(false) + ->build(); +``` + +## CreditCardPaymentProfile + +### Initialization Code + +#### Example + +```php +$value = CreditCardPaymentProfileBuilder::init( + PaymentType::CREDIT_CARD +) + ->id(10088716) + ->firstName('Test') + ->lastName('Subscription') + ->maskedCardNumber('XXXX-XXXX-XXXX-1') + ->cardType(CardType::BOGUS) + ->expirationMonth(1) + ->expirationYear(2022) + ->customerId(14543792) + ->currentVault(CreditCardVault::BOGUS) + ->vaultToken('1') + ->billingAddress('123 Montana Way') + ->billingCity('Billings') + ->billingState('MT') + ->billingZip('59101') + ->billingCountry('US') + ->customerVaultToken('customer_vault_token2') + ->billingAddress2('') + ->siteGatewaySettingId(1) + ->gatewayHandle('gateway_handle8') + ->build(); +``` + +## PaypalPaymentProfile + +### Initialization Code + +#### Example + +```php +$value = PaypalPaymentProfileBuilder::init( + PaymentType::PAYPAL_ACCOUNT +)->build(); +``` + diff --git a/doc/models/containers/prepaid-usage-component-unit-price.md b/doc/models/containers/prepaid-usage-component-unit-price.md index d50e9c71..d155ab55 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/price-ending-quantity.md b/doc/models/containers/price-ending-quantity.md index 0127aad9..8f48cc18 100644 --- a/doc/models/containers/price-ending-quantity.md +++ b/doc/models/containers/price-ending-quantity.md @@ -12,3 +12,23 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/price-starting-quantity.md b/doc/models/containers/price-starting-quantity.md index 77b7c205..e897c5f8 100644 --- a/doc/models/containers/price-starting-quantity.md +++ b/doc/models/containers/price-starting-quantity.md @@ -12,3 +12,23 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/price-unit-price.md b/doc/models/containers/price-unit-price.md index e9c4ce8c..d6410d07 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 + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 113ce6ce..06dffa54 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/reactivate-subscription-request-resume.md b/doc/models/containers/reactivate-subscription-request-resume.md index 158acb12..050bee48 100644 --- a/doc/models/containers/reactivate-subscription-request-resume.md +++ b/doc/models/containers/reactivate-subscription-request-resume.md @@ -12,3 +12,23 @@ | `bool` | | [`ResumeOptions`](../../../doc/models/resume-options.md) | +## bool + +### Initialization Code + +#### Example + +```php +$value = false; +``` + +## ResumeOptions + +### Initialization Code + +#### Example + +```php +$value = ResumeOptionsBuilder::init()->build(); +``` + 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 0f3f1f78..96f58d07 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 643d996d..634d8d4b 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 c4ebeb7a..20e53a64 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 fc28901b..6032e636 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 69531fde..c0b7516a 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 @@ | `string[]` | | `string` | +## string[] + +### Initialization Code + +#### Example + +```php +$value = [ + 'String1' +]; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/refund-invoice-request-refund.md b/doc/models/containers/refund-invoice-request-refund.md index d79065f7..9455603b 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 + +```php +$value = RefundInvoiceBuilder::init( + 'amount8', + 'memo0', + 0 +)->build(); +``` + +## RefundConsolidatedInvoice + +### Initialization Code + +#### Example + +```php +$value = RefundConsolidatedInvoiceBuilder::init( + 'memo0', + 46, + [ + 'String0', + 'String1' + ] +)->build(); +``` + diff --git a/doc/models/containers/refund-prepayment-amount.md b/doc/models/containers/refund-prepayment-amount.md index 32d0c5d9..53a9c4b6 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 + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$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 5017095a..75965345 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 b855340a..00c90d41 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 54a96516..787e37ca 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,27 @@ | [`ScheduledRenewalItemRequestBodyComponent`](../../../doc/models/scheduled-renewal-item-request-body-component.md) | | [`ScheduledRenewalItemRequestBodyProduct`](../../../doc/models/scheduled-renewal-item-request-body-product.md) | +## ScheduledRenewalItemRequestBodyComponent + +### Initialization Code + +#### Example + +```php +$value = ScheduledRenewalItemRequestBodyComponentBuilder::init( + 108 +)->build(); +``` + +## ScheduledRenewalItemRequestBodyProduct + +### Initialization Code + +#### Example + +```php +$value = ScheduledRenewalItemRequestBodyProductBuilder::init( + 32 +)->build(); +``` + 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 51771866..8a2d0718 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 f61e2069..6b753979 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 29238be9..774417d0 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,27 @@ | [`ScheduledRenewalItemRequestBodyComponent`](../../../doc/models/scheduled-renewal-item-request-body-component.md) | | [`ScheduledRenewalItemRequestBodyProduct`](../../../doc/models/scheduled-renewal-item-request-body-product.md) | +## ScheduledRenewalItemRequestBodyComponent + +### Initialization Code + +#### Example + +```php +$value = ScheduledRenewalItemRequestBodyComponentBuilder::init( + 108 +)->build(); +``` + +## ScheduledRenewalItemRequestBodyProduct + +### Initialization Code + +#### Example + +```php +$value = ScheduledRenewalItemRequestBodyProductBuilder::init( + 32 +)->build(); +``` + diff --git a/doc/models/containers/segment-segment-property-1-value.md b/doc/models/containers/segment-segment-property-1-value.md index 18862118..afa10171 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 @@ | `int` | | `bool` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## bool + +### Initialization Code + +#### Example + +```php +$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 53373969..d74ee5cc 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 @@ | `int` | | `bool` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## bool + +### Initialization Code + +#### Example + +```php +$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 ca50c073..3f19e051 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 @@ | `int` | | `bool` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## bool + +### Initialization Code + +#### Example + +```php +$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 cb80dd3f..abfc909c 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 @@ | `int` | | `bool` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## float + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## bool + +### Initialization Code + +#### Example + +```php +$value = false; +``` + diff --git a/doc/models/containers/subscription-component-allocated-quantity.md b/doc/models/containers/subscription-component-allocated-quantity.md index 9b9e0028..29d5d61e 100644 --- a/doc/models/containers/subscription-component-allocated-quantity.md +++ b/doc/models/containers/subscription-component-allocated-quantity.md @@ -12,3 +12,23 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 ef13ab18..eca634cf 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 b8ede8c0..53873301 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/subscription-custom-price-interval.md b/doc/models/containers/subscription-custom-price-interval.md index b537d53c..12f6380b 100644 --- a/doc/models/containers/subscription-custom-price-interval.md +++ b/doc/models/containers/subscription-custom-price-interval.md @@ -12,3 +12,23 @@ | `string` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 ba4711ed..d2898ed4 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 2d09ea2b..ce2c0161 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 db2b85c2..369238ed 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 1c6202fd..fefbbd40 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 + +```php +$value = SubscriptionGroupMembersArrayErrorBuilder::init( + [ + 'members6' + ] +)->build(); +``` + +## SubscriptionGroupSingleError + +### Initialization Code + +#### Example + +```php +$value = SubscriptionGroupSingleErrorBuilder::init( + 'subscription_group2' +)->build(); +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 bd0759eb..3429af75 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 99e9122c..46e87943 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 0051c9be..d3fea1df 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 8ec65313..7c1a382e 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 b3cb6d31..a4f81fbb 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 89b42dbf..eeba6fbe 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 42c990a9..af2293c6 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` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$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 bda03ea9..6dc4a5ce 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 beaecf46..d3ba4aca 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/update-metafields-request-metafields.md b/doc/models/containers/update-metafields-request-metafields.md index 4cb479c5..63e753b8 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) | | [`UpdateMetafield[]`](../../../doc/models/update-metafield.md) | +## UpdateMetafield + +### Initialization Code + +#### Example + +```php +$value = UpdateMetafieldBuilder::init()->build(); +``` + +## UpdateMetafield[] + +### Initialization Code + +#### Example + +```php +$value = [ + UpdateMetafieldBuilder::init()->build() +]; +``` + diff --git a/doc/models/containers/update-price-ending-quantity.md b/doc/models/containers/update-price-ending-quantity.md index cf9a89d4..76cea218 100644 --- a/doc/models/containers/update-price-ending-quantity.md +++ b/doc/models/containers/update-price-ending-quantity.md @@ -12,3 +12,23 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/update-price-starting-quantity.md b/doc/models/containers/update-price-starting-quantity.md index 287c44f9..36cfad11 100644 --- a/doc/models/containers/update-price-starting-quantity.md +++ b/doc/models/containers/update-price-starting-quantity.md @@ -12,3 +12,23 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/update-price-unit-price.md b/doc/models/containers/update-price-unit-price.md index 6b001dc0..33635e90 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 + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 91a54c8e..c90ec9be 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$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 00144f2c..77e2cd44 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 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/containers/update-subscription-net-terms.md b/doc/models/containers/update-subscription-net-terms.md index e15e4fc8..a157af23 100644 --- a/doc/models/containers/update-subscription-net-terms.md +++ b/doc/models/containers/update-subscription-net-terms.md @@ -12,3 +12,23 @@ | `string` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/update-subscription-snap-day.md b/doc/models/containers/update-subscription-snap-day.md index a01bb531..75b4066f 100644 --- a/doc/models/containers/update-subscription-snap-day.md +++ b/doc/models/containers/update-subscription-snap-day.md @@ -12,3 +12,23 @@ | `string` | | `int` | +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + diff --git a/doc/models/containers/usage-quantity.md b/doc/models/containers/usage-quantity.md index ddcf6678..b2fb6968 100644 --- a/doc/models/containers/usage-quantity.md +++ b/doc/models/containers/usage-quantity.md @@ -12,3 +12,23 @@ | `int` | | `string` | +## int + +### Initialization Code + +#### Example + +```php +$value = 0; +``` + +## string + +### Initialization Code + +#### Example + +```php +$value = 'String0'; +``` + diff --git a/doc/models/create-allocation.md b/doc/models/create-allocation.md index 703abc46..c128ecc9 100644 --- a/doc/models/create-allocation.md +++ b/doc/models/create-allocation.md @@ -22,7 +22,7 @@ | `accrueCharge` | `?bool` | 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. | getAccrueCharge(): ?bool | setAccrueCharge(?bool accrueCharge): void | | `initiateDunning` | `?bool` | 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. | getInitiateDunning(): ?bool | setInitiateDunning(?bool initiateDunning): void | | `pricePointId` | string\|int\|null | Optional | This is a container for one-of cases. | getPricePointId(): | setPricePointId( pricePointId): void | -| `billingSchedule` | [`?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. | getBillingSchedule(): ?BillingSchedule | setBillingSchedule(?BillingSchedule billingSchedule): void | +| `billingSchedule` | [`?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. | getBillingSchedule(): ?BillingSchedule | setBillingSchedule(?BillingSchedule billingSchedule): void | | `customPrice` | [`?ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | getCustomPrice(): ?ComponentCustomPrice | setCustomPrice(?ComponentCustomPrice customPrice): void | ## Example (as JSON) diff --git a/doc/models/create-invoice.md b/doc/models/create-invoice.md index 6671c550..eed6c008 100644 --- a/doc/models/create-invoice.md +++ b/doc/models/create-invoice.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | | `lineItems` | [`?(CreateInvoiceItem[])`](../../doc/models/create-invoice-item.md) | Optional | - | getLineItems(): ?array | setLineItems(?array lineItems): void | -| `issueDate` | `?DateTime` | Optional | - | getIssueDate(): ?\DateTime | setIssueDate(?\DateTime issueDate): void | +| `issueDate` | `?DateTime` | 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. | getIssueDate(): ?\DateTime | setIssueDate(?\DateTime issueDate): void | | `netTerms` | `?int` | 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. | getNetTerms(): ?int | setNetTerms(?int netTerms): void | | `paymentInstructions` | `?string` | Optional | - | getPaymentInstructions(): ?string | setPaymentInstructions(?string paymentInstructions): void | | `memo` | `?string` | Optional | A custom memo can be sent to override the site's default. | getMemo(): ?string | setMemo(?string memo): void | diff --git a/doc/models/create-on-off-component.md b/doc/models/create-on-off-component.md index ec001e71..81d4720c 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.md b/doc/models/create-or-update-endpoint.md index 1f370319..0c245f09 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" + "subscription_prepayment_account_balance_changed" ] } ``` diff --git a/doc/models/create-payment-profile.md b/doc/models/create-payment-profile.md index a4e3bd82..27395037 100644 --- a/doc/models/create-payment-profile.md +++ b/doc/models/create-payment-profile.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `chargifyToken` | `?string` | Optional | Token received after sending billing information using chargify.js. | getChargifyToken(): ?string | setChargifyToken(?string chargifyToken): void | +| `chargifyToken` | `?string` | Optional | Token received after sending billing information using Maxio.js (formerly Chargify.js). | getChargifyToken(): ?string | setChargifyToken(?string chargifyToken): void | | `id` | `?int` | Optional | - | getId(): ?int | setId(?int id): void | | `paymentType` | [`?string(PaymentType)`](../../doc/models/payment-type.md) | Optional | - | getPaymentType(): ?string | setPaymentType(?string paymentType): void | | `firstName` | `?string` | Optional | First name on card or bank account. If omitted, the first_name from customer attributes will be used. | getFirstName(): ?string | setFirstName(?string firstName): void | @@ -29,8 +29,8 @@ | `vaultToken` | `?string` | Optional | The “token” provided by your vault storage for an already stored payment profile | getVaultToken(): ?string | setVaultToken(?string vaultToken): void | | `customerVaultToken` | `?string` | Optional | (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | getCustomerVaultToken(): ?string | setCustomerVaultToken(?string customerVaultToken): void | | `customerId` | `?int` | Optional | (Required when creating a new payment profile) The Chargify customer id. | getCustomerId(): ?int | setCustomerId(?int customerId): void | -| `paypalEmail` | `?string` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. | getPaypalEmail(): ?string | setPaypalEmail(?string paypalEmail): void | -| `paymentMethodNonce` | `?string` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. | getPaymentMethodNonce(): ?string | setPaymentMethodNonce(?string paymentMethodNonce): void | +| `paypalEmail` | `?string` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. | getPaypalEmail(): ?string | setPaypalEmail(?string paypalEmail): void | +| `paymentMethodNonce` | `?string` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. | getPaymentMethodNonce(): ?string | setPaymentMethodNonce(?string paymentMethodNonce): void | | `gatewayHandle` | `?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. | getGatewayHandle(): ?string | setGatewayHandle(?string gatewayHandle): void | | `cvv` | `?string` | Optional | The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway. | getCvv(): ?string | setCvv(?string cvv): void | | `bankName` | `?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 | getBankName(): ?string | setBankName(?string bankName): void | diff --git a/doc/models/create-usage.md b/doc/models/create-usage.md index 4356e39a..3de0be60 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 | getQuantity(): ?float | setQuantity(?float quantity): void | | `pricePointId` | `?string` | Optional | - | getPricePointId(): ?string | setPricePointId(?string pricePointId): void | | `memo` | `?string` | Optional | - | getMemo(): ?string | setMemo(?string memo): void | -| `billingSchedule` | [`?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. | getBillingSchedule(): ?BillingSchedule | setBillingSchedule(?BillingSchedule billingSchedule): void | +| `billingSchedule` | [`?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. | getBillingSchedule(): ?BillingSchedule | setBillingSchedule(?BillingSchedule billingSchedule): void | | `customPrice` | [`?ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | getCustomPrice(): ?ComponentCustomPrice | setCustomPrice(?ComponentCustomPrice customPrice): void | ## Example (as JSON) diff --git a/doc/models/credit-card-payment-profile.md b/doc/models/credit-card-payment-profile.md index 3606cde5..46c470f5 100644 --- a/doc/models/credit-card-payment-profile.md +++ b/doc/models/credit-card-payment-profile.md @@ -28,7 +28,7 @@ | `billingAddress2` | `?string` | Optional | The current billing street address, second line, for the card. | getBillingAddress2(): ?string | setBillingAddress2(?string billingAddress2): void | | `paymentType` | [`string(PaymentType)`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType::CREDIT_CARD` | getPaymentType(): string | setPaymentType(string paymentType): void | | `disabled` | `?bool` | Optional | - | getDisabled(): ?bool | setDisabled(?bool disabled): void | -| `chargifyToken` | `?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) | getChargifyToken(): ?string | setChargifyToken(?string chargifyToken): void | +| `chargifyToken` | `?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) | getChargifyToken(): ?string | setChargifyToken(?string chargifyToken): void | | `siteGatewaySettingId` | `?int` | Optional | - | getSiteGatewaySettingId(): ?int | setSiteGatewaySettingId(?int siteGatewaySettingId): void | | `gatewayHandle` | `?string` | Optional | An identifier of connected gateway. | getGatewayHandle(): ?string | setGatewayHandle(?string gatewayHandle): void | | `createdAt` | `?DateTime` | Optional | A timestamp indicating when this payment profile was created | getCreatedAt(): ?\DateTime | setCreatedAt(?\DateTime createdAt): void | diff --git a/doc/models/credit-note-line-item.md b/doc/models/credit-note-line-item.md index 3347387f..5a3f0d75 100644 --- a/doc/models/credit-note-line-item.md +++ b/doc/models/credit-note-line-item.md @@ -17,6 +17,7 @@ | `subtotalAmount` | `?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). | getSubtotalAmount(): ?string | setSubtotalAmount(?string subtotalAmount): void | | `discountAmount` | `?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. | getDiscountAmount(): ?string | setDiscountAmount(?string discountAmount): void | | `taxAmount` | `?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. | getTaxAmount(): ?string | setTaxAmount(?string taxAmount): void | +| `taxIncluded` | `?bool` | 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`. | getTaxIncluded(): ?bool | setTaxIncluded(?bool taxIncluded): void | | `totalAmount` | `?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`. | getTotalAmount(): ?string | setTotalAmount(?string totalAmount): void | | `tieredUnitPrice` | `?bool` | 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. | getTieredUnitPrice(): ?bool | setTieredUnitPrice(?bool tieredUnitPrice): void | | `periodRangeStart` | `?DateTime` | Optional | Start date for the period credited by this line. The format is `"YYYY-MM-DD"`. | getPeriodRangeStart(): ?\DateTime | setPeriodRangeStart(?\DateTime periodRangeStart): void | diff --git a/doc/models/event-key.md b/doc/models/event-key.md index feb40461..e95df013 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` | diff --git a/doc/models/event-response.md b/doc/models/event-response.md index 4229a384..c6f44adb 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": "prepaid_subscription_balance_changed", "message": "message0", "subscription_id": 96, "customer_id": 24, diff --git a/doc/models/event.md b/doc/models/event.md index ad98218a..31189185 100644 --- a/doc/models/event.md +++ b/doc/models/event.md @@ -22,7 +22,7 @@ ```json { "id": 40, - "key": "invoice_issued", + "key": "expiring_card", "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 a0b9b374..02cf5d01 100644 --- a/doc/models/invoice-line-item.md +++ b/doc/models/invoice-line-item.md @@ -17,6 +17,7 @@ | `subtotalAmount` | `?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). | getSubtotalAmount(): ?string | setSubtotalAmount(?string subtotalAmount): void | | `discountAmount` | `?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. | getDiscountAmount(): ?string | setDiscountAmount(?string discountAmount): void | | `taxAmount` | `?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. | getTaxAmount(): ?string | setTaxAmount(?string taxAmount): void | +| `taxIncluded` | `?bool` | 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`. | getTaxIncluded(): ?bool | setTaxIncluded(?bool taxIncluded): void | | `totalAmount` | `?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`. | getTotalAmount(): ?string | setTotalAmount(?string totalAmount): void | | `tieredUnitPrice` | `?bool` | 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. | getTieredUnitPrice(): ?bool | setTieredUnitPrice(?bool tieredUnitPrice): void | | `periodRangeStart` | `?DateTime` | 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. | getPeriodRangeStart(): ?\DateTime | setPeriodRangeStart(?\DateTime periodRangeStart): void | diff --git a/doc/models/payment-profile-attributes.md b/doc/models/payment-profile-attributes.md index ad29593c..c02659c4 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 | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `chargifyToken` | `?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) | getChargifyToken(): ?string | setChargifyToken(?string chargifyToken): void | +| `chargifyToken` | `?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) | getChargifyToken(): ?string | setChargifyToken(?string chargifyToken): void | | `id` | `?int` | Optional | - | getId(): ?int | setId(?int id): void | | `paymentType` | [`?string(PaymentType)`](../../doc/models/payment-type.md) | Optional | - | getPaymentType(): ?string | setPaymentType(?string paymentType): void | | `firstName` | `?string` | Optional | (Optional) First name on card or bank account. If omitted, the first_name from customer attributes will be used. | getFirstName(): ?string | setFirstName(?string firstName): void | diff --git a/doc/models/webhook-subscription.md b/doc/models/webhook-subscription.md index ced689e1..172e795d 100644 --- a/doc/models/webhook-subscription.md +++ b/doc/models/webhook-subscription.md @@ -17,6 +17,7 @@ | `EXPIRING_CARD` | | `EXPIRATION_DATE_CHANGE` | | `INVOICE_ISSUED` | +| `INVOICE_PENDING` | | `METERED_USAGE` | | `PAYMENT_FAILURE` | | `PAYMENT_SUCCESS` | diff --git a/src/AdvancedBillingClient.php b/src/AdvancedBillingClient.php index 80e55b7d..19654aba 100644 --- a/src/AdvancedBillingClient.php +++ b/src/AdvancedBillingClient.php @@ -147,7 +147,7 @@ public function __construct(array $config = []) ->converter(new CompatibilityConverter()) ->jsonHelper(ApiHelper::getJsonHelper()) ->apiCallback($this->config['httpCallback'] ?? null) - ->userAgent('AB SDK PHP:9.0.0 on OS {os-info}') + ->userAgent('AB SDK PHP:9.1.0 on OS {os-info}') ->globalConfig($this->getGlobalConfiguration()) ->globalErrors($this->getGlobalErrors()) ->serverUrls(self::ENVIRONMENT_MAP[$this->getEnvironment()], Server::PRODUCTION) diff --git a/src/Controllers/ComponentsController.php b/src/Controllers/ComponentsController.php index b67fde37..47baef6d 100644 --- a/src/Controllers/ComponentsController.php +++ b/src/Controllers/ComponentsController.php @@ -35,7 +35,7 @@ class ComponentsController extends BaseController * product family. 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 + * 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 diff --git a/src/Controllers/InvoicesController.php b/src/Controllers/InvoicesController.php index da605bc7..ef686174 100644 --- a/src/Controllers/InvoicesController.php +++ b/src/Controllers/InvoicesController.php @@ -52,8 +52,8 @@ class InvoicesController extends BaseController * * 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 The unique identifier for the invoice, this does not refer to the public * facing invoice number. @@ -276,8 +276,8 @@ public function recordPaymentForInvoice(string $uid, ?CreateInvoicePaymentReques /** * 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. * * ``` * { @@ -581,10 +581,10 @@ public function listConsolidatedInvoiceSegments(array $options): ConsolidatedInv * 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 `unit_price` for custom item. + * 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 subscription's site can be * provided with `product_id`. By default `unit_price` is taken from product's default price point, but @@ -594,7 +594,7 @@ public function listConsolidatedInvoiceSegments(array $options): ConsolidatedInv * 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 + * 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. * @@ -731,9 +731,10 @@ public function listConsolidatedInvoiceSegments(array $options): ConsolidatedInv * * #### 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 * @@ -750,7 +751,7 @@ public function listConsolidatedInvoiceSegments(array $options): ConsolidatedInv * #### 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 can be sent with the `payment_instructions` parameter. * * #### Status * @@ -836,9 +837,9 @@ public function sendInvoice(string $uid, ?SendInvoiceRequest $body = null): void } /** - * 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. @@ -880,7 +881,7 @@ public function previewCustomerInformationChanges(string $uid): CustomerChangesP /** * 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. + * `/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. @@ -927,10 +928,10 @@ public function updateCustomerInformation(string $uid): 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 subscription will be automatically applied. Additionally, if setting is on, an email will - * be sent for issued invoice. + * 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 + * 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: diff --git a/src/Controllers/PaymentProfilesController.php b/src/Controllers/PaymentProfilesController.php index 5d2e95f3..ac2dfd34 100644 --- a/src/Controllers/PaymentProfilesController.php +++ b/src/Controllers/PaymentProfilesController.php @@ -44,9 +44,9 @@ class PaymentProfilesController extends BaseController * * 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. + * 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: * @@ -57,19 +57,20 @@ class PaymentProfilesController extends BaseController * + [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- + * + [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) - * + [Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en- + * + [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 example](https://docs.maxio.com/hc/en- + * + [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 example](https://docs.maxio.com/hc/en- + * + [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 example](https://developers.chargify. + * + [CMaxio.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. + * + [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- @@ -81,80 +82,15 @@ class PaymentProfilesController extends BaseController * + [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. * * @param CreatePaymentProfileRequest|null $body When following the IBAN or the Local Bank * details examples, a customer, bank account and mandate will be created in your diff --git a/src/Controllers/SitesController.php b/src/Controllers/SitesController.php index 22342a3f..8bda61d9 100644 --- a/src/Controllers/SitesController.php +++ b/src/Controllers/SitesController.php @@ -20,16 +20,16 @@ class SitesController extends 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. + * 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, @@ -52,9 +52,10 @@ public function readSite(): SiteResponse } /** - * 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.** @@ -83,7 +84,7 @@ public function clearSite(?string $cleanupScope = CleanupScope::ALL): void } /** - * This endpoint returns public keys used for Chargify.js. + * Returns public keys used for Maxio.js (formerly Chargify.js). * * @param array $options Array with all options for search * diff --git a/src/Controllers/SubscriptionComponentsController.php b/src/Controllers/SubscriptionComponentsController.php index 0af07b04..7fa853d1 100644 --- a/src/Controllers/SubscriptionComponentsController.php +++ b/src/Controllers/SubscriptionComponentsController.php @@ -47,7 +47,7 @@ class SubscriptionComponentsController extends BaseController { /** - * This request will list information regarding a specific component owned by a subscription. + * Returns information for a specific component on a subscription. * * @param int $subscriptionId The Chargify id of the subscription. * @param int $componentId The Advanced Billing id of the component. Alternatively, the @@ -77,7 +77,7 @@ public function readSubscriptionComponent(int $subscriptionId, int $componentId) } /** - * This request will list a subscription's applied components. + * Lists a subscription's applied components. * * ## Archived Components * @@ -208,8 +208,8 @@ public function bulkResetSubscriptionComponentsPricePoints(int $subscriptionId): * 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- @@ -233,7 +233,7 @@ public function bulkResetSubscriptionComponentsPricePoints(int $subscriptionId): * > **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- + * For more information, see the [Component Allocations](https://maxio.zendesk.com/hc/en- * us/articles/24251883961485-Component-Allocations-Overview) product Documentation. * * @param int $subscriptionId The Chargify id of the subscription. @@ -275,7 +275,7 @@ public function allocateComponent( } /** - * 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 * @@ -324,7 +324,7 @@ public function listAllocations(int $subscriptionId, int $componentId, ?int $pag /** * 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. + * 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. @@ -347,8 +347,8 @@ public function listAllocations(int $subscriptionId, int $componentId, ?int $pag * > **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. * * @param int $subscriptionId The Chargify id of the subscription. * @param AllocateComponents|null $body @@ -385,9 +385,9 @@ public function allocateComponents(int $subscriptionId, ?AllocateComponents $bod } /** - * 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` * @@ -434,9 +434,8 @@ public function previewAllocations( } /** - * 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. @@ -493,8 +492,10 @@ public function updatePrepaidUsageAllocationExpirationDate( } /** + * 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 + * reduce a subscription's allocated quantity for a prepaid usage component, each allocation must be * destroyed individually via this endpoint. * * ## Credit Scheme @@ -562,14 +563,14 @@ public function deletePrepaidUsageAllocation( * 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 + * 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 + * 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- @@ -664,8 +665,8 @@ public function createUsage( } /** - * 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. * @@ -727,6 +728,8 @@ public function listUsages(array $options): array } /** + * 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. * @@ -769,8 +772,8 @@ public function activateEventBasedComponent( } /** - * 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 int $subscriptionId The Advanced Billing id of the subscription * @param int $componentId The Advanced Billing id of the component @@ -795,6 +798,8 @@ public function deactivateEventBasedComponent(int $subscriptionId, int $componen } /** + * 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 @@ -844,7 +849,7 @@ public function recordEvent(string $apiHandle, ?string $storeUid = null, ?EBBEve } /** - * 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.* @@ -877,7 +882,7 @@ public function bulkRecordEvents(string $apiHandle, ?string $storeUid = null, ?a } /** - * This request will list components applied to each subscription. + * Lists components applied to each subscription. * * @param array $options Array with all options for search * diff --git a/src/Controllers/SubscriptionGroupInvoiceAccountController.php b/src/Controllers/SubscriptionGroupInvoiceAccountController.php index a6e1006f..c3fc5515 100644 --- a/src/Controllers/SubscriptionGroupInvoiceAccountController.php +++ b/src/Controllers/SubscriptionGroupInvoiceAccountController.php @@ -29,9 +29,8 @@ class SubscriptionGroupInvoiceAccountController extends 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 The uid of the subscription group * @param SubscriptionGroupPrepaymentRequest|null $body @@ -66,7 +65,7 @@ public function createSubscriptionGroupPrepayment( } /** - * This request will list a subscription group's prepayments. + * Lists a subscription group's prepayments. * * @param array $options Array with all options for search * @@ -93,9 +92,9 @@ public function listPrepaymentsForSubscriptionGroup(array $options): ListSubscri } /** - * 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 The uid of the subscription group * @param IssueServiceCreditRequest|null $body @@ -133,8 +132,8 @@ public function issueSubscriptionGroupServiceCredit( } /** - * 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 The uid of the subscription group * @param DeductServiceCreditRequest|null $body diff --git a/src/Controllers/SubscriptionGroupStatusController.php b/src/Controllers/SubscriptionGroupStatusController.php index 52928467..aa4ddade 100644 --- a/src/Controllers/SubscriptionGroupStatusController.php +++ b/src/Controllers/SubscriptionGroupStatusController.php @@ -61,8 +61,8 @@ public function cancelSubscriptionsInGroup(string $uid, ?CancelGroupedSubscripti } /** - * 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. @@ -92,6 +92,8 @@ public function initiateDelayedCancellationForGroup(string $uid): void } /** + * 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. @@ -122,10 +124,10 @@ public function cancelDelayedCancellationForGroup(string $uid): void } /** - * 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 @@ -135,12 +137,12 @@ public function cancelDelayedCancellationForGroup(string $uid): void * * 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 + * 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. + * 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. @@ -160,6 +162,16 @@ public function cancelDelayedCancellationForGroup(string $uid): void * 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. + * * @param string $uid The uid of the subscription group * @param ReactivateSubscriptionGroupRequest|null $body * diff --git a/src/Controllers/SubscriptionGroupsController.php b/src/Controllers/SubscriptionGroupsController.php index 8fe9642d..e269ff28 100644 --- a/src/Controllers/SubscriptionGroupsController.php +++ b/src/Controllers/SubscriptionGroupsController.php @@ -36,7 +36,7 @@ class SubscriptionGroupsController extends BaseController { /** - * Create multiple subscriptions at once under the same customer and consolidate them into a + * 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 @@ -48,12 +48,12 @@ class SubscriptionGroupsController extends BaseController * * 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 + * 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. + * you are using a secure chargify_token generated by Maxio.js (formerly Chargify.js). * * @param SubscriptionGroupSignupRequest|null $body * @@ -143,7 +143,7 @@ public function listSubscriptionGroups(array $options): ListSubscriptionGroupsRe } /** - * Use this endpoint to find subscription group details. + * Returns subscription group details. * * #### Current Billing Amount in Cents * @@ -175,10 +175,10 @@ public function readSubscriptionGroup(string $uid, ?array $mInclude = null): Ful } /** - * 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. + * the subscription group. To clean up members, just leave the array empty. * * @param string $uid The uid of the subscription group * @param UpdateSubscriptionGroupRequest|null $body @@ -236,9 +236,9 @@ public function deleteSubscriptionGroup(string $uid): DeleteSubscriptionGroupRes } /** - * 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. * * @param string $subscriptionId The Advanced Billing id of the subscription associated with the * subscription group @@ -317,7 +317,7 @@ public function addSubscriptionToGroup( * 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. + * hierarchies) features, it is possible to remove an existing subscription from a subscription group. * * @param int $subscriptionId The Chargify id of the subscription. * diff --git a/src/Controllers/SubscriptionInvoiceAccountController.php b/src/Controllers/SubscriptionInvoiceAccountController.php index 7de15bfb..a9b846e6 100644 --- a/src/Controllers/SubscriptionInvoiceAccountController.php +++ b/src/Controllers/SubscriptionInvoiceAccountController.php @@ -56,7 +56,7 @@ public function readAccountBalances(int $subscriptionId): AccountBalances } /** - * ## Create Prepayment + * Creates a prepayment for a subscription. * * In order to specify a prepayment made against a subscription, specify the `amount, memo, details, * method`. @@ -67,6 +67,16 @@ public function readAccountBalances(int $subscriptionId): AccountBalances * * 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. + * * * @param int $subscriptionId The Chargify id of the subscription. * @param CreatePrepaymentRequest|null $body @@ -103,7 +113,7 @@ public function createPrepayment( } /** - * This request will list a subscription's prepayments. + * Lists a subscription's prepayments. * * @param array $options Array with all options for search * @@ -133,8 +143,8 @@ public function listPrepayments(array $options): PrepaymentsResponse } /** - * 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 int $subscriptionId The Chargify id of the subscription. * @param IssueServiceCreditRequest|null $body @@ -169,8 +179,8 @@ public function issueServiceCredit(int $subscriptionId, ?IssueServiceCreditReque } /** - * 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 int $subscriptionId The Chargify id of the subscription. * @param DeductServiceCreditRequest|null $body @@ -204,7 +214,7 @@ public function deductServiceCredit(int $subscriptionId, ?DeductServiceCreditReq } /** - * This request will list a subscription's service credits. + * Lists a subscription's service credits. * * @param int $subscriptionId The Chargify id of the subscription. * @param int|null $page Result records are organized in pages. By default, the first page of @@ -259,9 +269,9 @@ public function listServiceCredits( } /** - * 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`. diff --git a/src/Controllers/SubscriptionNotesController.php b/src/Controllers/SubscriptionNotesController.php index 6826f20c..2781f506 100644 --- a/src/Controllers/SubscriptionNotesController.php +++ b/src/Controllers/SubscriptionNotesController.php @@ -24,7 +24,7 @@ class SubscriptionNotesController extends BaseController { /** - * Use the following method to create a note for a subscription. + * Creates a note for a subscription. * * ## How to Use Subscription Notes * @@ -68,8 +68,7 @@ public function createSubscriptionNote( } /** - * 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 array $options Array with all options for search * @@ -101,8 +100,7 @@ public function listSubscriptionNotes(array $options): array } /** - * 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 int $subscriptionId The Chargify id of the subscription. * @param int $noteId The Advanced Billing id of the note @@ -129,7 +127,7 @@ public function readSubscriptionNote(int $subscriptionId, int $noteId): Subscrip } /** - * Use the following method to update a note for a Subscription. + * Updates a note for a subscription. * * @param int $subscriptionId The Chargify id of the subscription. * @param int $noteId The Advanced Billing id of the note diff --git a/src/Controllers/SubscriptionProductsController.php b/src/Controllers/SubscriptionProductsController.php index 49f51361..f225891d 100644 --- a/src/Controllers/SubscriptionProductsController.php +++ b/src/Controllers/SubscriptionProductsController.php @@ -25,6 +25,8 @@ class SubscriptionProductsController extends 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 choose which price point the subscription is moved to. If no price @@ -48,76 +50,18 @@ class SubscriptionProductsController extends BaseController * * ## 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`) - * - * 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_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. + * 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. + * + * ## 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. * * @param int $subscriptionId The Chargify id of the subscription. * @param SubscriptionProductMigrationRequest|null $body @@ -155,10 +99,12 @@ public function migrateSubscriptionProduct( } /** + * 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"`). + * 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. diff --git a/src/Controllers/SubscriptionStatusController.php b/src/Controllers/SubscriptionStatusController.php index ce0d94f8..2a628840 100644 --- a/src/Controllers/SubscriptionStatusController.php +++ b/src/Controllers/SubscriptionStatusController.php @@ -30,16 +30,18 @@ class SubscriptionStatusController extends BaseController { /** - * 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. * * @param int $subscriptionId The Chargify id of the subscription. * @@ -102,7 +104,7 @@ public function cancelSubscription(int $subscriptionId, ?CancellationRequest $bo } /** - * Resume a paused (on-hold) subscription. If the normal next renewal date has not passed, the + * 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. * @@ -141,7 +143,7 @@ public function resumeSubscription( } /** - * 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 * @@ -178,15 +180,14 @@ public function pauseSubscription(int $subscriptionId, ?PauseRequest $body = nul } /** - * 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 + * Alternatively, you can change the `automatically_resume_at` to `null` if you would like the * subscription to not have a resume date. * * @param int $subscriptionId The Chargify id of the subscription. @@ -222,9 +223,9 @@ public function updateAutomaticSubscriptionResumption( } /** - * 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.** @@ -254,9 +255,9 @@ public function updateAutomaticSubscriptionResumption( * 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 + * 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. + * resuming the previous billing period was possible. * * | Canceled | Reactivation | Resumable? | * |---|---|---| @@ -396,6 +397,16 @@ public function updateAutomaticSubscriptionResumption( * + 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. + * * @param int $subscriptionId The Chargify id of the subscription. * @param ReactivateSubscriptionRequest|null $body * @@ -473,9 +484,8 @@ public function initiateDelayedCancellation( } /** - * 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. @@ -501,8 +511,7 @@ public function cancelDelayedCancellation(int $subscriptionId): DelayedCancellat } /** - * 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 int $subscriptionId The Chargify id of the subscription. * @@ -531,9 +540,9 @@ public function cancelDunning(int $subscriptionId): SubscriptionResponse } /** - * 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. diff --git a/src/Controllers/SubscriptionsController.php b/src/Controllers/SubscriptionsController.php index d13344a4..46b65ea5 100644 --- a/src/Controllers/SubscriptionsController.php +++ b/src/Controllers/SubscriptionsController.php @@ -44,9 +44,9 @@ class SubscriptionsController extends 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, + * 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 @@ -56,6 +56,11 @@ class SubscriptionsController extends 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-Products) for more information. See the [Payments @@ -67,12 +72,19 @@ class SubscriptionsController extends BaseController * * 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. + * 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. * * @param CreateSubscriptionRequest|null $body * @@ -100,7 +112,7 @@ public function createSubscription(?CreateSubscriptionRequest $body = null): Sub } /** - * returns an array of subscriptions from a Site. Pay close attention to query string filters and + * 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 @@ -231,7 +243,7 @@ public function listSubscriptions(array $options): array * * ## Billing Date Changes * - * You can update dates for a subscrption. + * You can update dates for a subscription. * * ### Regular Billing Date Changes * @@ -239,14 +251,14 @@ public function listSubscriptions(array $options): array * 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 + * > 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 @@ -254,8 +266,8 @@ public function listSubscriptions(array $options): array * * > 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. + * `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 int $subscriptionId The Chargify id of the subscription. * @param UpdateSubscriptionRequest|null $body @@ -322,9 +334,8 @@ public function readSubscription(int $subscriptionId, ?array $mInclude = null): } /** - * 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 @@ -386,7 +397,7 @@ public function overrideSubscription(int $subscriptionId, ?OverrideSubscriptionR } /** - * Use this endpoint to find a subscription by its reference. + * Finds a subscription by its reference. * * @param string|null $reference Subscription reference * @@ -408,7 +419,7 @@ public function findSubscription(?string $reference = null): SubscriptionRespons } /** - * 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 @@ -456,7 +467,7 @@ public function purgeSubscription(int $subscriptionId, int $ack, ?array $cascade } /** - * Use this endpoint to update a subscription's prepaid configuration. + * Updates a subscription's prepaid configuration. * * @param int $subscriptionId The Chargify id of the subscription. * @param UpsertPrepaidConfigurationRequest|null $body @@ -493,8 +504,7 @@ public function updatePrepaidSubscriptionConfiguration( } /** - * 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. * @@ -549,6 +559,8 @@ public function previewSubscription(?CreateSubscriptionRequest $body = null): Su } /** + * 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- @@ -602,9 +614,9 @@ public function applyCouponsToSubscription( } /** - * 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 + * 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) * @@ -640,9 +652,8 @@ public function removeCouponFromSubscription(int $subscriptionId, ?string $coupo } /** - * 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](#). diff --git a/src/Controllers/WebhooksController.php b/src/Controllers/WebhooksController.php index 4530871c..42e6aa3e 100644 --- a/src/Controllers/WebhooksController.php +++ b/src/Controllers/WebhooksController.php @@ -32,8 +32,8 @@ class WebhooksController extends BaseController { /** - * 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. * * @param array $options Array with all options for search * @@ -67,7 +67,7 @@ public function listWebhooks(array $options): array } /** - * Allows you to enable webhooks for your site + * Enables webhooks for your site. * * @param EnableWebhooksRequest|null $body * @@ -109,7 +109,7 @@ public function replayWebhooks(?ReplayWebhooksRequest $body = null): ReplayWebho } /** - * 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. * @@ -162,7 +162,7 @@ public function listEndpoints(): array * 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 + * If you want to unsubscribe from a specific event, send a list of `webhook_subscriptions` without the * specific event key. * * @param int $endpointId The Advanced Billing id for the endpoint that should be updated diff --git a/src/Models/ActivateEventBasedComponent.php b/src/Models/ActivateEventBasedComponent.php index 05473f63..172d32b8 100644 --- a/src/Models/ActivateEventBasedComponent.php +++ b/src/Models/ActivateEventBasedComponent.php @@ -52,8 +52,9 @@ public function setPricePointId(?int $pricePointId): void /** * Returns 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. */ public function getBillingSchedule(): ?BillingSchedule { @@ -62,8 +63,9 @@ public function getBillingSchedule(): ?BillingSchedule /** * Sets 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. * * @maps billing_schedule */ diff --git a/src/Models/BankAccountPaymentProfile.php b/src/Models/BankAccountPaymentProfile.php index 6b24405d..1c83210f 100644 --- a/src/Models/BankAccountPaymentProfile.php +++ b/src/Models/BankAccountPaymentProfile.php @@ -87,14 +87,14 @@ class BankAccountPaymentProfile implements \JsonSerializable private $bankName; /** - * @var string|null + * @var array */ - private $maskedBankRoutingNumber; + private $maskedBankRoutingNumber = []; /** - * @var string + * @var array */ - private $maskedBankAccountNumber; + private $maskedBankAccountNumber = []; /** * @var string|null @@ -137,12 +137,10 @@ class BankAccountPaymentProfile implements \JsonSerializable private $updatedAt; /** - * @param string $maskedBankAccountNumber * @param string $paymentType */ - public function __construct(string $maskedBankAccountNumber, string $paymentType) + public function __construct(string $paymentType) { - $this->maskedBankAccountNumber = $maskedBankAccountNumber; $this->paymentType = $paymentType; } @@ -253,7 +251,7 @@ public function setCurrentVault(?string $currentVault): void /** * Returns Vault Token. - * The “token” provided by your vault storage for an already stored payment profile + * The "token" provided by your vault storage for an already stored payment profile */ public function getVaultToken(): ?string { @@ -262,7 +260,7 @@ public function getVaultToken(): ?string /** * Sets Vault Token. - * The “token” provided by your vault storage for an already stored payment profile + * The "token" provided by your vault storage for an already stored payment profile * * @maps vault_token */ @@ -521,46 +519,71 @@ public function setBankName(?string $bankName): void /** * Returns Masked Bank Routing Number. * 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 + * X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account */ public function getMaskedBankRoutingNumber(): ?string { - return $this->maskedBankRoutingNumber; + if (count($this->maskedBankRoutingNumber) == 0) { + return null; + } + return $this->maskedBankRoutingNumber['value']; } /** * Sets Masked Bank Routing Number. * 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 + * X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account * * @maps masked_bank_routing_number */ public function setMaskedBankRoutingNumber(?string $maskedBankRoutingNumber): void { - $this->maskedBankRoutingNumber = $maskedBankRoutingNumber; + $this->maskedBankRoutingNumber['value'] = $maskedBankRoutingNumber; + } + + /** + * Unsets Masked Bank Routing Number. + * 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 + */ + public function unsetMaskedBankRoutingNumber(): void + { + $this->maskedBankRoutingNumber = []; } /** * Returns Masked Bank Account Number. * A string representation of the stored bank account number with all but the last 4 digits marked with - * X’s (i.e. ‘XXXXXXX1111’) + * X's (i.e. 'XXXXXXX1111') */ - public function getMaskedBankAccountNumber(): string + public function getMaskedBankAccountNumber(): ?string { - return $this->maskedBankAccountNumber; + if (count($this->maskedBankAccountNumber) == 0) { + return null; + } + return $this->maskedBankAccountNumber['value']; } /** * Sets Masked Bank Account Number. * A string representation of the stored bank account number with all but the last 4 digits marked with - * X’s (i.e. ‘XXXXXXX1111’) + * X's (i.e. 'XXXXXXX1111') * - * @required * @maps masked_bank_account_number */ - public function setMaskedBankAccountNumber(string $maskedBankAccountNumber): void + public function setMaskedBankAccountNumber(?string $maskedBankAccountNumber): void { - $this->maskedBankAccountNumber = $maskedBankAccountNumber; + $this->maskedBankAccountNumber['value'] = $maskedBankAccountNumber; + } + + /** + * Unsets Masked Bank Account Number. + * A string representation of the stored bank account number with all but the last 4 digits marked with + * X's (i.e. 'XXXXXXX1111') + */ + public function unsetMaskedBankAccountNumber(): void + { + $this->maskedBankAccountNumber = []; } /** @@ -771,8 +794,8 @@ public function __toString(): string 'customerVaultToken' => $this->getCustomerVaultToken(), 'billingAddress2' => $this->getBillingAddress2(), 'bankName' => $this->bankName, - 'maskedBankRoutingNumber' => $this->maskedBankRoutingNumber, - 'maskedBankAccountNumber' => $this->maskedBankAccountNumber, + 'maskedBankRoutingNumber' => $this->getMaskedBankRoutingNumber(), + 'maskedBankAccountNumber' => $this->getMaskedBankAccountNumber(), 'bankAccountType' => $this->bankAccountType, 'bankAccountHolderType' => $this->bankAccountHolderType, 'paymentType' => $this->paymentType, @@ -868,10 +891,12 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false) if (isset($this->bankName)) { $json['bank_name'] = $this->bankName; } - if (isset($this->maskedBankRoutingNumber)) { - $json['masked_bank_routing_number'] = $this->maskedBankRoutingNumber; + if (!empty($this->maskedBankRoutingNumber)) { + $json['masked_bank_routing_number'] = $this->maskedBankRoutingNumber['value']; + } + if (!empty($this->maskedBankAccountNumber)) { + $json['masked_bank_account_number'] = $this->maskedBankAccountNumber['value']; } - $json['masked_bank_account_number'] = $this->maskedBankAccountNumber; if (isset($this->bankAccountType)) { $json['bank_account_type'] = BankAccountType::checkValue($this->bankAccountType); } diff --git a/src/Models/BillingSchedule.php b/src/Models/BillingSchedule.php index 3319727f..d2dffe1d 100644 --- a/src/Models/BillingSchedule.php +++ b/src/Models/BillingSchedule.php @@ -15,39 +15,54 @@ use stdClass; /** - * 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 implements \JsonSerializable { /** - * @var \DateTime|null + * @var array */ - private $initialBillingAt; + private $initialBillingAt = []; /** * Returns Initial Billing At. - * 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. */ public function getInitialBillingAt(): ?\DateTime { - return $this->initialBillingAt; + if (count($this->initialBillingAt) == 0) { + return null; + } + return $this->initialBillingAt['value']; } /** * Sets Initial Billing At. - * 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. * * @maps initial_billing_at * @factory \AdvancedBillingLib\Utils\DateTimeHelper::fromSimpleDate */ public function setInitialBillingAt(?\DateTime $initialBillingAt): void { - $this->initialBillingAt = $initialBillingAt; + $this->initialBillingAt['value'] = $initialBillingAt; + } + + /** + * Unsets Initial Billing At. + * 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. + */ + public function unsetInitialBillingAt(): void + { + $this->initialBillingAt = []; } /** @@ -59,7 +74,10 @@ public function __toString(): string { return ApiHelper::stringify( 'BillingSchedule', - ['initialBillingAt' => $this->initialBillingAt, 'additionalProperties' => $this->additionalProperties] + [ + 'initialBillingAt' => $this->getInitialBillingAt(), + 'additionalProperties' => $this->additionalProperties + ] ); } @@ -103,8 +121,8 @@ public function findAdditionalProperty(string $name) public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; - if (isset($this->initialBillingAt)) { - $json['initial_billing_at'] = DateTimeHelper::toSimpleDate($this->initialBillingAt); + if (!empty($this->initialBillingAt)) { + $json['initial_billing_at'] = DateTimeHelper::toSimpleDate($this->initialBillingAt['value']); } $json = array_merge($json, $this->additionalProperties); diff --git a/src/Models/Builders/BankAccountPaymentProfileBuilder.php b/src/Models/Builders/BankAccountPaymentProfileBuilder.php index eb4fddd1..54b603a1 100644 --- a/src/Models/Builders/BankAccountPaymentProfileBuilder.php +++ b/src/Models/Builders/BankAccountPaymentProfileBuilder.php @@ -33,12 +33,11 @@ private function __construct(BankAccountPaymentProfile $instance) /** * Initializes a new Bank Account Payment Profile Builder object. * - * @param string $maskedBankAccountNumber * @param string $paymentType */ - public static function init(string $maskedBankAccountNumber, string $paymentType): self + public static function init(string $paymentType): self { - return new self(new BankAccountPaymentProfile($maskedBankAccountNumber, $paymentType)); + return new self(new BankAccountPaymentProfile($paymentType)); } /** @@ -269,6 +268,35 @@ public function maskedBankRoutingNumber(?string $value): self return $this; } + /** + * Unsets masked bank routing number field. + */ + public function unsetMaskedBankRoutingNumber(): self + { + $this->instance->unsetMaskedBankRoutingNumber(); + return $this; + } + + /** + * Sets masked bank account number field. + * + * @param string|null $value + */ + public function maskedBankAccountNumber(?string $value): self + { + $this->instance->setMaskedBankAccountNumber($value); + return $this; + } + + /** + * Unsets masked bank account number field. + */ + public function unsetMaskedBankAccountNumber(): self + { + $this->instance->unsetMaskedBankAccountNumber(); + return $this; + } + /** * Sets bank account type field. * diff --git a/src/Models/Builders/BillingScheduleBuilder.php b/src/Models/Builders/BillingScheduleBuilder.php index afc70216..a566487a 100644 --- a/src/Models/Builders/BillingScheduleBuilder.php +++ b/src/Models/Builders/BillingScheduleBuilder.php @@ -49,6 +49,15 @@ public function initialBillingAt(?\DateTime $value): self return $this; } + /** + * Unsets initial billing at field. + */ + public function unsetInitialBillingAt(): self + { + $this->instance->unsetInitialBillingAt(); + return $this; + } + /** * Add an additional property to this model. * diff --git a/src/Models/Builders/CreditNoteLineItemBuilder.php b/src/Models/Builders/CreditNoteLineItemBuilder.php index 9cad9022..57437d43 100644 --- a/src/Models/Builders/CreditNoteLineItemBuilder.php +++ b/src/Models/Builders/CreditNoteLineItemBuilder.php @@ -126,6 +126,17 @@ public function taxAmount(?string $value): self return $this; } + /** + * Sets tax included field. + * + * @param bool|null $value + */ + public function taxIncluded(?bool $value): self + { + $this->instance->setTaxIncluded($value); + return $this; + } + /** * Sets total amount field. * diff --git a/src/Models/Builders/InvoiceLineItemBuilder.php b/src/Models/Builders/InvoiceLineItemBuilder.php index 1a40bffb..f3d4c439 100644 --- a/src/Models/Builders/InvoiceLineItemBuilder.php +++ b/src/Models/Builders/InvoiceLineItemBuilder.php @@ -127,6 +127,17 @@ public function taxAmount(?string $value): self return $this; } + /** + * Sets tax included field. + * + * @param bool|null $value + */ + public function taxIncluded(?bool $value): self + { + $this->instance->setTaxIncluded($value); + return $this; + } + /** * Sets total amount field. * diff --git a/src/Models/CreateAllocation.php b/src/Models/CreateAllocation.php index 5edda3d1..e2c1eb77 100644 --- a/src/Models/CreateAllocation.php +++ b/src/Models/CreateAllocation.php @@ -481,8 +481,9 @@ public function unsetPricePointId(): void /** * Returns 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. */ public function getBillingSchedule(): ?BillingSchedule { @@ -491,8 +492,9 @@ public function getBillingSchedule(): ?BillingSchedule /** * Sets 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. * * @maps billing_schedule */ diff --git a/src/Models/CreateInvoice.php b/src/Models/CreateInvoice.php index f041316b..658c754d 100644 --- a/src/Models/CreateInvoice.php +++ b/src/Models/CreateInvoice.php @@ -90,6 +90,9 @@ public function setLineItems(?array $lineItems): void /** * Returns Issue Date. + * 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. */ public function getIssueDate(): ?\DateTime { @@ -98,6 +101,9 @@ public function getIssueDate(): ?\DateTime /** * Sets Issue Date. + * 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. * * @maps issue_date * @factory \AdvancedBillingLib\Utils\DateTimeHelper::fromSimpleDate diff --git a/src/Models/CreatePaymentProfile.php b/src/Models/CreatePaymentProfile.php index a9703224..31c91d89 100644 --- a/src/Models/CreatePaymentProfile.php +++ b/src/Models/CreatePaymentProfile.php @@ -177,7 +177,7 @@ class CreatePaymentProfile implements \JsonSerializable /** * Returns Chargify Token. - * Token received after sending billing information using chargify.js. + * Token received after sending billing information using Maxio.js (formerly Chargify.js). */ public function getChargifyToken(): ?string { @@ -186,7 +186,7 @@ public function getChargifyToken(): ?string /** * Sets Chargify Token. - * Token received after sending billing information using chargify.js. + * Token received after sending billing information using Maxio.js (formerly Chargify.js). * * @maps chargify_token */ @@ -619,7 +619,7 @@ public function setCustomerId(?int $customerId): void /** * Returns Paypal Email. * used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend - * using Chargify.js instead. + * using Maxio.js (formerly Chargify.js) instead. */ public function getPaypalEmail(): ?string { @@ -629,7 +629,7 @@ public function getPaypalEmail(): ?string /** * Sets Paypal Email. * used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend - * using Chargify.js instead. + * using Maxio.js (formerly Chargify.js) instead. * * @maps paypal_email */ @@ -641,7 +641,7 @@ public function setPaypalEmail(?string $paypalEmail): void /** * Returns Payment Method Nonce. * used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend - * using Chargify.js instead. + * using Maxio.js (formerly Chargify.js) instead. */ public function getPaymentMethodNonce(): ?string { @@ -651,7 +651,7 @@ public function getPaymentMethodNonce(): ?string /** * Sets Payment Method Nonce. * used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend - * using Chargify.js instead. + * using Maxio.js (formerly Chargify.js) instead. * * @maps payment_method_nonce */ diff --git a/src/Models/CreateUsage.php b/src/Models/CreateUsage.php index f7083f78..71527e33 100644 --- a/src/Models/CreateUsage.php +++ b/src/Models/CreateUsage.php @@ -98,8 +98,9 @@ public function setMemo(?string $memo): void /** * Returns 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. */ public function getBillingSchedule(): ?BillingSchedule { @@ -108,8 +109,9 @@ public function getBillingSchedule(): ?BillingSchedule /** * Sets 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. * * @maps billing_schedule */ diff --git a/src/Models/CreditCardPaymentProfile.php b/src/Models/CreditCardPaymentProfile.php index cd146bda..cc2132e9 100644 --- a/src/Models/CreditCardPaymentProfile.php +++ b/src/Models/CreditCardPaymentProfile.php @@ -631,8 +631,9 @@ public function setDisabled(?bool $disabled): void /** * Returns 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) */ public function getChargifyToken(): ?string { @@ -641,8 +642,9 @@ public function getChargifyToken(): ?string /** * Sets 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) * * @maps chargify_token */ diff --git a/src/Models/CreditNoteLineItem.php b/src/Models/CreditNoteLineItem.php index 5b4ec9c5..f30e543f 100644 --- a/src/Models/CreditNoteLineItem.php +++ b/src/Models/CreditNoteLineItem.php @@ -56,6 +56,11 @@ class CreditNoteLineItem implements \JsonSerializable */ private $taxAmount; + /** + * @var bool|null + */ + private $taxIncluded; + /** * @var string|null */ @@ -310,6 +315,38 @@ public function setTaxAmount(?string $taxAmount): void $this->taxAmount = $taxAmount; } + /** + * Returns Tax Included. + * 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`. + */ + public function getTaxIncluded(): ?bool + { + return $this->taxIncluded; + } + + /** + * Sets Tax Included. + * 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`. + * + * @maps tax_included + */ + public function setTaxIncluded(?bool $taxIncluded): void + { + $this->taxIncluded = $taxIncluded; + } + /** * Returns Total Amount. * The non-canonical total amount for the line. @@ -579,6 +616,7 @@ public function __toString(): string 'subtotalAmount' => $this->subtotalAmount, 'discountAmount' => $this->discountAmount, 'taxAmount' => $this->taxAmount, + 'taxIncluded' => $this->taxIncluded, 'totalAmount' => $this->totalAmount, 'tieredUnitPrice' => $this->tieredUnitPrice, 'periodRangeStart' => $this->periodRangeStart, @@ -658,6 +696,9 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false) if (isset($this->taxAmount)) { $json['tax_amount'] = $this->taxAmount; } + if (isset($this->taxIncluded)) { + $json['tax_included'] = $this->taxIncluded; + } if (isset($this->totalAmount)) { $json['total_amount'] = $this->totalAmount; } diff --git a/src/Models/EventKey.php b/src/Models/EventKey.php index ed019f6c..53e4a134 100644 --- a/src/Models/EventKey.php +++ b/src/Models/EventKey.php @@ -82,6 +82,8 @@ class EventKey public const INVOICE_ISSUED = 'invoice_issued'; + public const INVOICE_PENDING = 'invoice_pending'; + public const PREPAID_SUBSCRIPTION_BALANCE_CHANGED = 'prepaid_subscription_balance_changed'; public const SUBSCRIPTION_GROUP_SIGNUP_SUCCESS = 'subscription_group_signup_success'; @@ -211,6 +213,7 @@ class EventKey self::TRIAL_END_NOTICE, self::DUNNING_STEP_REACHED, self::INVOICE_ISSUED, + self::INVOICE_PENDING, self::PREPAID_SUBSCRIPTION_BALANCE_CHANGED, self::SUBSCRIPTION_GROUP_SIGNUP_SUCCESS, self::SUBSCRIPTION_GROUP_SIGNUP_FAILURE, diff --git a/src/Models/InvoiceLineItem.php b/src/Models/InvoiceLineItem.php index 5c65d677..d424de10 100644 --- a/src/Models/InvoiceLineItem.php +++ b/src/Models/InvoiceLineItem.php @@ -56,6 +56,11 @@ class InvoiceLineItem implements \JsonSerializable */ private $taxAmount; + /** + * @var bool|null + */ + private $taxIncluded; + /** * @var string|null */ @@ -335,6 +340,38 @@ public function setTaxAmount(?string $taxAmount): void $this->taxAmount = $taxAmount; } + /** + * Returns Tax Included. + * 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`. + */ + public function getTaxIncluded(): ?bool + { + return $this->taxIncluded; + } + + /** + * Sets Tax Included. + * 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`. + * + * @maps tax_included + */ + public function setTaxIncluded(?bool $taxIncluded): void + { + $this->taxIncluded = $taxIncluded; + } + /** * Returns Total Amount. * The non-canonical total amount for the line. @@ -768,6 +805,7 @@ public function __toString(): string 'subtotalAmount' => $this->subtotalAmount, 'discountAmount' => $this->discountAmount, 'taxAmount' => $this->taxAmount, + 'taxIncluded' => $this->taxIncluded, 'totalAmount' => $this->totalAmount, 'tieredUnitPrice' => $this->tieredUnitPrice, 'periodRangeStart' => $this->periodRangeStart, @@ -852,6 +890,9 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false) if (isset($this->taxAmount)) { $json['tax_amount'] = $this->taxAmount; } + if (isset($this->taxIncluded)) { + $json['tax_included'] = $this->taxIncluded; + } if (isset($this->totalAmount)) { $json['total_amount'] = $this->totalAmount; } diff --git a/src/Models/PaymentProfileAttributes.php b/src/Models/PaymentProfileAttributes.php index 74c31410..fc6c8870 100644 --- a/src/Models/PaymentProfileAttributes.php +++ b/src/Models/PaymentProfileAttributes.php @@ -145,8 +145,9 @@ class PaymentProfileAttributes implements \JsonSerializable /** * Returns Chargify Token. - * (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) + * (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) */ public function getChargifyToken(): ?string { @@ -155,8 +156,9 @@ public function getChargifyToken(): ?string /** * Sets Chargify Token. - * (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) + * (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) * * @maps chargify_token */ diff --git a/src/Models/WebhookSubscription.php b/src/Models/WebhookSubscription.php index 6c9665eb..4cf1f1c8 100644 --- a/src/Models/WebhookSubscription.php +++ b/src/Models/WebhookSubscription.php @@ -32,6 +32,8 @@ class WebhookSubscription public const INVOICE_ISSUED = 'invoice_issued'; + public const INVOICE_PENDING = 'invoice_pending'; + public const METERED_USAGE = 'metered_usage'; public const PAYMENT_FAILURE = 'payment_failure'; @@ -96,6 +98,7 @@ class WebhookSubscription self::EXPIRING_CARD, self::EXPIRATION_DATE_CHANGE, self::INVOICE_ISSUED, + self::INVOICE_PENDING, self::METERED_USAGE, self::PAYMENT_FAILURE, self::PAYMENT_SUCCESS, From 6c08292d4e7a9bca954337e524cd7f7943365e99 Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 10 Jun 2026 08:56:22 -0500 Subject: [PATCH 2/5] Update assertions --- tests/Controllers/CustomersControllerTestAssertions.php | 9 +++++++++ tests/TestFactory/TestSiteFactory.php | 1 + 2 files changed, 10 insertions(+) diff --git a/tests/Controllers/CustomersControllerTestAssertions.php b/tests/Controllers/CustomersControllerTestAssertions.php index 5c55cfb4..a569ae84 100644 --- a/tests/Controllers/CustomersControllerTestAssertions.php +++ b/tests/Controllers/CustomersControllerTestAssertions.php @@ -38,7 +38,16 @@ public function assertExpectedCustomerCreated( unset($expectedCustomerJson['vat_validated_at']); unset($customerJson['vat_validated_at']); + // Remove maxioid because it's auto-generated by the API + unset($expectedCustomerJson['maxioid']); + unset($customerJson['maxioid']); + $this->testCase::assertEquals($expectedCustomerJson, $customerJson); + + // Assert maxioid separately — server-generated, unique per customer + $maxioid = $customer->jsonSerialize()['maxioid'] ?? null; + $this->testCase::assertNotNull($maxioid); + $this->testCase::assertMatchesRegularExpression('/^cus_[a-z0-9-]+$/', $maxioid); } public function assertExpectedCustomerWasReturned(Customer $expectedCustomer, Customer $customer): void diff --git a/tests/TestFactory/TestSiteFactory.php b/tests/TestFactory/TestSiteFactory.php index d931c296..8c419978 100644 --- a/tests/TestFactory/TestSiteFactory.php +++ b/tests/TestFactory/TestSiteFactory.php @@ -38,6 +38,7 @@ public function createSiteWithDefaultValues(): Site ->netTerms($this->createDefaultNetTerms()) ->additionalProperty("brighton_v1_enabled", false) ->additionalProperty("auto_renewals_enabled", false) + ->additionalProperty("portal_enabled", false) ->scheduleSubscriptionCancellationEnabled(false) ->test(TestSiteData::TEST) ->build(); From 2dd8e4d4654f0a40588d12fca4909860d738e9f9 Mon Sep 17 00:00:00 2001 From: lucassus Date: Thu, 11 Jun 2026 13:22:03 +0000 Subject: [PATCH 3/5] Automated commit message --- doc/controllers/advance-invoice.md | 4 +- doc/controllers/api-exports.md | 18 +- doc/controllers/billing-portal.md | 16 +- doc/controllers/component-price-points.md | 18 +- doc/controllers/components.md | 24 +- doc/controllers/coupons.md | 45 ++-- doc/controllers/custom-fields.md | 6 +- doc/controllers/customers.md | 12 +- .../events-based-billing-segments.md | 12 +- doc/controllers/events.md | 8 +- doc/controllers/insights.md | 6 +- doc/controllers/offers.md | 10 +- doc/controllers/payment-profiles.md | 12 +- doc/controllers/product-families.md | 4 +- doc/controllers/product-price-points.md | 6 +- doc/controllers/products.md | 6 +- doc/controllers/proforma-invoices.md | 24 +- doc/controllers/reason-codes.md | 14 +- doc/controllers/referral-codes.md | 2 +- doc/controllers/sales-commissions.md | 6 +- doc/models/chjs-tokenization-failure.md | 27 +++ doc/models/chjs-tokenization-success.md | 28 +++ .../containers/event-event-specific-data.md | 30 ++- ...ayment-profile.md => payment-profile-2.md} | 2 +- .../create-or-update-endpoint-request.md | 2 +- doc/models/create-or-update-endpoint.md | 2 +- doc/models/create-subscription-request.md | 1 - doc/models/create-subscription.md | 3 +- doc/models/credit-note-line-item.md | 1 + doc/models/customer.md | 1 + doc/models/event-key.md | 2 + doc/models/event-response.md | 2 +- doc/models/event.md | 4 +- doc/models/invoice-line-item.md | 1 + doc/models/payment-profile-params.md | 27 +++ doc/models/payment-profile.md | 27 +++ doc/models/site.md | 3 + doc/models/webhook-subscription.md | 2 + src/Controllers/APIExportsController.php | 24 +- src/Controllers/AdvanceInvoiceController.php | 8 +- src/Controllers/BillingPortalController.php | 23 +- .../ComponentPricePointsController.php | 25 +- src/Controllers/ComponentsController.php | 38 ++-- src/Controllers/CouponsController.php | 69 +++--- src/Controllers/CustomFieldsController.php | 6 +- src/Controllers/CustomersController.php | 16 +- .../EventsBasedBillingSegmentsController.php | 21 +- src/Controllers/EventsController.php | 10 +- src/Controllers/InsightsController.php | 8 +- src/Controllers/OffersController.php | 12 +- src/Controllers/PaymentProfilesController.php | 18 +- src/Controllers/ProductFamiliesController.php | 4 +- .../ProductPricePointsController.php | 8 +- src/Controllers/ProductsController.php | 6 +- .../ProformaInvoicesController.php | 46 ++-- src/Controllers/ReasonCodesController.php | 18 +- src/Controllers/ReferralCodesController.php | 4 +- .../SalesCommissionsController.php | 6 +- .../ChjsTokenizationFailureBuilder.php | 74 ++++++ .../ChjsTokenizationSuccessBuilder.php | 83 +++++++ .../Builders/CreditNoteLineItemBuilder.php | 20 ++ src/Models/Builders/CustomerBuilder.php | 20 ++ src/Models/Builders/EventBuilder.php | 4 +- .../Builders/InvoiceLineItemBuilder.php | 20 ++ src/Models/Builders/PaymentProfileBuilder.php | 113 +++++++++ .../Builders/PaymentProfileParamsBuilder.php | 93 ++++++++ src/Models/Builders/SiteBuilder.php | 33 +++ src/Models/ChjsTokenizationFailure.php | 140 ++++++++++++ src/Models/ChjsTokenizationSuccess.php | 149 ++++++++++++ src/Models/CreateSubscription.php | 6 +- src/Models/CreditNoteLineItem.php | 86 +++++-- src/Models/Customer.php | 41 ++++ src/Models/Event.php | 14 +- src/Models/EventKey.php | 6 + src/Models/InvoiceLineItem.php | 96 ++++++-- src/Models/PaymentProfile.php | 214 ++++++++++++++++++ src/Models/PaymentProfileParams.php | 161 +++++++++++++ src/Models/Site.php | 89 ++++++++ src/Models/WebhookSubscription.php | 6 + 79 files changed, 1876 insertions(+), 380 deletions(-) create mode 100644 doc/models/chjs-tokenization-failure.md create mode 100644 doc/models/chjs-tokenization-success.md rename doc/models/containers/{payment-profile.md => payment-profile-2.md} (98%) create mode 100644 doc/models/payment-profile-params.md create mode 100644 doc/models/payment-profile.md create mode 100644 src/Models/Builders/ChjsTokenizationFailureBuilder.php create mode 100644 src/Models/Builders/ChjsTokenizationSuccessBuilder.php create mode 100644 src/Models/Builders/PaymentProfileBuilder.php create mode 100644 src/Models/Builders/PaymentProfileParamsBuilder.php create mode 100644 src/Models/ChjsTokenizationFailure.php create mode 100644 src/Models/ChjsTokenizationSuccess.php create mode 100644 src/Models/PaymentProfile.php create mode 100644 src/Models/PaymentProfileParams.php diff --git a/doc/controllers/advance-invoice.md b/doc/controllers/advance-invoice.md index 63f07b25..4450e625 100644 --- a/doc/controllers/advance-invoice.md +++ b/doc/controllers/advance-invoice.md @@ -17,7 +17,7 @@ $advanceInvoiceController = $client->getAdvanceInvoiceController(); # 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. @@ -78,7 +78,7 @@ try { # 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. ```php function readAdvanceInvoice(int $subscriptionId): Invoice diff --git a/doc/controllers/api-exports.md b/doc/controllers/api-exports.md index 867dbfc0..6e226e8e 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -23,7 +23,7 @@ $aPIExportsController = $client->getAPIExportsController(); # 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`. @@ -78,7 +78,7 @@ try { # 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`. @@ -133,7 +133,7 @@ try { # 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`. @@ -188,7 +188,7 @@ try { # 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. @@ -232,7 +232,7 @@ try { # Export Invoices -This API creates an invoices export and returns a batchjob object. +Creates an invoices export and returns a batch job object. ```php function exportInvoices(): BatchJobResponse @@ -274,7 +274,7 @@ try { # Export Subscriptions -This API creates a subscriptions export and returns a batchjob object. +Creates a subscriptions export and returns a batch job object. ```php function exportSubscriptions(): BatchJobResponse @@ -315,7 +315,7 @@ try { # Read Proforma Invoices Export -This API returns a batchjob object for proforma invoices export. +Returns a batch job object for a proforma invoices export. ```php function readProformaInvoicesExport(string $batchId): BatchJobResponse @@ -362,7 +362,7 @@ try { # Read Invoices Export -This API returns a batchjob object for invoices export. +Returns a batch job object for an invoices export. ```php function readInvoicesExport(string $batchId): BatchJobResponse @@ -409,7 +409,7 @@ try { # Read Subscriptions Export -This API returns a batchjob object for subscriptions export. +Returns a batch job object for a subscriptions export. ```php function readSubscriptionsExport(string $batchId): BatchJobResponse diff --git a/doc/controllers/billing-portal.md b/doc/controllers/billing-portal.md index 78645c49..c93a1dad 100644 --- a/doc/controllers/billing-portal.md +++ b/doc/controllers/billing-portal.md @@ -18,11 +18,13 @@ $billingPortalController = $client->getBillingPortalController(); # 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. @@ -82,7 +84,7 @@ try { # 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 @@ -155,15 +157,13 @@ try { # Resend Billing Portal Invitation -You can resend 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. +Resends a customer's Billing Portal invitation. -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 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 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 @@ -228,7 +228,7 @@ try { # 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. diff --git a/doc/controllers/component-price-points.md b/doc/controllers/component-price-points.md index 4a129898..b43339c5 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -194,7 +194,7 @@ try { # 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. @@ -299,7 +299,7 @@ try { # 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. ```php function bulkCreateComponentPricePoints( @@ -593,7 +593,7 @@ try { # 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. @@ -693,7 +693,7 @@ try { # 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. ```php function readComponentPricePoint( @@ -745,7 +745,7 @@ try { # 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. ```php function archiveComponentPricePoint($componentId, $pricePointId): ComponentPricePointResponse @@ -834,7 +834,7 @@ try { # Unarchive Component Price Point -Use this endpoint to unarchive a component price point. +Unarchives a component price point. ```php function unarchiveComponentPricePoint(int $componentId, int $pricePointId): ComponentPricePointResponse @@ -915,7 +915,7 @@ try { # 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. @@ -1007,7 +1007,7 @@ try { # 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. @@ -1095,7 +1095,7 @@ try { # 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. ```php function listAllComponentPricePoints(array $options): ListComponentsPricePointsResponse diff --git a/doc/controllers/components.md b/doc/controllers/components.md index 4d0b57bf..c5c3af59 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -26,7 +26,7 @@ $componentsController = $client->getComponentsController(); # 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 Ads clicks or monthly cell phone minutes). This is most commonly associated with usage-based billing and many other pricing schemes. @@ -156,9 +156,9 @@ try { # 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 @@ -298,7 +298,7 @@ try { # 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). @@ -410,7 +410,7 @@ try { # 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. @@ -568,7 +568,7 @@ try { # 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. @@ -687,7 +687,7 @@ try { # 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. ```php function findComponent(string $handle): ComponentResponse @@ -838,7 +838,7 @@ try { # 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:`. @@ -937,7 +937,7 @@ try { # 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. ```php function archiveComponent(int $productFamilyId, string $componentId): Component @@ -1018,7 +1018,7 @@ try { # List Components -This request will return a list of components for a site. +Lists components for a site. ```php function listComponents(array $options): array @@ -1179,7 +1179,7 @@ try { # 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:`. @@ -1270,7 +1270,7 @@ try { # 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. ```php function listComponentsForProductFamily(array $options): array diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index 790b23a5..f708983c 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -28,21 +28,16 @@ $couponsController = $client->getCouponsController(); # 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. + ```php function createCoupon(int $productFamilyId, ?CouponRequest $body = null): CouponResponse ``` @@ -126,7 +121,7 @@ try { # 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. ```php function listCouponsForProductFamily(array $options): array @@ -286,7 +281,7 @@ try { # 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. @@ -339,7 +334,7 @@ try { # 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. @@ -424,9 +419,7 @@ try { # 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 }` @@ -545,7 +538,7 @@ try { # 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. @@ -623,7 +616,7 @@ try { # List Coupons -You can retrieve a list of coupons. +Lists coupons for a site. ```php function listCoupons(array $options): array @@ -738,7 +731,7 @@ try { # 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. ```php function readCouponUsage(int $productFamilyId, int $couponId): array @@ -819,7 +812,7 @@ try { # 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: @@ -918,7 +911,7 @@ try { # 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. @@ -989,6 +982,8 @@ try { # 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. @@ -1095,7 +1090,7 @@ try { # List Coupon Subcodes -This request allows you to request the subcodes that are attached to a coupon. +Lists the subcodes attached to a coupon. ```php function listCouponSubcodes(array $options): CouponSubcodes @@ -1171,7 +1166,7 @@ try { # 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. @@ -1236,6 +1231,8 @@ try { # 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: diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md index 16b23983..dc5aa867 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -238,7 +238,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. @@ -488,7 +488,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. ```php function updateMetadata(string $resourceType, int $resourceId, ?UpdateMetadataRequest $body = null): array @@ -597,7 +597,7 @@ try { # 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. ```php function listMetadataForResourceType(array $options): PaginatedMetadata diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index e2d8cefe..c32fd59c 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -21,7 +21,7 @@ $customersController = $client->getCustomersController(); # 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. @@ -146,7 +146,7 @@ try { # 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 @@ -375,7 +375,7 @@ try { # Update Customer -This method allows to update the Customer. +Updates the customer. ```php function updateCustomer(int $id, ?UpdateCustomerRequest $body = null): CustomerResponse @@ -468,7 +468,7 @@ try { # Delete Customer -This method allows you to delete the Customer. +Deletes the customer. ```php function deleteCustomer(int $id): void @@ -507,7 +507,7 @@ try { # 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. ```php function readCustomerByReference(string $reference): CustomerResponse @@ -548,7 +548,7 @@ try { # List Customer Subscriptions -This method lists all subscriptions that belong to a customer. +Lists all subscriptions that belong to a customer. ```php function listCustomerSubscriptions(int $customerId): array diff --git a/doc/controllers/events-based-billing-segments.md b/doc/controllers/events-based-billing-segments.md index 2d2af477..8c15788f 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -20,7 +20,7 @@ $eventsBasedBillingSegmentsController = $client->getEventsBasedBillingSegmentsCo # 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. @@ -112,7 +112,7 @@ try { # 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. @@ -178,7 +178,7 @@ try { # 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. @@ -246,7 +246,7 @@ try { # 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. @@ -304,7 +304,7 @@ try { # 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. @@ -369,7 +369,7 @@ try { # 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. diff --git a/doc/controllers/events.md b/doc/controllers/events.md index 3cea1c12..d1436a88 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -17,11 +17,13 @@ $eventsController = $client->getEventsController(); # 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 @@ -206,7 +208,7 @@ try { # List Subscription Events -The following request will return a list of events for a subscription. +Lists events for a subscription. ## Event Key @@ -315,7 +317,7 @@ try { # 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. ```php function readEventsCount(array $options): CountResponse diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md index a37dad9e..1ef9dd34 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -18,7 +18,7 @@ $insightsController = $client->getInsightsController(); # 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 @@ -80,7 +80,7 @@ try { **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. ```php function readMrr(?\DateTime $atTime = null, ?int $subscriptionId = null): MRRResponse @@ -142,7 +142,7 @@ try { **This endpoint is deprecated.** -This endpoint returns your site's MRR movements. +Lists your site's MRR movements. ## Understanding MRR movements diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md index ab0e1c00..fe5be367 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -19,7 +19,7 @@ $offersController = $client->getOffersController(); # Create Offer -Create an offer within your Advanced Billing site by sending a POST request. +Creates an offer within your Advanced Billing site. ## Documentation @@ -144,7 +144,7 @@ try { # List Offers -This endpoint will list offers for a site. +Lists offers for a site. ```php function listOffers(array $options): ListOffersResponse @@ -254,7 +254,7 @@ try { # 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`. ```php function readOffer(int $offerId): OfferResponse @@ -295,7 +295,7 @@ try { # 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. ```php function archiveOffer(int $offerId): void @@ -334,7 +334,7 @@ try { # 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. ```php function unarchiveOffer(int $offerId): void diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index ef712955..3d1f3acc 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -47,7 +47,7 @@ See the following articles to learn more about subscriptions and payments: + [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) - + [CMaxio.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 - 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) @@ -142,7 +142,7 @@ try { # 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. ```php function listPaymentProfiles(array $options): array @@ -251,7 +251,7 @@ try { # 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. @@ -365,6 +365,8 @@ try { # 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. @@ -586,7 +588,7 @@ try { # 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) ```php function verifyBankAccount( @@ -725,7 +727,7 @@ try { # 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. diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index ded047d9..bddeba3f 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -189,7 +189,7 @@ try { # 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). @@ -260,7 +260,7 @@ try { # List Product Families -Retrieve a list of Product Families for a site. +Returns a list of Product Families for a site. ```php function listProductFamilies(array $options): array diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md index 2567d846..bb4e9897 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -296,7 +296,7 @@ try { # 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. ```php function readProductPricePoint( @@ -457,7 +457,7 @@ try { # Unarchive Product Price Point -Use this endpoint to unarchive an archived product price point. +Unarchives an archived product price point. ```php function unarchiveProductPricePoint(int $productId, int $pricePointId): ProductPricePointResponse @@ -940,7 +940,7 @@ try { # 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. ```php function listAllProductPricePoints(array $options): ListProductPricePointsResponse diff --git a/doc/controllers/products.md b/doc/controllers/products.md index f1cb971c..7016143c 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -22,7 +22,7 @@ $productsController = $client->getProductsController(); 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) @@ -333,7 +333,7 @@ try { # 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. @@ -536,7 +536,7 @@ try { # List Products -This method allows to retrieve a list of Products belonging to a Site. +Lists products belonging to a site. ```php function listProducts(array $options): array diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md index 25fa0787..33ea20dc 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -24,7 +24,7 @@ $proformaInvoicesController = $client->getProformaInvoicesController(); # 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. @@ -77,7 +77,7 @@ try { # 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. @@ -140,7 +140,7 @@ try { # Read Proforma Invoice -Use this endpoint to read the details of an existing proforma invoice. +Returns the details of an existing proforma invoice. ## Restrictions @@ -191,7 +191,7 @@ try { # 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. @@ -246,7 +246,7 @@ try { # 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`. ```php function listProformaInvoices(array $options): ListProformaInvoicesResponse @@ -310,7 +310,7 @@ try { # 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 @@ -390,7 +390,7 @@ try { # 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 @@ -449,7 +449,7 @@ try { # 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. @@ -505,9 +505,7 @@ try { # 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. @@ -574,9 +572,7 @@ try { # 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. diff --git a/doc/controllers/reason-codes.md b/doc/controllers/reason-codes.md index 17eb4387..c3625c5f 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -19,9 +19,11 @@ $reasonCodesController = $client->getReasonCodesController(); # 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,7 +35,7 @@ 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. ```php function createReasonCode(?CreateReasonCodeRequest $body = null): ReasonCodeResponse @@ -89,7 +91,7 @@ try { # 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. ```php function listReasonCodes(array $options): array @@ -182,7 +184,7 @@ try { # 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. ```php function readReasonCode(int $reasonCodeId): ReasonCodeResponse @@ -229,7 +231,7 @@ try { # 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. ```php function updateReasonCode(int $reasonCodeId, ?UpdateReasonCodeRequest $body = null): ReasonCodeResponse @@ -280,7 +282,7 @@ try { # 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. ```php function deleteReasonCode(int $reasonCodeId): OkResponse diff --git a/doc/controllers/referral-codes.md b/doc/controllers/referral-codes.md index 98afe92d..c3e60915 100644 --- a/doc/controllers/referral-codes.md +++ b/doc/controllers/referral-codes.md @@ -11,7 +11,7 @@ $referralCodesController = $client->getReferralCodesController(); # 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 diff --git a/doc/controllers/sales-commissions.md b/doc/controllers/sales-commissions.md index 9066a8b2..e06c228e 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -17,7 +17,7 @@ $salesCommissionsController = $client->getSalesCommissionsController(); # List Sales Commission Settings -Endpoint returns subscriptions with associated sales reps +Lists subscriptions with associated sales reps. ## Modified Authentication Process @@ -109,7 +109,7 @@ try { # List Sales Reps -Endpoint returns sales rep list with details +Returns a sales rep list with details. ## Modified Authentication Process @@ -250,7 +250,7 @@ try { # Read Sales Rep -Endpoint returns sales rep and attached subscriptions details. +Returns a sales rep and attached subscription details. ## Modified Authentication Process diff --git a/doc/models/chjs-tokenization-failure.md b/doc/models/chjs-tokenization-failure.md new file mode 100644 index 00000000..c4b4a632 --- /dev/null +++ b/doc/models/chjs-tokenization-failure.md @@ -0,0 +1,27 @@ + +# Chjs Tokenization Failure + +## Structure + +`ChjsTokenizationFailure` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `errors` | `string` | Required | - | getErrors(): string | setErrors(string errors): void | +| `paymentProfileParams` | [`?PaymentProfileParams`](../../doc/models/payment-profile-params.md) | Optional | PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. | getPaymentProfileParams(): ?PaymentProfileParams | setPaymentProfileParams(?PaymentProfileParams paymentProfileParams): void | + +## 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 00000000..33bb712a --- /dev/null +++ b/doc/models/chjs-tokenization-success.md @@ -0,0 +1,28 @@ + +# Chjs Tokenization Success + +## Structure + +`ChjsTokenizationSuccess` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `paymentProfile` | [`PaymentProfile`](../../doc/models/payment-profile.md) | Required | - | getPaymentProfile(): PaymentProfile | setPaymentProfile(PaymentProfile paymentProfile): void | +| `gatewayCustomerId` | `?int` | Optional | - | getGatewayCustomerId(): ?int | setGatewayCustomerId(?int gatewayCustomerId): void | + +## 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/event-event-specific-data.md b/doc/models/containers/event-event-specific-data.md index 5db09c5e..bdd270b3 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,6 +27,8 @@ | [`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 @@ -347,3 +349,29 @@ $value = CustomFieldValueChangeBuilder::init( ->build(); ``` +## ChjsTokenizationSuccess + +### Initialization Code + +#### Example + +```php +$value = ChjsTokenizationSuccessBuilder::init( + PaymentProfileBuilder::init( + 44 + )->build() +)->build(); +``` + +## ChjsTokenizationFailure + +### Initialization Code + +#### Example + +```php +$value = ChjsTokenizationFailureBuilder::init( + 'errors2' +)->build(); +``` + diff --git a/doc/models/containers/payment-profile.md b/doc/models/containers/payment-profile-2.md similarity index 98% rename from doc/models/containers/payment-profile.md rename to doc/models/containers/payment-profile-2.md index d89f4af4..c02774b8 100644 --- a/doc/models/containers/payment-profile.md +++ b/doc/models/containers/payment-profile-2.md @@ -1,5 +1,5 @@ -# Payment-Profile +# Payment-Profile 2 ## Data Type diff --git a/doc/models/create-or-update-endpoint-request.md b/doc/models/create-or-update-endpoint-request.md index 29957150..aa38e5c0 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 0c245f09..6482033a 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": [ - "subscription_prepayment_account_balance_changed" + "refund_success" ] } ``` diff --git a/doc/models/create-subscription-request.md b/doc/models/create-subscription-request.md index d97191a6..151185a6 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 6d536d9c..ec651145 100644 --- a/doc/models/create-subscription.md +++ b/doc/models/create-subscription.md @@ -58,7 +58,7 @@ | `achAgreement` | [`?ACHAgreement`](../../doc/models/ach-agreement.md) | Optional | (Optional) If passed, the proof of the authorized ACH agreement terms will be persisted. | getAchAgreement(): ?ACHAgreement | setAchAgreement(?ACHAgreement achAgreement): void | | `dunningCommunicationDelayEnabled` | `?bool` | Optional | Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute.

**Default**: `false` | getDunningCommunicationDelayEnabled(): ?bool | setDunningCommunicationDelayEnabled(?bool dunningCommunicationDelayEnabled): void | | `dunningCommunicationDelayTimeZone` | `?string` | Optional | Time zone for the Dunning Communication Delay feature. | getDunningCommunicationDelayTimeZone(): ?string | setDunningCommunicationDelayTimeZone(?string dunningCommunicationDelayTimeZone): void | -| `skipBillingManifestTaxes` | `?bool` | 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` | getSkipBillingManifestTaxes(): ?bool | setSkipBillingManifestTaxes(?bool skipBillingManifestTaxes): void | +| `skipBillingManifestTaxes` | `?bool` | 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. | getSkipBillingManifestTaxes(): ?bool | setSkipBillingManifestTaxes(?bool skipBillingManifestTaxes): void | ## 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/credit-note-line-item.md b/doc/models/credit-note-line-item.md index 5a3f0d75..765db63f 100644 --- a/doc/models/credit-note-line-item.md +++ b/doc/models/credit-note-line-item.md @@ -28,6 +28,7 @@ | `pricePointId` | `?int` | Optional | The price point ID of the component being credited. Will be `nil` for non-component credits. | getPricePointId(): ?int | setPricePointId(?int pricePointId): void | | `billingScheduleItemId` | `?int` | Optional | - | getBillingScheduleItemId(): ?int | setBillingScheduleItemId(?int billingScheduleItemId): void | | `customItem` | `?bool` | Optional | - | getCustomItem(): ?bool | setCustomItem(?bool customItem): void | +| `prepaidAllocationExpiresAt` | `?DateTime` | 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"`. | getPrepaidAllocationExpiresAt(): ?\DateTime | setPrepaidAllocationExpiresAt(?\DateTime prepaidAllocationExpiresAt): void | ## Example (as JSON) diff --git a/doc/models/customer.md b/doc/models/customer.md index 90b56a74..6ffdda97 100644 --- a/doc/models/customer.md +++ b/doc/models/customer.md @@ -39,6 +39,7 @@ | `salesforceId` | `?string` | Optional | The Salesforce ID for the customer | getSalesforceId(): ?string | setSalesforceId(?string salesforceId): void | | `taxExemptReason` | `?string` | Optional | The Tax Exemption Reason Code for the customer | getTaxExemptReason(): ?string | setTaxExemptReason(?string taxExemptReason): void | | `defaultAutoRenewalProfileId` | `?int` | Optional | The default auto-renewal profile ID for the customer | getDefaultAutoRenewalProfileId(): ?int | setDefaultAutoRenewalProfileId(?int defaultAutoRenewalProfileId): void | +| `maxioid` | `?string` | Optional | The Maxio-generated unique identifier for the customer. | getMaxioid(): ?string | setMaxioid(?string maxioid): void | ## Example (as JSON) diff --git a/doc/models/event-key.md b/doc/models/event-key.md index e95df013..a400739e 100644 --- a/doc/models/event-key.md +++ b/doc/models/event-key.md @@ -86,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 c6f44adb..b2a65f7e 100644 --- a/doc/models/event-response.md +++ b/doc/models/event-response.md @@ -17,7 +17,7 @@ { "event": { "id": 242, - "key": "prepaid_subscription_balance_changed", + "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 31189185..c03fda16 100644 --- a/doc/models/event.md +++ b/doc/models/event.md @@ -15,14 +15,14 @@ | `subscriptionId` | `?int` | Required | - | getSubscriptionId(): ?int | setSubscriptionId(?int subscriptionId): void | | `customerId` | `?int` | Required | - | getCustomerId(): ?int | setCustomerId(?int customerId): void | | `createdAt` | `DateTime` | Required | - | getCreatedAt(): \DateTime | setCreatedAt(\DateTime createdAt): void | -| `eventSpecificData` | [SubscriptionProductChange](../../doc/models/subscription-product-change.md)\|[SubscriptionStateChange](../../doc/models/subscription-state-change.md)\|[PaymentRelatedEvents](../../doc/models/payment-related-events.md)\|[RefundSuccess](../../doc/models/refund-success.md)\|[ComponentAllocationChange](../../doc/models/component-allocation-change.md)\|[MeteredUsage](../../doc/models/metered-usage.md)\|[PrepaidUsage](../../doc/models/prepaid-usage.md)\|[DunningStepReached](../../doc/models/dunning-step-reached.md)\|[InvoiceIssued](../../doc/models/invoice-issued.md)\|[PendingCancellationChange](../../doc/models/pending-cancellation-change.md)\|[PrepaidSubscriptionBalanceChanged](../../doc/models/prepaid-subscription-balance-changed.md)\|Proforma[InvoiceIssued](../../doc/models/invoice-issued.md)\|[SubscriptionGroupSignupEventData](../../doc/models/subscription-group-signup-event-data.md)\|[CreditAccountBalanceChanged](../../doc/models/credit-account-balance-changed.md)\|[PrepaymentAccountBalanceChanged](../../doc/models/prepayment-account-balance-changed.md)\|[PaymentCollectionMethodChanged](../../doc/models/payment-collection-method-changed.md)\|[ItemPricePointChanged](../../doc/models/item-price-point-changed.md)\|[CustomFieldValueChange](../../doc/models/custom-field-value-change.md)\|null | Required | This is a container for one-of cases. | getEventSpecificData(): | setEventSpecificData( eventSpecificData): void | +| `eventSpecificData` | [SubscriptionProductChange](../../doc/models/subscription-product-change.md)\|[SubscriptionStateChange](../../doc/models/subscription-state-change.md)\|[PaymentRelatedEvents](../../doc/models/payment-related-events.md)\|[RefundSuccess](../../doc/models/refund-success.md)\|[ComponentAllocationChange](../../doc/models/component-allocation-change.md)\|[MeteredUsage](../../doc/models/metered-usage.md)\|[PrepaidUsage](../../doc/models/prepaid-usage.md)\|[DunningStepReached](../../doc/models/dunning-step-reached.md)\|[InvoiceIssued](../../doc/models/invoice-issued.md)\|[PendingCancellationChange](../../doc/models/pending-cancellation-change.md)\|[PrepaidSubscriptionBalanceChanged](../../doc/models/prepaid-subscription-balance-changed.md)\|Proforma[InvoiceIssued](../../doc/models/invoice-issued.md)\|[SubscriptionGroupSignupEventData](../../doc/models/subscription-group-signup-event-data.md)\|[CreditAccountBalanceChanged](../../doc/models/credit-account-balance-changed.md)\|[PrepaymentAccountBalanceChanged](../../doc/models/prepayment-account-balance-changed.md)\|[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)\|null | Required | This is a container for one-of cases. | getEventSpecificData(): | setEventSpecificData( eventSpecificData): void | ## Example (as JSON) ```json { "id": 40, - "key": "expiring_card", + "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 02cf5d01..0ebb7fe5 100644 --- a/doc/models/invoice-line-item.md +++ b/doc/models/invoice-line-item.md @@ -33,6 +33,7 @@ | `productPricePointId` | `?int` | Optional | The price point ID of the line item's product | getProductPricePointId(): ?int | setProductPricePointId(?int productPricePointId): void | | `customItem` | `?bool` | Optional | - | getCustomItem(): ?bool | setCustomItem(?bool customItem): void | | `kind` | `?string` | Optional | - | getKind(): ?string | setKind(?string kind): void | +| `prepaidAllocationExpiresAt` | `?DateTime` | 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"`. | getPrepaidAllocationExpiresAt(): ?\DateTime | setPrepaidAllocationExpiresAt(?\DateTime prepaidAllocationExpiresAt): void | ## Example (as JSON) diff --git a/doc/models/payment-profile-params.md b/doc/models/payment-profile-params.md new file mode 100644 index 00000000..a35a0079 --- /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 | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `firstName` | `?string` | Optional | - | getFirstName(): ?string | setFirstName(?string firstName): void | +| `lastName` | `?string` | Optional | - | getLastName(): ?string | setLastName(?string lastName): void | +| `cardType` | `?string` | Optional | - | getCardType(): ?string | setCardType(?string cardType): void | + +## Example (as JSON) + +```json +{ + "first_name": "first_name2", + "last_name": "last_name0", + "card_type": "card_type8" +} +``` + diff --git a/doc/models/payment-profile.md b/doc/models/payment-profile.md new file mode 100644 index 00000000..1b37a76f --- /dev/null +++ b/doc/models/payment-profile.md @@ -0,0 +1,27 @@ + +# Payment Profile + +## Structure + +`PaymentProfile` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `id` | `int` | Required | - | getId(): int | setId(int id): void | +| `vaultToken` | `?string` | Optional | - | getVaultToken(): ?string | setVaultToken(?string vaultToken): void | +| `gatewayHandle` | `?string` | Optional | - | getGatewayHandle(): ?string | setGatewayHandle(?string gatewayHandle): void | +| `customerVaultToken` | `?string` | Optional | - | getCustomerVaultToken(): ?string | setCustomerVaultToken(?string customerVaultToken): void | + +## Example (as JSON) + +```json +{ + "id": 56, + "vault_token": "vault_token0", + "gateway_handle": "gateway_handle0", + "customer_vault_token": "customer_vault_token6" +} +``` + diff --git a/doc/models/site.md b/doc/models/site.md index b1a9a4f1..8f3f1c68 100644 --- a/doc/models/site.md +++ b/doc/models/site.md @@ -25,6 +25,9 @@ | `organizationAddress` | [`?OrganizationAddress`](../../doc/models/organization-address.md) | Optional | - | getOrganizationAddress(): ?OrganizationAddress | setOrganizationAddress(?OrganizationAddress organizationAddress): void | | `taxConfiguration` | [`?TaxConfiguration`](../../doc/models/tax-configuration.md) | Optional | - | getTaxConfiguration(): ?TaxConfiguration | setTaxConfiguration(?TaxConfiguration taxConfiguration): void | | `netTerms` | [`?NetTerms`](../../doc/models/net-terms.md) | Optional | - | getNetTerms(): ?NetTerms | setNetTerms(?NetTerms netTerms): void | +| `multiFrequencyEnabled` | `?bool` | Optional | Whether the site has the multi-frequency billing feature enabled. Only present when relationship invoicing is active. | getMultiFrequencyEnabled(): ?bool | setMultiFrequencyEnabled(?bool multiFrequencyEnabled): void | +| `autoRenewalsEnabled` | `?bool` | Optional | Whether the auto-renewals feature is enabled for this site. | getAutoRenewalsEnabled(): ?bool | setAutoRenewalsEnabled(?bool autoRenewalsEnabled): void | +| `portalEnabled` | `?bool` | Optional | Whether the Billing Portal is enabled for this site. | getPortalEnabled(): ?bool | setPortalEnabled(?bool portalEnabled): void | | `test` | `?bool` | Optional | - | getTest(): ?bool | setTest(?bool test): void | ## Example (as JSON) diff --git a/doc/models/webhook-subscription.md b/doc/models/webhook-subscription.md index 172e795d..85990e59 100644 --- a/doc/models/webhook-subscription.md +++ b/doc/models/webhook-subscription.md @@ -11,6 +11,8 @@ | --- | | `BILLING_DATE_CHANGE` | | `COMPONENT_ALLOCATION_CHANGE` | +| `CHJS_TOKENIZATION_FAILURE` | +| `CHJS_TOKENIZATION_SUCCESS` | | `CUSTOMER_CREATE` | | `CUSTOMER_UPDATE` | | `DUNNING_STEP_REACHED` | diff --git a/src/Controllers/APIExportsController.php b/src/Controllers/APIExportsController.php index b8c0f07b..c2a6ee5a 100644 --- a/src/Controllers/APIExportsController.php +++ b/src/Controllers/APIExportsController.php @@ -24,8 +24,8 @@ class APIExportsController extends 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? * per_page=10000&page=1`. @@ -57,8 +57,8 @@ public function listExportedProformaInvoices(array $options): array } /** - * 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`. * @@ -86,8 +86,8 @@ public function listExportedInvoices(array $options): array } /** - * 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`. @@ -116,7 +116,7 @@ public function listExportedSubscriptions(array $options): array } /** - * 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. * @@ -144,7 +144,7 @@ public function exportProformaInvoices(): BatchJobResponse } /** - * 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 * @@ -169,7 +169,7 @@ public function exportInvoices(): BatchJobResponse } /** - * 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 * @@ -194,7 +194,7 @@ public function exportSubscriptions(): BatchJobResponse } /** - * This API returns a batchjob object for proforma invoices export. + * Returns a batch job object for a proforma invoices export. * * @param string $batchId Id of a Batch Job. * @@ -216,7 +216,7 @@ public function readProformaInvoicesExport(string $batchId): BatchJobResponse } /** - * This API returns a batchjob object for invoices export. + * Returns a batch job object for an invoices export. * * @param string $batchId Id of a Batch Job. * @@ -238,7 +238,7 @@ public function readInvoicesExport(string $batchId): BatchJobResponse } /** - * This API returns a batchjob object for subscriptions export. + * Returns a batch job object for a subscriptions export. * * @param string $batchId Id of a Batch Job. * diff --git a/src/Controllers/AdvanceInvoiceController.php b/src/Controllers/AdvanceInvoiceController.php index 061fc830..645d8163 100644 --- a/src/Controllers/AdvanceInvoiceController.php +++ b/src/Controllers/AdvanceInvoiceController.php @@ -26,8 +26,8 @@ class AdvanceInvoiceController extends BaseController /** * 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. + * 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 @@ -72,8 +72,8 @@ public function issueAdvanceInvoice(int $subscriptionId, ?IssueAdvanceInvoiceReq } /** - * 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 int $subscriptionId The Chargify id of the subscription. * diff --git a/src/Controllers/BillingPortalController.php b/src/Controllers/BillingPortalController.php index e0c24633..59f656ed 100644 --- a/src/Controllers/BillingPortalController.php +++ b/src/Controllers/BillingPortalController.php @@ -26,13 +26,16 @@ class BillingPortalController extends 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 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. @@ -86,8 +89,7 @@ public function enableBillingPortalForCustomer(int $customerId, ?int $autoInvite } /** - * 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 * @@ -134,19 +136,16 @@ public function readBillingPortalLink(int $customerId): PortalManagementLink } /** - * 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 when the Billing Portal is already disabled for a Customer, - * you will receive a `422` error 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 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 * @@ -180,7 +179,7 @@ public function resendBillingPortalInvitation(int $customerId): ResentInvitation } /** - * 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. diff --git a/src/Controllers/ComponentPricePointsController.php b/src/Controllers/ComponentPricePointsController.php index ca489cc1..258fb4b3 100644 --- a/src/Controllers/ComponentPricePointsController.php +++ b/src/Controllers/ComponentPricePointsController.php @@ -108,7 +108,7 @@ public function createComponentPricePoint( } /** - * 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. * @@ -147,7 +147,7 @@ public function listComponentPricePoints(array $options): ComponentPricePointsRe } /** - * Use this endpoint to create multiple component price points in one request. + * Creates multiple component price points in one request. * * @param string $componentId The Advanced Billing id of the component for which you want to * fetch price points. @@ -240,8 +240,7 @@ public function cloneComponentPricePoint( } /** - * 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. * @@ -293,8 +292,8 @@ public function updateComponentPricePoint( } /** - * 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 int|string $componentId The id or handle of the component. When using the handle, it * must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle: @@ -330,8 +329,8 @@ public function readComponentPricePoint( } /** - * 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 int|string $componentId The id or handle of the component. When using the handle, it * must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle: @@ -370,7 +369,7 @@ public function archiveComponentPricePoint($componentId, $pricePointId): Compone } /** - * Use this endpoint to unarchive a component price point. + * Unarchives a component price point. * * @param int $componentId The Advanced Billing id of the component to which the price point * belongs @@ -398,8 +397,7 @@ public function unarchiveComponentPricePoint(int $componentId, int $pricePointId } /** - * 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 @@ -443,8 +441,7 @@ public function createCurrencyPrices( } /** - * 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. * @@ -484,7 +481,7 @@ public function updateCurrencyPrices( } /** - * 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 array $options Array with all options for search * diff --git a/src/Controllers/ComponentsController.php b/src/Controllers/ComponentsController.php index 47baef6d..a1abf83f 100644 --- a/src/Controllers/ComponentsController.php +++ b/src/Controllers/ComponentsController.php @@ -31,8 +31,8 @@ class ComponentsController extends 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 Ads clicks or monthly cell phone minutes). This is most commonly @@ -83,11 +83,10 @@ public function createMeteredComponent( } /** - * 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 * 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 socks in a box-a-month club). This is most commonly @@ -142,8 +141,8 @@ public function createQuantityBasedComponent( } /** - * 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). @@ -189,8 +188,8 @@ public function createOnOffComponent( } /** - * 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 @@ -238,8 +237,8 @@ public function createPrepaidUsageComponent( } /** - * 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 @@ -291,8 +290,8 @@ public function createEventBasedComponent( } /** - * 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 The handle of the component to find * @@ -344,7 +343,7 @@ public function readComponent(int $productFamilyId, string $componentId): Compon } /** - * 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:`. @@ -390,8 +389,7 @@ public function updateProductFamilyComponent( } /** - * 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 int $productFamilyId The Advanced Billing id of the product family to which the * component belongs @@ -428,7 +426,7 @@ public function archiveComponent(int $productFamilyId, string $componentId): Com } /** - * This request will return a list of components for a site. + * Lists components for a site. * * @param array $options Array with all options for search * @@ -461,7 +459,7 @@ public function listComponents(array $options): array } /** - * 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:`. @@ -497,7 +495,7 @@ public function updateComponent(string $componentId, ?UpdateComponentRequest $bo } /** - * This request will return a list of components for a particular product family. + * Lists components for a particular product family. * * @param array $options Array with all options for search * diff --git a/src/Controllers/CouponsController.php b/src/Controllers/CouponsController.php index d7ce9a51..8903d8c8 100644 --- a/src/Controllers/CouponsController.php +++ b/src/Controllers/CouponsController.php @@ -31,27 +31,22 @@ class CouponsController extends 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-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. + * * @param int $productFamilyId The Advanced Billing id of the product family to which the coupon * belongs * @param CouponRequest|null $body @@ -87,7 +82,7 @@ public function createCoupon(int $productFamilyId, ?CouponRequest $body = null): } /** - * List coupons for a specific Product Family in a Site. + * Lists coupons for a specific product family in a site. * * @param array $options Array with all options for search * @@ -116,8 +111,8 @@ public function listCouponsForProductFamily(array $options): array } /** - * 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 @@ -153,8 +148,8 @@ public function findCoupon( } /** - * 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 @@ -195,9 +190,7 @@ public function readCoupon(int $productFamilyId, int $couponId, ?bool $currencyP } /** - * ## 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: @@ -240,7 +233,8 @@ public function updateCoupon(int $productFamilyId, int $couponId, ?CouponRequest } /** - * 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. @@ -271,7 +265,7 @@ public function archiveCoupon(int $productFamilyId, int $couponId): CouponRespon } /** - * You can retrieve a list of coupons. + * Lists coupons for a site. * * @param array $options Array with all options for search * @@ -296,7 +290,7 @@ public function listCoupons(array $options): array } /** - * 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 int $productFamilyId The Advanced Billing id of the product family to which the coupon * belongs. @@ -324,9 +318,9 @@ public function readCouponUsage(int $productFamilyId, int $couponId): array } /** - * 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 @@ -386,9 +380,9 @@ public function validateCoupon(string $code, ?int $productFamilyId = null): Coup } /** - * 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. @@ -426,6 +420,8 @@ public function createOrUpdateCouponCurrencyPrices( } /** + * 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 @@ -498,7 +494,7 @@ public function createCouponSubcodes(int $couponId, ?CouponSubcodes $body = null } /** - * This request allows you to request the subcodes that are attached to a coupon. + * Lists the subcodes attached to a coupon. * * @param array $options Array with all options for search * @@ -522,8 +518,7 @@ public function listCouponSubcodes(array $options): CouponSubcodes } /** - * 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 @@ -559,6 +554,8 @@ public function updateCouponSubcodes(int $couponId, ?CouponSubcodes $body = null } /** + * 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 diff --git a/src/Controllers/CustomFieldsController.php b/src/Controllers/CustomFieldsController.php index a29ca8e3..a3b40c30 100644 --- a/src/Controllers/CustomFieldsController.php +++ b/src/Controllers/CustomFieldsController.php @@ -149,7 +149,7 @@ public function listMetafields(array $options): ListMetafieldsResponse * * - 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. * @@ -302,7 +302,7 @@ public function listMetadata(array $options): PaginatedMetadata * 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. + * for the Subscription resource and another 100 for the Customer resource. * * @param string $resourceType The resource type to which the metafields belong. * @param int $resourceId The Advanced Billing id of the customer or the subscription for which @@ -377,7 +377,7 @@ public function deleteMetadata( } /** - * Lists metadata for a specified array of subscriptions or customers. + * Lists metadata for a specified array of subscriptions or customers. * * @param array $options Array with all options for search * diff --git a/src/Controllers/CustomersController.php b/src/Controllers/CustomersController.php index 02c59f28..5609bf71 100644 --- a/src/Controllers/CustomersController.php +++ b/src/Controllers/CustomersController.php @@ -28,9 +28,8 @@ class CustomersController extends 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 @@ -92,7 +91,7 @@ public function createCustomer(?CreateCustomerRequest $body = null): CustomerRes } /** - * 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 * @@ -164,7 +163,7 @@ public function readCustomer(int $id): CustomerResponse } /** - * This method allows to update the Customer. + * Updates the customer. * * @param int $id The Advanced Billing id of the customer * @param UpdateCustomerRequest|null $body @@ -198,7 +197,7 @@ public function updateCustomer(int $id, ?UpdateCustomerRequest $body = null): Cu } /** - * This method allows you to delete the Customer. + * Deletes the customer. * * @param int $id The Advanced Billing id of the customer * @@ -216,8 +215,7 @@ public function deleteCustomer(int $id): void } /** - * 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 Customer reference * @@ -237,7 +235,7 @@ public function readCustomerByReference(string $reference): CustomerResponse } /** - * This method lists all subscriptions that belong to a customer. + * Lists all subscriptions that belong to a customer. * * @param int $customerId The Chargify id of the customer * diff --git a/src/Controllers/EventsBasedBillingSegmentsController.php b/src/Controllers/EventsBasedBillingSegmentsController.php index e6f4d5a2..c1ae6910 100644 --- a/src/Controllers/EventsBasedBillingSegmentsController.php +++ b/src/Controllers/EventsBasedBillingSegmentsController.php @@ -30,9 +30,9 @@ class EventsBasedBillingSegmentsController extends 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. @@ -77,8 +77,7 @@ public function createSegment( } /** - * 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. @@ -122,8 +121,8 @@ public function listSegmentsForPricePoint(array $options): ListSegmentsResponse } /** - * 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. @@ -171,7 +170,7 @@ public function updateSegment( } /** - * 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. @@ -210,8 +209,7 @@ public function deleteSegment(string $componentId, string $pricePointId, float $ } /** - * 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 @@ -260,8 +258,7 @@ public function bulkCreateSegments( } /** - * 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 diff --git a/src/Controllers/EventsController.php b/src/Controllers/EventsController.php index 15371d7b..654b02cd 100644 --- a/src/Controllers/EventsController.php +++ b/src/Controllers/EventsController.php @@ -23,6 +23,8 @@ class EventsController extends BaseController { /** + * Lists events for a site. + * * ## Events Intro * * Advanced Billing Events include various activity that happens around a Site. This information is @@ -30,8 +32,8 @@ class EventsController extends BaseController * 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). + * 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 * @@ -135,7 +137,7 @@ public function listEvents(array $options): array } /** - * 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 @@ -179,7 +181,7 @@ public function listSubscriptionEvents(array $options): array } /** - * 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 array $options Array with all options for search * diff --git a/src/Controllers/InsightsController.php b/src/Controllers/InsightsController.php index bbec6aef..abc096fa 100644 --- a/src/Controllers/InsightsController.php +++ b/src/Controllers/InsightsController.php @@ -26,8 +26,8 @@ class InsightsController extends 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 * @@ -53,7 +53,7 @@ public function readSiteStats(): SiteSummary } /** - * This endpoint returns your site's current MRR, including plan and usage breakouts. + * Returns your site's current MRR, including plan and usage breakouts. * * @deprecated * @@ -84,7 +84,7 @@ public function readMrr(?\DateTime $atTime = null, ?int $subscriptionId = null): } /** - * This endpoint returns your site's MRR movements. + * Lists your site's MRR movements. * * ## Understanding MRR movements * diff --git a/src/Controllers/OffersController.php b/src/Controllers/OffersController.php index 5fbdd64c..fd1d60c9 100644 --- a/src/Controllers/OffersController.php +++ b/src/Controllers/OffersController.php @@ -26,7 +26,7 @@ class OffersController extends BaseController { /** - * Create an offer within your Advanced Billing site by sending a POST request. + * Creates an offer within your Advanced Billing site. * * ## Documentation * @@ -70,7 +70,7 @@ public function createOffer(?CreateOfferRequest $body = null): OfferResponse } /** - * This endpoint will list offers for a site. + * Lists offers for a site. * * @param array $options Array with all options for search * @@ -102,8 +102,8 @@ public function listOffers(array $options): ListOffersResponse } /** - * 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 int $offerId The Chargify id of the offer * @@ -123,7 +123,7 @@ public function readOffer(int $offerId): OfferResponse } /** - * 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. * * @param int $offerId The Chargify id of the offer * @@ -141,7 +141,7 @@ public function archiveOffer(int $offerId): void } /** - * Unarchive a previously archived offer. Please provide an `offer_id` in order to un-archive the + * Unarchives a previously archived offer. Please provide an `offer_id` in order to unarchive the * correct item. * * @param int $offerId The Chargify id of the offer diff --git a/src/Controllers/PaymentProfilesController.php b/src/Controllers/PaymentProfilesController.php index ac2dfd34..134ca556 100644 --- a/src/Controllers/PaymentProfilesController.php +++ b/src/Controllers/PaymentProfilesController.php @@ -67,7 +67,7 @@ class PaymentProfilesController extends BaseController * 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) - * + [CMaxio.js with Stripe BECS Direct Debit - minimal example](https://developers.chargify. + * + [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. @@ -122,8 +122,8 @@ public function createPaymentProfile(?CreatePaymentProfileRequest $body = null): } /** - * 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 array $options Array with all options for search * @@ -147,7 +147,7 @@ public function listPaymentProfiles(array $options): array } /** - * 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. * @@ -205,6 +205,8 @@ public function readPaymentProfile(int $paymentProfileId): PaymentProfileRespons } /** + * Updates a payment profile. + * * ## Partial Card Updates * * In the event that you are using the Authorize.net, Stripe, Cybersource, Forte or Braintree Blue @@ -350,8 +352,8 @@ public function deleteSubscriptionsPaymentProfile(int $subscriptionId, int $paym } /** - * 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 int $bankAccountId Identifier of the bank account in the system. * @param BankAccountVerificationRequest|null $body @@ -418,8 +420,8 @@ public function deleteSubscriptionGroupPaymentProfile(string $uid, int $paymentP } /** - * 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. diff --git a/src/Controllers/ProductFamiliesController.php b/src/Controllers/ProductFamiliesController.php index 0c54c0ae..12ae75f7 100644 --- a/src/Controllers/ProductFamiliesController.php +++ b/src/Controllers/ProductFamiliesController.php @@ -84,7 +84,7 @@ public function listProductsForProductFamily(array $options): array /** * Creates a Product Family within your Advanced Billing site. Create a Product Family to act as a - * container for your products, components and coupons. + * 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). @@ -115,7 +115,7 @@ public function createProductFamily(?CreateProductFamilyRequest $body = null): P } /** - * Retrieve a list of Product Families for a site. + * Returns a list of Product Families for a site. * * @param array $options Array with all options for search * diff --git a/src/Controllers/ProductPricePointsController.php b/src/Controllers/ProductPricePointsController.php index c094e4d0..a8c6913e 100644 --- a/src/Controllers/ProductPricePointsController.php +++ b/src/Controllers/ProductPricePointsController.php @@ -146,8 +146,8 @@ public function updateProductPricePoint( } /** - * 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 int|string $productId 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- @@ -227,7 +227,7 @@ public function archiveProductPricePoint($productId, $pricePointId): ProductPric } /** - * Use this endpoint to unarchive an archived product price point. + * Unarchives an archived product price point. * * @param int $productId The Advanced Billing id of the product to which the price point belongs * @param int $pricePointId The Advanced Billing id of the product price point @@ -406,7 +406,7 @@ public function updateProductCurrencyPrices( } /** - * This method allows retrieval of a list of Products Price Points belonging to a Site. + * Lists Product Price Points belonging to a site. * * @param array $options Array with all options for search * diff --git a/src/Controllers/ProductsController.php b/src/Controllers/ProductsController.php index 2a5844e2..bee66a90 100644 --- a/src/Controllers/ProductsController.php +++ b/src/Controllers/ProductsController.php @@ -29,7 +29,7 @@ class ProductsController extends 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) @@ -135,7 +135,7 @@ public function updateProduct(int $productId, ?CreateOrUpdateProductRequest $bod } /** - * Archives the product. All current subscribers will be unffected; their subscription/purchase will + * 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 @@ -187,7 +187,7 @@ public function readProductByHandle(string $apiHandle): ProductResponse } /** - * This method allows to retrieve a list of Products belonging to a Site. + * Lists products belonging to a site. * * @param array $options Array with all options for search * diff --git a/src/Controllers/ProformaInvoicesController.php b/src/Controllers/ProformaInvoicesController.php index 7f4365cc..9972bf67 100644 --- a/src/Controllers/ProformaInvoicesController.php +++ b/src/Controllers/ProformaInvoicesController.php @@ -33,10 +33,10 @@ class ProformaInvoicesController extends 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. @@ -72,7 +72,7 @@ public function createConsolidatedProformaInvoice(string $uid): void } /** - * 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 @@ -110,7 +110,7 @@ public function listSubscriptionGroupProformaInvoices(array $options): ListProfo } /** - * Use this endpoint to read the details of an existing proforma invoice. + * Returns the details of an existing proforma invoice. * * ## Restrictions * @@ -136,8 +136,8 @@ public function readProformaInvoice(string $proformaInvoiceUid): ProformaInvoice } /** - * 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. @@ -174,7 +174,7 @@ public function createProformaInvoice(int $subscriptionId): ProformaInvoice } /** - * By default, proforma invoices returned on the index will only include totals, not detailed + * 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`. * @@ -219,7 +219,7 @@ public function listProformaInvoices(array $options): ListProformaInvoicesRespon } /** - * 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 @@ -265,7 +265,7 @@ public function deliverProformaInvoice( } /** - * This endpoint will void a proforma invoice that has the status "draft". + * Voids a proforma invoice that has the status "draft". * * ## Restrictions * @@ -313,8 +313,8 @@ public function voidProformaInvoice(string $proformaInvoiceUid, ?VoidInvoiceRequ } /** - * 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 + * 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. * @@ -357,11 +357,10 @@ public function previewProformaInvoice(int $subscriptionId): ProformaInvoice } /** - * 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 @@ -404,12 +403,11 @@ public function createSignupProformaInvoice(?CreateSubscriptionRequest $body = n } /** - * 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 diff --git a/src/Controllers/ReasonCodesController.php b/src/Controllers/ReasonCodesController.php index 359f6adb..23fb6e2e 100644 --- a/src/Controllers/ReasonCodesController.php +++ b/src/Controllers/ReasonCodesController.php @@ -26,9 +26,11 @@ class ReasonCodesController extends 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 cancelling the + * 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 @@ -43,7 +45,7 @@ class ReasonCodesController extends BaseController * * ## 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|null $body * @@ -71,8 +73,7 @@ public function createReasonCode(?CreateReasonCodeRequest $body = null): ReasonC } /** - * 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 array $options Array with all options for search * @@ -103,8 +104,7 @@ public function listReasonCodes(array $options): array } /** - * 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 int $reasonCodeId The Advanced Billing id of the reason code * @@ -126,7 +126,7 @@ public function readReasonCode(int $reasonCodeId): ReasonCodeResponse } /** - * 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 int $reasonCodeId The Advanced Billing id of the reason code * @param UpdateReasonCodeRequest|null $body @@ -160,8 +160,8 @@ public function updateReasonCode(int $reasonCodeId, ?UpdateReasonCodeRequest $bo } /** - * 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 int $reasonCodeId The Advanced Billing id of the reason code * diff --git a/src/Controllers/ReferralCodesController.php b/src/Controllers/ReferralCodesController.php index 445a62b1..3e6b79aa 100644 --- a/src/Controllers/ReferralCodesController.php +++ b/src/Controllers/ReferralCodesController.php @@ -20,8 +20,8 @@ class ReferralCodesController extends 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 * diff --git a/src/Controllers/SalesCommissionsController.php b/src/Controllers/SalesCommissionsController.php index f6a139be..9e7c0c27 100644 --- a/src/Controllers/SalesCommissionsController.php +++ b/src/Controllers/SalesCommissionsController.php @@ -22,7 +22,7 @@ class SalesCommissionsController extends BaseController { /** - * Endpoint returns subscriptions with associated sales reps + * Lists subscriptions with associated sales reps. * * ## Modified Authentication Process * @@ -66,7 +66,7 @@ public function listSalesCommissionSettings(array $options): array } /** - * Endpoint returns sales rep list with details + * Returns a sales rep list with details. * * ## Modified Authentication Process * @@ -107,7 +107,7 @@ public function listSalesReps(array $options): array } /** - * Endpoint returns sales rep and attached subscriptions details. + * Returns a sales rep and attached subscription details. * * ## Modified Authentication Process * diff --git a/src/Models/Builders/ChjsTokenizationFailureBuilder.php b/src/Models/Builders/ChjsTokenizationFailureBuilder.php new file mode 100644 index 00000000..08dfb831 --- /dev/null +++ b/src/Models/Builders/ChjsTokenizationFailureBuilder.php @@ -0,0 +1,74 @@ +instance = $instance; + } + + /** + * Initializes a new Chjs Tokenization Failure Builder object. + * + * @param string $errors + */ + public static function init(string $errors): self + { + return new self(new ChjsTokenizationFailure($errors)); + } + + /** + * Sets payment profile params field. + * + * @param PaymentProfileParams|null $value + */ + public function paymentProfileParams(?PaymentProfileParams $value): self + { + $this->instance->setPaymentProfileParams($value); + return $this; + } + + /** + * Add an additional property to this model. + * + * @param string $name Name of property. + * @param mixed $value Value of property. + */ + public function additionalProperty(string $name, $value): self + { + $this->instance->addAdditionalProperty($name, $value); + return $this; + } + + /** + * Initializes a new Chjs Tokenization Failure object. + */ + public function build(): ChjsTokenizationFailure + { + return CoreHelper::clone($this->instance); + } +} diff --git a/src/Models/Builders/ChjsTokenizationSuccessBuilder.php b/src/Models/Builders/ChjsTokenizationSuccessBuilder.php new file mode 100644 index 00000000..691e598c --- /dev/null +++ b/src/Models/Builders/ChjsTokenizationSuccessBuilder.php @@ -0,0 +1,83 @@ +instance = $instance; + } + + /** + * Initializes a new Chjs Tokenization Success Builder object. + * + * @param PaymentProfile $paymentProfile + */ + public static function init(PaymentProfile $paymentProfile): self + { + return new self(new ChjsTokenizationSuccess($paymentProfile)); + } + + /** + * Sets gateway customer id field. + * + * @param int|null $value + */ + public function gatewayCustomerId(?int $value): self + { + $this->instance->setGatewayCustomerId($value); + return $this; + } + + /** + * Unsets gateway customer id field. + */ + public function unsetGatewayCustomerId(): self + { + $this->instance->unsetGatewayCustomerId(); + return $this; + } + + /** + * Add an additional property to this model. + * + * @param string $name Name of property. + * @param mixed $value Value of property. + */ + public function additionalProperty(string $name, $value): self + { + $this->instance->addAdditionalProperty($name, $value); + return $this; + } + + /** + * Initializes a new Chjs Tokenization Success object. + */ + public function build(): ChjsTokenizationSuccess + { + return CoreHelper::clone($this->instance); + } +} diff --git a/src/Models/Builders/CreditNoteLineItemBuilder.php b/src/Models/Builders/CreditNoteLineItemBuilder.php index 57437d43..75c25c41 100644 --- a/src/Models/Builders/CreditNoteLineItemBuilder.php +++ b/src/Models/Builders/CreditNoteLineItemBuilder.php @@ -274,6 +274,26 @@ public function customItem(?bool $value): self return $this; } + /** + * Sets prepaid allocation expires at field. + * + * @param \DateTime|null $value + */ + public function prepaidAllocationExpiresAt(?\DateTime $value): self + { + $this->instance->setPrepaidAllocationExpiresAt($value); + return $this; + } + + /** + * Unsets prepaid allocation expires at field. + */ + public function unsetPrepaidAllocationExpiresAt(): self + { + $this->instance->unsetPrepaidAllocationExpiresAt(); + return $this; + } + /** * Add an additional property to this model. * diff --git a/src/Models/Builders/CustomerBuilder.php b/src/Models/Builders/CustomerBuilder.php index 550b6e42..e1a946d2 100644 --- a/src/Models/Builders/CustomerBuilder.php +++ b/src/Models/Builders/CustomerBuilder.php @@ -575,6 +575,26 @@ public function unsetDefaultAutoRenewalProfileId(): self return $this; } + /** + * Sets maxioid field. + * + * @param string|null $value + */ + public function maxioid(?string $value): self + { + $this->instance->setMaxioid($value); + return $this; + } + + /** + * Unsets maxioid field. + */ + public function unsetMaxioid(): self + { + $this->instance->unsetMaxioid(); + return $this; + } + /** * Add an additional property to this model. * diff --git a/src/Models/Builders/EventBuilder.php b/src/Models/Builders/EventBuilder.php index 7b7d3c5b..2ac6d3ec 100644 --- a/src/Models/Builders/EventBuilder.php +++ b/src/Models/Builders/EventBuilder.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Models\Builders; +use AdvancedBillingLib\Models\ChjsTokenizationFailure; +use AdvancedBillingLib\Models\ChjsTokenizationSuccess; use AdvancedBillingLib\Models\ComponentAllocationChange; use AdvancedBillingLib\Models\CreditAccountBalanceChanged; use AdvancedBillingLib\Models\CustomFieldValueChange; @@ -86,7 +88,7 @@ public function customerId(?int $value): self /** * Sets event specific data field. * - * @param SubscriptionProductChange|SubscriptionStateChange|PaymentRelatedEvents|RefundSuccess|ComponentAllocationChange|MeteredUsage|PrepaidUsage|DunningStepReached|InvoiceIssued|PendingCancellationChange|PrepaidSubscriptionBalanceChanged|ProformaInvoiceIssued|SubscriptionGroupSignupEventData|CreditAccountBalanceChanged|PrepaymentAccountBalanceChanged|PaymentCollectionMethodChanged|ItemPricePointChanged|CustomFieldValueChange|null $value + * @param SubscriptionProductChange|SubscriptionStateChange|PaymentRelatedEvents|RefundSuccess|ComponentAllocationChange|MeteredUsage|PrepaidUsage|DunningStepReached|InvoiceIssued|PendingCancellationChange|PrepaidSubscriptionBalanceChanged|ProformaInvoiceIssued|SubscriptionGroupSignupEventData|CreditAccountBalanceChanged|PrepaymentAccountBalanceChanged|PaymentCollectionMethodChanged|ItemPricePointChanged|CustomFieldValueChange|ChjsTokenizationSuccess|ChjsTokenizationFailure|null $value */ public function eventSpecificData($value): self { diff --git a/src/Models/Builders/InvoiceLineItemBuilder.php b/src/Models/Builders/InvoiceLineItemBuilder.php index f3d4c439..a98a35b5 100644 --- a/src/Models/Builders/InvoiceLineItemBuilder.php +++ b/src/Models/Builders/InvoiceLineItemBuilder.php @@ -366,6 +366,26 @@ public function kind(?string $value): self return $this; } + /** + * Sets prepaid allocation expires at field. + * + * @param \DateTime|null $value + */ + public function prepaidAllocationExpiresAt(?\DateTime $value): self + { + $this->instance->setPrepaidAllocationExpiresAt($value); + return $this; + } + + /** + * Unsets prepaid allocation expires at field. + */ + public function unsetPrepaidAllocationExpiresAt(): self + { + $this->instance->unsetPrepaidAllocationExpiresAt(); + return $this; + } + /** * Add an additional property to this model. * diff --git a/src/Models/Builders/PaymentProfileBuilder.php b/src/Models/Builders/PaymentProfileBuilder.php new file mode 100644 index 00000000..4b96741a --- /dev/null +++ b/src/Models/Builders/PaymentProfileBuilder.php @@ -0,0 +1,113 @@ +instance = $instance; + } + + /** + * Initializes a new Payment Profile Builder object. + * + * @param int $id + */ + public static function init(int $id): self + { + return new self(new PaymentProfile($id)); + } + + /** + * Sets vault token field. + * + * @param string|null $value + */ + public function vaultToken(?string $value): self + { + $this->instance->setVaultToken($value); + return $this; + } + + /** + * Sets gateway handle field. + * + * @param string|null $value + */ + public function gatewayHandle(?string $value): self + { + $this->instance->setGatewayHandle($value); + return $this; + } + + /** + * Unsets gateway handle field. + */ + public function unsetGatewayHandle(): self + { + $this->instance->unsetGatewayHandle(); + return $this; + } + + /** + * Sets customer vault token field. + * + * @param string|null $value + */ + public function customerVaultToken(?string $value): self + { + $this->instance->setCustomerVaultToken($value); + return $this; + } + + /** + * Unsets customer vault token field. + */ + public function unsetCustomerVaultToken(): self + { + $this->instance->unsetCustomerVaultToken(); + return $this; + } + + /** + * Add an additional property to this model. + * + * @param string $name Name of property. + * @param mixed $value Value of property. + */ + public function additionalProperty(string $name, $value): self + { + $this->instance->addAdditionalProperty($name, $value); + return $this; + } + + /** + * Initializes a new Payment Profile object. + */ + public function build(): PaymentProfile + { + return CoreHelper::clone($this->instance); + } +} diff --git a/src/Models/Builders/PaymentProfileParamsBuilder.php b/src/Models/Builders/PaymentProfileParamsBuilder.php new file mode 100644 index 00000000..94877fba --- /dev/null +++ b/src/Models/Builders/PaymentProfileParamsBuilder.php @@ -0,0 +1,93 @@ +instance = $instance; + } + + /** + * Initializes a new Payment Profile Params Builder object. + */ + public static function init(): self + { + return new self(new PaymentProfileParams()); + } + + /** + * Sets first name field. + * + * @param string|null $value + */ + public function firstName(?string $value): self + { + $this->instance->setFirstName($value); + return $this; + } + + /** + * Sets last name field. + * + * @param string|null $value + */ + public function lastName(?string $value): self + { + $this->instance->setLastName($value); + return $this; + } + + /** + * Sets card type field. + * + * @param string|null $value + */ + public function cardType(?string $value): self + { + $this->instance->setCardType($value); + return $this; + } + + /** + * Add an additional property to this model. + * + * @param string $name Name of property. + * @param mixed $value Value of property. + */ + public function additionalProperty(string $name, $value): self + { + $this->instance->addAdditionalProperty($name, $value); + return $this; + } + + /** + * Initializes a new Payment Profile Params object. + */ + public function build(): PaymentProfileParams + { + return CoreHelper::clone($this->instance); + } +} diff --git a/src/Models/Builders/SiteBuilder.php b/src/Models/Builders/SiteBuilder.php index 4ac99569..fbea97df 100644 --- a/src/Models/Builders/SiteBuilder.php +++ b/src/Models/Builders/SiteBuilder.php @@ -218,6 +218,39 @@ public function netTerms(?NetTerms $value): self return $this; } + /** + * Sets multi frequency enabled field. + * + * @param bool|null $value + */ + public function multiFrequencyEnabled(?bool $value): self + { + $this->instance->setMultiFrequencyEnabled($value); + return $this; + } + + /** + * Sets auto renewals enabled field. + * + * @param bool|null $value + */ + public function autoRenewalsEnabled(?bool $value): self + { + $this->instance->setAutoRenewalsEnabled($value); + return $this; + } + + /** + * Sets portal enabled field. + * + * @param bool|null $value + */ + public function portalEnabled(?bool $value): self + { + $this->instance->setPortalEnabled($value); + return $this; + } + /** * Sets test field. * diff --git a/src/Models/ChjsTokenizationFailure.php b/src/Models/ChjsTokenizationFailure.php new file mode 100644 index 00000000..2d6f1242 --- /dev/null +++ b/src/Models/ChjsTokenizationFailure.php @@ -0,0 +1,140 @@ +errors = $errors; + } + + /** + * Returns Errors. + */ + public function getErrors(): string + { + return $this->errors; + } + + /** + * Sets Errors. + * + * @required + * @maps errors + */ + public function setErrors(string $errors): void + { + $this->errors = $errors; + } + + /** + * Returns Payment Profile Params. + * PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. + */ + public function getPaymentProfileParams(): ?PaymentProfileParams + { + return $this->paymentProfileParams; + } + + /** + * Sets Payment Profile Params. + * PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. + * + * @maps payment_profile_params + */ + public function setPaymentProfileParams(?PaymentProfileParams $paymentProfileParams): void + { + $this->paymentProfileParams = $paymentProfileParams; + } + + /** + * Converts the ChjsTokenizationFailure object to a human-readable string representation. + * + * @return string The string representation of the ChjsTokenizationFailure object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ChjsTokenizationFailure', + [ + 'errors' => $this->errors, + 'paymentProfileParams' => $this->paymentProfileParams, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + + private $additionalProperties = []; + + /** + * Add an additional property to this model. + * + * @param string $name Name of property. + * @param mixed $value Value of property. + */ + public function addAdditionalProperty(string $name, $value) + { + $this->additionalProperties[$name] = $value; + } + + /** + * Find an additional property by name in this model or false if property does not exist. + * + * @param string $name Name of property. + * + * @return mixed|false Value of the property. + */ + public function findAdditionalProperty(string $name) + { + if (isset($this->additionalProperties[$name])) { + return $this->additionalProperties[$name]; + } + return false; + } + + /** + * Encode this object to JSON + * + * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields + * are set. (default: false) + * + * @return array|stdClass + */ + #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1) + public function jsonSerialize(bool $asArrayWhenEmpty = false) + { + $json = []; + $json['errors'] = $this->errors; + if (isset($this->paymentProfileParams)) { + $json['payment_profile_params'] = $this->paymentProfileParams; + } + $json = array_merge($json, $this->additionalProperties); + + return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; + } +} diff --git a/src/Models/ChjsTokenizationSuccess.php b/src/Models/ChjsTokenizationSuccess.php new file mode 100644 index 00000000..fd059809 --- /dev/null +++ b/src/Models/ChjsTokenizationSuccess.php @@ -0,0 +1,149 @@ +paymentProfile = $paymentProfile; + } + + /** + * Returns Payment Profile. + */ + public function getPaymentProfile(): PaymentProfile + { + return $this->paymentProfile; + } + + /** + * Sets Payment Profile. + * + * @required + * @maps payment_profile + */ + public function setPaymentProfile(PaymentProfile $paymentProfile): void + { + $this->paymentProfile = $paymentProfile; + } + + /** + * Returns Gateway Customer Id. + */ + public function getGatewayCustomerId(): ?int + { + if (count($this->gatewayCustomerId) == 0) { + return null; + } + return $this->gatewayCustomerId['value']; + } + + /** + * Sets Gateway Customer Id. + * + * @maps gateway_customer_id + */ + public function setGatewayCustomerId(?int $gatewayCustomerId): void + { + $this->gatewayCustomerId['value'] = $gatewayCustomerId; + } + + /** + * Unsets Gateway Customer Id. + */ + public function unsetGatewayCustomerId(): void + { + $this->gatewayCustomerId = []; + } + + /** + * Converts the ChjsTokenizationSuccess object to a human-readable string representation. + * + * @return string The string representation of the ChjsTokenizationSuccess object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ChjsTokenizationSuccess', + [ + 'paymentProfile' => $this->paymentProfile, + 'gatewayCustomerId' => $this->getGatewayCustomerId(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + + private $additionalProperties = []; + + /** + * Add an additional property to this model. + * + * @param string $name Name of property. + * @param mixed $value Value of property. + */ + public function addAdditionalProperty(string $name, $value) + { + $this->additionalProperties[$name] = $value; + } + + /** + * Find an additional property by name in this model or false if property does not exist. + * + * @param string $name Name of property. + * + * @return mixed|false Value of the property. + */ + public function findAdditionalProperty(string $name) + { + if (isset($this->additionalProperties[$name])) { + return $this->additionalProperties[$name]; + } + return false; + } + + /** + * Encode this object to JSON + * + * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields + * are set. (default: false) + * + * @return array|stdClass + */ + #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1) + public function jsonSerialize(bool $asArrayWhenEmpty = false) + { + $json = []; + $json['payment_profile'] = $this->paymentProfile; + if (!empty($this->gatewayCustomerId)) { + $json['gateway_customer_id'] = $this->gatewayCustomerId['value']; + } + $json = array_merge($json, $this->additionalProperties); + + return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; + } +} diff --git a/src/Models/CreateSubscription.php b/src/Models/CreateSubscription.php index 3db9dd7e..23e033c1 100644 --- a/src/Models/CreateSubscription.php +++ b/src/Models/CreateSubscription.php @@ -264,7 +264,7 @@ class CreateSubscription implements \JsonSerializable /** * @var bool|null */ - private $skipBillingManifestTaxes = false; + private $skipBillingManifestTaxes; /** * Returns Product Handle. @@ -1407,7 +1407,7 @@ public function unsetDunningCommunicationDelayTimeZone(): void /** * Returns Skip Billing Manifest Taxes. * Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for - * the current and next billing manifests. + * the current and next billing manifests. Defaults to `false` when not provided. */ public function getSkipBillingManifestTaxes(): ?bool { @@ -1417,7 +1417,7 @@ public function getSkipBillingManifestTaxes(): ?bool /** * Sets Skip Billing Manifest Taxes. * Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for - * the current and next billing manifests. + * the current and next billing manifests. Defaults to `false` when not provided. * * @maps skip_billing_manifest_taxes */ diff --git a/src/Models/CreditNoteLineItem.php b/src/Models/CreditNoteLineItem.php index f30e543f..4e29e2f5 100644 --- a/src/Models/CreditNoteLineItem.php +++ b/src/Models/CreditNoteLineItem.php @@ -111,6 +111,11 @@ class CreditNoteLineItem implements \JsonSerializable */ private $customItem; + /** + * @var array + */ + private $prepaidAllocationExpiresAt = []; + /** * Returns Uid. * Unique identifier for the line item. Useful when cross-referencing the line against individual @@ -598,6 +603,42 @@ public function setCustomItem(?bool $customItem): void $this->customItem = $customItem; } + /** + * Returns Prepaid Allocation Expires At. + * The date a prepaid allocation is set to expire. Only present on line items representing prepaid + * component allocations. The format is `"YYYY-MM-DD"`. + */ + public function getPrepaidAllocationExpiresAt(): ?\DateTime + { + if (count($this->prepaidAllocationExpiresAt) == 0) { + return null; + } + return $this->prepaidAllocationExpiresAt['value']; + } + + /** + * Sets Prepaid Allocation Expires At. + * The date a prepaid allocation is set to expire. Only present on line items representing prepaid + * component allocations. The format is `"YYYY-MM-DD"`. + * + * @maps prepaid_allocation_expires_at + * @factory \AdvancedBillingLib\Utils\DateTimeHelper::fromSimpleDate + */ + public function setPrepaidAllocationExpiresAt(?\DateTime $prepaidAllocationExpiresAt): void + { + $this->prepaidAllocationExpiresAt['value'] = $prepaidAllocationExpiresAt; + } + + /** + * Unsets Prepaid Allocation Expires At. + * The date a prepaid allocation is set to expire. Only present on line items representing prepaid + * component allocations. The format is `"YYYY-MM-DD"`. + */ + public function unsetPrepaidAllocationExpiresAt(): void + { + $this->prepaidAllocationExpiresAt = []; + } + /** * Converts the CreditNoteLineItem object to a human-readable string representation. * @@ -627,6 +668,7 @@ public function __toString(): string 'pricePointId' => $this->getPricePointId(), 'billingScheduleItemId' => $this->getBillingScheduleItemId(), 'customItem' => $this->customItem, + 'prepaidAllocationExpiresAt' => $this->getPrepaidAllocationExpiresAt(), 'additionalProperties' => $this->additionalProperties ] ); @@ -673,61 +715,67 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->uid)) { - $json['uid'] = $this->uid; + $json['uid'] = $this->uid; } if (isset($this->title)) { - $json['title'] = $this->title; + $json['title'] = $this->title; } if (isset($this->description)) { - $json['description'] = $this->description; + $json['description'] = $this->description; } if (isset($this->quantity)) { - $json['quantity'] = $this->quantity; + $json['quantity'] = $this->quantity; } if (isset($this->unitPrice)) { - $json['unit_price'] = $this->unitPrice; + $json['unit_price'] = $this->unitPrice; } if (isset($this->subtotalAmount)) { - $json['subtotal_amount'] = $this->subtotalAmount; + $json['subtotal_amount'] = $this->subtotalAmount; } if (isset($this->discountAmount)) { - $json['discount_amount'] = $this->discountAmount; + $json['discount_amount'] = $this->discountAmount; } if (isset($this->taxAmount)) { - $json['tax_amount'] = $this->taxAmount; + $json['tax_amount'] = $this->taxAmount; } if (isset($this->taxIncluded)) { - $json['tax_included'] = $this->taxIncluded; + $json['tax_included'] = $this->taxIncluded; } if (isset($this->totalAmount)) { - $json['total_amount'] = $this->totalAmount; + $json['total_amount'] = $this->totalAmount; } if (isset($this->tieredUnitPrice)) { - $json['tiered_unit_price'] = $this->tieredUnitPrice; + $json['tiered_unit_price'] = $this->tieredUnitPrice; } if (isset($this->periodRangeStart)) { - $json['period_range_start'] = DateTimeHelper::toSimpleDate($this->periodRangeStart); + $json['period_range_start'] = DateTimeHelper::toSimpleDate($this->periodRangeStart); } if (isset($this->periodRangeEnd)) { - $json['period_range_end'] = DateTimeHelper::toSimpleDate($this->periodRangeEnd); + $json['period_range_end'] = DateTimeHelper::toSimpleDate($this->periodRangeEnd); } if (isset($this->productId)) { - $json['product_id'] = $this->productId; + $json['product_id'] = $this->productId; } if (isset($this->productVersion)) { - $json['product_version'] = $this->productVersion; + $json['product_version'] = $this->productVersion; } if (!empty($this->componentId)) { - $json['component_id'] = $this->componentId['value']; + $json['component_id'] = $this->componentId['value']; } if (!empty($this->pricePointId)) { - $json['price_point_id'] = $this->pricePointId['value']; + $json['price_point_id'] = $this->pricePointId['value']; } if (!empty($this->billingScheduleItemId)) { - $json['billing_schedule_item_id'] = $this->billingScheduleItemId['value']; + $json['billing_schedule_item_id'] = $this->billingScheduleItemId['value']; } if (isset($this->customItem)) { - $json['custom_item'] = $this->customItem; + $json['custom_item'] = $this->customItem; + } + if (!empty($this->prepaidAllocationExpiresAt)) { + $json['prepaid_allocation_expires_at'] = + DateTimeHelper::toSimpleDate( + $this->prepaidAllocationExpiresAt['value'] + ); } $json = array_merge($json, $this->additionalProperties); diff --git a/src/Models/Customer.php b/src/Models/Customer.php index fa7f6a1d..fdf531c5 100644 --- a/src/Models/Customer.php +++ b/src/Models/Customer.php @@ -166,6 +166,11 @@ class Customer implements \JsonSerializable */ private $defaultAutoRenewalProfileId = []; + /** + * @var array + */ + private $maxioid = []; + /** * Returns First Name. * The first name of the customer @@ -1061,6 +1066,38 @@ public function unsetDefaultAutoRenewalProfileId(): void $this->defaultAutoRenewalProfileId = []; } + /** + * Returns Maxioid. + * The Maxio-generated unique identifier for the customer. + */ + public function getMaxioid(): ?string + { + if (count($this->maxioid) == 0) { + return null; + } + return $this->maxioid['value']; + } + + /** + * Sets Maxioid. + * The Maxio-generated unique identifier for the customer. + * + * @maps maxioid + */ + public function setMaxioid(?string $maxioid): void + { + $this->maxioid['value'] = $maxioid; + } + + /** + * Unsets Maxioid. + * The Maxio-generated unique identifier for the customer. + */ + public function unsetMaxioid(): void + { + $this->maxioid = []; + } + /** * Converts the Customer object to a human-readable string representation. * @@ -1101,6 +1138,7 @@ public function __toString(): string 'salesforceId' => $this->getSalesforceId(), 'taxExemptReason' => $this->getTaxExemptReason(), 'defaultAutoRenewalProfileId' => $this->getDefaultAutoRenewalProfileId(), + 'maxioid' => $this->getMaxioid(), 'additionalProperties' => $this->additionalProperties ] ); @@ -1245,6 +1283,9 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false) if (!empty($this->defaultAutoRenewalProfileId)) { $json['default_auto_renewal_profile_id'] = $this->defaultAutoRenewalProfileId['value']; } + if (!empty($this->maxioid)) { + $json['maxioid'] = $this->maxioid['value']; + } $json = array_merge($json, $this->additionalProperties); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; diff --git a/src/Models/Event.php b/src/Models/Event.php index 5095b30f..de1566ce 100644 --- a/src/Models/Event.php +++ b/src/Models/Event.php @@ -47,7 +47,7 @@ class Event implements \JsonSerializable private $createdAt; /** - * @var SubscriptionProductChange|SubscriptionStateChange|PaymentRelatedEvents|RefundSuccess|ComponentAllocationChange|MeteredUsage|PrepaidUsage|DunningStepReached|InvoiceIssued|PendingCancellationChange|PrepaidSubscriptionBalanceChanged|ProformaInvoiceIssued|SubscriptionGroupSignupEventData|CreditAccountBalanceChanged|PrepaymentAccountBalanceChanged|PaymentCollectionMethodChanged|ItemPricePointChanged|CustomFieldValueChange|null + * @var SubscriptionProductChange|SubscriptionStateChange|PaymentRelatedEvents|RefundSuccess|ComponentAllocationChange|MeteredUsage|PrepaidUsage|DunningStepReached|InvoiceIssued|PendingCancellationChange|PrepaidSubscriptionBalanceChanged|ProformaInvoiceIssued|SubscriptionGroupSignupEventData|CreditAccountBalanceChanged|PrepaymentAccountBalanceChanged|PaymentCollectionMethodChanged|ItemPricePointChanged|CustomFieldValueChange|ChjsTokenizationSuccess|ChjsTokenizationFailure|null */ private $eventSpecificData; @@ -204,6 +204,8 @@ public function setCreatedAt(\DateTime $createdAt): void * * `subscription_service_credit_account_balance_changed` - 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`, `upgrade_downgrade_success`, @@ -232,7 +234,7 @@ public function setCreatedAt(\DateTime $createdAt): void * `subscription_term_renewal_activated`, `subscription_term_renewal_removed` * they map to `null` instead. * - * @return SubscriptionProductChange|SubscriptionStateChange|PaymentRelatedEvents|RefundSuccess|ComponentAllocationChange|MeteredUsage|PrepaidUsage|DunningStepReached|InvoiceIssued|PendingCancellationChange|PrepaidSubscriptionBalanceChanged|ProformaInvoiceIssued|SubscriptionGroupSignupEventData|CreditAccountBalanceChanged|PrepaymentAccountBalanceChanged|PaymentCollectionMethodChanged|ItemPricePointChanged|CustomFieldValueChange|null + * @return SubscriptionProductChange|SubscriptionStateChange|PaymentRelatedEvents|RefundSuccess|ComponentAllocationChange|MeteredUsage|PrepaidUsage|DunningStepReached|InvoiceIssued|PendingCancellationChange|PrepaidSubscriptionBalanceChanged|ProformaInvoiceIssued|SubscriptionGroupSignupEventData|CreditAccountBalanceChanged|PrepaymentAccountBalanceChanged|PaymentCollectionMethodChanged|ItemPricePointChanged|CustomFieldValueChange|ChjsTokenizationSuccess|ChjsTokenizationFailure|null */ public function getEventSpecificData() { @@ -264,6 +266,8 @@ public function getEventSpecificData() * * `subscription_service_credit_account_balance_changed` - 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`, `upgrade_downgrade_success`, @@ -293,9 +297,9 @@ public function getEventSpecificData() * they map to `null` instead. * * @maps event_specific_data - * @mapsBy anyOf(oneOf(SubscriptionProductChange,SubscriptionStateChange,PaymentRelatedEvents,RefundSuccess,ComponentAllocationChange,MeteredUsage,PrepaidUsage,DunningStepReached,InvoiceIssued,PendingCancellationChange,PrepaidSubscriptionBalanceChanged,ProformaInvoiceIssued,SubscriptionGroupSignupEventData,CreditAccountBalanceChanged,PrepaymentAccountBalanceChanged,PaymentCollectionMethodChanged,ItemPricePointChanged,CustomFieldValueChange),null) + * @mapsBy anyOf(oneOf(SubscriptionProductChange,SubscriptionStateChange,PaymentRelatedEvents,RefundSuccess,ComponentAllocationChange,MeteredUsage,PrepaidUsage,DunningStepReached,InvoiceIssued,PendingCancellationChange,PrepaidSubscriptionBalanceChanged,ProformaInvoiceIssued,SubscriptionGroupSignupEventData,CreditAccountBalanceChanged,PrepaymentAccountBalanceChanged,PaymentCollectionMethodChanged,ItemPricePointChanged,CustomFieldValueChange,ChjsTokenizationSuccess,ChjsTokenizationFailure),null) * - * @param SubscriptionProductChange|SubscriptionStateChange|PaymentRelatedEvents|RefundSuccess|ComponentAllocationChange|MeteredUsage|PrepaidUsage|DunningStepReached|InvoiceIssued|PendingCancellationChange|PrepaidSubscriptionBalanceChanged|ProformaInvoiceIssued|SubscriptionGroupSignupEventData|CreditAccountBalanceChanged|PrepaymentAccountBalanceChanged|PaymentCollectionMethodChanged|ItemPricePointChanged|CustomFieldValueChange|null $eventSpecificData + * @param SubscriptionProductChange|SubscriptionStateChange|PaymentRelatedEvents|RefundSuccess|ComponentAllocationChange|MeteredUsage|PrepaidUsage|DunningStepReached|InvoiceIssued|PendingCancellationChange|PrepaidSubscriptionBalanceChanged|ProformaInvoiceIssued|SubscriptionGroupSignupEventData|CreditAccountBalanceChanged|PrepaymentAccountBalanceChanged|PaymentCollectionMethodChanged|ItemPricePointChanged|CustomFieldValueChange|ChjsTokenizationSuccess|ChjsTokenizationFailure|null $eventSpecificData */ public function setEventSpecificData($eventSpecificData): void { @@ -378,7 +382,7 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false) 'InvoiceIssued,PendingCancellationChange,PrepaidSubscriptionBalanceChanged,ProformaIn' . 'voiceIssued,SubscriptionGroupSignupEventData,CreditAccountBalanceChanged,PrepaymentA' . 'ccountBalanceChanged,PaymentCollectionMethodChanged,ItemPricePointChanged,CustomFiel' . - 'dValueChange),null)' + 'dValueChange,ChjsTokenizationSuccess,ChjsTokenizationFailure),null)' ); $json = array_merge($json, $this->additionalProperties); diff --git a/src/Models/EventKey.php b/src/Models/EventKey.php index 53e4a134..b7512cdb 100644 --- a/src/Models/EventKey.php +++ b/src/Models/EventKey.php @@ -171,6 +171,10 @@ class EventKey public const COMPONENT_BILLING_DATE_CHANGED = 'component_billing_date_changed'; + public const CHJS_TOKENIZATION_FAILURE = 'chjs_tokenization_failure'; + + public const CHJS_TOKENIZATION_SUCCESS = 'chjs_tokenization_success'; + public const SUBSCRIPTION_TERM_RENEWAL_SCHEDULED = 'subscription_term_renewal_scheduled'; public const SUBSCRIPTION_TERM_RENEWAL_PENDING = 'subscription_term_renewal_pending'; @@ -257,6 +261,8 @@ class EventKey self::CHARGEBACK_WON, self::PAYMENT_COLLECTION_METHOD_CHANGED, self::COMPONENT_BILLING_DATE_CHANGED, + self::CHJS_TOKENIZATION_FAILURE, + self::CHJS_TOKENIZATION_SUCCESS, self::SUBSCRIPTION_TERM_RENEWAL_SCHEDULED, self::SUBSCRIPTION_TERM_RENEWAL_PENDING, self::SUBSCRIPTION_TERM_RENEWAL_ACTIVATED, diff --git a/src/Models/InvoiceLineItem.php b/src/Models/InvoiceLineItem.php index d424de10..fa020cf0 100644 --- a/src/Models/InvoiceLineItem.php +++ b/src/Models/InvoiceLineItem.php @@ -136,6 +136,11 @@ class InvoiceLineItem implements \JsonSerializable */ private $kind; + /** + * @var array + */ + private $prepaidAllocationExpiresAt = []; + /** * Returns Uid. * Unique identifier for the line item. Useful when cross-referencing the line against individual @@ -787,6 +792,42 @@ public function setKind(?string $kind): void $this->kind = $kind; } + /** + * Returns Prepaid Allocation Expires At. + * The date a prepaid allocation is set to expire. Only present on line items representing prepaid + * component allocations. The format is `"YYYY-MM-DD"`. + */ + public function getPrepaidAllocationExpiresAt(): ?\DateTime + { + if (count($this->prepaidAllocationExpiresAt) == 0) { + return null; + } + return $this->prepaidAllocationExpiresAt['value']; + } + + /** + * Sets Prepaid Allocation Expires At. + * The date a prepaid allocation is set to expire. Only present on line items representing prepaid + * component allocations. The format is `"YYYY-MM-DD"`. + * + * @maps prepaid_allocation_expires_at + * @factory \AdvancedBillingLib\Utils\DateTimeHelper::fromSimpleDate + */ + public function setPrepaidAllocationExpiresAt(?\DateTime $prepaidAllocationExpiresAt): void + { + $this->prepaidAllocationExpiresAt['value'] = $prepaidAllocationExpiresAt; + } + + /** + * Unsets Prepaid Allocation Expires At. + * The date a prepaid allocation is set to expire. Only present on line items representing prepaid + * component allocations. The format is `"YYYY-MM-DD"`. + */ + public function unsetPrepaidAllocationExpiresAt(): void + { + $this->prepaidAllocationExpiresAt = []; + } + /** * Converts the InvoiceLineItem object to a human-readable string representation. * @@ -821,6 +862,7 @@ public function __toString(): string 'productPricePointId' => $this->getProductPricePointId(), 'customItem' => $this->customItem, 'kind' => $this->kind, + 'prepaidAllocationExpiresAt' => $this->getPrepaidAllocationExpiresAt(), 'additionalProperties' => $this->additionalProperties ] ); @@ -867,76 +909,82 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->uid)) { - $json['uid'] = $this->uid; + $json['uid'] = $this->uid; } if (isset($this->title)) { - $json['title'] = $this->title; + $json['title'] = $this->title; } if (isset($this->description)) { - $json['description'] = $this->description; + $json['description'] = $this->description; } if (isset($this->quantity)) { - $json['quantity'] = $this->quantity; + $json['quantity'] = $this->quantity; } if (isset($this->unitPrice)) { - $json['unit_price'] = $this->unitPrice; + $json['unit_price'] = $this->unitPrice; } if (isset($this->subtotalAmount)) { - $json['subtotal_amount'] = $this->subtotalAmount; + $json['subtotal_amount'] = $this->subtotalAmount; } if (isset($this->discountAmount)) { - $json['discount_amount'] = $this->discountAmount; + $json['discount_amount'] = $this->discountAmount; } if (isset($this->taxAmount)) { - $json['tax_amount'] = $this->taxAmount; + $json['tax_amount'] = $this->taxAmount; } if (isset($this->taxIncluded)) { - $json['tax_included'] = $this->taxIncluded; + $json['tax_included'] = $this->taxIncluded; } if (isset($this->totalAmount)) { - $json['total_amount'] = $this->totalAmount; + $json['total_amount'] = $this->totalAmount; } if (isset($this->tieredUnitPrice)) { - $json['tiered_unit_price'] = $this->tieredUnitPrice; + $json['tiered_unit_price'] = $this->tieredUnitPrice; } if (isset($this->periodRangeStart)) { - $json['period_range_start'] = DateTimeHelper::toSimpleDate($this->periodRangeStart); + $json['period_range_start'] = DateTimeHelper::toSimpleDate($this->periodRangeStart); } if (isset($this->periodRangeEnd)) { - $json['period_range_end'] = DateTimeHelper::toSimpleDate($this->periodRangeEnd); + $json['period_range_end'] = DateTimeHelper::toSimpleDate($this->periodRangeEnd); } if (isset($this->transactionId)) { - $json['transaction_id'] = $this->transactionId; + $json['transaction_id'] = $this->transactionId; } if (!empty($this->productId)) { - $json['product_id'] = $this->productId['value']; + $json['product_id'] = $this->productId['value']; } if (!empty($this->productVersion)) { - $json['product_version'] = $this->productVersion['value']; + $json['product_version'] = $this->productVersion['value']; } if (!empty($this->componentId)) { - $json['component_id'] = $this->componentId['value']; + $json['component_id'] = $this->componentId['value']; } if (!empty($this->pricePointId)) { - $json['price_point_id'] = $this->pricePointId['value']; + $json['price_point_id'] = $this->pricePointId['value']; } if (!empty($this->billingScheduleItemId)) { - $json['billing_schedule_item_id'] = $this->billingScheduleItemId['value']; + $json['billing_schedule_item_id'] = $this->billingScheduleItemId['value']; } if (isset($this->hide)) { - $json['hide'] = $this->hide; + $json['hide'] = $this->hide; } if (!empty($this->componentCostData)) { - $json['component_cost_data'] = $this->componentCostData['value']; + $json['component_cost_data'] = $this->componentCostData['value']; } if (!empty($this->productPricePointId)) { - $json['product_price_point_id'] = $this->productPricePointId['value']; + $json['product_price_point_id'] = $this->productPricePointId['value']; } if (isset($this->customItem)) { - $json['custom_item'] = $this->customItem; + $json['custom_item'] = $this->customItem; } if (isset($this->kind)) { - $json['kind'] = $this->kind; + $json['kind'] = $this->kind; + } + if (!empty($this->prepaidAllocationExpiresAt)) { + $json['prepaid_allocation_expires_at'] = + DateTimeHelper::toSimpleDate( + $this->prepaidAllocationExpiresAt['value'] + ); } $json = array_merge($json, $this->additionalProperties); diff --git a/src/Models/PaymentProfile.php b/src/Models/PaymentProfile.php new file mode 100644 index 00000000..13fe196a --- /dev/null +++ b/src/Models/PaymentProfile.php @@ -0,0 +1,214 @@ +id = $id; + } + + /** + * Returns Id. + */ + public function getId(): int + { + return $this->id; + } + + /** + * Sets Id. + * + * @required + * @maps id + */ + public function setId(int $id): void + { + $this->id = $id; + } + + /** + * Returns Vault Token. + */ + public function getVaultToken(): ?string + { + return $this->vaultToken; + } + + /** + * Sets Vault Token. + * + * @maps vault_token + */ + public function setVaultToken(?string $vaultToken): void + { + $this->vaultToken = $vaultToken; + } + + /** + * Returns Gateway Handle. + */ + public function getGatewayHandle(): ?string + { + if (count($this->gatewayHandle) == 0) { + return null; + } + return $this->gatewayHandle['value']; + } + + /** + * Sets Gateway Handle. + * + * @maps gateway_handle + */ + public function setGatewayHandle(?string $gatewayHandle): void + { + $this->gatewayHandle['value'] = $gatewayHandle; + } + + /** + * Unsets Gateway Handle. + */ + public function unsetGatewayHandle(): void + { + $this->gatewayHandle = []; + } + + /** + * Returns Customer Vault Token. + */ + public function getCustomerVaultToken(): ?string + { + if (count($this->customerVaultToken) == 0) { + return null; + } + return $this->customerVaultToken['value']; + } + + /** + * Sets Customer Vault Token. + * + * @maps customer_vault_token + */ + public function setCustomerVaultToken(?string $customerVaultToken): void + { + $this->customerVaultToken['value'] = $customerVaultToken; + } + + /** + * Unsets Customer Vault Token. + */ + public function unsetCustomerVaultToken(): void + { + $this->customerVaultToken = []; + } + + /** + * Converts the PaymentProfile object to a human-readable string representation. + * + * @return string The string representation of the PaymentProfile object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentProfile', + [ + 'id' => $this->id, + 'vaultToken' => $this->vaultToken, + 'gatewayHandle' => $this->getGatewayHandle(), + 'customerVaultToken' => $this->getCustomerVaultToken(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + + private $additionalProperties = []; + + /** + * Add an additional property to this model. + * + * @param string $name Name of property. + * @param mixed $value Value of property. + */ + public function addAdditionalProperty(string $name, $value) + { + $this->additionalProperties[$name] = $value; + } + + /** + * Find an additional property by name in this model or false if property does not exist. + * + * @param string $name Name of property. + * + * @return mixed|false Value of the property. + */ + public function findAdditionalProperty(string $name) + { + if (isset($this->additionalProperties[$name])) { + return $this->additionalProperties[$name]; + } + return false; + } + + /** + * Encode this object to JSON + * + * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields + * are set. (default: false) + * + * @return array|stdClass + */ + #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1) + public function jsonSerialize(bool $asArrayWhenEmpty = false) + { + $json = []; + $json['id'] = $this->id; + if (isset($this->vaultToken)) { + $json['vault_token'] = $this->vaultToken; + } + if (!empty($this->gatewayHandle)) { + $json['gateway_handle'] = $this->gatewayHandle['value']; + } + if (!empty($this->customerVaultToken)) { + $json['customer_vault_token'] = $this->customerVaultToken['value']; + } + $json = array_merge($json, $this->additionalProperties); + + return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; + } +} diff --git a/src/Models/PaymentProfileParams.php b/src/Models/PaymentProfileParams.php new file mode 100644 index 00000000..50a0965c --- /dev/null +++ b/src/Models/PaymentProfileParams.php @@ -0,0 +1,161 @@ +firstName; + } + + /** + * Sets First Name. + * + * @maps first_name + */ + public function setFirstName(?string $firstName): void + { + $this->firstName = $firstName; + } + + /** + * Returns Last Name. + */ + public function getLastName(): ?string + { + return $this->lastName; + } + + /** + * Sets Last Name. + * + * @maps last_name + */ + public function setLastName(?string $lastName): void + { + $this->lastName = $lastName; + } + + /** + * Returns Card Type. + */ + public function getCardType(): ?string + { + return $this->cardType; + } + + /** + * Sets Card Type. + * + * @maps card_type + */ + public function setCardType(?string $cardType): void + { + $this->cardType = $cardType; + } + + /** + * Converts the PaymentProfileParams object to a human-readable string representation. + * + * @return string The string representation of the PaymentProfileParams object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentProfileParams', + [ + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'cardType' => $this->cardType, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + + private $additionalProperties = []; + + /** + * Add an additional property to this model. + * + * @param string $name Name of property. + * @param mixed $value Value of property. + */ + public function addAdditionalProperty(string $name, $value) + { + $this->additionalProperties[$name] = $value; + } + + /** + * Find an additional property by name in this model or false if property does not exist. + * + * @param string $name Name of property. + * + * @return mixed|false Value of the property. + */ + public function findAdditionalProperty(string $name) + { + if (isset($this->additionalProperties[$name])) { + return $this->additionalProperties[$name]; + } + return false; + } + + /** + * Encode this object to JSON + * + * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields + * are set. (default: false) + * + * @return array|stdClass + */ + #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1) + public function jsonSerialize(bool $asArrayWhenEmpty = false) + { + $json = []; + if (isset($this->firstName)) { + $json['first_name'] = $this->firstName; + } + if (isset($this->lastName)) { + $json['last_name'] = $this->lastName; + } + if (isset($this->cardType)) { + $json['card_type'] = $this->cardType; + } + $json = array_merge($json, $this->additionalProperties); + + return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; + } +} diff --git a/src/Models/Site.php b/src/Models/Site.php index 7c4fdfec..59c12c79 100644 --- a/src/Models/Site.php +++ b/src/Models/Site.php @@ -95,6 +95,21 @@ class Site implements \JsonSerializable */ private $netTerms; + /** + * @var bool|null + */ + private $multiFrequencyEnabled; + + /** + * @var bool|null + */ + private $autoRenewalsEnabled; + + /** + * @var bool|null + */ + private $portalEnabled; + /** * @var bool|null */ @@ -392,6 +407,68 @@ public function setNetTerms(?NetTerms $netTerms): void $this->netTerms = $netTerms; } + /** + * Returns Multi Frequency Enabled. + * Whether the site has the multi-frequency billing feature enabled. Only present when relationship + * invoicing is active. + */ + public function getMultiFrequencyEnabled(): ?bool + { + return $this->multiFrequencyEnabled; + } + + /** + * Sets Multi Frequency Enabled. + * Whether the site has the multi-frequency billing feature enabled. Only present when relationship + * invoicing is active. + * + * @maps multi_frequency_enabled + */ + public function setMultiFrequencyEnabled(?bool $multiFrequencyEnabled): void + { + $this->multiFrequencyEnabled = $multiFrequencyEnabled; + } + + /** + * Returns Auto Renewals Enabled. + * Whether the auto-renewals feature is enabled for this site. + */ + public function getAutoRenewalsEnabled(): ?bool + { + return $this->autoRenewalsEnabled; + } + + /** + * Sets Auto Renewals Enabled. + * Whether the auto-renewals feature is enabled for this site. + * + * @maps auto_renewals_enabled + */ + public function setAutoRenewalsEnabled(?bool $autoRenewalsEnabled): void + { + $this->autoRenewalsEnabled = $autoRenewalsEnabled; + } + + /** + * Returns Portal Enabled. + * Whether the Billing Portal is enabled for this site. + */ + public function getPortalEnabled(): ?bool + { + return $this->portalEnabled; + } + + /** + * Sets Portal Enabled. + * Whether the Billing Portal is enabled for this site. + * + * @maps portal_enabled + */ + public function setPortalEnabled(?bool $portalEnabled): void + { + $this->portalEnabled = $portalEnabled; + } + /** * Returns Test. */ @@ -436,6 +513,9 @@ public function __toString(): string 'organizationAddress' => $this->organizationAddress, 'taxConfiguration' => $this->taxConfiguration, 'netTerms' => $this->netTerms, + 'multiFrequencyEnabled' => $this->multiFrequencyEnabled, + 'autoRenewalsEnabled' => $this->autoRenewalsEnabled, + 'portalEnabled' => $this->portalEnabled, 'test' => $this->test, 'additionalProperties' => $this->additionalProperties ] @@ -530,6 +610,15 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false) if (isset($this->netTerms)) { $json['net_terms'] = $this->netTerms; } + if (isset($this->multiFrequencyEnabled)) { + $json['multi_frequency_enabled'] = $this->multiFrequencyEnabled; + } + if (isset($this->autoRenewalsEnabled)) { + $json['auto_renewals_enabled'] = $this->autoRenewalsEnabled; + } + if (isset($this->portalEnabled)) { + $json['portal_enabled'] = $this->portalEnabled; + } if (isset($this->test)) { $json['test'] = $this->test; } diff --git a/src/Models/WebhookSubscription.php b/src/Models/WebhookSubscription.php index 4cf1f1c8..a43faa3d 100644 --- a/src/Models/WebhookSubscription.php +++ b/src/Models/WebhookSubscription.php @@ -20,6 +20,10 @@ class WebhookSubscription public const COMPONENT_ALLOCATION_CHANGE = 'component_allocation_change'; + public const CHJS_TOKENIZATION_FAILURE = 'chjs_tokenization_failure'; + + public const CHJS_TOKENIZATION_SUCCESS = 'chjs_tokenization_success'; + public const CUSTOMER_CREATE = 'customer_create'; public const CUSTOMER_UPDATE = 'customer_update'; @@ -92,6 +96,8 @@ class WebhookSubscription private const _ALL_VALUES = [ self::BILLING_DATE_CHANGE, self::COMPONENT_ALLOCATION_CHANGE, + self::CHJS_TOKENIZATION_FAILURE, + self::CHJS_TOKENIZATION_SUCCESS, self::CUSTOMER_CREATE, self::CUSTOMER_UPDATE, self::DUNNING_STEP_REACHED, From 81339f7558f6b3cf542b369425d121af0f88e2be Mon Sep 17 00:00:00 2001 From: lucassus Date: Thu, 11 Jun 2026 17:55:37 +0000 Subject: [PATCH 4/5] Automated commit message --- doc/models/chjs-tokenization-success.md | 2 +- .../containers/event-event-specific-data.md | 2 +- ...ayment-profile-2.md => payment-profile.md} | 2 +- ...rofile.md => tokenized-payment-profile.md} | 12 +++++------ .../ChjsTokenizationSuccessBuilder.php | 6 +++--- ...php => TokenizedPaymentProfileBuilder.php} | 20 +++++++++---------- src/Models/ChjsTokenizationSuccess.php | 10 +++++----- ...rofile.php => TokenizedPaymentProfile.php} | 8 ++++---- 8 files changed, 31 insertions(+), 31 deletions(-) rename doc/models/containers/{payment-profile-2.md => payment-profile.md} (98%) rename doc/models/{payment-profile.md => tokenized-payment-profile.md} (76%) rename src/Models/Builders/{PaymentProfileBuilder.php => TokenizedPaymentProfileBuilder.php} (79%) rename src/Models/{PaymentProfile.php => TokenizedPaymentProfile.php} (94%) diff --git a/doc/models/chjs-tokenization-success.md b/doc/models/chjs-tokenization-success.md index 33bb712a..0f4f7241 100644 --- a/doc/models/chjs-tokenization-success.md +++ b/doc/models/chjs-tokenization-success.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `paymentProfile` | [`PaymentProfile`](../../doc/models/payment-profile.md) | Required | - | getPaymentProfile(): PaymentProfile | setPaymentProfile(PaymentProfile paymentProfile): void | +| `paymentProfile` | [`TokenizedPaymentProfile`](../../doc/models/tokenized-payment-profile.md) | Required | - | getPaymentProfile(): TokenizedPaymentProfile | setPaymentProfile(TokenizedPaymentProfile paymentProfile): void | | `gatewayCustomerId` | `?int` | Optional | - | getGatewayCustomerId(): ?int | setGatewayCustomerId(?int gatewayCustomerId): void | ## Example (as JSON) diff --git a/doc/models/containers/event-event-specific-data.md b/doc/models/containers/event-event-specific-data.md index bdd270b3..f0864e61 100644 --- a/doc/models/containers/event-event-specific-data.md +++ b/doc/models/containers/event-event-specific-data.md @@ -357,7 +357,7 @@ $value = CustomFieldValueChangeBuilder::init( ```php $value = ChjsTokenizationSuccessBuilder::init( - PaymentProfileBuilder::init( + TokenizedPaymentProfileBuilder::init( 44 )->build() )->build(); diff --git a/doc/models/containers/payment-profile-2.md b/doc/models/containers/payment-profile.md similarity index 98% rename from doc/models/containers/payment-profile-2.md rename to doc/models/containers/payment-profile.md index c02774b8..d89f4af4 100644 --- a/doc/models/containers/payment-profile-2.md +++ b/doc/models/containers/payment-profile.md @@ -1,5 +1,5 @@ -# Payment-Profile 2 +# Payment-Profile ## Data Type diff --git a/doc/models/payment-profile.md b/doc/models/tokenized-payment-profile.md similarity index 76% rename from doc/models/payment-profile.md rename to doc/models/tokenized-payment-profile.md index 1b37a76f..7b4957a8 100644 --- a/doc/models/payment-profile.md +++ b/doc/models/tokenized-payment-profile.md @@ -1,9 +1,9 @@ -# Payment Profile +# Tokenized Payment Profile ## Structure -`PaymentProfile` +`TokenizedPaymentProfile` ## Fields @@ -18,10 +18,10 @@ ```json { - "id": 56, - "vault_token": "vault_token0", - "gateway_handle": "gateway_handle0", - "customer_vault_token": "customer_vault_token6" + "id": 72, + "vault_token": "vault_token2", + "gateway_handle": "gateway_handle8", + "customer_vault_token": "customer_vault_token8" } ``` diff --git a/src/Models/Builders/ChjsTokenizationSuccessBuilder.php b/src/Models/Builders/ChjsTokenizationSuccessBuilder.php index 691e598c..f7359461 100644 --- a/src/Models/Builders/ChjsTokenizationSuccessBuilder.php +++ b/src/Models/Builders/ChjsTokenizationSuccessBuilder.php @@ -11,7 +11,7 @@ namespace AdvancedBillingLib\Models\Builders; use AdvancedBillingLib\Models\ChjsTokenizationSuccess; -use AdvancedBillingLib\Models\PaymentProfile; +use AdvancedBillingLib\Models\TokenizedPaymentProfile; use Core\Utils\CoreHelper; /** @@ -34,9 +34,9 @@ private function __construct(ChjsTokenizationSuccess $instance) /** * Initializes a new Chjs Tokenization Success Builder object. * - * @param PaymentProfile $paymentProfile + * @param TokenizedPaymentProfile $paymentProfile */ - public static function init(PaymentProfile $paymentProfile): self + public static function init(TokenizedPaymentProfile $paymentProfile): self { return new self(new ChjsTokenizationSuccess($paymentProfile)); } diff --git a/src/Models/Builders/PaymentProfileBuilder.php b/src/Models/Builders/TokenizedPaymentProfileBuilder.php similarity index 79% rename from src/Models/Builders/PaymentProfileBuilder.php rename to src/Models/Builders/TokenizedPaymentProfileBuilder.php index 4b96741a..84da43d7 100644 --- a/src/Models/Builders/PaymentProfileBuilder.php +++ b/src/Models/Builders/TokenizedPaymentProfileBuilder.php @@ -10,34 +10,34 @@ namespace AdvancedBillingLib\Models\Builders; -use AdvancedBillingLib\Models\PaymentProfile; +use AdvancedBillingLib\Models\TokenizedPaymentProfile; use Core\Utils\CoreHelper; /** - * Builder for model PaymentProfile + * Builder for model TokenizedPaymentProfile * - * @see PaymentProfile + * @see TokenizedPaymentProfile */ -class PaymentProfileBuilder +class TokenizedPaymentProfileBuilder { /** - * @var PaymentProfile + * @var TokenizedPaymentProfile */ private $instance; - private function __construct(PaymentProfile $instance) + private function __construct(TokenizedPaymentProfile $instance) { $this->instance = $instance; } /** - * Initializes a new Payment Profile Builder object. + * Initializes a new Tokenized Payment Profile Builder object. * * @param int $id */ public static function init(int $id): self { - return new self(new PaymentProfile($id)); + return new self(new TokenizedPaymentProfile($id)); } /** @@ -104,9 +104,9 @@ public function additionalProperty(string $name, $value): self } /** - * Initializes a new Payment Profile object. + * Initializes a new Tokenized Payment Profile object. */ - public function build(): PaymentProfile + public function build(): TokenizedPaymentProfile { return CoreHelper::clone($this->instance); } diff --git a/src/Models/ChjsTokenizationSuccess.php b/src/Models/ChjsTokenizationSuccess.php index fd059809..e9f466c3 100644 --- a/src/Models/ChjsTokenizationSuccess.php +++ b/src/Models/ChjsTokenizationSuccess.php @@ -16,7 +16,7 @@ class ChjsTokenizationSuccess implements \JsonSerializable { /** - * @var PaymentProfile + * @var TokenizedPaymentProfile */ private $paymentProfile; @@ -26,9 +26,9 @@ class ChjsTokenizationSuccess implements \JsonSerializable private $gatewayCustomerId = []; /** - * @param PaymentProfile $paymentProfile + * @param TokenizedPaymentProfile $paymentProfile */ - public function __construct(PaymentProfile $paymentProfile) + public function __construct(TokenizedPaymentProfile $paymentProfile) { $this->paymentProfile = $paymentProfile; } @@ -36,7 +36,7 @@ public function __construct(PaymentProfile $paymentProfile) /** * Returns Payment Profile. */ - public function getPaymentProfile(): PaymentProfile + public function getPaymentProfile(): TokenizedPaymentProfile { return $this->paymentProfile; } @@ -47,7 +47,7 @@ public function getPaymentProfile(): PaymentProfile * @required * @maps payment_profile */ - public function setPaymentProfile(PaymentProfile $paymentProfile): void + public function setPaymentProfile(TokenizedPaymentProfile $paymentProfile): void { $this->paymentProfile = $paymentProfile; } diff --git a/src/Models/PaymentProfile.php b/src/Models/TokenizedPaymentProfile.php similarity index 94% rename from src/Models/PaymentProfile.php rename to src/Models/TokenizedPaymentProfile.php index 13fe196a..96fbc54c 100644 --- a/src/Models/PaymentProfile.php +++ b/src/Models/TokenizedPaymentProfile.php @@ -13,7 +13,7 @@ use AdvancedBillingLib\ApiHelper; use stdClass; -class PaymentProfile implements \JsonSerializable +class TokenizedPaymentProfile implements \JsonSerializable { /** * @var int @@ -139,14 +139,14 @@ public function unsetCustomerVaultToken(): void } /** - * Converts the PaymentProfile object to a human-readable string representation. + * Converts the TokenizedPaymentProfile object to a human-readable string representation. * - * @return string The string representation of the PaymentProfile object. + * @return string The string representation of the TokenizedPaymentProfile object. */ public function __toString(): string { return ApiHelper::stringify( - 'PaymentProfile', + 'TokenizedPaymentProfile', [ 'id' => $this->id, 'vaultToken' => $this->vaultToken, From 9af15b73915b4c4e8a04d622c4eb62f9bfc5c67e Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 11 Jun 2026 13:15:54 -0500 Subject: [PATCH 5/5] Add new/updated properties --- tests/TestData/CustomerTestData.php | 2 +- tests/TestFactory/TestCustomerFactory.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/TestData/CustomerTestData.php b/tests/TestData/CustomerTestData.php index 26103211..95ca524d 100644 --- a/tests/TestData/CustomerTestData.php +++ b/tests/TestData/CustomerTestData.php @@ -27,7 +27,7 @@ final class CustomerTestData public const PORTAL_INVITE_LAST_SENT_AT = null; public const PORTAL_INVITE_LAST_ACCEPTED_AT = null; public const TAX_EXEMPT = false; - public const VAT_NUMBER = 'test vat number'; + public const VAT_NUMBER = 'TEST VAT NUMBER'; public const PARENT_ID = null; public const LOCALE = null; public const UPDATED_FIRST_NAME = 'UpdatedExample'; diff --git a/tests/TestFactory/TestCustomerFactory.php b/tests/TestFactory/TestCustomerFactory.php index 2efec664..80dd81e5 100644 --- a/tests/TestFactory/TestCustomerFactory.php +++ b/tests/TestFactory/TestCustomerFactory.php @@ -47,6 +47,8 @@ public function create(int $id, DateTime $createdAt, DateTime $updatedAt): Custo ->additionalProperty('vat_country', null) ->additionalProperty('vat_status', 'vat_invalid') ->additionalProperty('business_type', null) + ->additionalProperty('entity_identifier_kind', 'company_reg') + ->additionalProperty('entity_identifier_value', 'TEST VAT NUMBER') ->additionalProperty('maxioid', null) ->build(); }