maxio-advanced-billing-sdk 5.0.0 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +41 -41
  3. data/lib/advanced_billing/controllers/advance_invoice_controller.rb +3 -3
  4. data/lib/advanced_billing/controllers/api_exports_controller.rb +9 -9
  5. data/lib/advanced_billing/controllers/base_controller.rb +1 -1
  6. data/lib/advanced_billing/controllers/billing_portal_controller.rb +4 -4
  7. data/lib/advanced_billing/controllers/component_price_points_controller.rb +11 -11
  8. data/lib/advanced_billing/controllers/components_controller.rb +12 -12
  9. data/lib/advanced_billing/controllers/coupons_controller.rb +14 -14
  10. data/lib/advanced_billing/controllers/custom_fields_controller.rb +9 -9
  11. data/lib/advanced_billing/controllers/customers_controller.rb +7 -7
  12. data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +6 -6
  13. data/lib/advanced_billing/controllers/events_controller.rb +3 -3
  14. data/lib/advanced_billing/controllers/insights_controller.rb +4 -4
  15. data/lib/advanced_billing/controllers/invoices_controller.rb +17 -17
  16. data/lib/advanced_billing/controllers/offers_controller.rb +5 -5
  17. data/lib/advanced_billing/controllers/payment_profiles_controller.rb +12 -12
  18. data/lib/advanced_billing/controllers/product_families_controller.rb +4 -4
  19. data/lib/advanced_billing/controllers/product_price_points_controller.rb +11 -11
  20. data/lib/advanced_billing/controllers/products_controller.rb +6 -6
  21. data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +9 -9
  22. data/lib/advanced_billing/controllers/reason_codes_controller.rb +5 -5
  23. data/lib/advanced_billing/controllers/referral_codes_controller.rb +1 -1
  24. data/lib/advanced_billing/controllers/sales_commissions_controller.rb +3 -3
  25. data/lib/advanced_billing/controllers/sites_controller.rb +3 -3
  26. data/lib/advanced_billing/controllers/subscription_components_controller.rb +17 -17
  27. data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +4 -4
  28. data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +4 -4
  29. data/lib/advanced_billing/controllers/subscription_groups_controller.rb +9 -9
  30. data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +6 -6
  31. data/lib/advanced_billing/controllers/subscription_notes_controller.rb +5 -5
  32. data/lib/advanced_billing/controllers/subscription_products_controller.rb +2 -2
  33. data/lib/advanced_billing/controllers/subscription_status_controller.rb +10 -10
  34. data/lib/advanced_billing/controllers/subscriptions_controller.rb +12 -12
  35. data/lib/advanced_billing/controllers/webhooks_controller.rb +6 -6
  36. data/lib/advanced_billing/models/cancellation_method.rb +4 -1
  37. data/lib/advanced_billing/models/create_invoice_payment.rb +17 -3
  38. data/lib/advanced_billing/models/customer.rb +29 -2
  39. data/lib/advanced_billing/models/customer_attributes.rb +16 -0
  40. data/lib/advanced_billing/models/invoice_payment.rb +24 -1
  41. data/lib/advanced_billing/models/list_products_filter.rb +12 -2
  42. data/lib/advanced_billing/models/update_subscription.rb +25 -1
  43. metadata +2 -2
@@ -50,6 +50,18 @@ module AdvancedBilling
50
50
  # @return [String]
51
51
  attr_accessor :gateway_transaction_id
52
52
 
53
+ # Date reflecting when the payment was received from a customer. Must be in
54
+ # the past. Applicable only to
55
+ # `external` payments.
56
+ # @return [Date]
57
+ attr_accessor :received_on
58
+
59
+ # Date reflecting when the payment was received from a customer. Must be in
60
+ # the past. Applicable only to
61
+ # `external` payments.
62
+ # @return [String]
63
+ attr_accessor :uid
64
+
53
65
  # A mapping from model property names to API property names.
54
66
  def self.names
55
67
  @_hash = {} if @_hash.nil?
@@ -63,6 +75,8 @@ module AdvancedBilling
63
75
  @_hash['gateway_handle'] = 'gateway_handle'
64
76
  @_hash['gateway_used'] = 'gateway_used'
65
77
  @_hash['gateway_transaction_id'] = 'gateway_transaction_id'
78
+ @_hash['received_on'] = 'received_on'
79
+ @_hash['uid'] = 'uid'
66
80
  @_hash
67
81
  end
68
82
 
@@ -79,6 +93,8 @@ module AdvancedBilling
79
93
  gateway_handle
