talon_one 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -6
  3. data/docs/AccountAnalytics.md +1 -0
  4. data/docs/AccountLimits.md +1 -0
  5. data/docs/Application.md +1 -0
  6. data/docs/AttributesMandatory.md +9 -0
  7. data/docs/AttributesSettings.md +8 -0
  8. data/docs/BaseSamlConnection.md +15 -0
  9. data/docs/CampaignAnalytics.md +9 -3
  10. data/docs/CampaignCopy.md +4 -0
  11. data/docs/Change.md +2 -2
  12. data/docs/CustomerInventory.md +9 -0
  13. data/docs/InlineResponse20020.md +1 -1
  14. data/docs/InlineResponse20021.md +1 -1
  15. data/docs/InlineResponse20022.md +1 -1
  16. data/docs/InlineResponse20023.md +1 -1
  17. data/docs/InlineResponse20024.md +1 -1
  18. data/docs/InlineResponse20025.md +2 -3
  19. data/docs/InlineResponse20026.md +3 -2
  20. data/docs/InlineResponse20027.md +1 -1
  21. data/docs/InlineResponse20028.md +1 -1
  22. data/docs/InlineResponse20029.md +9 -0
  23. data/docs/IntegrationApi.md +66 -0
  24. data/docs/ManagementApi.md +162 -101
  25. data/docs/NewApplication.md +1 -0
  26. data/docs/NewSamlConnection.md +3 -2
  27. data/docs/SamlConnection.md +4 -5
  28. data/docs/SamlConnectionMetadata.md +11 -0
  29. data/docs/UpdateApplication.md +1 -0
  30. data/lib/talon_one.rb +6 -0
  31. data/lib/talon_one/api/integration_api.rb +60 -0
  32. data/lib/talon_one/api/management_api.rb +177 -119
  33. data/lib/talon_one/models/account_analytics.rb +19 -4
  34. data/lib/talon_one/models/account_limits.rb +11 -1
  35. data/lib/talon_one/models/application.rb +10 -1
  36. data/lib/talon_one/models/attributes_mandatory.rb +199 -0
  37. data/lib/talon_one/models/attributes_settings.rb +184 -0
  38. data/lib/talon_one/models/base_saml_connection.rb +336 -0
  39. data/lib/talon_one/models/campaign_analytics.rb +94 -4
  40. data/lib/talon_one/models/campaign_copy.rb +46 -4
  41. data/lib/talon_one/models/change.rb +2 -2
  42. data/lib/talon_one/models/customer_inventory.rb +194 -0
  43. data/lib/talon_one/models/inline_response_200_20.rb +1 -1
  44. data/lib/talon_one/models/inline_response_200_21.rb +1 -1
  45. data/lib/talon_one/models/inline_response_200_22.rb +1 -1
  46. data/lib/talon_one/models/inline_response_200_23.rb +1 -1
  47. data/lib/talon_one/models/inline_response_200_24.rb +1 -1
  48. data/lib/talon_one/models/inline_response_200_25.rb +7 -11
  49. data/lib/talon_one/models/inline_response_200_26.rb +11 -7
  50. data/lib/talon_one/models/inline_response_200_27.rb +1 -1
  51. data/lib/talon_one/models/inline_response_200_28.rb +1 -1
  52. data/lib/talon_one/models/inline_response_200_29.rb +204 -0
  53. data/lib/talon_one/models/new_application.rb +10 -1
  54. data/lib/talon_one/models/new_saml_connection.rb +58 -43
  55. data/lib/talon_one/models/saml_connection.rb +45 -78
  56. data/lib/talon_one/models/saml_connection_metadata.rb +271 -0
  57. data/lib/talon_one/models/update_application.rb +13 -4
  58. data/lib/talon_one/version.rb +1 -1
  59. data/spec/api/integration_api_spec.rb +14 -0
  60. data/spec/api/management_api_spec.rb +50 -36
  61. data/spec/models/account_analytics_spec.rb +6 -0
  62. data/spec/models/account_limits_spec.rb +6 -0
  63. data/spec/models/application_spec.rb +6 -0
  64. data/spec/models/attributes_mandatory_spec.rb +47 -0
  65. data/spec/models/attributes_settings_spec.rb +41 -0
  66. data/spec/models/base_saml_connection_spec.rb +83 -0
  67. data/spec/models/campaign_analytics_spec.rb +36 -0
  68. data/spec/models/campaign_copy_spec.rb +24 -0
  69. data/spec/models/customer_inventory_spec.rb +47 -0
  70. data/spec/models/inline_response_200_25_spec.rb +0 -6
  71. data/spec/models/inline_response_200_26_spec.rb +6 -0
  72. data/spec/models/inline_response_200_29_spec.rb +47 -0
  73. data/spec/models/new_application_spec.rb +6 -0
  74. data/spec/models/new_saml_connection_spec.rb +13 -7
  75. data/spec/models/saml_connection_metadata_spec.rb +59 -0
  76. data/spec/models/saml_connection_spec.rb +9 -15
  77. data/spec/models/update_application_spec.rb +6 -0
  78. data/talon_one-1.3.0.gem +0 -0
  79. metadata +27 -2
