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.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -45
  3. data/lib/advanced_billing/configuration.rb +2 -2
  4. data/lib/advanced_billing/controllers/advance_invoice_controller.rb +24 -24
  5. data/lib/advanced_billing/controllers/api_exports_controller.rb +57 -57
  6. data/lib/advanced_billing/controllers/base_controller.rb +10 -10
  7. data/lib/advanced_billing/controllers/billing_portal_controller.rb +33 -32
  8. data/lib/advanced_billing/controllers/component_price_points_controller.rb +60 -60
  9. data/lib/advanced_billing/controllers/components_controller.rb +110 -107
  10. data/lib/advanced_billing/controllers/coupons_controller.rb +89 -89
  11. data/lib/advanced_billing/controllers/custom_fields_controller.rb +76 -76
  12. data/lib/advanced_billing/controllers/customers_controller.rb +45 -41
  13. data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +53 -53
  14. data/lib/advanced_billing/controllers/events_controller.rb +16 -15
  15. data/lib/advanced_billing/controllers/insights_controller.rb +17 -17
  16. data/lib/advanced_billing/controllers/invoices_controller.rb +99 -99
  17. data/lib/advanced_billing/controllers/offers_controller.rb +18 -15
  18. data/lib/advanced_billing/controllers/payment_profiles_controller.rb +107 -104
  19. data/lib/advanced_billing/controllers/product_families_controller.rb +26 -26
  20. data/lib/advanced_billing/controllers/product_price_points_controller.rb +62 -62
  21. data/lib/advanced_billing/controllers/products_controller.rb +37 -37
  22. data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +61 -61
  23. data/lib/advanced_billing/controllers/reason_codes_controller.rb +35 -35
  24. data/lib/advanced_billing/controllers/referral_codes_controller.rb +9 -8
  25. data/lib/advanced_billing/controllers/sales_commissions_controller.rb +13 -13
  26. data/lib/advanced_billing/controllers/sites_controller.rb +11 -10
  27. data/lib/advanced_billing/controllers/subscription_components_controller.rb +170 -161
  28. data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +23 -23
  29. data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +21 -21
  30. data/lib/advanced_billing/controllers/subscription_groups_controller.rb +54 -54
  31. data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +37 -37
  32. data/lib/advanced_billing/controllers/subscription_notes_controller.rb +20 -16
  33. data/lib/advanced_billing/controllers/subscription_products_controller.rb +20 -18
  34. data/lib/advanced_billing/controllers/subscription_status_controller.rb +74 -74
  35. data/lib/advanced_billing/controllers/subscriptions_controller.rb +163 -160
  36. data/lib/advanced_billing/controllers/webhooks_controller.rb +45 -44
  37. data/lib/advanced_billing/exceptions/component_allocation_error_exception.rb +15 -15
  38. data/lib/advanced_billing/exceptions/component_price_point_error_exception.rb +15 -15
  39. data/lib/advanced_billing/exceptions/customer_error_response_exception.rb +15 -15
  40. data/lib/advanced_billing/exceptions/error_array_map_response_exception.rb +15 -15
  41. data/lib/advanced_billing/exceptions/error_list_response_exception.rb +15 -15
  42. data/lib/advanced_billing/exceptions/error_string_map_response_exception.rb +15 -15
  43. data/lib/advanced_billing/exceptions/event_based_billing_list_segments_errors_exception.rb +15 -15
  44. data/lib/advanced_billing/exceptions/event_based_billing_segment_errors_exception.rb +15 -15
  45. data/lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb +15 -15
  46. data/lib/advanced_billing/exceptions/product_price_point_error_response_exception.rb +15 -15
  47. data/lib/advanced_billing/exceptions/proforma_bad_request_error_response_exception.rb +15 -15
  48. data/lib/advanced_billing/exceptions/refund_prepayment_base_errors_response_exception.rb +15 -15
  49. data/lib/advanced_billing/exceptions/single_error_response_exception.rb +15 -15
  50. data/lib/advanced_billing/exceptions/single_string_error_response_exception.rb +15 -15
  51. data/lib/advanced_billing/exceptions/subscription_add_coupon_error_exception.rb +15 -15
  52. data/lib/advanced_billing/exceptions/subscription_component_allocation_error_exception.rb +15 -15
  53. data/lib/advanced_billing/exceptions/subscription_group_create_error_response_exception.rb +15 -15
  54. data/lib/advanced_billing/exceptions/subscription_group_signup_error_response_exception.rb +15 -15
  55. data/lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb +15 -15
  56. data/lib/advanced_billing/exceptions/subscription_remove_coupon_errors_exception.rb +15 -15
  57. data/lib/advanced_billing/exceptions/subscriptions_mrr_error_response_exception.rb +15 -15
  58. data/lib/advanced_billing/exceptions/too_many_management_link_requests_error_exception.rb +15 -15
  59. data/lib/advanced_billing/models/activate_event_based_component.rb +84 -0
  60. data/lib/advanced_billing/models/{current_vault.rb → all_vaults.rb} +28 -7
  61. data/lib/advanced_billing/models/allocation.rb +1 -0
  62. data/lib/advanced_billing/models/allocation_preview_item.rb +1 -0
  63. data/lib/advanced_billing/models/apple_pay_payment_profile.rb +232 -0
  64. data/lib/advanced_billing/models/apple_pay_vault.rb +20 -0
  65. data/lib/advanced_billing/models/bank_account_attributes.rb +2 -0
  66. data/lib/advanced_billing/models/bank_account_payment_profile.rb +25 -20
  67. data/lib/advanced_billing/models/bank_account_vault.rb +19 -9
  68. data/lib/advanced_billing/models/change_invoice_status_event_data.rb +6 -6
  69. data/lib/advanced_billing/models/component.rb +1 -0
  70. data/lib/advanced_billing/models/component_custom_price.rb +33 -14
  71. data/lib/advanced_billing/models/component_price_point_item.rb +3 -1
  72. data/lib/advanced_billing/models/create_component_price_point.rb +3 -1
  73. data/lib/advanced_billing/models/create_customer.rb +11 -1
  74. data/lib/advanced_billing/models/create_metafield.rb +2 -1
  75. data/lib/advanced_billing/models/create_or_update_product.rb +7 -4
  76. data/lib/advanced_billing/models/create_payment_profile.rb +1 -1
  77. data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +6 -5
  78. data/lib/advanced_billing/models/create_product_price_point.rb +5 -3
  79. data/lib/advanced_billing/models/create_subscription.rb +27 -25
  80. data/lib/advanced_billing/models/credit_card_payment_profile.rb +17 -16
  81. data/lib/advanced_billing/models/credit_card_vault.rb +117 -0
  82. data/lib/advanced_billing/models/credit_note.rb +2 -2
  83. data/lib/advanced_billing/models/customer.rb +11 -1
  84. data/lib/advanced_billing/models/customer_attributes.rb +12 -1
  85. data/lib/advanced_billing/models/ebb_component.rb +1 -0
  86. data/lib/advanced_billing/models/{extended_interval_unit.rb → expiration_interval_unit.rb} +4 -4
  87. data/lib/advanced_billing/models/full_subscription_group_response.rb +65 -50
  88. data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +1 -1
  89. data/lib/advanced_billing/models/invoice.rb +19 -9
  90. data/lib/advanced_billing/models/invoice_consolidation_level.rb +2 -2
  91. data/lib/advanced_billing/models/invoice_refund.rb +13 -1
  92. data/lib/advanced_billing/models/invoice_status.rb +2 -2
  93. data/lib/advanced_billing/models/invoice_tax.rb +29 -0
  94. data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +101 -1
  95. data/lib/advanced_billing/models/issue_invoice_event_data.rb +6 -6
  96. data/lib/advanced_billing/models/metered_component.rb +4 -3
  97. data/lib/advanced_billing/models/offer_item.rb +3 -1
  98. data/lib/advanced_billing/models/on_off_component.rb +3 -2
  99. data/lib/advanced_billing/models/paid_invoice.rb +2 -2
  100. data/lib/advanced_billing/models/pay_pal_vault.rb +29 -0
  101. data/lib/advanced_billing/models/payment_profile_attributes.rb +5 -5
  102. data/lib/advanced_billing/models/payment_profile_response.rb +3 -3
  103. data/lib/advanced_billing/models/payment_type.rb +4 -1
  104. data/lib/advanced_billing/models/paypal_payment_profile.rb +242 -0
  105. data/lib/advanced_billing/models/prepaid_usage_component.rb +5 -4
  106. data/lib/advanced_billing/models/product.rb +2 -2
  107. data/lib/advanced_billing/models/product_price_point.rb +2 -2
  108. data/lib/advanced_billing/models/proforma_invoice.rb +6 -6
  109. data/lib/advanced_billing/models/quantity_based_component.rb +4 -3
  110. data/lib/advanced_billing/models/refund_invoice_event_data.rb +4 -4
  111. data/lib/advanced_billing/models/resent_invitation.rb +36 -0
  112. data/lib/advanced_billing/models/subscription.rb +13 -10
  113. data/lib/advanced_billing/models/subscription_component.rb +1 -0
  114. data/lib/advanced_billing/models/subscription_component_subscription.rb +26 -20
  115. data/lib/advanced_billing/models/subscription_custom_price.rb +5 -2
  116. data/lib/advanced_billing/models/subscription_group_bank_account.rb +2 -0
  117. data/lib/advanced_billing/models/subscription_group_credit_card.rb +1 -1
  118. data/lib/advanced_billing/models/subscription_group_signup_response.rb +39 -30
  119. data/lib/advanced_billing/models/subscription_state.rb +30 -30
  120. data/lib/advanced_billing/models/tax_configuration.rb +1 -2
  121. data/lib/advanced_billing/models/update_component_price_point.rb +3 -1
  122. data/lib/advanced_billing/models/update_customer.rb +12 -1
  123. data/lib/advanced_billing/models/update_payment_profile.rb +1 -1
  124. data/lib/advanced_billing/utilities/file_wrapper.rb +9 -9
  125. data/lib/advanced_billing/utilities/union_type_lookup.rb +17 -3
  126. data/lib/advanced_billing.rb +10 -4
  127. metadata +16 -10