80
94
  gateway_used
81
95
  gateway_transaction_id
96
+ received_on
97
+ uid
82
98
  ]
83
99
  end
84
100
 
@@ -87,6 +103,7 @@ module AdvancedBilling
87
103
  %w[
88
104
  gateway_handle
89
105
  gateway_transaction_id
106
+ received_on
90
107
  ]
91
108
  end
92
109
 
@@ -94,7 +111,7 @@ module AdvancedBilling
94
111
  applied_amount: SKIP, payment_method: SKIP,
95
112
  transaction_id: SKIP, prepayment: SKIP, gateway_handle: SKIP,
96
113
  gateway_used: SKIP, gateway_transaction_id: SKIP,
97
- additional_properties: {})
114
+ received_on: SKIP, uid: SKIP, additional_properties: {})
98
115
  @transaction_time = transaction_time unless transaction_time == SKIP
99
116
  @memo = memo unless memo == SKIP
100
117
  @original_amount = original_amount unless original_amount == SKIP
@@ -105,6 +122,8 @@ module AdvancedBilling
105
122
  @gateway_handle = gateway_handle unless gateway_handle == SKIP
106
123
  @gateway_used = gateway_used unless gateway_used == SKIP
107
124
  @gateway_transaction_id = gateway_transaction_id unless gateway_transaction_id == SKIP
125
+ @received_on = received_on unless received_on == SKIP
126
+ @uid = uid unless uid == SKIP
108
127
 
109
128
  # Add additional model properties to the instance.
110
129
  additional_properties.each do |_name, _value|
@@ -137,6 +156,8 @@ module AdvancedBilling
137
156
  gateway_used = hash.key?('gateway_used') ? hash['gateway_used'] : SKIP
138
157
  gateway_transaction_id =
139
158
  hash.key?('gateway_transaction_id') ? hash['gateway_transaction_id'] : SKIP
159
+ received_on = hash.key?('received_on') ? hash['received_on'] : SKIP
160
+ uid = hash.key?('uid') ? hash['uid'] : SKIP
140
161
 
141
162
  # Clean out expected properties from Hash.
142
163
  names.each_value { |k| hash.delete(k) }
@@ -152,6 +173,8 @@ module AdvancedBilling
152
173
  gateway_handle: gateway_handle,
153
174
  gateway_used: gateway_used,
154
175
  gateway_transaction_id: gateway_transaction_id,
176
+ received_on: received_on,
177
+ uid: uid,
155
178
  additional_properties: hash)
156
179
  end
157
180
 
@@ -9,6 +9,11 @@ module AdvancedBilling
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
+ # Allows fetching products with matching id based on provided values. Use in
13
+ # query `filter[ids]=1,2,3`.
14
+ # @return [Array[Integer]]
15
+ attr_accessor :ids
16
+
12
17
  # Allows fetching products only if a prepaid product price point is present
13
18
  # or not. To use this filter you also have to include the following param in
14
19
  # the request `include=prepaid_product_price_point`. Use in query
@@ -25,6 +30,7 @@ module AdvancedBilling
25
30
  # A mapping from model property names to API property names.
26
31
  def self.names
27
32
  @_hash = {} if @_hash.nil?
33
+ @_hash['ids'] = 'ids'
28
34
  @_hash['prepaid_product_price_point'] = 'prepaid_product_price_point'
29
35
  @_hash['use_site_exchange_rate'] = 'use_site_exchange_rate'
30
36
  @_hash
@@ -33,6 +39,7 @@ module AdvancedBilling
33
39
  # An array for optional fields
34
40
  def self.optionals
35
41
  %w[
42
+ ids
36
43
  prepaid_product_price_point
37
44
  use_site_exchange_rate
38
45
  ]
@@ -43,8 +50,9 @@ module AdvancedBilling
43
50
  []
44
51
  end
45
52
 