@@ -0,0 +1,336 @@
1
+ =begin
2
+ #Talon.One API
3
+
4
+ #The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.7
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TalonOne
16
+ class BaseSamlConnection
17
+ # The ID of the account that owns this entity.
18
+ attr_accessor :account_id
19
+
20
+ # ID of the SAML service.
21
+ attr_accessor :name
22
+
23
+ # Determines if this SAML connection active.
24
+ attr_accessor :enabled
25
+
26
+ # Identity Provider Entity ID.
27
+ attr_accessor :issuer
28
+
29
+ # Single Sign-On URL.
30
+ attr_accessor :sign_on_url
31
+
32
+ # Single Sign-Out URL.
33
+ attr_accessor :sign_out_url
34
+
35
+ # Metadata URL.
36
+ attr_accessor :metadata_url
37
+
38
+ # The application-defined unique identifier that is the intended audience of the SAML assertion. This is most often the SP Entity ID of your application. When not specified, the ACS URL will be used.
39
+ attr_accessor :audience_uri
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'account_id' => :'accountId',
45
+ :'name' => :'name',
46
+ :'enabled' => :'enabled',
47
+ :'issuer' => :'issuer',
48
+ :'sign_on_url' => :'signOnURL',
49
+ :'sign_out_url' => :'signOutURL',
50
+ :'metadata_url' => :'metadataURL',
51
+ :'audience_uri' => :'audienceURI'
52
+ }
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.swagger_types
57
+ {
58
+ :'account_id' => :'Integer',
59
+ :'name' => :'String',
60
+ :'enabled' => :'BOOLEAN',
61
+ :'issuer' => :'String',
62
+ :'sign_on_url' => :'String',
63
+ :'sign_out_url' => :'String',
64
+ :'metadata_url' => :'String',
65
+ :'audience_uri' => :'String'
66
+ }
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ return unless attributes.is_a?(Hash)
73
+
74
+ # convert string to symbol for hash key
75
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
76
+
77
+ if attributes.has_key?(:'accountId')
78
+ self.account_id = attributes[:'accountId']
79
+ end
80
+
81
+ if attributes.has_key?(:'name')
82
+ self.name = attributes[:'name']
83
+ end
84
+
85
+ if attributes.has_key?(:'enabled')
86
+ self.enabled = attributes[:'enabled']
87
+ end
88
+
89
+ if attributes.has_key?(:'issuer')
90
+ self.issuer = attributes[:'issuer']
91
+ end
92
+
93
+ if attributes.has_key?(:'signOnURL')
94
+ self.sign_on_url = attributes[:'signOnURL']
95
+ end
96
+
97
+ if attributes.has_key?(:'signOutURL')
98
+ self.sign_out_url = attributes[:'signOutURL']
99
+ end
100
+
101
+ if attributes.has_key?(:'metadataURL')
102
+ self.metadata_url = attributes[:'metadataURL']
103
+ end
104
+
105
+ if attributes.has_key?(:'audienceURI')
106
+ self.audience_uri = attributes[:'audienceURI']
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ invalid_properties = Array.new
114
+ if @account_id.nil?
115
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
116
+ end
117
+
118
+ if @name.nil?
119
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
120
+ end
121
+
122
+ if @name.to_s.length < 1
123
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
124
+ end
125
+
126
+ if @enabled.nil?
127
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
128
+ end
129
+
130
+ if @issuer.nil?
131
+ invalid_properties.push('invalid value for "issuer", issuer cannot be nil.')
132
+ end
133
+
134
+ if @issuer.to_s.length < 1
135
+ invalid_properties.push('invalid value for "issuer", the character length must be great than or equal to 1.')
136
+ end
137
+
138
+ if @sign_on_url.nil?
139
+ invalid_properties.push('invalid value for "sign_on_url", sign_on_url cannot be nil.')
140
+ end
141
+
142
+ if @sign_on_url.to_s.length < 1
143
+ invalid_properties.push('invalid value for "sign_on_url", the character length must be great than or equal to 1.')
144
+ end
145
+
146
+ invalid_properties
147
+ end
148
+
149
+ # Check to see if the all the properties in the model are valid
150
+ # @return true if the model is valid
151
+ def valid?
152
+ return false if @account_id.nil?
153
+ return false if @name.nil?
154
+ return false if @name.to_s.length < 1
155
+ return false if @enabled.nil?
156
+ return false if @issuer.nil?
157
+ return false if @issuer.to_s.length < 1
158
+ return false if @sign_on_url.nil?
159
+ return false if @sign_on_url.to_s.length < 1
160
+ true
161
+ end
162
+
163
+ # Custom attribute writer method with validation
164
+ # @param [Object] name Value to be assigned
165
+ def name=(name)
166
+ if name.nil?
167
+ fail ArgumentError, 'name cannot be nil'
168
+ end
169
+
170
+ if name.to_s.length < 1
171
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
172
+ end
173
+
174
+ @name = name
175
+ end
176
+
177
+ # Custom attribute writer method with validation
178
+ # @param [Object] issuer Value to be assigned
179
+ def issuer=(issuer)
180
+ if issuer.nil?
181
+ fail ArgumentError, 'issuer cannot be nil'
182
+ end
183
+
184
+ if issuer.to_s.length < 1
185
+ fail ArgumentError, 'invalid value for "issuer", the character length must be great than or equal to 1.'
186
+ end
187
+
188
+ @issuer = issuer
189
+ end
190
+
191
+ # Custom attribute writer method with validation
192
+ # @param [Object] sign_on_url Value to be assigned
193
+ def sign_on_url=(sign_on_url)
194
+ if sign_on_url.nil?
195
+ fail ArgumentError, 'sign_on_url cannot be nil'
196
+ end
197
+
198
+ if sign_on_url.to_s.length < 1
199
+ fail ArgumentError, 'invalid value for "sign_on_url", the character length must be great than or equal to 1.'
200
+ end
201
+
202
+ @sign_on_url = sign_on_url
203
+ end
204
+
205
+ # Checks equality by comparing each attribute.
206
+ # @param [Object] Object to be compared
207
+ def ==(o)
208
+ return true if self.equal?(o)
209
+ self.class == o.class &&
210
+ account_id == o.account_id &&
211
+ name == o.name &&
212
+ enabled == o.enabled &&
213
+ issuer == o.issuer &&
214
+ sign_on_url == o.sign_on_url &&
215
+ sign_out_url == o.sign_out_url &&
216
+ metadata_url == o.metadata_url &&
217
+ audience_uri == o.audience_uri
218
+ end
219
+
220
+ # @see the `==` method
221
+ # @param [Object] Object to be compared
222
+ def eql?(o)
223
+ self == o
224
+ end
225
+
226
+ # Calculates hash code according to all attributes.
227
+ # @return [Fixnum] Hash code
228
+ def hash
229
+ [account_id, name, enabled, issuer, sign_on_url, sign_out_url, metadata_url, audience_uri].hash
230
+ end
231
+
232
+ # Builds the object from hash
233
+ # @param [Hash] attributes Model attributes in the form of hash
234
+ # @return [Object] Returns the model itself
235
+ def build_from_hash(attributes)
236
+ return nil unless attributes.is_a?(Hash)
237
+ self.class.swagger_types.each_pair do |key, type|
238
+ if type =~ /\AArray<(.*)>/i
239
+ # check to ensure the input is an array given that the the attribute
240
+ # is documented as an array but the input is not
241
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
242
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
243
+ end
244
+ elsif !attributes[self.class.attribute_map[key]].nil?
245
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
246
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
247
+ end
248
+
249
+ self
250
+ end
251
+
252
+ # Deserializes the data based on type
253
+ # @param string type Data type
254
+ # @param string value Value to be deserialized
255
+ # @return [Object] Deserialized data
256
+ def _deserialize(type, value)
257
+ case type.to_sym
258
+ when :DateTime
259
+ DateTime.parse(value)
260
+ when :Date
261
+ Date.parse(value)
262
+ when :String
263
+ value.to_s
264
+ when :Integer
265
+ value.to_i
266
+ when :Float
267
+ value.to_f
268
+ when :BOOLEAN
269
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
270
+ true
271
+ else
272
+ false
273
+ end
274
+ when :Object
275
+ # generic object (usually a Hash), return directly
276
+ value
277
+ when /\AArray<(?<inner_type>.+)>\z/
278
+ inner_type = Regexp.last_match[:inner_type]
279
+ value.map { |v| _deserialize(inner_type, v) }
280
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
281
+ k_type = Regexp.last_match[:k_type]
282
+ v_type = Regexp.last_match[:v_type]
283
+ {}.tap do |hash|
284
+ value.each do |k, v|
285
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
286
+ end
287
+ end
288
+ else # model
289
+ temp_model = TalonOne.const_get(type).new
290
+ temp_model.build_from_hash(value)
291
+ end
292
+ end
293
+
294
+ # Returns the string representation of the object
295
+ # @return [String] String presentation of the object
296
+ def to_s
297
+ to_hash.to_s
298
+ end
299
+
300
+ # to_body is an alias to to_hash (backward compatibility)
301
+ # @return [Hash] Returns the object in the form of hash
302
+ def to_body
303
+ to_hash
304
+ end
305
+
306
+ # Returns the object in the form of hash
307
+ # @return [Hash] Returns the object in the form of hash
308
+ def to_hash
309
+ hash = {}
310
+ self.class.attribute_map.each_pair do |attr, param|
311
+ value = self.send(attr)
312
+ next if value.nil?
313
+ hash[param] = _to_hash(value)
314
+ end
315
+ hash
316
+ end
317
+
318
+ # Outputs non-array value in the form of hash
319
+ # For object, use to_hash. Otherwise, just return the value
320
+ # @param [Object] value Any valid value
321
+ # @return [Hash] Returns the value in the form of hash
322
+ def _to_hash(value)
323
+ if value.is_a?(Array)
324
+ value.compact.map { |v| _to_hash(v) }
325
+ elsif value.is_a?(Hash)
326
+ {}.tap do |hash|
327
+ value.each { |k, v| hash[k] = _to_hash(v) }
328
+ end
329
+ elsif value.respond_to? :to_hash
330
+ value.to_hash
331
+ else
332
+ value
333
+ end
334
+ end
335
+ end
336
+ end
@@ -17,30 +17,48 @@ module TalonOne
17
17
  class CampaignAnalytics