@@ -10,15 +10,15 @@ module AdvancedBilling
10
10
  # apply to all new subscriptions going forward - existing subscriptions will
11
11
  # remain on their current price point.
12
12
  # See [Price Points
13
- # Documentation](https://chargify.zendesk.com/hc/en-us/articles/440775586588
14
- # 3#price-points) for more information on price points and moving
13
+ # Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261191737101-
14
+ # Price-Points-Components) for more information on price points and moving
15
15
  # subscriptions between price points.
16
16
  # Note: Custom price points are not able to be set as the default for a
17
17
  # component.
18
- # @param [Integer] component_id Required parameter: The Chargify id of the
19
- # component to which the price point belongs
20
- # @param [Integer] price_point_id Required parameter: The Chargify id of the
21
- # price point
18
+ # @param [Integer] component_id Required parameter: The Advanced Billing id
19
+ # of the component to which the price point belongs
20
+ # @param [Integer] price_point_id Required parameter: The Advanced Billing
21
+ # id of the price point
22
22
  # @return [ComponentResponse] response from the API call
23
23
  def promote_component_price_point_to_default(component_id,
24
24
  price_point_id)
@@ -35,15 +35,15 @@ module AdvancedBilling
35
35
  .header_param(new_parameter('application/json', key: 'accept'))
