diff --git a/README.md b/README.md index 06abb2f3..ca79ded2 100644 --- a/README.md +++ b/README.md @@ -29,23 +29,23 @@ 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:7.0.0" +composer require "maxio/advanced-billing-sdk:7.0.1" ``` Or add it to the composer.json file manually as given below: ```json "require": { - "maxio/advanced-billing-sdk": "7.0.0" + "maxio/advanced-billing-sdk": "7.0.1" } ``` You can also view the package at: -https://packagist.org/packages/maxio/advanced-billing-sdk#7.0.0 +https://packagist.org/packages/maxio/advanced-billing-sdk#7.0.1 ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/client.md) The following parameters are configurable for the API Client: @@ -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/7.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/7.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/7.0.1/doc/proxy-configuration-builder.md) | Represents the proxy configurations for API calls | +| basicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | The API client can be initialized as follows: @@ -99,55 +99,55 @@ 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/7.0.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/subscription-products.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/subscription-products.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/controllers/webhooks.md) ## SDK Infrastructure ### Configuration -* [ProxyConfigurationBuilder](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/proxy-configuration-builder.md) +* [ProxyConfigurationBuilder](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/proxy-configuration-builder.md) ### HTTP -* [HttpRequest](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/http-request.md) -* [HttpResponse](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/http-response.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/http-request.md) +* [HttpResponse](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/http-response.md) ### Utilities -* [ApiException](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.0/doc/api-exception.md) +* [ApiException](https://www.github.com/maxio-com/ab-php-sdk/tree/7.0.1/doc/api-exception.md) diff --git a/doc/controllers/component-price-points.md b/doc/controllers/component-price-points.md index 59077bcc..72c46826 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -95,7 +95,7 @@ $result = $componentPricePointsController->promoteComponentPricePointToDefault( # Create Component Price Point -This endpoint can be used to create a new price point for an existing component. +Creates a price point for an existing component. ```php function createComponentPricePoint( @@ -136,7 +136,11 @@ $body = CreateComponentPricePointRequestBuilder::init( PriceBuilder::init( '101', '4.00' - )->build() + ) + ->endingQuantity( + '200' + ) + ->build() ] ) ->handle('wholesale-handle') @@ -188,10 +192,11 @@ function listComponentPricePoints(array $options): ComponentPricePointsResponse ## Example Usage ```php -$collect = Liquid error: Value cannot be null. (Parameter 'key')[ +$collect = [ 'componentId' => 222, 'page' => 2, - 'perPage' => 50 + 'perPage' => 50, + 'filterType' => Liquid error: Value cannot be null. (Parameter 'key') ]; $result = $componentPricePointsController->listComponentPricePoints($collect); diff --git a/doc/controllers/components.md b/doc/controllers/components.md index f25be46f..57ccb3fb 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -664,9 +664,9 @@ $result = $componentsController->findComponent($handle); # Read Component -This request will return information regarding a component from a specific product family. +Returns information regarding 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:`. +You can read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. ```php function readComponent(int $productFamilyId, string $componentId): ComponentResponse diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index 4ac36506..61bd7958 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -267,7 +267,7 @@ $result = $customersController->listCustomers($collect); # Read Customer -This method allows to retrieve the Customer properties by Advanced Billing-generated Customer ID. +Retrieves the Customer properties by Advanced Billing-generated Customer ID. ```php function readCustomer(int $id): CustomerResponse @@ -291,6 +291,43 @@ $id = 112; $result = $customersController->readCustomer($id); ``` +## Example Response *(as JSON)* + +```json +{ + "customer": { + "first_name": "Jane", + "last_name": "Doe", + "email": "jane@example.com", + "cc_emails": "joe@example.com", + "organization": "ABC, Inc.", + "reference": "1234567890", + "id": 88833369, + "created_at": "2025-05-08T11:39:18-04:00", + "updated_at": "2025-05-08T11:39:18-04:00", + "address": "123 Main Street", + "address_2": "Unit 10", + "city": "Anytown", + "state": "MA", + "state_name": "Massachusetts", + "zip": "02120", + "country": "US", + "country_name": "United States", + "phone": "555-555-1212", + "verified": false, + "portal_customer_created_at": null, + "portal_invite_last_sent_at": null, + "portal_invite_last_accepted_at": null, + "tax_exempt": false, + "vat_number": null, + "parent_id": null, + "locale": "es-MX", + "salesforce_id": null, + "default_auto_renewal_profile_id": null + } +} +``` + # Update Customer diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index 336ca1b8..88994caa 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -96,9 +96,9 @@ For more information on GoCardless, please view the following resources: + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless) -+ [Using Chargify.js with GoCardless - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-direct-debit-gocardless-gateway) ++ [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ) -+ [Using Chargify.js with GoCardless - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway) ++ [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) ### GoCardless with Local Bank Details @@ -170,9 +170,9 @@ For more information on Stripe SEPA Direct Debit, please view the following reso + [Full documentation on Stripe SEPA Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) -+ [Using Chargify.js with Stripe Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) -+ [Using Chargify.js with Stripe Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7) ### Stripe SEPA Direct Debit Payment Profiles @@ -1023,7 +1023,7 @@ One Time Tokens aka Advanced Billing Tokens house the credit card or ACH (Author You can use One Time Tokens while creating a subscription or payment profile instead of passing all bank account or credit card data directly to a given API endpoint. -To obtain a One Time Token you have to use [Chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview). +To obtain a One Time Token you have to use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). ```php function readOneTimeToken(string $chargifyToken): GetOneTimeTokenRequest diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md index 3cbf4730..4acfc455 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -135,10 +135,11 @@ function listProductPricePoints(array $options): ListProductPricePointsResponse ## Example Usage ```php -$collect = Liquid error: Value cannot be null. (Parameter 'key')[ +$collect = [ 'productId' => 124, 'page' => 2, - 'perPage' => 10 + 'perPage' => 10, + 'filterType' => Liquid error: Value cannot be null. (Parameter 'key') ]; $result = $productPricePointsController->listProductPricePoints($collect); diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index 76592cb8..623ade9e 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -1101,14 +1101,14 @@ Q. Is it possible to record metered usage for more than one component at a time? A. No. 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. ```php -function createUsage(int $subscriptionId, $componentId, ?CreateUsageRequest $body = null): UsageResponse +function createUsage($subscriptionIdOrReference, $componentId, ?CreateUsageRequest $body = null): UsageResponse ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionIdOrReference` | int\|string | Template, Required | This is a container for one-of cases. | | `componentId` | int\|string | Template, Required | This is a container for one-of cases. | | `body` | [`?CreateUsageRequest`](../../doc/models/create-usage-request.md) | Body, Optional | - | @@ -1119,7 +1119,7 @@ function createUsage(int $subscriptionId, $componentId, ?CreateUsageRequest $bod ## Example Usage ```php -$subscriptionId = 222; +$subscriptionIdOrReference = 234; $componentId = 144; @@ -1132,7 +1132,7 @@ $body = CreateUsageRequestBuilder::init( )->build(); $result = $subscriptionComponentsController->createUsage( - $subscriptionId, + $subscriptionIdOrReference, $componentId, $body ); @@ -1188,7 +1188,7 @@ function listUsages(array $options): array | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionIdOrReference` | int\|string | Template, Required | This is a container for one-of cases. | | `componentId` | int\|string | Template, Required | This is a container for one-of cases. | | `sinceId` | `?int` | Query, Optional | Returns usages with an id greater than or equal to the one specified | | `maxId` | `?int` | Query, Optional | Returns usages with an id less than or equal to the one specified | @@ -1205,7 +1205,7 @@ function listUsages(array $options): array ```php $collect = [ - 'subscriptionId' => 222, + 'subscriptionIdOrReference' => 234, 'componentId' => 144, 'page' => 2, 'perPage' => 50 @@ -1296,7 +1296,11 @@ $body = ActivateEventBasedComponentBuilder::init() PriceBuilder::init( 1, '5.0' - )->build() + ) + ->endingQuantity( + null + ) + ->build() ] ) ->taxIncluded(false) diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md index c6a7020d..e558cb32 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -397,7 +397,7 @@ function resumeSubscription( ```php $subscriptionId = 222; -Liquid error: Value cannot be null. (Parameter 'key')$result = $subscriptionStatusController->resumeSubscription(Liquid error: Value cannot be null. (Parameter 'key')$subscriptionId); +$result = $subscriptionStatusController->resumeSubscription($subscriptionId); ``` ## Example Response *(as JSON)* diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md index 98bcdb38..41f99c32 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -117,7 +117,7 @@ Custom prices and price points can exist in harmony on a subscription. ## Subscription with Chargify.js token -The `chargify_token` can be obtained using [Chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway. +The `chargify_token` can be obtained using [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway. The `payment_type` attribute may either be `credit_card` or `bank_account`, depending on the type of payment method being added. If a bank account is being passed, the payment attributes should be changed to `bank_account_attributes`. @@ -248,9 +248,9 @@ For more information on GoCardless, please view the following two resources: + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless) -+ [Using Chargify.js with GoCardless - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-direct-debit-gocardless-gateway) ++ [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ) -+ [Using Chargify.js with GoCardless - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway) ++ [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) ```json { @@ -310,9 +310,9 @@ For more information on Stripe Direct Debit, please view the following two resou + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) -+ [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) -+ [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) ```json { @@ -340,9 +340,9 @@ For more information on Stripe Direct Debit, please view the following two resou + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) -+ [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](page:development-tools/chargify-js/examples#minimal-example-with-sepa-becs-or-bacs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) -+ [Using Chargify.js with Stripe BECS Direct Debit - full example](page:development-tools/chargify-js/examples#full-example-with-becs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe BECS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRX4B1TYZKZD8ZND6D) ```json { @@ -371,9 +371,9 @@ For more information on Stripe Direct Debit, please view the following two resou + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) -+ [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](page:development-tools/chargify-js/examples#minimal-example-with-sepa-becs-or-bacs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) -+ [Using Chargify.js with Stripe BACS Direct Debit - full example](page:development-tools/chargify-js/examples#full-example-with-bacs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe BACS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR7PA1DJ3XE9MD05FM) ```json { diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md index 48f66a19..b30d2455 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -20,20 +20,7 @@ $webhooksController = $client->getWebhooksController(); # List Webhooks -## Webhooks Intro - -The Webhooks API allows you to view a list of all webhooks and to selectively resend individual or groups of webhooks. Webhooks will be sent on endpoints specified by you. Endpoints can be added via API or Web UI. There is also an option to enable / disable webhooks via API request. - -We recommend that you review Advanced Billing's webhook documentation located in our help site. The following resources will help guide you on how to use webhooks in Advanced Billing, in addition to these webhook endpoints: - -+ [Adding/editing new webhooks](https://maxio.zendesk.com/hc/en-us/articles/24286723085197-Webhooks#configure-webhook-url) -+ [Webhooks introduction and delivery information](https://maxio.zendesk.com/hc/en-us/articles/24266143173901-Webhooks-Overview) -+ [Main webhook reference](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference) -+ [Available webhooks and payloads](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events) - -## List Webhooks for a Site - -This method allows you to fetch data about webhooks. You can pass query parameters if you want to filter 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. ```php function listWebhooks(array $options): array @@ -108,7 +95,7 @@ $result = $webhooksController->listWebhooks($collect); # Enable Webhooks -This method allows you to enable webhooks via API for your site +Allows you to enable webhooks for your site ```php function enableWebhooks(?EnableWebhooksRequest $body = null): EnableWebhooksResponse @@ -145,9 +132,7 @@ $result = $webhooksController->enableWebhooks($body); # Replay Webhooks -Posting to the replay endpoint does not immediately resend the webhooks. They are added to a queue and will be sent as soon as possible, depending on available system resources. - -You may submit an array of up to 1000 webhook IDs to replay in the request. +Replays webhooks. Posting to this endpoint does not immediately resend the webhooks. They are added to a queue and sent as soon as possible, depending on available system resources. You can submit an array of up to 1000 webhook IDs in the replay request. ```php function replayWebhooks(?ReplayWebhooksRequest $body = null): ReplayWebhooksResponse @@ -187,10 +172,8 @@ $result = $webhooksController->replayWebhooks($body); # Create Endpoint -The Chargify API allows you to create an endpoint and assign a list of webhooks subscriptions (events) to it. - -You can check available events here. -[Event keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events) +Creates an endpoint and assigns a list of webhooks 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 @@ -248,7 +231,7 @@ $result = $webhooksController->createEndpoint($body); # List Endpoints -This method returns created endpoints for site. +Returns created endpoints for a site. ```php function listEndpoints(): array @@ -295,15 +278,11 @@ $result = $webhooksController->listEndpoints(); # Update Endpoint -You can update an Endpoint via the API with a PUT request to the resource endpoint. - -You can change the `url` of your endpoint which consumes webhooks or list of `webhook_subscriptions`. -Check available [Event keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events). +Updates an Endpoint. You can change the `url` of your endpoint or the list of `webhook_subscriptions` to which you are subscribed. See the [Webhooks Reference](page:introduction/webhooks/webhooks-reference#events) page for available events. -Always send a complete list of events which you want subscribe/watch. -Sending an PUT request for existing endpoint with empty list of `webhook_subscriptions` will end with unsubscribe from all events. +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 specific event, just send a list of `webhook_subscriptions` without the specific event key. +If you want 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 @@ -327,7 +306,7 @@ $endpointId = 42; $body = CreateOrUpdateEndpointRequestBuilder::init( CreateOrUpdateEndpointBuilder::init( - 'https://yout.site/webhooks/1/json.', + 'https://your.site/webhooks/1/json.', [ WebhookSubscription::PAYMENT_FAILURE, WebhookSubscription::PAYMENT_SUCCESS, diff --git a/doc/models/containers/create-usage-subscription-id-or-reference.md b/doc/models/containers/create-usage-subscription-id-or-reference.md new file mode 100644 index 00000000..4a570a0c --- /dev/null +++ b/doc/models/containers/create-usage-subscription-id-or-reference.md @@ -0,0 +1,14 @@ + +# Create Usage Subscription Id or Reference + +## Data Type + +`int|string` + +## Cases + +| Type | +| --- | +| `int` | +| `string` | + 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 new file mode 100644 index 00000000..372c1033 --- /dev/null +++ b/doc/models/containers/list-usages-input-subscription-id-or-reference.md @@ -0,0 +1,14 @@ + +# List Usages Input Subscription Id or Reference + +## Data Type + +`int|string` + +## Cases + +| Type | +| --- | +| `int` | +| `string` | + diff --git a/src/AdvancedBillingClient.php b/src/AdvancedBillingClient.php index 1c3da975..4aabd306 100644 --- a/src/AdvancedBillingClient.php +++ b/src/AdvancedBillingClient.php @@ -144,7 +144,7 @@ public function __construct(array $config = []) ->converter(new CompatibilityConverter()) ->jsonHelper(ApiHelper::getJsonHelper()) ->apiCallback($this->config['httpCallback'] ?? null) - ->userAgent('AB SDK PHP:7.0.0 on OS {os-info}') + ->userAgent('AB SDK PHP:7.0.1 on OS {os-info}') ->globalConfig($this->getGlobalConfiguration()) ->globalErrors($this->getGlobalErrors()) ->serverUrls(self::ENVIRONMENT_MAP[$this->getEnvironment()], Server::PRODUCTION) diff --git a/src/Controllers/ComponentPricePointsController.php b/src/Controllers/ComponentPricePointsController.php index a5321038..9599ef85 100644 --- a/src/Controllers/ComponentPricePointsController.php +++ b/src/Controllers/ComponentPricePointsController.php @@ -71,7 +71,7 @@ public function promoteComponentPricePointToDefault(int $componentId, int $price } /** - * This endpoint can be used to create a new price point for an existing component. + * Creates a price point for an existing component. * * @param int $componentId The Advanced Billing id of the component * @param CreateComponentPricePointRequest|null $body diff --git a/src/Controllers/ComponentsController.php b/src/Controllers/ComponentsController.php index 5e4931d1..81d6c33c 100644 --- a/src/Controllers/ComponentsController.php +++ b/src/Controllers/ComponentsController.php @@ -312,9 +312,9 @@ public function findComponent(string $handle): ComponentResponse } /** - * This request will return information regarding a component from a specific product family. + * Returns information regarding 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 + * You can read the component by either the component's id or handle. When using the handle, it must be * prefixed with `handle:`. * * @param int $productFamilyId The Advanced Billing id of the product family to which the diff --git a/src/Controllers/CustomersController.php b/src/Controllers/CustomersController.php index 8ac342fa..6ec322e7 100644 --- a/src/Controllers/CustomersController.php +++ b/src/Controllers/CustomersController.php @@ -144,7 +144,7 @@ public function listCustomers(array $options): array } /** - * This method allows to retrieve the Customer properties by Advanced Billing-generated Customer ID. + * Retrieves the Customer properties by Advanced Billing-generated Customer ID. * * @param int $id The Advanced Billing id of the customer * diff --git a/src/Controllers/PaymentProfilesController.php b/src/Controllers/PaymentProfilesController.php index f2221e7a..c8c0c194 100644 --- a/src/Controllers/PaymentProfilesController.php +++ b/src/Controllers/PaymentProfilesController.php @@ -119,12 +119,11 @@ class PaymentProfilesController extends BaseController * + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909- * GoCardless) * - * + [Using Chargify.js with GoCardless - minimal example](https://developers.chargify. - * com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-direct-debit-gocardless- - * gateway) + * + [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en- + * us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ) * - * + [Using Chargify.js with GoCardless - full example](https://developers.chargify.com/docs/developer- - * docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway) + * + [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en- + * us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) * * ### GoCardless with Local Bank Details * @@ -200,13 +199,11 @@ class PaymentProfilesController extends BaseController * + [Full documentation on Stripe SEPA Direct Debit](https://maxio.zendesk.com/hc/en- * us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) * - * + [Using Chargify.js with Stripe Direct Debit - minimal example](https://developers.chargify. - * com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit- - * stripe-gateway) + * + [Using Chargify.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en- + * us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) * - * + [Using Chargify.js with Stripe Direct Debit - full example](https://developers.chargify. - * com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe- - * gateway) + * + [Using Chargify.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en- + * us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7) * * ### Stripe SEPA Direct Debit Payment Profiles * @@ -789,8 +786,8 @@ public function changeSubscriptionGroupDefaultPaymentProfile( * You can use One Time Tokens while creating a subscription or payment profile instead of passing all * bank account or credit card data directly to a given API endpoint. * - * To obtain a One Time Token you have to use [Chargify.js](https://developers.chargify. - * com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview). + * To obtain a One Time Token you have to use [Chargify.js](https://docs.maxio.com/hc/en- + * us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). * * @param string $chargifyToken Advanced Billing Token * diff --git a/src/Controllers/SubscriptionComponentsController.php b/src/Controllers/SubscriptionComponentsController.php index d176d595..be22519a 100644 --- a/src/Controllers/SubscriptionComponentsController.php +++ b/src/Controllers/SubscriptionComponentsController.php @@ -660,7 +660,12 @@ public function deletePrepaidUsageAllocation( * A. No. 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. * - * @param int $subscriptionId The Chargify id of the subscription + * @param int|string $subscriptionIdOrReference Either the Advanced Billing subscription ID + * (integer) or the subscription reference (string). Important: In cases where a + * numeric string value matches both an existing subscription ID and an existing + * subscription reference, the system will prioritize the subscription ID lookup. For + * example, if both subscription ID 123 and subscription reference "123" exist, passing + * "123" will return the subscription with ID 123. * @param int|string $componentId Either the Advanced Billing id for the component or the * component's handle prefixed by `handle:` * @param CreateUsageRequest|null $body @@ -669,15 +674,20 @@ public function deletePrepaidUsageAllocation( * * @throws ApiException Thrown if API call fails */ - public function createUsage(int $subscriptionId, $componentId, ?CreateUsageRequest $body = null): UsageResponse - { + public function createUsage( + $subscriptionIdOrReference, + $componentId, + ?CreateUsageRequest $body = null + ): UsageResponse { $_reqBuilder = $this->requestBuilder( RequestMethod::POST, - '/subscriptions/{subscription_id}/components/{component_id}/usages.json' + '/subscriptions/{subscription_id_or_reference}/components/{component_id}/usages.json' ) ->auth('BasicAuth') ->parameters( - TemplateParam::init('subscription_id', $subscriptionId)->required(), + TemplateParam::init('subscription_id_or_reference', $subscriptionIdOrReference) + ->required() + ->strictType('oneOf(int,string)'), TemplateParam::init('component_id', $componentId)->required()->strictType('oneOf(int,string)'), HeaderParam::init('Content-Type', 'application/json'), BodyParam::init($body) @@ -728,11 +738,14 @@ public function listUsages(array $options): array { $_reqBuilder = $this->requestBuilder( RequestMethod::GET, - '/subscriptions/{subscription_id}/components/{component_id}/usages.json' + '/subscriptions/{subscription_id_or_reference}/components/{component_id}/usages.json' ) ->auth('BasicAuth') ->parameters( - TemplateParam::init('subscription_id', $options)->extract('subscriptionId')->required(), + TemplateParam::init('subscription_id_or_reference', $options) + ->extract('subscriptionIdOrReference') + ->required() + ->strictType('oneOf(int,string)'), TemplateParam::init('component_id', $options) ->extract('componentId') ->required() diff --git a/src/Controllers/SubscriptionsController.php b/src/Controllers/SubscriptionsController.php index 02afe2f9..4618d1bd 100644 --- a/src/Controllers/SubscriptionsController.php +++ b/src/Controllers/SubscriptionsController.php @@ -182,9 +182,10 @@ class SubscriptionsController extends BaseController * * ## Subscription with Chargify.js token * - * The `chargify_token` can be obtained using [Chargify.js](https://developers.chargify. - * com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview). The token represents payment profile attributes - * that were provided by the customer in their browser and stored at the payment gateway. + * The `chargify_token` can be obtained using [Chargify.js](https://docs.maxio.com/hc/en- + * us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). The token represents + * payment profile attributes that were provided by the customer in their browser and stored at the + * payment gateway. * * The `payment_type` attribute may either be `credit_card` or `bank_account`, depending on the type of * payment method being added. If a bank account is being passed, the payment attributes should be @@ -321,12 +322,11 @@ class SubscriptionsController extends BaseController * + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909- * GoCardless) * - * + [Using Chargify.js with GoCardless - minimal example](https://developers.chargify. - * com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-direct-debit-gocardless- - * gateway) + * + [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en- + * us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ) * - * + [Using Chargify.js with GoCardless - full example](https://developers.chargify.com/docs/developer- - * docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway) + * + [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en- + * us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) * * ```json * { @@ -387,13 +387,11 @@ class SubscriptionsController extends BaseController * + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en- * us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) * - * + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://developers. - * chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct- - * debit-stripe-gateway) + * + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://docs.maxio. + * com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) * - * + [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://developers.chargify. - * com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe- - * gateway) + * + [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://docs.maxio.com/hc/en- + * us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) * * * ```json @@ -423,11 +421,11 @@ class SubscriptionsController extends BaseController * + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en- * us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) * - * + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](page:development- - * tools/chargify-js/examples#minimal-example-with-sepa-becs-or-bacs-direct-debit-stripe-gateway) + * + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs. + * maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) * - * + [Using Chargify.js with Stripe BECS Direct Debit - full example](page:development-tools/chargify- - * js/examples#full-example-with-becs-direct-debit-stripe-gateway) + * + [Using Chargify.js with Stripe BECS Direct Debit - full example](https://docs.maxio.com/hc/en- + * us/articles/38206331271693-Examples#h_01K0PJ15QRX4B1TYZKZD8ZND6D) * * * ```json @@ -458,11 +456,11 @@ class SubscriptionsController extends BaseController * + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en- * us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) * - * + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](page:development- - * tools/chargify-js/examples#minimal-example-with-sepa-becs-or-bacs-direct-debit-stripe-gateway) + * + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs. + * maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) * - * + [Using Chargify.js with Stripe BACS Direct Debit - full example](page:development-tools/chargify- - * js/examples#full-example-with-bacs-direct-debit-stripe-gateway) + * + [Using Chargify.js with Stripe BACS Direct Debit - full example](https://docs.maxio.com/hc/en- + * us/articles/38206331271693-Examples#h_01K0PJ15QR7PA1DJ3XE9MD05FM) * * ```json * { diff --git a/src/Controllers/WebhooksController.php b/src/Controllers/WebhooksController.php index 390b1693..4530871c 100644 --- a/src/Controllers/WebhooksController.php +++ b/src/Controllers/WebhooksController.php @@ -32,29 +32,8 @@ class WebhooksController extends BaseController { /** - * ## Webhooks Intro - * - * The Webhooks API allows you to view a list of all webhooks and to selectively resend individual or - * groups of webhooks. Webhooks will be sent on endpoints specified by you. Endpoints can be added via - * API or Web UI. There is also an option to enable / disable webhooks via API request. - * - * We recommend that you review Advanced Billing's webhook documentation located in our help site. The - * following resources will help guide you on how to use webhooks in Advanced Billing, in addition to - * these webhook endpoints: - * - * + [Adding/editing new webhooks](https://maxio.zendesk.com/hc/en-us/articles/24286723085197- - * Webhooks#configure-webhook-url) - * + [Webhooks introduction and delivery information](https://maxio.zendesk.com/hc/en- - * us/articles/24266143173901-Webhooks-Overview) - * + [Main webhook reference](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks- - * Reference) - * + [Available webhooks and payloads](https://maxio.zendesk.com/hc/en-us/articles/24266136649869- - * Webhooks-Reference#events) - * - * ## List Webhooks for a Site - * - * This method allows you to fetch data about webhooks. You can pass query parameters if you want to - * filter 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. * * @param array $options Array with all options for search * @@ -88,7 +67,7 @@ public function listWebhooks(array $options): array } /** - * This method allows you to enable webhooks via API for your site + * Allows you to enable webhooks for your site * * @param EnableWebhooksRequest|null $body * @@ -108,10 +87,9 @@ public function enableWebhooks(?EnableWebhooksRequest $body = null): EnableWebho } /** - * Posting to the replay endpoint does not immediately resend the webhooks. They are added to a queue - * and will be sent as soon as possible, depending on available system resources. - * - * You may submit an array of up to 1000 webhook IDs to replay in the request. + * Replays webhooks. Posting to this endpoint does not immediately resend the webhooks. They are added + * to a queue and sent as soon as possible, depending on available system resources. You can submit an + * array of up to 1000 webhook IDs in the replay request. * * @param ReplayWebhooksRequest|null $body * @@ -131,11 +109,9 @@ public function replayWebhooks(?ReplayWebhooksRequest $body = null): ReplayWebho } /** - * The Chargify API allows you to create an endpoint and assign a list of webhooks subscriptions - * (events) to it. - * - * You can check available events here. - * [Event keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events) + * Creates an endpoint and assigns a list of webhooks subscriptions (events) to it. + * See the [Webhooks Reference](page:introduction/webhooks/webhooks-reference#events) page for + * available events. * * @param CreateOrUpdateEndpointRequest|null $body * @@ -163,7 +139,7 @@ public function createEndpoint(?CreateOrUpdateEndpointRequest $body = null): End } /** - * This method returns created endpoints for site. + * Returns created endpoints for a site. * * @return Endpoint[] Response from the API call * @@ -179,17 +155,14 @@ public function listEndpoints(): array } /** - * You can update an Endpoint via the API with a PUT request to the resource endpoint. - * - * You can change the `url` of your endpoint which consumes webhooks or list of `webhook_subscriptions`. - * Check available [Event keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks- - * Reference#events). + * Updates an Endpoint. You can change the `url` of your endpoint or the list of + * `webhook_subscriptions` to which you are subscribed. See the [Webhooks Reference](page: + * introduction/webhooks/webhooks-reference#events) page for available events. * - * Always send a complete list of events which you want subscribe/watch. - * Sending an PUT request for existing endpoint with empty list of `webhook_subscriptions` will end - * with unsubscribe from all events. + * 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 specific event, just send a list of `webhook_subscriptions` without the + * If you want 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/Proxy/ProxyConfigurationBuilder.php b/src/Proxy/ProxyConfigurationBuilder.php index 9e34d979..8224d0f2 100644 --- a/src/Proxy/ProxyConfigurationBuilder.php +++ b/src/Proxy/ProxyConfigurationBuilder.php @@ -91,7 +91,7 @@ public function getConfiguration(): array 'port' => $this->port, 'tunnel' => $this->tunnel, 'address' => $this->address, - 'auth' => ['user' => '$this->user', 'pass' => '$this->pass', 'method' => $this->authMethod] + 'auth' => ['user' => $this->user, 'pass' => $this->pass, 'method' => $this->authMethod] ]; } }