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
@@ -87,9 +87,8 @@ module AdvancedBilling
|
|
87
87
|
return nil unless hash
|
88
88
|
|
89
89
|
# Extract variables from the hash.
|
90
|
-
credit_note_attributes =
|
91
|
-
|
92
|
-
) : nil
|
90
|
+
credit_note_attributes = CreditNote.from_hash(hash['credit_note_attributes']) if
|
91
|
+
hash['credit_note_attributes']
|
93
92
|
memo = hash.key?('memo') ? hash['memo'] : nil
|
94
93
|
applied_amount =
|
95
94
|
hash.key?('applied_amount') ? hash['applied_amount'] : nil
|
@@ -122,8 +121,9 @@ module AdvancedBilling
|
|
122
121
|
def self.validate(value)
|
123
122
|
if value.instance_of? self
|
124
123
|
return (
|
125
|
-
|
126
|
-
|
124
|
+
APIHelper.valid_type?(value.credit_note_attributes,
|
125
|
+
->(val) { CreditNote.validate(val) },
|
126
|
+
is_model_hash: true) and
|
127
127
|
APIHelper.valid_type?(value.memo,
|
128
128
|
->(val) { val.instance_of? String }) and
|
129
129
|
APIHelper.valid_type?(value.applied_amount,
|
@@ -140,8 +140,9 @@ module AdvancedBilling
|
|
140
140
|
return false unless value.instance_of? Hash
|
141
141
|
|
142
142
|
(
|
143
|
-
|
144
|
-
|
143
|
+
APIHelper.valid_type?(value['credit_note_attributes'],
|
144
|
+
->(val) { CreditNote.validate(val) },
|
145
|
+
is_model_hash: true) and
|
145
146
|
APIHelper.valid_type?(value['memo'],
|
146
147
|
->(val) { val.instance_of? String }) and
|
147
148
|
APIHelper.valid_type?(value['applied_amount'],
|
@@ -0,0 +1,139 @@
|
|
1
|
+
# advanced_billing
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require 'date'
|
7
|
+
module AdvancedBilling
|
8
|
+
# VoidRemainderEvent Model.
|
9
|
+
class VoidRemainderEvent < BaseModel
|
10
|
+
SKIP = Object.new
|
11
|
+
private_constant :SKIP
|
12
|
+
|
13
|
+
# TODO: Write general description for this method
|
14
|
+
# @return [Integer]
|
15
|
+
attr_accessor :id
|
16
|
+
|
17
|
+
# TODO: Write general description for this method
|
18
|
+
# @return [DateTime]
|
19
|
+
attr_accessor :timestamp
|
20
|
+
|
21
|
+
# TODO: Write general description for this method
|
22
|
+
# @return [Invoice]
|
23
|
+
attr_accessor :invoice
|
24
|
+
|
25
|
+
# TODO: Write general description for this method
|
26
|
+
# @return [InvoiceEventType]
|
27
|
+
attr_accessor :event_type
|
28
|
+
|
29
|
+
# Example schema for an `void_remainder` event
|
30
|
+
# @return [VoidRemainderEventData]
|
31
|
+
attr_accessor :event_data
|
32
|
+
|
33
|
+
# A mapping from model property names to API property names.
|
34
|
+
def self.names
|
35
|
+
@_hash = {} if @_hash.nil?
|
36
|
+
@_hash['id'] = 'id'
|
37
|
+
@_hash['timestamp'] = 'timestamp'
|
38
|
+
@_hash['invoice'] = 'invoice'
|
39
|
+
@_hash['event_type'] = 'event_type'
|
40
|
+
@_hash['event_data'] = 'event_data'
|
41
|
+
@_hash
|
42
|
+
end
|
43
|
+
|
44
|
+
# An array for optional fields
|
45
|
+
def self.optionals
|
46
|
+
[]
|
47
|
+
end
|
48
|
+
|
49
|
+
# An array for nullable fields
|
50
|
+
def self.nullables
|
51
|
+
[]
|
52
|
+
end
|
53
|
+
|
54
|
+
def initialize(id = nil,
|
55
|
+
timestamp = nil,
|
56
|
+
invoice = nil,
|
57
|
+
event_type = InvoiceEventType::VOID_REMAINDER,
|
58
|
+
event_data = nil,
|
59
|
+
additional_properties = {})
|
60
|
+
@id = id
|
61
|
+
@timestamp = timestamp
|
62
|
+
@invoice = invoice
|
63
|
+
@event_type = event_type
|
64
|
+
@event_data = event_data
|
65
|
+
|
66
|
+
# Add additional model properties to the instance.
|
67
|
+
additional_properties.each do |_name, _value|
|
68
|
+
instance_variable_set("@#{_name}", _value)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# Creates an instance of the object from a hash.
|
73
|
+
def self.from_hash(hash)
|
74
|
+
return nil unless hash
|
75
|
+
|
76
|
+
# Extract variables from the hash.
|
77
|
+
id = hash.key?('id') ? hash['id'] : nil
|
78
|
+
timestamp = if hash.key?('timestamp')
|
79
|
+
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
80
|
+
end
|
81
|
+
invoice = Invoice.from_hash(hash['invoice']) if hash['invoice']
|
82
|
+
event_type = hash['event_type'] ||= InvoiceEventType::VOID_REMAINDER
|
83
|
+
event_data = VoidRemainderEventData.from_hash(hash['event_data']) if hash['event_data']
|
84
|
+
|
85
|
+
# Clean out expected properties from Hash.
|
86
|
+
names.each_value { |k| hash.delete(k) }
|
87
|
+
|
88
|
+
# Create object from extracted values.
|
89
|
+
VoidRemainderEvent.new(id,
|
90
|
+
timestamp,
|
91
|
+
invoice,
|
92
|
+
event_type,
|
93
|
+
event_data,
|
94
|
+
hash)
|
95
|
+
end
|
96
|
+
|
97
|
+
def to_custom_timestamp
|
98
|
+
DateTimeHelper.to_rfc3339(timestamp)
|
99
|
+
end
|
100
|
+
|
101
|
+
# Validates an instance of the object from a given value.
|
102
|
+
# @param [VoidRemainderEvent | Hash] The value against the validation is performed.
|
103
|
+
def self.validate(value)
|
104
|
+
if value.instance_of? self
|
105
|
+
return (
|
106
|
+
APIHelper.valid_type?(value.id,
|
107
|
+
->(val) { val.instance_of? Integer }) and
|
108
|
+
APIHelper.valid_type?(value.timestamp,
|
109
|
+
->(val) { val.instance_of? DateTime }) and
|
110
|
+
APIHelper.valid_type?(value.invoice,
|
111
|
+
->(val) { Invoice.validate(val) },
|
112
|
+
is_model_hash: true) and
|
113
|
+
APIHelper.valid_type?(value.event_type,
|
114
|
+
->(val) { InvoiceEventType.validate(val) }) and
|
115
|
+
APIHelper.valid_type?(value.event_data,
|
116
|
+
->(val) { VoidRemainderEventData.validate(val) },
|
117
|
+
is_model_hash: true)
|
118
|
+
)
|
119
|
+
end
|
120
|
+
|
121
|
+
return false unless value.instance_of? Hash
|
122
|
+
|
123
|
+
(
|
124
|
+
APIHelper.valid_type?(value['id'],
|
125
|
+
->(val) { val.instance_of? Integer }) and
|
126
|
+
APIHelper.valid_type?(value['timestamp'],
|
127
|
+
->(val) { val.instance_of? String }) and
|
128
|
+
APIHelper.valid_type?(value['invoice'],
|
129
|
+
->(val) { Invoice.validate(val) },
|
130
|
+
is_model_hash: true) and
|
131
|
+
APIHelper.valid_type?(value['event_type'],
|
132
|
+
->(val) { InvoiceEventType.validate(val) }) and
|
133
|
+
APIHelper.valid_type?(value['event_data'],
|
134
|
+
->(val) { VoidRemainderEventData.validate(val) },
|
135
|
+
is_model_hash: true)
|
136
|
+
)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
@@ -98,7 +98,8 @@ module AdvancedBilling
|
|
98
98
|
if value.instance_of? self
|
99
99
|
return (
|
100
100
|
APIHelper.valid_type?(value.credit_note_attributes,
|
101
|
-
->(val) { CreditNote.validate(val) }
|
101
|
+
->(val) { CreditNote.validate(val) },
|
102
|
+
is_model_hash: true) and
|
102
103
|
APIHelper.valid_type?(value.memo,
|
103
104
|
->(val) { val.instance_of? String }) and
|
104
105
|
APIHelper.valid_type?(value.applied_amount,
|
@@ -112,7 +113,8 @@ module AdvancedBilling
|
|
112
113
|
|
113
114
|
(
|
114
115
|
APIHelper.valid_type?(value['credit_note_attributes'],
|
115
|
-
->(val) { CreditNote.validate(val) }
|
116
|
+
->(val) { CreditNote.validate(val) },
|
117
|
+
is_model_hash: true) and
|
116
118
|
APIHelper.valid_type?(value['memo'],
|
117
119
|
->(val) { val.instance_of? String }) and
|
118
120
|
APIHelper.valid_type?(value['applied_amount'],
|
@@ -82,6 +82,75 @@ module AdvancedBilling
|
|
82
82
|
]
|
83
83
|
),
|
84
84
|
|
85
|
+
:InvoiceEvent => AnyOf.new(
|
86
|
+
[
|
87
|
+
LeafType.new(ApplyCreditNoteEvent, UnionTypeContext.new(
|
88
|
+
discriminator_value: 'apply_credit_note',
|
89
|
+
discriminator: 'event_type'
|
90
|
+
)),
|
91
|
+
LeafType.new(ApplyDebitNoteEvent, UnionTypeContext.new(
|
92
|
+
discriminator_value: 'apply_debit_note',
|
93
|
+
discriminator: 'event_type'
|
94
|
+
)),
|
95
|
+
LeafType.new(ApplyPaymentEvent, UnionTypeContext.new(
|
96
|
+
discriminator_value: 'apply_payment',
|
97
|
+
discriminator: 'event_type'
|
98
|
+
)),
|
99
|
+
LeafType.new(BackportInvoiceEvent, UnionTypeContext.new(
|
100
|
+
discriminator_value: 'backport_invoice',
|
101
|
+
discriminator: 'event_type'
|
102
|
+
)),
|
103
|
+
LeafType.new(ChangeChargebackStatusEvent, UnionTypeContext.new(
|
104
|
+
discriminator_value: 'change_chargeback_status',
|
105
|
+
discriminator: 'event_type'
|
106
|
+
)),
|
107
|
+
LeafType.new(ChangeInvoiceCollectionMethodEvent, UnionTypeContext.new(
|
108
|
+
discriminator_value: 'change_invoice_collection_method',
|
109
|
+
discriminator: 'event_type'
|
110
|
+
)),
|
111
|
+
LeafType.new(ChangeInvoiceStatusEvent, UnionTypeContext.new(
|
112
|
+
discriminator_value: 'change_invoice_status',
|
113
|
+
discriminator: 'event_type'
|
114
|
+
)),
|
115
|
+
LeafType.new(CreateCreditNoteEvent, UnionTypeContext.new(
|
116
|
+
discriminator_value: 'create_credit_note',
|
117
|
+
discriminator: 'event_type'
|
118
|
+
)),
|
119
|
+
LeafType.new(CreateDebitNoteEvent, UnionTypeContext.new(
|
120
|
+
discriminator_value: 'create_debit_note',
|
121
|
+
discriminator: 'event_type'
|
122
|
+
)),
|
123
|
+
LeafType.new(FailedPaymentEvent, UnionTypeContext.new(
|
124
|
+
discriminator_value: 'failed_payment',
|
125
|
+
discriminator: 'event_type'
|
126
|
+
)),
|
127
|
+
LeafType.new(IssueInvoiceEvent, UnionTypeContext.new(
|
128
|
+
discriminator_value: 'issue_invoice',
|
129
|
+
discriminator: 'event_type'
|
130
|
+
)),
|
131
|
+
LeafType.new(RefundInvoiceEvent, UnionTypeContext.new(
|
132
|
+
discriminator_value: 'refund_invoice',
|
133
|
+
discriminator: 'event_type'
|
134
|
+
)),
|
135
|
+
LeafType.new(RemovePaymentEvent, UnionTypeContext.new(
|
136
|
+
discriminator_value: 'remove_payment',
|
137
|
+
discriminator: 'event_type'
|
138
|
+
)),
|
139
|
+
LeafType.new(VoidInvoiceEvent, UnionTypeContext.new(
|
140
|
+
discriminator_value: 'void_invoice',
|
141
|
+
discriminator: 'event_type'
|
142
|
+
)),
|
143
|
+
LeafType.new(VoidRemainderEvent, UnionTypeContext.new(
|
144
|
+
discriminator_value: 'void_remainder',
|
145
|
+
discriminator: 'event_type'
|
146
|
+
))
|
147
|
+
],
|
148
|
+
UnionTypeContext.new(
|
149
|
+
is_array: true,
|
150
|
+
is_optional: true
|
151
|
+
)
|
152
|
+
),
|
153
|
+
|
85
154
|
:AddSubscriptionToAGroupGroup => OneOf.new(
|
86
155
|
[
|
87
156
|
LeafType.new(GroupSettings),
|
@@ -112,16 +181,6 @@ module AdvancedBilling
|
|
112
181
|
)
|
113
182
|
),
|
114
183
|
|
115
|
-
:AllocationPayment => OneOf.new(
|
116
|
-
[
|
117
|
-
LeafType.new(PaymentForAllocation)
|
118
|
-
],
|
119
|
-
UnionTypeContext.new(
|
120
|
-
is_optional: true,
|
121
|
-
is_nullable: true
|
122
|
-
)
|
123
|
-
),
|
124
|
-
|
125
184
|
:AllocationPreviewItemQuantity => OneOf.new(
|
126
185
|
[
|
127
186
|
LeafType.new(Integer),
|
@@ -177,16 +236,6 @@ module AdvancedBilling
|
|
177
236
|
)
|
178
237
|
),
|
179
238
|
|
180
|
-
:ComponentPricingScheme => OneOf.new(
|
181
|
-
[
|
182
|
-
LeafType.new(PricingScheme)
|
183
|
-
],
|
184
|
-
UnionTypeContext.new(
|
185
|
-
is_optional: true,
|
186
|
-
is_nullable: true
|
187
|
-
)
|
188
|
-
),
|
189
|
-
|
190
239
|
:ComponentAllocationChangeAllocatedQuantity => OneOf.new(
|
191
240
|
[
|
192
241
|
LeafType.new(Integer),
|
@@ -197,16 +246,6 @@ module AdvancedBilling
|
|
197
246
|
)
|
198
247
|
),
|
199
248
|
|
200
|
-
:ComponentPricePointIntervalUnit => OneOf.new(
|
201
|
-
[
|
202
|
-
LeafType.new(IntervalUnit)
|
203
|
-
],
|
204
|
-
UnionTypeContext.new(
|
205
|
-
is_optional: true,
|
206
|
-
is_nullable: true
|
207
|
-
)
|
208
|
-
),
|
209
|
-
|
210
249
|
:ComponentPricePointAssignmentPricePoint => OneOf.new(
|
211
250
|
[
|
212
251
|
LeafType.new(String),
|
@@ -217,15 +256,6 @@ module AdvancedBilling
|
|
217
256
|
)
|
218
257
|
),
|
219
258
|
|
220
|
-
:CouponCompoundingStrategy => AnyOf.new(
|
221
|
-
[
|
222
|
-
LeafType.new(CompoundingStrategy)
|
223
|
-
],
|
224
|
-
UnionTypeContext.new(
|
225
|
-
is_optional: true
|
226
|
-
)
|
227
|
-
),
|
228
|
-
|
229
259
|
:CreateAllocationPricePointId => OneOf.new(
|
230
260
|
[
|
231
261
|
LeafType.new(String),
|
@@ -502,46 +532,6 @@ module AdvancedBilling
|
|
502
532
|
)
|
503
533
|
),
|
504
534
|
|
505
|
-
:CustomerChangePayer => OneOf.new(
|
506
|
-
[
|
507
|
-
LeafType.new(CustomerPayerChange)
|
508
|
-
],
|
509
|
-
UnionTypeContext.new(
|
510
|
-
is_optional: true,
|
511
|
-
is_nullable: true
|
512
|
-
)
|
513
|
-
),
|
514
|
-
|
515
|
-
:CustomerChangeShippingAddress => OneOf.new(
|
516
|
-
[
|
517
|
-
LeafType.new(AddressChange)
|
518
|
-
],
|
519
|
-
UnionTypeContext.new(
|
520
|
-
is_optional: true,
|
521
|
-
is_nullable: true
|
522
|
-
)
|
523
|
-
),
|
524
|
-
|
525
|
-
:CustomerChangeBillingAddress => OneOf.new(
|
526
|
-
[
|
527
|
-
LeafType.new(AddressChange)
|
528
|
-
],
|
529
|
-
UnionTypeContext.new(
|
530
|
-
is_optional: true,
|
531
|
-
is_nullable: true
|
532
|
-
)
|
533
|
-
),
|
534
|
-
|
535
|
-
:CustomerChangeCustomFields => OneOf.new(
|
536
|
-
[
|
537
|
-
LeafType.new(CustomerCustomFieldsChange)
|
538
|
-
],
|
539
|
-
UnionTypeContext.new(
|
540
|
-
is_optional: true,
|
541
|
-
is_nullable: true
|
542
|
-
)
|
543
|
-
),
|
544
|
-
|
545
535
|
:CustomerErrorResponseErrors => OneOf.new(
|
546
536
|
[
|
547
537
|
LeafType.new(CustomerError),
|
@@ -598,46 +588,6 @@ module AdvancedBilling
|
|
598
588
|
)
|
599
589
|
),
|
600
590
|
|
601
|
-
:InvoiceEventEventData => AnyOf.new(
|
602
|
-
[
|
603
|
-
LeafType.new(ApplyCreditNoteEventData),
|
604
|
-
LeafType.new(ApplyDebitNoteEventData),
|
605
|
-
LeafType.new(ApplyPaymentEventData),
|
606
|
-
LeafType.new(ChangeInvoiceCollectionMethodEventData),
|
607
|
-
LeafType.new(IssueInvoiceEventData),
|
608
|
-
LeafType.new(RefundInvoiceEventData),
|
609
|
-
LeafType.new(RemovePaymentEventData),
|
610
|
-
LeafType.new(VoidInvoiceEventData),
|
611
|
-
LeafType.new(VoidRemainderEventData)
|
612
|
-
],
|
613
|
-
UnionTypeContext.new(
|
614
|
-
is_optional: true
|
615
|
-
)
|
616
|
-
),
|
617
|
-
|
618
|
-
:InvoiceEventDataPaymentMethod => AnyOf.new(
|
619
|
-
[
|
620
|
-
LeafType.new(PaymentMethodApplePay),
|
621
|
-
LeafType.new(PaymentMethodBankAccount),
|
622
|
-
LeafType.new(PaymentMethodCreditCard),
|
623
|
-
LeafType.new(PaymentMethodExternal),
|
624
|
-
LeafType.new(PaymentMethodPaypal)
|
625
|
-
],
|
626
|
-
UnionTypeContext.new(
|
627
|
-
is_optional: true
|
628
|
-
)
|
629
|
-
),
|
630
|
-
|
631
|
-
:InvoiceLineItemComponentCostData2 => OneOf.new(
|
632
|
-
[
|
633
|
-
LeafType.new(InvoiceLineItemComponentCostData)
|
634
|
-
],
|
635
|
-
UnionTypeContext.new(
|
636
|
-
is_optional: true,
|
637
|
-
is_nullable: true
|
638
|
-
)
|
639
|
-
),
|
640
|
-
|
641
591
|
:IssueServiceCreditAmount => OneOf.new(
|
642
592
|
[
|
643
593
|
LeafType.new(Float),
|
@@ -740,26 +690,6 @@ module AdvancedBilling
|
|
740
690
|
]
|
741
691
|
),
|
742
692
|
|
743
|
-
:ProductExpirationIntervalUnit => OneOf.new(
|
744
|
-
[
|
745
|
-
LeafType.new(ExtendedIntervalUnit)
|
746
|
-
],
|
747
|
-
UnionTypeContext.new(
|
748
|
-
is_optional: true,
|
749
|
-
is_nullable: true
|
750
|
-
)
|
751
|
-
),
|
752
|
-
|
753
|
-
:ProductTrialIntervalUnit => OneOf.new(
|
754
|
-
[
|
755
|
-
LeafType.new(IntervalUnit)
|
756
|
-
],
|
757
|
-
UnionTypeContext.new(
|
758
|
-
is_optional: true,
|
759
|
-
is_nullable: true
|
760
|
-
)
|
761
|
-
),
|
762
|
-
|
763
693
|
:QuantityBasedComponentUnitPrice => OneOf.new(
|
764
694
|
[
|
765
695
|
LeafType.new(String),
|
@@ -780,28 +710,6 @@ module AdvancedBilling
|
|
780
710
|
)
|
781
711
|
),
|
782
712
|
|
783
|
-
:RecordPaymentResponsePrepayment => OneOf.new(
|
784
|
-
[
|
785
|
-
LeafType.new(InvoicePrePayment)
|
786
|
-
],
|
787
|
-
UnionTypeContext.new(
|
788
|
-
is_optional: true,
|
789
|
-
is_nullable: true
|
790
|
-
)
|
791
|
-
),
|
792
|
-
|
793
|
-
:RefundSegmentUids => OneOf.new(
|
794
|
-
[
|
795
|
-
LeafType.new(String, UnionTypeContext.new(
|
796
|
-
is_array: true
|
797
|
-
)),
|
798
|
-
LeafType.new(String)
|
799
|
-
],
|
800
|
-
UnionTypeContext.new(
|
801
|
-
is_optional: true
|
802
|
-
)
|
803
|
-
),
|
804
|
-
|
805
713
|
:RefundConsolidatedInvoiceSegmentUids => OneOf.new(
|
806
714
|
[
|
807
715
|
LeafType.new(String, UnionTypeContext.new(
|
@@ -893,16 +801,6 @@ module AdvancedBilling
|
|
893
801
|
)
|
894
802
|
),
|
895
803
|
|
896
|
-
:SubscriptionGroup2 => OneOf.new(
|
897
|
-
[
|
898
|
-
LeafType.new(NestedSubscriptionGroup)
|
899
|
-
],
|
900
|
-
UnionTypeContext.new(
|
901
|
-
is_optional: true,
|
902
|
-
is_nullable: true
|
903
|
-
)
|
904
|
-
),
|
905
|
-
|
906
804
|
:SubscriptionComponentAllocatedQuantity => OneOf.new(
|
907
805
|
[
|
908
806
|
LeafType.new(Integer),
|
@@ -913,25 +811,6 @@ module AdvancedBilling
|
|
913
811
|
)
|
914
812
|
),
|
915
813
|
|
916
|
-
:SubscriptionComponentPricingScheme => OneOf.new(
|
917
|
-
[
|
918
|
-
LeafType.new(PricingScheme)
|
919
|
-
],
|
920
|
-
UnionTypeContext.new(
|
921
|
-
is_optional: true,
|
922
|
-
is_nullable: true
|
923
|
-
)
|
924
|
-
),
|
925
|
-
|
926
|
-
:SubscriptionComponentPricePointType => OneOf.new(
|
927
|
-
[
|
928
|
-
LeafType.new(PricePointType)
|
929
|
-
],
|
930
|
-
UnionTypeContext.new(
|
931
|
-
is_optional: true
|
932
|
-
)
|
933
|
-
),
|
934
|
-
|
935
814
|
:SubscriptionCustomPricePriceInCents => OneOf.new(
|
936
815
|
[
|
937
816
|
LeafType.new(String),
|
@@ -1134,15 +1013,6 @@ module AdvancedBilling
|
|
1134
1013
|
UnionTypeContext.new(
|
1135
1014
|
is_optional: true
|
1136
1015
|
)
|
1137
|
-
),
|
1138
|
-
|
1139
|
-
:VoidInvoiceEventDataCreditNoteAttributes => OneOf.new(
|
1140
|
-
[
|
1141
|
-
LeafType.new(CreditNote)
|
1142
|
-
],
|
1143
|
-
UnionTypeContext.new(
|
1144
|
-
is_nullable: true
|
1145
|
-
)
|
1146
1016
|
)
|
1147
1017
|
}
|
1148
1018
|
end
|