talon_one 1.1.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +21 -12
- data/docs/AccountAnalytics.md +1 -0
- data/docs/AccountLimits.md +1 -0
- data/docs/Application.md +2 -1
- data/docs/ApplicationCustomer.md +1 -1
- data/docs/ApplicationSession.md +2 -1
- data/docs/Attribute.md +0 -2
- data/docs/AttributesMandatory.md +9 -0
- data/docs/AttributesSettings.md +8 -0
- data/docs/BaseSamlConnection.md +15 -0
- data/docs/Campaign.md +2 -0
- data/docs/CampaignAnalytics.md +9 -3
- data/docs/CampaignCopy.md +4 -0
- data/docs/Change.md +2 -2
- data/docs/CustomerInventory.md +9 -0
- data/docs/CustomerProfile.md +1 -1
- data/docs/ErrorSource.md +1 -0
- data/docs/Event.md +1 -1
- data/docs/InlineResponse20020.md +1 -1
- data/docs/InlineResponse20021.md +1 -1
- data/docs/InlineResponse20022.md +1 -1
- data/docs/InlineResponse20023.md +1 -1
- data/docs/InlineResponse20024.md +1 -1
- data/docs/InlineResponse20025.md +1 -1
- data/docs/InlineResponse20026.md +3 -2
- data/docs/InlineResponse20027.md +1 -1
- data/docs/InlineResponse20028.md +1 -1
- data/docs/InlineResponse20029.md +9 -0
- data/docs/IntegrationApi.md +66 -0
- data/docs/IntegrationEvent.md +10 -0
- data/docs/IntegrationState.md +1 -0
- data/docs/ManagementApi.md +175 -104
- data/docs/Meta.md +1 -0
- data/docs/NewApplication.md +2 -1
- data/docs/NewEvent.md +1 -1
- data/docs/NewSamlConnection.md +16 -0
- data/docs/Notification.md +10 -0
- data/docs/{ApplicationStorageData.md → Notifications.md} +1 -1
- data/docs/ReferralRejectionReason.md +10 -0
- data/docs/SamlConnection.md +18 -0
- data/docs/SamlConnectionMetadata.md +11 -0
- data/docs/UpdateApplication.md +15 -0
- data/docs/UpdateUser.md +1 -0
- data/docs/User.md +2 -0
- data/docs/Webhook.md +0 -1
- data/lib/talon_one.rb +13 -6
- data/lib/talon_one/api/integration_api.rb +60 -0
- data/lib/talon_one/api/management_api.rb +194 -121
- data/lib/talon_one/models/account_analytics.rb +19 -4
- data/lib/talon_one/models/account_limits.rb +11 -1
- data/lib/talon_one/models/application.rb +62 -53
- data/lib/talon_one/models/application_customer.rb +0 -5
- data/lib/talon_one/models/application_session.rb +12 -2
- data/lib/talon_one/models/attribute.rb +4 -38
- data/lib/talon_one/models/attributes_mandatory.rb +199 -0
- data/lib/talon_one/models/{new_application_storage_data.rb → attributes_settings.rb} +13 -4
- data/lib/talon_one/models/{application_storage.rb → base_saml_connection.rb} +122 -78
- data/lib/talon_one/models/campaign.rb +21 -1
- data/lib/talon_one/models/campaign_analytics.rb +94 -4
- data/lib/talon_one/models/campaign_copy.rb +46 -4
- data/lib/talon_one/models/change.rb +2 -2
- data/lib/talon_one/models/coupon_rejection_reason.rb +2 -2
- data/lib/talon_one/models/customer_inventory.rb +194 -0
- data/lib/talon_one/models/customer_profile.rb +0 -5
- data/lib/talon_one/models/error_source.rb +14 -4
- data/lib/talon_one/models/event.rb +11 -35
- data/lib/talon_one/models/inline_response_200_20.rb +1 -1
- data/lib/talon_one/models/inline_response_200_21.rb +1 -1
- data/lib/talon_one/models/inline_response_200_22.rb +1 -1
- data/lib/talon_one/models/inline_response_200_23.rb +1 -1
- data/lib/talon_one/models/inline_response_200_24.rb +1 -1
- data/lib/talon_one/models/inline_response_200_25.rb +1 -1
- data/lib/talon_one/models/inline_response_200_26.rb +11 -7
- data/lib/talon_one/models/inline_response_200_27.rb +1 -1
- data/lib/talon_one/models/inline_response_200_28.rb +1 -1
- data/lib/talon_one/models/{new_application_storage_tuple.rb → inline_response_200_29.rb} +22 -40
- data/lib/talon_one/models/integration_event.rb +234 -0
- data/lib/talon_one/models/integration_state.rb +13 -4
- data/lib/talon_one/models/limit_config.rb +2 -2
- data/lib/talon_one/models/meta.rb +10 -1
- data/lib/talon_one/models/new_application.rb +57 -56
- data/lib/talon_one/models/new_event.rb +38 -38
- data/lib/talon_one/models/new_saml_connection.rb +371 -0
- data/lib/talon_one/models/{new_application_storage.rb → notification.rb} +22 -17
- data/lib/talon_one/models/{application_storage_data.rb → notifications.rb} +1 -2
- data/lib/talon_one/models/referral_rejection_reason.rb +251 -0
- data/lib/talon_one/models/saml_connection.rb +387 -0
- data/lib/talon_one/models/{application_storage_tuple.rb → saml_connection_metadata.rb} +68 -80
- data/lib/talon_one/models/update_application.rb +361 -0
- data/lib/talon_one/models/update_user.rb +13 -4
- data/lib/talon_one/models/user.rb +23 -4
- data/lib/talon_one/models/webhook.rb +4 -21
- data/lib/talon_one/version.rb +1 -1
- data/spec/api/integration_api_spec.rb +14 -0
- data/spec/api/management_api_spec.rb +56 -37
- data/spec/models/account_analytics_spec.rb +6 -0
- data/spec/models/account_limits_spec.rb +6 -0
- data/spec/models/application_session_spec.rb +6 -0
- data/spec/models/application_spec.rb +12 -6
- data/spec/models/attribute_spec.rb +0 -12
- data/spec/models/{new_application_storage_tuple_spec.rb → attributes_mandatory_spec.rb} +8 -8
- data/spec/models/{new_application_storage_data_spec.rb → attributes_settings_spec.rb} +12 -6
- data/spec/models/{application_storage_spec.rb → base_saml_connection_spec.rb} +14 -14
- data/spec/models/campaign_analytics_spec.rb +36 -0
- data/spec/models/campaign_copy_spec.rb +24 -0
- data/spec/models/campaign_spec.rb +12 -0
- data/spec/models/coupon_rejection_reason_spec.rb +1 -1
- data/spec/models/customer_inventory_spec.rb +47 -0
- data/spec/models/error_source_spec.rb +6 -0
- data/spec/models/event_spec.rb +3 -3
- data/spec/models/inline_response_200_26_spec.rb +6 -0
- data/spec/models/inline_response_200_29_spec.rb +47 -0
- data/spec/models/integration_event_spec.rb +53 -0
- data/spec/models/integration_state_spec.rb +6 -0
- data/spec/models/limit_config_spec.rb +1 -1
- data/spec/models/meta_spec.rb +6 -0
- data/spec/models/new_application_spec.rb +12 -6
- data/spec/models/new_event_spec.rb +3 -3
- data/spec/models/new_saml_connection_spec.rb +89 -0
- data/spec/models/{new_application_storage_spec.rb → notification_spec.rb} +8 -8
- data/spec/models/{application_storage_data_spec.rb → notifications_spec.rb} +6 -6
- data/spec/models/referral_rejection_reason_spec.rb +57 -0
- data/spec/models/{application_storage_tuple_spec.rb → saml_connection_metadata_spec.rb} +10 -22
- data/spec/models/saml_connection_spec.rb +101 -0
- data/spec/models/update_application_spec.rb +87 -0
- data/spec/models/update_user_spec.rb +6 -0
- data/spec/models/user_spec.rb +12 -0
- data/spec/models/webhook_spec.rb +0 -6
- data/talon_one-1.0.0.gem +0 -0
- data/talon_one-1.1.0.gem +0 -0
- data/talon_one-1.1.1.gem +0 -0
- data/talon_one-1.1.2.gem +0 -0
- data/talon_one-1.2.0.gem +0 -0
- data/talon_one-1.3.0.gem +0 -0
- data/talon_one.gemspec +1 -1
- metadata +74 -42
- data/docs/ApplicationStorage.md +0 -15
- data/docs/ApplicationStorageTuple.md +0 -13
- data/docs/NewApplicationStorage.md +0 -10
- data/docs/NewApplicationStorageData.md +0 -7
- data/docs/NewApplicationStorageTuple.md +0 -9
- data/fck.rb +0 -64
@@ -56,6 +56,9 @@ module TalonOne
|
|
56
56
|
# Total Number of loyalty programs inside the account
|
57
57
|
attr_accessor :loyalty_programs
|
58
58
|
|
59
|
+
# Total Number of active rules in the account
|
60
|
+
attr_accessor :active_rules
|
61
|
+
|
59
62
|
# Attribute mapping from ruby-style variable name to JSON key.
|
60
63
|
def self.attribute_map
|
61
64
|
{
|
@@ -72,7 +75,8 @@ module TalonOne
|
|
72
75
|
:'users' => :'users',
|
73
76
|
:'roles' => :'roles',
|
74
77
|
:'webhooks' => :'webhooks',
|
75
|
-
:'loyalty_programs' => :'loyaltyPrograms'
|
78
|
+
:'loyalty_programs' => :'loyaltyPrograms',
|
79
|
+
:'active_rules' => :'activeRules'
|
76
80
|
}
|
77
81
|
end
|
78
82
|
|
@@ -92,7 +96,8 @@ module TalonOne
|
|
92
96
|
:'users' => :'Integer',
|
93
97
|
:'roles' => :'Integer',
|
94
98
|
:'webhooks' => :'Integer',
|
95
|
-
:'loyalty_programs' => :'Integer'
|
99
|
+
:'loyalty_programs' => :'Integer',
|
100
|
+
:'active_rules' => :'Integer'
|
96
101
|
}
|
97
102
|
end
|
98
103
|
|
@@ -159,6 +164,10 @@ module TalonOne
|
|
159
164
|
if attributes.has_key?(:'loyaltyPrograms')
|
160
165
|
self.loyalty_programs = attributes[:'loyaltyPrograms']
|
161
166
|
end
|
167
|
+
|
168
|
+
if attributes.has_key?(:'activeRules')
|
169
|
+
self.active_rules = attributes[:'activeRules']
|
170
|
+
end
|
162
171
|
end
|
163
172
|
|
164
173
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -221,6 +230,10 @@ module TalonOne
|
|
221
230
|
invalid_properties.push('invalid value for "loyalty_programs", loyalty_programs cannot be nil.')
|
222
231
|
end
|
223
232
|
|
233
|
+
if @active_rules.nil?
|
234
|
+
invalid_properties.push('invalid value for "active_rules", active_rules cannot be nil.')
|
235
|
+
end
|
236
|
+
|
224
237
|
invalid_properties
|
225
238
|
end
|
226
239
|
|
@@ -241,6 +254,7 @@ module TalonOne
|
|
241
254
|
return false if @roles.nil?
|
242
255
|
return false if @webhooks.nil?
|
243
256
|
return false if @loyalty_programs.nil?
|
257
|
+
return false if @active_rules.nil?
|
244
258
|
true
|
245
259
|
end
|
246
260
|
|
@@ -262,7 +276,8 @@ module TalonOne
|
|
262
276
|
users == o.users &&
|
263
277
|
roles == o.roles &&
|
264
278
|
webhooks == o.webhooks &&
|
265
|
-
loyalty_programs == o.loyalty_programs
|
279
|
+
loyalty_programs == o.loyalty_programs &&
|
280
|
+
active_rules == o.active_rules
|
266
281
|
end
|
267
282
|
|
268
283
|
# @see the `==` method
|
@@ -274,7 +289,7 @@ module TalonOne
|
|
274
289
|
# Calculates hash code according to all attributes.
|
275
290
|
# @return [Fixnum] Hash code
|
276
291
|
def hash
|
277
|
-
[applications, active_campaigns, campaigns, coupons, active_coupons, expired_coupons, custom_attributes, referral_codes, active_referral_codes, expired_referral_codes, users, roles, webhooks, loyalty_programs].hash
|
292
|
+
[applications, active_campaigns, campaigns, coupons, active_coupons, expired_coupons, custom_attributes, referral_codes, active_referral_codes, expired_referral_codes, users, roles, webhooks, loyalty_programs, active_rules].hash
|
278
293
|
end
|
279
294
|
|
280
295
|
# Builds the object from hash
|
@@ -44,6 +44,9 @@ module TalonOne
|
|
44
44
|
# Total allowed api volume
|
45
45
|
attr_accessor :api_volume
|
46
46
|
|
47
|
+
# Total allowed active rulesets
|
48
|
+
attr_accessor :active_rules
|
49
|
+
|
47
50
|
# array of rulesets where webhook is used
|
48
51
|
attr_accessor :promotion_types
|
49
52
|
|
@@ -60,6 +63,7 @@ module TalonOne
|
|
60
63
|
:'webhooks' => :'webhooks',
|
61
64
|
:'users' => :'users',
|
62
65
|
:'api_volume' => :'apiVolume',
|
66
|
+
:'active_rules' => :'activeRules',
|
63
67
|
:'promotion_types' => :'promotionTypes'
|
64
68
|
}
|
65
69
|
end
|
@@ -77,6 +81,7 @@ module TalonOne
|
|
77
81
|
:'webhooks' => :'Integer',
|
78
82
|
:'users' => :'Integer',
|
79
83
|
:'api_volume' => :'Integer',
|
84
|
+
:'active_rules' => :'Integer',
|
80
85
|
:'promotion_types' => :'Array<String>'
|
81
86
|
}
|
82
87
|
end
|
@@ -129,6 +134,10 @@ module TalonOne
|
|
129
134
|
self.api_volume = attributes[:'apiVolume']
|
130
135
|
end
|
131
136
|
|
137
|
+
if attributes.has_key?(:'activeRules')
|
138
|
+
self.active_rules = attributes[:'activeRules']
|
139
|
+
end
|
140
|
+
|
132
141
|
if attributes.has_key?(:'promotionTypes')
|
133
142
|
if (value = attributes[:'promotionTypes']).is_a?(Array)
|
134
143
|
self.promotion_types = value
|
@@ -219,6 +228,7 @@ module TalonOne
|
|
219
228
|
webhooks == o.webhooks &&
|
220
229
|
users == o.users &&
|
221
230
|
api_volume == o.api_volume &&
|
231
|
+
active_rules == o.active_rules &&
|
222
232
|
promotion_types == o.promotion_types
|
223
233
|
end
|
224
234
|
|
@@ -231,7 +241,7 @@ module TalonOne
|
|
231
241
|
# Calculates hash code according to all attributes.
|
232
242
|
# @return [Fixnum] Hash code
|
233
243
|
def hash
|
234
|
-
[live_applications, sandbox_applications, active_campaigns, coupons, referral_codes, live_loyalty_programs, sandbox_loyalty_programs, webhooks, users, api_volume, promotion_types].hash
|
244
|
+
[live_applications, sandbox_applications, active_campaigns, coupons, referral_codes, live_loyalty_programs, sandbox_loyalty_programs, webhooks, users, api_volume, active_rules, promotion_types].hash
|
235
245
|
end
|
236
246
|
|
237
247
|
# Builds the object from hash
|
@@ -33,9 +33,6 @@ module TalonOne
|
|
33
33
|
# A longer description of the application.
|
34
34
|
attr_accessor :description
|
35
35
|
|
36
|
-
# Hex key for HMAC-signing API calls as coming from this application (16 hex digits)
|
37
|
-
attr_accessor :key
|
38
|
-
|
39
36
|
# A string containing an IANA timezone descriptor.
|
40
37
|
attr_accessor :timezone
|
41
38
|
|
@@ -51,6 +48,11 @@ module TalonOne
|
|
51
48
|
# Default limits for campaigns created in this application
|
52
49
|
attr_accessor :limits
|
53
50
|
|
51
|
+
attr_accessor :attributes_settings
|
52
|
+
|
53
|
+
# Hex key for HMAC-signing API calls as coming from this application (16 hex digits)
|
54
|
+
attr_accessor :key
|
55
|
+
|
54
56
|
# An array containing all the loyalty programs to which this application is subscribed
|
55
57
|
attr_accessor :loyalty_programs
|
56
58
|
|
@@ -85,12 +87,13 @@ module TalonOne
|
|
85
87
|
:'account_id' => :'accountId',
|
86
88
|
:'name' => :'name',
|
87
89
|
:'description' => :'description',
|
88
|
-
:'key' => :'key',
|
89
90
|
:'timezone' => :'timezone',
|
90
91
|
:'currency' => :'currency',
|
91
92
|
:'case_sensitivity' => :'caseSensitivity',
|
92
93
|
:'attributes' => :'attributes',
|
93
94
|
:'limits' => :'limits',
|
95
|
+
:'attributes_settings' => :'attributesSettings',
|
96
|
+
:'key' => :'key',
|
94
97
|
:'loyalty_programs' => :'loyaltyPrograms'
|
95
98
|
}
|
96
99
|
end
|
@@ -104,12 +107,13 @@ module TalonOne
|
|
104
107
|
:'account_id' => :'Integer',
|
105
108
|
:'name' => :'String',
|
106
109
|
:'description' => :'String',
|
107
|
-
:'key' => :'String',
|
108
110
|
:'timezone' => :'String',
|
109
111
|
:'currency' => :'String',
|
110
112
|
:'case_sensitivity' => :'String',
|
111
113
|
:'attributes' => :'Object',
|
112
114
|
:'limits' => :'Array<LimitConfig>',
|
115
|
+
:'attributes_settings' => :'AttributesSettings',
|
116
|
+
:'key' => :'String',
|
113
117
|
:'loyalty_programs' => :'Array<LoyaltyProgram>'
|
114
118
|
}
|
115
119
|
end
|
@@ -146,10 +150,6 @@ module TalonOne
|
|
146
150
|
self.description = attributes[:'description']
|
147
151
|
end
|
148
152
|
|
149
|
-
if attributes.has_key?(:'key')
|
150
|
-
self.key = attributes[:'key']
|
151
|
-
end
|
152
|
-
|
153
153
|
if attributes.has_key?(:'timezone')
|
154
154
|
self.timezone = attributes[:'timezone']
|
155
155
|
end
|
@@ -172,6 +172,14 @@ module TalonOne
|
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
175
|
+
if attributes.has_key?(:'attributesSettings')
|
176
|
+
self.attributes_settings = attributes[:'attributesSettings']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'key')
|
180
|
+
self.key = attributes[:'key']
|
181
|
+
end
|
182
|
+
|
175
183
|
if attributes.has_key?(:'loyaltyPrograms')
|
176
184
|
if (value = attributes[:'loyaltyPrograms']).is_a?(Array)
|
177
185
|
self.loyalty_programs = value
|
@@ -207,22 +215,6 @@ module TalonOne
|
|
207
215
|
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
208
216
|
end
|
209
217
|
|
210
|
-
if @key.nil?
|
211
|
-
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
212
|
-
end
|
213
|
-
|
214
|
-
if @key.to_s.length > 16
|
215
|
-
invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 16.')
|
216
|
-
end
|
217
|
-
|
218
|
-
if @key.to_s.length < 16
|
219
|
-
invalid_properties.push('invalid value for "key", the character length must be great than or equal to 16.')
|
220
|
-
end
|
221
|
-
|
222
|
-
if @key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
|
223
|
-
invalid_properties.push('invalid value for "key", must conform to the pattern /^[a-fA-F0-9]{16}$/.')
|
224
|
-
end
|
225
|
-
|
226
218
|
if @timezone.nil?
|
227
219
|
invalid_properties.push('invalid value for "timezone", timezone cannot be nil.')
|
228
220
|
end
|
@@ -239,6 +231,22 @@ module TalonOne
|
|
239
231
|
invalid_properties.push('invalid value for "currency", the character length must be great than or equal to 1.')
|
240
232
|
end
|
241
233
|
|
234
|
+
if @key.nil?
|
235
|
+
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
236
|
+
end
|
237
|
+
|
238
|
+
if @key.to_s.length > 16
|
239
|
+
invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 16.')
|
240
|
+
end
|
241
|
+
|
242
|
+
if @key.to_s.length < 16
|
243
|
+
invalid_properties.push('invalid value for "key", the character length must be great than or equal to 16.')
|
244
|
+
end
|
245
|
+
|
246
|
+
if @key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
|
247
|
+
invalid_properties.push('invalid value for "key", must conform to the pattern /^[a-fA-F0-9]{16}$/.')
|
248
|
+
end
|
249
|
+
|
242
250
|
if @loyalty_programs.nil?
|
243
251
|
invalid_properties.push('invalid value for "loyalty_programs", loyalty_programs cannot be nil.')
|
244
252
|
end
|
@@ -255,16 +263,16 @@ module TalonOne
|
|
255
263
|
return false if @account_id.nil?
|
256
264
|
return false if @name.nil?
|
257
265
|
return false if @name.to_s.length < 1
|
258
|
-
return false if @key.nil?
|
259
|
-
return false if @key.to_s.length > 16
|
260
|
-
return false if @key.to_s.length < 16
|
261
|
-
return false if @key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
|
262
266
|
return false if @timezone.nil?
|
263
267
|
return false if @timezone.to_s.length < 1
|
264
268
|
return false if @currency.nil?
|
265
269
|
return false if @currency.to_s.length < 1
|
266
270
|
case_sensitivity_validator = EnumAttributeValidator.new('String', ['sensitive', 'insensitive-uppercase', 'insensitive-lowercase'])
|
267
271
|
return false unless case_sensitivity_validator.valid?(@case_sensitivity)
|
272
|
+
return false if @key.nil?
|
273
|
+
return false if @key.to_s.length > 16
|
274
|
+
return false if @key.to_s.length < 16
|
275
|
+
return false if @key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
|
268
276
|
return false if @loyalty_programs.nil?
|
269
277
|
true
|
270
278
|
end
|
@@ -283,28 +291,6 @@ module TalonOne
|
|
283
291
|
@name = name
|
284
292
|
end
|
285
293
|
|
286
|
-
# Custom attribute writer method with validation
|
287
|
-
# @param [Object] key Value to be assigned
|
288
|
-
def key=(key)
|
289
|
-
if key.nil?
|
290
|
-
fail ArgumentError, 'key cannot be nil'
|
291
|
-
end
|
292
|
-
|
293
|
-
if key.to_s.length > 16
|
294
|
-
fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 16.'
|
295
|
-
end
|
296
|
-
|
297
|
-
if key.to_s.length < 16
|
298
|
-
fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 16.'
|
299
|
-
end
|
300
|
-
|
301
|
-
if key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
|
302
|
-
fail ArgumentError, 'invalid value for "key", must conform to the pattern /^[a-fA-F0-9]{16}$/.'
|
303
|
-
end
|
304
|
-
|
305
|
-
@key = key
|
306
|
-
end
|
307
|
-
|
308
294
|
# Custom attribute writer method with validation
|
309
295
|
# @param [Object] timezone Value to be assigned
|
310
296
|
def timezone=(timezone)
|
@@ -343,6 +329,28 @@ module TalonOne
|
|
343
329
|
@case_sensitivity = case_sensitivity
|
344
330
|
end
|
345
331
|
|
332
|
+
# Custom attribute writer method with validation
|
333
|
+
# @param [Object] key Value to be assigned
|
334
|
+
def key=(key)
|
335
|
+
if key.nil?
|
336
|
+
fail ArgumentError, 'key cannot be nil'
|
337
|
+
end
|
338
|
+
|
339
|
+
if key.to_s.length > 16
|
340
|
+
fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 16.'
|
341
|
+
end
|
342
|
+
|
343
|
+
if key.to_s.length < 16
|
344
|
+
fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 16.'
|
345
|
+
end
|
346
|
+
|
347
|
+
if key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
|
348
|
+
fail ArgumentError, 'invalid value for "key", must conform to the pattern /^[a-fA-F0-9]{16}$/.'
|
349
|
+
end
|
350
|
+
|
351
|
+
@key = key
|
352
|
+
end
|
353
|
+
|
346
354
|
# Checks equality by comparing each attribute.
|
347
355
|
# @param [Object] Object to be compared
|
348
356
|
def ==(o)
|
@@ -354,12 +362,13 @@ module TalonOne
|
|
354
362
|
account_id == o.account_id &&
|
355
363
|
name == o.name &&
|
356
364
|
description == o.description &&
|
357
|
-
key == o.key &&
|
358
365
|
timezone == o.timezone &&
|
359
366
|
currency == o.currency &&
|
360
367
|
case_sensitivity == o.case_sensitivity &&
|
361
368
|
attributes == o.attributes &&
|
362
369
|
limits == o.limits &&
|
370
|
+
attributes_settings == o.attributes_settings &&
|
371
|
+
key == o.key &&
|
363
372
|
loyalty_programs == o.loyalty_programs
|
364
373
|
end
|
365
374
|
|
@@ -372,7 +381,7 @@ module TalonOne
|
|
372
381
|
# Calculates hash code according to all attributes.
|
373
382
|
# @return [Fixnum] Hash code
|
374
383
|
def hash
|
375
|
-
[id, created, modified, account_id, name, description,
|
384
|
+
[id, created, modified, account_id, name, description, timezone, currency, case_sensitivity, attributes, limits, attributes_settings, key, loyalty_programs].hash
|
376
385
|
end
|
377
386
|
|
378
387
|
# Builds the object from hash
|
@@ -151,10 +151,6 @@ module TalonOne
|
|
151
151
|
invalid_properties.push('invalid value for "total_sales", total_sales cannot be nil.')
|
152
152
|
end
|
153
153
|
|
154
|
-
if @loyalty_memberships.nil?
|
155
|
-
invalid_properties.push('invalid value for "loyalty_memberships", loyalty_memberships cannot be nil.')
|
156
|
-
end
|
157
|
-
|
158
154
|
if @last_activity.nil?
|
159
155
|
invalid_properties.push('invalid value for "last_activity", last_activity cannot be nil.')
|
160
156
|
end
|
@@ -172,7 +168,6 @@ module TalonOne
|
|
172
168
|
return false if @account_id.nil?
|
173
169
|
return false if @closed_sessions.nil?
|
174
170
|
return false if @total_sales.nil?
|
175
|
-
return false if @loyalty_memberships.nil?
|
176
171
|
return false if @last_activity.nil?
|
177
172
|
true
|
178
173
|
end
|
@@ -33,7 +33,7 @@ module TalonOne
|
|
33
33
|
# Any coupon code entered.
|
34
34
|
attr_accessor :coupon
|
35
35
|
|
36
|
-
# Any
|
36
|
+
# Any referral code entered.
|
37
37
|
attr_accessor :referral
|
38
38
|
|
39
39
|
# Indicating if the customer session is in progress (\"open\"), \"closed\", or \"cancelled\".
|
@@ -45,6 +45,9 @@ module TalonOne
|
|
45
45
|
# A map of labelled discount values, in the same currency as the session.
|
46
46
|
attr_accessor :discounts
|
47
47
|
|
48
|
+
# The total sum of the session before any discounts applied.
|
49
|
+
attr_accessor :total
|
50
|
+
|
48
51
|
# Arbitrary properties associated with this item
|
49
52
|
attr_accessor :attributes
|
50
53
|
|
@@ -83,6 +86,7 @@ module TalonOne
|
|
83
86
|
:'state' => :'state',
|
84
87
|
:'cart_items' => :'cartItems',
|
85
88
|
:'discounts' => :'discounts',
|
89
|
+
:'total' => :'total',
|
86
90
|
:'attributes' => :'attributes'
|
87
91
|
}
|
88
92
|
end
|
@@ -100,6 +104,7 @@ module TalonOne
|
|
100
104
|
:'state' => :'String',
|
101
105
|
:'cart_items' => :'Array<CartItem>',
|
102
106
|
:'discounts' => :'Hash<String, Float>',
|
107
|
+
:'total' => :'Float',
|
103
108
|
:'attributes' => :'Object'
|
104
109
|
}
|
105
110
|
end
|
@@ -156,6 +161,10 @@ module TalonOne
|
|
156
161
|
end
|
157
162
|
end
|
158
163
|
|
164
|
+
if attributes.has_key?(:'total')
|
165
|
+
self.total = attributes[:'total']
|
166
|
+
end
|
167
|
+
|
159
168
|
if attributes.has_key?(:'attributes')
|
160
169
|
self.attributes = attributes[:'attributes']
|
161
170
|
end
|
@@ -246,6 +255,7 @@ module TalonOne
|
|
246
255
|
state == o.state &&
|
247
256
|
cart_items == o.cart_items &&
|
248
257
|
discounts == o.discounts &&
|
258
|
+
total == o.total &&
|
249
259
|
attributes == o.attributes
|
250
260
|
end
|
251
261
|
|
@@ -258,7 +268,7 @@ module TalonOne
|
|
258
268
|
# Calculates hash code according to all attributes.
|
259
269
|
# @return [Fixnum] Hash code
|
260
270
|
def hash
|
261
|
-
[id, created, application_id, profile_id, integration_id, coupon, referral, state, cart_items, discounts, attributes].hash
|
271
|
+
[id, created, application_id, profile_id, integration_id, coupon, referral, state, cart_items, discounts, total, attributes].hash
|
262
272
|
end
|
263
273
|
|
264
274
|
# Builds the object from hash
|
@@ -47,12 +47,6 @@ module TalonOne
|
|
47
47
|
# Whether or not this attribute can be edited.
|
48
48
|
attr_accessor :editable
|
49
49
|
|
50
|
-
# Indicates whether this attribute is in use. If in use only title can be changed and other operations are prohibited.
|
51
|
-
attr_accessor :locked
|
52
|
-
|
53
|
-
# array of rulesets where the attribute is used
|
54
|
-
attr_accessor :used_at
|
55
|
-
|
56
50
|
class EnumAttributeValidator
|
57
51
|
attr_reader :datatype
|
58
52
|
attr_reader :allowable_values
|
@@ -88,9 +82,7 @@ module TalonOne
|
|
88
82
|
:'type' => :'type',
|
89
83
|
:'description' => :'description',
|
90
84
|
:'suggestions' => :'suggestions',
|
91
|
-
:'editable' => :'editable'
|
92
|
-
:'locked' => :'locked',
|
93
|
-
:'used_at' => :'usedAt'
|
85
|
+
:'editable' => :'editable'
|
94
86
|
}
|
95
87
|
end
|
96
88
|
|
@@ -107,9 +99,7 @@ module TalonOne
|
|
107
99
|
:'type' => :'String',
|
108
100
|
:'description' => :'String',
|
109
101
|
:'suggestions' => :'Array<String>',
|
110
|
-
:'editable' => :'BOOLEAN'
|
111
|
-
:'locked' => :'BOOLEAN',
|
112
|
-
:'used_at' => :'Array<String>'
|
102
|
+
:'editable' => :'BOOLEAN'
|
113
103
|
}
|
114
104
|
end
|
115
105
|
|
@@ -166,18 +156,6 @@ module TalonOne
|
|
166
156
|
if attributes.has_key?(:'editable')
|
167
157
|
self.editable = attributes[:'editable']
|
168
158
|
end
|
169
|
-
|
170
|
-
if attributes.has_key?(:'locked')
|
171
|
-
self.locked = attributes[:'locked']
|
172
|
-
else
|
173
|
-
self.locked = false
|
174
|
-
end
|
175
|
-
|
176
|
-
if attributes.has_key?(:'usedAt')
|
177
|
-
if (value = attributes[:'usedAt']).is_a?(Array)
|
178
|
-
self.used_at = value
|
179
|
-
end
|
180
|
-
end
|
181
159
|
end
|
182
160
|
|
183
161
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -224,14 +202,6 @@ module TalonOne
|
|
224
202
|
invalid_properties.push('invalid value for "editable", editable cannot be nil.')
|
225
203
|
end
|
226
204
|
|
227
|
-
if @locked.nil?
|
228
|
-
invalid_properties.push('invalid value for "locked", locked cannot be nil.')
|
229
|
-
end
|
230
|
-
|
231
|
-
if @used_at.nil?
|
232
|
-
invalid_properties.push('invalid value for "used_at", used_at cannot be nil.')
|
233
|
-
end
|
234
|
-
|
235
205
|
invalid_properties
|
236
206
|
end
|
237
207
|
|
@@ -252,8 +222,6 @@ module TalonOne
|
|
252
222
|
return false if @description.nil?
|
253
223
|
return false if @suggestions.nil?
|
254
224
|
return false if @editable.nil?
|
255
|
-
return false if @locked.nil?
|
256
|
-
return false if @used_at.nil?
|
257
225
|
true
|
258
226
|
end
|
259
227
|
|
@@ -292,9 +260,7 @@ module TalonOne
|
|
292
260
|
type == o.type &&
|
293
261
|
description == o.description &&
|
294
262
|
suggestions == o.suggestions &&
|
295
|
-
editable == o.editable
|
296
|
-
locked == o.locked &&
|
297
|
-
used_at == o.used_at
|
263
|
+
editable == o.editable
|
298
264
|
end
|
299
265
|
|
300
266
|
# @see the `==` method
|
@@ -306,7 +272,7 @@ module TalonOne
|
|
306
272
|
# Calculates hash code according to all attributes.
|
307
273
|
# @return [Fixnum] Hash code
|
308
274
|
def hash
|
309
|
-
[id, created, account_id, entity, event_type, name, title, type, description, suggestions, editable
|
275
|
+
[id, created, account_id, entity, event_type, name, title, type, description, suggestions, editable].hash
|
310
276
|
end
|
311
277
|
|
312
278
|
# Builds the object from hash
|