maxio-advanced-billing-sdk 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -38
  3. data/lib/advanced_billing/controllers/base_controller.rb +1 -1
  4. data/lib/advanced_billing/controllers/components_controller.rb +6 -6
  5. data/lib/advanced_billing/controllers/coupons_controller.rb +4 -4
  6. data/lib/advanced_billing/controllers/custom_fields_controller.rb +14 -9
  7. data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +6 -6
  8. data/lib/advanced_billing/controllers/insights_controller.rb +2 -2
  9. data/lib/advanced_billing/controllers/invoices_controller.rb +2 -2
  10. data/lib/advanced_billing/controllers/offers_controller.rb +1 -1
  11. data/lib/advanced_billing/controllers/payment_profiles_controller.rb +2 -2
  12. data/lib/advanced_billing/controllers/product_price_points_controller.rb +2 -2
  13. data/lib/advanced_billing/controllers/subscription_components_controller.rb +11 -11
  14. data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +4 -4
  15. data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +1 -1
  16. data/lib/advanced_billing/controllers/subscription_groups_controller.rb +3 -3
  17. data/lib/advanced_billing/controllers/subscription_status_controller.rb +1 -1
  18. data/lib/advanced_billing/controllers/subscriptions_controller.rb +7 -7
  19. data/lib/advanced_billing/models/address_change.rb +79 -0
  20. data/lib/advanced_billing/models/apply_payment_event_data.rb +55 -7
  21. data/lib/advanced_billing/models/bank_account_attributes.rb +2 -2
  22. data/lib/advanced_billing/models/bank_account_payment_profile.rb +2 -2
  23. data/lib/advanced_billing/models/component_price_point.rb +4 -2
  24. data/lib/advanced_billing/models/create_invoice_payment.rb +3 -3
  25. data/lib/advanced_billing/models/create_invoice_payment_request.rb +3 -3
  26. data/lib/advanced_billing/models/create_multi_invoice_payment.rb +3 -3
  27. data/lib/advanced_billing/models/create_payment_profile.rb +2 -2
  28. data/lib/advanced_billing/models/create_subscription.rb +10 -3
  29. data/lib/advanced_billing/models/credit_note.rb +2 -2
  30. data/lib/advanced_billing/models/credit_note1.rb +2 -2
  31. data/lib/advanced_billing/models/custom_field_owner.rb +23 -0
  32. data/lib/advanced_billing/models/customer_change.rb +30 -10
  33. data/lib/advanced_billing/models/customer_custom_fields_change.rb +33 -14
  34. data/lib/advanced_billing/models/customer_payer_change.rb +31 -12
  35. data/lib/advanced_billing/models/invoice_custom_field.rb +29 -19
  36. data/lib/advanced_billing/models/invoice_event.rb +1 -1
  37. data/lib/advanced_billing/models/{invoice_event1.rb → invoice_event_data.rb} +81 -43
  38. data/lib/advanced_billing/models/{payment_method_nested_data.rb → invoice_event_payment.rb} +16 -14
  39. data/lib/advanced_billing/models/{payment_method_nested_data1.rb → invoice_event_payment1.rb} +16 -14
  40. data/lib/advanced_billing/models/invoice_event_payment_method.rb +32 -0
  41. data/lib/advanced_billing/models/invoice_payer_change.rb +80 -0
  42. data/lib/advanced_billing/models/invoice_payment_method_type.rb +1 -1
  43. data/lib/advanced_billing/models/invoice_payment_type.rb +1 -1
  44. data/lib/advanced_billing/models/metadata.rb +4 -0
  45. data/lib/advanced_billing/models/{payment_method_apple_pay_type.rb → payment_method_apple_pay.rb} +15 -13
  46. data/lib/advanced_billing/models/{payment_method_bank_account_type.rb → payment_method_bank_account.rb} +11 -11
  47. data/lib/advanced_billing/models/{payment_method_credit_card_type.rb → payment_method_credit_card.rb} +13 -13
  48. data/lib/advanced_billing/models/{payment_method_external_type.rb → payment_method_external.rb} +16 -13
  49. data/lib/advanced_billing/models/{payment_method_paypal_type.rb → payment_method_paypal.rb} +10 -10
  50. data/lib/advanced_billing/models/proforma_invoice.rb +2 -2
  51. data/lib/advanced_billing/models/proforma_invoice_preview.rb +2 -2
  52. data/lib/advanced_billing/models/remove_payment_event_data.rb +4 -4
  53. data/lib/advanced_billing/models/subscription.rb +2 -2
  54. data/lib/advanced_billing/models/subscription_group_bank_account.rb +2 -2
  55. data/lib/advanced_billing/models/update_subscription.rb +5 -4
  56. data/lib/advanced_billing/utilities/union_type_lookup.rb +403 -358
  57. data/lib/advanced_billing.rb +514 -513
  58. metadata +14 -13
  59. data/lib/advanced_billing/models/customer_billing_address_change.rb +0 -60
  60. data/lib/advanced_billing/models/customer_shipping_address_change.rb +0 -60
  61. data/lib/advanced_billing/models/proforma_custom_field.rb +0 -90
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2373ed6b6c22d59effa0efb1d3e71bdcb06a326fb0d1bdf5feaf5ada650abd54
4
- data.tar.gz: caff7165bc4edfad671b85d122d7cc031fdf876eaab9200b551f01fd4c0f4a39
3
+ metadata.gz: 56965407fbc91505e38726fbc62e7c8179afbcf71e51fb1993386ce182c45fe4
4
+ data.tar.gz: 72fbecf77997471c4b644c71a2dbf661fadd897a5acbce5602036a79c56187e2
5
5
  SHA512:
6
- metadata.gz: 382b4760239e2bcf3c88fe8794dc4c0025285a2965a28f2da1ceae05f0ea118724de916a9822263127535a5e3d36c43fc693ab4374b0b8066ae9af8040b042fb
7
- data.tar.gz: 51959c0eff4f35008fb15fac3c63b93bf8b8691ffe1e553fe895881df06b8a94ff984bbd5b263de94c5817bc8f7b416cb4ae140e17db6710e03a38c0e7de33e6
6
+ metadata.gz: b3a9b49bc84316ee76362c2fd2d07e12300b14fb8cd39250cca01aed6c118bea1d2d6fe7923a0234ab353aa525b3e6f96495bd4f76d4493dec82f623b6a12062
7
+ data.tar.gz: b0a0199d82d5ca95f05182546c3b123d81acdc2389d4b59bcbf518495d0808b75cb04864851d87961b38bbd1ff7198c866c4c0b0efef4ef26bc4a04395fb3342
data/README.md CHANGED
@@ -271,20 +271,20 @@ It is up to API consumers to parse the string into a decimal number representati
271
271
  Install the gem from the command line:
272
272
 
273
273
  ```ruby
274
- gem install maxio-advanced-billing-sdk -v 0.0.4
274
+ gem install maxio-advanced-billing-sdk -v 1.0.0
275
275
  ```
276
276
 
277
277
  Or add the gem to your Gemfile and run `bundle`:
278
278
 
279
279
  ```ruby
280
- gem 'maxio-advanced-billing-sdk', '0.0.4'
280
+ gem 'maxio-advanced-billing-sdk', '1.0.0'
281
281
  ```
282
282
 
283
- For additional gem details, see the [RubyGems page for the maxio-advanced-billing-sdk gem](https://rubygems.org/gems/maxio-advanced-billing-sdk/versions/0.0.4).
283
+ For additional gem details, see the [RubyGems page for the maxio-advanced-billing-sdk gem](https://rubygems.org/gems/maxio-advanced-billing-sdk/versions/1.0.0).
284
284
 
285
285
  ## Initialize the API Client
286
286
 
287
- **_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/client.md)
287
+ **_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/client.md)
288
288
 
289
289
  The following parameters are configurable for the API Client:
290
290
 
@@ -334,41 +334,41 @@ This API uses `Basic Authentication`.
334
334
 
335
335
  ## List of APIs
336
336
 
