ultracart_api 3.9.5 → 3.9.8

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.
@@ -37,6 +37,9 @@ module UltracartClient
37
37
  # Delivered count
38
38
  attr_accessor :delivered_count
39
39
 
40
+ # Loyalty Program Type
41
+ attr_accessor :loyalty_program_type
42
+
40
43
  # Maximum active customers allowed under their billing plan
41
44
  attr_accessor :max_active_customers
42
45
 
@@ -79,6 +82,28 @@ module UltracartClient
79
82
  # Total transactions emails sent
80
83
  attr_accessor :transactional_send_count
81
84
 
85
+ class EnumAttributeValidator
86
+ attr_reader :datatype
87
+ attr_reader :allowable_values
88
+
89
+ def initialize(datatype, allowable_values)
90
+ @allowable_values = allowable_values.map do |value|
91
+ case datatype.to_s
92
+ when /Integer/i
93
+ value.to_i
94
+ when /Float/i
95
+ value.to_f
96
+ else
97
+ value
98
+ end
99
+ end
100
+ end
101
+
102
+ def valid?(value)
103
+ !value || allowable_values.include?(value)
104
+ end
105
+ end
106
+
82
107
  # Attribute mapping from ruby-style variable name to JSON key.
83
108
  def self.attribute_map
84
109
  {
@@ -90,6 +115,7 @@ module UltracartClient
90
115
  :'customer_histogram' => :'customer_histogram',
91
116
  :'daily_stats' => :'daily_stats',
92
117
  :'delivered_count' => :'delivered_count',
118
+ :'loyalty_program_type' => :'loyalty_program_type',
93
119
  :'max_active_customers' => :'max_active_customers',
94
120
  :'max_emails_per_day' => :'max_emails_per_day',
95
121
  :'max_emails_per_hour' => :'max_emails_per_hour',
@@ -118,6 +144,7 @@ module UltracartClient
118
144
  :'customer_histogram' => :'EmailPerformanceCustomerHistogram',
119
145
  :'daily_stats' => :'Array<EmailPerformanceDaily>',
120
146
  :'delivered_count' => :'Integer',
147
+ :'loyalty_program_type' => :'String',
121
148
  :'max_active_customers' => :'Integer',
122
149
  :'max_emails_per_day' => :'Integer',
123
150
  :'max_emails_per_hour' => :'Integer',
@@ -177,6 +204,10 @@ module UltracartClient
177
204
  self.delivered_count = attributes[:'delivered_count']
178
205
  end
179
206
 
207
+ if attributes.has_key?(:'loyalty_program_type')
208
+ self.loyalty_program_type = attributes[:'loyalty_program_type']
209
+ end
210
+
180
211
  if attributes.has_key?(:'max_active_customers')
181
212
  self.max_active_customers = attributes[:'max_active_customers']
182
213
  end
@@ -244,9 +275,21 @@ module UltracartClient
244
275
  # Check to see if the all the properties in the model are valid
245
276
  # @return true if the model is valid
246
277
  def valid?
278
+ loyalty_program_type_validator = EnumAttributeValidator.new('String', ['disabled', 'points', 'cashback'])
279
+ return false unless loyalty_program_type_validator.valid?(@loyalty_program_type)
247
280
  true
248
281
  end
249
282
 
283
+ # Custom attribute writer method checking allowed values (enum).
284
+ # @param [Object] loyalty_program_type Object to be assigned
285
+ def loyalty_program_type=(loyalty_program_type)
286
+ validator = EnumAttributeValidator.new('String', ['disabled', 'points', 'cashback'])
287
+ unless validator.valid?(loyalty_program_type)
288
+ fail ArgumentError, 'invalid value for "loyalty_program_type", must be one of #{validator.allowable_values}.'
289
+ end
290
+ @loyalty_program_type = loyalty_program_type
291
+ end
292
+
250
293
  # Checks equality by comparing each attribute.
251
294
  # @param [Object] Object to be compared
252
295
  def ==(o)
@@ -260,6 +303,7 @@ module UltracartClient
260
303
  customer_histogram == o.customer_histogram &&
261
304
  daily_stats == o.daily_stats &&
262
305
  delivered_count == o.delivered_count &&
306
+ loyalty_program_type == o.loyalty_program_type &&
263
307
  max_active_customers == o.max_active_customers &&
264
308
  max_emails_per_day == o.max_emails_per_day &&
265
309
  max_emails_per_hour == o.max_emails_per_hour &&
@@ -285,7 +329,7 @@ module UltracartClient
285
329
  # Calculates hash code according to all attributes.
286
330
  # @return [Fixnum] Hash code
287
331
  def hash
288
- [active_customers, actual_customers, bounce_count, bounce_percentage, bounce_percentage_formatted, customer_histogram, daily_stats, delivered_count, max_active_customers, max_emails_per_day, max_emails_per_hour, max_emails_per_month, paused_for_spam, revenue, sent_emails_per_day, sent_emails_per_hour, sent_emails_per_month, sequence_send_count, spam_count, spam_percentage, spam_percentage_formatted, transactional_send_count].hash
332
+ [active_customers, actual_customers, bounce_count, bounce_percentage, bounce_percentage_formatted, customer_histogram, daily_stats, delivered_count, loyalty_program_type, max_active_customers, max_emails_per_day, max_emails_per_hour, max_emails_per_month, paused_for_spam, revenue, sent_emails_per_day, sent_emails_per_hour, sent_emails_per_month, sequence_send_count, spam_count, spam_percentage, spam_percentage_formatted, transactional_send_count].hash
289
333
  end
290
334
 
291
335
  # Builds the object from hash
@@ -26,6 +26,9 @@ module UltracartClient
26
26
  # True if the auto order was canceled because the customer purchased a downgrade item
27
27
  attr_accessor :cancel_downgrade
28
28
 
29
+ # The reason this auto order was canceled by either merchant or customer
30
+ attr_accessor :cancel_reason
31
+
29
32
  # True if the auto order was canceled because the customer purchased an upgrade item
30
33
  attr_accessor :cancel_upgrade
31
34
 
@@ -100,6 +103,7 @@ module UltracartClient
100
103
  :'auto_order_oid' => :'auto_order_oid',
101
104
  :'cancel_after_next_x_orders' => :'cancel_after_next_x_orders',
102
105
  :'cancel_downgrade' => :'cancel_downgrade',
106
+ :'cancel_reason' => :'cancel_reason',
103
107
  :'cancel_upgrade' => :'cancel_upgrade',
104
108
  :'canceled_by_user' => :'canceled_by_user',
105
109
  :'canceled_dts' => :'canceled_dts',
@@ -125,6 +129,7 @@ module UltracartClient
125
129
  :'auto_order_oid' => :'Integer',
126
130
  :'cancel_after_next_x_orders' => :'Integer',
127
131
  :'cancel_downgrade' => :'BOOLEAN',
132
+ :'cancel_reason' => :'String',
128
133
  :'cancel_upgrade' => :'BOOLEAN',
129
134
  :'canceled_by_user' => :'String',
130
135
  :'canceled_dts' => :'String',
@@ -167,6 +172,10 @@ module UltracartClient
167
172
  self.cancel_downgrade = attributes[:'cancel_downgrade']
168
173
  end
169
174
 
175
+ if attributes.has_key?(:'cancel_reason')
176
+ self.cancel_reason = attributes[:'cancel_reason']
177
+ end
178
+
170
179
  if attributes.has_key?(:'cancel_upgrade')
171
180
  self.cancel_upgrade = attributes[:'cancel_upgrade']
172
181
  end
@@ -266,6 +275,7 @@ module UltracartClient
266
275
  auto_order_oid == o.auto_order_oid &&
267
276
  cancel_after_next_x_orders == o.cancel_after_next_x_orders &&
268
277
  cancel_downgrade == o.cancel_downgrade &&
278
+ cancel_reason == o.cancel_reason &&
269
279
  cancel_upgrade == o.cancel_upgrade &&
270
280
  canceled_by_user == o.canceled_by_user &&
271
281
  canceled_dts == o.canceled_dts &&
@@ -292,7 +302,7 @@ module UltracartClient
292
302
  # Calculates hash code according to all attributes.
293
303
  # @return [Fixnum] Hash code
294
304
  def hash
295
- [auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, next_attempt, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
305
+ [auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_reason, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, next_attempt, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
296
306
  end
297
307
 
298
308
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.9.5'
14
+ VERSION = '3.9.8'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -26,6 +26,8 @@ require 'ultracart_api/models/accounts_receivable_retry_stat_revenue'
26
26
  require 'ultracart_api/models/accounts_receivable_retry_stats_response'
27
27
  require 'ultracart_api/models/activity'
28
28
  require 'ultracart_api/models/add_library_item_request'
29
+ require 'ultracart_api/models/adjust_internal_certificate_request'
30
+ require 'ultracart_api/models/adjust_internal_certificate_response'
29
31
  require 'ultracart_api/models/affiliate_click'
30
32
  require 'ultracart_api/models/affiliate_click_query'
31
33
  require 'ultracart_api/models/affiliate_clicks_response'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.5
4
+ version: 3.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-14 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -230,6 +230,8 @@ files:
230
230
  - docs/AccountsReceivableRetryStatsResponse.md
231
231
  - docs/Activity.md
232
232
  - docs/AddLibraryItemRequest.md
233
+ - docs/AdjustInternalCertificateRequest.md
234
+ - docs/AdjustInternalCertificateResponse.md
233
235
  - docs/AffiliateApi.md
234
236
  - docs/AffiliateClick.md
235
237
  - docs/AffiliateClickQuery.md
@@ -923,6 +925,8 @@ files:
923
925
  - lib/ultracart_api/models/accounts_receivable_retry_stats_response.rb
924
926
  - lib/ultracart_api/models/activity.rb
925
927
  - lib/ultracart_api/models/add_library_item_request.rb
928
+ - lib/ultracart_api/models/adjust_internal_certificate_request.rb
929
+ - lib/ultracart_api/models/adjust_internal_certificate_response.rb
926
930
  - lib/ultracart_api/models/affiliate_click.rb
927
931
  - lib/ultracart_api/models/affiliate_click_query.rb
928
932
  - lib/ultracart_api/models/affiliate_clicks_response.rb