18
18
  attr_accessor :date
19
19
 
20
- # Amount of revenue in this campaign.
20
+ # Amount of revenue in this campaign (for coupon or discount sessions).
21
21
  attr_accessor :campaign_revenue
22
22
 
23
- # Amount of revenue in this campaign since it began.
23
+ # Amount of revenue in this campaign since it began (for coupon or discount sessions).
24
24
  attr_accessor :total_campaign_revenue
25
25
 
26
+ # Amount of refunds in this campaign (for coupon or discount sessions).
27
+ attr_accessor :campaign_refund
28
+
29
+ # Amount of refunds in this campaign since it began (for coupon or discount sessions).
30
+ attr_accessor :total_campaign_refund
31
+
26
32
  # Amount of cost caused by discounts given in the campaign.
27
33
  attr_accessor :campaign_discount_costs
28
34
 
29
35
  # Amount of cost caused by discounts given in the campaign since it began.
30
36
  attr_accessor :total_campaign_discount_costs
31
37
 
38
+ # Amount of discounts rolledback due to refund in the campaign.
39
+ attr_accessor :campaign_refunded_discounts
40
+
41
+ # Amount of discounts rolledback due to refund in the campaign since it began.
42
+ attr_accessor :total_campaign_refunded_discounts
43
+
32
44
  # Amount of free items given in the campaign.
