maxio-advanced-billing-sdk 7.0.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +101 -43
- data/bin/console +15 -0
- data/lib/advanced_billing/client.rb +14 -3
- data/lib/advanced_billing/configuration.rb +82 -5
- data/lib/advanced_billing/controllers/advance_invoice_controller.rb +2 -2
- data/lib/advanced_billing/controllers/base_controller.rb +1 -1
- data/lib/advanced_billing/controllers/billing_portal_controller.rb +2 -2
- data/lib/advanced_billing/controllers/component_price_points_controller.rb +3 -4
- data/lib/advanced_billing/controllers/components_controller.rb +7 -8
- data/lib/advanced_billing/controllers/coupons_controller.rb +5 -11
- data/lib/advanced_billing/controllers/custom_fields_controller.rb +102 -128
- data/lib/advanced_billing/controllers/customers_controller.rb +6 -6
- data/lib/advanced_billing/controllers/invoices_controller.rb +48 -11
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +76 -250
- data/lib/advanced_billing/controllers/product_families_controller.rb +7 -8
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +15 -17
- data/lib/advanced_billing/controllers/products_controller.rb +7 -8
- data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +1 -1
- data/lib/advanced_billing/controllers/sales_commissions_controller.rb +3 -3
- data/lib/advanced_billing/controllers/subscription_components_controller.rb +53 -44
- data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +9 -9
- data/lib/advanced_billing/controllers/subscription_groups_controller.rb +10 -5
- data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +1 -1
- data/lib/advanced_billing/controllers/subscription_products_controller.rb +6 -7
- data/lib/advanced_billing/controllers/subscription_status_controller.rb +6 -7
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +87 -810
- data/lib/advanced_billing/controllers/webhooks_controller.rb +23 -48
- data/lib/advanced_billing/http/auth/basic_auth.rb +12 -0
- data/lib/advanced_billing/http/proxy_settings.rb +22 -0
- data/lib/advanced_billing/models/activate_event_based_component.rb +1 -2
- data/lib/advanced_billing/models/all_vaults.rb +45 -0
- data/lib/advanced_billing/models/allocation_preview_direction.rb +13 -0
- data/lib/advanced_billing/models/allocation_preview_line_item_kind.rb +15 -0
- data/lib/advanced_billing/models/apple_pay_vault.rb +6 -0
- data/lib/advanced_billing/models/auto_invite.rb +19 -0
- data/lib/advanced_billing/models/bank_account_holder_type.rb +13 -0
- data/lib/advanced_billing/models/bank_account_type.rb +13 -0
- data/lib/advanced_billing/models/bank_account_vault.rb +19 -0
- data/lib/advanced_billing/models/basic_date_field.rb +13 -0
- data/lib/advanced_billing/models/billing_manifest_line_item_kind.rb +17 -0
- data/lib/advanced_billing/models/billing_schedule.rb +2 -2
- data/lib/advanced_billing/models/calendar_billing.rb +3 -1
- data/lib/advanced_billing/models/cancellation_method.rb +17 -0
- data/lib/advanced_billing/models/card_type.rb +47 -0
- data/lib/advanced_billing/models/chargeback_status.rb +15 -0
- data/lib/advanced_billing/models/chargify_ebb.rb +4 -4
- data/lib/advanced_billing/models/cleanup_scope.rb +13 -0
- data/lib/advanced_billing/models/collection_method.rb +15 -0
- data/lib/advanced_billing/models/component.rb +31 -31
- data/lib/advanced_billing/models/component_custom_price.rb +61 -3
- data/lib/advanced_billing/models/component_kind.rb +16 -0
- data/lib/advanced_billing/models/compounding_strategy.rb +13 -0
- data/lib/advanced_billing/models/create_allocation.rb +1 -2
- data/lib/advanced_billing/models/create_invoice_coupon.rb +16 -7
- data/lib/advanced_billing/models/create_invoice_item.rb +5 -5
- data/lib/advanced_billing/models/create_invoice_status.rb +13 -0
- data/lib/advanced_billing/models/create_metafield.rb +3 -5
- data/lib/advanced_billing/models/create_or_update_product.rb +12 -7
- data/lib/advanced_billing/models/create_payment_profile.rb +6 -6
- data/lib/advanced_billing/models/create_prepayment_method.rb +19 -0
- data/lib/advanced_billing/models/create_product_price_point.rb +8 -3
- data/lib/advanced_billing/models/create_signup_proforma_preview_include.rb +6 -0
- data/lib/advanced_billing/models/create_usage.rb +17 -7
- data/lib/advanced_billing/models/credit_card_vault.rb +44 -0
- data/lib/advanced_billing/models/credit_note_status.rb +13 -0
- data/lib/advanced_billing/models/credit_scheme.rb +14 -0
- data/lib/advanced_billing/models/credit_type.rb +14 -0
- data/lib/advanced_billing/models/currency_price_role.rb +14 -0
- data/lib/advanced_billing/models/custom_field_owner.rb +13 -0
- data/lib/advanced_billing/models/debit_note_role.rb +13 -0
- data/lib/advanced_billing/models/debit_note_status.rb +15 -0
- data/lib/advanced_billing/models/direction.rb +13 -0
- data/lib/advanced_billing/models/discount_type.rb +13 -0
- data/lib/advanced_billing/models/ebb_component.rb +2 -2
- data/lib/advanced_billing/models/event_key.rb +91 -0
- data/lib/advanced_billing/models/expiration_interval_unit.rb +14 -0
- data/lib/advanced_billing/models/failed_payment_action.rb +14 -0
- data/lib/advanced_billing/models/first_charge_type.rb +14 -0
- data/lib/advanced_billing/models/group_target_type.rb +16 -0
- data/lib/advanced_billing/models/group_type.rb +13 -0
- data/lib/advanced_billing/models/include_not_null.rb +6 -0
- data/lib/advanced_billing/models/include_null_or_not_null.rb +13 -0
- data/lib/advanced_billing/models/include_option.rb +13 -0
- data/lib/advanced_billing/models/interval_unit.rb +13 -0
- data/lib/advanced_billing/models/invoice_consolidation_level.rb +14 -0
- data/lib/advanced_billing/models/invoice_date_field.rb +16 -0
- data/lib/advanced_billing/models/invoice_discount_source_type.rb +14 -0
- data/lib/advanced_billing/models/invoice_discount_type.rb +14 -0
- data/lib/advanced_billing/models/invoice_event_payment_method.rb +16 -0
- data/lib/advanced_billing/models/invoice_event_type.rb +26 -0
- data/lib/advanced_billing/models/invoice_payment_method_type.rb +17 -0
- data/lib/advanced_billing/models/invoice_payment_type.rb +15 -0
- data/lib/advanced_billing/models/invoice_role.rb +21 -0
- data/lib/advanced_billing/models/invoice_sort_field.rb +19 -0
- data/lib/advanced_billing/models/invoice_status.rb +18 -0
- data/lib/advanced_billing/models/item_category.rb +16 -0
- data/lib/advanced_billing/models/line_item_kind.rb +21 -0
- data/lib/advanced_billing/models/line_item_transaction_type.rb +18 -0
- data/lib/advanced_billing/models/list_components_price_points_include.rb +6 -0
- data/lib/advanced_billing/models/list_coupons_filter.rb +22 -6
- data/lib/advanced_billing/models/list_events_date_field.rb +6 -0
- data/lib/advanced_billing/models/list_prepayment_date_field.rb +13 -0
- data/lib/advanced_billing/models/list_products_include.rb +6 -0
- data/lib/advanced_billing/models/list_products_price_points_include.rb +6 -0
- data/lib/advanced_billing/models/list_subscription_components_include.rb +13 -0
- data/lib/advanced_billing/models/list_subscription_components_sort.rb +13 -0
- data/lib/advanced_billing/models/metafield.rb +8 -11
- data/lib/advanced_billing/models/metafield_input.rb +18 -5
- data/lib/advanced_billing/models/metafield_scope.rb +9 -4
- data/lib/advanced_billing/models/metered_component.rb +2 -2
- data/lib/advanced_billing/models/nested_subscription_group.rb +10 -0
- data/lib/advanced_billing/models/on_off_component.rb +2 -2
- data/lib/advanced_billing/models/pay_pal_vault.rb +15 -0
- data/lib/advanced_billing/models/payment_profile_attributes.rb +3 -3
- data/lib/advanced_billing/models/payment_type.rb +15 -0
- data/lib/advanced_billing/models/prepaid_configuration.rb +10 -0
- data/lib/advanced_billing/models/prepaid_usage_component.rb +2 -2
- data/lib/advanced_billing/models/prepayment_method.rb +18 -0
- data/lib/advanced_billing/models/price_point_type.rb +14 -0
- data/lib/advanced_billing/models/pricing_scheme.rb +15 -0
- data/lib/advanced_billing/models/product.rb +18 -8
- data/lib/advanced_billing/models/product_family.rb +10 -0
- data/lib/advanced_billing/models/product_price_point.rb +8 -3
- data/lib/advanced_billing/models/proforma_invoice_discount_source_type.rb +13 -0
- data/lib/advanced_billing/models/proforma_invoice_role.rb +15 -0
- data/lib/advanced_billing/models/proforma_invoice_status.rb +14 -0
- data/lib/advanced_billing/models/proforma_invoice_tax_source_type.rb +13 -0
- data/lib/advanced_billing/models/public_signup_page.rb +10 -0
- data/lib/advanced_billing/models/quantity_based_component.rb +2 -2
- data/lib/advanced_billing/models/reactivation_charge.rb +14 -0
- data/lib/advanced_billing/models/recurring_scheme.rb +14 -0
- data/lib/advanced_billing/models/resource_type.rb +13 -0
- data/lib/advanced_billing/models/restriction_type.rb +13 -0
- data/lib/advanced_billing/models/resume_options.rb +1 -1
- data/lib/advanced_billing/models/resumption_charge.rb +14 -0
- data/lib/advanced_billing/models/service_credit_type.rb +13 -0
- data/lib/advanced_billing/models/snap_day.rb +7 -2
- data/lib/advanced_billing/models/sorting_direction.rb +13 -0
- data/lib/advanced_billing/models/subscription.rb +16 -3
- data/lib/advanced_billing/models/subscription_custom_price.rb +23 -7
- data/lib/advanced_billing/models/subscription_date_field.rb +20 -0
- data/lib/advanced_billing/models/subscription_group_include.rb +6 -0
- data/lib/advanced_billing/models/subscription_group_prepayment_method.rb +17 -0
- data/lib/advanced_billing/models/subscription_groups_list_include.rb +6 -0
- data/lib/advanced_billing/models/subscription_include.rb +13 -0
- data/lib/advanced_billing/models/subscription_included_coupon.rb +10 -0
- data/lib/advanced_billing/models/subscription_list_date_field.rb +6 -0
- data/lib/advanced_billing/models/subscription_list_include.rb +6 -0
- data/lib/advanced_billing/models/subscription_purge_type.rb +13 -0
- data/lib/advanced_billing/models/subscription_sort.rb +17 -0
- data/lib/advanced_billing/models/subscription_state.rb +26 -0
- data/lib/advanced_billing/models/subscription_state_filter.rb +23 -0
- data/lib/advanced_billing/models/tax_configuration_kind.rb +15 -0
- data/lib/advanced_billing/models/tax_destination_address.rb +15 -0
- data/lib/advanced_billing/models/trial_type.rb +41 -0
- data/lib/advanced_billing/models/update_component.rb +2 -2
- data/lib/advanced_billing/models/update_metafield.rb +4 -6
- data/lib/advanced_billing/models/update_payment_profile.rb +3 -3
- data/lib/advanced_billing/models/update_subscription.rb +1 -0
- data/lib/advanced_billing/models/webhook_order.rb +13 -0
- data/lib/advanced_billing/models/webhook_status.rb +15 -0
- data/lib/advanced_billing/models/webhook_subscription.rb +46 -0
- data/lib/advanced_billing/utilities/union_type_lookup.rb +32 -5
- data/lib/advanced_billing.rb +2 -0
- metadata +11 -8
|
@@ -6,40 +6,27 @@
|
|
|
6
6
|
module AdvancedBilling
|
|
7
7
|
# PaymentProfilesController
|
|
8
8
|
class PaymentProfilesController < BaseController
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
# the
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
# }
|
|
31
|
-
# }
|
|
32
|
-
# ```
|
|
33
|
-
# ## Taxable Subscriptions
|
|
34
|
-
# If your subscriber pays taxes on their purchased product, and you are
|
|
35
|
-
# attempting to create or update the `payment_profile`, complete address
|
|
36
|
-
# information is required. For information on required address formatting to
|
|
37
|
-
# allow your subscriber to be taxed, please see our documentation
|
|
38
|
-
# [here](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-s
|
|
39
|
-
# ignups#taxes)
|
|
40
|
-
# ## Payment Profile Documentation
|
|
41
|
-
# Full documentation on how Payment Profiles operate within Advanced Billing
|
|
42
|
-
# can be located under the following links:
|
|
9
|
+
# Creates a payment profile for a customer.
|
|
10
|
+
# When you create a new payment profile for a customer via the API, it does
|
|
11
|
+
# not automatically make the profile current for any of the customer’s
|
|
12
|
+
# subscriptions. To use the payment profile as the default, you must set it
|
|
13
|
+
# explicitly for the subscription or subscription group.
|
|
14
|
+
# Select an option from the **Request Examples** drop-down on the right side
|
|
15
|
+
# of the portal to see examples of common scenarios for creating payment
|
|
16
|
+
# profiles.
|
|
17
|
+
# Do not use real card information for testing. See the Sites articles that
|
|
18
|
+
# cover [testing your site
|
|
19
|
+
# setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Ove
|
|
20
|
+
# rview#testing-overview-0-0) for more details on testing in your sandbox.
|
|
21
|
+
# Note that collecting and sending raw card details in production requires
|
|
22
|
+
# [PCI
|
|
23
|
+
# compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Co
|
|
24
|
+
# mpliance#pci-compliance-0-0) on your end. If your business is not PCI
|
|
25
|
+
# compliant, use
|
|
26
|
+
# [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Char
|
|
27
|
+
# gify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank
|
|
28
|
+
# account information.
|
|
29
|
+
# See the following articles to learn more about subscriptions and payments:
|
|
43
30
|
# + [Subscriber Payment
|
|
44
31
|
# Details](https://maxio.zendesk.com/hc/en-us/articles/24251599929613-Subscr
|
|
45
32
|
# iption-Summary-Payment-Details-Tab)
|
|
@@ -49,211 +36,50 @@ module AdvancedBilling
|
|
|
49
36
|
# + [Public Signup Pages payment
|
|
50
37
|
# settings](https://maxio.zendesk.com/hc/en-us/articles/24261368332557-Indiv
|
|
51
38
|
# idual-Page-Settings)
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
-
#
|
|
66
|
-
#
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
-
#
|
|
70
|
-
#
|
|
71
|
-
#
|
|
72
|
-
#
|
|
73
|
-
#
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
#
|
|
77
|
-
# [here](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-s
|
|
78
|
-
# ignups#taxes)
|
|
79
|
-
# ## BraintreeBlue
|
|
80
|
-
# Some merchants use Braintree JavaScript libraries directly and then pass
|
|
81
|
-
# `payment_method_nonce` and/or `paypal_email` to create a payment profile.
|
|
82
|
-
# This implementation is deprecated and does not handle 3D Secure. Instead,
|
|
83
|
-
# we have provided
|
|
84
|
-
# [Chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0
|
|
85
|
-
# NjAzNDI0-overview) which is continuously improved and supports Credit
|
|
86
|
-
# Cards (along with 3D Secure), PayPal and ApplePay payment types.
|
|
87
|
-
# ## GoCardless
|
|
88
|
-
# For more information on GoCardless, please view the following resources:
|
|
39
|
+
# +
|
|
40
|
+
# [Taxes](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-
|
|
41
|
+
# signups#taxes)
|
|
42
|
+
# +
|
|
43
|
+
# [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Char
|
|
44
|
+
# gify-js-Overview)
|
|
45
|
+
# + [Chargify.js with GoCardless - minimal
|
|
46
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
|
47
|
+
# h_01K0PJ15QQZKCER8CFK40MR6XJ)
|
|
48
|
+
# + [Chargify.js with GoCardless - full
|
|
49
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
|
50
|
+
# h_01K0PJ15QR09JVHWW0MCA7HVJV)
|
|
51
|
+
# + [Chargify.js with Stripe Direct Debit - minimal
|
|
52
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
|
53
|
+
# h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
|
|
54
|
+
# + [Chargify.js with Stripe Direct Debit - full
|
|
55
|
+
# example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#
|
|
56
|
+
# h_01K0PJ15QRECQQ4ECS3ZA55GY7)
|
|
57
|
+
# + [Chargify.js with Stripe BECS Direct Debit - minimal
|
|
58
|
+
# example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
|
|
59
|
+
# DIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway
|
|
60
|
+
# )
|
|
61
|
+
# + [Chargify.js with Stripe BECS Direct Debit - full
|
|
62
|
+
# example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
|
|
63
|
+
# DIy-examples#full-example-with-sepa-direct-debit-stripe-gateway)
|
|
89
64
|
# + [Full documentation on
|
|
90
65
|
# GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoC
|
|
91
66
|
# ardless)
|
|
92
|
-
# + [Using Chargify.js with GoCardless - minimal
|
|
93
|
-
# example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
|
|
94
|
-
# DIy-examples#minimal-example-with-direct-debit-gocardless-gateway)
|
|
95
|
-
# + [Using Chargify.js with GoCardless - full
|
|
96
|
-
# example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
|
|
97
|
-
# DIy-examples#full-example-with-direct-debit-gocardless-gateway)
|
|
98
|
-
# ### GoCardless with Local Bank Details
|
|
99
|
-
# Following examples create customer, bank account and mandate in
|
|
100
|
-
# GoCardless:
|
|
101
|
-
# ```json
|
|
102
|
-
# {
|
|
103
|
-
# "payment_profile": {
|
|
104
|
-
# "customer_id": "Valid-Customer-ID",
|
|
105
|
-
# "bank_name": "Royal Bank of France",
|
|
106
|
-
# "bank_account_number": "0000000",
|
|
107
|
-
# "bank_routing_number": "0003",
|
|
108
|
-
# "bank_branch_code": "00006",
|
|
109
|
-
# "payment_type": "bank_account",
|
|
110
|
-
# "billing_address": "20 Place de la Gare",
|
|
111
|
-
# "billing_city": "Colombes",
|
|
112
|
-
# "billing_state": "Île-de-France",
|
|
113
|
-
# "billing_zip": "92700",
|
|
114
|
-
# "billing_country": "FR"
|
|
115
|
-
# }
|
|
116
|
-
# }
|
|
117
|
-
# ```
|
|
118
|
-
# ### GoCardless with IBAN
|
|
119
|
-
# ```json
|
|
120
|
-
# {
|
|
121
|
-
# "payment_profile": {
|
|
122
|
-
# "customer_id": "24907598",
|
|
123
|
-
# "bank_name": "French Bank",
|
|
124
|
-
# "bank_iban": "FR1420041010050500013M02606",
|
|
125
|
-
# "payment_type": "bank_account",
|
|
126
|
-
# "billing_address": "20 Place de la Gare",
|
|
127
|
-
# "billing_city": "Colombes",
|
|
128
|
-
# "billing_state": "Île-de-France",
|
|
129
|
-
# "billing_zip": "92700",
|
|
130
|
-
# "billing_country": "FR"
|
|
131
|
-
# }
|
|
132
|
-
# }
|
|
133
|
-
# ```
|
|
134
|
-
# ### Importing GoCardless
|
|
135
|
-
# If the customer, bank account, and mandate already exist in GoCardless, a
|
|
136
|
-
# payment profile can be created by using the IDs. In order to create masked
|
|
137
|
-
# versions of `bank_account_number` and `bank_routing_number` that are used
|
|
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
|
|
140
|
-
# `XXXX[four-provided-digits]`.
|
|
141
|
-
# ```json
|
|
142
|
-
# {
|
|
143
|
-
# "payment_profile": {
|
|
144
|
-
# "customer_id": "24907598",
|
|
145
|
-
# "customer_vault_token": [Existing GoCardless Customer ID]
|
|
146
|
-
# "vault_token": [Existing GoCardless Mandate ID],
|
|
147
|
-
# "current_vault": "gocardless",
|
|
148
|
-
# "bank_name": "French Bank",
|
|
149
|
-
# "bank_account_number": [Last Four Of The Existing Account Number or
|
|
150
|
-
# IBAN if applicable],
|
|
151
|
-
# "bank_routing_number": [Last Four Of The Existing Routing Number],
|
|
152
|
-
# "payment_type": "bank_account",
|
|
153
|
-
# "billing_address": "20 Place de la Gare",
|
|
154
|
-
# "billing_city": "Colombes",
|
|
155
|
-
# "billing_state": "Île-de-France",
|
|
156
|
-
# "billing_zip": "92700",
|
|
157
|
-
# "billing_country": "FR"
|
|
158
|
-
# }
|
|
159
|
-
# }
|
|
160
|
-
# ```
|
|
161
|
-
# ## SEPA Direct Debit
|
|
162
|
-
# For more information on Stripe SEPA Direct Debit, please view the
|
|
163
|
-
# following resources:
|
|
164
67
|
# + [Full documentation on Stripe SEPA Direct
|
|
165
68
|
# Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-S
|
|
166
69
|
# EPA-and-BECS-Direct-Debit)
|
|
167
|
-
# + [Using Chargify.js with Stripe Direct Debit - minimal
|
|
168
|
-
# example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
|
|
169
|
-
# DIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway
|
|
170
|
-
# )
|
|
171
|
-
# + [Using Chargify.js with Stripe Direct Debit - full
|
|
172
|
-
# example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
|
|
173
|
-
# DIy-examples#full-example-with-sepa-direct-debit-stripe-gateway)
|
|
174
|
-
# ### Stripe SEPA Direct Debit Payment Profiles
|
|
175
|
-
# The following example creates a customer, bank account and mandate in
|
|
176
|
-
# Stripe:
|
|
177
|
-
# ```json
|
|
178
|
-
# {
|
|
179
|
-
# "payment_profile": {
|
|
180
|
-
# "customer_id": "24907598",
|
|
181
|
-
# "bank_name": "Deutsche bank",
|
|
182
|
-
# "bank_iban": "DE89370400440532013000",
|
|
183
|
-
# "payment_type": "bank_account",
|
|
184
|
-
# "billing_address": "Test",
|
|
185
|
-
# "billing_city": "Berlin",
|
|
186
|
-
# "billing_state": "Brandenburg",
|
|
187
|
-
# "billing_zip": "12345",
|
|
188
|
-
# "billing_country": "DE"
|
|
189
|
-
# }
|
|
190
|
-
# }
|
|
191
|
-
# ```
|
|
192
|
-
# ## Stripe BECS Direct Debit
|
|
193
|
-
# For more information on Stripe BECS Direct Debit, please view the
|
|
194
|
-
# following resources:
|
|
195
70
|
# + [Full documentation on Stripe BECS Direct
|
|
196
71
|
# Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-S
|
|
197
72
|
# EPA-and-BECS-Direct-Debit)
|
|
198
|
-
# + [Using Chargify.js with Stripe BECS Direct Debit - minimal
|
|
199
|
-
# example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
|
|
200
|
-
# DIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway
|
|
201
|
-
# )
|
|
202
|
-
# + [Using Chargify.js with Stripe BECS Direct Debit - full
|
|
203
|
-
# example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzN
|
|
204
|
-
# DIy-examples#full-example-with-sepa-direct-debit-stripe-gateway)
|
|
205
|
-
# ### Stripe BECS Direct Debit Payment Profiles
|
|
206
|
-
# The following example creates a customer, bank account and mandate in
|
|
207
|
-
# Stripe:
|
|
208
|
-
# ```json
|
|
209
|
-
# {
|
|
210
|
-
# "payment_profile": {
|
|
211
|
-
# "customer_id": "24907598",
|
|
212
|
-
# "bank_name": "Australian bank",
|
|
213
|
-
# "bank_branch_code": "000000",
|
|
214
|
-
# "bank_account_number": "000123456"
|
|
215
|
-
# "payment_type": "bank_account",
|
|
216
|
-
# "billing_address": "Test",
|
|
217
|
-
# "billing_city": "Stony Rise",
|
|
218
|
-
# "billing_state": "Tasmania",
|
|
219
|
-
# "billing_zip": "12345",
|
|
220
|
-
# "billing_country": "AU"
|
|
221
|
-
# }
|
|
222
|
-
# }
|
|
223
|
-
# ```
|
|
224
|
-
# ## Stripe BACS Direct Debit
|
|
225
|
-
# Contact the support team to enable this payment method.
|
|
226
|
-
# For more information on Stripe BACS Direct Debit, please view the
|
|
227
|
-
# following resources:
|
|
228
73
|
# + [Full documentation on Stripe BACS Direct
|
|
229
74
|
# Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-S
|
|
230
75
|
# EPA-and-BECS-Direct-Debit)
|
|
231
|
-
#
|
|
232
|
-
#
|
|
233
|
-
#
|
|
234
|
-
#
|
|
235
|
-
# {
|
|
236
|
-
# "payment_profile": {
|
|
237
|
-
# "customer_id": "24907598",
|
|
238
|
-
# "bank_name": "British bank",
|
|
239
|
-
# "bank_branch_code": "108800",
|
|
240
|
-
# "bank_account_number": "00012345"
|
|
241
|
-
# "payment_type": "bank_account",
|
|
242
|
-
# "billing_address": "Test",
|
|
243
|
-
# "billing_city": "London",
|
|
244
|
-
# "billing_state": "LND",
|
|
245
|
-
# "billing_zip": "12345",
|
|
246
|
-
# "billing_country": "GB"
|
|
247
|
-
# }
|
|
248
|
-
# }
|
|
249
|
-
# ```
|
|
250
|
-
# ## 3D Secure - Checkout
|
|
251
|
-
# It may happen that a payment needs 3D Secure Authentication when the
|
|
252
|
-
# payment profile is created; this is referred to in our help docs as a
|
|
253
|
-
# [post-authentication
|
|
76
|
+
# ## 3D Secure Authentication during payment profile creation.
|
|
77
|
+
# When a payment requires 3D Secure Authentication to adhear to Strong
|
|
78
|
+
# Customer Authentication (SCA) during payment profile creation, the request
|
|
79
|
+
# enters a [post-authentication
|
|
254
80
|
# flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-I
|
|
255
81
|
# mplementing-3D-Secure#psd2-flows-pre-authentication-and-post-authenticatio
|
|
256
|
-
# n).
|
|
82
|
+
# n). In this case, a 422 Unprocessable Entity status is returned with the
|
|
257
83
|
# following response:
|
|
258
84
|
# ```json
|
|
259
85
|
# {
|
|
@@ -285,41 +111,41 @@ module AdvancedBilling
|
|
|
285
111
|
# ```
|
|
286
112
|
# To let the customer go through 3D Secure Authentication, they need to be
|
|
287
113
|
# redirected to the URL specified in `action_link`.
|
|
288
|
-
# Optionally, you can specify `callback_url` parameter in the
|
|
289
|
-
# URL
|
|
290
|
-
# Authentication.
|
|
114
|
+
# Optionally, you can specify the `callback_url` parameter in the
|
|
115
|
+
# `action_link` URL to receive notification about the result of 3D Secure
|
|
116
|
+
# Authentication.
|
|
117
|
+
# The `callback_url` will return the following information:
|
|
291
118
|
# - whether the authentication was successful (`success`)
|
|
292
119
|
# - the payment profile ID (`payment_profile_id`)
|
|
293
|
-
#
|
|
294
|
-
#
|
|
295
|
-
#
|
|
296
|
-
#
|
|
297
|
-
# `
|
|
298
|
-
# or `callback_url`.
|
|
120
|
+
# You can also specify a `redirect_url` parameter in the `action_link` URL
|
|
121
|
+
# to redirect the customer back to your site.
|
|
122
|
+
# You cannot use action_link in an iframe inside a custom application. You
|
|
123
|
+
# must redirect the customer directly to the `action_link` and use the
|
|
124
|
+
# `redirect_url` or `callback_url` to be notified of the result.
|
|
299
125
|
# The final URL that you send a customer to complete 3D Secure may resemble
|
|
300
126
|
# the following, where the first half is the `action_link` and the second
|
|
301
127
|
# half contains a `redirect_url` and `callback_url`:
|
|
128
|
+
#
|
|
302
129
|
# `https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uh
|
|
303
130
|
# kbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&re
|
|
304
131
|
# direct_url=https://yourpage.com`
|
|
305
132
|
# ### Example Redirect Flow
|
|
306
|
-
#
|
|
307
|
-
#
|
|
308
|
-
#
|
|
309
|
-
#
|
|
310
|
-
# 2. You receive a `action_link` in the response.
|
|
133
|
+
# Here's an example flow to redirect customers to different pages depending
|
|
134
|
+
# on whether SCA was performed successfully:
|
|
135
|
+
# 1. Create a payment profile via the API; it requires 3DS.
|
|
136
|
+
# 2. You receive an `action_link` in the response.
|
|
311
137
|
# 3. Use this `action_link` to, for example, connect with your internal
|
|
312
|
-
# resources or generate a session_id
|
|
313
|
-
# 4. Include
|
|
314
|
-
# `redirect_url` to be aware which “session” this applies to
|
|
138
|
+
# resources or generate a `session_id`.
|
|
139
|
+
# 4. Include one of those attributes inside the `callback_url` and
|
|
140
|
+
# `redirect_url` to be aware which “session” this applies to.
|
|
315
141
|
# 5. Redirect the customer to the `action_link` with `callback_url` and
|
|
316
142
|
# `redirect_url` applied
|
|
317
|
-
# 6. After the customer
|
|
318
|
-
# result
|
|
143
|
+
# 6. After the customer completes 3DS authentication, we notify you of the
|
|
144
|
+
# result via the applied `callback_url`.
|
|
319
145
|
# 7. After that, we redirect the customer to the `redirect_url`; at this
|
|
320
|
-
# point the result of authentication is known
|
|
146
|
+
# point the result of authentication is known.
|
|
321
147
|
# 8. Optionally, you can use the applied "msg" param in the `redirect_url`
|
|
322
|
-
# to determine
|
|
148
|
+
# to determine if the redirect was successful.
|
|
323
149
|
# @param [CreatePaymentProfileRequest] body Optional parameter: When
|
|
324
150
|
# following the IBAN or the Local Bank details examples, a customer, bank
|
|
325
151
|
# account and mandate will be created in your current vault. If the
|
|
@@ -385,8 +211,8 @@ module AdvancedBilling
|
|
|
385
211
|
|
|
386
212
|
# Using the GET method you can retrieve a Payment Profile identified by its
|
|
387
213
|
# unique ID.
|
|
388
|
-
#
|
|
389
|
-
#
|
|
214
|
+
# Note that a different JSON object will be returned if the card method on
|
|
215
|
+
# file is a bank account.
|
|
390
216
|
# ### Response for Bank Account
|
|
391
217
|
# Example response for Bank Account:
|
|
392
218
|
# ```
|
|
@@ -711,8 +537,8 @@ module AdvancedBilling
|
|
|
711
537
|
# profile instead of passing all bank account or credit card data directly
|
|
712
538
|
# to a given API endpoint.
|
|
713
539
|
# To obtain a One Time Token you have to use
|
|
714
|
-
# [Chargify.js](https://
|
|
715
|
-
#
|
|
540
|
+
# [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Char
|
|
541
|
+
# gify-js-Overview#chargify-js-overview-0-0).
|
|
716
542
|
# @param [String] chargify_token Required parameter: Advanced Billing
|
|
717
543
|
# Token
|
|
718
544
|
# @return [GetOneTimeTokenRequest] Response from the API call.
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
module AdvancedBilling
|
|
7
7
|
# ProductFamiliesController
|
|
8
8
|
class ProductFamiliesController < BaseController
|
|
9
|
-
#
|
|
10
|
-
# Family.
|
|
9
|
+
# Retrieves a list of Products belonging to a Product Family.
|
|
11
10
|
# @param [String] product_family_id Required parameter: Either the product
|
|
12
11
|
# family's id or its handle prefixed with `handle:`
|
|
13
12
|
# @param [Integer] page Optional parameter: Result records are organized in
|
|
@@ -82,9 +81,9 @@ module AdvancedBilling
|
|
|
82
81
|
.execute
|
|
83
82
|
end
|
|
84
83
|
|
|
85
|
-
#
|
|
86
|
-
#
|
|
87
|
-
#
|
|
84
|
+
# Creates a Product Family within your Advanced Billing site. Create a
|
|
85
|
+
# Product Family to act as a container for your products, components and
|
|
86
|
+
# coupons.
|
|
88
87
|
# Full documentation on how Product Families operate within the Advanced
|
|
89
88
|
# Billing UI can be located
|
|
90
89
|
# [here](https://maxio.zendesk.com/hc/en-us/articles/24261098936205-Product-
|
|
@@ -112,7 +111,7 @@ module AdvancedBilling
|
|
|
112
111
|
.execute
|
|
113
112
|
end
|
|
114
113
|
|
|
115
|
-
#
|
|
114
|
+
# Retrieve a list of Product Families for a site.
|
|
116
115
|
# @param [BasicDateField] date_field Optional parameter: The type of filter
|
|
117
116
|
# you would like to apply to your search. Use in query:
|
|
118
117
|
# `date_field=created_at`.
|
|
@@ -155,8 +154,8 @@ module AdvancedBilling
|
|
|
155
154
|
.execute
|
|
156
155
|
end
|
|
157
156
|
|
|
158
|
-
#
|
|
159
|
-
#
|
|
157
|
+
# Retrieves a Product Family via the `product_family_id`. The response will
|
|
158
|
+
# contain a Product Family object.
|
|
160
159
|
# The product family can be specified either with the id number, or with the
|
|
161
160
|
# `handle:my-family` format.
|
|
162
161
|
# @param [Integer] id Required parameter: The Advanced Billing id of the
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
module AdvancedBilling
|
|
7
7
|
# ProductPricePointsController
|
|
8
8
|
class ProductPricePointsController < BaseController
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
9
|
+
# Creates a Product Price Point. See the [Product Price
|
|
10
|
+
# Point](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-
|
|
11
|
+
# Price-Points) documentation for details.
|
|
12
12
|
# @param [Integer | String] product_id Required parameter: The id or handle
|
|
13
13
|
# of the product. When using the handle, it must be prefixed with
|
|
14
14
|
# `handle:`
|
|
@@ -43,7 +43,7 @@ module AdvancedBilling
|
|
|
43
43
|
.execute
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
#
|
|
46
|
+
# Retrieves a list of product price points.
|
|
47
47
|
# @param [Integer | String] product_id Required parameter: The id or handle
|
|
48
48
|
# of the product. When using the handle, it must be prefixed with
|
|
49
49
|
# `handle:`
|
|
@@ -96,8 +96,8 @@ module AdvancedBilling
|
|
|
96
96
|
.execute
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
-
#
|
|
100
|
-
# Note: Custom product price points
|
|
99
|
+
# Updates a product price point.
|
|
100
|
+
# Note: Custom product price points cannot be updated.
|
|
101
101
|
# @param [Integer | String] product_id Required parameter: The id or handle
|
|
102
102
|
# of the product. When using the handle, it must be prefixed with `handle:`.
|
|
103
103
|
# Example: `123` for an integer ID, or `handle:example-product-handle` for a
|
|
@@ -189,7 +189,7 @@ module AdvancedBilling
|
|
|
189
189
|
.execute
|
|
190
190
|
end
|
|
191
191
|
|
|
192
|
-
#
|
|
192
|
+
# Archives a product price point.
|
|
193
193
|
# @param [Integer | String] product_id Required parameter: The id or handle
|
|
194
194
|
# of the product. When using the handle, it must be prefixed with `handle:`.
|
|
195
195
|
# Example: `123` for an integer ID, or `handle:example-product-handle` for a
|
|
@@ -257,10 +257,9 @@ module AdvancedBilling
|
|
|
257
257
|
.execute
|
|
258
258
|
end
|
|
259
259
|
|
|
260
|
-
#
|
|
260
|
+
# Sets a product price point as the default for the product.
|
|
261
|
+
# Note: Custom product price points cannot be set as the default for a
|
|
261
262
|
# product.
|
|
262
|
-
# Note: Custom product price points are not able to be set as the default
|
|
263
|
-
# for a product.
|
|
264
263
|
# @param [Integer] product_id Required parameter: The Advanced Billing id of
|
|
265
264
|
# the product to which the price point belongs
|
|
266
265
|
# @param [Integer] price_point_id Required parameter: The Advanced Billing
|
|
@@ -286,7 +285,7 @@ module AdvancedBilling
|
|
|
286
285
|
.execute
|
|
287
286
|
end
|
|
288
287
|
|
|
289
|
-
#
|
|
288
|
+
# Creates multiple product price points in one request.
|
|
290
289
|
# @param [Integer] product_id Required parameter: The Advanced Billing id of
|
|
291
290
|
# the product to which the price points belong
|
|
292
291
|
# @param [BulkCreateProductPricePointsRequest] body Optional parameter:
|
|
@@ -316,8 +315,8 @@ module AdvancedBilling
|
|
|
316
315
|
.execute
|
|
317
316
|
end
|
|
318
317
|
|
|
319
|
-
#
|
|
320
|
-
#
|
|
318
|
+
# Creates currency prices for a given currency that has been defined on the
|
|
319
|
+
# site level in your settings.
|
|
321
320
|
# When creating currency prices, they need to mirror the structure of your
|
|
322
321
|
# primary pricing. If the product price point defines a trial and/or setup
|
|
323
322
|
# fee, each currency must also define a trial and/or setup fee.
|
|
@@ -352,13 +351,12 @@ module AdvancedBilling
|
|
|
352
351
|
.execute
|
|
353
352
|
end
|
|
354
353
|
|
|
355
|
-
#
|
|
356
|
-
#
|
|
354
|
+
# Updates the `price`s of currency prices for a given currency that exists
|
|
355
|
+
# on the product price point.
|
|
357
356
|
# When updating the pricing, it needs to mirror the structure of your
|
|
358
357
|
# primary pricing. If the product price point defines a trial and/or setup
|
|
359
358
|
# fee, each currency must also define a trial and/or setup fee.
|
|
360
|
-
# Note: Currency Prices
|
|
361
|
-
# points.
|
|
359
|
+
# Note: Currency Prices cannot be updated for custom product price points.
|
|
362
360
|
# @param [Integer] product_price_point_id Required parameter: The Advanced
|
|
363
361
|
# Billing id of the product price point
|
|
364
362
|
# @param [UpdateCurrencyPricesRequest] body Optional parameter: TODO: type
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
module AdvancedBilling
|
|
7
7
|
# ProductsController
|
|
8
8
|
class ProductsController < BaseController
|
|
9
|
-
#
|
|
9
|
+
# Creates a product in your Advanced Billing site.
|
|
10
|
+
# See the following product docuemation for more information:
|
|
10
11
|
# + [Products
|
|
11
12
|
# Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-
|
|
12
13
|
# Products-Overview)
|
|
@@ -42,8 +43,7 @@ module AdvancedBilling
|
|
|
42
43
|
.execute
|
|
43
44
|
end
|
|
44
45
|
|
|
45
|
-
#
|
|
46
|
-
# you've created in Advanced Billing.
|
|
46
|
+
# Reads the current details of a product.
|
|
47
47
|
# @param [Integer] product_id Required parameter: The Advanced Billing id of
|
|
48
48
|
# the product
|
|
49
49
|
# @return [ProductResponse] Response from the API call.
|
|
@@ -63,7 +63,7 @@ module AdvancedBilling
|
|
|
63
63
|
.execute
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
#
|
|
66
|
+
# Updates aspects of an existing product.
|
|
67
67
|
# ### Input Attributes Update Notes
|
|
68
68
|
# + `update_return_params` The parameters we will append to your
|
|
69
69
|
# `update_return_url`. See Return URLs and Parameters
|
|
@@ -100,9 +100,8 @@ module AdvancedBilling
|
|
|
100
100
|
.execute
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
#
|
|
104
|
-
#
|
|
105
|
-
# continue to be charged monthly.
|
|
103
|
+
# Archives the product. All current subscribers will be unffected; their
|
|
104
|
+
# subscription/purchase will continue to be charged monthly.
|
|
106
105
|
# This will restrict the option to chose the product for purchase via the
|
|
107
106
|
# Billing Portal, as well as disable Public Signup Pages for the product.
|
|
108
107
|
# @param [Integer] product_id Required parameter: The Advanced Billing id of
|
|
@@ -128,7 +127,7 @@ module AdvancedBilling
|
|
|
128
127
|
.execute
|
|
129
128
|
end
|
|
130
129
|
|
|
131
|
-
#
|
|
130
|
+
# Retrieves a Product object by its `api_handle`.
|
|
132
131
|
# @param [String] api_handle Required parameter: The handle of the product
|
|
133
132
|
# @return [ProductResponse] Response from the API call.
|
|
134
133
|
def read_product_by_handle(api_handle)
|
|
@@ -113,7 +113,7 @@ module AdvancedBilling
|
|
|
113
113
|
# If the information becomes outdated, simply void the old proforma invoice
|
|
114
114
|
# and generate a new one.
|
|
115
115
|
# If you would like to preview the next billing amounts without generating a
|
|
116
|
-
# full proforma invoice,
|
|
116
|
+
# full proforma invoice, use the renewal preview endpoint.
|
|
117
117
|
# ## Restrictions
|
|
118
118
|
# Proforma invoices are only available on Relationship Invoicing sites. To
|
|
119
119
|
# create a proforma invoice, the subscription must not be in a group, must
|
|
@@ -20,7 +20,7 @@ module AdvancedBilling
|
|
|
20
20
|
# Access to the Sales Commission API endpoints is available to users with
|
|
21
21
|
# financial access, where the seller has the Advanced Analytics component
|
|
22
22
|
# enabled. For further information on getting access to Advanced Analytics
|
|
23
|
-
#
|
|
23
|
+
# contact Maxio support.
|
|
24
24
|
# > Note: The request is at seller level, it means `<<subdomain>>` variable
|
|
25
25
|
# will be replaced by `app`
|
|
26
26
|
# @param [String] seller_id Required parameter: The Chargify id of your
|
|
@@ -77,7 +77,7 @@ module AdvancedBilling
|
|
|
77
77
|
# Access to the Sales Commission API endpoints is available to users with
|
|
78
78
|
# financial access, where the seller has the Advanced Analytics component
|
|
79
79
|
# enabled. For further information on getting access to Advanced Analytics
|
|
80
|
-
#
|
|
80
|
+
# contact Maxio support.
|
|
81
81
|
# > Note: The request is at seller level, it means `<<subdomain>>` variable
|
|
82
82
|
# will be replaced by `app`
|
|
83
83
|
# @param [String] seller_id Required parameter: The Chargify id of your
|
|
@@ -134,7 +134,7 @@ module AdvancedBilling
|
|
|
134
134
|
# Access to the Sales Commission API endpoints is available to users with
|
|
135
135
|
# financial access, where the seller has the Advanced Analytics component
|
|
136
136
|
# enabled. For further information on getting access to Advanced Analytics
|
|
137
|
-
#
|
|
137
|
+
# contact Maxio support.
|
|
138
138
|
# > Note: The request is at seller level, it means `<<subdomain>>` variable
|
|
139
139
|
# will be replaced by `app`
|
|
140
140
|
# @param [String] seller_id Required parameter: The Chargify id of your
|