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
@@ -9,10 +9,11 @@ module AdvancedBilling
9
9
  # Use this endpoint to create a payment profile for a customer.
10
10
  # Payment Profiles house the credit card, ACH (Authorize.Net or Stripe
11
11
  # only,) or PayPal (Braintree only,) data for a customer. The payment
12
- # information is attached to the customer within Chargify, as opposed to the
13
- # Subscription itself.
14
- # You must include a customer_id so that Chargify will attach it to the
15
- # customer entry. If no customer_id is included the API will return a 404.
12
+ # information is attached to the customer within Advanced Billing, as
13
+ # opposed to the Subscription itself.
14
+ # You must include a customer_id so that Advanced Billing will attach it to
15
+ # the customer entry. If no customer_id is included the API will return a
16
+ # 404.
16
17
  # ## Create a Payment Profile for ACH usage
17
18
  # If you would like to create a payment method that is a Bank Account
18
19
  # applicable for ACH payments use the following:
@@ -37,17 +38,17 @@ module AdvancedBilling
37
38
  # [here](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-s
38
39
  # ignups#taxes)
39
40
  # ## Payment Profile Documentation
40
- # Full documentation on how Payment Profiles operate within Chargify can be
41
- # located under the following links:
41
+ # Full documentation on how Payment Profiles operate within Advanced Billing
42
+ # can be located under the following links:
42
43
  # + [Subscriber Payment
43
- # Details](https://maxio-chargify.zendesk.com/hc/en-us/articles/540521255834
44
- # 9-Customers-Reference#customers-reference-0-0)
44
+ # Details](https://maxio.zendesk.com/hc/en-us/articles/24251599929613-Subscr
45
+ # iption-Summary-Payment-Details-Tab)
45
46
  # + [Self Service
46
- # Pages](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404759627021)
47
- # (Allows credit card updates by Subscriber)
47
+ # Pages](https://maxio.zendesk.com/hc/en-us/articles/24261425318541-Self-Ser
48
+ # vice-Pages) (Allows credit card updates by Subscriber)
48
49
  # + [Public Signup Pages payment
49
- # settings](https://maxio-chargify.zendesk.com/hc/en-us/articles/54052677543
50
- # 81-Individual-Page-Settings#credit-card-settings)
50
+ # settings](https://maxio.zendesk.com/hc/en-us/articles/24261368332557-Indiv
51
+ # idual-Page-Settings)
51
52
  # ## Create a Payment Profile with a Chargify.js token
52
53
  # ```json
53
54
  # {
@@ -86,8 +87,8 @@ module AdvancedBilling
86
87
  # ## GoCardless
87
88
  # For more information on GoCardless, please view the following resources:
88
89
  # + [Full documentation on
89
- # GoCardless](https://maxio-chargify.zendesk.com/hc/en-us/articles/540450188
90
- # 9677)
90
+ # GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoC
91
+ # ardless)
91
92
  # + [Using Chargify.js with GoCardless - minimal
92
93
  # example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
93
94
  # DIy-examples#minimal-example-with-direct-debit-gocardless-gateway)
@@ -134,8 +135,8 @@ module AdvancedBilling
134
135
  # If the customer, bank account, and mandate already exist in GoCardless, a
135
136
  # payment profile can be created by using the IDs. In order to create masked
136
137
  # versions of `bank_account_number` and `bank_routing_number` that are used
137
- # to display within Chargify Admin UI, you can pass the last four digits for
138
- # this fields which then will be saved in this form
138
+ # to display within Advanced Billing Admin UI, you can pass the last four
139
+ # digits for this fields which then will be saved in this form
139
140
  # `XXXX[four-provided-digits]`.
140
141
  # ```json
141
142
  # {
@@ -161,8 +162,8 @@ module AdvancedBilling
161
162
  # For more information on Stripe SEPA Direct Debit, please view the
162
163
  # following resources:
163
164
  # + [Full documentation on Stripe SEPA Direct
164
- # Debit](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405050826765-
165
- # Stripe-SEPA-and-BECS-Direct-Debit)
165
+ # Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-S
166
+ # EPA-and-BECS-Direct-Debit)
166
167
  # + [Using Chargify.js with Stripe Direct Debit - minimal
167
168
  # example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
168
169
  # DIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway
@@ -192,8 +193,8 @@ module AdvancedBilling
192
193
  # For more information on Stripe BECS Direct Debit, please view the