36
36
  .auth(Single.new('BasicAuth')))
37
37
  .response(new_response_handler
38
- .deserializer(APIHelper.method(:custom_type_deserializer))
39
- .deserialize_into(ComponentResponse.method(:from_hash)))
38
+ .deserializer(APIHelper.method(:custom_type_deserializer))
39
+ .deserialize_into(ComponentResponse.method(:from_hash)))
40
40
  .execute
41
41
  end
42
42
 
43
43
  # This endpoint can be used to create a new price point for an existing
44
44
  # component.
45
- # @param [Integer] component_id Required parameter: The Chargify id of the
46
- # component
45
+ # @param [Integer] component_id Required parameter: The Advanced Billing id
46
+ # of the component
47
47
  # @param [CreateComponentPricePointRequest] body Optional parameter:
48
48
  # Example:
49
49
  # @return [ComponentPricePointResponse] response from the API call
@@ -62,8 +62,8 @@ module AdvancedBilling
62
62
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
63
63
  .auth(Single.new('BasicAuth')))
64
64
  .response(new_response_handler
65
- .deserializer(APIHelper.method(:custom_type_deserializer))
66
- .deserialize_into(ComponentPricePointResponse.method(:from_hash)))
65
+ .deserializer(APIHelper.method(:custom_type_deserializer))
66
+ .deserialize_into(ComponentPricePointResponse.method(:from_hash)))
67
67
  .execute
68
68
  end
69
69
 
@@ -78,8 +78,8 @@ module AdvancedBilling
78
78
  # If the price point is set to `use_site_exchange_rate: true`, it will
79
79
  # return pricing based on the current exchange rate. If the flag is set to
80
80
  # false, it will return all of the defined prices for each currency.
81
- # @param [Integer] component_id Required parameter: The Chargify id of the
82
- # component
81
+ # @param [Integer] component_id Required parameter: The Advanced Billing id
82
+ # of the component
83
83
  # @param [TrueClass | FalseClass] currency_prices Optional parameter:
84
84
  # Include an array of currency price data
85
85
  # @param [Integer] page Optional parameter: Result records are organized in
@@ -112,15 +112,15 @@ module AdvancedBilling
112
112
  .auth(Single.new('BasicAuth'))
113
113
  .array_serialization_format(ArraySerializationFormat::CSV))
114
114
  .response(new_response_handler
115
- .deserializer(APIHelper.method(:custom_type_deserializer))
116
- .deserialize_into(ComponentPricePointsResponse.method(:from_hash)))
115
+ .deserializer(APIHelper.method(:custom_type_deserializer))
116
+ .deserialize_into(ComponentPricePointsResponse.method(:from_hash)))
117
117
  .execute
118
118
  end
119
119
 
120
120
  # Use this endpoint to create multiple component price points in one
121
121
  # request.
122
- # @param [String] component_id Required parameter: The Chargify id of the
123
- # component for which you want to fetch price points.
122
+ # @param [String] component_id Required parameter: The Advanced Billing id
123
+ # of the component for which you want to fetch price points.
124
124
  # @param [CreateComponentPricePointsRequest] body Optional parameter:
