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
|
@@ -31,5 +31,22 @@ module AdvancedBilling
|
|
|
31
31
|
|
|
32
32
|
SUBSCRIPTION_GROUP_PREPAYMENT_METHOD.include?(value)
|
|
33
33
|
end
|
|
34
|
+
|
|
35
|
+
def self.from_value(value, default_value = CHECK)
|
|
36
|
+
return default_value if value.nil?
|
|
37
|
+
|
|
38
|
+
str = value.to_s.strip
|
|
39
|
+
|
|
40
|
+
case str.downcase
|
|
41
|
+
when 'check' then CHECK
|
|
42
|
+
when 'cash' then CASH
|
|
43
|
+
when 'money_order' then MONEY_ORDER
|
|
44
|
+
when 'ach' then ACH
|
|
45
|
+
when 'paypal_account' then PAYPAL_ACCOUNT
|
|
46
|
+
when 'other' then OTHER
|
|
47
|
+
else
|
|
48
|
+
default_value
|
|
49
|
+
end
|
|
50
|
+
end
|
|
34
51
|
end
|
|
35
52
|
end
|
|
@@ -19,5 +19,18 @@ module AdvancedBilling
|
|
|
19
19
|
|
|
20
20
|
SUBSCRIPTION_INCLUDE.include?(value)
|
|
21
21
|
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = COUPONS)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'coupons' then COUPONS
|
|
30
|
+
when 'self_service_page_token' then SELF_SERVICE_PAGE_TOKEN
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
22
35
|
end
|
|
23
36
|
end
|
|
@@ -117,6 +117,16 @@ module AdvancedBilling
|
|
|
117
117
|
additional_properties: additional_properties)
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
+
# Validates an instance of the object from a given value.
|
|
121
|
+
# @param [SubscriptionIncludedCoupon | Hash] The value against the validation is performed.
|
|
122
|
+
def self.validate(value)
|
|
123
|
+
return true if value.instance_of? self
|
|
124
|
+
|
|
125
|
+
return false unless value.instance_of? Hash
|
|
126
|
+
|
|
127
|
+
true
|
|
128
|
+
end
|
|
129
|
+
|
|
120
130
|
# Provides a human-readable string representation of the object.
|
|
121
131
|
def to_s
|
|
122
132
|
class_name = self.class.name.split('::').last
|
|
@@ -19,5 +19,18 @@ module AdvancedBilling
|
|
|
19
19
|
|
|
20
20
|
SUBSCRIPTION_PURGE_TYPE.include?(value)
|
|
21
21
|
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = CUSTOMER)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'customer' then CUSTOMER
|
|
30
|
+
when 'payment_profile' then PAYMENT_PROFILE
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
22
35
|
end
|
|
23
36
|
end
|
|
@@ -31,5 +31,22 @@ module AdvancedBilling
|
|
|
31
31
|
|
|
32
32
|
SUBSCRIPTION_SORT.include?(value)
|
|
33
33
|
end
|
|
34
|
+
|
|
35
|
+
def self.from_value(value, default_value = SIGNUP_DATE)
|
|
36
|
+
return default_value if value.nil?
|
|
37
|
+
|
|
38
|
+
str = value.to_s.strip
|
|
39
|
+
|
|
40
|
+
case str.downcase
|
|
41
|
+
when 'signup_date' then SIGNUP_DATE
|
|
42
|
+
when 'period_start' then PERIOD_START
|
|
43
|
+
when 'period_end' then PERIOD_END
|
|
44
|
+
when 'next_assessment' then NEXT_ASSESSMENT
|
|
45
|
+
when 'updated_at' then UPDATED_AT
|
|
46
|
+
when 'created_at' then CREATED_AT
|
|
47
|
+
else
|
|
48
|
+
default_value
|
|
49
|
+
end
|
|
50
|
+
end
|
|
34
51
|
end
|
|
35
52
|
end
|
|
@@ -114,5 +114,31 @@ module AdvancedBilling
|
|
|
114
114
|
|
|
115
115
|
SUBSCRIPTION_STATE.include?(value)
|
|
116
116
|
end
|
|
117
|
+
|
|
118
|
+
def self.from_value(value, default_value = PENDING)
|
|
119
|
+
return default_value if value.nil?
|
|
120
|
+
|
|
121
|
+
str = value.to_s.strip
|
|
122
|
+
|
|
123
|
+
case str.downcase
|
|
124
|
+
when 'pending' then PENDING
|
|
125
|
+
when 'failed_to_create' then FAILED_TO_CREATE
|
|
126
|
+
when 'trialing' then TRIALING
|
|
127
|
+
when 'assessing' then ASSESSING
|
|
128
|
+
when 'active' then ACTIVE
|
|
129
|
+
when 'soft_failure' then SOFT_FAILURE
|
|
130
|
+
when 'past_due' then PAST_DUE
|
|
131
|
+
when 'suspended' then SUSPENDED
|
|
132
|
+
when 'canceled' then CANCELED
|
|
133
|
+
when 'expired' then EXPIRED
|
|
134
|
+
when 'paused' then PAUSED
|
|
135
|
+
when 'unpaid' then UNPAID
|
|
136
|
+
when 'trial_ended' then TRIAL_ENDED
|
|
137
|
+
when 'on_hold' then ON_HOLD
|
|
138
|
+
when 'awaiting_signup' then AWAITING_SIGNUP
|
|
139
|
+
else
|
|
140
|
+
default_value
|
|
141
|
+
end
|
|
142
|
+
end
|
|
117
143
|
end
|
|
118
144
|
end
|
|
@@ -49,5 +49,28 @@ module AdvancedBilling
|
|
|
49
49
|
|
|
50
50
|
SUBSCRIPTION_STATE_FILTER.include?(value)
|
|
51
51
|
end
|
|
52
|
+
|
|
53
|
+
def self.from_value(value, default_value = ACTIVE)
|
|
54
|
+
return default_value if value.nil?
|
|
55
|
+
|
|
56
|
+
str = value.to_s.strip
|
|
57
|
+
|
|
58
|
+
case str.downcase
|
|
59
|
+
when 'active' then ACTIVE
|
|
60
|
+
when 'canceled' then CANCELED
|
|
61
|
+
when 'expired' then EXPIRED
|
|
62
|
+
when 'expired_cards' then EXPIRED_CARDS
|
|
63
|
+
when 'on_hold' then ON_HOLD
|
|
64
|
+
when 'past_due' then PAST_DUE
|
|
65
|
+
when 'pending_cancellation' then PENDING_CANCELLATION
|
|
66
|
+
when 'pending_renewal' then PENDING_RENEWAL
|
|
67
|
+
when 'suspended' then SUSPENDED
|
|
68
|
+
when 'trial_ended' then TRIAL_ENDED
|
|
69
|
+
when 'trialing' then TRIALING
|
|
70
|
+
when 'unpaid' then UNPAID
|
|
71
|
+
else
|
|
72
|
+
default_value
|
|
73
|
+
end
|
|
74
|
+
end
|
|
52
75
|
end
|
|
53
76
|
end
|
|
@@ -25,5 +25,20 @@ module AdvancedBilling
|
|
|
25
25
|
|
|
26
26
|
TAX_CONFIGURATION_KIND.include?(value)
|
|
27
27
|
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = CUSTOM)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'custom' then CUSTOM
|
|
36
|
+
when 'enum_managed_avalara' then ENUM_MANAGED_AVALARA
|
|
37
|
+
when 'enum_linked_avalara' then ENUM_LINKED_AVALARA
|
|
38
|
+
when 'enum_digital_river' then ENUM_DIGITAL_RIVER
|
|
39
|
+
else
|
|
40
|
+
default_value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
28
43
|
end
|
|
29
44
|
end
|
|
@@ -25,5 +25,20 @@ module AdvancedBilling
|
|
|
25
25
|
|
|
26
26
|
TAX_DESTINATION_ADDRESS.include?(value)
|
|
27
27
|
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = SHIPPING_THEN_BILLING)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'shipping_then_billing' then SHIPPING_THEN_BILLING
|
|
36
|
+
when 'billing_then_shipping' then BILLING_THEN_SHIPPING
|
|
37
|
+
when 'shipping_only' then SHIPPING_ONLY
|
|
38
|
+
when 'billing_only' then BILLING_ONLY
|
|
39
|
+
else
|
|
40
|
+
default_value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
28
43
|
end
|
|
29
44
|
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# advanced_billing
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Maxio by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module AdvancedBilling
|
|
7
|
+
# Indicates how a trial is handled when the trail period ends and there is no
|
|
8
|
+
# credit card on file. For `no_obligation`, the subscription transitions to a
|
|
9
|
+
# Trial Ended state. Maxio will not send any emails or statements. For
|
|
10
|
+
# `payment_expected`, the subscription transitions to a Past Due state. Maxio
|
|
11
|
+
# will send normal dunning emails and statements according to your other
|
|
12
|
+
# settings.
|
|
13
|
+
class TrialType
|
|
14
|
+
TRIAL_TYPE = [
|
|
15
|
+
# TODO: Write general description for NO_OBLIGATION
|
|
16
|
+
NO_OBLIGATION = 'no_obligation'.freeze,
|
|
17
|
+
|
|
18
|
+
# TODO: Write general description for PAYMENT_EXPECTED
|
|
19
|
+
PAYMENT_EXPECTED = 'payment_expected'.freeze
|
|
20
|
+
].freeze
|
|
21
|
+
|
|
22
|
+
def self.validate(value)
|
|
23
|
+
return false if value.nil?
|
|
24
|
+
|
|
25
|
+
TRIAL_TYPE.include?(value)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.from_value(value, default_value = NO_OBLIGATION)
|
|
29
|
+
return default_value if value.nil?
|
|
30
|
+
|
|
31
|
+
str = value.to_s.strip
|
|
32
|
+
|
|
33
|
+
case str.downcase
|
|
34
|
+
when 'no_obligation' then NO_OBLIGATION
|
|
35
|
+
when 'payment_expected' then PAYMENT_EXPECTED
|
|
36
|
+
else
|
|
37
|
+
default_value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -31,8 +31,8 @@ module AdvancedBilling
|
|
|
31
31
|
attr_accessor :taxable
|
|
32
32
|
|
|
33
33
|
# A string representing the tax code related to the component type. This is
|
|
34
|
-
# especially important when using
|
|
35
|
-
#
|
|
34
|
+
# especially important when using AvaTax to tax based on locale. This
|
|
35
|
+
# attribute has a max length of 25 characters.
|
|
36
36
|
# @return [String]
|
|
37
37
|
attr_accessor :tax_code
|
|
38
38
|
|
|
@@ -23,15 +23,13 @@ module AdvancedBilling
|
|
|
23
23
|
# @return [MetafieldScope]
|
|
24
24
|
attr_accessor :scope
|
|
25
25
|
|
|
26
|
-
# Indicates
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
# allowed values that can be input, and appear differently on a Public
|
|
30
|
-
# Signup Page. Defaults to 'text'
|
|
26
|
+
# Indicates the type of metafield. A text metafield allows any string value.
|
|
27
|
+
# Dropdown and radio metafields have a set of values that can be selected.
|
|
28
|
+
# Defaults to 'text'.
|
|
31
29
|
# @return [MetafieldInput]
|
|
32
30
|
attr_accessor :input_type
|
|
33
31
|
|
|
34
|
-
# Only applicable when input_type is radio or dropdown
|
|
32
|
+
# Only applicable when input_type is radio or dropdown.
|
|
35
33
|
# @return [Array[String]]
|
|
36
34
|
attr_accessor :enum
|
|
37
35
|
|
|
@@ -68,9 +68,9 @@ module AdvancedBilling
|
|
|
68
68
|
# The credit card or bank account billing address country, required in
|
|
69
69
|
# [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
|
|
70
70
|
# format (i.e. “US”). This value is merely passed through to the payment
|
|
71
|
-
# gateway. Some gateways require country codes in a specific format.
|
|
72
|
-
#
|
|
73
|
-
#
|
|
71
|
+
# gateway. Some gateways require country codes in a specific format. Check
|
|
72
|
+
# your gateway’s documentation. If creating an ACH subscription, only US is
|
|
73
|
+
# supported at this time.
|
|
74
74
|
# @return [String]
|
|
75
75
|
attr_accessor :billing_country
|
|
76
76
|
|
|
@@ -19,5 +19,18 @@ module AdvancedBilling
|
|
|
19
19
|
|
|
20
20
|
WEBHOOK_ORDER.include?(value)
|
|
21
21
|
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = NEWEST_FIRST)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'newest_first' then NEWEST_FIRST
|
|
30
|
+
when 'oldest_first' then OLDEST_FIRST
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
22
35
|
end
|
|
23
36
|
end
|
|
@@ -25,5 +25,20 @@ module AdvancedBilling
|
|
|
25
25
|
|
|
26
26
|
WEBHOOK_STATUS.include?(value)
|
|
27
27
|
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = SUCCESSFUL)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'successful' then SUCCESSFUL
|
|
36
|
+
when 'failed' then FAILED
|
|
37
|
+
when 'pending' then PENDING
|
|
38
|
+
when 'paused' then PAUSED
|
|
39
|
+
else
|
|
40
|
+
default_value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
28
43
|
end
|
|
29
44
|
end
|
|
@@ -120,5 +120,51 @@ module AdvancedBilling
|
|
|
120
120
|
|
|
121
121
|
WEBHOOK_SUBSCRIPTION.include?(value)
|
|
122
122
|
end
|
|
123
|
+
|
|
124
|
+
def self.from_value(value, default_value = BILLING_DATE_CHANGE)
|
|
125
|
+
return default_value if value.nil?
|
|
126
|
+
|
|
127
|
+
str = value.to_s.strip
|
|
128
|
+
|
|
129
|
+
case str.downcase
|
|
130
|
+
when 'billing_date_change' then BILLING_DATE_CHANGE
|
|
131
|
+
when 'component_allocation_change' then COMPONENT_ALLOCATION_CHANGE
|
|
132
|
+
when 'customer_create' then CUSTOMER_CREATE
|
|
133
|
+
when 'customer_update' then CUSTOMER_UPDATE
|
|
134
|
+
when 'dunning_step_reached' then DUNNING_STEP_REACHED
|
|
135
|
+
when 'expiring_card' then EXPIRING_CARD
|
|
136
|
+
when 'expiration_date_change' then EXPIRATION_DATE_CHANGE
|
|
137
|
+
when 'invoice_issued' then INVOICE_ISSUED
|
|
138
|
+
when 'metered_usage' then METERED_USAGE
|
|
139
|
+
when 'payment_failure' then PAYMENT_FAILURE
|
|
140
|
+
when 'payment_success' then PAYMENT_SUCCESS
|
|
141
|
+
when 'direct_debit_payment_pending' then DIRECT_DEBIT_PAYMENT_PENDING
|
|
142
|
+
when 'direct_debit_payment_paid_out' then DIRECT_DEBIT_PAYMENT_PAID_OUT
|
|
143
|
+
when 'direct_debit_payment_rejected' then DIRECT_DEBIT_PAYMENT_REJECTED
|
|
144
|
+
when 'prepaid_subscription_balance_changed' then PREPAID_SUBSCRIPTION_BALANCE_CHANGED
|
|
145
|
+
when 'prepaid_usage' then PREPAID_USAGE
|
|
146
|
+
when 'refund_failure' then REFUND_FAILURE
|
|
147
|
+
when 'refund_success' then REFUND_SUCCESS
|
|
148
|
+
when 'renewal_failure' then RENEWAL_FAILURE
|
|
149
|
+
when 'renewal_success' then RENEWAL_SUCCESS
|
|
150
|
+
when 'signup_failure' then SIGNUP_FAILURE
|
|
151
|
+
when 'signup_success' then SIGNUP_SUCCESS
|
|
152
|
+
when 'statement_closed' then STATEMENT_CLOSED
|
|
153
|
+
when 'statement_settled' then STATEMENT_SETTLED
|
|
154
|
+
when 'subscription_card_update' then SUBSCRIPTION_CARD_UPDATE
|
|
155
|
+
when 'subscription_group_card_update' then SUBSCRIPTION_GROUP_CARD_UPDATE
|
|
156
|
+
when 'subscription_product_change' then SUBSCRIPTION_PRODUCT_CHANGE
|
|
157
|
+
when 'subscription_state_change' then SUBSCRIPTION_STATE_CHANGE
|
|
158
|
+
when 'trial_end_notice' then TRIAL_END_NOTICE
|
|
159
|
+
when 'upcoming_renewal_notice' then UPCOMING_RENEWAL_NOTICE
|
|
160
|
+
when 'upgrade_downgrade_failure' then UPGRADE_DOWNGRADE_FAILURE
|
|
161
|
+
when 'upgrade_downgrade_success' then UPGRADE_DOWNGRADE_SUCCESS
|
|
162
|
+
when 'pending_cancellation_change' then PENDING_CANCELLATION_CHANGE
|
|
163
|
+
when 'subscription_prepayment_account_balance_changed' then SUBSCRIPTION_PREPAYMENT_ACCOUNT_BALANCE_CHANGED
|
|
164
|
+
when 'subscription_service_credit_account_balance_changed' then SUBSCRIPTION_SERVICE_CREDIT_ACCOUNT_BALANCE_CHANGED
|
|
165
|
+
else
|
|
166
|
+
default_value
|
|
167
|
+
end
|
|
168
|
+
end
|
|
123
169
|
end
|
|
124
170
|
end
|
|
@@ -110,6 +110,13 @@ module AdvancedBilling
|
|
|
110
110
|
]
|
|
111
111
|
),
|
|
112
112
|
|
|
113
|
+
:CreateUsageSubscriptionIdOrReference => OneOf.new(
|
|
114
|
+
[
|
|
115
|
+
LeafType.new(Integer),
|
|
116
|
+
LeafType.new(String)
|
|
117
|
+
]
|
|
118
|
+
),
|
|
119
|
+
|
|
113
120
|
:CreateUsageComponentId => OneOf.new(
|
|
114
121
|
[
|
|
115
122
|
LeafType.new(Integer),
|
|
@@ -117,6 +124,13 @@ module AdvancedBilling
|
|
|
117
124
|
]
|
|
118
125
|
),
|
|
119
126
|
|
|
127
|
+
:ListUsagesInputSubscriptionIdOrReference => OneOf.new(
|
|
128
|
+
[
|
|
129
|
+
LeafType.new(Integer),
|
|
130
|
+
LeafType.new(String)
|
|
131
|
+
]
|
|
132
|
+
),
|
|
133
|
+
|
|
120
134
|
:ListUsagesInputComponentId => OneOf.new(
|
|
121
135
|
[
|
|
122
136
|
LeafType.new(Integer),
|
|
@@ -261,10 +275,11 @@ module AdvancedBilling
|
|
|
261
275
|
:CalendarBillingSnapDay => OneOf.new(
|
|
262
276
|
[
|
|
263
277
|
LeafType.new(Integer),
|
|
264
|
-
LeafType.new(
|
|
278
|
+
LeafType.new(SnapDay)
|
|
265
279
|
],
|
|
266
280
|
UnionTypeContext.new(
|
|
267
|
-
is_optional: true
|
|
281
|
+
is_optional: true,
|
|
282
|
+
is_nullable: true
|
|
268
283
|
)
|
|
269
284
|
),
|
|
270
285
|
|
|
@@ -836,6 +851,17 @@ module AdvancedBilling
|
|
|
836
851
|
)
|
|
837
852
|
),
|
|
838
853
|
|
|
854
|
+
:SubscriptionSnapDay => OneOf.new(
|
|
855
|
+
[
|
|
856
|
+
LeafType.new(Integer),
|
|
857
|
+
LeafType.new(SnapDay)
|
|
858
|
+
],
|
|
859
|
+
UnionTypeContext.new(
|
|
860
|
+
is_optional: true,
|
|
861
|
+
is_nullable: true
|
|
862
|
+
)
|
|
863
|
+
),
|
|
864
|
+
|
|
839
865
|
:SubscriptionComponentAllocatedQuantity => OneOf.new(
|
|
840
866
|
[
|
|
841
867
|
LeafType.new(Integer),
|
|
@@ -1022,11 +1048,12 @@ module AdvancedBilling
|
|
|
1022
1048
|
|
|
1023
1049
|
:UpdateSubscriptionSnapDay => OneOf.new(
|
|
1024
1050
|
[
|
|
1025
|
-
LeafType.new(
|
|
1026
|
-
LeafType.new(
|
|
1051
|
+
LeafType.new(Integer),
|
|
1052
|
+
LeafType.new(SnapDay)
|
|
1027
1053
|
],
|
|
1028
1054
|
UnionTypeContext.new(
|
|
1029
|
-
is_optional: true
|
|
1055
|
+
is_optional: true,
|
|
1056
|
+
is_nullable: true
|
|
1030
1057
|
)
|
|
1031
1058
|
),
|
|
1032
1059
|
|
data/lib/advanced_billing.rb
CHANGED
|
@@ -23,6 +23,7 @@ require_relative 'advanced_billing/http/http_call_back'
|
|
|
23
23
|
require_relative 'advanced_billing/http/http_method_enum'
|
|
24
24
|
require_relative 'advanced_billing/http/http_request'
|
|
25
25
|
require_relative 'advanced_billing/http/http_response'
|
|
26
|
+
require_relative 'advanced_billing/http/proxy_settings'
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
require_relative 'advanced_billing/http/auth/basic_auth'
|
|
@@ -622,6 +623,7 @@ require_relative 'advanced_billing/models/subscription_state'
|
|
|
622
623
|
require_relative 'advanced_billing/models/subscription_state_filter'
|
|
623
624
|
require_relative 'advanced_billing/models/tax_configuration_kind'
|
|
624
625
|
require_relative 'advanced_billing/models/tax_destination_address'
|
|
626
|
+
require_relative 'advanced_billing/models/trial_type'
|
|
625
627
|
require_relative 'advanced_billing/models/webhook_order'
|
|
626
628
|
require_relative 'advanced_billing/models/webhook_status'
|
|
627
629
|
require_relative 'advanced_billing/models/webhook_subscription'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: maxio-advanced-billing-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 8.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maxio SDK
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: apimatic_core_interfaces
|
|
@@ -16,42 +16,42 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.2.
|
|
19
|
+
version: 0.2.3
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.2.
|
|
26
|
+
version: 0.2.3
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: apimatic_core
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.3.
|
|
33
|
+
version: 0.3.20
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.3.
|
|
40
|
+
version: 0.3.20
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: apimatic_faraday_client_adapter
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.1.
|
|
47
|
+
version: 0.1.6
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.1.
|
|
54
|
+
version: 0.1.6
|
|
55
55
|
description: |-
|
|
56
56
|
Ultimate billing and pricing flexibility for B2B SaaS.
|
|
57
57
|
Maxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments.
|
|
@@ -63,6 +63,7 @@ extra_rdoc_files: []
|
|
|
63
63
|
files:
|
|
64
64
|
- LICENSE
|
|
65
65
|
- README.md
|
|
66
|
+
- bin/console
|
|
66
67
|
- lib/advanced_billing.rb
|
|
67
68
|
- lib/advanced_billing/api_helper.rb
|
|
68
69
|
- lib/advanced_billing/client.rb
|
|
@@ -129,6 +130,7 @@ files:
|
|
|
129
130
|
- lib/advanced_billing/http/http_method_enum.rb
|
|
130
131
|
- lib/advanced_billing/http/http_request.rb
|
|
131
132
|
- lib/advanced_billing/http/http_response.rb
|
|
133
|
+
- lib/advanced_billing/http/proxy_settings.rb
|
|
132
134
|
- lib/advanced_billing/models/account_balance.rb
|
|
133
135
|
- lib/advanced_billing/models/account_balances.rb
|
|
134
136
|
- lib/advanced_billing/models/ach_agreement.rb
|
|
@@ -660,6 +662,7 @@ files:
|
|
|
660
662
|
- lib/advanced_billing/models/tax_configuration_kind.rb
|
|
661
663
|
- lib/advanced_billing/models/tax_destination_address.rb
|
|
662
664
|
- lib/advanced_billing/models/too_many_management_link_requests.rb
|
|
665
|
+
- lib/advanced_billing/models/trial_type.rb
|
|
663
666
|
- lib/advanced_billing/models/update_allocation_expiration_date.rb
|
|
664
667
|
- lib/advanced_billing/models/update_component.rb
|
|
665
668
|
- lib/advanced_billing/models/update_component_price_point.rb
|