Class: TalonOne::CampaignAnalytics
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- TalonOne::CampaignAnalytics
- Defined in:
- lib/talon_one_sdk/models/campaign_analytics.rb
Instance Attribute Summary collapse
-
#added_loyalty_points ⇒ Object
Number of added loyalty points in the campaign in a specific interval.
-
#campaign_discount_costs ⇒ Object
Amount of cost caused by discounts given in the campaign.
-
#campaign_free_items ⇒ Object
Amount of free items given in the campaign.
-
#campaign_refund ⇒ Object
Amount of refunds in this campaign (for coupon or discount sessions).
-
#campaign_refunded_discounts ⇒ Object
Amount of discounts rolledback due to refund in the campaign.
-
#campaign_revenue ⇒ Object
Amount of revenue in this campaign (for coupon or discount sessions).
-
#coupon_redemptions ⇒ Object
Number of coupon redemptions in the campaign.
-
#coupon_rolledback_redemptions ⇒ Object
Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign.
-
#coupons_created ⇒ Object
Number of coupons created in the campaign by the rule engine.
-
#date ⇒ Object
Returns the value of attribute date.
-
#deducted_loyalty_points ⇒ Object
Number of deducted loyalty points in the campaign in a specific interval.
-
#referral_redemptions ⇒ Object
Number of referral redemptions in the campaign.
-
#referrals_created ⇒ Object
Number of referrals created in the campaign by the rule engine.
-
#total_added_loyalty_points ⇒ Object
Number of added loyalty points in the campaign since it began.
-
#total_campaign_discount_costs ⇒ Object
Amount of cost caused by discounts given in the campaign since it began.
-
#total_campaign_free_items ⇒ Object
Amount of free items given in the campaign since it began.
-
#total_campaign_refund ⇒ Object
Amount of refunds in this campaign since it began (for coupon or discount sessions).
-
#total_campaign_refunded_discounts ⇒ Object
Amount of discounts rolledback due to refund in the campaign since it began.
-
#total_campaign_revenue ⇒ Object
Amount of revenue in this campaign since it began (for coupon or discount sessions).
-
#total_coupon_redemptions ⇒ Object
Number of coupon redemptions in the campaign since it began.
-
#total_coupon_rolledback_redemptions ⇒ Object
Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign since it began.
-
#total_coupons_created ⇒ Object
Number of coupons created in the campaign by the rule engine since it began.
-
#total_deducted_loyalty_points ⇒ Object
Number of deducted loyalty points in the campaign since it began.
-
#total_referral_redemptions ⇒ Object
Number of referral redemptions in the campaign since it began.
-
#total_referrals_created ⇒ Object
Number of referrals created in the campaign by the rule engine since it began.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CampaignAnalytics
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ CampaignAnalytics
Initializes the object
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 172 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::CampaignAnalytics` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::CampaignAnalytics`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'date') self.date = attributes[:'date'] else self.date = nil end if attributes.key?(:'campaign_revenue') self.campaign_revenue = attributes[:'campaign_revenue'] else self.campaign_revenue = nil end if attributes.key?(:'total_campaign_revenue') self.total_campaign_revenue = attributes[:'total_campaign_revenue'] else self.total_campaign_revenue = nil end if attributes.key?(:'campaign_refund') self.campaign_refund = attributes[:'campaign_refund'] else self.campaign_refund = nil end if attributes.key?(:'total_campaign_refund') self.total_campaign_refund = attributes[:'total_campaign_refund'] else self.total_campaign_refund = nil end if attributes.key?(:'campaign_discount_costs') self.campaign_discount_costs = attributes[:'campaign_discount_costs'] else self.campaign_discount_costs = nil end if attributes.key?(:'total_campaign_discount_costs') self.total_campaign_discount_costs = attributes[:'total_campaign_discount_costs'] else self.total_campaign_discount_costs = nil end if attributes.key?(:'campaign_refunded_discounts') self.campaign_refunded_discounts = attributes[:'campaign_refunded_discounts'] else self.campaign_refunded_discounts = nil end if attributes.key?(:'total_campaign_refunded_discounts') self.total_campaign_refunded_discounts = attributes[:'total_campaign_refunded_discounts'] else self.total_campaign_refunded_discounts = nil end if attributes.key?(:'campaign_free_items') self.campaign_free_items = attributes[:'campaign_free_items'] else self.campaign_free_items = nil end if attributes.key?(:'total_campaign_free_items') self.total_campaign_free_items = attributes[:'total_campaign_free_items'] else self.total_campaign_free_items = nil end if attributes.key?(:'coupon_redemptions') self.coupon_redemptions = attributes[:'coupon_redemptions'] else self.coupon_redemptions = nil end if attributes.key?(:'total_coupon_redemptions') self.total_coupon_redemptions = attributes[:'total_coupon_redemptions'] else self.total_coupon_redemptions = nil end if attributes.key?(:'coupon_rolledback_redemptions') self.coupon_rolledback_redemptions = attributes[:'coupon_rolledback_redemptions'] else self.coupon_rolledback_redemptions = nil end if attributes.key?(:'total_coupon_rolledback_redemptions') self.total_coupon_rolledback_redemptions = attributes[:'total_coupon_rolledback_redemptions'] else self.total_coupon_rolledback_redemptions = nil end if attributes.key?(:'referral_redemptions') self.referral_redemptions = attributes[:'referral_redemptions'] else self.referral_redemptions = nil end if attributes.key?(:'total_referral_redemptions') self.total_referral_redemptions = attributes[:'total_referral_redemptions'] else self.total_referral_redemptions = nil end if attributes.key?(:'coupons_created') self.coupons_created = attributes[:'coupons_created'] else self.coupons_created = nil end if attributes.key?(:'total_coupons_created') self.total_coupons_created = attributes[:'total_coupons_created'] else self.total_coupons_created = nil end if attributes.key?(:'referrals_created') self.referrals_created = attributes[:'referrals_created'] else self.referrals_created = nil end if attributes.key?(:'total_referrals_created') self.total_referrals_created = attributes[:'total_referrals_created'] else self.total_referrals_created = nil end if attributes.key?(:'added_loyalty_points') self.added_loyalty_points = attributes[:'added_loyalty_points'] else self.added_loyalty_points = nil end if attributes.key?(:'total_added_loyalty_points') self.total_added_loyalty_points = attributes[:'total_added_loyalty_points'] else self.total_added_loyalty_points = nil end if attributes.key?(:'deducted_loyalty_points') self.deducted_loyalty_points = attributes[:'deducted_loyalty_points'] else self.deducted_loyalty_points = nil end if attributes.key?(:'total_deducted_loyalty_points') self.total_deducted_loyalty_points = attributes[:'total_deducted_loyalty_points'] else self.total_deducted_loyalty_points = nil end end |
Instance Attribute Details
#added_loyalty_points ⇒ Object
Number of added loyalty points in the campaign in a specific interval.
81 82 83 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 81 def added_loyalty_points @added_loyalty_points end |
#campaign_discount_costs ⇒ Object
Amount of cost caused by discounts given in the campaign.
33 34 35 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 33 def campaign_discount_costs @campaign_discount_costs end |
#campaign_free_items ⇒ Object
Amount of free items given in the campaign.
45 46 47 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 45 def campaign_free_items @campaign_free_items end |
#campaign_refund ⇒ Object
Amount of refunds in this campaign (for coupon or discount sessions).
27 28 29 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 27 def campaign_refund @campaign_refund end |
#campaign_refunded_discounts ⇒ Object
Amount of discounts rolledback due to refund in the campaign.
39 40 41 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 39 def campaign_refunded_discounts @campaign_refunded_discounts end |
#campaign_revenue ⇒ Object
Amount of revenue in this campaign (for coupon or discount sessions).
21 22 23 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 21 def campaign_revenue @campaign_revenue end |
#coupon_redemptions ⇒ Object
Number of coupon redemptions in the campaign.
51 52 53 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 51 def coupon_redemptions @coupon_redemptions end |
#coupon_rolledback_redemptions ⇒ Object
Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign.
57 58 59 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 57 def coupon_rolledback_redemptions @coupon_rolledback_redemptions end |
#coupons_created ⇒ Object
Number of coupons created in the campaign by the rule engine.
69 70 71 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 69 def coupons_created @coupons_created end |
#date ⇒ Object
Returns the value of attribute date.
18 19 20 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 18 def date @date end |
#deducted_loyalty_points ⇒ Object
Number of deducted loyalty points in the campaign in a specific interval.
87 88 89 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 87 def deducted_loyalty_points @deducted_loyalty_points end |
#referral_redemptions ⇒ Object
Number of referral redemptions in the campaign.
63 64 65 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 63 def referral_redemptions @referral_redemptions end |
#referrals_created ⇒ Object
Number of referrals created in the campaign by the rule engine.
75 76 77 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 75 def referrals_created @referrals_created end |
#total_added_loyalty_points ⇒ Object
Number of added loyalty points in the campaign since it began.
84 85 86 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 84 def total_added_loyalty_points @total_added_loyalty_points end |
#total_campaign_discount_costs ⇒ Object
Amount of cost caused by discounts given in the campaign since it began.
36 37 38 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 36 def total_campaign_discount_costs @total_campaign_discount_costs end |
#total_campaign_free_items ⇒ Object
Amount of free items given in the campaign since it began.
48 49 50 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 48 def total_campaign_free_items @total_campaign_free_items end |
#total_campaign_refund ⇒ Object
Amount of refunds in this campaign since it began (for coupon or discount sessions).
30 31 32 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 30 def total_campaign_refund @total_campaign_refund end |
#total_campaign_refunded_discounts ⇒ Object
Amount of discounts rolledback due to refund in the campaign since it began.
42 43 44 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 42 def total_campaign_refunded_discounts @total_campaign_refunded_discounts end |
#total_campaign_revenue ⇒ Object
Amount of revenue in this campaign since it began (for coupon or discount sessions).
24 25 26 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 24 def total_campaign_revenue @total_campaign_revenue end |
#total_coupon_redemptions ⇒ Object
Number of coupon redemptions in the campaign since it began.
54 55 56 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 54 def total_coupon_redemptions @total_coupon_redemptions end |
#total_coupon_rolledback_redemptions ⇒ Object
Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign since it began.
60 61 62 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 60 def total_coupon_rolledback_redemptions @total_coupon_rolledback_redemptions end |
#total_coupons_created ⇒ Object
Number of coupons created in the campaign by the rule engine since it began.
72 73 74 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 72 def total_coupons_created @total_coupons_created end |
#total_deducted_loyalty_points ⇒ Object
Number of deducted loyalty points in the campaign since it began.
90 91 92 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 90 def total_deducted_loyalty_points @total_deducted_loyalty_points end |
#total_referral_redemptions ⇒ Object
Number of referral redemptions in the campaign since it began.
66 67 68 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 66 def total_referral_redemptions @total_referral_redemptions end |
#total_referrals_created ⇒ Object
Number of referrals created in the campaign by the rule engine since it began.
78 79 80 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 78 def total_referrals_created @total_referrals_created end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
124 125 126 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 124 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
129 130 131 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 129 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 93 def self.attribute_map { :'date' => :'date', :'campaign_revenue' => :'campaignRevenue', :'total_campaign_revenue' => :'totalCampaignRevenue', :'campaign_refund' => :'campaignRefund', :'total_campaign_refund' => :'totalCampaignRefund', :'campaign_discount_costs' => :'campaignDiscountCosts', :'total_campaign_discount_costs' => :'totalCampaignDiscountCosts', :'campaign_refunded_discounts' => :'campaignRefundedDiscounts', :'total_campaign_refunded_discounts' => :'totalCampaignRefundedDiscounts', :'campaign_free_items' => :'campaignFreeItems', :'total_campaign_free_items' => :'totalCampaignFreeItems', :'coupon_redemptions' => :'couponRedemptions', :'total_coupon_redemptions' => :'totalCouponRedemptions', :'coupon_rolledback_redemptions' => :'couponRolledbackRedemptions', :'total_coupon_rolledback_redemptions' => :'totalCouponRolledbackRedemptions', :'referral_redemptions' => :'referralRedemptions', :'total_referral_redemptions' => :'totalReferralRedemptions', :'coupons_created' => :'couponsCreated', :'total_coupons_created' => :'totalCouponsCreated', :'referrals_created' => :'referralsCreated', :'total_referrals_created' => :'totalReferralsCreated', :'added_loyalty_points' => :'addedLoyaltyPoints', :'total_added_loyalty_points' => :'totalAddedLoyaltyPoints', :'deducted_loyalty_points' => :'deductedLoyaltyPoints', :'total_deducted_loyalty_points' => :'totalDeductedLoyaltyPoints' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 774 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
165 166 167 168 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 165 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 134 def self.openapi_types { :'date' => :'Time', :'campaign_revenue' => :'Float', :'total_campaign_revenue' => :'Float', :'campaign_refund' => :'Float', :'total_campaign_refund' => :'Float', :'campaign_discount_costs' => :'Float', :'total_campaign_discount_costs' => :'Float', :'campaign_refunded_discounts' => :'Float', :'total_campaign_refunded_discounts' => :'Float', :'campaign_free_items' => :'Integer', :'total_campaign_free_items' => :'Integer', :'coupon_redemptions' => :'Integer', :'total_coupon_redemptions' => :'Integer', :'coupon_rolledback_redemptions' => :'Integer', :'total_coupon_rolledback_redemptions' => :'Integer', :'referral_redemptions' => :'Integer', :'total_referral_redemptions' => :'Integer', :'coupons_created' => :'Integer', :'total_coupons_created' => :'Integer', :'referrals_created' => :'Integer', :'total_referrals_created' => :'Integer', :'added_loyalty_points' => :'Float', :'total_added_loyalty_points' => :'Float', :'deducted_loyalty_points' => :'Float', :'total_deducted_loyalty_points' => :'Float' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 729 def ==(o) return true if self.equal?(o) self.class == o.class && date == o.date && campaign_revenue == o.campaign_revenue && total_campaign_revenue == o.total_campaign_revenue && campaign_refund == o.campaign_refund && total_campaign_refund == o.total_campaign_refund && campaign_discount_costs == o.campaign_discount_costs && total_campaign_discount_costs == o.total_campaign_discount_costs && campaign_refunded_discounts == o.campaign_refunded_discounts && total_campaign_refunded_discounts == o.total_campaign_refunded_discounts && campaign_free_items == o.campaign_free_items && total_campaign_free_items == o.total_campaign_free_items && coupon_redemptions == o.coupon_redemptions && total_coupon_redemptions == o.total_coupon_redemptions && coupon_rolledback_redemptions == o.coupon_rolledback_redemptions && total_coupon_rolledback_redemptions == o.total_coupon_rolledback_redemptions && referral_redemptions == o.referral_redemptions && total_referral_redemptions == o.total_referral_redemptions && coupons_created == o.coupons_created && total_coupons_created == o.total_coupons_created && referrals_created == o.referrals_created && total_referrals_created == o.total_referrals_created && added_loyalty_points == o.added_loyalty_points && total_added_loyalty_points == o.total_added_loyalty_points && deducted_loyalty_points == o.deducted_loyalty_points && total_deducted_loyalty_points == o.total_deducted_loyalty_points end |
#eql?(o) ⇒ Boolean
761 762 763 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 761 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
767 768 769 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 767 def hash [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, added_loyalty_points, total_added_loyalty_points, deducted_loyalty_points, total_deducted_loyalty_points].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 339 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @date.nil? invalid_properties.push('invalid value for "date", date cannot be nil.') end if @campaign_revenue.nil? invalid_properties.push('invalid value for "campaign_revenue", campaign_revenue cannot be nil.') end if @total_campaign_revenue.nil? invalid_properties.push('invalid value for "total_campaign_revenue", total_campaign_revenue cannot be nil.') end if @campaign_refund.nil? invalid_properties.push('invalid value for "campaign_refund", campaign_refund cannot be nil.') end if @total_campaign_refund.nil? invalid_properties.push('invalid value for "total_campaign_refund", total_campaign_refund cannot be nil.') end if @campaign_discount_costs.nil? invalid_properties.push('invalid value for "campaign_discount_costs", campaign_discount_costs cannot be nil.') end if @total_campaign_discount_costs.nil? invalid_properties.push('invalid value for "total_campaign_discount_costs", total_campaign_discount_costs cannot be nil.') end if @campaign_refunded_discounts.nil? invalid_properties.push('invalid value for "campaign_refunded_discounts", campaign_refunded_discounts cannot be nil.') end if @total_campaign_refunded_discounts.nil? invalid_properties.push('invalid value for "total_campaign_refunded_discounts", total_campaign_refunded_discounts cannot be nil.') end if @campaign_free_items.nil? invalid_properties.push('invalid value for "campaign_free_items", campaign_free_items cannot be nil.') end if @total_campaign_free_items.nil? invalid_properties.push('invalid value for "total_campaign_free_items", total_campaign_free_items cannot be nil.') end if @coupon_redemptions.nil? invalid_properties.push('invalid value for "coupon_redemptions", coupon_redemptions cannot be nil.') end if @total_coupon_redemptions.nil? invalid_properties.push('invalid value for "total_coupon_redemptions", total_coupon_redemptions cannot be nil.') end if @coupon_rolledback_redemptions.nil? invalid_properties.push('invalid value for "coupon_rolledback_redemptions", coupon_rolledback_redemptions cannot be nil.') end if @total_coupon_rolledback_redemptions.nil? invalid_properties.push('invalid value for "total_coupon_rolledback_redemptions", total_coupon_rolledback_redemptions cannot be nil.') end if @referral_redemptions.nil? invalid_properties.push('invalid value for "referral_redemptions", referral_redemptions cannot be nil.') end if @total_referral_redemptions.nil? invalid_properties.push('invalid value for "total_referral_redemptions", total_referral_redemptions cannot be nil.') end if @coupons_created.nil? invalid_properties.push('invalid value for "coupons_created", coupons_created cannot be nil.') end if @total_coupons_created.nil? invalid_properties.push('invalid value for "total_coupons_created", total_coupons_created cannot be nil.') end if @referrals_created.nil? invalid_properties.push('invalid value for "referrals_created", referrals_created cannot be nil.') end if @total_referrals_created.nil? invalid_properties.push('invalid value for "total_referrals_created", total_referrals_created cannot be nil.') end if @added_loyalty_points.nil? invalid_properties.push('invalid value for "added_loyalty_points", added_loyalty_points cannot be nil.') end if @total_added_loyalty_points.nil? invalid_properties.push('invalid value for "total_added_loyalty_points", total_added_loyalty_points cannot be nil.') end if @deducted_loyalty_points.nil? invalid_properties.push('invalid value for "deducted_loyalty_points", deducted_loyalty_points cannot be nil.') end if @total_deducted_loyalty_points.nil? invalid_properties.push('invalid value for "total_deducted_loyalty_points", total_deducted_loyalty_points cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
796 797 798 799 800 801 802 803 804 805 806 807 808 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 796 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/talon_one_sdk/models/campaign_analytics.rb', line 447 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @date.nil? return false if @campaign_revenue.nil? return false if @total_campaign_revenue.nil? return false if @campaign_refund.nil? return false if @total_campaign_refund.nil? return false if @campaign_discount_costs.nil? return false if @total_campaign_discount_costs.nil? return false if @campaign_refunded_discounts.nil? return false if @total_campaign_refunded_discounts.nil? return false if @campaign_free_items.nil? return false if @total_campaign_free_items.nil? return false if @coupon_redemptions.nil? return false if @total_coupon_redemptions.nil? return false if @coupon_rolledback_redemptions.nil? return false if @total_coupon_rolledback_redemptions.nil? return false if @referral_redemptions.nil? return false if @total_referral_redemptions.nil? return false if @coupons_created.nil? return false if @total_coupons_created.nil? return false if @referrals_created.nil? return false if @total_referrals_created.nil? return false if @added_loyalty_points.nil? return false if @total_added_loyalty_points.nil? return false if @deducted_loyalty_points.nil? return false if @total_deducted_loyalty_points.nil? true end |