125
125
  # Example:
126
126
  # @return [ComponentPricePointsResponse] response from the API call
@@ -139,8 +139,8 @@ module AdvancedBilling
139
139
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
140
140
  .auth(Single.new('BasicAuth')))
141
141
  .response(new_response_handler
142
- .deserializer(APIHelper.method(:custom_type_deserializer))
143
- .deserialize_into(ComponentPricePointsResponse.method(:from_hash)))
142
+ .deserializer(APIHelper.method(:custom_type_deserializer))
143
+ .deserialize_into(ComponentPricePointsResponse.method(:from_hash)))
144
144
  .execute
145
145
  end
146
146
 
@@ -190,12 +190,12 @@ module AdvancedBilling
190
190
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
191
191
  .auth(Single.new('BasicAuth')))
192
192
  .response(new_response_handler
193
- .deserializer(APIHelper.method(:custom_type_deserializer))
194
- .deserialize_into(ComponentPricePointResponse.method(:from_hash))
195
- .local_error_template('422',
196
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
197
- ' Response: \'{$response.body}\'.',
198
- ErrorArrayMapResponseException))
193
+ .deserializer(APIHelper.method(:custom_type_deserializer))
194
+ .deserialize_into(ComponentPricePointResponse.method(:from_hash))
195
+ .local_error_template('422',
196
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
197
+ ' Response: \'{$response.body}\'.',
198
+ ErrorArrayMapResponseException))
199
199
  .execute
200
200
  end
201
201
 
@@ -234,8 +234,8 @@ module AdvancedBilling
234
234
  .header_param(new_parameter('application/json', key: 'accept'))
235
235
  .auth(Single.new('BasicAuth')))
236
236
  .response(new_response_handler
237
- .deserializer(APIHelper.method(:custom_type_deserializer))
238
- .deserialize_into(ComponentPricePointResponse.method(:from_hash)))
237
+ .deserializer(APIHelper.method(:custom_type_deserializer))
238
+ .deserialize_into(ComponentPricePointResponse.method(:from_hash)))
239
239
  .execute
240
240
  end
241
241
 
@@ -274,20 +274,20 @@ module AdvancedBilling
274
274
  .header_param(new_parameter('application/json', key: 'accept'))
275
275
  .auth(Single.new('BasicAuth')))
276
276
  .response(new_response_handler
277
- .deserializer(APIHelper.method(:custom_type_deserializer))
278
- .deserialize_into(ComponentPricePointResponse.method(:from_hash))
279
- .local_error_template('422',
280
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
281
- ' Response: \'{$response.body}\'.',
282
- ErrorListResponseException))
277
+ .deserializer(APIHelper.method(:custom_type_deserializer))
278
+ .deserialize_into(ComponentPricePointResponse.method(:from_hash))
279
+ .local_error_template('422',
280
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
281
+ ' Response: \'{$response.body}\'.',
282
+ ErrorListResponseException))
283
283
  .execute
284
284
  end
285
285
 
286
286
  # Use this endpoint to unarchive a component price point.
287
- # @param [Integer] component_id Required parameter: The Chargify id of the
288
- # component to which the price point belongs
289
- # @param [Integer] price_point_id Required parameter: The Chargify id of the
290
- # price point
287
+ # @param [Integer] component_id Required parameter: The Advanced Billing id
288
+ # of the component to which the price point belongs
289
+ # @param [Integer] price_point_id Required parameter: The Advanced Billing
290
+ # id of the price point
291
291
  # @return [ComponentPricePointResponse] response from the API call
292
292
  def unarchive_component_price_point(component_id,
293
293
  price_point_id)
@@ -304,8 +304,8 @@ module AdvancedBilling
304
304
  .header_param(new_parameter('application/json', key: 'accept'))
305
305
  .auth(Single.new('BasicAuth')))
306
306
  .response(new_response_handler
307
- .deserializer(APIHelper.method(:custom_type_deserializer))
308
- .deserialize_into(ComponentPricePointResponse.method(:from_hash)))
307
+ .deserializer(APIHelper.method(:custom_type_deserializer))
308
+ .deserialize_into(ComponentPricePointResponse.method(:from_hash)))
309
309
  .execute
310
310
  end
311
311
 
@@ -316,8 +316,8 @@ module AdvancedBilling
316
316
  # point, there should be a matching price level created in the given
317
317
  # currency.
318
318
  # Note: Currency Prices are not able to be created for custom price points.
319
- # @param [Integer] price_point_id Required parameter: The Chargify id of the
320
- # price point
319
+ # @param [Integer] price_point_id Required parameter: The Advanced Billing
320
+ # id of the price point
321
321
  # @param [CreateCurrencyPricesRequest] body Optional parameter: Example:
322
322
  # @return [ComponentCurrencyPricesResponse] response from the API call
