Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 43 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ curl -u <api_key>: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:

Expand All @@ -62,8 +62,8 @@ The following parameters are configurable for the API Client:
| retryOnTimeout | `bool` | Whether to retry on request timeout.<br>*Default*: `true` |
| httpStatusCodesToRetry | `array` | Http status codes to retry against.<br>*Default*: `408, 413, 429, 500, 502, 503, 504, 521, 522, 524` |
| httpMethodsToRetry | `array` | Http methods to retry against.<br>*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:

Expand Down Expand Up @@ -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)

13 changes: 9 additions & 4 deletions doc/controllers/component-price-points.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -136,7 +136,11 @@ $body = CreateComponentPricePointRequestBuilder::init(
PriceBuilder::init(
'101',
'4.00'
)->build()
)
->endingQuantity(
'200'
)
->build()
]
)
->handle('wholesale-handle')
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions doc/controllers/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 38 additions & 1 deletion doc/controllers/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
10 changes: 5 additions & 5 deletions doc/controllers/payment-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions doc/controllers/product-price-points.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
18 changes: 11 additions & 7 deletions doc/controllers/subscription-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | - |

Expand All @@ -1119,7 +1119,7 @@ function createUsage(int $subscriptionId, $componentId, ?CreateUsageRequest $bod
## Example Usage

```php
$subscriptionId = 222;
$subscriptionIdOrReference = 234;

$componentId = 144;

Expand All @@ -1132,7 +1132,7 @@ $body = CreateUsageRequestBuilder::init(
)->build();

$result = $subscriptionComponentsController->createUsage(
$subscriptionId,
$subscriptionIdOrReference,
$componentId,
$body
);
Expand Down Expand Up @@ -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 |
Expand All @@ -1205,7 +1205,7 @@ function listUsages(array $options): array

```php
$collect = [
'subscriptionId' => 222,
'subscriptionIdOrReference' => 234,
'componentId' => 144,
'page' => 2,
'perPage' => 50
Expand Down Expand Up @@ -1296,7 +1296,11 @@ $body = ActivateEventBasedComponentBuilder::init()
PriceBuilder::init(
1,
'5.0'
)->build()
)
->endingQuantity(
null
)
->build()
]
)
->taxIncluded(false)
Expand Down
2 changes: 1 addition & 1 deletion doc/controllers/subscription-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)*
Expand Down
Loading
Loading