maxio-advanced-billing-sdk 2.0.0 → 3.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 +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,168 @@
|
|
|
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
|
+
# ListCouponsFilter Model.
|
|
9
|
+
class ListCouponsFilter < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The type of filter you would like to apply to your search. Use in query
|
|
14
|
+
# `filter[date_field]=created_at`.
|
|
15
|
+
# @return [BasicDateField]
|
|
16
|
+
attr_accessor :date_field
|
|
17
|
+
|
|
18
|
+
# The start date (format YYYY-MM-DD) with which to filter the date_field.
|
|
19
|
+
# Returns coupons with a timestamp at or after midnight (12:00:00 AM) in
|
|
20
|
+
# your site’s time zone on the date specified. Use in query
|
|
21
|
+
# `filter[start_date]=2011-12-17`.
|
|
22
|
+
# @return [Date]
|
|
23
|
+
attr_accessor :start_date
|
|
24
|
+
|
|
25
|
+
# The end date (format YYYY-MM-DD) with which to filter the date_field.
|
|
26
|
+
# Returns coupons with a timestamp up to and including 11:59:59PM in your
|
|
27
|
+
# site’s time zone on the date specified. Use in query
|
|
28
|
+
# `filter[end_date]=2011-12-15`.
|
|
29
|
+
# @return [Date]
|
|
30
|
+
attr_accessor :end_date
|
|
31
|
+
|
|
32
|
+
# The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter
|
|
33
|
+
# the date_field. Returns coupons with a timestamp at or after exact time
|
|
34
|
+
# provided in query. You can specify timezone in query - otherwise your
|
|
35
|
+
# site's time zone will be used. If provided, this parameter will be used
|
|
36
|
+
# instead of start_date. Use in query
|
|
37
|
+
# `filter[start_datetime]=2011-12-19T10:15:30+01:00`.
|
|
38
|
+
# @return [DateTime]
|
|
39
|
+
attr_accessor :start_datetime
|
|
40
|
+
|
|
41
|
+
# The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter
|
|
42
|
+
# the date_field. Returns coupons with a timestamp at or before exact time
|
|
43
|
+
# provided in query. You can specify timezone in query - otherwise your
|
|
44
|
+
# site's time zone will be used. If provided, this parameter will be used
|
|
45
|
+
# instead of end_date. Use in query
|
|
46
|
+
# `filter[end_datetime]=2011-12-1T10:15:30+01:00`.
|
|
47
|
+
# @return [DateTime]
|
|
48
|
+
attr_accessor :end_datetime
|
|
49
|
+
|
|
50
|
+
# Allows fetching coupons with matching id based on provided values. Use in
|
|
51
|
+
# query `filter[ids]=1,2,3`.
|
|
52
|
+
# @return [Array[Integer]]
|
|
53
|
+
attr_accessor :ids
|
|
54
|
+
|
|
55
|
+
# Allows fetching coupons with matching codes based on provided values. Use
|
|
56
|
+
# in query `filter[codes]=free,free_trial`.
|
|
57
|
+
# @return [Array[String]]
|
|
58
|
+
attr_accessor :codes
|
|
59
|
+
|
|
60
|
+
# Allows fetching coupons with matching use_site_exchange_rate based on
|
|
61
|
+
# provided value. Use in query `filter[use_site_exchange_rate]=true`.
|
|
62
|
+
# @return [TrueClass | FalseClass]
|
|
63
|
+
attr_accessor :use_site_exchange_rate
|
|
64
|
+
|
|
65
|
+
# A mapping from model property names to API property names.
|
|
66
|
+
def self.names
|
|
67
|
+
@_hash = {} if @_hash.nil?
|
|
68
|
+
@_hash['date_field'] = 'date_field'
|
|
69
|
+
@_hash['start_date'] = 'start_date'
|
|
70
|
+
@_hash['end_date'] = 'end_date'
|
|
71
|
+
@_hash['start_datetime'] = 'start_datetime'
|
|
72
|
+
@_hash['end_datetime'] = 'end_datetime'
|
|
73
|
+
@_hash['ids'] = 'ids'
|
|
74
|
+
@_hash['codes'] = 'codes'
|
|
75
|
+
@_hash['use_site_exchange_rate'] = 'use_site_exchange_rate'
|
|
76
|
+
@_hash
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# An array for optional fields
|
|
80
|
+
def self.optionals
|
|
81
|
+
%w[
|
|
82
|
+
date_field
|
|
83
|
+
start_date
|
|
84
|
+
end_date
|
|
85
|
+
start_datetime
|
|
86
|
+
end_datetime
|
|
87
|
+
ids
|
|
88
|
+
codes
|
|
89
|
+
use_site_exchange_rate
|
|
90
|
+
]
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# An array for nullable fields
|
|
94
|
+
def self.nullables
|
|
95
|
+
[]
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def initialize(date_field = SKIP,
|
|
99
|
+
start_date = SKIP,
|
|
100
|
+
end_date = SKIP,
|
|
101
|
+
start_datetime = SKIP,
|
|
102
|
+
end_datetime = SKIP,
|
|
103
|
+
ids = SKIP,
|
|
104
|
+
codes = SKIP,
|
|
105
|
+
use_site_exchange_rate = SKIP,
|
|
106
|
+
additional_properties = {})
|
|
107
|
+
@date_field = date_field unless date_field == SKIP
|
|
108
|
+
@start_date = start_date unless start_date == SKIP
|
|
109
|
+
@end_date = end_date unless end_date == SKIP
|
|
110
|
+
@start_datetime = start_datetime unless start_datetime == SKIP
|
|
111
|
+
@end_datetime = end_datetime unless end_datetime == SKIP
|
|
112
|
+
@ids = ids unless ids == SKIP
|
|
113
|
+
@codes = codes unless codes == SKIP
|
|
114
|
+
@use_site_exchange_rate = use_site_exchange_rate unless use_site_exchange_rate == SKIP
|
|
115
|
+
|
|
116
|
+
# Add additional model properties to the instance.
|
|
117
|
+
additional_properties.each do |_name, _value|
|
|
118
|
+
instance_variable_set("@#{_name}", _value)
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Creates an instance of the object from a hash.
|
|
123
|
+
def self.from_hash(hash)
|
|
124
|
+
return nil unless hash
|
|
125
|
+
|
|
126
|
+
# Extract variables from the hash.
|
|
127
|
+
date_field = hash.key?('date_field') ? hash['date_field'] : SKIP
|
|
128
|
+
start_date = hash.key?('start_date') ? hash['start_date'] : SKIP
|
|
129
|
+
end_date = hash.key?('end_date') ? hash['end_date'] : SKIP
|
|
130
|
+
start_datetime = if hash.key?('start_datetime')
|
|
131
|
+
(DateTimeHelper.from_rfc3339(hash['start_datetime']) if hash['start_datetime'])
|
|
132
|
+
else
|
|
133
|
+
SKIP
|
|
134
|
+
end
|
|
135
|
+
end_datetime = if hash.key?('end_datetime')
|
|
136
|
+
(DateTimeHelper.from_rfc3339(hash['end_datetime']) if hash['end_datetime'])
|
|
137
|
+
else
|
|
138
|
+
SKIP
|
|
139
|
+
end
|
|
140
|
+
ids = hash.key?('ids') ? hash['ids'] : SKIP
|
|
141
|
+
codes = hash.key?('codes') ? hash['codes'] : SKIP
|
|
142
|
+
use_site_exchange_rate =
|
|
143
|
+
hash.key?('use_site_exchange_rate') ? hash['use_site_exchange_rate'] : SKIP
|
|
144
|
+
|
|
145
|
+
# Clean out expected properties from Hash.
|
|
146
|
+
names.each_value { |k| hash.delete(k) }
|
|
147
|
+
|
|
148
|
+
# Create object from extracted values.
|
|
149
|
+
ListCouponsFilter.new(date_field,
|
|
150
|
+
start_date,
|
|
151
|
+
end_date,
|
|
152
|
+
start_datetime,
|
|
153
|
+
end_datetime,
|
|
154
|
+
ids,
|
|
155
|
+
codes,
|
|
156
|
+
use_site_exchange_rate,
|
|
157
|
+
hash)
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
def to_custom_start_datetime
|
|
161
|
+
DateTimeHelper.to_rfc3339(start_datetime)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
def to_custom_end_datetime
|
|
165
|
+
DateTimeHelper.to_rfc3339(end_datetime)
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
end
|
|
@@ -10,7 +10,7 @@ module AdvancedBilling
|
|
|
10
10
|
private_constant :SKIP
|
|
11
11
|
|
|
12
12
|
# TODO: Write general description for this method
|
|
13
|
-
# @return [Array[
|
|
13
|
+
# @return [Array[Object]]
|
|
14
14
|
attr_accessor :events
|
|
15
15
|
|
|
16
16
|
# TODO: Write general description for this method
|
|
@@ -71,16 +71,9 @@ module AdvancedBilling
|
|
|
71
71
|
return nil unless hash
|
|
72
72
|
|
|
73
73
|
# Extract variables from the hash.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
events = []
|
|
78
|
-
hash['events'].each do |structure|
|
|
79
|
-
events << (InvoiceEvent.from_hash(structure) if structure)
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
events = SKIP unless hash.key?('events')
|
|
74
|
+
events = hash.key?('events') ? APIHelper.deserialize_union_type(
|
|
75
|
+
UnionTypeLookUp.get(:InvoiceEvent), hash['events']
|
|
76
|
+
) : SKIP
|
|
84
77
|
page = hash.key?('page') ? hash['page'] : SKIP
|
|
85
78
|
per_page = hash.key?('per_page') ? hash['per_page'] : SKIP
|
|
86
79
|
total_pages = hash.key?('total_pages') ? hash['total_pages'] : SKIP
|
|
@@ -95,5 +88,15 @@ module AdvancedBilling
|
|
|
95
88
|
total_pages,
|
|
96
89
|
hash)
|
|
97
90
|
end
|
|
91
|
+
|
|
92
|
+
# Validates an instance of the object from a given value.
|
|
93
|
+
# @param [ListInvoiceEventsResponse | Hash] The value against the validation is performed.
|
|
94
|
+
def self.validate(value)
|
|
95
|
+
return true if value.instance_of? self
|
|
96
|
+
|
|
97
|
+
return false unless value.instance_of? Hash
|
|
98
|
+
|
|
99
|
+
true
|
|
100
|
+
end
|
|
98
101
|
end
|
|
99
102
|
end
|
data/lib/advanced_billing/models/{refund_prepayment_aggregated_error.rb → list_mrr_filter.rb}
RENAMED
|
@@ -4,26 +4,27 @@
|
|
|
4
4
|
# ( https://apimatic.io ).
|
|
5
5
|
|
|
6
6
|
module AdvancedBilling
|
|
7
|
-
#
|
|
8
|
-
class
|
|
7
|
+
# ListMrrFilter Model.
|
|
8
|
+
class ListMrrFilter < BaseModel
|
|
9
9
|
SKIP = Object.new
|
|
10
10
|
private_constant :SKIP
|
|
11
11
|
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
|
|
12
|
+
# Submit ids in order to limit results. Use in query:
|
|
13
|
+
# `filter[subscription_ids]=1,2,3`.
|
|
14
|
+
# @return [Array[Integer]]
|
|
15
|
+
attr_accessor :subscription_ids
|
|
15
16
|
|
|
16
17
|
# A mapping from model property names to API property names.
|
|
17
18
|
def self.names
|
|
18
19
|
@_hash = {} if @_hash.nil?
|
|
19
|
-
@_hash['
|
|
20
|
+
@_hash['subscription_ids'] = 'subscription_ids'
|
|
20
21
|
@_hash
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
# An array for optional fields
|
|
24
25
|
def self.optionals
|
|
25
26
|
%w[
|
|
26
|
-
|
|
27
|
+
subscription_ids
|
|
27
28
|
]
|
|
28
29
|
end
|
|
29
30
|
|
|
@@ -32,9 +33,9 @@ module AdvancedBilling
|
|
|
32
33
|
[]
|
|
33
34
|
end
|
|
34
35
|
|
|
35
|
-
def initialize(
|
|
36
|
+
def initialize(subscription_ids = SKIP,
|
|
36
37
|
additional_properties = {})
|
|
37
|
-
@
|
|
38
|
+
@subscription_ids = subscription_ids unless subscription_ids == SKIP
|
|
38
39
|
|
|
39
40
|
# Add additional model properties to the instance.
|
|
40
41
|
additional_properties.each do |_name, _value|
|
|
@@ -47,14 +48,15 @@ module AdvancedBilling
|
|
|
47
48
|
return nil unless hash
|
|
48
49
|
|
|
49
50
|
# Extract variables from the hash.
|
|
50
|
-
|
|
51
|
+
subscription_ids =
|
|
52
|
+
hash.key?('subscription_ids') ? hash['subscription_ids'] : SKIP
|
|
51
53
|
|
|
52
54
|
# Clean out expected properties from Hash.
|
|
53
55
|
names.each_value { |k| hash.delete(k) }
|
|
54
56
|
|
|
55
57
|
# Create object from extracted values.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
ListMrrFilter.new(subscription_ids,
|
|
59
|
+
hash)
|
|
58
60
|
end
|
|
59
61
|
end
|
|
60
62
|
end
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
# ( https://apimatic.io ).
|
|
5
5
|
|
|
6
6
|
module AdvancedBilling
|
|
7
|
-
# List
|
|
8
|
-
class
|
|
9
|
-
|
|
7
|
+
# List Prepayment Date Field.
|
|
8
|
+
class ListPrepaymentDateField
|
|
9
|
+
LIST_PREPAYMENT_DATE_FIELD = [
|
|
10
10
|
# TODO: Write general description for CREATED_AT
|
|
11
11
|
CREATED_AT = 'created_at'.freeze,
|
|
12
12
|
|
|
@@ -17,7 +17,7 @@ module AdvancedBilling
|
|
|
17
17
|
def self.validate(value)
|
|
18
18
|
return false if value.nil?
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
LIST_PREPAYMENT_DATE_FIELD.include?(value)
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# advanced_billing
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module AdvancedBilling
|
|
7
|
+
# ListPrepaymentsFilter Model.
|
|
8
|
+
class ListPrepaymentsFilter < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The type of filter you would like to apply to your search. `created_at` -
|
|
13
|
+
# Time when prepayment was created. `application_at` - Time when prepayment
|
|
14
|
+
# was applied to invoice. Use in query `filter[date_field]=created_at`.
|
|
15
|
+
# @return [ListPrepaymentDateField]
|
|
16
|
+
attr_accessor :date_field
|
|
17
|
+
|
|
18
|
+
# The start date (format YYYY-MM-DD) with which to filter the date_field.
|
|
19
|
+
# Returns prepayments with a timestamp at or after midnight (12:00:00 AM) in
|
|
20
|
+
# your site's time zone on the date specified. Use in query:
|
|
21
|
+
# `filter[start_date]=2011-12-15`.
|
|
22
|
+
# @return [Date]
|
|
23
|
+
attr_accessor :start_date
|
|
24
|
+
|
|
25
|
+
# The end date (format YYYY-MM-DD) with which to filter the date_field.
|
|
26
|
+
# Returns prepayments with a timestamp up to and including 11:59:59PM in
|
|
27
|
+
# your site's time zone on the date specified. Use in query:
|
|
28
|
+
# `filter[end_date]=2011-12-15`.
|
|
29
|
+
# @return [Date]
|
|
30
|
+
attr_accessor :end_date
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['date_field'] = 'date_field'
|
|
36
|
+
@_hash['start_date'] = 'start_date'
|
|
37
|
+
@_hash['end_date'] = 'end_date'
|
|
38
|
+
@_hash
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# An array for optional fields
|
|
42
|
+
def self.optionals
|
|
43
|
+
%w[
|
|
44
|
+
date_field
|
|
45
|
+
start_date
|
|
46
|
+
end_date
|
|
47
|
+
]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# An array for nullable fields
|
|
51
|
+
def self.nullables
|
|
52
|
+
[]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def initialize(date_field = SKIP,
|
|
56
|
+
start_date = SKIP,
|
|
57
|
+
end_date = SKIP,
|
|
58
|
+
additional_properties = {})
|
|
59
|
+
@date_field = date_field unless date_field == SKIP
|
|
60
|
+
@start_date = start_date unless start_date == SKIP
|
|
61
|
+
@end_date = end_date unless end_date == SKIP
|
|
62
|
+
|
|
63
|
+
# Add additional model properties to the instance.
|
|
64
|
+
additional_properties.each do |_name, _value|
|
|
65
|
+
instance_variable_set("@#{_name}", _value)
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Creates an instance of the object from a hash.
|
|
70
|
+
def self.from_hash(hash)
|
|
71
|
+
return nil unless hash
|
|
72
|
+
|
|
73
|
+
# Extract variables from the hash.
|
|
74
|
+
date_field = hash.key?('date_field') ? hash['date_field'] : SKIP
|
|
75
|
+
start_date = hash.key?('start_date') ? hash['start_date'] : SKIP
|
|
76
|
+
end_date = hash.key?('end_date') ? hash['end_date'] : SKIP
|
|
77
|
+
|
|
78
|
+
# Clean out expected properties from Hash.
|
|
79
|
+
names.each_value { |k| hash.delete(k) }
|
|
80
|
+
|
|
81
|
+
# Create object from extracted values.
|
|
82
|
+
ListPrepaymentsFilter.new(date_field,
|
|
83
|
+
start_date,
|
|
84
|
+
end_date,
|
|
85
|
+
hash)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,163 @@
|
|
|
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
|
+
# ListPricePointsFilter Model.
|
|
9
|
+
class ListPricePointsFilter < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The type of filter you would like to apply to your search. Use in query:
|
|
14
|
+
# `filter[date_field]=created_at`.
|
|
15
|
+
# @return [BasicDateField]
|
|
16
|
+
attr_accessor :date_field
|
|
17
|
+
|
|
18
|
+
# The start date (format YYYY-MM-DD) with which to filter the date_field.
|
|
19
|
+
# Returns price points with a timestamp at or after midnight (12:00:00 AM)
|
|
20
|
+
# in your site’s time zone on the date specified.
|
|
21
|
+
# @return [Date]
|
|
22
|
+
attr_accessor :start_date
|
|
23
|
+
|
|
24
|
+
# The end date (format YYYY-MM-DD) with which to filter the date_field.
|
|
25
|
+
# Returns price points with a timestamp up to and including 11:59:59PM in
|
|
26
|
+
# your site’s time zone on the date specified.
|
|
27
|
+
# @return [Date]
|
|
28
|
+
attr_accessor :end_date
|
|
29
|
+
|
|
30
|
+
# The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter
|
|
31
|
+
# the date_field. Returns price points with a timestamp at or after exact
|
|
32
|
+
# time provided in query. You can specify timezone in query - otherwise your
|
|
33
|
+
# site's time zone will be used. If provided, this parameter will be used
|
|
34
|
+
# instead of start_date.
|
|
35
|
+
# @return [DateTime]
|
|
36
|
+
attr_accessor :start_datetime
|
|
37
|
+
|
|
38
|
+
# The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter
|
|
39
|
+
# the date_field. Returns price points with a timestamp at or before exact
|
|
40
|
+
# time provided in query. You can specify timezone in query - otherwise your
|
|
41
|
+
# site's time zone will be used. If provided, this parameter will be used
|
|
42
|
+
# instead of end_date.
|
|
43
|
+
# @return [DateTime]
|
|
44
|
+
attr_accessor :end_datetime
|
|
45
|
+
|
|
46
|
+
# Allows fetching price points with matching type. Use in query:
|
|
47
|
+
# `filter[type]=custom,catalog`.
|
|
48
|
+
# @return [Array[PricePointType]]
|
|
49
|
+
attr_accessor :type
|
|
50
|
+
|
|
51
|
+
# Allows fetching price points with matching id based on provided values.
|
|
52
|
+
# Use in query: `filter[ids]=1,2,3`.
|
|
53
|
+
# @return [Array[Integer]]
|
|
54
|
+
attr_accessor :ids
|
|
55
|
+
|
|
56
|
+
# Allows fetching price points only if archived_at is present or not. Use in
|
|
57
|
+
# query: `filter[archived_at]=not_null`.
|
|
58
|
+
# @return [IncludeNullOrNotNull]
|
|
59
|
+
attr_accessor :archived_at
|
|
60
|
+
|
|
61
|
+
# A mapping from model property names to API property names.
|
|
62
|
+
def self.names
|
|
63
|
+
@_hash = {} if @_hash.nil?
|
|
64
|
+
@_hash['date_field'] = 'date_field'
|
|
65
|
+
@_hash['start_date'] = 'start_date'
|
|
66
|
+
@_hash['end_date'] = 'end_date'
|
|
67
|
+
@_hash['start_datetime'] = 'start_datetime'
|
|
68
|
+
@_hash['end_datetime'] = 'end_datetime'
|
|
69
|
+
@_hash['type'] = 'type'
|
|
70
|
+
@_hash['ids'] = 'ids'
|
|
71
|
+
@_hash['archived_at'] = 'archived_at'
|
|
72
|
+
@_hash
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# An array for optional fields
|
|
76
|
+
def self.optionals
|
|
77
|
+
%w[
|
|
78
|
+
date_field
|
|
79
|
+
start_date
|
|
80
|
+
end_date
|
|
81
|
+
start_datetime
|
|
82
|
+
end_datetime
|
|
83
|
+
type
|
|
84
|
+
ids
|
|
85
|
+
archived_at
|
|
86
|
+
]
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# An array for nullable fields
|
|
90
|
+
def self.nullables
|
|
91
|
+
[]
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def initialize(date_field = SKIP,
|
|
95
|
+
start_date = SKIP,
|
|
96
|
+
end_date = SKIP,
|
|
97
|
+
start_datetime = SKIP,
|
|
98
|
+
end_datetime = SKIP,
|
|
99
|
+
type = SKIP,
|
|
100
|
+
ids = SKIP,
|
|
101
|
+
archived_at = SKIP,
|
|
102
|
+
additional_properties = {})
|
|
103
|
+
@date_field = date_field unless date_field == SKIP
|
|
104
|
+
@start_date = start_date unless start_date == SKIP
|
|
105
|
+
@end_date = end_date unless end_date == SKIP
|
|
106
|
+
@start_datetime = start_datetime unless start_datetime == SKIP
|
|
107
|
+
@end_datetime = end_datetime unless end_datetime == SKIP
|
|
108
|
+
@type = type unless type == SKIP
|
|
109
|
+
@ids = ids unless ids == SKIP
|
|
110
|
+
@archived_at = archived_at unless archived_at == SKIP
|
|
111
|
+
|
|
112
|
+
# Add additional model properties to the instance.
|
|
113
|
+
additional_properties.each do |_name, _value|
|
|
114
|
+
instance_variable_set("@#{_name}", _value)
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Creates an instance of the object from a hash.
|
|
119
|
+
def self.from_hash(hash)
|
|
120
|
+
return nil unless hash
|
|
121
|
+
|
|
122
|
+
# Extract variables from the hash.
|
|
123
|
+
date_field = hash.key?('date_field') ? hash['date_field'] : SKIP
|
|
124
|
+
start_date = hash.key?('start_date') ? hash['start_date'] : SKIP
|
|
125
|
+
end_date = hash.key?('end_date') ? hash['end_date'] : SKIP
|
|
126
|
+
start_datetime = if hash.key?('start_datetime')
|
|
127
|
+
(DateTimeHelper.from_rfc3339(hash['start_datetime']) if hash['start_datetime'])
|
|
128
|
+
else
|
|
129
|
+
SKIP
|
|
130
|
+
end
|
|
131
|
+
end_datetime = if hash.key?('end_datetime')
|
|
132
|
+
(DateTimeHelper.from_rfc3339(hash['end_datetime']) if hash['end_datetime'])
|
|
133
|
+
else
|
|
134
|
+
SKIP
|
|
135
|
+
end
|
|
136
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
137
|
+
ids = hash.key?('ids') ? hash['ids'] : SKIP
|
|
138
|
+
archived_at = hash.key?('archived_at') ? hash['archived_at'] : SKIP
|
|
139
|
+
|
|
140
|
+
# Clean out expected properties from Hash.
|
|
141
|
+
names.each_value { |k| hash.delete(k) }
|
|
142
|
+
|
|
143
|
+
# Create object from extracted values.
|
|
144
|
+
ListPricePointsFilter.new(date_field,
|
|
145
|
+
start_date,
|
|
146
|
+
end_date,
|
|
147
|
+
start_datetime,
|
|
148
|
+
end_datetime,
|
|
149
|
+
type,
|
|
150
|
+
ids,
|
|
151
|
+
archived_at,
|
|
152
|
+
hash)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def to_custom_start_datetime
|
|
156
|
+
DateTimeHelper.to_rfc3339(start_datetime)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
def to_custom_end_datetime
|
|
160
|
+
DateTimeHelper.to_rfc3339(end_datetime)
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# advanced_billing
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module AdvancedBilling
|
|
7
|
+
# ListProductsFilter Model.
|
|
8
|
+
class ListProductsFilter < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Allows fetching products only if a prepaid product price point is present
|
|
13
|
+
# or not. To use this filter you also have to include the following param in
|
|
14
|
+
# the request `include=prepaid_product_price_point`. Use in query
|
|
15
|
+
# `filter[prepaid_product_price_point][product_price_point_id]=not_null`.
|
|
16
|
+
# @return [PrepaidProductPricePointFilter]
|
|
17
|
+
attr_accessor :prepaid_product_price_point
|
|
18
|
+
|
|
19
|
+
# Allows fetching products with matching use_site_exchange_rate based on
|
|
20
|
+
# provided value (refers to default price point). Use in query
|
|
21
|
+
# `filter[use_site_exchange_rate]=true`.
|
|
22
|
+
# @return [TrueClass | FalseClass]
|
|
23
|
+
attr_accessor :use_site_exchange_rate
|
|
24
|
+
|
|
25
|
+
# A mapping from model property names to API property names.
|
|
26
|
+
def self.names
|
|
27
|
+
@_hash = {} if @_hash.nil?
|
|
28
|
+
@_hash['prepaid_product_price_point'] = 'prepaid_product_price_point'
|
|
29
|
+
@_hash['use_site_exchange_rate'] = 'use_site_exchange_rate'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
prepaid_product_price_point
|
|
37
|
+
use_site_exchange_rate
|
|
38
|
+
]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# An array for nullable fields
|
|
42
|
+
def self.nullables
|
|
43
|
+
[]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def initialize(prepaid_product_price_point = SKIP,
|
|
47
|
+
use_site_exchange_rate = SKIP,
|
|
48
|
+
additional_properties = {})
|
|
49
|
+
unless prepaid_product_price_point == SKIP
|
|
50
|
+
@prepaid_product_price_point =
|
|
51
|
+
prepaid_product_price_point
|
|
52
|
+
end
|
|
53
|
+
@use_site_exchange_rate = use_site_exchange_rate unless use_site_exchange_rate == SKIP
|
|
54
|
+
|
|
55
|
+
# Add additional model properties to the instance.
|
|
56
|
+
additional_properties.each do |_name, _value|
|
|
57
|
+
instance_variable_set("@#{_name}", _value)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Creates an instance of the object from a hash.
|
|
62
|
+
def self.from_hash(hash)
|
|
63
|
+
return nil unless hash
|
|
64
|
+
|
|
65
|
+
# Extract variables from the hash.
|
|
66
|
+
if hash['prepaid_product_price_point']
|
|
67
|
+
prepaid_product_price_point = PrepaidProductPricePointFilter.from_hash(hash['prepaid_product_price_point'])
|
|
68
|
+
end
|
|
69
|
+
use_site_exchange_rate =
|
|
70
|
+
hash.key?('use_site_exchange_rate') ? hash['use_site_exchange_rate'] : SKIP
|
|
71
|
+
|
|
72
|
+
# Clean out expected properties from Hash.
|
|
73
|
+
names.each_value { |k| hash.delete(k) }
|
|
74
|
+
|
|
75
|
+
# Create object from extracted values.
|
|
76
|
+
ListProductsFilter.new(prepaid_product_price_point,
|
|
77
|
+
use_site_exchange_rate,
|
|
78
|
+
hash)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|