323
323
  def create_currency_prices(price_point_id,
@@ -335,19 +335,19 @@ module AdvancedBilling
335
335
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
336
336
  .auth(Single.new('BasicAuth')))
337
337
  .response(new_response_handler
338
- .deserializer(APIHelper.method(:custom_type_deserializer))
339
- .deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
340
- .local_error('422',
341
- 'Unprocessable Entity (WebDAV)',
342
- ErrorArrayMapResponseException))
338
+ .deserializer(APIHelper.method(:custom_type_deserializer))
339
+ .deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
340
+ .local_error('422',
341
+ 'Unprocessable Entity (WebDAV)',
342
+ ErrorArrayMapResponseException))
343
343
  .execute
344
344
  end
345
345
 
346
346
  # This endpoint allows you to update currency prices for a given currency
347
347
  # that has been defined on the site level in your settings.
348
348
  # Note: Currency Prices are not able to be updated for custom price points.
349
- # @param [Integer] price_point_id Required parameter: The Chargify id of the
350
- # price point
349
+ # @param [Integer] price_point_id Required parameter: The Advanced Billing
350
+ # id of the price point
351
351
  # @param [UpdateCurrencyPricesRequest] body Optional parameter: Example:
352
352
  # @return [ComponentCurrencyPricesResponse] response from the API call
353
353
  def update_currency_prices(price_point_id,
@@ -365,11 +365,11 @@ module AdvancedBilling
365
365
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
366
366
  .auth(Single.new('BasicAuth')))
367
367
  .response(new_response_handler
368
- .deserializer(APIHelper.method(:custom_type_deserializer))
369
- .deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
370
- .local_error('422',
371
- 'Unprocessable Entity (WebDAV)',
372
- ErrorArrayMapResponseException))
368
+ .deserializer(APIHelper.method(:custom_type_deserializer))
369
+ .deserialize_into(ComponentCurrencyPricesResponse.method(:from_hash))
370
+ .local_error('422',
371
+ 'Unprocessable Entity (WebDAV)',
372
+ ErrorArrayMapResponseException))
373
373
  .execute
374
374
  end
375
375
 
@@ -408,12 +408,12 @@ module AdvancedBilling
408
408
  .auth(Single.new('BasicAuth'))
409
409
  .array_serialization_format(ArraySerializationFormat::CSV))
410
410
  .response(new_response_handler
411
- .deserializer(APIHelper.method(:custom_type_deserializer))
412
- .deserialize_into(ListComponentsPricePointsResponse.method(:from_hash))
413
- .local_error_template('422',
414
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
415
- ' Response: \'{$response.body}\'.',
416
- ErrorListResponseException))
411
+ .deserializer(APIHelper.method(:custom_type_deserializer))
412
+ .deserialize_into(ListComponentsPricePointsResponse.method(:from_hash))
413
+ .local_error_template('422',
414
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
415
+ ' Response: \'{$response.body}\'.',
416
+ ErrorListResponseException))
417
417
  .execute
418
418
  end
419
419
  end
@@ -18,10 +18,10 @@ module AdvancedBilling
18
18
  # want to bill for a quantity of something that does not change unless you
19
19
  # change it, then you want quantity components, instead.
20
20
  # For more information on components, please see our documentation
21
- # [here](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405020625677)
22
- # .
23
- # @param [Integer] product_family_id Required parameter: The Chargify id of
24
- # the product family to which the component belongs
21
+ # [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Componen
22
+ # ts-Overview).
23
+ # @param [String] product_family_id Required parameter: Either the product
24
+ # family's id or its handle prefixed with `handle:`
25
25
  # @param [CreateMeteredComponent] body Optional parameter: Example:
26
26
  # @return [ComponentResponse] response from the API call
27
27
  def create_metered_component(product_family_id,
@@ -39,15 +39,15 @@ module AdvancedBilling
39
39
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
40
40
  .auth(Single.new('BasicAuth')))
41
41
  .response(new_response_handler
42
- .deserializer(APIHelper.method(:custom_type_deserializer))
43
- .deserialize_into(ComponentResponse.method(:from_hash))
44
- .local_error_template('404',
45
- 'Not Found:\'{$response.body}\'',
46
- APIException)
47
- .local_error_template('422',
48
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
49
- ' Response: \'{$response.body}\'.',
50
- ErrorListResponseException))
42
+ .deserializer(APIHelper.method(:custom_type_deserializer))
43
+ .deserialize_into(ComponentResponse.method(:from_hash))
44
+ .local_error_template('404',
45
+ 'Not Found:\'{$response.body}\'',
46
+ APIException)
47
+ .local_error_template('422',
48
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
49
+ ' Response: \'{$response.body}\'.',
50
+ ErrorListResponseException))
51
51
  .execute
52
52
  end
53
53
 
@@ -67,10 +67,10 @@ module AdvancedBilling
67
67
  # The allocated quantity for one-time quantity-based components immediately
68
68
  # gets reset back to zero after the allocation is made.