33
45
  attr_accessor :campaign_free_items
34
46
 
35
47
  # Amount of free items given in the campaign since it began.
36
48
  attr_accessor :total_campaign_free_items
37
49
 
38
- # Number of coupon redemptions in the campaign (only accepted referrals on sessions that were closed are considered).
50
+ # Number of coupon redemptions in the campaign.
39
51
  attr_accessor :coupon_redemptions
40
52
 
41
53
  # Number of coupon redemptions in the campaign since it began.
42
54
  attr_accessor :total_coupon_redemptions
43
55
 
56
+ # Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign.
57
+ attr_accessor :coupon_rolledback_redemptions
58
+
59
+ # Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign since it began.
60
+ attr_accessor :total_coupon_rolledback_redemptions
61
+
44
62
  # Number of referral redemptions in the campaign.
45
63
  attr_accessor :referral_redemptions
46
64
 
@@ -65,12 +83,18 @@ module TalonOne
65
83
  :'date' => :'date',
66
84
  :'campaign_revenue' => :'campaignRevenue',
67
85
  :'total_campaign_revenue' => :'totalCampaignRevenue',
86
+ :'campaign_refund' => :'campaignRefund',
87
+ :'total_campaign_refund' => :'totalCampaignRefund',
68
88
  :'campaign_discount_costs' => :'campaignDiscountCosts',
