maxio-advanced-billing-sdk 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -40
- data/lib/advanced_billing/controllers/advance_invoice_controller.rb +6 -4
- data/lib/advanced_billing/controllers/base_controller.rb +1 -1
- data/lib/advanced_billing/controllers/components_controller.rb +9 -58
- data/lib/advanced_billing/controllers/coupons_controller.rb +6 -115
- data/lib/advanced_billing/controllers/custom_fields_controller.rb +4 -4
- data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +5 -22
- data/lib/advanced_billing/controllers/insights_controller.rb +3 -4
- data/lib/advanced_billing/controllers/invoices_controller.rb +11 -0
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +26 -0
- data/lib/advanced_billing/controllers/product_families_controller.rb +5 -14
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +3 -40
- data/lib/advanced_billing/controllers/products_controller.rb +5 -14
- data/lib/advanced_billing/controllers/subscription_components_controller.rb +16 -66
- data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +5 -15
- data/lib/advanced_billing/controllers/subscription_groups_controller.rb +6 -6
- data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +13 -20
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +49 -14
- data/lib/advanced_billing/models/ach_agreement.rb +10 -0
- data/lib/advanced_billing/models/address_change.rb +0 -22
- data/lib/advanced_billing/models/agreement_acceptance.rb +10 -0
- data/lib/advanced_billing/models/allocation.rb +1 -3
- data/lib/advanced_billing/models/applied_credit_note_data.rb +10 -0
- data/lib/advanced_billing/models/apply_credit_note_event.rb +139 -0
- data/lib/advanced_billing/models/apply_credit_note_event_data.rb +3 -1
- data/lib/advanced_billing/models/apply_debit_note_event.rb +139 -0
- data/lib/advanced_billing/models/apply_debit_note_event_data.rb +36 -2
- data/lib/advanced_billing/models/apply_payment_event.rb +139 -0
- data/lib/advanced_billing/models/apply_payment_event_data.rb +21 -7
- data/lib/advanced_billing/models/backport_invoice_event.rb +139 -0
- data/lib/advanced_billing/models/bank_account_attributes.rb +10 -0
- data/lib/advanced_billing/models/billing_manifest.rb +5 -1
- data/lib/advanced_billing/models/billing_schedule.rb +10 -0
- data/lib/advanced_billing/models/change_chargeback_status_event.rb +141 -0
- data/lib/advanced_billing/models/change_chargeback_status_event_data.rb +73 -0
- data/lib/advanced_billing/models/change_invoice_collection_method_event.rb +141 -0
- data/lib/advanced_billing/models/change_invoice_status_event.rb +141 -0
- data/lib/advanced_billing/models/change_invoice_status_event_data.rb +131 -0
- data/lib/advanced_billing/models/chargeback_status.rb +29 -0
- data/lib/advanced_billing/models/component.rb +3 -13
- data/lib/advanced_billing/models/component_cost_data.rb +10 -0
- data/lib/advanced_billing/models/component_cost_data_rate_tier.rb +10 -0
- data/lib/advanced_billing/models/component_custom_price.rb +10 -0
- data/lib/advanced_billing/models/component_price_point.rb +2 -13
- data/lib/advanced_billing/models/component_price_point_item.rb +10 -0
- data/lib/advanced_billing/models/coupon.rb +4 -14
- data/lib/advanced_billing/models/create_component_price_point.rb +6 -2
- data/lib/advanced_billing/models/create_component_price_point_request.rb +1 -1
- data/lib/advanced_billing/models/create_component_price_points_request.rb +1 -1
- data/lib/advanced_billing/models/create_credit_note_event.rb +139 -0
- data/lib/advanced_billing/models/create_debit_note_event.rb +139 -0
- data/lib/advanced_billing/models/create_invoice_payment_application.rb +22 -0
- data/lib/advanced_billing/models/create_multi_invoice_payment.rb +6 -2
- data/lib/advanced_billing/models/create_offer_component.rb +11 -0
- data/lib/advanced_billing/models/create_payment_profile.rb +4 -4
- data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +10 -4
- data/lib/advanced_billing/models/create_product_family.rb +14 -4
- data/lib/advanced_billing/models/create_subscription.rb +2 -2
- data/lib/advanced_billing/models/credit_card_attributes.rb +10 -0
- data/lib/advanced_billing/models/credit_note_application.rb +10 -0
- data/lib/advanced_billing/models/credit_note_line_item.rb +10 -0
- data/lib/advanced_billing/models/customer.rb +13 -1
- data/lib/advanced_billing/models/customer_attributes.rb +10 -0
- data/lib/advanced_billing/models/customer_change.rb +7 -22
- data/lib/advanced_billing/models/customer_custom_fields_change.rb +0 -22
- data/lib/advanced_billing/models/customer_payer_change.rb +0 -22
- data/lib/advanced_billing/models/debit_note.rb +351 -0
- data/lib/advanced_billing/models/debit_note_role.rb +23 -0
- data/lib/advanced_billing/models/debit_note_status.rb +29 -0
- data/lib/advanced_billing/models/deduct_service_credit.rb +10 -16
- data/lib/advanced_billing/models/dunner_data.rb +38 -0
- data/lib/advanced_billing/models/dunning_step_data.rb +34 -0
- data/lib/advanced_billing/models/dunning_step_reached.rb +12 -6
- data/lib/advanced_billing/models/failed_payment_event.rb +139 -0
- data/lib/advanced_billing/models/failed_payment_event_data.rb +132 -0
- data/lib/advanced_billing/models/group_billing.rb +10 -0
- data/lib/advanced_billing/models/group_settings.rb +4 -2
- data/lib/advanced_billing/models/group_target.rb +14 -0
- data/lib/advanced_billing/models/historic_usage.rb +109 -0
- data/lib/advanced_billing/models/include_null_or_not_null.rb +23 -0
- data/lib/advanced_billing/models/invoice.rb +18 -8
- data/lib/advanced_billing/models/invoice_address.rb +10 -0
- data/lib/advanced_billing/models/invoice_balance_item.rb +10 -0
- data/lib/advanced_billing/models/invoice_credit.rb +10 -0
- data/lib/advanced_billing/models/invoice_custom_field.rb +10 -0
- data/lib/advanced_billing/models/invoice_customer.rb +10 -0
- data/lib/advanced_billing/models/invoice_discount.rb +10 -0
- data/lib/advanced_billing/models/invoice_discount_breakout.rb +10 -0
- data/lib/advanced_billing/models/invoice_display_settings.rb +10 -0
- data/lib/advanced_billing/models/invoice_event_type.rb +3 -0
- data/lib/advanced_billing/models/invoice_issued.rb +6 -2
- data/lib/advanced_billing/models/invoice_line_item.rb +3 -3
- data/lib/advanced_billing/models/invoice_line_item_event_data.rb +10 -0
- data/lib/advanced_billing/models/invoice_line_item_pricing_detail.rb +10 -0
- data/lib/advanced_billing/models/invoice_payer.rb +10 -0
- data/lib/advanced_billing/models/invoice_payment.rb +10 -0
- data/lib/advanced_billing/models/invoice_payment_method.rb +10 -0
- data/lib/advanced_billing/models/invoice_pre_payment.rb +0 -10
- data/lib/advanced_billing/models/invoice_previous_balance.rb +10 -0
- data/lib/advanced_billing/models/invoice_refund.rb +10 -0
- data/lib/advanced_billing/models/invoice_seller.rb +10 -0
- data/lib/advanced_billing/models/invoice_status.rb +2 -2
- data/lib/advanced_billing/models/invoice_tax.rb +10 -0
- data/lib/advanced_billing/models/invoice_tax_breakout.rb +10 -0
- data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +10 -0
- data/lib/advanced_billing/models/issue_invoice_event.rb +139 -0
- data/lib/advanced_billing/models/issue_invoice_event_data.rb +6 -6
- data/lib/advanced_billing/models/issue_service_credit.rb +10 -16
- data/lib/advanced_billing/models/item_price_point_changed.rb +8 -4
- data/lib/advanced_billing/models/item_price_point_data.rb +10 -0
- data/lib/advanced_billing/models/list_components_filter.rb +74 -0
- data/lib/advanced_billing/models/list_coupons_filter.rb +168 -0
- data/lib/advanced_billing/models/list_invoice_events_response.rb +14 -11
- data/lib/advanced_billing/models/{refund_prepayment_aggregated_error.rb → list_mrr_filter.rb} +14 -12
- data/lib/advanced_billing/models/{list_subscription_group_prepayment_date_field.rb → list_prepayment_date_field.rb} +4 -4
- data/lib/advanced_billing/models/list_prepayments_filter.rb +88 -0
- data/lib/advanced_billing/models/list_price_points_filter.rb +163 -0
- data/lib/advanced_billing/models/list_products_filter.rb +81 -0
- data/lib/advanced_billing/models/list_segments_filter.rb +103 -0
- data/lib/advanced_billing/models/list_subscription_components_filter.rb +74 -0
- data/lib/advanced_billing/models/list_subscription_components_for_site_filter.rb +84 -0
- data/lib/advanced_billing/models/list_subscription_components_include.rb +4 -1
- data/lib/advanced_billing/models/metafield_scope.rb +10 -0
- data/lib/advanced_billing/models/nested_subscription_group.rb +0 -10
- data/lib/advanced_billing/models/origin_invoice.rb +10 -0
- data/lib/advanced_billing/models/overage_pricing.rb +14 -0
- data/lib/advanced_billing/models/paid_invoice.rb +2 -2
- data/lib/advanced_billing/models/payer_attributes.rb +10 -0
- data/lib/advanced_billing/models/prepaid_component_price_point.rb +10 -0
- data/lib/advanced_billing/models/prepaid_product_price_point_filter.rb +56 -0
- data/lib/advanced_billing/models/prepaid_usage.rb +6 -2
- data/lib/advanced_billing/models/prepaid_usage_allocation_detail.rb +10 -0
- data/lib/advanced_billing/models/product.rb +5 -16
- data/lib/advanced_billing/models/product_price_point.rb +9 -0
- data/lib/advanced_billing/models/proforma_invoice.rb +2 -2
- data/lib/advanced_billing/models/proforma_invoice_issued.rb +6 -2
- data/lib/advanced_billing/models/reactivation_billing.rb +10 -0
- data/lib/advanced_billing/models/record_payment_response.rb +1 -13
- data/lib/advanced_billing/models/refund_invoice_event.rb +139 -0
- data/lib/advanced_billing/models/refund_invoice_event_data.rb +4 -2
- data/lib/advanced_billing/models/refund_invoice_request.rb +1 -1
- data/lib/advanced_billing/models/refund_prepayment.rb +3 -1
- data/lib/advanced_billing/models/remove_payment_event.rb +139 -0
- data/lib/advanced_billing/models/remove_payment_event_data.rb +1 -1
- data/lib/advanced_billing/models/segment_price.rb +10 -0
- data/lib/advanced_billing/models/subscription.rb +10 -16
- data/lib/advanced_billing/models/subscription_component.rb +26 -7
- data/lib/advanced_billing/models/subscription_component_subscription.rb +10 -0
- data/lib/advanced_billing/models/subscription_filter.rb +153 -0
- data/lib/advanced_billing/models/subscription_group.rb +2 -2
- data/lib/advanced_billing/models/subscription_group_bank_account.rb +10 -0
- data/lib/advanced_billing/models/subscription_group_component_custom_price.rb +10 -0
- data/lib/advanced_billing/models/subscription_group_prepayment_response.rb +3 -1
- data/lib/advanced_billing/models/subscription_group_signup.rb +2 -2
- data/lib/advanced_billing/models/subscription_group_signup_failure.rb +4 -2
- data/lib/advanced_billing/models/subscription_group_signup_failure_data.rb +10 -0
- data/lib/advanced_billing/models/subscription_group_signup_item.rb +10 -0
- data/lib/advanced_billing/models/subscription_group_signup_response.rb +2 -2
- data/lib/advanced_billing/models/subscription_group_signup_success.rb +8 -4
- data/lib/advanced_billing/models/subscription_group_signup_success_data.rb +50 -0
- data/lib/advanced_billing/models/update_customer.rb +12 -0
- data/lib/advanced_billing/models/update_subscription_component.rb +10 -0
- data/lib/advanced_billing/models/upsert_prepaid_configuration.rb +10 -0
- data/lib/advanced_billing/models/usage.rb +3 -1
- data/lib/advanced_billing/models/void_invoice_event.rb +139 -0
- data/lib/advanced_billing/models/void_invoice_event_data.rb +8 -7
- data/lib/advanced_billing/models/void_remainder_event.rb +139 -0
- data/lib/advanced_billing/models/void_remainder_event_data.rb +4 -2
- data/lib/advanced_billing/utilities/union_type_lookup.rb +69 -199
- data/lib/advanced_billing.rb +42 -18
- metadata +38 -17
- data/lib/advanced_billing/exceptions/refund_prepayment_aggregated_errors_response_exception.rb +0 -33
- data/lib/advanced_billing/models/billing_address.rb +0 -117
- data/lib/advanced_billing/models/credit_note1.rb +0 -419
- data/lib/advanced_billing/models/customer1.rb +0 -125
- data/lib/advanced_billing/models/invoice_event.rb +0 -124
- data/lib/advanced_billing/models/invoice_event_data.rb +0 -447
- data/lib/advanced_billing/models/invoice_event_payment.rb +0 -168
- data/lib/advanced_billing/models/invoice_event_payment1.rb +0 -160
- data/lib/advanced_billing/models/prepayment_aggregated_error.rb +0 -81
- data/lib/advanced_billing/models/price_point.rb +0 -216
- data/lib/advanced_billing/models/refund.rb +0 -138
- data/lib/advanced_billing/models/seller.rb +0 -92
- data/lib/advanced_billing/models/shipping_address.rb +0 -117
@@ -0,0 +1,103 @@
|
|
1
|
+
# advanced_billing
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AdvancedBilling
|
7
|
+
# ListSegmentsFilter Model.
|
8
|
+
class ListSegmentsFilter < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The value passed here would be used to filter segments. Pass a value
|
13
|
+
# related to `segment_property_1` on attached Metric. If empty string is
|
14
|
+
# passed, this filter would be rejected. Use in query
|
15
|
+
# `filter[segment_property_1_value]=EU`.
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :segment_property_1_value
|
18
|
+
|
19
|
+
# The value passed here would be used to filter segments. Pass a value
|
20
|
+
# related to `segment_property_2` on attached Metric. If empty string is
|
21
|
+
# passed, this filter would be rejected.
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :segment_property_2_value
|
24
|
+
|
25
|
+
# The value passed here would be used to filter segments. Pass a value
|
26
|
+
# related to `segment_property_3` on attached Metric. If empty string is
|
27
|
+
# passed, this filter would be rejected.
|
28
|
+
# @return [String]
|
29
|
+
attr_accessor :segment_property_3_value
|
30
|
+
|
31
|
+
# The value passed here would be used to filter segments. Pass a value
|
32
|
+
# related to `segment_property_4` on attached Metric. If empty string is
|
33
|
+
# passed, this filter would be rejected.
|
34
|
+
# @return [String]
|
35
|
+
attr_accessor :segment_property_4_value
|
36
|
+
|
37
|
+
# A mapping from model property names to API property names.
|
38
|
+
def self.names
|
39
|
+
@_hash = {} if @_hash.nil?
|
40
|
+
@_hash['segment_property_1_value'] = 'segment_property_1_value'
|
41
|
+
@_hash['segment_property_2_value'] = 'segment_property_2_value'
|
42
|
+
@_hash['segment_property_3_value'] = 'segment_property_3_value'
|
43
|
+
@_hash['segment_property_4_value'] = 'segment_property_4_value'
|
44
|
+
@_hash
|
45
|
+
end
|
46
|
+
|
47
|
+
# An array for optional fields
|
48
|
+
def self.optionals
|
49
|
+
%w[
|
50
|
+
segment_property_1_value
|
51
|
+
segment_property_2_value
|
52
|
+
segment_property_3_value
|
53
|
+
segment_property_4_value
|
54
|
+
]
|
55
|
+
end
|
56
|
+
|
57
|
+
# An array for nullable fields
|
58
|
+
def self.nullables
|
59
|
+
[]
|
60
|
+
end
|
61
|
+
|
62
|
+
def initialize(segment_property_1_value = SKIP,
|
63
|
+
segment_property_2_value = SKIP,
|
64
|
+
segment_property_3_value = SKIP,
|
65
|
+
segment_property_4_value = SKIP,
|
66
|
+
additional_properties = {})
|
67
|
+
@segment_property_1_value = segment_property_1_value unless segment_property_1_value == SKIP
|
68
|
+
@segment_property_2_value = segment_property_2_value unless segment_property_2_value == SKIP
|
69
|
+
@segment_property_3_value = segment_property_3_value unless segment_property_3_value == SKIP
|
70
|
+
@segment_property_4_value = segment_property_4_value unless segment_property_4_value == SKIP
|
71
|
+
|
72
|
+
# Add additional model properties to the instance.
|
73
|
+
additional_properties.each do |_name, _value|
|
74
|
+
instance_variable_set("@#{_name}", _value)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Creates an instance of the object from a hash.
|
79
|
+
def self.from_hash(hash)
|
80
|
+
return nil unless hash
|
81
|
+
|
82
|
+
# Extract variables from the hash.
|
83
|
+
segment_property_1_value =
|
84
|
+
hash.key?('segment_property_1_value') ? hash['segment_property_1_value'] : SKIP
|
85
|
+
segment_property_2_value =
|
86
|
+
hash.key?('segment_property_2_value') ? hash['segment_property_2_value'] : SKIP
|
87
|
+
segment_property_3_value =
|
88
|
+
hash.key?('segment_property_3_value') ? hash['segment_property_3_value'] : SKIP
|
89
|
+
segment_property_4_value =
|
90
|
+
hash.key?('segment_property_4_value') ? hash['segment_property_4_value'] : SKIP
|
91
|
+
|
92
|
+
# Clean out expected properties from Hash.
|
93
|
+
names.each_value { |k| hash.delete(k) }
|
94
|
+
|
95
|
+
# Create object from extracted values.
|
96
|
+
ListSegmentsFilter.new(segment_property_1_value,
|
97
|
+
segment_property_2_value,
|
98
|
+
segment_property_3_value,
|
99
|
+
segment_property_4_value,
|
100
|
+
hash)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# advanced_billing
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AdvancedBilling
|
7
|
+
# ListSubscriptionComponentsFilter Model.
|
8
|
+
class ListSubscriptionComponentsFilter < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Allows fetching components allocation with matching currency based on
|
13
|
+
# provided values. Use in query `filter[currencies]=EUR,USD`.
|
14
|
+
# @return [Array[String]]
|
15
|
+
attr_accessor :currencies
|
16
|
+
|
17
|
+
# Allows fetching components allocation with matching use_site_exchange_rate
|
18
|
+
# based on provided value. Use in query
|
19
|
+
# `filter[use_site_exchange_rate]=true`.
|
20
|
+
# @return [TrueClass | FalseClass]
|
21
|
+
attr_accessor :use_site_exchange_rate
|
22
|
+
|
23
|
+
# A mapping from model property names to API property names.
|
24
|
+
def self.names
|
25
|
+
@_hash = {} if @_hash.nil?
|
26
|
+
@_hash['currencies'] = 'currencies'
|
27
|
+
@_hash['use_site_exchange_rate'] = 'use_site_exchange_rate'
|
28
|
+
@_hash
|
29
|
+
end
|
30
|
+
|
31
|
+
# An array for optional fields
|
32
|
+
def self.optionals
|
33
|
+
%w[
|
34
|
+
currencies
|
35
|
+
use_site_exchange_rate
|
36
|
+
]
|
37
|
+
end
|
38
|
+
|
39
|
+
# An array for nullable fields
|
40
|
+
def self.nullables
|
41
|
+
[]
|
42
|
+
end
|
43
|
+
|
44
|
+
def initialize(currencies = SKIP,
|
45
|
+
use_site_exchange_rate = SKIP,
|
46
|
+
additional_properties = {})
|
47
|
+
@currencies = currencies unless currencies == SKIP
|
48
|
+
@use_site_exchange_rate = use_site_exchange_rate unless use_site_exchange_rate == SKIP
|
49
|
+
|
50
|
+
# Add additional model properties to the instance.
|
51
|
+
additional_properties.each do |_name, _value|
|
52
|
+
instance_variable_set("@#{_name}", _value)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Creates an instance of the object from a hash.
|
57
|
+
def self.from_hash(hash)
|
58
|
+
return nil unless hash
|
59
|
+
|
60
|
+
# Extract variables from the hash.
|
61
|
+
currencies = hash.key?('currencies') ? hash['currencies'] : SKIP
|
62
|
+
use_site_exchange_rate =
|
63
|
+
hash.key?('use_site_exchange_rate') ? hash['use_site_exchange_rate'] : SKIP
|
64
|
+
|
65
|
+
# Clean out expected properties from Hash.
|
66
|
+
names.each_value { |k| hash.delete(k) }
|
67
|
+
|
68
|
+
# Create object from extracted values.
|
69
|
+
ListSubscriptionComponentsFilter.new(currencies,
|
70
|
+
use_site_exchange_rate,
|
71
|
+
hash)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# advanced_billing
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AdvancedBilling
|
7
|
+
# ListSubscriptionComponentsForSiteFilter Model.
|
8
|
+
class ListSubscriptionComponentsForSiteFilter < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Allows fetching components allocation with matching currency based on
|
13
|
+
# provided values. Use in query `filter[currencies]=USD,EUR`.
|
14
|
+
# @return [Array[String]]
|
15
|
+
attr_accessor :currencies
|
16
|
+
|
17
|
+
# Allows fetching components allocation with matching use_site_exchange_rate
|
18
|
+
# based on provided value. Use in query
|
19
|
+
# `filter[use_site_exchange_rate]=true`.
|
20
|
+
# @return [TrueClass | FalseClass]
|
21
|
+
attr_accessor :use_site_exchange_rate
|
22
|
+
|
23
|
+
# Nested filter used for List Subscription Components For Site Filter
|
24
|
+
# @return [SubscriptionFilter]
|
25
|
+
attr_accessor :subscription
|
26
|
+
|
27
|
+
# A mapping from model property names to API property names.
|
28
|
+
def self.names
|
29
|
+
@_hash = {} if @_hash.nil?
|
30
|
+
@_hash['currencies'] = 'currencies'
|
31
|
+
@_hash['use_site_exchange_rate'] = 'use_site_exchange_rate'
|
32
|
+
@_hash['subscription'] = 'subscription'
|
33
|
+
@_hash
|
34
|
+
end
|
35
|
+
|
36
|
+
# An array for optional fields
|
37
|
+
def self.optionals
|
38
|
+
%w[
|
39
|
+
currencies
|
40
|
+
use_site_exchange_rate
|
41
|
+
subscription
|
42
|
+
]
|
43
|
+
end
|
44
|
+
|
45
|
+
# An array for nullable fields
|
46
|
+
def self.nullables
|
47
|
+
[]
|
48
|
+
end
|
49
|
+
|
50
|
+
def initialize(currencies = SKIP,
|
51
|
+
use_site_exchange_rate = SKIP,
|
52
|
+
subscription = SKIP,
|
53
|
+
additional_properties = {})
|
54
|
+
@currencies = currencies unless currencies == SKIP
|
55
|
+
@use_site_exchange_rate = use_site_exchange_rate unless use_site_exchange_rate == SKIP
|
56
|
+
@subscription = subscription unless subscription == SKIP
|
57
|
+
|
58
|
+
# Add additional model properties to the instance.
|
59
|
+
additional_properties.each do |_name, _value|
|
60
|
+
instance_variable_set("@#{_name}", _value)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Creates an instance of the object from a hash.
|
65
|
+
def self.from_hash(hash)
|
66
|
+
return nil unless hash
|
67
|
+
|
68
|
+
# Extract variables from the hash.
|
69
|
+
currencies = hash.key?('currencies') ? hash['currencies'] : SKIP
|
70
|
+
use_site_exchange_rate =
|
71
|
+
hash.key?('use_site_exchange_rate') ? hash['use_site_exchange_rate'] : SKIP
|
72
|
+
subscription = SubscriptionFilter.from_hash(hash['subscription']) if hash['subscription']
|
73
|
+
|
74
|
+
# Clean out expected properties from Hash.
|
75
|
+
names.each_value { |k| hash.delete(k) }
|
76
|
+
|
77
|
+
# Create object from extracted values.
|
78
|
+
ListSubscriptionComponentsForSiteFilter.new(currencies,
|
79
|
+
use_site_exchange_rate,
|
80
|
+
subscription,
|
81
|
+
hash)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -8,7 +8,10 @@ module AdvancedBilling
|
|
8
8
|
class ListSubscriptionComponentsInclude
|
9
9
|
LIST_SUBSCRIPTION_COMPONENTS_INCLUDE = [
|
10
10
|
# TODO: Write general description for SUBSCRIPTION
|
11
|
-
SUBSCRIPTION = 'subscription'.freeze
|
11
|
+
SUBSCRIPTION = 'subscription'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for HISTORIC_USAGES
|
14
|
+
HISTORIC_USAGES = 'historic_usages'.freeze
|
12
15
|
].freeze
|
13
16
|
|
14
17
|
def self.validate(value)
|
@@ -119,5 +119,15 @@ module AdvancedBilling
|
|
119
119
|
hosted,
|
120
120
|
hash)
|
121
121
|
end
|
122
|
+
|
123
|
+
# Validates an instance of the object from a given value.
|
124
|
+
# @param [MetafieldScope | Hash] The value against the validation is performed.
|
125
|
+
def self.validate(value)
|
126
|
+
return true if value.instance_of? self
|
127
|
+
|
128
|
+
return false unless value.instance_of? Hash
|
129
|
+
|
130
|
+
true
|
131
|
+
end
|
122
132
|
end
|
123
133
|
end
|
@@ -90,15 +90,5 @@ module AdvancedBilling
|
|
90
90
|
primary,
|
91
91
|
hash)
|
92
92
|
end
|
93
|
-
|
94
|
-
# Validates an instance of the object from a given value.
|
95
|
-
# @param [NestedSubscriptionGroup | Hash] The value against the validation is performed.
|
96
|
-
def self.validate(value)
|
97
|
-
return true if value.instance_of? self
|
98
|
-
|
99
|
-
return false unless value.instance_of? Hash
|
100
|
-
|
101
|
-
true
|
102
|
-
end
|
103
93
|
end
|
104
94
|
end
|
@@ -66,5 +66,15 @@ module AdvancedBilling
|
|
66
66
|
number,
|
67
67
|
hash)
|
68
68
|
end
|
69
|
+
|
70
|
+
# Validates an instance of the object from a given value.
|
71
|
+
# @param [OriginInvoice | Hash] The value against the validation is performed.
|
72
|
+
def self.validate(value)
|
73
|
+
return true if value.instance_of? self
|
74
|
+
|
75
|
+
return false unless value.instance_of? Hash
|
76
|
+
|
77
|
+
true
|
78
|
+
end
|
69
79
|
end
|
70
80
|
end
|
@@ -79,5 +79,19 @@ module AdvancedBilling
|
|
79
79
|
prices,
|
80
80
|
hash)
|
81
81
|
end
|
82
|
+
|
83
|
+
# Validates an instance of the object from a given value.
|
84
|
+
# @param [OveragePricing | Hash] The value against the validation is performed.
|
85
|
+
def self.validate(value)
|
86
|
+
if value.instance_of? self
|
87
|
+
return APIHelper.valid_type?(value.pricing_scheme,
|
88
|
+
->(val) { PricingScheme.validate(val) })
|
89
|
+
end
|
90
|
+
|
91
|
+
return false unless value.instance_of? Hash
|
92
|
+
|
93
|
+
APIHelper.valid_type?(value['pricing_scheme'],
|
94
|
+
->(val) { PricingScheme.validate(val) })
|
95
|
+
end
|
82
96
|
end
|
83
97
|
end
|
@@ -14,8 +14,8 @@ module AdvancedBilling
|
|
14
14
|
attr_accessor :invoice_id
|
15
15
|
|
16
16
|
# The current status of the invoice. See [Invoice
|
17
|
-
# Statuses](https://chargify.zendesk.com/hc/en-us/articles/
|
18
|
-
#
|
17
|
+
# Statuses](https://maxio-chargify.zendesk.com/hc/en-us/articles/54050787942
|
18
|
+
# 53-Introduction-to-Invoices#invoice-statuses) for more.
|
19
19
|
# @return [InvoiceStatus]
|
20
20
|
attr_accessor :status
|
21
21
|
|
@@ -229,5 +229,15 @@ module AdvancedBilling
|
|
229
229
|
metafields,
|
230
230
|
hash)
|
231
231
|
end
|
232
|
+
|
233
|
+
# Validates an instance of the object from a given value.
|
234
|
+
# @param [PayerAttributes | Hash] The value against the validation is performed.
|
235
|
+
def self.validate(value)
|
236
|
+
return true if value.instance_of? self
|
237
|
+
|
238
|
+
return false unless value.instance_of? Hash
|
239
|
+
|
240
|
+
true
|
241
|
+
end
|
232
242
|
end
|
233
243
|
end
|
@@ -113,5 +113,15 @@ module AdvancedBilling
|
|
113
113
|
overage_pricing,
|
114
114
|
hash)
|
115
115
|
end
|
116
|
+
|
117
|
+
# Validates an instance of the object from a given value.
|
118
|
+
# @param [PrepaidComponentPricePoint | Hash] The value against the validation is performed.
|
119
|
+
def self.validate(value)
|
120
|
+
return true if value.instance_of? self
|
121
|
+
|
122
|
+
return false unless value.instance_of? Hash
|
123
|
+
|
124
|
+
true
|
125
|
+
end
|
116
126
|
end
|
117
127
|
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# advanced_billing
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module AdvancedBilling
|
7
|
+
# PrepaidProductPricePointFilter Model.
|
8
|
+
class PrepaidProductPricePointFilter < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Passed as a parameter to list methods to return only non null values.
|
13
|
+
# @return [String]
|
14
|
+
attr_reader :product_price_point_id
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['product_price_point_id'] = 'product_price_point_id'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
# An array for optional fields
|
24
|
+
def self.optionals
|
25
|
+
[]
|
26
|
+
end
|
27
|
+
|
28
|
+
# An array for nullable fields
|
29
|
+
def self.nullables
|
30
|
+
[]
|
31
|
+
end
|
32
|
+
|
33
|
+
def initialize(additional_properties = {})
|
34
|
+
@product_price_point_id = 'not_null'
|
35
|
+
|
36
|
+
# Add additional model properties to the instance.
|
37
|
+
additional_properties.each do |_name, _value|
|
38
|
+
instance_variable_set("@#{_name}", _value)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Creates an instance of the object from a hash.
|
43
|
+
def self.from_hash(hash)
|
44
|
+
return nil unless hash
|
45
|
+
|
46
|
+
# Extract variables from the hash.
|
47
|
+
|
48
|
+
|
49
|
+
# Clean out expected properties from Hash.
|
50
|
+
names.each_value { |k| hash.delete(k) }
|
51
|
+
|
52
|
+
# Create object from extracted values.
|
53
|
+
PrepaidProductPricePointFilter.new(hash)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -177,7 +177,9 @@ module AdvancedBilling
|
|
177
177
|
APIHelper.valid_type?(value.memo,
|
178
178
|
->(val) { val.instance_of? String }) and
|
179
179
|
APIHelper.valid_type?(value.allocation_details,
|
180
|
-
->(val) { PrepaidUsageAllocationDetail.validate(val) }
|
180
|
+
->(val) { PrepaidUsageAllocationDetail.validate(val) },
|
181
|
+
is_model_hash: true,
|
182
|
+
is_inner_model_hash: true)
|
181
183
|
)
|
182
184
|
end
|
183
185
|
|
@@ -203,7 +205,9 @@ module AdvancedBilling
|
|
203
205
|
APIHelper.valid_type?(value['memo'],
|
204
206
|
->(val) { val.instance_of? String }) and
|
205
207
|
APIHelper.valid_type?(value['allocation_details'],
|
206
|
-
->(val) { PrepaidUsageAllocationDetail.validate(val) }
|
208
|
+
->(val) { PrepaidUsageAllocationDetail.validate(val) },
|
209
|
+
is_model_hash: true,
|
210
|
+
is_inner_model_hash: true)
|
207
211
|
)
|
208
212
|
end
|
209
213
|
end
|
@@ -77,5 +77,15 @@ module AdvancedBilling
|
|
77
77
|
usage_quantity,
|
78
78
|
hash)
|
79
79
|
end
|
80
|
+
|
81
|
+
# Validates an instance of the object from a given value.
|
82
|
+
# @param [PrepaidUsageAllocationDetail | Hash] The value against the validation is performed.
|
83
|
+
def self.validate(value)
|
84
|
+
return true if value.instance_of? self
|
85
|
+
|
86
|
+
return false unless value.instance_of? Hash
|
87
|
+
|
88
|
+
true
|
89
|
+
end
|
80
90
|
end
|
81
91
|
end
|
@@ -301,6 +301,7 @@ module AdvancedBilling
|
|
301
301
|
archived_at
|
302
302
|
return_params
|
303
303
|
update_return_url
|
304
|
+
initial_charge_after_trial
|
304
305
|
update_return_params
|
305
306
|
tax_code
|
306
307
|
use_site_exchange_rate
|
@@ -415,9 +416,8 @@ module AdvancedBilling
|
|
415
416
|
hash.key?('request_credit_card') ? hash['request_credit_card'] : SKIP
|
416
417
|
expiration_interval =
|
417
418
|
hash.key?('expiration_interval') ? hash['expiration_interval'] : SKIP
|
418
|
-
expiration_interval_unit =
|
419
|
-
|
420
|
-
) : SKIP
|
419
|
+
expiration_interval_unit =
|
420
|
+
hash.key?('expiration_interval_unit') ? hash['expiration_interval_unit'] : SKIP
|
421
421
|
created_at = if hash.key?('created_at')
|
422
422
|
(DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
|
423
423
|
else
|
@@ -438,9 +438,8 @@ module AdvancedBilling
|
|
438
438
|
hash.key?('trial_price_in_cents') ? hash['trial_price_in_cents'] : SKIP
|
439
439
|
trial_interval =
|
440
440
|
hash.key?('trial_interval') ? hash['trial_interval'] : SKIP
|
441
|
-
trial_interval_unit =
|
442
|
-
|
443
|
-
) : SKIP
|
441
|
+
trial_interval_unit =
|
442
|
+
hash.key?('trial_interval_unit') ? hash['trial_interval_unit'] : SKIP
|
444
443
|
archived_at = if hash.key?('archived_at')
|
445
444
|
(DateTimeHelper.from_rfc3339(hash['archived_at']) if hash['archived_at'])
|
446
445
|
else
|
@@ -543,15 +542,5 @@ module AdvancedBilling
|
|
543
542
|
def to_custom_archived_at
|
544
543
|
DateTimeHelper.to_rfc3339(archived_at)
|
545
544
|
end
|
546
|
-
|
547
|
-
# Validates an instance of the object from a given value.
|
548
|
-
# @param [Product | Hash] The value against the validation is performed.
|
549
|
-
def self.validate(value)
|
550
|
-
return true if value.instance_of? self
|
551
|
-
|
552
|
-
return false unless value.instance_of? Hash
|
553
|
-
|
554
|
-
true
|
555
|
-
end
|
556
545
|
end
|
557
546
|
end
|
@@ -184,6 +184,15 @@ module AdvancedBilling
|
|
184
184
|
# An array for nullable fields
|
185
185
|
def self.nullables
|
186
186
|
%w[
|
187
|
+
handle
|
188
|
+
trial_price_in_cents
|
189
|
+
trial_interval
|
190
|
+
trial_interval_unit
|
191
|
+
introductory_offer
|
192
|
+
initial_charge_in_cents
|
193
|
+
initial_charge_after_trial
|
194
|
+
expiration_interval
|
195
|
+
expiration_interval_unit
|
187
196
|
archived_at
|
188
197
|
subscription_id
|
189
198
|
]
|
@@ -321,7 +321,7 @@ module AdvancedBilling
|
|
321
321
|
created_at = SKIP,
|
322
322
|
delivery_date = SKIP,
|
323
323
|
status = SKIP,
|
324
|
-
collection_method =
|
324
|
+
collection_method = SKIP,
|
325
325
|
payment_instructions = SKIP,
|
326
326
|
currency = SKIP,
|
327
327
|
consolidation_level = SKIP,
|
@@ -413,7 +413,7 @@ module AdvancedBilling
|
|
413
413
|
delivery_date = hash.key?('delivery_date') ? hash['delivery_date'] : SKIP
|
414
414
|
status = hash.key?('status') ? hash['status'] : SKIP
|
415
415
|
collection_method =
|
416
|
-
hash['collection_method']
|
416
|
+
hash.key?('collection_method') ? hash['collection_method'] : SKIP
|
417
417
|
payment_instructions =
|
418
418
|
hash.key?('payment_instructions') ? hash['payment_instructions'] : SKIP
|
419
419
|
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
@@ -187,7 +187,9 @@ module AdvancedBilling
|
|
187
187
|
APIHelper.valid_type?(value.product_name,
|
188
188
|
->(val) { val.instance_of? String }) and
|
189
189
|
APIHelper.valid_type?(value.line_items,
|
190
|
-
->(val) { InvoiceLineItemEventData.validate(val) }
|
190
|
+
->(val) { InvoiceLineItemEventData.validate(val) },
|
191
|
+
is_model_hash: true,
|
192
|
+
is_inner_model_hash: true)
|
191
193
|
)
|
192
194
|
end
|
193
195
|
|
@@ -215,7 +217,9 @@ module AdvancedBilling
|
|
215
217
|
APIHelper.valid_type?(value['product_name'],
|
216
218
|
->(val) { val.instance_of? String }) and
|
217
219
|
APIHelper.valid_type?(value['line_items'],
|
218
|
-
->(val) { InvoiceLineItemEventData.validate(val) }
|
220
|
+
->(val) { InvoiceLineItemEventData.validate(val) },
|
221
|
+
is_model_hash: true,
|
222
|
+
is_inner_model_hash: true)
|
219
223
|
)
|
220
224
|
end
|
221
225
|
end
|
@@ -62,5 +62,15 @@ module AdvancedBilling
|
|
62
62
|
ReactivationBilling.new(reactivation_charge,
|
63
63
|
hash)
|
64
64
|
end
|
65
|
+
|
66
|
+
# Validates an instance of the object from a given value.
|
67
|
+
# @param [ReactivationBilling | Hash] The value against the validation is performed.
|
68
|
+
def self.validate(value)
|
69
|
+
return true if value.instance_of? self
|
70
|
+
|
71
|
+
return false unless value.instance_of? Hash
|
72
|
+
|
73
|
+
true
|
74
|
+
end
|
65
75
|
end
|
66
76
|
end
|
@@ -67,9 +67,7 @@ module AdvancedBilling
|
|
67
67
|
end
|
68
68
|
|
69
69
|
paid_invoices = SKIP unless hash.key?('paid_invoices')
|
70
|
-
prepayment =
|
71
|
-
UnionTypeLookUp.get(:RecordPaymentResponsePrepayment), hash['prepayment']
|
72
|
-
) : SKIP
|
70
|
+
prepayment = InvoicePrePayment.from_hash(hash['prepayment']) if hash['prepayment']
|
73
71
|
|
74
72
|
# Clean out expected properties from Hash.
|
75
73
|
names.each_value { |k| hash.delete(k) }
|
@@ -79,15 +77,5 @@ module AdvancedBilling
|
|
79
77
|
prepayment,
|
80
78
|
hash)
|
81
79
|
end
|
82
|
-
|
83
|
-
# Validates an instance of the object from a given value.
|
84
|
-
# @param [RecordPaymentResponse | Hash] The value against the validation is performed.
|
85
|
-
def self.validate(value)
|
86
|
-
return true if value.instance_of? self
|
87
|
-
|
88
|
-
return false unless value.instance_of? Hash
|
89
|
-
|
90
|
-
true
|
91
|
-
end
|
92
80
|
end
|
93
81
|
end
|