Skip to content
Merged
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
94 changes: 51 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ curl -u <api_key>:x -H Accept:application/json -H Content-Type:application/json
Install the gem from the command line:

```bash
gem install maxio-advanced-billing-sdk -v 7.0.0
gem install maxio-advanced-billing-sdk -v 7.0.1
```

Or add the gem to your Gemfile and run `bundle`:

```ruby
gem 'maxio-advanced-billing-sdk', '7.0.0'
gem 'maxio-advanced-billing-sdk', '7.0.1'
```

For additional gem details, see the [RubyGems page for the maxio-advanced-billing-sdk gem](https://rubygems.org/gems/maxio-advanced-billing-sdk/versions/7.0.0).
For additional gem details, see the [RubyGems page for the maxio-advanced-billing-sdk gem](https://rubygems.org/gems/maxio-advanced-billing-sdk/versions/7.0.1).

## Initialize the API Client

**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/client.md)
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/client.md)

The following parameters are configurable for the API Client:

Expand All @@ -59,12 +59,16 @@ The following parameters are configurable for the API Client:
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
| proxy_settings | [`ProxySettings`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |

The API client can be initialized as follows:

```ruby
client = AdvancedBilling::Client.new(
require 'advanced_billing'
include AdvancedBilling

client = Client.new(
basic_auth_credentials: BasicAuthCredentials.new(
username: 'BasicAuthUserName',
password: 'BasicAuthPassword'
Expand All @@ -89,52 +93,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-ruby-sdk/tree/7.0.0/doc/auth/basic-authentication.md)
* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/auth/basic-authentication.md)

## List of APIs

* [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/api-exports.md)
* [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/advance-invoice.md)
* [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/billing-portal.md)
* [Component Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/component-price-points.md)
* [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/custom-fields.md)
* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/events-based-billing-segments.md)
* [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/payment-profiles.md)
* [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/product-families.md)
* [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/product-price-points.md)
* [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/proforma-invoices.md)
* [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/reason-codes.md)
* [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/referral-codes.md)
* [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/sales-commissions.md)
* [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/subscription-components.md)
* [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/subscription-groups.md)
* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/subscription-group-invoice-account.md)
* [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/subscription-group-status.md)
* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/subscription-invoice-account.md)
* [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/subscription-notes.md)
* [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/subscription-products.md)
* [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/subscription-status.md)
* [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/coupons.md)
* [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/components.md)
* [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/customers.md)
* [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/events.md)
* [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/insights.md)
* [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/invoices.md)
* [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/offers.md)
* [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/products.md)
* [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/sites.md)
* [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/subscriptions.md)
* [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/controllers/webhooks.md)
* [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/api-exports.md)
* [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/advance-invoice.md)
* [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/billing-portal.md)
* [Component Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/component-price-points.md)
* [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/custom-fields.md)
* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/events-based-billing-segments.md)
* [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/payment-profiles.md)
* [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/product-families.md)
* [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/product-price-points.md)
* [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/proforma-invoices.md)
* [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/reason-codes.md)
* [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/referral-codes.md)
* [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/sales-commissions.md)
* [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-components.md)
* [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-groups.md)
* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-group-invoice-account.md)
* [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-group-status.md)
* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-invoice-account.md)
* [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-notes.md)
* [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-products.md)
* [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-status.md)
* [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/coupons.md)
* [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/components.md)
* [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/customers.md)
* [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/events.md)
* [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/insights.md)
* [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/invoices.md)
* [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/offers.md)
* [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/products.md)
* [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/sites.md)
* [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscriptions.md)
* [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/webhooks.md)

## SDK Infrastructure

### Configuration

* [ProxySettings](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/proxy-settings.md)

### HTTP

* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/http-response.md)
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/http-request.md)
* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/http-response.md)
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/http-request.md)

### Utilities

* [ApiHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/api-helper.md)
* [DateTimeHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.0/doc/date-time-helper.md)
* [ApiHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/api-helper.md)
* [DateTimeHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/date-time-helper.md)

8 changes: 4 additions & 4 deletions advanced_billing.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'maxio-advanced-billing-sdk'
s.version = '7.0.0'
s.version = '7.0.1'
s.summary = 'SDK for Maxio Advanced Billing'
s.description = "Ultimate billing and pricing flexibility for B2B SaaS.\nMaxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments."
s.authors = ['Maxio SDK']
Expand All @@ -10,9 +10,9 @@ Gem::Specification.new do |s|
s.metadata = {
}

s.add_dependency('apimatic_core_interfaces', '~> 0.2.1')
s.add_dependency('apimatic_core', '~> 0.3.17')
s.add_dependency('apimatic_faraday_client_adapter', '~> 0.1.4')
s.add_dependency('apimatic_core_interfaces', '~> 0.2.2')
s.add_dependency('apimatic_core', '~> 0.3.19')
s.add_dependency('apimatic_faraday_client_adapter', '~> 0.1.6')
s.required_ruby_version = ['>= 2.6']
s.files = Dir['{bin,lib,man,test,spec}/**/*', 'README*', 'LICENSE*']
s.require_paths = ['lib']
Expand Down
5 changes: 4 additions & 1 deletion doc/auth/basic-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ Documentation for accessing and setting credentials for BasicAuth.
You must provide credentials in the client as shown in the following code snippet.

```ruby
client = AdvancedBilling::Client.new(
require 'advanced_billing'
include AdvancedBilling

client = Client.new(
basic_auth_credentials: BasicAuthCredentials.new(
username: 'BasicAuthUserName',
password: 'BasicAuthPassword'
Expand Down
6 changes: 5 additions & 1 deletion doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ The following parameters are configurable for the API Client:
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
| proxy_settings | [`ProxySettings`](../doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
| basic_auth_credentials | [`BasicAuthCredentials`](auth/basic-authentication.md) | The credential object for Basic Authentication |

The API client can be initialized as follows:

```ruby
client = AdvancedBilling::Client.new(
require 'advanced_billing'
include AdvancedBilling

client = Client.new(
basic_auth_credentials: BasicAuthCredentials.new(
username: 'BasicAuthUserName',
password: 'BasicAuthPassword'
Expand Down
9 changes: 5 additions & 4 deletions doc/controllers/component-price-points.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ puts result

# 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.

```ruby
def create_component_price_point(component_id,
Expand Down Expand Up @@ -133,7 +133,7 @@ body = CreateComponentPricePointRequest.new(
Price.new(
starting_quantity: '101',
unit_price: '4.00',
ending_quantity: nil
ending_quantity: '200'
)
],
handle: 'wholesale-handle',
Expand Down Expand Up @@ -186,10 +186,11 @@ def list_component_price_points(options = {})
## Example Usage

```ruby
Liquid error: Value cannot be null. (Parameter 'key')collect = {
collect = {
'component_id' => 222,
'page' => 2,
'per_page' => 50
'per_page' => 50,
'filter_type' => Liquid error: Value cannot be null. (Parameter 'key')
}

result = component_price_points_controller.list_component_price_points(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 @@ -646,9 +646,9 @@ puts result

# 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:`.

```ruby
def read_component(product_family_id,
Expand Down
39 changes: 38 additions & 1 deletion doc/controllers/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ puts result

# 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.

```ruby
def read_customer(id)
Expand All @@ -293,6 +293,43 @@ result = customers_controller.read_customer(id)
puts result
```

## 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 @@ -1024,7 +1024,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).

```ruby
def read_one_time_token(chargify_token)
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 @@ -133,10 +133,11 @@ def list_product_price_points(options = {})
## Example Usage

```ruby
Liquid error: Value cannot be null. (Parameter 'key')collect = {
collect = {
'product_id' => 124,
'page' => 2,
'per_page' => 10
'per_page' => 10,
'filter_type' => Liquid error: Value cannot be null. (Parameter 'key')
}

result = product_price_points_controller.list_product_price_points(collect)
Expand Down
Loading