193
194
  # following resources:
194
195
  # + [Full documentation on Stripe BECS Direct
195
- # Debit](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405050826765-
196
- # Stripe-SEPA-and-BECS-Direct-Debit)
196
+ # Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-S
197
+ # EPA-and-BECS-Direct-Debit)
197
198
  # + [Using Chargify.js with Stripe BECS Direct Debit - minimal
198
199
  # example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
199
200
  # DIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway
@@ -225,8 +226,8 @@ module AdvancedBilling
225
226
  # For more information on Stripe BACS Direct Debit, please view the
226
227
  # following resources:
227
228
  # + [Full documentation on Stripe BACS Direct
228
- # Debit](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405050826765-
229
- # Stripe-SEPA-and-BECS-Direct-Debit)
229
+ # Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-S
230
+ # EPA-and-BECS-Direct-Debit)
230
231
  # ### Stripe BACS Direct Debit Payment Profiles
231
232
  # The following example creates a customer, bank account and mandate in
232
233
  # Stripe:
@@ -250,9 +251,10 @@ module AdvancedBilling
250
251
  # It may happen that a payment needs 3D Secure Authentication when the
251
252
  # payment profile is created; this is referred to in our help docs as a
252
253
  # [post-authentication
253
- # flow](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405177432077#p
254
- # sd2-flows-pre-authentication-and-post-authentication). The server returns
255
- # `422 Unprocessable Entity` in this case with the following response:
254
+ # flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-I
255
+ # mplementing-3D-Secure#psd2-flows-pre-authentication-and-post-authenticatio
256
+ # n). The server returns `422 Unprocessable Entity` in this case with the
257
+ # following response:
256
258
  # ```json
257
259
  # {
258
260
  # "jsonapi": {
@@ -322,7 +324,7 @@ module AdvancedBilling
322
324
  # following the IBAN or the Local Bank details examples, a customer, bank
323
325
  # account and mandate will be created in your current vault. If the
324
326
  # customer, bank account, and mandate already exist in your vault, follow
325
- # the Import example to link the payment profile into Chargify.
327
+ # the Import example to link the payment profile into Advanced Billing.
326
328
  # @return [PaymentProfileResponse] response from the API call
327
329
  def create_payment_profile(body: nil)
328
330
  new_api_call_builder
@@ -335,15 +337,15 @@ module AdvancedBilling
335
337
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
336
338
  .auth(Single.new('BasicAuth')))
337
339
  .response(new_response_handler
338
- .deserializer(APIHelper.method(:custom_type_deserializer))
339
- .deserialize_into(PaymentProfileResponse.method(:from_hash))
340
- .local_error_template('404',
341
- 'Not Found:\'{$response.body}\'',
342
- APIException)
343
- .local_error_template('422',
344
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
345
- ' Response: \'{$response.body}\'.',
346
- ErrorListResponseException))
340
+ .deserializer(APIHelper.method(:custom_type_deserializer))
341
+ .deserialize_into(PaymentProfileResponse.method(:from_hash))
342
+ .local_error_template('404',
343
+ 'Not Found:\'{$response.body}\'',
344
+ APIException)
345
+ .local_error_template('422',
346
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
347
+ ' Response: \'{$response.body}\'.',
348
+ ErrorListResponseException))
347
349
  .execute
348
350
  end
349
351
 
@@ -375,9 +377,9 @@ module AdvancedBilling
375
377
  .header_param(new_parameter('application/json', key: 'accept'))
376
378
  .auth(Single.new('BasicAuth')))
377
379
  .response(new_response_handler
378
- .deserializer(APIHelper.method(:custom_type_deserializer))
379
- .deserialize_into(PaymentProfileResponse.method(:from_hash))
380
- .is_response_array(true))
380
+ .deserializer(APIHelper.method(:custom_type_deserializer))
381
+ .deserialize_into(PaymentProfileResponse.method(:from_hash))
382
+ .is_response_array(true))
381
383
  .execute
382
384
  end
383
385
 
@@ -428,11 +430,11 @@ module AdvancedBilling
428
430
  .header_param(new_parameter('application/json', key: 'accept'))
429
431
  .auth(Single.new('BasicAuth')))