337
- * [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/api-exports.md)
338
- * [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/advance-invoice.md)
339
- * [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/billing-portal.md)
340
- * [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/custom-fields.md)
341
- * [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/events-based-billing-segments.md)
342
- * [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/payment-profiles.md)
343
- * [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/product-families.md)
344
- * [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/product-price-points.md)
345
- * [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/proforma-invoices.md)
346
- * [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/reason-codes.md)
347
- * [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/referral-codes.md)
348
- * [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/sales-commissions.md)
349
- * [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/subscription-components.md)
350
- * [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/subscription-groups.md)
351
- * [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/subscription-group-invoice-account.md)
352
- * [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/subscription-group-status.md)
353
- * [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/subscription-invoice-account.md)
354
- * [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/subscription-notes.md)
355
- * [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/subscription-products.md)
356
- * [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/subscription-status.md)
357
- * [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/coupons.md)
358
- * [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/components.md)
359
- * [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/customers.md)
360
- * [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/events.md)
361
- * [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/insights.md)
362
- * [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/invoices.md)
363
- * [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/offers.md)
364
- * [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/products.md)
365
- * [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/sites.md)
366
- * [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/subscriptions.md)
367
- * [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/controllers/webhooks.md)
337
+ * [API Exports](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/api-exports.md)
338
+ * [Advance Invoice](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/advance-invoice.md)
339
+ * [Billing Portal](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/billing-portal.md)
340
+ * [Custom Fields](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/custom-fields.md)
341
+ * [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/events-based-billing-segments.md)
342
+ * [Payment Profiles](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/payment-profiles.md)
343
+ * [Product Families](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/product-families.md)
344
+ * [Product Price Points](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/product-price-points.md)
345
+ * [Proforma Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/proforma-invoices.md)
346
+ * [Reason Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/reason-codes.md)
347
+ * [Referral Codes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/referral-codes.md)
348
+ * [Sales Commissions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/sales-commissions.md)
349
+ * [Subscription Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/subscription-components.md)
350
+ * [Subscription Groups](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/subscription-groups.md)
351
+ * [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/subscription-group-invoice-account.md)
352
+ * [Subscription Group Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/subscription-group-status.md)
353
+ * [Subscription Invoice Account](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/subscription-invoice-account.md)
354
+ * [Subscription Notes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/subscription-notes.md)
355
+ * [Subscription Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/subscription-products.md)
356
+ * [Subscription Status](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/subscription-status.md)
357
+ * [Coupons](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/coupons.md)
358
+ * [Components](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/components.md)
359
+ * [Customers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/customers.md)
360
+ * [Events](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/events.md)
361
+ * [Insights](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/insights.md)
362
+ * [Invoices](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/invoices.md)
363
+ * [Offers](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/offers.md)
364
+ * [Products](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/products.md)
365
+ * [Sites](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/sites.md)
366
+ * [Subscriptions](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/subscriptions.md)
367
+ * [Webhooks](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/controllers/webhooks.md)
368
368
 
369
369
  ## Classes Documentation
370
370
 
