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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ License:
The MIT License (MIT)
http://opensource.org/licenses/MIT

Copyright (c) 2014 - 2024 APIMATIC Limited
Copyright (c) 2014 - 2025 APIMATIC Limited

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
82 changes: 41 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,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 6.0.0
gem install maxio-advanced-billing-sdk -v 6.1.0
```

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

```ruby
gem 'maxio-advanced-billing-sdk', '6.0.0'
gem 'maxio-advanced-billing-sdk', '6.1.0'
```

For additional gem details, see the [RubyGems page for the maxio-advanced-billing-sdk gem](https://rubygems.org/gems/maxio-advanced-billing-sdk/versions/6.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/6.1.0).

## Initialize the API Client

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

The following parameters are configurable for the API Client:

Expand All @@ -60,7 +60,7 @@ 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/6.0.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
| `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.1.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |

The API client can be initialized as follows:

Expand Down Expand Up @@ -90,46 +90,46 @@ 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/6.0.0/doc/auth/basic-authentication.md)
* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.1.0/doc/auth/basic-authentication.md)

## List of APIs

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

## Classes Documentation

* [Utility Classes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/utility-classes.md)
* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/http-response.md)
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.0.0/doc/http-request.md)
* [Utility Classes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.1.0/doc/utility-classes.md)
* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.1.0/doc/http-response.md)
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/6.1.0/doc/http-request.md)

2 changes: 1 addition & 1 deletion 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 = '6.0.0'
s.version = '6.1.0'
s.summary = 'SDK for Maxio Advanced Billing'
s.description = "Ultimate billing and pricing flexibility for B2B SaaS.\nMaxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments."
s.authors = ['Maxio SDK']
Expand Down
1 change: 1 addition & 0 deletions doc/controllers/sites.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ result = sites_controller.read_site
"string"
],
"relationship_invoicing_enabled": true,
"schedule_subscription_cancellation_enabled": true,
"customer_hierarchy_enabled": true,
"whopays_enabled": true,
"whopays_default_payer": "string",
Expand Down
2 changes: 1 addition & 1 deletion doc/models/prepaid-product-price-point-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `product_price_point_id` | `String` | Required, Constant | Passed as a parameter to list methods to return only non null values.<br>**Default**: `'not_null'` |
| `product_price_point_id` | `String` | Required, Constant | Passed as a parameter to list methods to return only non null values.<br>**Value**: `'not_null'` |

## Example (as JSON)

Expand Down
1 change: 1 addition & 0 deletions doc/models/site.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
| `seller_id` | `Integer` | Optional | - |
| `non_primary_currencies` | `Array<String>` | Optional | - |
| `relationship_invoicing_enabled` | `TrueClass \| FalseClass` | Optional | - |
| `schedule_subscription_cancellation_enabled` | `TrueClass \| FalseClass` | Optional | - |
| `customer_hierarchy_enabled` | `TrueClass \| FalseClass` | Optional | - |
| `whopays_enabled` | `TrueClass \| FalseClass` | Optional | - |
| `whopays_default_payer` | `String` | Optional | - |
Expand Down
2 changes: 1 addition & 1 deletion lib/advanced_billing/controllers/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class BaseController
attr_accessor :config, :http_call_back

def self.user_agent
'AB SDK Ruby:6.0.0 on OS {os-info}'
'AB SDK Ruby:6.1.0 on OS {os-info}'
end

def self.user_agent_parameters
Expand Down
11 changes: 11 additions & 0 deletions lib/advanced_billing/exceptions/api_exception.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,16 @@
module AdvancedBilling
# Class for exceptions when there is a network error, status code error, etc.
class APIException < CoreLibrary::ApiException
# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} status_code: #{@response_code}, reason: #{@reason}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} status_code: #{@response_code.inspect}, reason: #{@reason.inspect}>"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,17 @@ def unbox(hash)

@errors = SKIP unless hash.key?('errors')
end

# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors.inspect}>"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,17 @@ def unbox(hash)

@errors = SKIP unless hash.key?('errors')
end

# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors.inspect}>"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,17 @@ def unbox(hash)
UnionTypeLookUp.get(:CustomerErrorResponseErrors), hash['errors']
) : SKIP
end

# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors.inspect}>"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,17 @@ def initialize(reason, response)
def unbox(hash)
@errors = hash.key?('errors') ? hash['errors'] : SKIP
end

# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors.inspect}>"
end
end
end
12 changes: 12 additions & 0 deletions lib/advanced_billing/exceptions/error_list_response_exception.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,17 @@ def initialize(reason, response)
def unbox(hash)
@errors = hash.key?('errors') ? hash['errors'] : nil
end

# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors.inspect}>"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,17 @@ def initialize(reason, response)
def unbox(hash)
@errors = hash.key?('errors') ? hash['errors'] : SKIP
end

# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors.inspect}>"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,17 @@ def initialize(reason, response)
def unbox(hash)
@errors = Errors.from_hash(hash['errors']) if hash['errors']
end

# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors.inspect}>"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,17 @@ def initialize(reason, response)
def unbox(hash)
@errors = hash.key?('errors') ? hash['errors'] : SKIP
end

# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors.inspect}>"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,17 @@ def initialize(reason, response)
def unbox(hash)
@errors = EventBasedBillingSegmentError.from_hash(hash['errors']) if hash['errors']
end

# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors.inspect}>"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,17 @@ def initialize(reason, response)
def unbox(hash)
@errors = ProductPricePointErrors.from_hash(hash['errors']) if hash['errors']
end

# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors.inspect}>"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,17 @@ def initialize(reason, response)
def unbox(hash)
@errors = ProformaError.from_hash(hash['errors']) if hash['errors']
end

# Provides a human-readable string representation of the object.
def to_s
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors}>"
end

# Provides a debugging-friendly string with detailed object information.
def inspect
class_name = self.class.name.split('::').last
"<#{class_name} errors: #{@errors.inspect}>"
end
end
end
Loading
Loading