430
432
  .response(new_response_handler
431
- .deserializer(APIHelper.method(:custom_type_deserializer))
432
- .deserialize_into(PaymentProfileResponse.method(:from_hash))
433
- .local_error('404',
434
- 'Not Found',
435
- APIException))
433
+ .deserializer(APIHelper.method(:custom_type_deserializer))
434
+ .deserialize_into(PaymentProfileResponse.method(:from_hash))
435
+ .local_error('404',
436
+ 'Not Found',
437
+ APIException))
436
438
  .execute
437
439
  end
438
440
 
@@ -464,8 +466,8 @@ module AdvancedBilling
464
466
  # Customer’s credit cards without passing in the full credit card number and
465
467
  # CVV.
466
468
  # - If you are using **Authorize.net**, **Cybersource**, **Forte**,
467
- # **Braintree Blue** or **Stripe**, Chargify will ignore the credit card
468
- # number and CVV when processing an update via the API, and attempt a
469
+ # **Braintree Blue** or **Stripe**, Advanced Billing will ignore the credit
470
+ # card number and CVV when processing an update via the API, and attempt a
469
471
  # partial update instead. If you wish to change the card number on a payment
470
472
  # profile, you will need to create a new payment profile for the given
471
473
  # customer.
@@ -497,15 +499,15 @@ module AdvancedBilling
497
499
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
498
500
  .auth(Single.new('BasicAuth')))
499
501
  .response(new_response_handler
500
- .deserializer(APIHelper.method(:custom_type_deserializer))
501
- .deserialize_into(PaymentProfileResponse.method(:from_hash))
502
- .local_error('404',
503
- 'Not Found',
504
- APIException)
505
- .local_error_template('422',
506
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
507
- ' Response: \'{$response.body}\'.',
508
- ErrorStringMapResponseException))
502
+ .deserializer(APIHelper.method(:custom_type_deserializer))
503
+ .deserialize_into(PaymentProfileResponse.method(:from_hash))
504
+ .local_error('404',
505
+ 'Not Found',
506
+ APIException)
507
+ .local_error_template('422',
508
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
509
+ ' Response: \'{$response.body}\'.',
510
+ ErrorStringMapResponseException))
509
511
  .execute
510
512
  end
511
513
 
@@ -525,14 +527,14 @@ module AdvancedBilling
525
527
  .should_encode(true))
526
528
  .auth(Single.new('BasicAuth')))
527
529
  .response(new_response_handler
528
- .is_response_void(true)
529
- .local_error('404',
530
- 'Not Found',
531
- APIException)
532
- .local_error_template('422',
533
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
534
- ' Response: \'{$response.body}\'.',
535
- ErrorListResponseException))
530
+ .is_response_void(true)
531
+ .local_error('404',
532
+ 'Not Found',
533
+ APIException)
534
+ .local_error_template('422',
535
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
536
+ ' Response: \'{$response.body}\'.',
537
+ ErrorListResponseException))
536
538
  .execute
537
539
  end
538
540
 
@@ -565,7 +567,7 @@ module AdvancedBilling
565
567
  .should_encode(true))
566
568
  .auth(Single.new('BasicAuth')))
567
569
  .response(new_response_handler
568
- .is_response_void(true))
570
+ .is_response_void(true))
569
571
  .execute
570
572
  end
571
573
 
@@ -591,15 +593,15 @@ module AdvancedBilling
591
593
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
592
594
  .auth(Single.new('BasicAuth')))
593
595
  .response(new_response_handler
594
- .deserializer(APIHelper.method(:custom_type_deserializer))
595
- .deserialize_into(BankAccountResponse.method(:from_hash))
596
- .local_error_template('404',
597
- 'Not Found:\'{$response.body}\'',
598
- APIException)
599
- .local_error_template('422',
600
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
601
- ' Response: \'{$response.body}\'.',
602
- ErrorListResponseException))
596
+ .deserializer(APIHelper.method(:custom_type_deserializer))
597
+ .deserialize_into(BankAccountResponse.method(:from_hash))
598
+ .local_error_template('404',
599
+ 'Not Found:\'{$response.body}\'',
600
+ APIException)
601
+ .local_error_template('422',
602
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
603
+ ' Response: \'{$response.body}\'.',
604
+ ErrorListResponseException))
603
605
  .execute
604
606
  end
605
607
 
@@ -625,7 +627,7 @@ module AdvancedBilling
625
627
  .should_encode(true))
626
628
  .auth(Single.new('BasicAuth')))
627
629
  .response(new_response_handler
628
- .is_response_void(true))
630
+ .is_response_void(true))
629
631
  .execute
630
632
  end
631
633
 