46
- def initialize(prepaid_product_price_point: SKIP,
53
+ def initialize(ids: SKIP, prepaid_product_price_point: SKIP,
47
54
  use_site_exchange_rate: SKIP, additional_properties: {})
55
+ @ids = ids unless ids == SKIP
48
56
  unless prepaid_product_price_point == SKIP
49
57
  @prepaid_product_price_point =
50
58
  prepaid_product_price_point
@@ -62,6 +70,7 @@ module AdvancedBilling
62
70
  return nil unless hash
63
71
 
64
72
  # Extract variables from the hash.
73
+ ids = hash.key?('ids') ? hash['ids'] : SKIP
65
74
  if hash['prepaid_product_price_point']
66
75
  prepaid_product_price_point = PrepaidProductPricePointFilter.from_hash(hash['prepaid_product_price_point'])
67
76
  end
@@ -72,7 +81,8 @@ module AdvancedBilling
72
81
  names.each_value { |k| hash.delete(k) }
73
82
 
74
83
  # Create object from extracted values.
75
- ListProductsFilter.new(prepaid_product_price_point: prepaid_product_price_point,
84
+ ListProductsFilter.new(ids: ids,
85
+ prepaid_product_price_point: prepaid_product_price_point,
76
86
  use_site_exchange_rate: use_site_exchange_rate,
77
87
  additional_properties: hash)
78
88
  end
@@ -90,6 +90,14 @@ module AdvancedBilling
90
90
  # @return [String]
91
91
  attr_accessor :dunning_communication_delay_time_zone
92
92
 
93
+ # Set to change the current product's price point.
94
+ # @return [Integer]
95
+ attr_accessor :product_price_point_id
96
+
97
+ # Set to change the current product's price point.
98
+ # @return [String]
99
+ attr_accessor :product_price_point_handle
100
+
93
101
  # A mapping from model property names to API property names.
94
102
  def self.names
95
103
  @_hash = {} if @_hash.nil?
@@ -113,6 +121,8 @@ module AdvancedBilling
113
121
  'dunning_communication_delay_enabled'
114
122
  @_hash['dunning_communication_delay_time_zone'] =
115
123
  'dunning_communication_delay_time_zone'
124
+ @_hash['product_price_point_id'] = 'product_price_point_id'
125
+ @_hash['product_price_point_handle'] = 'product_price_point_handle'
116
126
  @_hash
117
127
  end
118
128
 
@@ -136,6 +146,8 @@ module AdvancedBilling
136
146
  components
137
147
  dunning_communication_delay_enabled
138
148
  dunning_communication_delay_time_zone
149
+ product_price_point_id
150
+ product_price_point_handle
139
151
  ]
140
152
  end
141
153
 
@@ -157,7 +169,8 @@ module AdvancedBilling
157
169
  custom_price: SKIP, components: SKIP,
158
170
  dunning_communication_delay_enabled: SKIP,
159
171
  dunning_communication_delay_time_zone: SKIP,
160
- additional_properties: {})
172
+ product_price_point_id: SKIP,
173
+ product_price_point_handle: SKIP, additional_properties: {})
161
174
  @credit_card_attributes = credit_card_attributes unless credit_card_attributes == SKIP
162
175
  @product_handle = product_handle unless product_handle == SKIP
163
176
  @product_id = product_id unless product_id == SKIP
@@ -190,6 +203,11 @@ module AdvancedBilling
190
203
  @dunning_communication_delay_time_zone =
191
204
  dunning_communication_delay_time_zone
192
205
  end
206
+ @product_price_point_id = product_price_point_id unless product_price_point_id == SKIP
207
+ unless product_price_point_handle == SKIP
208
+ @product_price_point_handle =
209
+ product_price_point_handle
210
+ end
193
211
 
194
212
  # Add additional model properties to the instance.
195
213
  additional_properties.each do |_name, _value|
@@ -247,6 +265,10 @@ module AdvancedBilling
247
265
  hash.key?('dunning_communication_delay_enabled') ? hash['dunning_communication_delay_enabled'] : SKIP
248
266
  dunning_communication_delay_time_zone =
249
267
  hash.key?('dunning_communication_delay_time_zone') ? hash['dunning_communication_delay_time_zone'] : SKIP
268
+ product_price_point_id =
269
+ hash.key?('product_price_point_id') ? hash['product_price_point_id'] : SKIP
270
+ product_price_point_handle =
271
+ hash.key?('product_price_point_handle') ? hash['product_price_point_handle'] : SKIP
250
272
 
251
273
  # Clean out expected properties from Hash.
252
274
  names.each_value { |k| hash.delete(k) }
@@ -269,6 +291,8 @@ module AdvancedBilling
269
291
  components: components,
270
292
  dunning_communication_delay_enabled: dunning_communication_delay_enabled,
271
293
  dunning_communication_delay_time_zone: dunning_communication_delay_time_zone,
294
+ product_price_point_id: product_price_point_id,
295
+ product_price_point_handle: product_price_point_handle,
272
296
  additional_properties: hash)
273
297
  end
274
298
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maxio-advanced-billing-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxio SDK
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-21 00:00:00.000000000 Z
11
+ date: 2024-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apimatic_core_interfaces