maxio-advanced-billing-sdk 4.0.0 → 5.0.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 +45 -45
- data/lib/advanced_billing/configuration.rb +2 -2
- data/lib/advanced_billing/controllers/advance_invoice_controller.rb +24 -24
- data/lib/advanced_billing/controllers/api_exports_controller.rb +57 -57
- data/lib/advanced_billing/controllers/base_controller.rb +10 -10
- data/lib/advanced_billing/controllers/billing_portal_controller.rb +33 -32
- data/lib/advanced_billing/controllers/component_price_points_controller.rb +60 -60
- data/lib/advanced_billing/controllers/components_controller.rb +110 -107
- data/lib/advanced_billing/controllers/coupons_controller.rb +89 -89
- data/lib/advanced_billing/controllers/custom_fields_controller.rb +76 -76
- data/lib/advanced_billing/controllers/customers_controller.rb +45 -41
- data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +53 -53
- data/lib/advanced_billing/controllers/events_controller.rb +16 -15
- data/lib/advanced_billing/controllers/insights_controller.rb +17 -17
- data/lib/advanced_billing/controllers/invoices_controller.rb +99 -99
- data/lib/advanced_billing/controllers/offers_controller.rb +18 -15
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +107 -104
- data/lib/advanced_billing/controllers/product_families_controller.rb +26 -26
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +62 -62
- data/lib/advanced_billing/controllers/products_controller.rb +37 -37
- data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +61 -61
- data/lib/advanced_billing/controllers/reason_codes_controller.rb +35 -35
- data/lib/advanced_billing/controllers/referral_codes_controller.rb +9 -8
- data/lib/advanced_billing/controllers/sales_commissions_controller.rb +13 -13
- data/lib/advanced_billing/controllers/sites_controller.rb +11 -10
- data/lib/advanced_billing/controllers/subscription_components_controller.rb +170 -161
- data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +23 -23
- data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +21 -21
- data/lib/advanced_billing/controllers/subscription_groups_controller.rb +54 -54
- data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +37 -37
- data/lib/advanced_billing/controllers/subscription_notes_controller.rb +20 -16
- data/lib/advanced_billing/controllers/subscription_products_controller.rb +20 -18
- data/lib/advanced_billing/controllers/subscription_status_controller.rb +74 -74
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +163 -160
- data/lib/advanced_billing/controllers/webhooks_controller.rb +45 -44
- data/lib/advanced_billing/exceptions/component_allocation_error_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/component_price_point_error_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/customer_error_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/error_array_map_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/error_list_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/error_string_map_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/event_based_billing_list_segments_errors_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/event_based_billing_segment_errors_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/product_price_point_error_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/proforma_bad_request_error_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/refund_prepayment_base_errors_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/single_error_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/single_string_error_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/subscription_add_coupon_error_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/subscription_component_allocation_error_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/subscription_group_create_error_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/subscription_group_signup_error_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/subscription_remove_coupon_errors_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/subscriptions_mrr_error_response_exception.rb +15 -15
- data/lib/advanced_billing/exceptions/too_many_management_link_requests_error_exception.rb +15 -15
- data/lib/advanced_billing/models/activate_event_based_component.rb +84 -0
- data/lib/advanced_billing/models/{current_vault.rb → all_vaults.rb} +28 -7
- data/lib/advanced_billing/models/allocation.rb +1 -0
- data/lib/advanced_billing/models/allocation_preview_item.rb +1 -0
- data/lib/advanced_billing/models/apple_pay_payment_profile.rb +232 -0
- data/lib/advanced_billing/models/apple_pay_vault.rb +20 -0
- data/lib/advanced_billing/models/bank_account_attributes.rb +2 -0
- data/lib/advanced_billing/models/bank_account_payment_profile.rb +25 -20
- data/lib/advanced_billing/models/bank_account_vault.rb +19 -9
- data/lib/advanced_billing/models/change_invoice_status_event_data.rb +6 -6
- data/lib/advanced_billing/models/component.rb +1 -0
- data/lib/advanced_billing/models/component_custom_price.rb +33 -14
- data/lib/advanced_billing/models/component_price_point_item.rb +3 -1
- data/lib/advanced_billing/models/create_component_price_point.rb +3 -1
- data/lib/advanced_billing/models/create_customer.rb +11 -1
- data/lib/advanced_billing/models/create_metafield.rb +2 -1
- data/lib/advanced_billing/models/create_or_update_product.rb +7 -4
- data/lib/advanced_billing/models/create_payment_profile.rb +1 -1
- data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +6 -5
- data/lib/advanced_billing/models/create_product_price_point.rb +5 -3
- data/lib/advanced_billing/models/create_subscription.rb +27 -25
- data/lib/advanced_billing/models/credit_card_payment_profile.rb +17 -16
- data/lib/advanced_billing/models/credit_card_vault.rb +117 -0
- data/lib/advanced_billing/models/credit_note.rb +2 -2
- data/lib/advanced_billing/models/customer.rb +11 -1
- data/lib/advanced_billing/models/customer_attributes.rb +12 -1
- data/lib/advanced_billing/models/ebb_component.rb +1 -0
- data/lib/advanced_billing/models/{extended_interval_unit.rb → expiration_interval_unit.rb} +4 -4
- data/lib/advanced_billing/models/full_subscription_group_response.rb +65 -50
- data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +1 -1
- data/lib/advanced_billing/models/invoice.rb +19 -9
- data/lib/advanced_billing/models/invoice_consolidation_level.rb +2 -2
- data/lib/advanced_billing/models/invoice_refund.rb +13 -1
- data/lib/advanced_billing/models/invoice_status.rb +2 -2
- data/lib/advanced_billing/models/invoice_tax.rb +29 -0
- data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +101 -1
- data/lib/advanced_billing/models/issue_invoice_event_data.rb +6 -6
- data/lib/advanced_billing/models/metered_component.rb +4 -3
- data/lib/advanced_billing/models/offer_item.rb +3 -1
- data/lib/advanced_billing/models/on_off_component.rb +3 -2
- data/lib/advanced_billing/models/paid_invoice.rb +2 -2
- data/lib/advanced_billing/models/pay_pal_vault.rb +29 -0
- data/lib/advanced_billing/models/payment_profile_attributes.rb +5 -5
- data/lib/advanced_billing/models/payment_profile_response.rb +3 -3
- data/lib/advanced_billing/models/payment_type.rb +4 -1
- data/lib/advanced_billing/models/paypal_payment_profile.rb +242 -0
- data/lib/advanced_billing/models/prepaid_usage_component.rb +5 -4
- data/lib/advanced_billing/models/product.rb +2 -2
- data/lib/advanced_billing/models/product_price_point.rb +2 -2
- data/lib/advanced_billing/models/proforma_invoice.rb +6 -6
- data/lib/advanced_billing/models/quantity_based_component.rb +4 -3
- data/lib/advanced_billing/models/refund_invoice_event_data.rb +4 -4
- data/lib/advanced_billing/models/resent_invitation.rb +36 -0
- data/lib/advanced_billing/models/subscription.rb +13 -10
- data/lib/advanced_billing/models/subscription_component.rb +1 -0
- data/lib/advanced_billing/models/subscription_component_subscription.rb +26 -20
- data/lib/advanced_billing/models/subscription_custom_price.rb +5 -2
- data/lib/advanced_billing/models/subscription_group_bank_account.rb +2 -0
- data/lib/advanced_billing/models/subscription_group_credit_card.rb +1 -1
- data/lib/advanced_billing/models/subscription_group_signup_response.rb +39 -30
- data/lib/advanced_billing/models/subscription_state.rb +30 -30
- data/lib/advanced_billing/models/tax_configuration.rb +1 -2
- data/lib/advanced_billing/models/update_component_price_point.rb +3 -1
- data/lib/advanced_billing/models/update_customer.rb +12 -1
- data/lib/advanced_billing/models/update_payment_profile.rb +1 -1
- data/lib/advanced_billing/utilities/file_wrapper.rb +9 -9
- data/lib/advanced_billing/utilities/union_type_lookup.rb +17 -3
- data/lib/advanced_billing.rb +10 -4
- metadata +16 -10
@@ -7,8 +7,8 @@ module AdvancedBilling
|
|
7
7
|
# ProductPricePointsController
|
8
8
|
class ProductPricePointsController < BaseController
|
9
9
|
# [Product Price Point
|
10
|
-
# Documentation](https://
|
11
|
-
#
|
10
|
+
# Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-
|
11
|
+
# Product-Price-Points)
|
12
12
|
# @param [Integer | String] product_id Required parameter: The id or handle
|
13
13
|
# of the product. When using the handle, it must be prefixed with
|
14
14
|
# `handle:`
|
@@ -34,12 +34,12 @@ module AdvancedBilling
|
|
34
34
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
35
35
|
.auth(Single.new('BasicAuth')))
|
36
36
|
.response(new_response_handler
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
38
|
+
.deserialize_into(ProductPricePointResponse.method(:from_hash))
|
39
|
+
.local_error_template('422',
|
40
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
41
|
+
' Response: \'{$response.body}\'.',
|
42
|
+
ProductPricePointErrorResponseException))
|
43
43
|
.execute
|
44
44
|
end
|
45
45
|
|
@@ -88,8 +88,8 @@ module AdvancedBilling
|
|
88
88
|
.auth(Single.new('BasicAuth'))
|
89
89
|
.array_serialization_format(ArraySerializationFormat::CSV))
|
90
90
|
.response(new_response_handler
|
91
|
-
|
92
|
-
|
91
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
92
|
+
.deserialize_into(ListProductPricePointsResponse.method(:from_hash)))
|
93
93
|
.execute
|
94
94
|
end
|
95
95
|
|
@@ -133,8 +133,8 @@ module AdvancedBilling
|
|
133
133
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
134
134
|
.auth(Single.new('BasicAuth')))
|
135
135
|
.response(new_response_handler
|
136
|
-
|
137
|
-
|
136
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
137
|
+
.deserialize_into(ProductPricePointResponse.method(:from_hash)))
|
138
138
|
.execute
|
139
139
|
end
|
140
140
|
|
@@ -181,8 +181,8 @@ module AdvancedBilling
|
|
181
181
|
.header_param(new_parameter('application/json', key: 'accept'))
|
182
182
|
.auth(Single.new('BasicAuth')))
|
183
183
|
.response(new_response_handler
|
184
|
-
|
185
|
-
|
184
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
185
|
+
.deserialize_into(ProductPricePointResponse.method(:from_hash)))
|
186
186
|
.execute
|
187
187
|
end
|
188
188
|
|
@@ -219,20 +219,20 @@ module AdvancedBilling
|
|
219
219
|
.header_param(new_parameter('application/json', key: 'accept'))
|
220
220
|
.auth(Single.new('BasicAuth')))
|
221
221
|
.response(new_response_handler
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
222
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
223
|
+
.deserialize_into(ProductPricePointResponse.method(:from_hash))
|
224
|
+
.local_error_template('422',
|
225
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
226
|
+
' Response: \'{$response.body}\'.',
|
227
|
+
ErrorListResponseException))
|
228
228
|
.execute
|
229
229
|
end
|
230
230
|
|
231
231
|
# Use this endpoint to unarchive an archived product price point.
|
232
|
-
# @param [Integer] product_id Required parameter: The
|
233
|
-
# product to which the price point belongs
|
234
|
-
# @param [Integer] price_point_id Required parameter: The
|
235
|
-
# product price point
|
232
|
+
# @param [Integer] product_id Required parameter: The Advanced Billing id of
|
233
|
+
# the product to which the price point belongs
|
234
|
+
# @param [Integer] price_point_id Required parameter: The Advanced Billing
|
235
|
+
# id of the product price point
|
236
236
|
# @return [ProductPricePointResponse] response from the API call
|
237
237
|
def unarchive_product_price_point(product_id,
|
238
238
|
price_point_id)
|
@@ -249,8 +249,8 @@ module AdvancedBilling
|
|
249
249
|
.header_param(new_parameter('application/json', key: 'accept'))
|
250
250
|
.auth(Single.new('BasicAuth')))
|
251
251
|
.response(new_response_handler
|
252
|
-
|
253
|
-
|
252
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
253
|
+
.deserialize_into(ProductPricePointResponse.method(:from_hash)))
|
254
254
|
.execute
|
255
255
|
end
|
256
256
|
|
@@ -258,10 +258,10 @@ module AdvancedBilling
|
|
258
258
|
# product.
|
259
259
|
# Note: Custom product price points are not able to be set as the default
|
260
260
|
# for a product.
|
261
|
-
# @param [Integer] product_id Required parameter: The
|
262
|
-
# product to which the price point belongs
|
263
|
-
# @param [Integer] price_point_id Required parameter: The
|
264
|
-
# product price point
|
261
|
+
# @param [Integer] product_id Required parameter: The Advanced Billing id of
|
262
|
+
# the product to which the price point belongs
|
263
|
+
# @param [Integer] price_point_id Required parameter: The Advanced Billing
|
264
|
+
# id of the product price point
|
265
265
|
# @return [ProductResponse] response from the API call
|
266
266
|
def promote_product_price_point_to_default(product_id,
|
267
267
|
price_point_id)
|
@@ -278,14 +278,14 @@ module AdvancedBilling
|
|
278
278
|
.header_param(new_parameter('application/json', key: 'accept'))
|
279
279
|
.auth(Single.new('BasicAuth')))
|
280
280
|
.response(new_response_handler
|
281
|
-
|
282
|
-
|
281
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
282
|
+
.deserialize_into(ProductResponse.method(:from_hash)))
|
283
283
|
.execute
|
284
284
|
end
|
285
285
|
|
286
286
|
# Use this endpoint to create multiple product price points in one request.
|
287
|
-
# @param [Integer] product_id Required parameter: The
|
288
|
-
# product to which the price points belong
|
287
|
+
# @param [Integer] product_id Required parameter: The Advanced Billing id of
|
288
|
+
# the product to which the price points belong
|
289
289
|
# @param [BulkCreateProductPricePointsRequest] body Optional parameter:
|
290
290
|
# Example:
|
291
291
|
# @return [BulkCreateProductPricePointsResponse] response from the API call
|
@@ -304,12 +304,12 @@ module AdvancedBilling
|
|
304
304
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
305
305
|
.auth(Single.new('BasicAuth')))
|
306
306
|
.response(new_response_handler
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
307
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
308
|
+
.deserialize_into(BulkCreateProductPricePointsResponse.method(:from_hash))
|
309
|
+
.local_error_template('422',
|
310
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
311
|
+
' Response: \'{$response.body}\'.',
|
312
|
+
APIException))
|
313
313
|
.execute
|
314
314
|
end
|
315
315
|
|
@@ -320,8 +320,8 @@ module AdvancedBilling
|
|
320
320
|
# fee, each currency must also define a trial and/or setup fee.
|
321
321
|
# Note: Currency Prices are not able to be created for custom product price
|
322
322
|
# points.
|
323
|
-
# @param [Integer] product_price_point_id Required parameter: The
|
324
|
-
# id of the product price point
|
323
|
+
# @param [Integer] product_price_point_id Required parameter: The Advanced
|
324
|
+
# Billing id of the product price point
|
325
325
|
# @param [CreateProductCurrencyPricesRequest] body Optional parameter:
|
326
326
|
# Example:
|
327
327
|
# @return [CurrencyPricesResponse] response from the API call
|
@@ -340,12 +340,12 @@ module AdvancedBilling
|
|
340
340
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
341
341
|
.auth(Single.new('BasicAuth')))
|
342
342
|
.response(new_response_handler
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
343
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
344
|
+
.deserialize_into(CurrencyPricesResponse.method(:from_hash))
|
345
|
+
.local_error_template('422',
|
346
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
347
|
+
' Response: \'{$response.body}\'.',
|
348
|
+
ErrorArrayMapResponseException))
|
349
349
|
.execute
|
350
350
|
end
|
351
351
|
|
@@ -356,8 +356,8 @@ module AdvancedBilling
|
|
356
356
|
# fee, each currency must also define a trial and/or setup fee.
|
357
357
|
# Note: Currency Prices are not able to be updated for custom product price
|
358
358
|
# points.
|
359
|
-
# @param [Integer] product_price_point_id Required parameter: The
|
360
|
-
# id of the product price point
|
359
|
+
# @param [Integer] product_price_point_id Required parameter: The Advanced
|
360
|
+
# Billing id of the product price point
|
361
361
|
# @param [UpdateCurrencyPricesRequest] body Optional parameter: Example:
|
362
362
|
# @return [CurrencyPricesResponse] response from the API call
|
363
363
|
def update_product_currency_prices(product_price_point_id,
|
@@ -375,12 +375,12 @@ module AdvancedBilling
|
|
375
375
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
376
376
|
.auth(Single.new('BasicAuth')))
|
377
377
|
.response(new_response_handler
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
378
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
379
|
+
.deserialize_into(CurrencyPricesResponse.method(:from_hash))
|
380
|
+
.local_error_template('422',
|
381
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
382
|
+
' Response: \'{$response.body}\'.',
|
383
|
+
ErrorArrayMapResponseException))
|
384
384
|
.execute
|
385
385
|
end
|
386
386
|
|
@@ -419,12 +419,12 @@ module AdvancedBilling
|
|
419
419
|
.auth(Single.new('BasicAuth'))
|
420
420
|
.array_serialization_format(ArraySerializationFormat::CSV))
|
421
421
|
.response(new_response_handler
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
422
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
423
|
+
.deserialize_into(ListProductPricePointsResponse.method(:from_hash))
|
424
|
+
.local_error_template('422',
|
425
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
426
|
+
' Response: \'{$response.body}\'.',
|
427
|
+
ErrorListResponseException))
|
428
428
|
.execute
|
429
429
|
end
|
430
430
|
end
|
@@ -6,13 +6,13 @@
|
|
6
6
|
module AdvancedBilling
|
7
7
|
# ProductsController
|
8
8
|
class ProductsController < BaseController
|
9
|
-
# Use this method to create a product within your
|
9
|
+
# Use this method to create a product within your Advanced Billing site.
|
10
10
|
# + [Products
|
11
|
-
# Documentation](https://maxio
|
12
|
-
#
|
11
|
+
# Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-
|
12
|
+
# Products-Overview)
|
13
13
|
# + [Changing a Subscription's
|
14
|
-
# Product](https://maxio
|
15
|
-
#
|
14
|
+
# Product](https://maxio.zendesk.com/hc/en-us/articles/24252069837581-Produc
|
15
|
+
# t-Changes-and-Migrations)
|
16
16
|
# @param [String] product_family_id Required parameter: Either the product
|
17
17
|
# family's id or its handle prefixed with `handle:`
|
18
18
|
# @param [CreateOrUpdateProductRequest] body Optional parameter: Example:
|
@@ -32,19 +32,19 @@ module AdvancedBilling
|
|
32
32
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
33
33
|
.auth(Single.new('BasicAuth')))
|
34
34
|
.response(new_response_handler
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
35
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
36
|
+
.deserialize_into(ProductResponse.method(:from_hash))
|
37
|
+
.local_error_template('422',
|
38
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
39
|
+
' Response: \'{$response.body}\'.',
|
40
|
+
ErrorListResponseException))
|
41
41
|
.execute
|
42
42
|
end
|
43
43
|
|
44
44
|
# This endpoint allows you to read the current details of a product that
|
45
|
-
# you've created in
|
46
|
-
# @param [Integer] product_id Required parameter: The
|
47
|
-
# product
|
45
|
+
# you've created in Advanced Billing.
|
46
|
+
# @param [Integer] product_id Required parameter: The Advanced Billing id of
|
47
|
+
# the product
|
48
48
|
# @return [ProductResponse] response from the API call
|
49
49
|
def read_product(product_id)
|
50
50
|
new_api_call_builder
|
@@ -57,8 +57,8 @@ module AdvancedBilling
|
|
57
57
|
.header_param(new_parameter('application/json', key: 'accept'))
|
58
58
|
.auth(Single.new('BasicAuth')))
|
59
59
|
.response(new_response_handler
|
60
|
-
|
61
|
-
|
60
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
61
|
+
.deserialize_into(ProductResponse.method(:from_hash)))
|
62
62
|
.execute
|
63
63
|
end
|
64
64
|
|
@@ -70,8 +70,8 @@ module AdvancedBilling
|
|
70
70
|
# Updating a product using this endpoint will create a new price point and
|
71
71
|
# set it as the default price point for this product. If you should like to
|
72
72
|
# update an existing product price point, that must be done separately.
|
73
|
-
# @param [Integer] product_id Required parameter: The
|
74
|
-
# product
|
73
|
+
# @param [Integer] product_id Required parameter: The Advanced Billing id of
|
74
|
+
# the product
|
75
75
|
# @param [CreateOrUpdateProductRequest] body Optional parameter: Example:
|
76
76
|
# @return [ProductResponse] response from the API call
|
77
77
|
def update_product(product_id,
|
@@ -89,12 +89,12 @@ module AdvancedBilling
|
|
89
89
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
90
90
|
.auth(Single.new('BasicAuth')))
|
91
91
|
.response(new_response_handler
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
92
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
93
|
+
.deserialize_into(ProductResponse.method(:from_hash))
|
94
|
+
.local_error_template('422',
|
95
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
96
|
+
' Response: \'{$response.body}\'.',
|
97
|
+
ErrorListResponseException))
|
98
98
|
.execute
|
99
99
|
end
|
100
100
|
|
@@ -103,8 +103,8 @@ module AdvancedBilling
|
|
103
103
|
# continue to be charged monthly.
|
104
104
|
# This will restrict the option to chose the product for purchase via the
|
105
105
|
# Billing Portal, as well as disable Public Signup Pages for the product.
|
106
|
-
# @param [Integer] product_id Required parameter: The
|
107
|
-
# product
|
106
|
+
# @param [Integer] product_id Required parameter: The Advanced Billing id of
|
107
|
+
# the product
|
108
108
|
# @return [ProductResponse] response from the API call
|
109
109
|
def archive_product(product_id)
|
110
110
|
new_api_call_builder
|
@@ -117,12 +117,12 @@ module AdvancedBilling
|
|
117
117
|
.header_param(new_parameter('application/json', key: 'accept'))
|
118
118
|
.auth(Single.new('BasicAuth')))
|
119
119
|
.response(new_response_handler
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
120
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
121
|
+
.deserialize_into(ProductResponse.method(:from_hash))
|
122
|
+
.local_error_template('422',
|
123
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
124
|
+
' Response: \'{$response.body}\'.',
|
125
|
+
ErrorListResponseException))
|
126
126
|
.execute
|
127
127
|
end
|
128
128
|
|
@@ -140,8 +140,8 @@ module AdvancedBilling
|
|
140
140
|
.header_param(new_parameter('application/json', key: 'accept'))
|
141
141
|
.auth(Single.new('BasicAuth')))
|
142
142
|
.response(new_response_handler
|
143
|
-
|
144
|
-
|
143
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
144
|
+
.deserialize_into(ProductResponse.method(:from_hash)))
|
145
145
|
.execute
|
146
146
|
end
|
147
147
|
|
@@ -206,9 +206,9 @@ module AdvancedBilling
|
|
206
206
|
.auth(Single.new('BasicAuth'))
|
207
207
|
.array_serialization_format(ArraySerializationFormat::CSV))
|
208
208
|
.response(new_response_handler
|
209
|
-
|
210
|
-
|
211
|
-
|
209
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
210
|
+
.deserialize_into(ProductResponse.method(:from_hash))
|
211
|
+
.is_response_array(true))
|
212
212
|
.execute
|
213
213
|
end
|
214
214
|
end
|
@@ -30,11 +30,11 @@ module AdvancedBilling
|
|
30
30
|
.should_encode(true))
|
31
31
|
.auth(Single.new('BasicAuth')))
|
32
32
|
.response(new_response_handler
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
.is_response_void(true)
|
34
|
+
.local_error_template('422',
|
35
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
36
|
+
' Response: \'{$response.body}\'.',
|
37
|
+
ErrorListResponseException))
|
38
38
|
.execute
|
39
39
|
end
|
40
40
|
|
@@ -76,11 +76,11 @@ module AdvancedBilling
|
|
76
76
|
.header_param(new_parameter('application/json', key: 'accept'))
|
77
77
|
.auth(Single.new('BasicAuth')))
|
78
78
|
.response(new_response_handler
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
80
|
+
.deserialize_into(ListProformaInvoicesResponse.method(:from_hash))
|
81
|
+
.local_error_template('404',
|
82
|
+
'Not Found:\'{$response.body}\'',
|
83
|
+
APIException))
|
84
84
|
.execute
|
85
85
|
end
|
86
86
|
|
@@ -101,11 +101,11 @@ module AdvancedBilling
|
|
101
101
|
.header_param(new_parameter('application/json', key: 'accept'))
|
102
102
|
.auth(Single.new('BasicAuth')))
|
103
103
|
.response(new_response_handler
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
104
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
105
|
+
.deserialize_into(ProformaInvoice.method(:from_hash))
|
106
|
+
.local_error_template('404',
|
107
|
+
'Not Found:\'{$response.body}\'',
|
108
|
+
APIException))
|
109
109
|
.execute
|
110
110
|
end
|
111
111
|
|
@@ -132,12 +132,12 @@ module AdvancedBilling
|
|
132
132
|
.header_param(new_parameter('application/json', key: 'accept'))
|
133
133
|
.auth(Single.new('BasicAuth')))
|
134
134
|
.response(new_response_handler
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
135
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
136
|
+
.deserialize_into(ProformaInvoice.method(:from_hash))
|
137
|
+
.local_error_template('422',
|
138
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
139
|
+
' Response: \'{$response.body}\'.',
|
140
|
+
ErrorListResponseException))
|
141
141
|
.execute
|
142
142
|
end
|
143
143
|
|
@@ -203,8 +203,8 @@ module AdvancedBilling
|
|
203
203
|
.header_param(new_parameter('application/json', key: 'accept'))
|
204
204
|
.auth(Single.new('BasicAuth')))
|
205
205
|
.response(new_response_handler
|
206
|
-
|
207
|
-
|
206
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
207
|
+
.deserialize_into(ListProformaInvoicesResponse.method(:from_hash)))
|
208
208
|
.execute
|
209
209
|
end
|
210
210
|
|
@@ -236,15 +236,15 @@ module AdvancedBilling
|
|
236
236
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
237
237
|
.auth(Single.new('BasicAuth')))
|
238
238
|
.response(new_response_handler
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
239
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
240
|
+
.deserialize_into(ProformaInvoice.method(:from_hash))
|
241
|
+
.local_error_template('404',
|
242
|
+
'Not Found:\'{$response.body}\'',
|
243
|
+
APIException)
|
244
|
+
.local_error_template('422',
|
245
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
246
|
+
' Response: \'{$response.body}\'.',
|
247
|
+
ErrorListResponseException))
|
248
248
|
.execute
|
249
249
|
end
|
250
250
|
|
@@ -279,15 +279,15 @@ module AdvancedBilling
|
|
279
279
|
.header_param(new_parameter('application/json', key: 'accept'))
|
280
280
|
.auth(Single.new('BasicAuth')))
|
281
281
|
.response(new_response_handler
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
282
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
283
|
+
.deserialize_into(ProformaInvoice.method(:from_hash))
|
284
|
+
.local_error_template('404',
|
285
|
+
'Not Found:\'{$response.body}\'',
|
286
|
+
APIException)
|
287
|
+
.local_error_template('422',
|
288
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
289
|
+
' Response: \'{$response.body}\'.',
|
290
|
+
ErrorListResponseException))
|
291
291
|
.execute
|
292
292
|
end
|
293
293
|
|
@@ -318,16 +318,16 @@ module AdvancedBilling
|
|
318
318
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
319
319
|
.auth(Single.new('BasicAuth')))
|
320
320
|
.response(new_response_handler
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
321
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
322
|
+
.deserialize_into(ProformaInvoice.method(:from_hash))
|
323
|
+
.local_error_template('400',
|
324
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
325
|
+
' Response: \'{$response.body}\'.',
|
326
|
+
ProformaBadRequestErrorResponseException)
|
327
|
+
.local_error_template('422',
|
328
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
329
|
+
' Response: \'{$response.body}\'.',
|
330
|
+
ErrorArrayMapResponseException))
|
331
331
|
.execute
|
332
332
|
end
|
333
333
|
|
@@ -362,16 +362,16 @@ module AdvancedBilling
|
|
362
362
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
363
363
|
.auth(Single.new('BasicAuth')))
|
364
364
|
.response(new_response_handler
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
365
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
366
|
+
.deserialize_into(SignupProformaPreviewResponse.method(:from_hash))
|
367
|
+
.local_error_template('400',
|
368
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
369
|
+
' Response: \'{$response.body}\'.',
|
370
|
+
ProformaBadRequestErrorResponseException)
|
371
|
+
.local_error_template('422',
|
372
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
373
|
+
' Response: \'{$response.body}\'.',
|
374
|
+
ErrorArrayMapResponseException))
|
375
375
|
.execute
|
376
376
|
end
|
377
377
|
end
|