maxio-advanced-billing-sdk 7.0.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +51 -43
- data/lib/advanced_billing/client.rb +3 -3
- data/lib/advanced_billing/configuration.rb +9 -5
- data/lib/advanced_billing/controllers/base_controller.rb +1 -1
- data/lib/advanced_billing/controllers/component_price_points_controller.rb +1 -2
- data/lib/advanced_billing/controllers/components_controller.rb +2 -3
- data/lib/advanced_billing/controllers/customers_controller.rb +2 -2
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +10 -11
- data/lib/advanced_billing/controllers/subscription_components_controller.rb +29 -11
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +21 -22
- data/lib/advanced_billing/controllers/webhooks_controller.rb +23 -48
- data/lib/advanced_billing/http/proxy_settings.rb +13 -0
- data/lib/advanced_billing/utilities/union_type_lookup.rb +14 -0
- data/lib/advanced_billing.rb +1 -0
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d49e3d6261cabb5a45c0a6cb82708dc460baa57151bba5ff105c8ae7fa52e8a
|
4
|
+
data.tar.gz: 4620c35d42b298b1f8346239b9af79607ad9c8b384ae87f710958ce25ff9cab9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db8490520034d7a87d9887acb00a76cd036507fb44d7bfdc52a44bbe1d262cb3d4a092d301ca8a85861560e22f6ac9f5931266c17c0de6f591b258118e9a65de
|
7
|
+
data.tar.gz: 5042fb4191828d0df04296527264a9c15565ad9f9d45f634f397ad807666fc4791f044346ee344a29a149fd41c1a275417c96c117ed72010731c4b38b9b5f641
|
data/README.md
CHANGED
@@ -29,20 +29,20 @@ curl -u <api_key>:x -H Accept:application/json -H Content-Type:application/json
|
|
29
29
|
Install the gem from the command line:
|
30
30
|
|
31
31
|
```bash
|
32
|
-
gem install maxio-advanced-billing-sdk -v 7.0.
|
32
|
+
gem install maxio-advanced-billing-sdk -v 7.0.1
|
33
33
|
```
|
34
34
|
|
35
35
|
Or add the gem to your Gemfile and run `bundle`:
|
36
36
|
|
37
37
|
```ruby
|
38
|
-
gem 'maxio-advanced-billing-sdk', '7.0.
|
38
|
+
gem 'maxio-advanced-billing-sdk', '7.0.1'
|
39
39
|
```
|
40
40
|
|
41
|
-
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.
|
41
|
+
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).
|
42
42
|
|
43
43
|
## Initialize the API Client
|
44
44
|
|
45
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
45
|
+
**_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)
|
46
46
|
|
47
47
|
The following parameters are configurable for the API Client:
|
48
48
|
|
@@ -59,12 +59,16 @@ The following parameters are configurable for the API Client:
|
|
59
59
|
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
60
60
|
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
61
61
|
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
62
|
-
|
|
62
|
+
| 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. |
|
63
|
+
| 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 |
|
63
64
|
|
64
65
|
The API client can be initialized as follows:
|
65
66
|
|
66
67
|
```ruby
|
67
|
-
|
68
|
+
require 'advanced_billing'
|
69
|
+
include AdvancedBilling
|
70
|
+
|
71
|
+
client = Client.new(
|
68
72
|
basic_auth_credentials: BasicAuthCredentials.new(
|
69
73
|
username: 'BasicAuthUserName',
|
70
74
|
password: 'BasicAuthPassword'
|
@@ -89,52 +93,56 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
89
93
|
|
90
94
|
This API uses the following authentication schemes.
|
91
95
|
|
92
|
-
* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
96
|
+
* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/auth/basic-authentication.md)
|
93
97
|
|
94
98
|
## List of APIs
|
95
99
|
|
96
|
-
* [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
97
|
-
* [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
98
|
-
* [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
99
|
-
* [Component Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
100
|
-
* [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
101
|
-
* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
102
|
-
* [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
103
|
-
* [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
104
|
-
* [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
105
|
-
* [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
106
|
-
* [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
107
|
-
* [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
108
|
-
* [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
109
|
-
* [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
110
|
-
* [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
111
|
-
* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
112
|
-
* [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
113
|
-
* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
114
|
-
* [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
115
|
-
* [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
116
|
-
* [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
117
|
-
* [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
118
|
-
* [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
119
|
-
* [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
120
|
-
* [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
121
|
-
* [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
122
|
-
* [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
123
|
-
* [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
124
|
-
* [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
125
|
-
* [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
126
|
-
* [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
127
|
-
* [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
100
|
+
* [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/api-exports.md)
|
101
|
+
* [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/advance-invoice.md)
|
102
|
+
* [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/billing-portal.md)
|
103
|
+
* [Component Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/component-price-points.md)
|
104
|
+
* [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/custom-fields.md)
|
105
|
+
* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/events-based-billing-segments.md)
|
106
|
+
* [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/payment-profiles.md)
|
107
|
+
* [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/product-families.md)
|
108
|
+
* [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/product-price-points.md)
|
109
|
+
* [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/proforma-invoices.md)
|
110
|
+
* [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/reason-codes.md)
|
111
|
+
* [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/referral-codes.md)
|
112
|
+
* [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/sales-commissions.md)
|
113
|
+
* [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-components.md)
|
114
|
+
* [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-groups.md)
|
115
|
+
* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-group-invoice-account.md)
|
116
|
+
* [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-group-status.md)
|
117
|
+
* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-invoice-account.md)
|
118
|
+
* [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-notes.md)
|
119
|
+
* [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-products.md)
|
120
|
+
* [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscription-status.md)
|
121
|
+
* [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/coupons.md)
|
122
|
+
* [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/components.md)
|
123
|
+
* [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/customers.md)
|
124
|
+
* [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/events.md)
|
125
|
+
* [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/insights.md)
|
126
|
+
* [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/invoices.md)
|
127
|
+
* [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/offers.md)
|
128
|
+
* [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/products.md)
|
129
|
+
* [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/sites.md)
|
130
|
+
* [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/subscriptions.md)
|
131
|
+
* [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/controllers/webhooks.md)
|
128
132
|
|
129
133
|
## SDK Infrastructure
|
130
134
|
|
135
|
+
### Configuration
|
136
|
+
|
137
|
+
* [ProxySettings](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/proxy-settings.md)
|
138
|
+
|
131
139
|
### HTTP
|
132
140
|
|
133
|
-
* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
134
|
-
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
141
|
+
* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/http-response.md)
|
142
|
+
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/http-request.md)
|
135
143
|
|
136
144
|
### Utilities
|
137
145
|
|
138
|
-
* [ApiHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
139
|
-
* [DateTimeHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.
|
146
|
+
* [ApiHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/api-helper.md)
|
147
|
+
* [DateTimeHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/7.0.1/doc/date-time-helper.md)
|
140
148
|
|
@@ -205,7 +205,7 @@ module AdvancedBilling
|
|
205
205
|
connection: nil, adapter: :net_http_persistent, timeout: 120,
|
206
206
|
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
207
207
|
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
208
|
-
retry_methods: %i[get put], http_callback: nil,
|
208
|
+
retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
|
209
209
|
environment: Environment::US, site: 'subdomain',
|
210
210
|
basic_auth_credentials: nil, config: nil
|
211
211
|
)
|
@@ -216,8 +216,8 @@ module AdvancedBilling
|
|
216
216
|
backoff_factor: backoff_factor,
|
217
217
|
retry_statuses: retry_statuses,
|
218
218
|
retry_methods: retry_methods, http_callback: http_callback,
|
219
|
-
|
220
|
-
basic_auth_credentials: basic_auth_credentials
|
219
|
+
proxy_settings: proxy_settings, environment: environment,
|
220
|
+
site: site, basic_auth_credentials: basic_auth_credentials
|
221
221
|
)
|
222
222
|
else
|
223
223
|
config
|
@@ -36,14 +36,15 @@ module AdvancedBilling
|
|
36
36
|
connection: nil, adapter: :net_http_persistent, timeout: 120,
|
37
37
|
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
38
38
|
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
39
|
-
retry_methods: %i[get put], http_callback: nil,
|
39
|
+
retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
|
40
40
|
environment: Environment::US, site: 'subdomain',
|
41
41
|
basic_auth_credentials: nil
|
42
42
|
)
|
43
43
|
super connection: connection, adapter: adapter, timeout: timeout,
|
44
44
|
max_retries: max_retries, retry_interval: retry_interval,
|
45
45
|
backoff_factor: backoff_factor, retry_statuses: retry_statuses,
|
46
|
-
retry_methods: retry_methods, http_callback: http_callback
|
46
|
+
retry_methods: retry_methods, http_callback: http_callback,
|
47
|
+
proxy_settings: proxy_settings
|
47
48
|
|
48
49
|
# Current API environment
|
49
50
|
@environment = String(environment)
|
@@ -64,7 +65,8 @@ module AdvancedBilling
|
|
64
65
|
def clone_with(connection: nil, adapter: nil, timeout: nil,
|
65
66
|
max_retries: nil, retry_interval: nil, backoff_factor: nil,
|
66
67
|
retry_statuses: nil, retry_methods: nil, http_callback: nil,
|
67
|
-
|
68
|
+
proxy_settings: nil, environment: nil, site: nil,
|
69
|
+
basic_auth_credentials: nil)
|
68
70
|
connection ||= self.connection
|
69
71
|
adapter ||= self.adapter
|
70
72
|
timeout ||= self.timeout
|
@@ -74,6 +76,7 @@ module AdvancedBilling
|
|
74
76
|
retry_statuses ||= self.retry_statuses
|
75
77
|
retry_methods ||= self.retry_methods
|
76
78
|
http_callback ||= self.http_callback
|
79
|
+
proxy_settings ||= self.proxy_settings
|
77
80
|
environment ||= self.environment
|
78
81
|
site ||= self.site
|
79
82
|
basic_auth_credentials ||= self.basic_auth_credentials
|
@@ -84,8 +87,9 @@ module AdvancedBilling
|
|
84
87
|
backoff_factor: backoff_factor,
|
85
88
|
retry_statuses: retry_statuses,
|
86
89
|
retry_methods: retry_methods,
|
87
|
-
http_callback: http_callback,
|
88
|
-
|
90
|
+
http_callback: http_callback,
|
91
|
+
proxy_settings: proxy_settings,
|
92
|
+
environment: environment, site: site,
|
89
93
|
basic_auth_credentials: basic_auth_credentials)
|
90
94
|
end
|
91
95
|
|
@@ -40,8 +40,7 @@ module AdvancedBilling
|
|
40
40
|
.execute
|
41
41
|
end
|
42
42
|
|
43
|
-
#
|
44
|
-
# component.
|
43
|
+
# Creates a price point for an existing component.
|
45
44
|
# @param [Integer] component_id Required parameter: The Advanced Billing id
|
46
45
|
# of the component
|
47
46
|
# @param [CreateComponentPricePointRequest] body Optional parameter: TODO:
|
@@ -254,9 +254,8 @@ module AdvancedBilling
|
|
254
254
|
.execute
|
255
255
|
end
|
256
256
|
|
257
|
-
#
|
258
|
-
#
|
259
|
-
# You may read the component by either the component's id or handle. When
|
257
|
+
# Returns information regarding a component from a specific product family.
|
258
|
+
# You can read the component by either the component's id or handle. When
|
260
259
|
# using the handle, it must be prefixed with `handle:`.
|
261
260
|
# @param [Integer] product_family_id Required parameter: The Advanced
|
262
261
|
# Billing id of the product family to which the component belongs
|
@@ -137,8 +137,8 @@ module AdvancedBilling
|
|
137
137
|
.execute
|
138
138
|
end
|
139
139
|
|
140
|
-
#
|
141
|
-
#
|
140
|
+
# Retrieves the Customer properties by Advanced Billing-generated Customer
|
141
|
+
# ID.
|
142
142
|
# @param [Integer] id Required parameter: The Advanced Billing id of the
|
143
143
|
# customer
|
144
144
|
# @return [CustomerResponse] Response from the API call.
|
@@ -90,11 +90,11 @@ module AdvancedBilling
|
|
90
90
|
# GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoC
|
91
91
|
# ardless)
|
92
92
|
# + [Using Chargify.js with GoCardless - minimal
|
93
|
-
# example](https://
|
94
|
-
#
|
93
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
94
|
+
# h_01K0PJ15QQZKCER8CFK40MR6XJ)
|
95
95
|
# + [Using Chargify.js with GoCardless - full
|
96
|
-
# example](https://
|
97
|
-
#
|
96
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
97
|
+
# h_01K0PJ15QR09JVHWW0MCA7HVJV)
|
98
98
|
# ### GoCardless with Local Bank Details
|
99
99
|
# Following examples create customer, bank account and mandate in
|
100
100
|
# GoCardless:
|
@@ -165,12 +165,11 @@ module AdvancedBilling
|
|
165
165
|
# Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-S
|
166
166
|
# EPA-and-BECS-Direct-Debit)
|
167
167
|
# + [Using Chargify.js with Stripe Direct Debit - minimal
|
168
|
-
# example](https://
|
169
|
-
#
|
170
|
-
# )
|
168
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
169
|
+
# h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
|
171
170
|
# + [Using Chargify.js with Stripe Direct Debit - full
|
172
|
-
# example](https://
|
173
|
-
#
|
171
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
172
|
+
# h_01K0PJ15QRECQQ4ECS3ZA55GY7)
|
174
173
|
# ### Stripe SEPA Direct Debit Payment Profiles
|
175
174
|
# The following example creates a customer, bank account and mandate in
|
176
175
|
# Stripe:
|
@@ -711,8 +710,8 @@ module AdvancedBilling
|
|
711
710
|
# profile instead of passing all bank account or credit card data directly
|
712
711
|
# to a given API endpoint.
|
713
712
|
# To obtain a One Time Token you have to use
|
714
|
-
# [Chargify.js](https://
|
715
|
-
#
|
713
|
+
# [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Char
|
714
|
+
# gify-js-Overview#chargify-js-overview-0-0).
|
716
715
|
# @param [String] chargify_token Required parameter: Advanced Billing
|
717
716
|
# Token
|
718
717
|
# @return [GetOneTimeTokenRequest] Response from the API call.
|
@@ -597,24 +597,33 @@ module AdvancedBilling
|
|
597
597
|
# A. No. Usage should be reported as one API call per component on a single
|
598
598
|
# subscription. For example, to record that a subscriber has sent both an
|
599
599
|
# SMS Message and an Email, send an API call for each.
|
600
|
-
# @param [Integer]
|
601
|
-
# the subscription
|
600
|
+
# @param [Integer | String] subscription_id_or_reference Required parameter:
|
601
|
+
# Either the Advanced Billing subscription ID (integer) or the subscription
|
602
|
+
# reference (string). Important: In cases where a numeric string value
|
603
|
+
# matches both an existing subscription ID and an existing subscription
|
604
|
+
# reference, the system will prioritize the subscription ID lookup. For
|
605
|
+
# example, if both subscription ID 123 and subscription reference "123"
|
606
|
+
# exist, passing "123" will return the subscription with ID 123.
|
602
607
|
# @param [Integer | String] component_id Required parameter: Either the
|
603
608
|
# Advanced Billing id for the component or the component's handle prefixed
|
604
609
|
# by `handle:`
|
605
610
|
# @param [CreateUsageRequest] body Optional parameter: TODO: type
|
606
611
|
# description here
|
607
612
|
# @return [UsageResponse] Response from the API call.
|
608
|
-
def create_usage(
|
613
|
+
def create_usage(subscription_id_or_reference,
|
609
614
|
component_id,
|
610
615
|
body: nil)
|
611
616
|
@api_call
|
612
617
|
.request(new_request_builder(HttpMethodEnum::POST,
|
613
|
-
'/subscriptions/{
|
618
|
+
'/subscriptions/{subscription_id_or_reference}/components/{component_id}/usages.json',
|
614
619
|
Server::PRODUCTION)
|
615
|
-
.template_param(new_parameter(
|
620
|
+
.template_param(new_parameter(subscription_id_or_reference, key: 'subscription_id_or_reference')
|
616
621
|
.is_required(true)
|
617
|
-
.should_encode(true)
|
622
|
+
.should_encode(true)
|
623
|
+
.validator(proc do |value|
|
624
|
+
UnionTypeLookUp.get(:CreateUsageSubscriptionIdOrReference)
|
625
|
+
.validate(value)
|
626
|
+
end))
|
618
627
|
.template_param(new_parameter(component_id, key: 'component_id')
|
619
628
|
.is_required(true)
|
620
629
|
.should_encode(true)
|
@@ -653,8 +662,13 @@ module AdvancedBilling
|
|
653
662
|
# subscription. You can now specify either the component id (integer) or
|
654
663
|
# the component handle prefixed by "handle:" to specify the unique
|
655
664
|
# identifier for the component you are working with.
|
656
|
-
# @param [Integer]
|
657
|
-
# the subscription
|
665
|
+
# @param [Integer | String] subscription_id_or_reference Required parameter:
|
666
|
+
# Either the Advanced Billing subscription ID (integer) or the subscription
|
667
|
+
# reference (string). Important: In cases where a numeric string value
|
668
|
+
# matches both an existing subscription ID and an existing subscription
|
669
|
+
# reference, the system will prioritize the subscription ID lookup. For
|
670
|
+
# example, if both subscription ID 123 and subscription reference "123"
|
671
|
+
# exist, passing "123" will return the subscription with ID 123.
|
658
672
|
# @param [Integer | String] component_id Required parameter: Either the
|
659
673
|
# Advanced Billing id for the component or the component's handle prefixed
|
660
674
|
# by `handle:`
|
@@ -683,11 +697,15 @@ module AdvancedBilling
|
|
683
697
|
def list_usages(options = {})
|
684
698
|
@api_call
|
685
699
|
.request(new_request_builder(HttpMethodEnum::GET,
|
686
|
-
'/subscriptions/{
|
700
|
+
'/subscriptions/{subscription_id_or_reference}/components/{component_id}/usages.json',
|
687
701
|
Server::PRODUCTION)
|
688
|
-
.template_param(new_parameter(options['
|
702
|
+
.template_param(new_parameter(options['subscription_id_or_reference'], key: 'subscription_id_or_reference')
|
689
703
|
.is_required(true)
|
690
|
-
.should_encode(true)
|
704
|
+
.should_encode(true)
|
705
|
+
.validator(proc do |value|
|
706
|
+
UnionTypeLookUp.get(:ListUsagesInputSubscriptionIdOrReference)
|
707
|
+
.validate(value)
|
708
|
+
end))
|
691
709
|
.template_param(new_parameter(options['component_id'], key: 'component_id')
|
692
710
|
.is_required(true)
|
693
711
|
.should_encode(true)
|
@@ -137,10 +137,10 @@ module AdvancedBilling
|
|
137
137
|
# # Passing Payment Information
|
138
138
|
# ## Subscription with Chargify.js token
|
139
139
|
# The `chargify_token` can be obtained using
|
140
|
-
# [Chargify.js](https://
|
141
|
-
#
|
142
|
-
# were provided by the customer in their browser and
|
143
|
-
# gateway.
|
140
|
+
# [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Char
|
141
|
+
# gify-js-Overview#chargify-js-overview-0-0). The token represents payment
|
142
|
+
# profile attributes that were provided by the customer in their browser and
|
143
|
+
# stored at the payment gateway.
|
144
144
|
# The `payment_type` attribute may either be `credit_card` or
|
145
145
|
# `bank_account`, depending on the type of payment method being added. If a
|
146
146
|
# bank account is being passed, the payment attributes should be changed to
|
@@ -265,11 +265,11 @@ module AdvancedBilling
|
|
265
265
|
# GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoC
|
266
266
|
# ardless)
|
267
267
|
# + [Using Chargify.js with GoCardless - minimal
|
268
|
-
# example](https://
|
269
|
-
#
|
268
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
269
|
+
# h_01K0PJ15QQZKCER8CFK40MR6XJ)
|
270
270
|
# + [Using Chargify.js with GoCardless - full
|
271
|
-
# example](https://
|
272
|
-
#
|
271
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
272
|
+
# h_01K0PJ15QR09JVHWW0MCA7HVJV)
|
273
273
|
# ```json
|
274
274
|
# {
|
275
275
|
# "subscription": {
|
@@ -327,12 +327,11 @@ module AdvancedBilling
|
|
327
327
|
# Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-S
|
328
328
|
# EPA-and-BECS-Direct-Debit)
|
329
329
|
# + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal
|
330
|
-
# example](https://
|
331
|
-
#
|
332
|
-
# )
|
330
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
331
|
+
# h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
|
333
332
|
# + [Using Chargify.js with Stripe SEPA Direct Debit - full
|
334
|
-
# example](https://
|
335
|
-
#
|
333
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
334
|
+
# h_01K0PJ15QR09JVHWW0MCA7HVJV)
|
336
335
|
# ```json
|
337
336
|
# {
|
338
337
|
# "subscription": {
|
@@ -359,11 +358,11 @@ module AdvancedBilling
|
|
359
358
|
# Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-S
|
360
359
|
# EPA-and-BECS-Direct-Debit)
|
361
360
|
# + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal
|
362
|
-
# example](
|
363
|
-
#
|
361
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
362
|
+
# h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
|
364
363
|
# + [Using Chargify.js with Stripe BECS Direct Debit - full
|
365
|
-
# example](
|
366
|
-
#
|
364
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
365
|
+
# h_01K0PJ15QRX4B1TYZKZD8ZND6D)
|
367
366
|
# ```json
|
368
367
|
# {
|
369
368
|
# "subscription": {
|
@@ -391,11 +390,11 @@ module AdvancedBilling
|
|
391
390
|
# Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-S
|
392
391
|
# EPA-and-BECS-Direct-Debit)
|
393
392
|
# + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal
|
394
|
-
# example](
|
395
|
-
#
|
393
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
394
|
+
# h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
|
396
395
|
# + [Using Chargify.js with Stripe BACS Direct Debit - full
|
397
|
-
# example](
|
398
|
-
#
|
396
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
397
|
+
# h_01K0PJ15QR7PA1DJ3XE9MD05FM)
|
399
398
|
# ```json
|
400
399
|
# {
|
401
400
|
# "subscription": {
|
@@ -1288,7 +1287,7 @@ module AdvancedBilling
|
|
1288
1287
|
.auth(Single.new('BasicAuth')))
|
1289
1288
|
.response(new_response_handler
|
1290
1289
|
.deserializer(APIHelper.method(:deserialize_primitive_types))
|
1291
|
-
.deserialize_into(proc do |response| response
|
1290
|
+
.deserialize_into(proc do |response| response&.to_s end)
|
1292
1291
|
.is_primitive_response(true)
|
1293
1292
|
.local_error_template('422',
|
1294
1293
|
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
@@ -6,30 +6,10 @@
|
|
6
6
|
module AdvancedBilling
|
7
7
|
# WebhooksController
|
8
8
|
class WebhooksController < BaseController
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
# There is also an option to enable / disable webhooks via API request.
|
14
|
-
# We recommend that you review Advanced Billing's webhook documentation
|
15
|
-
# located in our help site. The following resources will help guide you on
|
16
|
-
# how to use webhooks in Advanced Billing, in addition to these webhook
|
17
|
-
# endpoints:
|
18
|
-
# + [Adding/editing new
|
19
|
-
# webhooks](https://maxio.zendesk.com/hc/en-us/articles/24286723085197-Webho
|
20
|
-
# oks#configure-webhook-url)
|
21
|
-
# + [Webhooks introduction and delivery
|
22
|
-
# information](https://maxio.zendesk.com/hc/en-us/articles/24266143173901-We
|
23
|
-
# bhooks-Overview)
|
24
|
-
# + [Main webhook
|
25
|
-
# reference](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webh
|
26
|
-
# ooks-Reference)
|
27
|
-
# + [Available webhooks and
|
28
|
-
# payloads](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webho
|
29
|
-
# oks-Reference#events)
|
30
|
-
# ## List Webhooks for a Site
|
31
|
-
# This method allows you to fetch data about webhooks. You can pass query
|
32
|
-
# parameters if you want to filter webhooks.
|
9
|
+
# Allows you to view a list of webhooks. You can pass query parameters if
|
10
|
+
# you want to filter webhooks. See the
|
11
|
+
# [Webhooks](page:introduction/webhooks/webhooks) documentation for more
|
12
|
+
# information.
|
33
13
|
# @param [WebhookStatus] status Optional parameter: Webhooks with matching
|
34
14
|
# status would be returned.
|
35
15
|
# @param [String] since_date Optional parameter: Format YYYY-MM-DD. Returns
|
@@ -75,7 +55,7 @@ module AdvancedBilling
|
|
75
55
|
.execute
|
76
56
|
end
|
77
57
|
|
78
|
-
#
|
58
|
+
# Allows you to enable webhooks for your site
|
79
59
|
# @param [EnableWebhooksRequest] body Optional parameter: TODO: type
|
80
60
|
# description here
|
81
61
|
# @return [EnableWebhooksResponse] Response from the API call.
|
@@ -95,11 +75,10 @@ module AdvancedBilling
|
|
95
75
|
.execute
|
96
76
|
end
|
97
77
|
|
98
|
-
# Posting to
|
99
|
-
# They are added to a queue and
|
100
|
-
# on available system resources.
|
101
|
-
#
|
102
|
-
# request.
|
78
|
+
# Replays webhooks. Posting to this endpoint does not immediately resend the
|
79
|
+
# webhooks. They are added to a queue and sent as soon as possible,
|
80
|
+
# depending on available system resources. You can submit an array of up to
|
81
|
+
# 1000 webhook IDs in the replay request.
|
103
82
|
# @param [ReplayWebhooksRequest] body Optional parameter: TODO: type
|
104
83
|
# description here
|
105
84
|
# @return [ReplayWebhooksResponse] Response from the API call.
|
@@ -119,12 +98,11 @@ module AdvancedBilling
|
|
119
98
|
.execute
|
120
99
|
end
|
121
100
|
|
122
|
-
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
# Reference#events)
|
101
|
+
# Creates an endpoint and assigns a list of webhooks subscriptions (events)
|
102
|
+
# to it.
|
103
|
+
# See the [Webhooks
|
104
|
+
# Reference](page:introduction/webhooks/webhooks-reference#events) page for
|
105
|
+
# available events.
|
128
106
|
# @param [CreateOrUpdateEndpointRequest] body Optional parameter: TODO: type
|
129
107
|
# description here
|
130
108
|
# @return [EndpointResponse] Response from the API call.
|
@@ -148,7 +126,7 @@ module AdvancedBilling
|
|
148
126
|
.execute
|
149
127
|
end
|
150
128
|
|
151
|
-
#
|
129
|
+
# Returns created endpoints for a site.
|
152
130
|
# @return [Array[Endpoint]] Response from the API call.
|
153
131
|
def list_endpoints
|
154
132
|
@api_call
|
@@ -164,17 +142,14 @@ module AdvancedBilling
|
|
164
142
|
.execute
|
165
143
|
end
|
166
144
|
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
#
|
171
|
-
#
|
172
|
-
#
|
173
|
-
#
|
174
|
-
#
|
175
|
-
# Sending an PUT request for existing endpoint with empty list of
|
176
|
-
# `webhook_subscriptions` will end with unsubscribe from all events.
|
177
|
-
# If you want unsubscribe from specific event, just send a list of
|
145
|
+
# Updates an Endpoint. You can change the `url` of your endpoint or the list
|
146
|
+
# of `webhook_subscriptions` to which you are subscribed. See the [Webhooks
|
147
|
+
# Reference](page:introduction/webhooks/webhooks-reference#events) page for
|
148
|
+
# available events.
|
149
|
+
# Always send a complete list of events to which you want to subscribe.
|
150
|
+
# Sending a PUT request for an existing endpoint with an empty list of
|
151
|
+
# `webhook_subscriptions` will unsubscribe all events.
|
152
|
+
# If you want unsubscribe from a specific event, send a list of
|
178
153
|
# `webhook_subscriptions` without the specific event key.
|
179
154
|
# @param [Integer] endpoint_id Required parameter: The Advanced Billing id
|
180
155
|
# for the endpoint that should be updated
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# advanced_billing
|
2
|
+
#
|
3
|
+
# This file was automatically generated for Maxio by
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
5
|
+
|
6
|
+
module AdvancedBilling
|
7
|
+
##
|
8
|
+
# ProxySettings encapsulates HTTP proxy configuration for Faraday,
|
9
|
+
# including optional basic authentication.
|
10
|
+
#
|
11
|
+
class ProxySettings < CoreLibrary::ProxySettings
|
12
|
+
end
|
13
|
+
end
|
@@ -110,6 +110,13 @@ module AdvancedBilling
|
|
110
110
|
]
|
111
111
|
),
|
112
112
|
|
113
|
+
:CreateUsageSubscriptionIdOrReference => OneOf.new(
|
114
|
+
[
|
115
|
+
LeafType.new(Integer),
|
116
|
+
LeafType.new(String)
|
117
|
+
]
|
118
|
+
),
|
119
|
+
|
113
120
|
:CreateUsageComponentId => OneOf.new(
|
114
121
|
[
|
115
122
|
LeafType.new(Integer),
|
@@ -117,6 +124,13 @@ module AdvancedBilling
|
|
117
124
|
]
|
118
125
|
),
|
119
126
|
|
127
|
+
:ListUsagesInputSubscriptionIdOrReference => OneOf.new(
|
128
|
+
[
|
129
|
+
LeafType.new(Integer),
|
130
|
+
LeafType.new(String)
|
131
|
+
]
|
132
|
+
),
|
133
|
+
|
120
134
|
:ListUsagesInputComponentId => OneOf.new(
|
121
135
|
[
|
122
136
|
LeafType.new(Integer),
|
data/lib/advanced_billing.rb
CHANGED
@@ -23,6 +23,7 @@ require_relative 'advanced_billing/http/http_call_back'
|
|
23
23
|
require_relative 'advanced_billing/http/http_method_enum'
|
24
24
|
require_relative 'advanced_billing/http/http_request'
|
25
25
|
require_relative 'advanced_billing/http/http_response'
|
26
|
+
require_relative 'advanced_billing/http/proxy_settings'
|
26
27
|
|
27
28
|
|
28
29
|
require_relative 'advanced_billing/http/auth/basic_auth'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maxio-advanced-billing-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxio SDK
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apimatic_core_interfaces
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2.
|
19
|
+
version: 0.2.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.2.
|
26
|
+
version: 0.2.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: apimatic_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.3.
|
33
|
+
version: 0.3.19
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.3.
|
40
|
+
version: 0.3.19
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: apimatic_faraday_client_adapter
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.6
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.1.
|
54
|
+
version: 0.1.6
|
55
55
|
description: |-
|
56
56
|
Ultimate billing and pricing flexibility for B2B SaaS.
|
57
57
|
Maxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments.
|
@@ -129,6 +129,7 @@ files:
|
|
129
129
|
- lib/advanced_billing/http/http_method_enum.rb
|
130
130
|
- lib/advanced_billing/http/http_request.rb
|
131
131
|
- lib/advanced_billing/http/http_response.rb
|
132
|
+
- lib/advanced_billing/http/proxy_settings.rb
|
132
133
|
- lib/advanced_billing/models/account_balance.rb
|
133
134
|
- lib/advanced_billing/models/account_balances.rb
|
134
135
|
- lib/advanced_billing/models/ach_agreement.rb
|