69
69
  # For more information on components, please see our documentation
70
- # [here](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405020625677)
71
- # .
72
- # @param [Integer] product_family_id Required parameter: The Chargify id of
73
- # the product family to which the component belongs
70
+ # [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Componen
71
+ # ts-Overview).
72
+ # @param [String] product_family_id Required parameter: Either the product
73
+ # family's id or its handle prefixed with `handle:`
74
74
  # @param [CreateQuantityBasedComponent] body Optional parameter: Example:
75
75
  # @return [ComponentResponse] response from the API call
76
76
  def create_quantity_based_component(product_family_id,
@@ -88,15 +88,15 @@ module AdvancedBilling
88
88
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
89
89
  .auth(Single.new('BasicAuth')))
90
90
  .response(new_response_handler
91
- .deserializer(APIHelper.method(:custom_type_deserializer))
92
- .deserialize_into(ComponentResponse.method(:from_hash))
93
- .local_error_template('404',
94
- 'Not Found:\'{$response.body}\'',
95
- APIException)
96
- .local_error_template('422',
97
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
98
- ' Response: \'{$response.body}\'.',
99
- ErrorListResponseException))
91
+ .deserializer(APIHelper.method(:custom_type_deserializer))
92
+ .deserialize_into(ComponentResponse.method(:from_hash))
93
+ .local_error_template('404',
94
+ 'Not Found:\'{$response.body}\'',
95
+ APIException)
96
+ .local_error_template('422',
97
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
98
+ ' Response: \'{$response.body}\'.',
99
+ ErrorListResponseException))
100
100
  .execute
101
101
  end
102
102
 
@@ -106,10 +106,10 @@ module AdvancedBilling
106
106
  # On/off components are used for any flat fee, recurring add on (think
107
107
  # $99/month for tech support or a flat add on shipping fee).
108
108
  # For more information on components, please see our documentation
109
- # [here](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405020625677)
110
- # .
111
- # @param [Integer] product_family_id Required parameter: The Chargify id of
112
- # the product family to which the component belongs
109
+ # [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Componen
110
+ # ts-Overview).
111
+ # @param [String] product_family_id Required parameter: Either the product
112
+ # family's id or its handle prefixed with `handle:`
113
113
  # @param [CreateOnOffComponent] body Optional parameter: Example:
114
114
  # @return [ComponentResponse] response from the API call
115
115
  def create_on_off_component(product_family_id,
@@ -127,15 +127,15 @@ module AdvancedBilling
127
127
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
128
128
  .auth(Single.new('BasicAuth')))
129
129
  .response(new_response_handler
130
- .deserializer(APIHelper.method(:custom_type_deserializer))
131
- .deserialize_into(ComponentResponse.method(:from_hash))
132
- .local_error_template('404',
133
- 'Not Found:\'{$response.body}\'',
134
- APIException)
135
- .local_error_template('422',
136
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
137
- ' Response: \'{$response.body}\'.',
138
- ErrorListResponseException))
130
+ .deserializer(APIHelper.method(:custom_type_deserializer))
131
+ .deserialize_into(ComponentResponse.method(:from_hash))
132
+ .local_error_template('404',
133
+ 'Not Found:\'{$response.body}\'',
134
+ APIException)
135
+ .local_error_template('422',
136
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
137
+ ' Response: \'{$response.body}\'.',
138
+ ErrorListResponseException))
139
139
  .execute
140
140
  end
141
141
 
@@ -149,10 +149,10 @@ module AdvancedBilling
149
149
  # the time of purchase, and we subsequently keep track of the usage against
150
150
  # the amount purchased.
151
151
  # For more information on components, please see our documentation
152
- # [here](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405020625677)
153
- # .
154
- # @param [Integer] product_family_id Required parameter: The Chargify id of
155
- # the product family to which the component belongs
152
+ # [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Componen
153
+ # ts-Overview).
154
+ # @param [String] product_family_id Required parameter: Either the product
155
+ # family's id or its handle prefixed with `handle:`
156
156
  # @param [CreatePrepaidComponent] body Optional parameter: Example:
157
157
  # @return [ComponentResponse] response from the API call
158
158
  def create_prepaid_usage_component(product_family_id,
@@ -170,15 +170,15 @@ module AdvancedBilling
170
170
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
171
171
  .auth(Single.new('BasicAuth')))
172
172
  .response(new_response_handler
173
- .deserializer(APIHelper.method(:custom_type_deserializer))
174
- .deserialize_into(ComponentResponse.method(:from_hash))
175
- .local_error_template('404',
176
- 'Not Found:\'{$response.body}\'',
177
- APIException)
178
- .local_error_template('422',
179
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
180
- ' Response: \'{$response.body}\'.',
181
- ErrorListResponseException))
173
+ .deserializer(APIHelper.method(:custom_type_deserializer))
174
+ .deserialize_into(ComponentResponse.method(:from_hash))
175
+ .local_error_template('404',
176
+ 'Not Found:\'{$response.body}\'',
177
+ APIException)
178
+ .local_error_template('422',
179
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
180
+ ' Response: \'{$response.body}\'.',
181
+ ErrorListResponseException))
182
182
  .execute