69
89
  :'total_campaign_discount_costs' => :'totalCampaignDiscountCosts',
90
+ :'campaign_refunded_discounts' => :'campaignRefundedDiscounts',
91
+ :'total_campaign_refunded_discounts' => :'totalCampaignRefundedDiscounts',
70
92
  :'campaign_free_items' => :'campaignFreeItems',
71
93
  :'total_campaign_free_items' => :'totalCampaignFreeItems',
72
94
  :'coupon_redemptions' => :'couponRedemptions',
73
95
  :'total_coupon_redemptions' => :'totalCouponRedemptions',
96
+ :'coupon_rolledback_redemptions' => :'couponRolledbackRedemptions',
97
+ :'total_coupon_rolledback_redemptions' => :'totalCouponRolledbackRedemptions',
74
98
  :'referral_redemptions' => :'referralRedemptions',
75
99
  :'total_referral_redemptions' => :'totalReferralRedemptions',
76
100
  :'coupons_created' => :'couponsCreated',
@@ -86,12 +110,18 @@ module TalonOne
86
110
  :'date' => :'DateTime',
87
111
  :'campaign_revenue' => :'Float',
88
112
  :'total_campaign_revenue' => :'Float',
113
+ :'campaign_refund' => :'Float',
114
+ :'total_campaign_refund' => :'Float',
89
115
  :'campaign_discount_costs' => :'Float',
90
116
  :'total_campaign_discount_costs' => :'Float',
117
+ :'campaign_refunded_discounts' => :'Float',
118
+ :'total_campaign_refunded_discounts' => :'Float',
91
119
  :'campaign_free_items' => :'Integer',
92
120
  :'total_campaign_free_items' => :'Integer',
93
121
  :'coupon_redemptions' => :'Integer',
94
122
  :'total_coupon_redemptions' => :'Integer',
123
+ :'coupon_rolledback_redemptions' => :'Integer',
124
+ :'total_coupon_rolledback_redemptions' => :'Integer',
95
125
  :'referral_redemptions' => :'Integer',
96
126
  :'total_referral_redemptions' => :'Integer',
97
127
  :'coupons_created' => :'Integer',