371
- * [Utility Classes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/utility-classes.md)
372
- * [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/http-response.md)
373
- * [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/0.0.4/doc/http-request.md)
371
+ * [Utility Classes](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/utility-classes.md)
372
+ * [HttpResponse](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/http-response.md)
373
+ * [HttpRequest](https://www.github.com/maxio-com/ab-ruby-sdk/tree/1.0.0/doc/http-request.md)
374
374
 
@@ -9,7 +9,7 @@ module AdvancedBilling
9
9
  attr_accessor :config, :http_call_back
10
10
 
11
11
  def self.user_agent
12
- 'AB SDK Ruby:0.0.4 on OS {os-info}'
12
+ 'AB SDK Ruby:1.0.0 on OS {os-info}'
13
13
  end
14
14
 
15
15
  def self.user_agent_parameters
@@ -234,7 +234,7 @@ module AdvancedBilling
234
234
  # @param [String] handle Required parameter: The handle of the component to
235
235
  # find
236
236
  # @return [ComponentResponse] response from the API call
237
- def read_component_by_handle(handle)
237
+ def find_component(handle)
238
238
  new_api_call_builder
239
239
  .request(new_request_builder(HttpMethodEnum::GET,
240
240
  '/components/lookup.json',
@@ -258,8 +258,8 @@ module AdvancedBilling
258
258
  # @param [String] component_id Required parameter: Either the Chargify id of
259
259
  # the component or the handle for the component prefixed with `handle:`
260
260
  # @return [ComponentResponse] response from the API call
261
- def read_component_by_id(product_family_id,
262
- component_id)
261
+ def read_component(product_family_id,
262
+ component_id)
263
263
  new_api_call_builder
264
264
  .request(new_request_builder(HttpMethodEnum::GET,
265
265
  '/product_families/{product_family_id}/components/{component_id}.json',
@@ -460,7 +460,7 @@ module AdvancedBilling
460
460
  # @param [Integer] price_point_id Required parameter: The Chargify id of the
461
461
  # price point
462
462
  # @return [ComponentResponse] response from the API call
463
- def update_default_price_point_for_component(component_id,
463
+ def promote_component_price_point_to_default(component_id,
464
464
  price_point_id)
465
465
  new_api_call_builder
466
466
  .request(new_request_builder(HttpMethodEnum::PUT,
@@ -639,8 +639,8 @@ module AdvancedBilling
639
639
  # @param [CreateComponentPricePointsRequest] body Optional parameter:
640
640
  # Example:
641
641
  # @return [ComponentPricePointsResponse] response from the API call
642
- def create_component_price_points(component_id,
643
- body: nil)
642
+ def bulk_create_component_price_points(component_id,
643
+ body: nil)
644
644
  new_api_call_builder
645
645
  .request(new_request_builder(HttpMethodEnum::POST,
646
646
  '/components/{component_id}/price_points/bulk.json',
@@ -149,8 +149,8 @@ module AdvancedBilling
149
149
  # the product family to which the coupon belongs
150
150
  # @param [String] code Optional parameter: The code of the coupon
151
151
  # @return [CouponResponse] response from the API call
152
- def read_coupon_by_code(product_family_id: nil,
153
- code: nil)
152
+ def find_coupon(product_family_id: nil,
153
+ code: nil)
154
154
  new_api_call_builder
155
155
  .request(new_request_builder(HttpMethodEnum::GET,
156
156
  '/coupons/find.json',
@@ -470,8 +470,8 @@ module AdvancedBilling
470
470
  # coupon
471
471
  # @param [CouponCurrencyRequest] body Optional parameter: Example:
472
472
  # @return [CouponCurrencyResponse] response from the API call
473
- def update_coupon_currency_prices(coupon_id,
474
- body: nil)
473
+ def create_or_update_coupon_currency_prices(coupon_id,
474
+ body: nil)
475
475
  new_api_call_builder
476
476
  .request(new_request_builder(HttpMethodEnum::PUT,
477
477
  '/coupons/{coupon_id}/currency_prices.json',
@@ -303,7 +303,11 @@ module AdvancedBilling
303
303
  .response(new_response_handler
304
304
  .deserializer(APIHelper.method(:custom_type_deserializer))
305
305
  .deserialize_into(Metadata.method(:from_hash))
306
- .is_response_array(true))
306
+ .is_response_array(true)
307
+ .local_error_template('422',
308
+ 'HTTP Response Not OK. Status code: {$statusCode}.'\
309
+ ' Response: \'{$response.body}\'.',
310
+ SingleErrorResponseException))
307
311
  .execute
308
312
  end
309
313
 
@@ -387,20 +391,21 @@ module AdvancedBilling
387
391
  # Use in query `per_page=200`.
388
392
  # @param [BasicDateField] date_field Optional parameter: The type of filter
389
393
  # you would like to apply to your search.
390
- # @param [String] start_date Optional parameter: The start date (format
394
+ # @param [Date] start_date Optional parameter: The start date (format
391
395
  # YYYY-MM-DD) with which to filter the date_field. Returns metadata with a
392
396
  # timestamp at or after midnight (12:00:00 AM) in your site’s time zone on
393
397
  # the date specified.
394
- # @param [String] end_date Optional parameter: The end date (format
398
+ # @param [Date] end_date Optional parameter: The end date (format
395
399
  # YYYY-MM-DD) with which to filter the date_field. Returns metadata with a
396
400
  # timestamp up to and including 11:59:59PM in your site’s time zone on the
397
401
  # date specified.
398
- # @param [String] start_datetime Optional parameter: The start date and time
399
- # (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns
400
- # metadata with a timestamp at or after exact time provided in query. You
401
- # can specify timezone in query - otherwise your site's time zone will be
402
- # used. If provided, this parameter will be used instead of start_date.
403
- # @param [String] end_datetime Optional parameter: The end date and time
402
+ # @param [DateTime] start_datetime Optional parameter: The start date and
403
+ # time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field.
404
+ # Returns metadata with a timestamp at or after exact time provided in
405
+ # query. You can specify timezone in query - otherwise your site's time zone
406
+ # will be used. If provided, this parameter will be used instead of
407
+ # start_date.
408
+ # @param [DateTime] end_datetime Optional parameter: The end date and time
404
409
  # (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns
405
410
  # metadata with a timestamp at or before exact time provided in query. You
406
411
  # can specify timezone in query - otherwise your site's time zone will be
@@ -219,9 +219,9 @@ module AdvancedBilling
219
219
  # Price Point belonging to the Component
220
220
  # @param [BulkCreateSegments] body Optional parameter: Example:
221
221
  # @return [ListSegmentsResponse] response from the API call
222
- def create_segments(component_id,
223
- price_point_id,
224
- body: nil)
222
+ def bulk_create_segments(component_id,
223
+ price_point_id,
224
+ body: nil)
225
225
  new_api_call_builder
226
226
  .request(new_request_builder(HttpMethodEnum::POST,
227
227
  '/components/{component_id}/price_points/{price_point_id}/segments/bulk.json',
@@ -264,9 +264,9 @@ module AdvancedBilling
264
264
  # Price Point belonging to the Component
265
265
  # @param [BulkUpdateSegments] body Optional parameter: Example:
266
266
  # @return [ListSegmentsResponse] response from the API call
267
- def update_segments(component_id,
268
- price_point_id,
269
- body: nil)
267
+ def bulk_update_segments(component_id,
268
+ price_point_id,
269
+ body: nil)
270
270
  new_api_call_builder
271
271
  .request(new_request_builder(HttpMethodEnum::PUT,
272
272
  '/components/{component_id}/price_points/{price_point_id}/segments/bulk.json',
@@ -92,8 +92,8 @@ module AdvancedBilling
92
92
  # @param [SortingDirection] direction Optional parameter: Controls the order
93
93
  # in which results are returned. Use in query `direction=asc`.
94
94
  # @return [ListMRRResponse] response from the API call
95
- def read_mrr_movements(options = {})
96
- warn 'Endpoint read_mrr_movements in InsightsController is deprecated'
95
+ def list_mrr_movements(options = {})
96
+ warn 'Endpoint list_mrr_movements in InsightsController is deprecated'
97
97
  new_api_call_builder
98
98
  .request(new_request_builder(HttpMethodEnum::GET,
99
99
  '/mrr_movements.json',
@@ -347,7 +347,7 @@ module AdvancedBilling
347
347
  # @param [CreateMultiInvoicePaymentRequest] body Optional parameter:
348
348
  # Example:
349
349
  # @return [MultiInvoicePaymentResponse] response from the API call
350
- def record_external_payment_for_invoices(body: nil)
350
+ def record_payment_for_multiple_invoices(body: nil)
351
351
  new_api_call_builder
352
352
  .request(new_request_builder(HttpMethodEnum::POST,
353
353
  '/invoices/payments.json',
@@ -571,7 +571,7 @@ module AdvancedBilling
571
571
  # @param [Direction] direction Optional parameter: Sort direction of the
572
572
  # returned segments.
573
573
  # @return [ConsolidatedInvoice] response from the API call
574
- def list_invoice_segments(options = {})
574
+ def list_consolidated_invoice_segments(options = {})
575
575
  new_api_call_builder
576
576
  .request(new_request_builder(HttpMethodEnum::GET,
577
577
  '/invoices/{invoice_uid}/segments.json',
@@ -78,7 +78,7 @@ module AdvancedBilling
78
78
  # @param [Integer] offer_id Required parameter: The Chargify id of the
79
79
  # offer
80
80
  # @return [OfferResponse] response from the API call
81
- def read_offers(offer_id)
81
+ def read_offer(offer_id)
82
82
  new_api_call_builder
83
83
  .request(new_request_builder(HttpMethodEnum::GET,
84
84
  '/offers/{offer_id}.json',
@@ -612,7 +612,7 @@ module AdvancedBilling
612
612
  # @param [Integer] payment_profile_id Required parameter: The Chargify id of
613
613
  # the payment profile
614
614
  # @return [PaymentProfileResponse] response from the API call
615
- def update_subscription_default_payment_profile(subscription_id,
615
+ def change_subscription_default_payment_profile(subscription_id,
616
616
  payment_profile_id)
617
617
  new_api_call_builder
618
618
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -650,7 +650,7 @@ module AdvancedBilling
650
650
  # @param [Integer] payment_profile_id Required parameter: The Chargify id of
651
651
  # the payment profile
652
652
  # @return [PaymentProfileResponse] response from the API call
653
- def update_subscription_group_default_payment_profile(uid,
653
+ def change_subscription_group_default_payment_profile(uid,
654
654
  payment_profile_id)
655
655
  new_api_call_builder
656
656
  .request(new_request_builder(HttpMethodEnum::POST,
@@ -282,8 +282,8 @@ module AdvancedBilling
282
282
  # @param [BulkCreateProductPricePointsRequest] body Optional parameter:
283
283
  # Example:
284
284
  # @return [BulkCreateProductPricePointsResponse] response from the API call
285
- def create_product_price_points(product_id,
286
- body: nil)
285
+ def bulk_create_product_price_points(product_id,
286
+ body: nil)
287
287
  new_api_call_builder
288
288
  .request(new_request_builder(HttpMethodEnum::POST,
289
289
  '/products/{product_id}/price_points/bulk.json',
@@ -126,8 +126,8 @@ module AdvancedBilling
126
126
  # @param [BulkComponentSPricePointAssignment] body Optional parameter:
127
127
  # Example:
128
128
  # @return [BulkComponentSPricePointAssignment] response from the API call
129
- def update_subscription_components_price_points(subscription_id,
130
- body: nil)
129
+ def bulk_update_subscription_components_price_points(subscription_id,
130
+ body: nil)
131
131
  new_api_call_builder
132
132
  .request(new_request_builder(HttpMethodEnum::POST,
133
133
  '/subscriptions/{subscription_id}/price_points.json',
@@ -156,7 +156,7 @@ module AdvancedBilling
156
156
  # @param [Integer] subscription_id Required parameter: The Chargify id of
157
157
  # the subscription
158
158
  # @return [SubscriptionResponse] response from the API call
159
- def reset_subscription_components_price_points(subscription_id)
159
+ def bulk_reset_subscription_components_price_points(subscription_id)
160
160
  new_api_call_builder
161
161
  .request(new_request_builder(HttpMethodEnum::POST,
162
162
  '/subscriptions/{subscription_id}/price_points/reset.json',
@@ -435,10 +435,10 @@ module AdvancedBilling
435
435
  # @param [UpdateAllocationExpirationDate] body Optional parameter:
436
436
  # Example:
437
437
  # @return [void] response from the API call
438
- def update_prepaid_usage_allocation(subscription_id,
439
- component_id,
440
- allocation_id,
441
- body: nil)
438
+ def update_prepaid_usage_allocation_expiration_date(subscription_id,
439
+ component_id,
440
+ allocation_id,
441
+ body: nil)
442
442
  new_api_call_builder
443
443
  .request(new_request_builder(HttpMethodEnum::PUT,
444
444
  '/subscriptions/{subscription_id}/components/{component_id}/allocations/{allocation_id}.json',
@@ -823,10 +823,10 @@ module AdvancedBilling
823
823
  # indicate the data-store.
824
824
  # @param [Array[EBBEvent]] body Optional parameter: Example:
825
825
  # @return [void] response from the API call
826
- def record_events(subdomain,
827
- api_handle,
828
- store_uid: nil,
829
- body: nil)
826
+ def bulk_record_events(subdomain,
827
+ api_handle,
828
+ store_uid: nil,
829
+ body: nil)
830
830
  new_api_call_builder
831
831
  .request(new_request_builder(HttpMethodEnum::POST,
832
832
  '/{subdomain}/events/{api_handle}/bulk.json',
@@ -97,8 +97,8 @@ module AdvancedBilling
97
97
  # group
98
98
  # @param [IssueServiceCreditRequest] body Optional parameter: Example:
99
99
  # @return [ServiceCreditResponse] response from the API call
100
- def issue_subscription_group_service_credits(uid,
101
- body: nil)
100
+ def issue_subscription_group_service_credit(uid,
101
+ body: nil)
102
102
  new_api_call_builder
103
103
  .request(new_request_builder(HttpMethodEnum::POST,
104
104
  '/subscription_groups/{uid}/service_credits.json',
@@ -128,8 +128,8 @@ module AdvancedBilling
128
128
  # group
129
129
  # @param [DeductServiceCreditRequest] body Optional parameter: Example:
130
130
  # @return [ServiceCredit] response from the API call
131
- def deduct_subscription_group_service_credits(uid,
132
- body: nil)
131
+ def deduct_subscription_group_service_credit(uid,
132
+ body: nil)
133
133
  new_api_call_builder
134
134
  .request(new_request_builder(HttpMethodEnum::POST,
135
135
  '/subscription_groups/{uid}/service_credit_deductions.json',
@@ -74,7 +74,7 @@ module AdvancedBilling
74
74
  # @param [String] uid Required parameter: The uid of the subscription
75
75
  # group
76
76
  # @return [void] response from the API call
77
- def stop_delayed_cancellation_for_group(uid)
77
+ def cancel_delayed_cancellation_for_group(uid)
78
78
  new_api_call_builder
79
79
  .request(new_request_builder(HttpMethodEnum::DELETE,
80
80
  '/subscription_groups/{uid}/delayed_cancel.json',
@@ -190,7 +190,7 @@ module AdvancedBilling
190
190
  # @param [String] subscription_id Required parameter: The Chargify id of the
191
191
  # subscription associated with the subscription group
192
192
  # @return [FullSubscriptionGroupResponse] response from the API call
193
- def read_subscription_group_by_subscription_id(subscription_id)
193
+ def find_subscription_group(subscription_id)
194
194
  new_api_call_builder
195
195
  .request(new_request_builder(HttpMethodEnum::GET,
196
196
  '/subscription_groups/lookup.json',
@@ -242,8 +242,8 @@ module AdvancedBilling
242
242
  # the subscription
243
243
  # @param [AddSubscriptionToAGroup] body Optional parameter: Example:
244
244
  # @return [SubscriptionGroupResponse] response from the API call
245
- def create_subscription_group_hierarchy(subscription_id,
246
- body: nil)
245
+ def add_subscription_to_group(subscription_id,
246
+ body: nil)
247
247
  new_api_call_builder
248
248
  .request(new_request_builder(HttpMethodEnum::POST,
249
249
  '/subscriptions/{subscription_id}/group.json',
@@ -376,7 +376,7 @@ module AdvancedBilling
376
376
  # @param [Integer] subscription_id Required parameter: The Chargify id of
377
377
  # the subscription
378
378
  # @return [DelayedCancellationResponse] response from the API call
379
- def stop_delayed_cancellation(subscription_id)
379
+ def cancel_delayed_cancellation(subscription_id)
380
380
  new_api_call_builder
381
381
  .request(new_request_builder(HttpMethodEnum::DELETE,
382
382
  '/subscriptions/{subscription_id}/delayed_cancel.json',
@@ -1056,7 +1056,7 @@ module AdvancedBilling
1056
1056
  # Use this endpoint to find a subscription by its reference.
1057
1057
  # @param [String] reference Optional parameter: Subscription reference
1058
1058
  # @return [SubscriptionResponse] response from the API call
1059
- def read_subscription_by_reference(reference: nil)
1059
+ def find_subscription(reference: nil)
1060
1060
  new_api_call_builder
1061
1061
  .request(new_request_builder(HttpMethodEnum::GET,
1062
1062
  '/subscriptions/lookup.json',
@@ -1114,8 +1114,8 @@ module AdvancedBilling
1114
1114
  # @param [UpsertPrepaidConfigurationRequest] body Optional parameter:
1115
1115
  # Example:
1116
1116
  # @return [PrepaidConfigurationResponse] response from the API call
1117
- def create_prepaid_subscription(subscription_id,
1118
- body: nil)
1117
+ def update_prepaid_subscription_configuration(subscription_id,
1118
+ body: nil)
1119
1119
  new_api_call_builder
1120
1120
  .request(new_request_builder(HttpMethodEnum::POST,
1121
1121
  '/subscriptions/{subscription_id}/prepaid_configurations.json',
@@ -1206,9 +1206,9 @@ module AdvancedBilling
1206
1206
  # be applied to a subscription
1207
1207
  # @param [AddCouponsRequest] body Optional parameter: Example:
1208
1208
  # @return [SubscriptionResponse] response from the API call
1209
- def apply_coupon_to_subscription(subscription_id,
1210
- code: nil,
1211
- body: nil)
1209
+ def apply_coupons_to_subscription(subscription_id,
1210
+ code: nil,
1211
+ body: nil)
1212
1212
  new_api_call_builder
1213
1213
  .request(new_request_builder(HttpMethodEnum::POST,
1214
1214
  '/subscriptions/{subscription_id}/add_coupon.json',
@@ -1241,7 +1241,7 @@ module AdvancedBilling
1241
1241
  # the subscription
1242
1242
  # @param [String] coupon_code Optional parameter: The coupon code
1243
1243
  # @return [String] response from the API call
1244
- def delete_coupon_from_subscription(subscription_id,
1244
+ def remove_coupon_from_subscription(subscription_id,
1245
1245
  coupon_code: nil)
1246
1246
  new_api_call_builder
1247
1247
  .request(new_request_builder(HttpMethodEnum::DELETE,
@@ -0,0 +1,79 @@
1
+ # advanced_billing
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module AdvancedBilling
7
+ # AddressChange Model.
8
+ class AddressChange < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [InvoiceAddress]
14
+ attr_accessor :before
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [InvoiceAddress]
18
+ attr_accessor :after
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['before'] = 'before'
24
+ @_hash['after'] = 'after'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(before = nil,
39
+ after = nil)
40
+ @before = before
41
+ @after = after
42
+ end
43
+
44
+ # Creates an instance of the object from a hash.
45
+ def self.from_hash(hash)
46
+ return nil unless hash
47
+
48
+ # Extract variables from the hash.
49
+ before = InvoiceAddress.from_hash(hash['before']) if hash['before']
50
+ after = InvoiceAddress.from_hash(hash['after']) if hash['after']
51
+
52
+ # Create object from extracted values.
53
+ AddressChange.new(before,
54
+ after)
55
+ end
56
+
57
+ # Validates an instance of the object from a given value.
58
+ # @param [AddressChange | Hash] The value against the validation is performed.
59
+ def self.validate(value)
60
+ if value.instance_of? self
61
+ return (
62
+ APIHelper.valid_type?(value.before,
63
+ ->(val) { InvoiceAddress.validate(val) }) and
64
+ APIHelper.valid_type?(value.after,
65
+ ->(val) { InvoiceAddress.validate(val) })
66
+ )
67
+ end
68
+
69
+ return false unless value.instance_of? Hash
70
+
71
+ (
72
+ APIHelper.valid_type?(value['before'],
73
+ ->(val) { InvoiceAddress.validate(val) }) and
74
+ APIHelper.valid_type?(value['after'],
75
+ ->(val) { InvoiceAddress.validate(val) })
76
+ )
77
+ end
78
+ end
79
+ end