183
183
  end
184
184
 
@@ -195,10 +195,10 @@ module AdvancedBilling
195
195
  # with metered components), the usage is derived from analysis of your
196
196
  # events.
197
197
  # For more information on components, please see our documentation
198
- # [here](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405020625677)
199
- # .
200
- # @param [Integer] product_family_id Required parameter: The Chargify id of
201
- # the product family to which the component belongs
198
+ # [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Componen
199
+ # ts-Overview).
200
+ # @param [String] product_family_id Required parameter: Either the product
201
+ # family's id or its handle prefixed with `handle:`
202
202
  # @param [CreateEBBComponent] body Optional parameter: Example:
203
203
  # @return [ComponentResponse] response from the API call
204
204
  def create_event_based_component(product_family_id,
@@ -216,15 +216,15 @@ module AdvancedBilling
216
216
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
217
217
  .auth(Single.new('BasicAuth')))
218
218
  .response(new_response_handler
219
- .deserializer(APIHelper.method(:custom_type_deserializer))
220
- .deserialize_into(ComponentResponse.method(:from_hash))
221
- .local_error_template('404',
222
- 'Not Found:\'{$response.body}\'',
223
- APIException)
224
- .local_error_template('422',
225
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
226
- ' Response: \'{$response.body}\'.',
227
- ErrorListResponseException))
219
+ .deserializer(APIHelper.method(:custom_type_deserializer))
220
+ .deserialize_into(ComponentResponse.method(:from_hash))
221
+ .local_error_template('404',
222
+ 'Not Found:\'{$response.body}\'',
223
+ APIException)
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
 
@@ -244,8 +244,8 @@ module AdvancedBilling
244
244
  .header_param(new_parameter('application/json', key: 'accept'))
245
245
  .auth(Single.new('BasicAuth')))
246
246
  .response(new_response_handler
247
- .deserializer(APIHelper.method(:custom_type_deserializer))
248
- .deserialize_into(ComponentResponse.method(:from_hash)))
247
+ .deserializer(APIHelper.method(:custom_type_deserializer))
248
+ .deserialize_into(ComponentResponse.method(:from_hash)))
249
249
  .execute
250
250
  end
251
251
 
@@ -253,10 +253,11 @@ module AdvancedBilling
253
253
  # product family.
254
254
  # You may read the component by either the component's id or handle. When
255
255
  # using the handle, it must be prefixed with `handle:`.
256
- # @param [Integer] product_family_id Required parameter: The Chargify id of
257
- # the product family to which the component belongs
258
- # @param [String] component_id Required parameter: Either the Chargify id of
259
- # the component or the handle for the component prefixed with `handle:`
256
+ # @param [Integer] product_family_id Required parameter: The Advanced
257
+ # Billing id of the product family to which the component belongs
258
+ # @param [String] component_id Required parameter: Either the Advanced
259
+ # Billing id of the component or the handle for the component prefixed with
260
+ # `handle:`
260
261
  # @return [ComponentResponse] response from the API call
261
262
  def read_component(product_family_id,
262
263
  component_id)
@@ -273,18 +274,19 @@ module AdvancedBilling
273
274
  .header_param(new_parameter('application/json', key: 'accept'))
274
275
  .auth(Single.new('BasicAuth')))
275
276
  .response(new_response_handler
276
- .deserializer(APIHelper.method(:custom_type_deserializer))
277
- .deserialize_into(ComponentResponse.method(:from_hash)))
277
+ .deserializer(APIHelper.method(:custom_type_deserializer))
278
+ .deserialize_into(ComponentResponse.method(:from_hash)))
278
279
  .execute
279
280
  end
280
281
 
281
282
  # This request will update a component from a specific product family.
282
283
  # You may read the component by either the component's id or handle. When
283
284
  # using the handle, it must be prefixed with `handle:`.
284
- # @param [Integer] product_family_id Required parameter: The Chargify id of
285
- # the product family to which the component belongs
286
- # @param [String] component_id Required parameter: Either the Chargify id of
287
- # the component or the handle for the component prefixed with `handle:`
285
+ # @param [Integer] product_family_id Required parameter: The Advanced
286
+ # Billing id of the product family to which the component belongs
287
+ # @param [String] component_id Required parameter: Either the Advanced
288
+ # Billing id of the component or the handle for the component prefixed with
289
+ # `handle:`
288
290
  # @param [UpdateComponentRequest] body Optional parameter: Example:
289
291
  # @return [ComponentResponse] response from the API call
290
292
  def update_product_family_component(product_family_id,
@@ -306,22 +308,23 @@ module AdvancedBilling
306
308
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
307
309
  .auth(Single.new('BasicAuth')))