@@ -121,6 +151,14 @@ module TalonOne
121
151
  self.total_campaign_revenue = attributes[:'totalCampaignRevenue']
122
152
  end
123
153
 
154
+ if attributes.has_key?(:'campaignRefund')
155
+ self.campaign_refund = attributes[:'campaignRefund']
156
+ end
157
+
158
+ if attributes.has_key?(:'totalCampaignRefund')
159
+ self.total_campaign_refund = attributes[:'totalCampaignRefund']
160
+ end
161
+
124
162
  if attributes.has_key?(:'campaignDiscountCosts')
125
163
  self.campaign_discount_costs = attributes[:'campaignDiscountCosts']
126
164
  end
@@ -129,6 +167,14 @@ module TalonOne
129
167
  self.total_campaign_discount_costs = attributes[:'totalCampaignDiscountCosts']
130
168
  end
131
169
 
170
+ if attributes.has_key?(:'campaignRefundedDiscounts')
171
+ self.campaign_refunded_discounts = attributes[:'campaignRefundedDiscounts']
172
+ end
173
+
174
+ if attributes.has_key?(:'totalCampaignRefundedDiscounts')
175
+ self.total_campaign_refunded_discounts = attributes[:'totalCampaignRefundedDiscounts']
176
+ end
177
+
132
178
  if attributes.has_key?(:'campaignFreeItems')
133
179
  self.campaign_free_items = attributes[:'campaignFreeItems']
134
180
  end
@@ -145,6 +191,14 @@ module TalonOne
145
191
  self.total_coupon_redemptions = attributes[:'totalCouponRedemptions']
146
192
  end
147
193
 
194
+ if attributes.has_key?(:'couponRolledbackRedemptions')
195
+ self.coupon_rolledback_redemptions = attributes[:'couponRolledbackRedemptions']
196
+ end
197
+
198
+ if attributes.has_key?(:'totalCouponRolledbackRedemptions')
199
+ self.total_coupon_rolledback_redemptions = attributes[:'totalCouponRolledbackRedemptions']
200
+ end
201
+
148
202
  if attributes.has_key?(:'referralRedemptions')
149
203
  self.referral_redemptions = attributes[:'referralRedemptions']
150
204
  end
@@ -186,6 +240,14 @@ module TalonOne
186
240
  invalid_properties.push('invalid value for "total_campaign_revenue", total_campaign_revenue cannot be nil.')
187
241
  end
188
242
 
243
+ if @campaign_refund.nil?
244
+ invalid_properties.push('invalid value for "campaign_refund", campaign_refund cannot be nil.')
245
+ end
246
+
247
+ if @total_campaign_refund.nil?
248
+ invalid_properties.push('invalid value for "total_campaign_refund", total_campaign_refund cannot be nil.')
249
+ end
250
+
189
251
  if @campaign_discount_costs.nil?
190
252
  invalid_properties.push('invalid value for "campaign_discount_costs", campaign_discount_costs cannot be nil.')
191
253
  end
@@ -194,6 +256,14 @@ module TalonOne
194
256
  invalid_properties.push('invalid value for "total_campaign_discount_costs", total_campaign_discount_costs cannot be nil.')
195
257
  end
196
258
 
259
+ if @campaign_refunded_discounts.nil?
260
+ invalid_properties.push('invalid value for "campaign_refunded_discounts", campaign_refunded_discounts cannot be nil.')
261
+ end
262
+
263
+ if @total_campaign_refunded_discounts.nil?
264
+ invalid_properties.push('invalid value for "total_campaign_refunded_discounts", total_campaign_refunded_discounts cannot be nil.')
265
+ end
266
+
197
267
  if @campaign_free_items.nil?
198
268
  invalid_properties.push('invalid value for "campaign_free_items", campaign_free_items cannot be nil.')
199
269
  end
@@ -210,6 +280,14 @@ module TalonOne
210
280
  invalid_properties.push('invalid value for "total_coupon_redemptions", total_coupon_redemptions cannot be nil.')
211
281
  end
212
282
 