@@ -653,15 +655,15 @@ module AdvancedBilling
653
655
  .header_param(new_parameter('application/json', key: 'accept'))
654
656
  .auth(Single.new('BasicAuth')))
655
657
  .response(new_response_handler
656
- .deserializer(APIHelper.method(:custom_type_deserializer))
657
- .deserialize_into(PaymentProfileResponse.method(:from_hash))
658
- .local_error('404',
659
- 'Not Found',
660
- APIException)
661
- .local_error_template('422',
662
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
663
- ' Response: \'{$response.body}\'.',
664
- ErrorListResponseException))
658
+ .deserializer(APIHelper.method(:custom_type_deserializer))
659
+ .deserialize_into(PaymentProfileResponse.method(:from_hash))
660
+ .local_error('404',
661
+ 'Not Found',
662
+ APIException)
663
+ .local_error_template('422',
664
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
665
+ ' Response: \'{$response.body}\'.',
666
+ ErrorListResponseException))
665
667
  .execute
666
668
  end
667
669
 
@@ -691,24 +693,25 @@ module AdvancedBilling
691
693
  .header_param(new_parameter('application/json', key: 'accept'))
692
694
  .auth(Single.new('BasicAuth')))
693
695
  .response(new_response_handler
694
- .deserializer(APIHelper.method(:custom_type_deserializer))
695
- .deserialize_into(PaymentProfileResponse.method(:from_hash))
696
- .local_error_template('422',
697
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
698
- ' Response: \'{$response.body}\'.',
699
- ErrorListResponseException))
696
+ .deserializer(APIHelper.method(:custom_type_deserializer))
697
+ .deserialize_into(PaymentProfileResponse.method(:from_hash))
698
+ .local_error_template('422',
699
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
700
+ ' Response: \'{$response.body}\'.',
701
+ ErrorListResponseException))
700
702
  .execute
701
703
  end
702
704
 
703
- # One Time Tokens aka Chargify Tokens house the credit card or ACH
705
+ # One Time Tokens aka Advanced Billing Tokens house the credit card or ACH
704
706
  # (Authorize.Net or Stripe only) data for a customer.
705
707
  # You can use One Time Tokens while creating a subscription or payment
706
708
  # profile instead of passing all bank account or credit card data directly
707
709
  # to a given API endpoint.
708
710
  # To obtain a One Time Token you have to use
709
- # [chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0
711
+ # [Chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0
710
712
  # NjAzNDI0-overview).
711
- # @param [String] chargify_token Required parameter: Chargify Token
713
+ # @param [String] chargify_token Required parameter: Advanced Billing
714
+ # Token
712
715
  # @return [GetOneTimeTokenRequest] response from the API call
713
716
  def read_one_time_token(chargify_token)
714
717
  new_api_call_builder
@@ -721,11 +724,11 @@ module AdvancedBilling
721
724
  .header_param(new_parameter('application/json', key: 'accept'))
722
725
  .auth(Single.new('BasicAuth')))
723
726
  .response(new_response_handler
724
- .deserializer(APIHelper.method(:custom_type_deserializer))
725
- .deserialize_into(GetOneTimeTokenRequest.method(:from_hash))
726
- .local_error_template('404',
727
- 'Not Found:\'{$response.body}\'',
728
- ErrorListResponseException))
727
+ .deserializer(APIHelper.method(:custom_type_deserializer))
728
+ .deserialize_into(GetOneTimeTokenRequest.method(:from_hash))
729
+ .local_error_template('404',
730
+ 'Not Found:\'{$response.body}\'',
731
+ ErrorListResponseException))
729
732
  .execute
730
733
  end
731
734
 
@@ -757,14 +760,14 @@ module AdvancedBilling
757
760
  .should_encode(true))
758
761
  .auth(Single.new('BasicAuth')))
759
762
  .response(new_response_handler
760
- .is_response_void(true)
761
- .local_error_template('404',
762
- 'Not Found:\'{$response.body}\'',
763
- APIException)
764
- .local_error_template('422',
765
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
766
- ' Response: \'{$response.body}\'.',
767
- ErrorListResponseException))
763
+ .is_response_void(true)
764
+ .local_error_template('404',
765
+ 'Not Found:\'{$response.body}\'',
766
+ APIException)
767
+ .local_error_template('422',
768
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
769
+ ' Response: \'{$response.body}\'.',
770
+ ErrorListResponseException))
768
771
  .execute
