maxio-advanced-billing-sdk 9.0.0 → 9.1.0
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 +48 -48
- data/lib/advanced_billing/controllers/advance_invoice_controller.rb +4 -4
- data/lib/advanced_billing/controllers/api_exports_controller.rb +12 -15
- data/lib/advanced_billing/controllers/base_controller.rb +1 -1
- data/lib/advanced_billing/controllers/billing_portal_controller.rb +10 -10
- data/lib/advanced_billing/controllers/component_price_points_controller.rb +12 -19
- data/lib/advanced_billing/controllers/components_controller.rb +26 -30
- data/lib/advanced_billing/controllers/coupons_controller.rb +34 -39
- data/lib/advanced_billing/controllers/custom_fields_controller.rb +4 -3
- data/lib/advanced_billing/controllers/customers_controller.rb +10 -9
- data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +12 -13
- data/lib/advanced_billing/controllers/events_controller.rb +5 -4
- data/lib/advanced_billing/controllers/insights_controller.rb +4 -5
- data/lib/advanced_billing/controllers/invoices_controller.rb +24 -22
- data/lib/advanced_billing/controllers/offers_controller.rb +7 -8
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +28 -92
- data/lib/advanced_billing/controllers/product_families_controller.rb +2 -2
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +4 -5
- data/lib/advanced_billing/controllers/products_controller.rb +3 -3
- data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +29 -32
- data/lib/advanced_billing/controllers/reason_codes_controller.rb +9 -12
- data/lib/advanced_billing/controllers/referral_codes_controller.rb +3 -3
- data/lib/advanced_billing/controllers/sales_commissions_controller.rb +3 -3
- data/lib/advanced_billing/controllers/sites_controller.rb +9 -8
- data/lib/advanced_billing/controllers/subscription_components_controller.rb +33 -33
- data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +9 -12
- data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +21 -11
- data/lib/advanced_billing/controllers/subscription_groups_controller.rb +14 -12
- data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +21 -13
- data/lib/advanced_billing/controllers/subscription_notes_controller.rb +5 -6
- data/lib/advanced_billing/controllers/subscription_products_controller.rb +15 -73
- data/lib/advanced_billing/controllers/subscription_status_controller.rb +37 -25
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +39 -30
- data/lib/advanced_billing/controllers/webhooks_controller.rb +5 -5
- data/lib/advanced_billing/models/activate_event_based_component.rb +4 -3
- data/lib/advanced_billing/models/bank_account_payment_profile.rb +21 -23
- data/lib/advanced_billing/models/billing_schedule.rb +11 -7
- data/lib/advanced_billing/models/chjs_tokenization_failure.rb +98 -0
- data/lib/advanced_billing/models/chjs_tokenization_success.rb +102 -0
- data/lib/advanced_billing/models/create_allocation.rb +4 -3
- data/lib/advanced_billing/models/create_invoice.rb +4 -1
- data/lib/advanced_billing/models/create_payment_profile.rb +8 -5
- data/lib/advanced_billing/models/create_subscription.rb +3 -3
- data/lib/advanced_billing/models/create_usage.rb +4 -3
- data/lib/advanced_billing/models/credit_card_payment_profile.rb +6 -6
- data/lib/advanced_billing/models/credit_note_line_item.rb +51 -17
- data/lib/advanced_billing/models/customer.rb +15 -5
- data/lib/advanced_billing/models/event.rb +2 -0
- data/lib/advanced_billing/models/event_key.rb +12 -0
- data/lib/advanced_billing/models/invoice_line_item.rb +58 -21
- data/lib/advanced_billing/models/payment_profile_attributes.rb +6 -6
- data/lib/advanced_billing/models/payment_profile_params.rb +103 -0
- data/lib/advanced_billing/models/site.rb +42 -5
- data/lib/advanced_billing/models/tokenized_payment_profile.rb +121 -0
- data/lib/advanced_billing/models/webhook_subscription.rb +12 -0
- data/lib/advanced_billing/utilities/union_type_lookup.rb +234 -232
- data/lib/advanced_billing.rb +387 -383
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 55931a03c7a222eba4a541573e8a59b031224dc88744d3504e0dd2097075572e
|
|
4
|
+
data.tar.gz: d695f27b17a21691cb870dc43362491654d457799027c4603e625a3364488474
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c1123ccfa7205b6405f78a912abc2e8230192e204d26dd8a6bfa24c9e682ba22e612b7fbf6f05fa42b61385d86cfa7f0e7c0d8f97b2c619112240dcdd7f9a10
|
|
7
|
+
data.tar.gz: ddd4b84372a1946ef74331db82d3ba3173d55803d824f272bdc0719edf25575d959240ba35bbafa9f792dfd1b54238150bfba341096dd0a45c7181ce14d06470
|
data/README.md
CHANGED
|
@@ -29,16 +29,16 @@ 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 9.
|
|
32
|
+
gem install maxio-advanced-billing-sdk -v 9.1.0
|
|
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', '9.
|
|
38
|
+
gem 'maxio-advanced-billing-sdk', '9.1.0'
|
|
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/9.
|
|
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/9.1.0).
|
|
42
42
|
|
|
43
43
|
## IRB Console Usage
|
|
44
44
|
|
|
@@ -77,14 +77,14 @@ ruby bin/console
|
|
|
77
77
|
|
|
78
78
|
## Initialize the API Client
|
|
79
79
|
|
|
80
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
80
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/client.md)
|
|
81
81
|
|
|
82
82
|
The following parameters are configurable for the API Client:
|
|
83
83
|
|
|
84
84
|
| Parameter | Type | Description |
|
|
85
85
|
| --- | --- | --- |
|
|
86
86
|
| site | `String` | The subdomain for your Advanced Billing site.<br>*Default*: `'subdomain'` |
|
|
87
|
-
| environment | [`Environment`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
87
|
+
| environment | [`Environment`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/README.md#environments) | The API environment. <br> **Default: `Environment.US`** |
|
|
88
88
|
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
89
89
|
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
90
90
|
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 120** |
|
|
@@ -94,8 +94,8 @@ The following parameters are configurable for the API Client:
|
|
|
94
94
|
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
95
95
|
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
96
96
|
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
97
|
-
| proxy_settings | [`ProxySettings`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
98
|
-
| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
97
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
98
|
+
| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
|
|
99
99
|
|
|
100
100
|
The API client can be initialized as follows:
|
|
101
101
|
|
|
@@ -125,7 +125,7 @@ include AdvancedBilling
|
|
|
125
125
|
client = Client.from_env
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
See the [`Environment-Based Client Initialization`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
128
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/environment-based-client-initialization.md) section for details.
|
|
129
129
|
|
|
130
130
|
## Environments
|
|
131
131
|
|
|
@@ -142,58 +142,58 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
|
142
142
|
|
|
143
143
|
This API uses the following authentication schemes.
|
|
144
144
|
|
|
145
|
-
* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
145
|
+
* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/auth/basic-authentication.md)
|
|
146
146
|
|
|
147
147
|
## List of APIs
|
|
148
148
|
|
|
149
|
-
* [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
150
|
-
* [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
151
|
-
* [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
152
|
-
* [Component Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
153
|
-
* [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
154
|
-
* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
155
|
-
* [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
156
|
-
* [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
157
|
-
* [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
158
|
-
* [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
159
|
-
* [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
160
|
-
* [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
161
|
-
* [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
162
|
-
* [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
163
|
-
* [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
164
|
-
* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
165
|
-
* [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
166
|
-
* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
167
|
-
* [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
168
|
-
* [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
169
|
-
* [Subscription Renewals](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
170
|
-
* [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
171
|
-
* [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
172
|
-
* [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
173
|
-
* [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
174
|
-
* [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
175
|
-
* [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
176
|
-
* [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
177
|
-
* [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
178
|
-
* [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
179
|
-
* [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
180
|
-
* [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
181
|
-
* [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
149
|
+
* [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/api-exports.md)
|
|
150
|
+
* [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/advance-invoice.md)
|
|
151
|
+
* [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/billing-portal.md)
|
|
152
|
+
* [Component Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/component-price-points.md)
|
|
153
|
+
* [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/custom-fields.md)
|
|
154
|
+
* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/events-based-billing-segments.md)
|
|
155
|
+
* [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/payment-profiles.md)
|
|
156
|
+
* [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/product-families.md)
|
|
157
|
+
* [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/product-price-points.md)
|
|
158
|
+
* [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/proforma-invoices.md)
|
|
159
|
+
* [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/reason-codes.md)
|
|
160
|
+
* [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/referral-codes.md)
|
|
161
|
+
* [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/sales-commissions.md)
|
|
162
|
+
* [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-components.md)
|
|
163
|
+
* [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-groups.md)
|
|
164
|
+
* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-group-invoice-account.md)
|
|
165
|
+
* [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-group-status.md)
|
|
166
|
+
* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-invoice-account.md)
|
|
167
|
+
* [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-notes.md)
|
|
168
|
+
* [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-products.md)
|
|
169
|
+
* [Subscription Renewals](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-renewals.md)
|
|
170
|
+
* [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscription-status.md)
|
|
171
|
+
* [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/coupons.md)
|
|
172
|
+
* [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/components.md)
|
|
173
|
+
* [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/customers.md)
|
|
174
|
+
* [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/events.md)
|
|
175
|
+
* [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/insights.md)
|
|
176
|
+
* [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/invoices.md)
|
|
177
|
+
* [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/offers.md)
|
|
178
|
+
* [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/products.md)
|
|
179
|
+
* [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/sites.md)
|
|
180
|
+
* [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/subscriptions.md)
|
|
181
|
+
* [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/controllers/webhooks.md)
|
|
182
182
|
|
|
183
183
|
## SDK Infrastructure
|
|
184
184
|
|
|
185
185
|
### Configuration
|
|
186
186
|
|
|
187
|
-
* [ProxySettings](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
188
|
-
* [Environment-Based Client Initialization](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
187
|
+
* [ProxySettings](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/proxy-settings.md)
|
|
188
|
+
* [Environment-Based Client Initialization](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/environment-based-client-initialization.md)
|
|
189
189
|
|
|
190
190
|
### HTTP
|
|
191
191
|
|
|
192
|
-
* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
193
|
-
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
192
|
+
* [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/http-response.md)
|
|
193
|
+
* [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/http-request.md)
|
|
194
194
|
|
|
195
195
|
### Utilities
|
|
196
196
|
|
|
197
|
-
* [ApiHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
198
|
-
* [DateTimeHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.
|
|
197
|
+
* [ApiHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/api-helper.md)
|
|
198
|
+
* [DateTimeHelper](https://www.github.com/maxio-com/ab-ruby-sdk/tree/9.1.0/doc/date-time-helper.md)
|
|
199
199
|
|
|
@@ -10,7 +10,7 @@ module AdvancedBilling
|
|
|
10
10
|
# [See our
|
|
11
11
|
# docs](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Inv
|
|
12
12
|
# oice-In-Advance) for more information on advance invoices, including
|
|
13
|
-
# eligibility
|
|
13
|
+
# eligibility for generating one; for the most part, they function like any
|
|
14
14
|
# other invoice, except they are issued early and have special behavior upon
|
|
15
15
|
# being voided.
|
|
16
16
|
# A subscription may only have one advance invoice per billing period.
|
|
@@ -55,9 +55,9 @@ module AdvancedBilling
|
|
|
55
55
|
.execute
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
#
|
|
59
|
-
# renewal
|
|
60
|
-
#
|
|
58
|
+
# Returns the advance invoice generated for a subscription's upcoming
|
|
59
|
+
# renewal. There can only be one advance invoice per subscription per
|
|
60
|
+
# billing cycle.
|
|
61
61
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
|
62
62
|
# the subscription.
|
|
63
63
|
# @return [Invoice] Response from the API call.
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
module AdvancedBilling
|
|
7
7
|
# APIExportsController
|
|
8
8
|
class APIExportsController < BaseController
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
# responses from the server.
|
|
9
|
+
# Lists exported proforma invoices for a provided `batch_id`. Use pagination
|
|
10
|
+
# to control responses returned from the server.
|
|
12
11
|
# Example: `GET
|
|
13
12
|
# https://{subdomain}.chargify.com/api_exports/proforma_invoices/123/rows?pe
|
|
14
13
|
# r_page=10000&page=1`.
|
|
@@ -47,9 +46,8 @@ module AdvancedBilling
|
|
|
47
46
|
.execute
|
|
48
47
|
end
|
|
49
48
|
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
# server.
|
|
49
|
+
# Lists exported invoices for a provided `batch_id`. Use pagination to
|
|
50
|
+
# control responses returned from the server.
|
|
53
51
|
# Example: `GET
|
|
54
52
|
# https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per_page=10
|
|
55
53
|
# 000&page=1`.
|
|
@@ -88,9 +86,8 @@ module AdvancedBilling
|
|
|
88
86
|
.execute
|
|
89
87
|
end
|
|
90
88
|
|
|
91
|
-
#
|
|
92
|
-
#
|
|
93
|
-
# responses from the server.
|
|
89
|
+
# Lists exported subscriptions for a provided `batch_id`. Use pagination to
|
|
90
|
+
# control responses returned from the server.
|
|
94
91
|
# Example: `GET
|
|
95
92
|
# https://{subdomain}.chargify.com/api_exports/subscriptions/123/rows?per_pa
|
|
96
93
|
# ge=200&page=1`.
|
|
@@ -129,7 +126,7 @@ module AdvancedBilling
|
|
|
129
126
|
.execute
|
|
130
127
|
end
|
|
131
128
|
|
|
132
|
-
#
|
|
129
|
+
# Creates a proforma invoices export and returns a batch job object.
|
|
133
130
|
# It is only available for Relationship Invoicing architecture.
|
|
134
131
|
# @return [BatchJobResponse] Response from the API call.
|
|
135
132
|
def export_proforma_invoices
|
|
@@ -152,7 +149,7 @@ module AdvancedBilling
|
|
|
152
149
|
.execute
|
|
153
150
|
end
|
|
154
151
|
|
|
155
|
-
#
|
|
152
|
+
# Creates an invoices export and returns a batch job object.
|
|
156
153
|
# @return [BatchJobResponse] Response from the API call.
|
|
157
154
|
def export_invoices
|
|
158
155
|
@api_call
|
|
@@ -174,7 +171,7 @@ module AdvancedBilling
|
|
|
174
171
|
.execute
|
|
175
172
|
end
|
|
176
173
|
|
|
177
|
-
#
|
|
174
|
+
# Creates a subscriptions export and returns a batch job object.
|
|
178
175
|
# @return [BatchJobResponse] Response from the API call.
|
|
179
176
|
def export_subscriptions
|
|
180
177
|
@api_call
|
|
@@ -193,7 +190,7 @@ module AdvancedBilling
|
|
|
193
190
|
.execute
|
|
194
191
|
end
|
|
195
192
|
|
|
196
|
-
#
|
|
193
|
+
# Returns a batch job object for a proforma invoices export.
|
|
197
194
|
# @param [String] batch_id Required parameter: Id of a Batch Job.
|
|
198
195
|
# @return [BatchJobResponse] Response from the API call.
|
|
199
196
|
def read_proforma_invoices_export(batch_id)
|
|
@@ -215,7 +212,7 @@ module AdvancedBilling
|
|
|
215
212
|
.execute
|
|
216
213
|
end
|
|
217
214
|
|
|
218
|
-
#
|
|
215
|
+
# Returns a batch job object for an invoices export.
|
|
219
216
|
# @param [String] batch_id Required parameter: Id of a Batch Job.
|
|
220
217
|
# @return [BatchJobResponse] Response from the API call.
|
|
221
218
|
def read_invoices_export(batch_id)
|
|
@@ -237,7 +234,7 @@ module AdvancedBilling
|
|
|
237
234
|
.execute
|
|
238
235
|
end
|
|
239
236
|
|
|
240
|
-
#
|
|
237
|
+
# Returns a batch job object for a subscriptions export.
|
|
241
238
|
# @param [String] batch_id Required parameter: Id of a Batch Job.
|
|
242
239
|
# @return [BatchJobResponse] Response from the API call.
|
|
243
240
|
def read_subscriptions_export(batch_id)
|
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
module AdvancedBilling
|
|
7
7
|
# BillingPortalController
|
|
8
8
|
class BillingPortalController < BaseController
|
|
9
|
+
# Enables Billing Portal access for a customer, with an option to send an
|
|
10
|
+
# invitation email at the same time.
|
|
9
11
|
# ## Billing Portal Documentation
|
|
10
12
|
# Full documentation on how the Billing Portal operates within the Advanced
|
|
11
13
|
# Billing UI can be located
|
|
12
14
|
# [here](https://maxio.zendesk.com/hc/en-us/articles/24252412965133-Billing-
|
|
13
15
|
# Portal-Overview).
|
|
14
|
-
# This documentation is focused on how
|
|
16
|
+
# This documentation is focused on how to configure the Billing Portal
|
|
15
17
|
# Settings, as well as Subscriber Interaction and Merchant Management of the
|
|
16
18
|
# Billing Portal.
|
|
17
19
|
# You can use this endpoint to enable Billing Portal access for a Customer,
|
|
@@ -60,8 +62,8 @@ module AdvancedBilling
|
|
|
60
62
|
.execute
|
|
61
63
|
end
|
|
62
64
|
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
+
# Returns the exact URL required for a subscriber to access the Billing
|
|
66
|
+
# Portal.
|
|
65
67
|
# ## Rules for Management Link API
|
|
66
68
|
# + When retrieving a management URL, multiple requests for the same
|
|
67
69
|
# customer in a short period will return the **same** URL
|
|
@@ -99,15 +101,13 @@ module AdvancedBilling
|
|
|
99
101
|
.execute
|
|
100
102
|
end
|
|
101
103
|
|
|
102
|
-
#
|
|
104
|
+
# Resends a customer's Billing Portal invitation.
|
|
103
105
|
# If you attempt to resend an invitation 5 times within 30 minutes, you will
|
|
104
|
-
# receive a `422` response with `error` message in the body.
|
|
106
|
+
# receive a `422` response with an `error` message in the body.
|
|
105
107
|
# If you attempt to resend an invitation when the Billing Portal is already
|
|
106
108
|
# disabled for a Customer, you will receive a `422` error response.
|
|
107
|
-
# If you attempt to resend an invitation when the
|
|
108
|
-
#
|
|
109
|
-
# If you attempt to resend an invitation when the Customer does not exist a
|
|
110
|
-
# Customer, you will receive a `404` error response.
|
|
109
|
+
# If you attempt to resend an invitation when the Customer does not exist,
|
|
110
|
+
# you will receive a `404` error response.
|
|
111
111
|
# ## Limitations
|
|
112
112
|
# This endpoint will only return a JSON response.
|
|
113
113
|
# @param [Integer] customer_id Required parameter: The Chargify id of the
|
|
@@ -136,7 +136,7 @@ module AdvancedBilling
|
|
|
136
136
|
.execute
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
-
#
|
|
139
|
+
# Revokes a customer's Billing Portal invitation.
|
|
140
140
|
# If you attempt to revoke an invitation when the Billing Portal is already
|
|
141
141
|
# disabled for a Customer, you will receive a 422 error response.
|
|
142
142
|
# ## Limitations
|
|
@@ -70,8 +70,7 @@ module AdvancedBilling
|
|
|
70
70
|
.execute
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
-
#
|
|
74
|
-
# component.
|
|
73
|
+
# Lists the price points associated with a component.
|
|
75
74
|
# You may specify the component by using either the numeric id or the
|
|
76
75
|
# `handle:gold` syntax.
|
|
77
76
|
# When fetching a component's price points, if you have defined multiple
|
|
@@ -120,8 +119,7 @@ module AdvancedBilling
|
|
|
120
119
|
.execute
|
|
121
120
|
end
|
|
122
121
|
|
|
123
|
-
#
|
|
124
|
-
# request.
|
|
122
|
+
# Creates multiple component price points in one request.
|
|
125
123
|
# @param [String] component_id Required parameter: The Advanced Billing id
|
|
126
124
|
# of the component for which you want to fetch price points.
|
|
127
125
|
# @param [CreateComponentPricePointsRequest] body Optional parameter: TODO:
|
|
@@ -211,8 +209,7 @@ module AdvancedBilling
|
|
|
211
209
|
.execute
|
|
212
210
|
end
|
|
213
211
|
|
|
214
|
-
#
|
|
215
|
-
# prices or editing / removing existing ones.
|
|
212
|
+
# Updates a component price point and its associated prices.
|
|
216
213
|
# Passing in a price bracket without an `id` will attempt to create a new
|
|
217
214
|
# price.
|
|
218
215
|
# Including an `id` will update the corresponding price, and including the
|
|
@@ -266,9 +263,8 @@ module AdvancedBilling
|
|
|
266
263
|
.execute
|
|
267
264
|
end
|
|
268
265
|
|
|
269
|
-
#
|
|
270
|
-
#
|
|
271
|
-
# or handle.
|
|
266
|
+
# Returns details for a specific component price point. You can achieve this
|
|
267
|
+
# by using either the component price point ID or handle.
|
|
272
268
|
# @param [Integer | String] component_id Required parameter: The id or
|
|
273
269
|
# handle of the component. When using the handle, it must be prefixed with
|
|
274
270
|
# `handle:`. Example: `123` for an integer ID, or
|
|
@@ -310,9 +306,9 @@ module AdvancedBilling
|
|
|
310
306
|
.execute
|
|
311
307
|
end
|
|
312
308
|
|
|
313
|
-
#
|
|
314
|
-
#
|
|
315
|
-
#
|
|
309
|
+
# Archives a component price point. Subscriptions using a price point that
|
|
310
|
+
# has been archived will continue using it until they're moved to another
|
|
311
|
+
# price point.
|
|
316
312
|
# @param [Integer | String] component_id Required parameter: The id or
|
|
317
313
|
# handle of the component. When using the handle, it must be prefixed with
|
|
318
314
|
# `handle:`. Example: `123` for an integer ID, or
|
|
@@ -354,7 +350,7 @@ module AdvancedBilling
|
|
|
354
350
|
.execute
|
|
355
351
|
end
|
|
356
352
|
|
|
357
|
-
#
|
|
353
|
+
# Unarchives a component price point.
|
|
358
354
|
# @param [Integer] component_id Required parameter: The Advanced Billing id
|
|
359
355
|
# of the component to which the price point belongs
|
|
360
356
|
# @param [Integer] price_point_id Required parameter: The Advanced Billing
|
|
@@ -380,8 +376,7 @@ module AdvancedBilling
|
|
|
380
376
|
.execute
|
|
381
377
|
end
|
|
382
378
|
|
|
383
|
-
#
|
|
384
|
-
# that has been defined on the site level in your settings.
|
|
379
|
+
# Creates currency prices for a given currency defined at the site level.
|
|
385
380
|
# When creating currency prices, they need to mirror the structure of your
|
|
386
381
|
# primary pricing. For each price level defined on the component price
|
|
387
382
|
# point, there should be a matching price level created in the given
|
|
@@ -416,8 +411,7 @@ module AdvancedBilling
|
|
|
416
411
|
.execute
|
|
417
412
|
end
|
|
418
413
|
|
|
419
|
-
#
|
|
420
|
-
# that has been defined on the site level in your settings.
|
|
414
|
+
# Updates currency prices for a given currency defined at the site level.
|
|
421
415
|
# Note: Currency Prices are not able to be updated for custom price points.
|
|
422
416
|
# @param [Integer] price_point_id Required parameter: The Advanced Billing
|
|
423
417
|
# id of the price point
|
|
@@ -448,8 +442,7 @@ module AdvancedBilling
|
|
|
448
442
|
.execute
|
|
449
443
|
end
|
|
450
444
|
|
|
451
|
-
#
|
|
452
|
-
# to a Site.
|
|
445
|
+
# Lists all component price points belonging to a site.
|
|
453
446
|
# @param [ListComponentsPricePointsInclude] include Optional parameter:
|
|
454
447
|
# Allows including additional data in the response. Use in query:
|
|
455
448
|
# `include=currency_prices`.
|
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
module AdvancedBilling
|
|
7
7
|
# ComponentsController
|
|
8
8
|
class ComponentsController < BaseController
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
# component can then be added and “allocated” for a subscription.
|
|
9
|
+
# Creates a metered component definition under the specified product family.
|
|
10
|
+
# A metered component can then be added and “allocated” for a subscription.
|
|
12
11
|
# Metered components are used to bill for any type of unit that resets to 0
|
|
13
|
-
# at the end of the billing period (think daily Google
|
|
14
|
-
#
|
|
15
|
-
#
|
|
12
|
+
# at the end of the billing period (think daily Google Ads clicks or monthly
|
|
13
|
+
# cell phone minutes). This is most commonly associated with usage-based
|
|
14
|
+
# billing and many other pricing schemes.
|
|
16
15
|
# Note that this is different from recurring quantity-based components,
|
|
17
16
|
# which DO NOT reset to zero at the start of every billing period. If you
|
|
18
17
|
# want to bill for a quantity of something that does not change unless you
|
|
@@ -52,10 +51,10 @@ module AdvancedBilling
|
|
|
52
51
|
.execute
|
|
53
52
|
end
|
|
54
53
|
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
# When defining Quantity Based component,
|
|
54
|
+
# Creates a Quantity Based component definition under the specified product
|
|
55
|
+
# family. A Quantity Based component can then be added and “allocated” for a
|
|
56
|
+
# subscription.
|
|
57
|
+
# When defining a Quantity Based component, you can choose one of 2 types:
|
|
59
58
|
# #### Recurring
|
|
60
59
|
# Recurring quantity-based components are used to bill for the number of
|
|
61
60
|
# some unit (think monthly software user licenses or the number of pairs of
|
|
@@ -102,9 +101,8 @@ module AdvancedBilling
|
|
|
102
101
|
.execute
|
|
103
102
|
end
|
|
104
103
|
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
# can then be added and “allocated” for a subscription.
|
|
104
|
+
# Creates an On/Off component definition under the specified product family.
|
|
105
|
+
# An On/Off component can then be added and “allocated” for a subscription.
|
|
108
106
|
# On/off components are used for any flat fee, recurring add on (think
|
|
109
107
|
# $99/month for tech support or a flat add on shipping fee).
|
|
110
108
|
# For more information on components, see our documentation
|
|
@@ -142,9 +140,9 @@ module AdvancedBilling
|
|
|
142
140
|
.execute
|
|
143
141
|
end
|
|
144
142
|
|
|
145
|
-
#
|
|
146
|
-
#
|
|
147
|
-
#
|
|
143
|
+
# Creates a prepaid usage component definition under the specified product
|
|
144
|
+
# family. A prepaid component can then be added and “allocated” for a
|
|
145
|
+
# subscription.
|
|
148
146
|
# Prepaid components allow customers to pre-purchase units that can be used
|
|
149
147
|
# up over time on their subscription. In a sense, they are the mirror image
|
|
150
148
|
# of metered components; while metered components charge at the end of the
|
|
@@ -186,9 +184,9 @@ module AdvancedBilling
|
|
|
186
184
|
.execute
|
|
187
185
|
end
|
|
188
186
|
|
|
189
|
-
#
|
|
190
|
-
#
|
|
191
|
-
#
|
|
187
|
+
# Creates an event-based component definition under the specified product
|
|
188
|
+
# family. An event-based component can then be added and “allocated” for a
|
|
189
|
+
# subscription.
|
|
192
190
|
# Event-based components are similar to other component types, in that you
|
|
193
191
|
# define the component parameters (such as name and taxability) and the
|
|
194
192
|
# pricing. A key difference for the event-based component is that it must be
|
|
@@ -233,9 +231,9 @@ module AdvancedBilling
|
|
|
233
231
|
.execute
|
|
234
232
|
end
|
|
235
233
|
|
|
236
|
-
#
|
|
237
|
-
#
|
|
238
|
-
#
|
|
234
|
+
# Returns information for a component matching the provided handle. You can
|
|
235
|
+
# identify your components with a handle so you don't have to save or
|
|
236
|
+
# reference the IDs we generate.
|
|
239
237
|
# @param [String] handle Required parameter: The handle of the component to
|
|
240
238
|
# find
|
|
241
239
|
# @return [ComponentResponse] Response from the API call.
|
|
@@ -283,7 +281,7 @@ module AdvancedBilling
|
|
|
283
281
|
.execute
|
|
284
282
|
end
|
|
285
283
|
|
|
286
|
-
#
|
|
284
|
+
# Updates a component from a specific product family.
|
|
287
285
|
# You may read the component by either the component's id or handle. When
|
|
288
286
|
# using the handle, it must be prefixed with `handle:`.
|
|
289
287
|
# @param [Integer] product_family_id Required parameter: The Advanced
|
|
@@ -322,9 +320,8 @@ module AdvancedBilling
|
|
|
322
320
|
.execute
|
|
323
321
|
end
|
|
324
322
|
|
|
325
|
-
#
|
|
326
|
-
#
|
|
327
|
-
# continue to be charged as usual.
|
|
323
|
+
# Archives the component; all current subscribers will continue to be
|
|
324
|
+
# charged as usual.
|
|
328
325
|
# @param [Integer] product_family_id Required parameter: The Advanced
|
|
329
326
|
# Billing id of the product family to which the component belongs
|
|
330
327
|
# @param [String] component_id Required parameter: Either the Advanced
|
|
@@ -355,7 +352,7 @@ module AdvancedBilling
|
|
|
355
352
|
.execute
|
|
356
353
|
end
|
|
357
354
|
|
|
358
|
-
#
|
|
355
|
+
# Lists components for a site.
|
|
359
356
|
# @param [BasicDateField] date_field Optional parameter: The type of filter
|
|
360
357
|
# you would like to apply to your search.
|
|
361
358
|
# @param [String] start_date Optional parameter: The start date (format
|
|
@@ -417,7 +414,7 @@ module AdvancedBilling
|
|
|
417
414
|
.execute
|
|
418
415
|
end
|
|
419
416
|
|
|
420
|
-
#
|
|
417
|
+
# Updates a component.
|
|
421
418
|
# You may read the component by either the component's id or handle. When
|
|
422
419
|
# using the handle, it must be prefixed with `handle:`.
|
|
423
420
|
# @param [String] component_id Required parameter: The id or handle of the
|
|
@@ -449,8 +446,7 @@ module AdvancedBilling
|
|
|
449
446
|
.execute
|
|
450
447
|
end
|
|
451
448
|
|
|
452
|
-
#
|
|
453
|
-
# family.
|
|
449
|
+
# Lists components for a particular product family.
|
|
454
450
|
# @param [Integer] product_family_id Required parameter: The Advanced
|
|
455
451
|
# Billing id of the product family
|
|
456
452
|
# @param [TrueClass | FalseClass] include_archived Optional parameter:
|