283
+ if @coupon_rolledback_redemptions.nil?
284
+ invalid_properties.push('invalid value for "coupon_rolledback_redemptions", coupon_rolledback_redemptions cannot be nil.')
285
+ end
286
+
287
+ if @total_coupon_rolledback_redemptions.nil?
288
+ invalid_properties.push('invalid value for "total_coupon_rolledback_redemptions", total_coupon_rolledback_redemptions cannot be nil.')
289
+ end
290
+
213
291
  if @referral_redemptions.nil?
214
292
  invalid_properties.push('invalid value for "referral_redemptions", referral_redemptions cannot be nil.')
215
293
  end
@@ -243,12 +321,18 @@ module TalonOne
243
321
  return false if @date.nil?
244
322
  return false if @campaign_revenue.nil?
245
323
  return false if @total_campaign_revenue.nil?
324
+ return false if @campaign_refund.nil?
325
+ return false if @total_campaign_refund.nil?
246
326
  return false if @campaign_discount_costs.nil?
247
327
  return false if @total_campaign_discount_costs.nil?
328
+ return false if @campaign_refunded_discounts.nil?
329
+ return false if @total_campaign_refunded_discounts.nil?
248
330
  return false if @campaign_free_items.nil?
249
331
  return false if @total_campaign_free_items.nil?
250
332
  return false if @coupon_redemptions.nil?
251
333
  return false if @total_coupon_redemptions.nil?
334
+ return false if @coupon_rolledback_redemptions.nil?
335
+ return false if @total_coupon_rolledback_redemptions.nil?
252
336
  return false if @referral_redemptions.nil?
253
337
  return false if @total_referral_redemptions.nil?
254
338
  return false if @coupons_created.nil?
@@ -266,12 +350,18 @@ module TalonOne
266
350
  date == o.date &&
267
351
  campaign_revenue == o.campaign_revenue &&
268
352
  total_campaign_revenue == o.total_campaign_revenue &&
353
+ campaign_refund == o.campaign_refund &&
354
+ total_campaign_refund == o.total_campaign_refund &&
269
355
  campaign_discount_costs == o.campaign_discount_costs &&
270
356
  total_campaign_discount_costs == o.total_campaign_discount_costs &&
357
+ campaign_refunded_discounts == o.campaign_refunded_discounts &&
358
+ total_campaign_refunded_discounts == o.total_campaign_refunded_discounts &&
271
359
  campaign_free_items == o.campaign_free_items &&
272
360
  total_campaign_free_items == o.total_campaign_free_items &&
273
361
  coupon_redemptions == o.coupon_redemptions &&
274
362
  total_coupon_redemptions == o.total_coupon_redemptions &&
363
+ coupon_rolledback_redemptions == o.coupon_rolledback_redemptions &&
364
+ total_coupon_rolledback_redemptions == o.total_coupon_rolledback_redemptions &&
275
365
  referral_redemptions == o.referral_redemptions &&
276
366
  total_referral_redemptions == o.total_referral_redemptions &&
277
367
  coupons_created == o.coupons_created &&
@@ -289,7 +379,7 @@ module TalonOne
289
379
  # Calculates hash code according to all attributes.
290
380
  # @return [Fixnum] Hash code
291
381
  def hash
292
- [date, campaign_revenue, total_campaign_revenue, campaign_discount_costs, total_campaign_discount_costs, campaign_free_items, total_campaign_free_items, coupon_redemptions, total_coupon_redemptions, referral_redemptions, total_referral_redemptions, coupons_created, total_coupons_created, referrals_created, total_referrals_created].hash
382
+ [date, campaign_revenue, total_campaign_revenue, campaign_refund, total_campaign_refund, campaign_discount_costs, total_campaign_discount_costs, campaign_refunded_discounts, total_campaign_refunded_discounts, campaign_free_items, total_campaign_free_items, coupon_redemptions, total_coupon_redemptions, coupon_rolledback_redemptions, total_coupon_rolledback_redemptions, referral_redemptions, total_referral_redemptions, coupons_created, total_coupons_created, referrals_created, total_referrals_created].hash
293
383
  end
294
384
 
295
385
  # Builds the object from hash