769
772
  end
770
773
  end
@@ -72,22 +72,22 @@ module AdvancedBilling
72
72
  .auth(Single.new('BasicAuth'))
73
73
  .array_serialization_format(ArraySerializationFormat::CSV))
74
74
  .response(new_response_handler
75
- .deserializer(APIHelper.method(:custom_type_deserializer))
76
- .deserialize_into(ProductResponse.method(:from_hash))
77
- .is_response_array(true)
78
- .local_error('404',
79
- 'Not Found',
80
- APIException))
75
+ .deserializer(APIHelper.method(:custom_type_deserializer))
76
+ .deserialize_into(ProductResponse.method(:from_hash))
77
+ .is_response_array(true)
78
+ .local_error('404',
79
+ 'Not Found',
80
+ APIException))
81
81
  .execute
82
82
  end
83
83
 
84
- # This method will create a Product Family within your Chargify site. Create
85
- # a Product Family to act as a container for your products, components and
86
- # coupons.
87
- # Full documentation on how Product Families operate within the Chargify UI
88
- # can be located
89
- # [here](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405369633421)
90
- # .
84
+ # This method will create a Product Family within your Advanced Billing
85
+ # site. Create a Product Family to act as a container for your products,
86
+ # components and coupons.
87
+ # Full documentation on how Product Families operate within the Advanced
88
+ # Billing UI can be located
89
+ # [here](https://maxio.zendesk.com/hc/en-us/articles/24261098936205-Product-
90
+ # Families).
91
91
  # @param [CreateProductFamilyRequest] body Optional parameter: Example:
92
92
  # @return [ProductFamilyResponse] response from the API call
93
93
  def create_product_family(body: nil)
@@ -101,12 +101,12 @@ module AdvancedBilling
101
101
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
102
102
  .auth(Single.new('BasicAuth')))
103
103
  .response(new_response_handler
104
- .deserializer(APIHelper.method(:custom_type_deserializer))
105
- .deserialize_into(ProductFamilyResponse.method(:from_hash))
106
- .local_error_template('422',
107
- 'HTTP Response Not OK. Status code: {$statusCode}.'\
108
- ' Response: \'{$response.body}\'.',
109
- ErrorListResponseException))
104
+ .deserializer(APIHelper.method(:custom_type_deserializer))
105
+ .deserialize_into(ProductFamilyResponse.method(:from_hash))
106
+ .local_error_template('422',
107
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
108
+ ' Response: \'{$response.body}\'.',
109
+ ErrorListResponseException))
110
110
  .execute
111
111
  end
112
112
 
@@ -146,9 +146,9 @@ module AdvancedBilling
146
146
  .header_param(new_parameter('application/json', key: 'accept'))
147
147
  .auth(Single.new('BasicAuth')))
148
148
  .response(new_response_handler
149
- .deserializer(APIHelper.method(:custom_type_deserializer))
150
- .deserialize_into(ProductFamilyResponse.method(:from_hash))
151
- .is_response_array(true))
149
+ .deserializer(APIHelper.method(:custom_type_deserializer))
150
+ .deserialize_into(ProductFamilyResponse.method(:from_hash))
151
+ .is_response_array(true))
152
152
  .execute
153
153
  end
154
154
 
@@ -156,8 +156,8 @@ module AdvancedBilling
156
156
  # `product_family_id`. The response will contain a Product Family object.
157
157
  # The product family can be specified either with the id number, or with the
158
158
  # `handle:my-family` format.
159
- # @param [Integer] id Required parameter: The Chargify id of the product
160
- # family
159
+ # @param [Integer] id Required parameter: The Advanced Billing id of the
160
+ # product family
161
161
  # @return [ProductFamilyResponse] response from the API call
162
162
  def read_product_family(id)
163
163
  new_api_call_builder
@@ -170,8 +170,8 @@ module AdvancedBilling
170
170
  .header_param(new_parameter('application/json', key: 'accept'))
171
171
  .auth(Single.new('BasicAuth')))
172
172
  .response(new_response_handler
173
- .deserializer(APIHelper.method(:custom_type_deserializer))
174
- .deserialize_into(ProductFamilyResponse.method(:from_hash)))
173
+ .deserializer(APIHelper.method(:custom_type_deserializer))
174
+ .deserialize_into(ProductFamilyResponse.method(:from_hash)))
175
175
  .execute
176
176
  end
177
177
  end