308
310
  .response(new_response_handler
309
- .deserializer(APIHelper.method(:custom_type_deserializer))
310
- .deserialize_into(ComponentResponse.method(:from_hash))
311
- .local_error_template('422',
312
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
313
- ' Response: \'{$response.body}\'.',
314
- ErrorListResponseException))
311
+ .deserializer(APIHelper.method(:custom_type_deserializer))
312
+ .deserialize_into(ComponentResponse.method(:from_hash))
313
+ .local_error_template('422',
314
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
315
+ ' Response: \'{$response.body}\'.',
316
+ ErrorListResponseException))
315
317
  .execute
316
318
  end
317
319
 
318
320
  # Sending a DELETE request to this endpoint will archive the component. All
319
321
  # current subscribers will be unffected; their subscription/purchase will
320
322
  # continue to be charged as usual.
321
- # @param [Integer] product_family_id Required parameter: The Chargify id of
322
- # the product family to which the component belongs
323
- # @param [String] component_id Required parameter: Either the Chargify id of
324
- # the component or the handle for the component prefixed with `handle:`
323
+ # @param [Integer] product_family_id Required parameter: The Advanced
324
+ # Billing id of the product family to which the component belongs
325
+ # @param [String] component_id Required parameter: Either the Advanced
326
+ # Billing id of the component or the handle for the component prefixed with
327
+ # `handle:`
325
328
  # @return [Component] response from the API call
326
329
  def archive_component(product_family_id,
327
330
  component_id)
@@ -338,12 +341,12 @@ module AdvancedBilling
338
341
  .header_param(new_parameter('application/json', key: 'accept'))
339
342
  .auth(Single.new('BasicAuth')))
340
343
  .response(new_response_handler
341
- .deserializer(APIHelper.method(:custom_type_deserializer))
342
- .deserialize_into(Component.method(:from_hash))
343
- .local_error_template('422',
344
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
345
- ' Response: \'{$response.body}\'.',
346
- ErrorListResponseException))
344
+ .deserializer(APIHelper.method(:custom_type_deserializer))
345
+ .deserialize_into(Component.method(:from_hash))
346
+ .local_error_template('422',
347
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
348
+ ' Response: \'{$response.body}\'.',
349
+ ErrorListResponseException))
347
350
  .execute
348
351
  end
349
352
 
@@ -403,9 +406,9 @@ module AdvancedBilling
403
406
  .auth(Single.new('BasicAuth'))
404
407
  .array_serialization_format(ArraySerializationFormat::CSV))
405
408
  .response(new_response_handler
406
- .deserializer(APIHelper.method(:custom_type_deserializer))
407
- .deserialize_into(ComponentResponse.method(:from_hash))
408
- .is_response_array(true))
409
+ .deserializer(APIHelper.method(:custom_type_deserializer))
410
+ .deserialize_into(ComponentResponse.method(:from_hash))
411
+ .is_response_array(true))
409
412
  .execute
410
413
  end
411
414
 
@@ -431,19 +434,19 @@ module AdvancedBilling
431
434
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
432
435
  .auth(Single.new('BasicAuth')))
433
436
  .response(new_response_handler
434
- .deserializer(APIHelper.method(:custom_type_deserializer))
435
- .deserialize_into(ComponentResponse.method(:from_hash))
436
- .local_error_template('422',
437
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
438
- ' Response: \'{$response.body}\'.',
439
- ErrorListResponseException))
437
+ .deserializer(APIHelper.method(:custom_type_deserializer))
438
+ .deserialize_into(ComponentResponse.method(:from_hash))
439
+ .local_error_template('422',
440
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
441
+ ' Response: \'{$response.body}\'.',
442
+ ErrorListResponseException))
440
443
  .execute
441
444
  end
442
445
 
443
446
  # This request will return a list of components for a particular product
444
447
  # family.
445
- # @param [Integer] product_family_id Required parameter: The Chargify id of
446
- # the product family
448
+ # @param [Integer] product_family_id Required parameter: The Advanced
449
+ # Billing id of the product family
447
450
  # @param [TrueClass | FalseClass] include_archived Optional parameter:
448
451
  # Include archived items.
449
452
  # @param [Integer] page Optional parameter: Result records are organized in
@@ -503,9 +506,9 @@ module AdvancedBilling
503
506
  .auth(Single.new('BasicAuth'))
504
507
  .array_serialization_format(ArraySerializationFormat::CSV))
505
508
  .response(new_response_handler
506
- .deserializer(APIHelper.method(:custom_type_deserializer))
507
- .deserialize_into(ComponentResponse.method(:from_hash))
508
- .is_response_array(true))
509
+ .deserializer(APIHelper.method(:custom_type_deserializer))
510
+ .deserialize_into(ComponentResponse.method(:from_hash))
511
+ .is_response_array(true))
509
512
  .execute
510
513
  end
511
514
  end