maxio-advanced-billing-sdk 7.0.1 → 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 +94 -44
- data/bin/console +15 -0
- data/lib/advanced_billing/client.rb +11 -0
- data/lib/advanced_billing/configuration.rb +73 -0
- 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 +2 -2
- data/lib/advanced_billing/controllers/components_controller.rb +5 -5
- 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 +4 -4
- data/lib/advanced_billing/controllers/invoices_controller.rb +48 -11
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +70 -243
- 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 +24 -33
- 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 +86 -808
- data/lib/advanced_billing/http/auth/basic_auth.rb +12 -0
- data/lib/advanced_billing/http/proxy_settings.rb +9 -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 +18 -5
- data/lib/advanced_billing.rb +1 -0
- metadata +8 -6
|
@@ -6,43 +6,31 @@
|
|
|
6
6
|
module AdvancedBilling
|
|
7
7
|
# CustomFieldsController
|
|
8
8
|
class CustomFieldsController < BaseController
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
# another 100 for Customer.
|
|
35
|
-
# ### Metafields "On-the-Fly"
|
|
36
|
-
# It is possible to create Metafields “on the fly” when you create your
|
|
37
|
-
# Metadata – if a non-existent name is passed when creating Metadata, a
|
|
38
|
-
# Metafield for that key will be automatically created. The Metafield API,
|
|
39
|
-
# however, gives you more control over your “keys”.
|
|
40
|
-
# ### Metafield Scope Warning
|
|
41
|
-
# If configuring metafields in the Admin UI or via the API, be careful
|
|
42
|
-
# sending updates to metafields with the scope attribute – **if a partial
|
|
43
|
-
# update is sent it will overwrite the current configuration**.
|
|
44
|
-
# @param [ResourceType] resource_type Required parameter: the resource type
|
|
45
|
-
# to which the metafields belong
|
|
9
|
+
# Creates metafields on a Site for either the Subscriptions or Customers
|
|
10
|
+
# resource.
|
|
11
|
+
# Metafields and their metadata are created in the Custom Fields
|
|
12
|
+
# configuration page on your Site. Metafields can be populated with metadata
|
|
13
|
+
# when you create them or later with the [Update
|
|
14
|
+
# Metafield]($e/Custom%20Fields/updateMetafield), [Create
|
|
15
|
+
# Metadata]($e/Custom%20Fields/createMetadata), or [Update
|
|
16
|
+
# Metadata]($e/Custom%20Fields/updateMetadata) endpoints. The Create
|
|
17
|
+
# Metadata and Update Metadata endpoints allow you to add metafields and
|
|
18
|
+
# metadata values to a specific subscription or customer.
|
|
19
|
+
# Each site is limited to 100 unique metafields per resource. This means you
|
|
20
|
+
# can have 100 metafields for Subscriptions and another 100 for Customers.
|
|
21
|
+
# > Note: After creating a metafield, the resource type cannot be modified.
|
|
22
|
+
# In the UI and product documentation, metafields and metadata are called
|
|
23
|
+
# Custom Fields.
|
|
24
|
+
# - Metafield is the custom field
|
|
25
|
+
# - Metadata is the data populating the custom field.
|
|
26
|
+
# See [Custom Fields
|
|
27
|
+
# Reference](https://docs.maxio.com/hc/en-us/articles/24266140850573-Custom-
|
|
28
|
+
# Fields-Reference) and [Custom Fields
|
|
29
|
+
# Tab](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscripti
|
|
30
|
+
# on-Summary-Custom-Fields-Tab) for information on using Custom Fields in
|
|
31
|
+
# the Advanced Billing UI.
|
|
32
|
+
# @param [ResourceType] resource_type Required parameter: The resource type
|
|
33
|
+
# to which the metafields belong.
|
|
46
34
|
# @param [CreateMetafieldsRequest] body Optional parameter: TODO: type
|
|
47
35
|
# description here
|
|
48
36
|
# @return [Array[Metafield]] Response from the API call.
|
|
@@ -71,12 +59,12 @@ module AdvancedBilling
|
|
|
71
59
|
.execute
|
|
72
60
|
end
|
|
73
61
|
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
# @param [ResourceType] resource_type Required parameter:
|
|
77
|
-
# to which the metafields belong
|
|
78
|
-
# @param [String] name Optional parameter:
|
|
79
|
-
# metafield
|
|
62
|
+
# Lists the metafields and their associated details for a Site and resource
|
|
63
|
+
# type. You can filter the request to a specific metafield.
|
|
64
|
+
# @param [ResourceType] resource_type Required parameter: The resource type
|
|
65
|
+
# to which the metafields belong.
|
|
66
|
+
# @param [String] name Optional parameter: Filter by the name of the
|
|
67
|
+
# metafield.
|
|
80
68
|
# @param [Integer] page Optional parameter: Result records are organized in
|
|
81
69
|
# pages. By default, the first page of results is displayed. The page
|
|
82
70
|
# parameter specifies a page number of results to fetch. You can start
|
|
@@ -111,10 +99,38 @@ module AdvancedBilling
|
|
|
111
99
|
.execute
|
|
112
100
|
end
|
|
113
101
|
|
|
114
|
-
#
|
|
115
|
-
# can
|
|
116
|
-
#
|
|
117
|
-
#
|
|
102
|
+
# Updates metafields on your Site for a resource type. Depending on the
|
|
103
|
+
# request structure, you can update or add metafields and metadata to the
|
|
104
|
+
# Subscriptions or Customers resource.
|
|
105
|
+
# With this endpoint, you can:
|
|
106
|
+
# - Add metafields. If the metafield specified in current_name does not
|
|
107
|
+
# exist, a new metafield is added.
|
|
108
|
+
# >Note: Each site is limited to 100 unique metafields per resource. This
|
|
109
|
+
# means you can have 100 metafields for Subscriptions and another 100 for
|
|
110
|
+
# Customers.
|
|
111
|
+
# - Change the name of a metafield.
|
|
112
|
+
# >Note: To keep the metafield name the same and only update the metadata
|
|
113
|
+
# for the metafield, you must use the current metafield name in both the
|
|
114
|
+
# `current_name` and `name` parameters.
|
|
115
|
+
# - Change the input type for the metafield. For example, you can change a
|
|
116
|
+
# metafield input type from text to a dropdown. If you change the input type
|
|
117
|
+
# from text to a dropdown or radio, you must update the specific
|
|
118
|
+
# subscriptions or customers where the metafield was used to reflect the
|
|
119
|
+
# updated metafield and metadata.
|
|
120
|
+
# - Add metadata values to the existing metadata for a dropdown or radio
|
|
121
|
+
# metafield.
|
|
122
|
+
# >Note: Updates to metadata overwrite. To add one or more values, you
|
|
123
|
+
# must specify all metadata values including the new value you want to add.
|
|
124
|
+
# - Add new metadata to a dropdown or radio for a metafield that was created
|
|
125
|
+
# without metadata.
|
|
126
|
+
# - Remove metadata for a dropdown or radio for a metafield.
|
|
127
|
+
# >Note: Updates to metadata overwrite existing values. To remove one or
|
|
128
|
+
# more values, specify all metadata values except those you want to remove.
|
|
129
|
+
# - Add or update scope settings for a metafield.
|
|
130
|
+
# >Note: Scope changes overwrite existing settings. You must specify the
|
|
131
|
+
# complete scope, including the changes you want to make.
|
|
132
|
+
# @param [ResourceType] resource_type Required parameter: The resource type
|
|
133
|
+
# to which the metafields belong.
|
|
118
134
|
# @param [UpdateMetafieldsRequest] body Optional parameter: TODO: type
|
|
119
135
|
# description here
|
|
120
136
|
# @return [Array[Metafield]] Response from the API call.
|
|
@@ -143,12 +159,10 @@ module AdvancedBilling
|
|
|
143
159
|
.execute
|
|
144
160
|
end
|
|
145
161
|
|
|
146
|
-
#
|
|
147
|
-
#
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
# @param [ResourceType] resource_type Required parameter: the resource type
|
|
151
|
-
# to which the metafields belong
|
|
162
|
+
# Deletes a metafield from your Site. Removes the metafield and associated
|
|
163
|
+
# metadata from all Subscriptions or Customers resources on the Site.
|
|
164
|
+
# @param [ResourceType] resource_type Required parameter: The resource type
|
|
165
|
+
# to which the metafields belong.
|
|
152
166
|
# @param [String] name Optional parameter: The name of the metafield to be
|
|
153
167
|
# deleted
|
|
154
168
|
# @return [void] Response from the API call.
|
|
@@ -171,36 +185,19 @@ module AdvancedBilling
|
|
|
171
185
|
.execute
|
|
172
186
|
end
|
|
173
187
|
|
|
174
|
-
#
|
|
175
|
-
#
|
|
176
|
-
#
|
|
177
|
-
#
|
|
178
|
-
#
|
|
179
|
-
#
|
|
180
|
-
#
|
|
181
|
-
#
|
|
182
|
-
#
|
|
183
|
-
#
|
|
184
|
-
#
|
|
185
|
-
# [
|
|
186
|
-
#
|
|
187
|
-
# custom fields, please see our subscription-based documentation
|
|
188
|
-
# [here.](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscri
|
|
189
|
-
# ption-Summary-Custom-Fields-Tab)
|
|
190
|
-
# Metadata is associated to a customer or subscription, and corresponds to a
|
|
191
|
-
# Metafield. When creating a new metadata object for a given record, **if
|
|
192
|
-
# the metafield is not present it will be created**.
|
|
193
|
-
# ## Metadata limits
|
|
194
|
-
# Metadata values are limited to 2kB in size. Additonally, there are limits
|
|
195
|
-
# on the number of unique metafields available per resource.
|
|
196
|
-
# ## Create Metadata
|
|
197
|
-
# This method will create a metafield for the site on the fly if it does not
|
|
198
|
-
# already exist, and populate the metadata value.
|
|
199
|
-
# ### Subscription or Customer Resource
|
|
200
|
-
# Please pay special attention to the resource you use when creating
|
|
201
|
-
# metadata.
|
|
202
|
-
# @param [ResourceType] resource_type Required parameter: the resource type
|
|
203
|
-
# to which the metafields belong
|
|
188
|
+
# Creates metadata and metafields for a specific subscription or customer,
|
|
189
|
+
# or updates metadata values of existing metafields for a subscription or
|
|
190
|
+
# customer. Metadata values are limited to 2 KB in size.
|
|
191
|
+
# If you create metadata on a subscription or customer with a metafield that
|
|
192
|
+
# does not already exist, the metafield is created with the metadata you
|
|
193
|
+
# specify and it is always added as a text field. You can update the
|
|
194
|
+
# input_type for the metafield with the [Update
|
|
195
|
+
# Metafield]($e/Custom%20Fields/updateMetafield) endpoint.
|
|
196
|
+
# >Note: Each site is limited to 100 unique metafields per resource. This
|
|
197
|
+
# means you can have 100 metafields for Subscriptions and another 100 for
|
|
198
|
+
# Customers.
|
|
199
|
+
# @param [ResourceType] resource_type Required parameter: The resource type
|
|
200
|
+
# to which the metafields belong.
|
|
204
201
|
# @param [Integer] resource_id Required parameter: The Advanced Billing id
|
|
205
202
|
# of the customer or the subscription for which the metadata applies
|
|
206
203
|
# @param [CreateMetadataRequest] body Optional parameter: TODO: type
|
|
@@ -235,13 +232,9 @@ module AdvancedBilling
|
|
|
235
232
|
.execute
|
|
236
233
|
end
|
|
237
234
|
|
|
238
|
-
#
|
|
239
|
-
#
|
|
240
|
-
#
|
|
241
|
-
# This endpoint will also display the current stats of your metadata to use
|
|
242
|
-
# as a tool for pagination.
|
|
243
|
-
# @param [ResourceType] resource_type Required parameter: the resource type
|
|
244
|
-
# to which the metafields belong
|
|
235
|
+
# Lists metadata and metafields for a specific customer or subscription.
|
|
236
|
+
# @param [ResourceType] resource_type Required parameter: The resource type
|
|
237
|
+
# to which the metafields belong.
|
|
245
238
|
# @param [Integer] resource_id Required parameter: The Advanced Billing id
|
|
246
239
|
# of the customer or the subscription for which the metadata applies
|
|
247
240
|
# @param [Integer] page Optional parameter: Result records are organized in
|
|
@@ -277,10 +270,18 @@ module AdvancedBilling
|
|
|
277
270
|
.execute
|
|
278
271
|
end
|
|
279
272
|
|
|
280
|
-
#
|
|
281
|
-
# subscription
|
|
282
|
-
#
|
|
283
|
-
#
|
|
273
|
+
# Updates metadata and metafields on the Site and the customer or
|
|
274
|
+
# subscription specified, and updates the metadata value on a subscription
|
|
275
|
+
# or customer.
|
|
276
|
+
# If you update metadata on a subscription or customer with a metafield that
|
|
277
|
+
# does not already exist, the metafield is created with the metadata you
|
|
278
|
+
# specify and it is always added as a text field to the Site and to the
|
|
279
|
+
# subscription or customer you specify. You can update the input_type for
|
|
280
|
+
# the metafield with the Update Metafield endpoint.
|
|
281
|
+
# Each site is limited to 100 unique metafields per resource. This means you
|
|
282
|
+
# can have 100 metafields for Subscription and another 100 for Customer.
|
|
283
|
+
# @param [ResourceType] resource_type Required parameter: The resource type
|
|
284
|
+
# to which the metafields belong.
|
|
284
285
|
# @param [Integer] resource_id Required parameter: The Advanced Billing id
|
|
285
286
|
# of the customer or the subscription for which the metadata applies
|
|
286
287
|
# @param [UpdateMetadataRequest] body Optional parameter: TODO: type
|
|
@@ -315,27 +316,10 @@ module AdvancedBilling
|
|
|
315
316
|
.execute
|
|
316
317
|
end
|
|
317
318
|
|
|
318
|
-
#
|
|
319
|
-
#
|
|
320
|
-
#
|
|
321
|
-
#
|
|
322
|
-
# ```
|
|
323
|
-
# https://acme.chargify.com/customers/99/metadata.json?name=weight
|
|
324
|
-
# ```
|
|
325
|
-
# If you want to delete multiple metadata fields for a customer 99 named:
|
|
326
|
-
# `weight` and `age` you wrould request:
|
|
327
|
-
# ```
|
|
328
|
-
# https://acme.chargify.com/customers/99/metadata.json?names[]=weight&names[
|
|
329
|
-
# ]=age
|
|
330
|
-
# ```
|
|
331
|
-
# ## Successful Response
|
|
332
|
-
# For a success, there will be a code `200` and the plain text response
|
|
333
|
-
# `true`.
|
|
334
|
-
# ## Unsuccessful Response
|
|
335
|
-
# When a failed response is encountered, you will receive a `404` response
|
|
336
|
-
# and the plain text response of `true`.
|
|
337
|
-
# @param [ResourceType] resource_type Required parameter: the resource type
|
|
338
|
-
# to which the metafields belong
|
|
319
|
+
# Deletes one or more metafields (and associated metadata) from the
|
|
320
|
+
# specified subscription or customer.
|
|
321
|
+
# @param [ResourceType] resource_type Required parameter: The resource type
|
|
322
|
+
# to which the metafields belong.
|
|
339
323
|
# @param [Integer] resource_id Required parameter: The Advanced Billing id
|
|
340
324
|
# of the customer or the subscription for which the metadata applies
|
|
341
325
|
# @param [String] name Optional parameter: Name of field to be removed.
|
|
@@ -369,19 +353,9 @@ module AdvancedBilling
|
|
|
369
353
|
.execute
|
|
370
354
|
end
|
|
371
355
|
|
|
372
|
-
#
|
|
373
|
-
#
|
|
374
|
-
#
|
|
375
|
-
# This endpoint will also display the current stats of your metadata to use
|
|
376
|
-
# as a tool for pagination.
|
|
377
|
-
# ### Metadata for multiple records
|
|
378
|
-
# `https://acme.chargify.com/subscriptions/metadata.json?resource_ids[]=1&re
|
|
379
|
-
# source_ids[]=2`
|
|
380
|
-
# ## Read Metadata for a Site
|
|
381
|
-
# This endpoint will list the number of pages of metadata information that
|
|
382
|
-
# are contained within a site.
|
|
383
|
-
# @param [ResourceType] resource_type Required parameter: the resource type
|
|
384
|
-
# to which the metafields belong
|
|
356
|
+
# Lists metadata for a specified array of subscriptions or customers.
|
|
357
|
+
# @param [ResourceType] resource_type Required parameter: The resource type
|
|
358
|
+
# to which the metafields belong.
|
|
385
359
|
# @param [Integer] page Optional parameter: Result records are organized in
|
|
386
360
|
# pages. By default, the first page of results is displayed. The page
|
|
387
361
|
# parameter specifies a page number of results to fetch. You can start
|
|
@@ -22,8 +22,8 @@ module AdvancedBilling
|
|
|
22
22
|
# ## Required Country Format
|
|
23
23
|
# Advanced Billing requires that you use the ISO Standard Country codes when
|
|
24
24
|
# formatting country attribute of the customer.
|
|
25
|
-
# Countries should be formatted as 2 characters. For more information,
|
|
26
|
-
#
|
|
25
|
+
# Countries should be formatted as 2 characters. For more information, see
|
|
26
|
+
# the following wikipedia article on
|
|
27
27
|
# [ISO_3166-1.](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes)
|
|
28
28
|
# ## Required State Format
|
|
29
29
|
# Advanced Billing requires that you use the ISO Standard State codes when
|
|
@@ -31,7 +31,7 @@ module AdvancedBilling
|
|
|
31
31
|
# + US States (2 characters):
|
|
32
32
|
# [ISO_3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US)
|
|
33
33
|
# + States Outside the US (2-3 characters): To find the correct state codes
|
|
34
|
-
# outside of the US,
|
|
34
|
+
# outside of the US, go to
|
|
35
35
|
# [ISO_3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) and
|
|
36
36
|
# click on the link in the “ISO 3166-2 codes” column next to country you
|
|
37
37
|
# wish to populate.
|
|
@@ -74,7 +74,7 @@ module AdvancedBilling
|
|
|
74
74
|
# + Search by an organization
|
|
75
75
|
# + Search by a reference value from your application
|
|
76
76
|
# + Search by a first or last name
|
|
77
|
-
# To retrieve a single, exact match by reference,
|
|
77
|
+
# To retrieve a single, exact match by reference, use the [lookup
|
|
78
78
|
# endpoint](https://developers.chargify.com/docs/api-docs/b710d8fbef104-read
|
|
79
79
|
# -customer-by-reference).
|
|
80
80
|
# @param [SortingDirection] direction Optional parameter: Direction to sort
|
|
@@ -658,6 +658,38 @@ module AdvancedBilling
|
|
|
658
658
|
# ]
|
|
659
659
|
# ...
|
|
660
660
|
# ```
|
|
661
|
+
# #### Using Coupon Subcodes
|
|
662
|
+
# You can also use coupon subcodes to apply existing coupons with specific
|
|
663
|
+
# subcodes:
|
|
664
|
+
# ```json
|
|
665
|
+
# ...
|
|
666
|
+
# "coupons": [
|
|
667
|
+
# {
|
|
668
|
+
# "subcode": "SUB1",
|
|
669
|
+
# "product_family_id": 1
|
|
670
|
+
# }
|
|
671
|
+
# ]
|
|
672
|
+
# ...
|
|
673
|
+
# ```
|
|
674
|
+
# **Important:** You cannot specify both `code` and `subcode` for the same
|
|
675
|
+
# coupon. Use either:
|
|
676
|
+
# - `code` to apply a main coupon
|
|
677
|
+
# - `subcode` to apply a specific coupon subcode
|
|
678
|
+
# The API response will include both the main coupon code and the subcode
|
|
679
|
+
# used:
|
|
680
|
+
# ```json
|
|
681
|
+
# ...
|
|
682
|
+
# "coupons": [
|
|
683
|
+
# {
|
|
684
|
+
# "code": "MAIN123",
|
|
685
|
+
# "subcode": "SUB1",
|
|
686
|
+
# "product_family_id": 1,
|
|
687
|
+
# "percentage": 10,
|
|
688
|
+
# "description": "Special discount"
|
|
689
|
+
# }
|
|
690
|
+
# ]
|
|
691
|
+
# ...
|
|
692
|
+
# ```
|
|
661
693
|
# ### Coupon options
|
|
662
694
|
# #### Code
|
|
663
695
|
# Coupon `code` will be displayed on invoice discount section.
|
|
@@ -666,6 +698,11 @@ module AdvancedBilling
|
|
|
666
698
|
# Lowercase letters will be converted to uppercase. It can be used to select
|
|
667
699
|
# an existing coupon from the catalog, or as an ad hoc coupon when passed
|
|
668
700
|
# with `percentage` or `amount`.
|
|
701
|
+
# #### Subcode
|
|
702
|
+
# Coupon `subcode` allows you to apply existing coupons using their
|
|
703
|
+
# subcodes. When a subcode is used, the API response will include both the
|
|
704
|
+
# main coupon code and the specific subcode that was applied. Subcodes are
|
|
705
|
+
# case-insensitive and will be converted to uppercase automatically.
|
|
669
706
|
# #### Percentage
|
|
670
707
|
# Coupon `percentage` can take values from 0 to 100 and up to 4 decimal
|
|
671
708
|
# places. It cannot be used with `amount`. Only for ad hoc coupons, will be
|
|
@@ -724,8 +761,8 @@ module AdvancedBilling
|
|
|
724
761
|
# #### Addresses
|
|
725
762
|
# The seller, shipping and billing addresses can be sent to override the
|
|
726
763
|
# site's defaults. Each address requires to send a `first_name` at a minimum
|
|
727
|
-
# in order to work.
|
|
728
|
-
#
|
|
764
|
+
# in order to work. See below for the details on which parameters can be
|
|
765
|
+
# sent for each address object.
|
|
729
766
|
# #### Memo and Payment Instructions
|
|
730
767
|
# A custom memo can be sent with the `memo` parameter to override the site's
|
|
731
768
|
# default. Likewise, custom payment instructions can be sent with the
|
|
@@ -767,15 +804,15 @@ module AdvancedBilling
|
|
|
767
804
|
# automatically generated invoices. Additionally, this endpoint supports
|
|
768
805
|
# email delivery to direct recipients, carbon-copy (cc) recipients, and
|
|
769
806
|
# blind carbon-copy (bcc) recipients.
|
|
770
|
-
#
|
|
771
|
-
#
|
|
772
|
-
#
|
|
773
|
-
#
|
|
774
|
-
# On success, a 204 no-content response will be returned.
|
|
775
|
-
#
|
|
776
|
-
#
|
|
777
|
-
#
|
|
778
|
-
#
|
|
807
|
+
# If no recipient email addresses are specified in the request, then the
|
|
808
|
+
# subscription's default email configuration will be used. For example, if
|
|
809
|
+
# `recipient_emails` is left blank, then the invoice will be delivered to
|
|
810
|
+
# the subscription's customer email address.
|
|
811
|
+
# On success, a 204 no-content response will be returned. The response does
|
|
812
|
+
# not indicate that email(s) have been delivered, but instead indicates that
|
|
813
|
+
# emails have been successfully queued for delivery. If _any_ invalid or
|
|
814
|
+
# malformed email address is found in the request body, the entire request
|
|
815
|
+
# will be rejected and a 422 response will be returned.
|
|
779
816
|
# @param [String] uid Required parameter: The unique identifier for the
|
|
780
817
|
# invoice, this does not refer to the public facing invoice number.
|
|
781
818
|
# @param [SendInvoiceRequest] body Optional parameter: TODO: type
|