maxio-advanced-billing-sdk 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -40
- data/lib/advanced_billing/controllers/advance_invoice_controller.rb +6 -4
- data/lib/advanced_billing/controllers/base_controller.rb +1 -1
- data/lib/advanced_billing/controllers/components_controller.rb +9 -58
- data/lib/advanced_billing/controllers/coupons_controller.rb +6 -115
- data/lib/advanced_billing/controllers/custom_fields_controller.rb +4 -4
- data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +5 -22
- data/lib/advanced_billing/controllers/insights_controller.rb +3 -4
- data/lib/advanced_billing/controllers/invoices_controller.rb +11 -0
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +26 -0
- data/lib/advanced_billing/controllers/product_families_controller.rb +5 -14
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +3 -40
- data/lib/advanced_billing/controllers/products_controller.rb +5 -14
- data/lib/advanced_billing/controllers/subscription_components_controller.rb +16 -66
- data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +5 -15
- data/lib/advanced_billing/controllers/subscription_groups_controller.rb +6 -6
- data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +13 -20
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +49 -14
- data/lib/advanced_billing/models/ach_agreement.rb +10 -0
- data/lib/advanced_billing/models/address_change.rb +0 -22
- data/lib/advanced_billing/models/agreement_acceptance.rb +10 -0
- data/lib/advanced_billing/models/allocation.rb +1 -3
- data/lib/advanced_billing/models/applied_credit_note_data.rb +10 -0
- data/lib/advanced_billing/models/apply_credit_note_event.rb +139 -0
- data/lib/advanced_billing/models/apply_credit_note_event_data.rb +3 -1
- data/lib/advanced_billing/models/apply_debit_note_event.rb +139 -0
- data/lib/advanced_billing/models/apply_debit_note_event_data.rb +36 -2
- data/lib/advanced_billing/models/apply_payment_event.rb +139 -0
- data/lib/advanced_billing/models/apply_payment_event_data.rb +21 -7
- data/lib/advanced_billing/models/backport_invoice_event.rb +139 -0
- data/lib/advanced_billing/models/bank_account_attributes.rb +10 -0
- data/lib/advanced_billing/models/billing_manifest.rb +5 -1
- data/lib/advanced_billing/models/billing_schedule.rb +10 -0
- data/lib/advanced_billing/models/change_chargeback_status_event.rb +141 -0
- data/lib/advanced_billing/models/change_chargeback_status_event_data.rb +73 -0
- data/lib/advanced_billing/models/change_invoice_collection_method_event.rb +141 -0
- data/lib/advanced_billing/models/change_invoice_status_event.rb +141 -0
- data/lib/advanced_billing/models/change_invoice_status_event_data.rb +131 -0
- data/lib/advanced_billing/models/chargeback_status.rb +29 -0
- data/lib/advanced_billing/models/component.rb +3 -13
- data/lib/advanced_billing/models/component_cost_data.rb +10 -0
- data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +10 -0
- data/lib/advanced_billing/models/component_custom_price.rb +10 -0
- data/lib/advanced_billing/models/component_price_point.rb +2 -13
- data/lib/advanced_billing/models/component_price_point_item.rb +10 -0
- data/lib/advanced_billing/models/coupon.rb +4 -14
- data/lib/advanced_billing/models/create_component_price_point.rb +6 -2
- data/lib/advanced_billing/models/create_component_price_point_request.rb +1 -1
- data/lib/advanced_billing/models/create_component_price_points_request.rb +1 -1
- data/lib/advanced_billing/models/create_credit_note_event.rb +139 -0
- data/lib/advanced_billing/models/create_debit_note_event.rb +139 -0
- data/lib/advanced_billing/models/create_invoice_payment_application.rb +22 -0
- data/lib/advanced_billing/models/create_multi_invoice_payment.rb +6 -2
- data/lib/advanced_billing/models/create_offer_component.rb +11 -0
- data/lib/advanced_billing/models/create_payment_profile.rb +4 -4
- data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +10 -4
- data/lib/advanced_billing/models/create_product_family.rb +14 -4
- data/lib/advanced_billing/models/create_subscription.rb +2 -2
- data/lib/advanced_billing/models/credit_card_attributes.rb +10 -0
- data/lib/advanced_billing/models/credit_note_application.rb +10 -0
- data/lib/advanced_billing/models/credit_note_line_item.rb +10 -0
- data/lib/advanced_billing/models/customer.rb +13 -1
- data/lib/advanced_billing/models/customer_attributes.rb +10 -0
- data/lib/advanced_billing/models/customer_change.rb +7 -22
- data/lib/advanced_billing/models/customer_custom_fields_change.rb +0 -22
- data/lib/advanced_billing/models/customer_payer_change.rb +0 -22
- data/lib/advanced_billing/models/debit_note.rb +351 -0
- data/lib/advanced_billing/models/debit_note_role.rb +23 -0
- data/lib/advanced_billing/models/debit_note_status.rb +29 -0
- data/lib/advanced_billing/models/deduct_service_credit.rb +10 -16
- data/lib/advanced_billing/models/dunner_data.rb +38 -0
- data/lib/advanced_billing/models/dunning_step_data.rb +34 -0
- data/lib/advanced_billing/models/dunning_step_reached.rb +12 -6
- data/lib/advanced_billing/models/failed_payment_event.rb +139 -0
- data/lib/advanced_billing/models/failed_payment_event_data.rb +132 -0
- data/lib/advanced_billing/models/group_billing.rb +10 -0
- data/lib/advanced_billing/models/group_settings.rb +4 -2
- data/lib/advanced_billing/models/group_target.rb +14 -0
- data/lib/advanced_billing/models/historic_usage.rb +109 -0
- data/lib/advanced_billing/models/include_null_or_not_null.rb +23 -0
- data/lib/advanced_billing/models/invoice.rb +18 -8
- data/lib/advanced_billing/models/invoice_address.rb +10 -0
- data/lib/advanced_billing/models/invoice_balance_item.rb +10 -0
- data/lib/advanced_billing/models/invoice_credit.rb +10 -0
- data/lib/advanced_billing/models/invoice_custom_field.rb +10 -0
- data/lib/advanced_billing/models/invoice_customer.rb +10 -0
- data/lib/advanced_billing/models/invoice_discount.rb +10 -0
- data/lib/advanced_billing/models/invoice_discount_breakout.rb +10 -0
- data/lib/advanced_billing/models/invoice_display_settings.rb +10 -0
- data/lib/advanced_billing/models/invoice_event_type.rb +3 -0
- data/lib/advanced_billing/models/invoice_issued.rb +6 -2
- data/lib/advanced_billing/models/invoice_line_item.rb +3 -3
- data/lib/advanced_billing/models/invoice_line_item_event_data.rb +10 -0
- data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +10 -0
- data/lib/advanced_billing/models/invoice_payer.rb +10 -0
- data/lib/advanced_billing/models/invoice_payment.rb +10 -0
- data/lib/advanced_billing/models/invoice_payment_method.rb +10 -0
- data/lib/advanced_billing/models/invoice_pre_payment.rb +0 -10
- data/lib/advanced_billing/models/invoice_previous_balance.rb +10 -0
- data/lib/advanced_billing/models/invoice_refund.rb +10 -0
- data/lib/advanced_billing/models/invoice_seller.rb +10 -0
- data/lib/advanced_billing/models/invoice_status.rb +2 -2
- data/lib/advanced_billing/models/invoice_tax.rb +10 -0
- data/lib/advanced_billing/models/invoice_tax_breakout.rb +10 -0
- data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +10 -0
- data/lib/advanced_billing/models/issue_invoice_event.rb +139 -0
- data/lib/advanced_billing/models/issue_invoice_event_data.rb +6 -6
- data/lib/advanced_billing/models/issue_service_credit.rb +10 -16
- data/lib/advanced_billing/models/item_price_point_changed.rb +8 -4
- data/lib/advanced_billing/models/item_price_point_data.rb +10 -0
- data/lib/advanced_billing/models/list_components_filter.rb +74 -0
- data/lib/advanced_billing/models/list_coupons_filter.rb +168 -0
- data/lib/advanced_billing/models/list_invoice_events_response.rb +14 -11
- data/lib/advanced_billing/models/{refund_prepayment_aggregated_error.rb → list_mrr_filter.rb} +14 -12
- data/lib/advanced_billing/models/{list_subscription_group_prepayment_date_field.rb → list_prepayment_date_field.rb} +4 -4
- data/lib/advanced_billing/models/list_prepayments_filter.rb +88 -0
- data/lib/advanced_billing/models/list_price_points_filter.rb +163 -0
- data/lib/advanced_billing/models/list_products_filter.rb +81 -0
- data/lib/advanced_billing/models/list_segments_filter.rb +103 -0
- data/lib/advanced_billing/models/list_subscription_components_filter.rb +74 -0
- data/lib/advanced_billing/models/list_subscription_components_for_site_filter.rb +84 -0
- data/lib/advanced_billing/models/list_subscription_components_include.rb +4 -1
- data/lib/advanced_billing/models/metafield_scope.rb +10 -0
- data/lib/advanced_billing/models/nested_subscription_group.rb +0 -10
- data/lib/advanced_billing/models/origin_invoice.rb +10 -0
- data/lib/advanced_billing/models/overage_pricing.rb +14 -0
- data/lib/advanced_billing/models/paid_invoice.rb +2 -2
- data/lib/advanced_billing/models/payer_attributes.rb +10 -0
- data/lib/advanced_billing/models/prepaid_component_price_point.rb +10 -0
- data/lib/advanced_billing/models/prepaid_product_price_point_filter.rb +56 -0
- data/lib/advanced_billing/models/prepaid_usage.rb +6 -2
- data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +10 -0
- data/lib/advanced_billing/models/product.rb +5 -16
- data/lib/advanced_billing/models/product_price_point.rb +9 -0
- data/lib/advanced_billing/models/proforma_invoice.rb +2 -2
- data/lib/advanced_billing/models/proforma_invoice_issued.rb +6 -2
- data/lib/advanced_billing/models/reactivation_billing.rb +10 -0
- data/lib/advanced_billing/models/record_payment_response.rb +1 -13
- data/lib/advanced_billing/models/refund_invoice_event.rb +139 -0
- data/lib/advanced_billing/models/refund_invoice_event_data.rb +4 -2
- data/lib/advanced_billing/models/refund_invoice_request.rb +1 -1
- data/lib/advanced_billing/models/refund_prepayment.rb +3 -1
- data/lib/advanced_billing/models/remove_payment_event.rb +139 -0
- data/lib/advanced_billing/models/remove_payment_event_data.rb +1 -1
- data/lib/advanced_billing/models/segment_price.rb +10 -0
- data/lib/advanced_billing/models/subscription.rb +10 -16
- data/lib/advanced_billing/models/subscription_component.rb +26 -7
- data/lib/advanced_billing/models/subscription_component_subscription.rb +10 -0
- data/lib/advanced_billing/models/subscription_filter.rb +153 -0
- data/lib/advanced_billing/models/subscription_group.rb +2 -2
- data/lib/advanced_billing/models/subscription_group_bank_account.rb +10 -0
- data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +10 -0
- data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +3 -1
- data/lib/advanced_billing/models/subscription_group_signup.rb +2 -2
- data/lib/advanced_billing/models/subscription_group_signup_failure.rb +4 -2
- data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +10 -0
- data/lib/advanced_billing/models/subscription_group_signup_item.rb +10 -0
- data/lib/advanced_billing/models/subscription_group_signup_response.rb +2 -2
- data/lib/advanced_billing/models/subscription_group_signup_success.rb +8 -4
- data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +50 -0
- data/lib/advanced_billing/models/update_customer.rb +12 -0
- data/lib/advanced_billing/models/update_subscription_component.rb +10 -0
- data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +10 -0
- data/lib/advanced_billing/models/usage.rb +3 -1
- data/lib/advanced_billing/models/void_invoice_event.rb +139 -0
- data/lib/advanced_billing/models/void_invoice_event_data.rb +8 -7
- data/lib/advanced_billing/models/void_remainder_event.rb +139 -0
- data/lib/advanced_billing/models/void_remainder_event_data.rb +4 -2
- data/lib/advanced_billing/utilities/union_type_lookup.rb +69 -199
- data/lib/advanced_billing.rb +42 -18
- metadata +38 -17
- data/lib/advanced_billing/exceptions/refund_prepayment_aggregated_errors_response_exception.rb +0 -33
- data/lib/advanced_billing/models/billing_address.rb +0 -117
- data/lib/advanced_billing/models/credit_note1.rb +0 -419
- data/lib/advanced_billing/models/customer1.rb +0 -125
- data/lib/advanced_billing/models/invoice_event.rb +0 -124
- data/lib/advanced_billing/models/invoice_event_data.rb +0 -447
- data/lib/advanced_billing/models/invoice_event_payment.rb +0 -168
- data/lib/advanced_billing/models/invoice_event_payment1.rb +0 -160
- data/lib/advanced_billing/models/prepayment_aggregated_error.rb +0 -81
- data/lib/advanced_billing/models/price_point.rb +0 -216
- data/lib/advanced_billing/models/refund.rb +0 -138
- data/lib/advanced_billing/models/seller.rb +0 -92
- data/lib/advanced_billing/models/shipping_address.rb +0 -117
@@ -24,6 +24,8 @@ module AdvancedBilling
|
|
24
24
|
# @param [BasicDateField] date_field Optional parameter: The type of filter
|
25
25
|
# you would like to apply to your search. Use in query:
|
26
26
|
# `date_field=created_at`.
|
27
|
+
# @param [ListProductsFilter] filter Optional parameter: Filter to use for
|
28
|
+
# List Products operations
|
27
29
|
# @param [String] start_date Optional parameter: The start date (format
|
28
30
|
# YYYY-MM-DD) with which to filter the date_field. Returns products with a
|
29
31
|
# timestamp at or after midnight (12:00:00 AM) in your site’s time zone on
|
@@ -47,17 +49,6 @@ module AdvancedBilling
|
|
47
49
|
# @param [ListProductsInclude] include Optional parameter: Allows including
|
48
50
|
# additional data in the response. Use in query
|
49
51
|
# `include=prepaid_product_price_point`.
|
50
|
-
# @param [IncludeNotNull]
|
51
|
-
# filter_prepaid_product_price_point_product_price_point_id Optional
|
52
|
-
# parameter: Allows fetching products only if a prepaid product price point
|
53
|
-
# is present or not. To use this filter you also have to include the
|
54
|
-
# following param in the request `include=prepaid_product_price_point`. Use
|
55
|
-
# in query
|
56
|
-
# `filter[prepaid_product_price_point][product_price_point_id]=not_null`.
|
57
|
-
# @param [TrueClass | FalseClass] filter_use_site_exchange_rate Optional
|
58
|
-
# parameter: Allows fetching products with matching use_site_exchange_rate
|
59
|
-
# based on provided value (refers to default price point). Use in query
|
60
|
-
# `filter[use_site_exchange_rate]=true`.
|
61
52
|
# @return [Array[ProductResponse]] response from the API call
|
62
53
|
def list_products_for_product_family(options = {})
|
63
54
|
new_api_call_builder
|
@@ -70,16 +61,16 @@ module AdvancedBilling
|
|
70
61
|
.query_param(new_parameter(options['page'], key: 'page'))
|
71
62
|
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
72
63
|
.query_param(new_parameter(options['date_field'], key: 'date_field'))
|
64
|
+
.query_param(new_parameter(options['filter'], key: 'filter'))
|
73
65
|
.query_param(new_parameter(options['start_date'], key: 'start_date'))
|
74
66
|
.query_param(new_parameter(options['end_date'], key: 'end_date'))
|
75
67
|
.query_param(new_parameter(options['start_datetime'], key: 'start_datetime'))
|
76
68
|
.query_param(new_parameter(options['end_datetime'], key: 'end_datetime'))
|
77
69
|
.query_param(new_parameter(options['include_archived'], key: 'include_archived'))
|
78
70
|
.query_param(new_parameter(options['include'], key: 'include'))
|
79
|
-
.query_param(new_parameter(options['filter_prepaid_product_price_point_product_price_point_id'], key: 'filter[prepaid_product_price_point][product_price_point_id]'))
|
80
|
-
.query_param(new_parameter(options['filter_use_site_exchange_rate'], key: 'filter[use_site_exchange_rate]'))
|
81
71
|
.header_param(new_parameter('application/json', key: 'accept'))
|
82
|
-
.auth(Single.new('BasicAuth'))
|
72
|
+
.auth(Single.new('BasicAuth'))
|
73
|
+
.array_serialization_format(ArraySerializationFormat::CSV))
|
83
74
|
.response(new_response_handler
|
84
75
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
85
76
|
.deserialize_into(ProductResponse.method(:from_hash))
|
@@ -381,38 +381,8 @@ module AdvancedBilling
|
|
381
381
|
# to a Site.
|
382
382
|
# @param [SortingDirection] direction Optional parameter: Controls the order
|
383
383
|
# in which results are returned. Use in query `direction=asc`.
|
384
|
-
# @param [
|
385
|
-
#
|
386
|
-
# `filter[archived_at]=not_null`.
|
387
|
-
# @param [BasicDateField] filter_date_field Optional parameter: The type of
|
388
|
-
# filter you would like to apply to your search. Use in query:
|
389
|
-
# `filter[date_field]=created_at`.
|
390
|
-
# @param [Date] filter_end_date Optional parameter: The end date (format
|
391
|
-
# YYYY-MM-DD) with which to filter the date_field. Returns price points with
|
392
|
-
# a timestamp up to and including 11:59:59PM in your site’s time zone on the
|
393
|
-
# date specified.
|
394
|
-
# @param [DateTime] filter_end_datetime Optional parameter: The end date and
|
395
|
-
# time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field.
|
396
|
-
# Returns price points with a timestamp at or before exact time provided in
|
397
|
-
# query. You can specify timezone in query - otherwise your site's time zone
|
398
|
-
# will be used. If provided, this parameter will be used instead of
|
399
|
-
# end_date.
|
400
|
-
# @param [Array[Integer]] filter_ids Optional parameter: Allows fetching
|
401
|
-
# price points with matching id based on provided values. Use in query:
|
402
|
-
# `filter[ids]=1,2,3`.
|
403
|
-
# @param [Date] filter_start_date Optional parameter: The start date (format
|
404
|
-
# YYYY-MM-DD) with which to filter the date_field. Returns price points with
|
405
|
-
# a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on
|
406
|
-
# the date specified.
|
407
|
-
# @param [DateTime] filter_start_datetime Optional parameter: The start date
|
408
|
-
# and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field.
|
409
|
-
# Returns price points with a timestamp at or after exact time provided in
|
410
|
-
# query. You can specify timezone in query - otherwise your site's time zone
|
411
|
-
# will be used. If provided, this parameter will be used instead of
|
412
|
-
# start_date.
|
413
|
-
# @param [Array[PricePointType]] filter_type Optional parameter: Allows
|
414
|
-
# fetching price points with matching type. Use in query:
|
415
|
-
# `filter[type]=catalog,custom`.
|
384
|
+
# @param [ListPricePointsFilter] filter Optional parameter: Filter to use
|
385
|
+
# for List PricePoints operations
|
416
386
|
# @param [ListProductsPricePointsInclude] include Optional parameter: Allows
|
417
387
|
# including additional data in the response. Use in query:
|
418
388
|
# `include=currency_prices`.
|
@@ -434,14 +404,7 @@ module AdvancedBilling
|
|
434
404
|
'/products_price_points.json',
|
435
405
|
Server::DEFAULT)
|
436
406
|
.query_param(new_parameter(options['direction'], key: 'direction'))
|
437
|
-
.query_param(new_parameter(options['
|
438
|
-
.query_param(new_parameter(options['filter_date_field'], key: 'filter[date_field]'))
|
439
|
-
.query_param(new_parameter(options['filter_end_date'], key: 'filter[end_date]'))
|
440
|
-
.query_param(new_parameter(options['filter_end_datetime'], key: 'filter[end_datetime]'))
|
441
|
-
.query_param(new_parameter(options['filter_ids'], key: 'filter[ids]'))
|
442
|
-
.query_param(new_parameter(options['filter_start_date'], key: 'filter[start_date]'))
|
443
|
-
.query_param(new_parameter(options['filter_start_datetime'], key: 'filter[start_datetime]'))
|
444
|
-
.query_param(new_parameter(options['filter_type'], key: 'filter[type]'))
|
407
|
+
.query_param(new_parameter(options['filter'], key: 'filter'))
|
445
408
|
.query_param(new_parameter(options['include'], key: 'include'))
|
446
409
|
.query_param(new_parameter(options['page'], key: 'page'))
|
447
410
|
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
@@ -149,6 +149,8 @@ module AdvancedBilling
|
|
149
149
|
# @param [BasicDateField] date_field Optional parameter: The type of filter
|
150
150
|
# you would like to apply to your search. Use in query:
|
151
151
|
# `date_field=created_at`.
|
152
|
+
# @param [ListProductsFilter] filter Optional parameter: Filter to use for
|
153
|
+
# List Products operations
|
152
154
|
# @param [Date] end_date Optional parameter: The end date (format
|
153
155
|
# YYYY-MM-DD) with which to filter the date_field. Returns products with a
|
154
156
|
# timestamp up to and including 11:59:59PM in your site’s time zone on the
|
@@ -184,17 +186,6 @@ module AdvancedBilling
|
|
184
186
|
# @param [ListProductsInclude] include Optional parameter: Allows including
|
185
187
|
# additional data in the response. Use in query
|
186
188
|
# `include=prepaid_product_price_point`.
|
187
|
-
# @param [IncludeNotNull]
|
188
|
-
# filter_prepaid_product_price_point_product_price_point_id Optional
|
189
|
-
# parameter: Allows fetching products only if a prepaid product price point
|
190
|
-
# is present or not. To use this filter you also have to include the
|
191
|
-
# following param in the request `include=prepaid_product_price_point`. Use
|
192
|
-
# in query
|
193
|
-
# `filter[prepaid_product_price_point][product_price_point_id]=not_null`.
|
194
|
-
# @param [TrueClass | FalseClass] filter_use_site_exchange_rate Optional
|
195
|
-
# parameter: Allows fetching products with matching use_site_exchange_rate
|
196
|
-
# based on provided value (refers to default price point). Use in query
|
197
|
-
# `filter[use_site_exchange_rate]=true`.
|
198
189
|
# @return [Array[ProductResponse]] response from the API call
|
199
190
|
def list_products(options = {})
|
200
191
|
new_api_call_builder
|
@@ -202,6 +193,7 @@ module AdvancedBilling
|
|
202
193
|
'/products.json',
|
203
194
|
Server::DEFAULT)
|
204
195
|
.query_param(new_parameter(options['date_field'], key: 'date_field'))
|
196
|
+
.query_param(new_parameter(options['filter'], key: 'filter'))
|
205
197
|
.query_param(new_parameter(options['end_date'], key: 'end_date'))
|
206
198
|
.query_param(new_parameter(options['end_datetime'], key: 'end_datetime'))
|
207
199
|
.query_param(new_parameter(options['start_date'], key: 'start_date'))
|
@@ -210,10 +202,9 @@ module AdvancedBilling
|
|
210
202
|
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
211
203
|
.query_param(new_parameter(options['include_archived'], key: 'include_archived'))
|
212
204
|
.query_param(new_parameter(options['include'], key: 'include'))
|
213
|
-
.query_param(new_parameter(options['filter_prepaid_product_price_point_product_price_point_id'], key: 'filter[prepaid_product_price_point][product_price_point_id]'))
|
214
|
-
.query_param(new_parameter(options['filter_use_site_exchange_rate'], key: 'filter[use_site_exchange_rate]'))
|
215
205
|
.header_param(new_parameter('application/json', key: 'accept'))
|
216
|
-
.auth(Single.new('BasicAuth'))
|
206
|
+
.auth(Single.new('BasicAuth'))
|
207
|
+
.array_serialization_format(ArraySerializationFormat::CSV))
|
217
208
|
.response(new_response_handler
|
218
209
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
219
210
|
.deserialize_into(ProductResponse.method(:from_hash))
|
@@ -48,6 +48,8 @@ module AdvancedBilling
|
|
48
48
|
# `date_field=updated_at`.
|
49
49
|
# @param [SortingDirection] direction Optional parameter: Controls the order
|
50
50
|
# in which results are returned. Use in query `direction=asc`.
|
51
|
+
# @param [ListSubscriptionComponentsFilter] filter Optional parameter:
|
52
|
+
# Filter to use for List Subscription Components operation
|
51
53
|
# @param [String] end_date Optional parameter: The end date (format
|
52
54
|
# YYYY-MM-DD) with which to filter the date_field. Returns components with a
|
53
55
|
# timestamp up to and including 11:59:59PM in your site’s time zone on the
|
@@ -74,16 +76,13 @@ module AdvancedBilling
|
|
74
76
|
# components with a timestamp at or after exact time provided in query. You
|
75
77
|
# can specify timezone in query - otherwise your site''s time zone will be
|
76
78
|
# used. If provided, this parameter will be used instead of start_date.
|
77
|
-
# @param [ListSubscriptionComponentsInclude] include Optional
|
78
|
-
# Allows including additional data in the response. Use in query
|
79
|
-
# `include=subscription`.
|
80
|
-
# @param [TrueClass | FalseClass]
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
# @param [Array[String]] filter_currencies Optional parameter: Allows
|
85
|
-
# fetching components allocation with matching currency based on provided
|
86
|
-
# values. Use in query `filter[currencies]=EUR,USD`.
|
79
|
+
# @param [Array[ListSubscriptionComponentsInclude]] include Optional
|
80
|
+
# parameter: Allows including additional data in the response. Use in query
|
81
|
+
# `include=subscription,historic_usages`.
|
82
|
+
# @param [TrueClass | FalseClass] in_use Optional parameter: If in_use is
|
83
|
+
# set to true, it returns only components that are currently in use.
|
84
|
+
# However, if it's set to false or not provided, it returns all components
|
85
|
+
# connected with the subscription.
|
87
86
|
# @return [Array[SubscriptionComponentResponse]] response from the API call
|
88
87
|
def list_subscription_components(options = {})
|
89
88
|
new_api_call_builder
|
@@ -95,6 +94,7 @@ module AdvancedBilling
|
|
95
94
|
.should_encode(true))
|
96
95
|
.query_param(new_parameter(options['date_field'], key: 'date_field'))
|
97
96
|
.query_param(new_parameter(options['direction'], key: 'direction'))
|
97
|
+
.query_param(new_parameter(options['filter'], key: 'filter'))
|
98
98
|
.query_param(new_parameter(options['end_date'], key: 'end_date'))
|
99
99
|
.query_param(new_parameter(options['end_datetime'], key: 'end_datetime'))
|
100
100
|
.query_param(new_parameter(options['price_point_ids'], key: 'price_point_ids'))
|
@@ -103,8 +103,7 @@ module AdvancedBilling
|
|
103
103
|
.query_param(new_parameter(options['start_date'], key: 'start_date'))
|
104
104
|
.query_param(new_parameter(options['start_datetime'], key: 'start_datetime'))
|
105
105
|
.query_param(new_parameter(options['include'], key: 'include'))
|
106
|
-
.query_param(new_parameter(options['
|
107
|
-
.query_param(new_parameter(options['filter_currencies'], key: 'filter[currencies]'))
|
106
|
+
.query_param(new_parameter(options['in_use'], key: 'in_use'))
|
108
107
|
.header_param(new_parameter('application/json', key: 'accept'))
|
109
108
|
.auth(Single.new('BasicAuth'))
|
110
109
|
.array_serialization_format(ArraySerializationFormat::CSV))
|
@@ -869,6 +868,9 @@ module AdvancedBilling
|
|
869
868
|
# attribute by which to sort. Use in query: `sort=updated_at`.
|
870
869
|
# @param [SortingDirection] direction Optional parameter: Controls the order
|
871
870
|
# in which results are returned. Use in query `direction=asc`.
|
871
|
+
# @param [ListSubscriptionComponentsForSiteFilter] filter Optional
|
872
|
+
# parameter: Filter to use for List Subscription Components For Site
|
873
|
+
# operation
|
872
874
|
# @param [SubscriptionListDateField] date_field Optional parameter: The type
|
873
875
|
# of filter you'd like to apply to your search. Use in query:
|
874
876
|
# `date_field=updated_at`.
|
@@ -903,52 +905,7 @@ module AdvancedBilling
|
|
903
905
|
# provided ids. Use in query `product_family_ids=1,2,3`.
|
904
906
|
# @param [ListSubscriptionComponentsInclude] include Optional parameter:
|
905
907
|
# Allows including additional data in the response. Use in query
|
906
|
-
# `include=subscription`.
|
907
|
-
# @param [TrueClass | FalseClass] filter_use_site_exchange_rate Optional
|
908
|
-
# parameter: Allows fetching components allocation with matching
|
909
|
-
# use_site_exchange_rate based on provided value. Use in query
|
910
|
-
# `filter[use_site_exchange_rate]=true`.
|
911
|
-
# @param [Array[String]] filter_currencies Optional parameter: Allows
|
912
|
-
# fetching components allocation with matching currency based on provided
|
913
|
-
# values. Use in query `filter[currencies]=USD,EUR`.
|
914
|
-
# @param [Array[SubscriptionStateFilter]] filter_subscription_states
|
915
|
-
# Optional parameter: Allows fetching components allocations that belong to
|
916
|
-
# the subscription with matching states based on provided values. To use
|
917
|
-
# this filter you also have to include the following param in the request
|
918
|
-
# `include=subscription`. Use in query
|
919
|
-
# `filter[subscription][states]=active,canceled&include=subscription`.
|
920
|
-
# @param [SubscriptionListDateField] filter_subscription_date_field Optional
|
921
|
-
# parameter: The type of filter you'd like to apply to your search. To use
|
922
|
-
# this filter you also have to include the following param in the request
|
923
|
-
# `include=subscription`.
|
924
|
-
# @param [Date] filter_subscription_start_date Optional parameter: The start
|
925
|
-
# date (format YYYY-MM-DD) with which to filter the date_field. Returns
|
926
|
-
# components that belong to the subscription with a timestamp at or after
|
927
|
-
# midnight (12:00:00 AM) in your site’s time zone on the date specified. To
|
928
|
-
# use this filter you also have to include the following param in the
|
929
|
-
# request `include=subscription`.
|
930
|
-
# @param [DateTime] filter_subscription_start_datetime Optional parameter:
|
931
|
-
# The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter
|
932
|
-
# the date_field. Returns components that belong to the subscription with a
|
933
|
-
# timestamp at or after exact time provided in query. You can specify
|
934
|
-
# timezone in query - otherwise your site''s time zone will be used. If
|
935
|
-
# provided, this parameter will be used instead of start_date. To use this
|
936
|
-
# filter you also have to include the following param in the request
|
937
|
-
# `include=subscription`.
|
938
|
-
# @param [Date] filter_subscription_end_date Optional parameter: The end
|
939
|
-
# date (format YYYY-MM-DD) with which to filter the date_field. Returns
|
940
|
-
# components that belong to the subscription with a timestamp up to and
|
941
|
-
# including 11:59:59PM in your site’s time zone on the date specified. To
|
942
|
-
# use this filter you also have to include the following param in the
|
943
|
-
# request `include=subscription`.
|
944
|
-
# @param [DateTime] filter_subscription_end_datetime Optional parameter: The
|
945
|
-
# end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the
|
946
|
-
# date_field. Returns components that belong to the subscription with a
|
947
|
-
# timestamp at or before exact time provided in query. You can specify
|
948
|
-
# timezone in query - otherwise your site''s time zone will be used. If
|
949
|
-
# provided, this parameter will be used instead of end_date. To use this
|
950
|
-
# filter you also have to include the following param in the request
|
951
|
-
# `include=subscription`.
|
908
|
+
# `include=subscription,historic_usages`.
|
952
909
|
# @return [ListSubscriptionComponentsResponse] response from the API call
|
953
910
|
def list_subscription_components_for_site(options = {})
|
954
911
|
new_api_call_builder
|
@@ -959,6 +916,7 @@ module AdvancedBilling
|
|
959
916
|
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
960
917
|
.query_param(new_parameter(options['sort'], key: 'sort'))
|
961
918
|
.query_param(new_parameter(options['direction'], key: 'direction'))
|
919
|
+
.query_param(new_parameter(options['filter'], key: 'filter'))
|
962
920
|
.query_param(new_parameter(options['date_field'], key: 'date_field'))
|
963
921
|
.query_param(new_parameter(options['start_date'], key: 'start_date'))
|
964
922
|
.query_param(new_parameter(options['start_datetime'], key: 'start_datetime'))
|
@@ -968,14 +926,6 @@ module AdvancedBilling
|
|
968
926
|
.query_param(new_parameter(options['price_point_ids'], key: 'price_point_ids'))
|
969
927
|
.query_param(new_parameter(options['product_family_ids'], key: 'product_family_ids'))
|
970
928
|
.query_param(new_parameter(options['include'], key: 'include'))
|
971
|
-
.query_param(new_parameter(options['filter_use_site_exchange_rate'], key: 'filter[use_site_exchange_rate]'))
|
972
|
-
.query_param(new_parameter(options['filter_currencies'], key: 'filter[currencies]'))
|
973
|
-
.query_param(new_parameter(options['filter_subscription_states'], key: 'filter[subscription][states]'))
|
974
|
-
.query_param(new_parameter(options['filter_subscription_date_field'], key: 'filter[subscription][date_field]'))
|
975
|
-
.query_param(new_parameter(options['filter_subscription_start_date'], key: 'filter[subscription][start_date]'))
|
976
|
-
.query_param(new_parameter(options['filter_subscription_start_datetime'], key: 'filter[subscription][start_datetime]'))
|
977
|
-
.query_param(new_parameter(options['filter_subscription_end_date'], key: 'filter[subscription][end_date]'))
|
978
|
-
.query_param(new_parameter(options['filter_subscription_end_datetime'], key: 'filter[subscription][end_datetime]'))
|
979
929
|
.header_param(new_parameter('application/json', key: 'accept'))
|
980
930
|
.auth(Single.new('BasicAuth'))
|
981
931
|
.array_serialization_format(ArraySerializationFormat::CSV))
|
@@ -42,17 +42,6 @@ module AdvancedBilling
|
|
42
42
|
# This request will list a subscription group's prepayments.
|
43
43
|
# @param [String] uid Required parameter: The uid of the subscription
|
44
44
|
# group
|
45
|
-
# @param [ListSubscriptionGroupPrepaymentDateField] filter_date_field
|
46
|
-
# Optional parameter: The type of filter you would like to apply to your
|
47
|
-
# search. Use in query: `filter[date_field]=created_at`.
|
48
|
-
# @param [Date] filter_end_date Optional parameter: The end date (format
|
49
|
-
# YYYY-MM-DD) with which to filter the date_field. Returns prepayments with
|
50
|
-
# a timestamp up to and including 11:59:59PM in your site's time zone on the
|
51
|
-
# date specified. Use in query: `filter[end_date]=2011-12-15`.
|
52
|
-
# @param [Date] filter_start_date Optional parameter: The start date (format
|
53
|
-
# YYYY-MM-DD) with which to filter the date_field. Returns prepayments with
|
54
|
-
# a timestamp at or after midnight (12:00:00 AM) in your site's time zone on
|
55
|
-
# the date specified. Use in query: `filter[start_date]=2011-12-15`.
|
56
45
|
# @param [Integer] page Optional parameter: Result records are organized in
|
57
46
|
# pages. By default, the first page of results is displayed. The page
|
58
47
|
# parameter specifies a page number of results to fetch. You can start
|
@@ -64,6 +53,8 @@ module AdvancedBilling
|
|
64
53
|
# many records to fetch in each request. Default value is 20. The maximum
|
65
54
|
# allowed values is 200; any per_page value over 200 will be changed to 200.
|
66
55
|
# Use in query `per_page=200`.
|
56
|
+
# @param [ListPrepaymentsFilter] filter Optional parameter: Filter to use
|
57
|
+
# for List Prepayments operations
|
67
58
|
# @return [ListSubscriptionGroupPrepaymentResponse] response from the API call
|
68
59
|
def list_prepayments_for_subscription_group(options = {})
|
69
60
|
new_api_call_builder
|
@@ -73,13 +64,12 @@ module AdvancedBilling
|
|
73
64
|
.template_param(new_parameter(options['uid'], key: 'uid')
|
74
65
|
.is_required(true)
|
75
66
|
.should_encode(true))
|
76
|
-
.query_param(new_parameter(options['filter_date_field'], key: 'filter[date_field]'))
|
77
|
-
.query_param(new_parameter(options['filter_end_date'], key: 'filter[end_date]'))
|
78
|
-
.query_param(new_parameter(options['filter_start_date'], key: 'filter[start_date]'))
|
79
67
|
.query_param(new_parameter(options['page'], key: 'page'))
|
80
68
|
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
69
|
+
.query_param(new_parameter(options['filter'], key: 'filter'))
|
81
70
|
.header_param(new_parameter('application/json', key: 'accept'))
|
82
|
-
.auth(Single.new('BasicAuth'))
|
71
|
+
.auth(Single.new('BasicAuth'))
|
72
|
+
.array_serialization_format(ArraySerializationFormat::CSV))
|
83
73
|
.response(new_response_handler
|
84
74
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
85
75
|
.deserialize_into(ListSubscriptionGroupPrepaymentResponse.method(:from_hash))
|
@@ -93,10 +93,10 @@ module AdvancedBilling
|
|
93
93
|
Server::DEFAULT)
|
94
94
|
.query_param(new_parameter(options['page'], key: 'page'))
|
95
95
|
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
96
|
-
.query_param(new_parameter(options['include'], key: 'include
|
96
|
+
.query_param(new_parameter(options['include'], key: 'include'))
|
97
97
|
.header_param(new_parameter('application/json', key: 'accept'))
|
98
98
|
.auth(Single.new('BasicAuth'))
|
99
|
-
.array_serialization_format(ArraySerializationFormat::
|
99
|
+
.array_serialization_format(ArraySerializationFormat::UN_INDEXED))
|
100
100
|
.response(new_response_handler
|
101
101
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
102
102
|
.deserialize_into(ListSubscriptionGroupsResponse.method(:from_hash)))
|
@@ -124,10 +124,10 @@ module AdvancedBilling
|
|
124
124
|
.template_param(new_parameter(uid, key: 'uid')
|
125
125
|
.is_required(true)
|
126
126
|
.should_encode(true))
|
127
|
-
.query_param(new_parameter(include, key: 'include
|
127
|
+
.query_param(new_parameter(include, key: 'include'))
|
128
128
|
.header_param(new_parameter('application/json', key: 'accept'))
|
129
129
|
.auth(Single.new('BasicAuth'))
|
130
|
-
.array_serialization_format(ArraySerializationFormat::
|
130
|
+
.array_serialization_format(ArraySerializationFormat::UN_INDEXED))
|
131
131
|
.response(new_response_handler
|
132
132
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
133
133
|
.deserialize_into(FullSubscriptionGroupResponse.method(:from_hash)))
|
@@ -135,8 +135,8 @@ module AdvancedBilling
|
|
135
135
|
end
|
136
136
|
|
137
137
|
# Use this endpoint to update subscription group members.
|
138
|
-
# `"member_ids"
|
139
|
-
#
|
138
|
+
# `"member_ids"` should contain an array of both subscription IDs to set as
|
139
|
+
# group members and subscription IDs already present in the groups. Not
|
140
140
|
# including them will result in removing them from subscription group. To
|
141
141
|
# clean up members, just leave the array empty.
|
142
142
|
# @param [String] uid Required parameter: The uid of the subscription
|
@@ -78,18 +78,8 @@ module AdvancedBilling
|
|
78
78
|
# many records to fetch in each request. Default value is 20. The maximum
|
79
79
|
# allowed values is 200; any per_page value over 200 will be changed to 200.
|
80
80
|
# Use in query `per_page=200`.
|
81
|
-
# @param [
|
82
|
-
#
|
83
|
-
# prepayment was created. application_at - Time when prepayment was applied
|
84
|
-
# to invoice. Use in query `filter[date_field]=created_at`.
|
85
|
-
# @param [Date] filter_start_date Optional parameter: The start date (format
|
86
|
-
# YYYY-MM-DD) with which to filter the date_field. Returns prepayments with
|
87
|
-
# a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on
|
88
|
-
# the date specified. Use in query `filter[start_date]=2011-12-15`.
|
89
|
-
# @param [Date] filter_end_date Optional parameter: The end date (format
|
90
|
-
# YYYY-MM-DD) with which to filter the date_field. Returns prepayments with
|
91
|
-
# a timestamp up to and including 11:59:59PM in your site’s time zone on the
|
92
|
-
# date specified. Use in query `filter[end_date]=2011-12-15`.
|
81
|
+
# @param [ListPrepaymentsFilter] filter Optional parameter: Filter to use
|
82
|
+
# for List Prepayments operations
|
93
83
|
# @return [PrepaymentsResponse] response from the API call
|
94
84
|
def list_prepayments(options = {})
|
95
85
|
new_api_call_builder
|
@@ -101,11 +91,10 @@ module AdvancedBilling
|
|
101
91
|
.should_encode(true))
|
102
92
|
.query_param(new_parameter(options['page'], key: 'page'))
|
103
93
|
.query_param(new_parameter(options['per_page'], key: 'per_page'))
|
104
|
-
.query_param(new_parameter(options['
|
105
|
-
.query_param(new_parameter(options['filter_start_date'], key: 'filter[start_date]'))
|
106
|
-
.query_param(new_parameter(options['filter_end_date'], key: 'filter[end_date]'))
|
94
|
+
.query_param(new_parameter(options['filter'], key: 'filter'))
|
107
95
|
.header_param(new_parameter('application/json', key: 'accept'))
|
108
|
-
.auth(Single.new('BasicAuth'))
|
96
|
+
.auth(Single.new('BasicAuth'))
|
97
|
+
.array_serialization_format(ArraySerializationFormat::CSV))
|
109
98
|
.response(new_response_handler
|
110
99
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
111
100
|
.deserialize_into(PrepaymentsResponse.method(:from_hash))
|
@@ -138,7 +127,11 @@ module AdvancedBilling
|
|
138
127
|
.auth(Single.new('BasicAuth')))
|
139
128
|
.response(new_response_handler
|
140
129
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
141
|
-
.deserialize_into(ServiceCredit.method(:from_hash))
|
130
|
+
.deserialize_into(ServiceCredit.method(:from_hash))
|
131
|
+
.local_error_template('422',
|
132
|
+
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
133
|
+
' Response: \'{$response.body}\'.',
|
134
|
+
APIException))
|
142
135
|
.execute
|
143
136
|
end
|
144
137
|
|
@@ -167,7 +160,7 @@ module AdvancedBilling
|
|
167
160
|
.local_error_template('422',
|
168
161
|
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
169
162
|
' Response: \'{$response.body}\'.',
|
170
|
-
|
163
|
+
APIException))
|
171
164
|
.execute
|
172
165
|
end
|
173
166
|
|
@@ -179,7 +172,7 @@ module AdvancedBilling
|
|
179
172
|
# in cents, with `amount_in_cents`.
|
180
173
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
181
174
|
# the subscription
|
182
|
-
# @param [
|
175
|
+
# @param [Integer] prepayment_id Required parameter: id of prepayment
|
183
176
|
# @param [RefundPrepaymentRequest] body Optional parameter: Example:
|
184
177
|
# @return [PrepaymentResponse] response from the API call
|
185
178
|
def refund_prepayment(subscription_id,
|
@@ -213,7 +206,7 @@ module AdvancedBilling
|
|
213
206
|
.local_error_template('422',
|
214
207
|
'HTTP Response Not OK. Status code: {$statusCode}.'\
|
215
208
|
' Response: \'{$response.body}\'.',
|
216
|
-
|
209
|
+
APIException))
|
217
210
|
.execute
|
218
211
|
end
|
219
212
|
end
|
@@ -377,18 +377,16 @@ module AdvancedBilling
|
|
377
377
|
# For more information on Stripe Direct Debit, please view the following two
|
378
378
|
# resources:
|
379
379
|
# + [Payment Profiles via API for Stripe BECS Direct
|
380
|
-
# Debit](
|
381
|
-
# payment-profile#stripe-becs-direct-debit)
|
380
|
+
# Debit]($e/Payment%20Profiles/createPaymentProfile)
|
382
381
|
# + [Full documentation on Stripe Direct
|
383
382
|
# Debit](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405050826765-
|
384
383
|
# Stripe-SEPA-and-BECS-Direct-Debit)
|
385
|
-
# + [Using Chargify.js with Stripe SEPA or
|
386
|
-
# example](
|
387
|
-
#
|
388
|
-
# )
|
384
|
+
# + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal
|
385
|
+
# example](page:development-tools/chargify-js/examples#minimal-example-with-
|
386
|
+
# sepa-becs-or-bacs-direct-debit-stripe-gateway)
|
389
387
|
# + [Using Chargify.js with Stripe BECS Direct Debit - full
|
390
|
-
# example](
|
391
|
-
#
|
388
|
+
# example](page:development-tools/chargify-js/examples#full-example-with-bec
|
389
|
+
# s-direct-debit-stripe-gateway)
|
392
390
|
# ```json
|
393
391
|
# {
|
394
392
|
# "subscription": {
|
@@ -407,6 +405,43 @@ module AdvancedBilling
|
|
407
405
|
# }
|
408
406
|
# }
|
409
407
|
# ```
|
408
|
+
# ## Subscription using Stripe BACS Direct Debit
|
409
|
+
# For more information on Stripe Direct Debit, please view the following two
|
410
|
+
# resources:
|
411
|
+
# + [Payment Profiles via API for Stripe BACS Direct
|
412
|
+
# Debit]($e/Payment%20Profiles/createPaymentProfile)
|
413
|
+
# + [Full documentation on Stripe Direct
|
414
|
+
# Debit](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405050826765-
|
415
|
+
# Stripe-SEPA-and-BECS-Direct-Debit)
|
416
|
+
# + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal
|
417
|
+
# example](page:development-tools/chargify-js/examples#minimal-example-with-
|
418
|
+
# sepa-becs-or-bacs-direct-debit-stripe-gateway)
|
419
|
+
# + [Using Chargify.js with Stripe BACS Direct Debit - full
|
420
|
+
# example](page:development-tools/chargify-js/examples#full-example-with-bac
|
421
|
+
# s-direct-debit-stripe-gateway)
|
422
|
+
# ```json
|
423
|
+
# {
|
424
|
+
# "subscription": {
|
425
|
+
# "product_handle": "gold-product",
|
426
|
+
# "customer_attributes": {
|
427
|
+
# "first_name": "Jane",
|
428
|
+
# "last_name": "Doe",
|
429
|
+
# "email": "jd@chargify.test"
|
430
|
+
# },
|
431
|
+
# "bank_account_attributes": {
|
432
|
+
# "bank_name": "Test Bank",
|
433
|
+
# "bank_branch_code": "108800",
|
434
|
+
# "bank_account_number": "00012345",
|
435
|
+
# "payment_type": "bank_account",
|
436
|
+
# "billing_address": "123 Main St.",
|
437
|
+
# "billing_city": "London",
|
438
|
+
# "billing_state": "LND",
|
439
|
+
# "billing_zip": "W1A 1AA",
|
440
|
+
# "billing_country": "GB"
|
441
|
+
# }
|
442
|
+
# }
|
443
|
+
# }
|
444
|
+
# ```
|
410
445
|
# ## 3D Secure - Stripe
|
411
446
|
# It may happen that a payment needs 3D Secure Authentication when the
|
412
447
|
# subscription is created; this is referred to in our help docs as a
|
@@ -863,10 +898,10 @@ module AdvancedBilling
|
|
863
898
|
.query_param(new_parameter(options['metadata'], key: 'metadata'))
|
864
899
|
.query_param(new_parameter(options['direction'], key: 'direction'))
|
865
900
|
.query_param(new_parameter(options['sort'], key: 'sort'))
|
866
|
-
.query_param(new_parameter(options['include'], key: 'include
|
901
|
+
.query_param(new_parameter(options['include'], key: 'include'))
|
867
902
|
.header_param(new_parameter('application/json', key: 'accept'))
|
868
903
|
.auth(Single.new('BasicAuth'))
|
869
|
-
.array_serialization_format(ArraySerializationFormat::
|
904
|
+
.array_serialization_format(ArraySerializationFormat::UN_INDEXED))
|
870
905
|
.response(new_response_handler
|
871
906
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
872
907
|
.deserialize_into(SubscriptionResponse.method(:from_hash))
|
@@ -984,10 +1019,10 @@ module AdvancedBilling
|
|
984
1019
|
.template_param(new_parameter(subscription_id, key: 'subscription_id')
|
985
1020
|
.is_required(true)
|
986
1021
|
.should_encode(true))
|
987
|
-
.query_param(new_parameter(include, key: 'include
|
1022
|
+
.query_param(new_parameter(include, key: 'include'))
|
988
1023
|
.header_param(new_parameter('application/json', key: 'accept'))
|
989
1024
|
.auth(Single.new('BasicAuth'))
|
990
|
-
.array_serialization_format(ArraySerializationFormat::
|
1025
|
+
.array_serialization_format(ArraySerializationFormat::UN_INDEXED))
|
991
1026
|
.response(new_response_handler
|
992
1027
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
993
1028
|
.deserialize_into(SubscriptionResponse.method(:from_hash)))
|
@@ -1100,9 +1135,9 @@ module AdvancedBilling
|
|
1100
1135
|
.should_encode(true))
|
1101
1136
|
.query_param(new_parameter(ack, key: 'ack')
|
1102
1137
|
.is_required(true))
|
1103
|
-
.query_param(new_parameter(cascade, key: 'cascade
|
1138
|
+
.query_param(new_parameter(cascade, key: 'cascade'))
|
1104
1139
|
.auth(Single.new('BasicAuth'))
|
1105
|
-
.array_serialization_format(ArraySerializationFormat::
|
1140
|
+
.array_serialization_format(ArraySerializationFormat::CSV))
|
1106
1141
|
.response(new_response_handler
|
1107
1142
|
.is_response_void(true))
|
1108
1143
|
.execute
|
@@ -94,5 +94,15 @@ module AdvancedBilling
|
|
94
94
|
ip_address,
|
95
95
|
hash)
|
96
96
|
end
|
97
|
+
|
98
|
+
# Validates an instance of the object from a given value.
|
99
|
+
# @param [ACHAgreement | Hash] The value against the validation is performed.
|
100
|
+
def self.validate(value)
|
101
|
+
return true if value.instance_of? self
|
102
|
+
|
103
|
+
return false unless value.instance_of? Hash
|
104
|
+
|
105
|
+
true
|
106
|
+
end
|
97
107
|
end
|
98
108
|
end
|
@@ -63,27 +63,5 @@ module AdvancedBilling
|
|
63
63
|
after,
|
64
64
|
hash)
|
65
65
|
end
|
66
|
-
|
67
|
-
# Validates an instance of the object from a given value.
|
68
|
-
# @param [AddressChange | Hash] The value against the validation is performed.
|
69
|
-
def self.validate(value)
|
70
|
-
if value.instance_of? self
|
71
|
-
return (
|
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
|
-
|
79
|
-
return false unless value.instance_of? Hash
|
80
|
-
|
81
|
-
(
|
82
|
-
APIHelper.valid_type?(value['before'],
|
83
|
-
->(val) { InvoiceAddress.validate(val) }) and
|
84
|
-
APIHelper.valid_type?(value['after'],
|
85
|
-
->(val) { InvoiceAddress.validate(val) })
|
86
|
-
)
|
87
|
-
end
|
88
66
|
end
|
89
67
|
end
|
@@ -123,5 +123,15 @@ module AdvancedBilling
|
|
123
123
|
secure_checkout_policy_url,
|
124
124
|
hash)
|
125
125
|
end
|
126
|
+
|
127
|
+
# Validates an instance of the object from a given value.
|
128
|
+
# @param [AgreementAcceptance | Hash] The value against the validation is performed.
|
129
|
+
def self.validate(value)
|
130
|
+
return true if value.instance_of? self
|
131
|
+
|
132
|
+
return false unless value.instance_of? Hash
|
133
|
+
|
134
|
+
true
|
135
|
+
end
|
126
136
|
end
|
127
137
|
end
|
@@ -326,9 +326,7 @@ module AdvancedBilling
|
|
326
326
|
hash.key?('upgrade_charge') ? hash['upgrade_charge'] : SKIP
|
327
327
|
downgrade_credit =
|
328
328
|
hash.key?('downgrade_credit') ? hash['downgrade_credit'] : SKIP
|
329
|
-
payment =
|
330
|
-
UnionTypeLookUp.get(:AllocationPayment), hash['payment']
|
331
|
-
) : SKIP
|
329
|
+
payment = PaymentForAllocation.from_hash(hash['payment']) if hash['payment']
|
332
330
|
expires_at = if hash.key?('expires_at')
|
333
331
|
(DateTimeHelper.from_rfc3339(hash['expires_at']) if hash['expires_at'])
|
334
332
|
else
|