Class: VoucherifySdk::CampaignsSummaryGetResponseBody
- Inherits:
-
Object
- Object
- VoucherifySdk::CampaignsSummaryGetResponseBody
- Defined in:
- lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#amount_added ⇒ Object
The total credit amount that was added.
-
#amount_deleted ⇒ Object
The total credit amount that was deleted by deleting gift cards.
-
#amount_redeemed ⇒ Object
The total credit amount that was redeemed.
-
#amount_rolledback ⇒ Object
The total credit amount that was rolled back.
-
#amount_subtracted ⇒ Object
The total credit amount that was subtracted.
-
#campaign ⇒ Object
Returns the value of attribute campaign.
-
#created_vouchers_amount ⇒ Object
The total credit amount for all created gift cards.
-
#created_vouchers_points ⇒ Object
Total number of points added to newly created loyalty cards.
-
#discounted_amount ⇒ Object
Total amount of discounts related to the campaign.
-
#object ⇒ Object
The type of the object, which is
campaign_summary. -
#orders_amount ⇒ Object
Total amount of orders related to the campaign.
-
#orders_rolledback_amount ⇒ Object
Total amount of orders that were rolled back and are related to the campaign.
-
#pending_points_activated ⇒ Object
Total number of pending points that were activated manually or automatically.
-
#pending_points_added ⇒ Object
Total number of pending points that were added either as part of earning rules or added manually to an existing pending point bucket.
-
#pending_points_canceled ⇒ Object
Total number of pending points that were canceled.
-
#pending_points_subtracted ⇒ Object
Total number of pending points that were subtracted from existing pending point buckets.
-
#points_added ⇒ Object
Total number of points that were added.
-
#points_deleted ⇒ Object
Total number of points that were deleted.
-
#points_expired ⇒ Object
Total number of points that have expired.
-
#points_redeemed ⇒ Object
Total number of points that were redeemed for rewards.
-
#points_rewarded ⇒ Object
Total number of points that were rewarded to loyalty cards through earning rules.
-
#points_rolledback ⇒ Object
Total number of points that were rolled back for reward redemptions.
-
#points_subtracted ⇒ Object
Total number of points that were subtracted.
-
#points_transferred_in ⇒ Object
Total number of points transferred into loyalty cards covered by the campaign.
-
#points_transferred_out ⇒ Object
Total number of points transferred out of loyalty cards covered by the campaign.
-
#publications ⇒ Object
Total number of publications, which includes successful and failed publications.
-
#publications_failed ⇒ Object
Total number of failed publications.
-
#publications_succeeded ⇒ Object
Total number of successful publications.
-
#redemptions ⇒ Object
Total number of redemptions, which includes successful and failed redemptions.
-
#redemptions_failed ⇒ Object
Total number of failed redemptions.
-
#redemptions_succeeded ⇒ Object
Total number of successful redemptions.
-
#referred_customers ⇒ Object
Total number of all referred customers.
-
#rollbacks ⇒ Object
Total number of rollbacks, which includes successful and failed rollbacks.
-
#rollbacks_failed ⇒ Object
Total number of failed rollbacks.
-
#rollbacks_succeeded ⇒ Object
Total number of successful rollbacks.
-
#rolledback_discounted_amount ⇒ Object
Total amount of discounts orders that were rolled back and are related to the campaign.
-
#validations ⇒ Object
Total number of validations, which includes successful and failed validations.
-
#validations_failed ⇒ Object
Total number of failed validations.
-
#validations_succeeded ⇒ Object
Total number of successful validations.
-
#vouchers_created ⇒ Object
Total number of vouchers created within the campaign.
-
#vouchers_deleted ⇒ Object
Total number of vouchers deleted within the campaign.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.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.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CampaignsSummaryGetResponseBody
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ CampaignsSummaryGetResponseBody
Initializes the object
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 336 337 338 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 444 445 446 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 476 477 478 479 480 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 309 def initialize(attributes = {}) # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.key?(:'object') self.object = attributes[:'object'] else self.object = 'campaign_summary' end if attributes.key?(:'campaign') self.campaign = attributes[:'campaign'] end if attributes.key?(:'redemptions') self.redemptions = attributes[:'redemptions'] end if attributes.key?(:'redemptions_succeeded') self.redemptions_succeeded = attributes[:'redemptions_succeeded'] end if attributes.key?(:'redemptions_failed') self.redemptions_failed = attributes[:'redemptions_failed'] end if attributes.key?(:'rollbacks') self.rollbacks = attributes[:'rollbacks'] end if attributes.key?(:'rollbacks_succeeded') self.rollbacks_succeeded = attributes[:'rollbacks_succeeded'] end if attributes.key?(:'rollbacks_failed') self.rollbacks_failed = attributes[:'rollbacks_failed'] end if attributes.key?(:'validations') self.validations = attributes[:'validations'] end if attributes.key?(:'validations_succeeded') self.validations_succeeded = attributes[:'validations_succeeded'] end if attributes.key?(:'validations_failed') self.validations_failed = attributes[:'validations_failed'] end if attributes.key?(:'orders_amount') self.orders_amount = attributes[:'orders_amount'] end if attributes.key?(:'orders_rolledback_amount') self.orders_rolledback_amount = attributes[:'orders_rolledback_amount'] end if attributes.key?(:'vouchers_created') self.vouchers_created = attributes[:'vouchers_created'] end if attributes.key?(:'vouchers_deleted') self.vouchers_deleted = attributes[:'vouchers_deleted'] end if attributes.key?(:'publications') self.publications = attributes[:'publications'] end if attributes.key?(:'publications_succeeded') self.publications_succeeded = attributes[:'publications_succeeded'] end if attributes.key?(:'publications_failed') self.publications_failed = attributes[:'publications_failed'] end if attributes.key?(:'discounted_amount') self.discounted_amount = attributes[:'discounted_amount'] end if attributes.key?(:'rolledback_discounted_amount') self.rolledback_discounted_amount = attributes[:'rolledback_discounted_amount'] end if attributes.key?(:'created_vouchers_amount') self.created_vouchers_amount = attributes[:'created_vouchers_amount'] end if attributes.key?(:'amount_added') self.amount_added = attributes[:'amount_added'] end if attributes.key?(:'amount_deleted') self.amount_deleted = attributes[:'amount_deleted'] end if attributes.key?(:'amount_redeemed') self.amount_redeemed = attributes[:'amount_redeemed'] end if attributes.key?(:'amount_rolledback') self.amount_rolledback = attributes[:'amount_rolledback'] end if attributes.key?(:'amount_subtracted') self.amount_subtracted = attributes[:'amount_subtracted'] end if attributes.key?(:'created_vouchers_points') self.created_vouchers_points = attributes[:'created_vouchers_points'] end if attributes.key?(:'points_deleted') self.points_deleted = attributes[:'points_deleted'] end if attributes.key?(:'points_subtracted') self.points_subtracted = attributes[:'points_subtracted'] end if attributes.key?(:'points_added') self.points_added = attributes[:'points_added'] end if attributes.key?(:'points_rewarded') self.points_rewarded = attributes[:'points_rewarded'] end if attributes.key?(:'points_redeemed') self.points_redeemed = attributes[:'points_redeemed'] end if attributes.key?(:'points_rolledback') self.points_rolledback = attributes[:'points_rolledback'] end if attributes.key?(:'points_expired') self.points_expired = attributes[:'points_expired'] end if attributes.key?(:'points_transferred_out') self.points_transferred_out = attributes[:'points_transferred_out'] end if attributes.key?(:'points_transferred_in') self.points_transferred_in = attributes[:'points_transferred_in'] end if attributes.key?(:'pending_points_added') self.pending_points_added = attributes[:'pending_points_added'] end if attributes.key?(:'pending_points_subtracted') self.pending_points_subtracted = attributes[:'pending_points_subtracted'] end if attributes.key?(:'pending_points_activated') self.pending_points_activated = attributes[:'pending_points_activated'] end if attributes.key?(:'pending_points_canceled') self.pending_points_canceled = attributes[:'pending_points_canceled'] end if attributes.key?(:'referred_customers') self.referred_customers = attributes[:'referred_customers'] end end |
Instance Attribute Details
#amount_added ⇒ Object
The total credit amount that was added. The value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 is represented as 1000.
81 82 83 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 81 def amount_added @amount_added end |
#amount_deleted ⇒ Object
The total credit amount that was deleted by deleting gift cards. The value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 is represented as 1000.
84 85 86 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 84 def amount_deleted @amount_deleted end |
#amount_redeemed ⇒ Object
The total credit amount that was redeemed. This amount is not reduced by the amount_rolledback. The value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 is represented as 1000.
87 88 89 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 87 def amount_redeemed @amount_redeemed end |
#amount_rolledback ⇒ Object
The total credit amount that was rolled back. The value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 is represented as 1000.
90 91 92 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 90 def amount_rolledback @amount_rolledback end |
#amount_subtracted ⇒ Object
The total credit amount that was subtracted. The value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 is represented as 1000.
93 94 95 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 93 def amount_subtracted @amount_subtracted end |
#campaign ⇒ Object
Returns the value of attribute campaign.
21 22 23 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 21 def campaign @campaign end |
#created_vouchers_amount ⇒ Object
The total credit amount for all created gift cards. The value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 is represented as 1000.
78 79 80 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 78 def created_vouchers_amount @created_vouchers_amount end |
#created_vouchers_points ⇒ Object
Total number of points added to newly created loyalty cards. This also counts points added for the loyalty cards which are created by importing a CSV file to a campaign.
96 97 98 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 96 def created_vouchers_points @created_vouchers_points end |
#discounted_amount ⇒ Object
Total amount of discounts related to the campaign. This amount is not reduced by the rolledback_discounted_amount. The value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 is represented as 1000.
72 73 74 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 72 def discounted_amount @discounted_amount end |
#object ⇒ Object
The type of the object, which is campaign_summary.
19 20 21 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 19 def object @object end |
#orders_amount ⇒ Object
Total amount of orders related to the campaign. This amount is not reduced by orders_rolledback_amount. The value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 is represented as 1000.
51 52 53 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 51 def orders_amount @orders_amount end |
#orders_rolledback_amount ⇒ Object
Total amount of orders that were rolled back and are related to the campaign. The value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 is represented as 1000.
54 55 56 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 54 def orders_rolledback_amount @orders_rolledback_amount end |
#pending_points_activated ⇒ Object
Total number of pending points that were activated manually or automatically.
132 133 134 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 132 def pending_points_activated @pending_points_activated end |
#pending_points_added ⇒ Object
Total number of pending points that were added either as part of earning rules or added manually to an existing pending point bucket. Pending points that were activated manually or automatically or that were canceled do not affect this number.
126 127 128 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 126 def pending_points_added @pending_points_added end |
#pending_points_canceled ⇒ Object
Total number of pending points that were canceled.
135 136 137 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 135 def pending_points_canceled @pending_points_canceled end |
#pending_points_subtracted ⇒ Object
Total number of pending points that were subtracted from existing pending point buckets.
129 130 131 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 129 def pending_points_subtracted @pending_points_subtracted end |
#points_added ⇒ Object
Total number of points that were added. This includes points added manually or automatically by redeeming a reward that adds loyalty points to cards in this campaign.
105 106 107 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 105 def points_added @points_added end |
#points_deleted ⇒ Object
Total number of points that were deleted.
99 100 101 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 99 def points_deleted @points_deleted end |
#points_expired ⇒ Object
Total number of points that have expired.
117 118 119 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 117 def points_expired @points_expired end |
#points_redeemed ⇒ Object
Total number of points that were redeemed for rewards.
111 112 113 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 111 def points_redeemed @points_redeemed end |
#points_rewarded ⇒ Object
Total number of points that were rewarded to loyalty cards through earning rules. This includes pending points that were activated.
108 109 110 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 108 def points_rewarded @points_rewarded end |
#points_rolledback ⇒ Object
Total number of points that were rolled back for reward redemptions.
114 115 116 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 114 def points_rolledback @points_rolledback end |
#points_subtracted ⇒ Object
Total number of points that were subtracted.
102 103 104 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 102 def points_subtracted @points_subtracted end |
#points_transferred_in ⇒ Object
Total number of points transferred into loyalty cards covered by the campaign.
123 124 125 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 123 def points_transferred_in @points_transferred_in end |
#points_transferred_out ⇒ Object
Total number of points transferred out of loyalty cards covered by the campaign.
120 121 122 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 120 def points_transferred_out @points_transferred_out end |
#publications ⇒ Object
Total number of publications, which includes successful and failed publications.
63 64 65 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 63 def publications @publications end |
#publications_failed ⇒ Object
Total number of failed publications.
69 70 71 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 69 def publications_failed @publications_failed end |
#publications_succeeded ⇒ Object
Total number of successful publications.
66 67 68 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 66 def publications_succeeded @publications_succeeded end |
#redemptions ⇒ Object
Total number of redemptions, which includes successful and failed redemptions.
24 25 26 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 24 def redemptions @redemptions end |
#redemptions_failed ⇒ Object
Total number of failed redemptions.
30 31 32 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 30 def redemptions_failed @redemptions_failed end |
#redemptions_succeeded ⇒ Object
Total number of successful redemptions.
27 28 29 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 27 def redemptions_succeeded @redemptions_succeeded end |
#referred_customers ⇒ Object
Total number of all referred customers.
138 139 140 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 138 def referred_customers @referred_customers end |
#rollbacks ⇒ Object
Total number of rollbacks, which includes successful and failed rollbacks.
33 34 35 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 33 def rollbacks @rollbacks end |
#rollbacks_failed ⇒ Object
Total number of failed rollbacks.
39 40 41 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 39 def rollbacks_failed @rollbacks_failed end |
#rollbacks_succeeded ⇒ Object
Total number of successful rollbacks.
36 37 38 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 36 def rollbacks_succeeded @rollbacks_succeeded end |
#rolledback_discounted_amount ⇒ Object
Total amount of discounts orders that were rolled back and are related to the campaign. The value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 is represented as 1000.
75 76 77 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 75 def rolledback_discounted_amount @rolledback_discounted_amount end |
#validations ⇒ Object
Total number of validations, which includes successful and failed validations.
42 43 44 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 42 def validations @validations end |
#validations_failed ⇒ Object
Total number of failed validations.
48 49 50 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 48 def validations_failed @validations_failed end |
#validations_succeeded ⇒ Object
Total number of successful validations.
45 46 47 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 45 def validations_succeeded @validations_succeeded end |
#vouchers_created ⇒ Object
Total number of vouchers created within the campaign. Includes vouchers generated when the campaign was created, vouchers added manually, or vouchers generated automatically when a new customer joined the campaign.
57 58 59 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 57 def vouchers_created @vouchers_created end |
#vouchers_deleted ⇒ Object
Total number of vouchers deleted within the campaign. Includes vouchers moved to the bin and vouchers deleted permanently. Vouchers moved to the bin and then deleted permanently are counted once.
60 61 62 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 60 def vouchers_deleted @vouchers_deleted end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 586 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = VoucherifySdk.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
210 211 212 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 210 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
163 164 165 166 167 168 169 170 171 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 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 163 def self.attribute_map { :'object' => :'object', :'campaign' => :'campaign', :'redemptions' => :'redemptions', :'redemptions_succeeded' => :'redemptions_succeeded', :'redemptions_failed' => :'redemptions_failed', :'rollbacks' => :'rollbacks', :'rollbacks_succeeded' => :'rollbacks_succeeded', :'rollbacks_failed' => :'rollbacks_failed', :'validations' => :'validations', :'validations_succeeded' => :'validations_succeeded', :'validations_failed' => :'validations_failed', :'orders_amount' => :'orders_amount', :'orders_rolledback_amount' => :'orders_rolledback_amount', :'vouchers_created' => :'vouchers_created', :'vouchers_deleted' => :'vouchers_deleted', :'publications' => :'publications', :'publications_succeeded' => :'publications_succeeded', :'publications_failed' => :'publications_failed', :'discounted_amount' => :'discounted_amount', :'rolledback_discounted_amount' => :'rolledback_discounted_amount', :'created_vouchers_amount' => :'created_vouchers_amount', :'amount_added' => :'amount_added', :'amount_deleted' => :'amount_deleted', :'amount_redeemed' => :'amount_redeemed', :'amount_rolledback' => :'amount_rolledback', :'amount_subtracted' => :'amount_subtracted', :'created_vouchers_points' => :'created_vouchers_points', :'points_deleted' => :'points_deleted', :'points_subtracted' => :'points_subtracted', :'points_added' => :'points_added', :'points_rewarded' => :'points_rewarded', :'points_redeemed' => :'points_redeemed', :'points_rolledback' => :'points_rolledback', :'points_expired' => :'points_expired', :'points_transferred_out' => :'points_transferred_out', :'points_transferred_in' => :'points_transferred_in', :'pending_points_added' => :'pending_points_added', :'pending_points_subtracted' => :'pending_points_subtracted', :'pending_points_activated' => :'pending_points_activated', :'pending_points_canceled' => :'pending_points_canceled', :'referred_customers' => :'referred_customers' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 562 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
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 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 262 def self.openapi_nullable Set.new([ :'object', :'redemptions', :'redemptions_succeeded', :'redemptions_failed', :'rollbacks', :'rollbacks_succeeded', :'rollbacks_failed', :'validations', :'validations_succeeded', :'validations_failed', :'orders_amount', :'orders_rolledback_amount', :'vouchers_created', :'vouchers_deleted', :'publications', :'publications_succeeded', :'publications_failed', :'discounted_amount', :'rolledback_discounted_amount', :'created_vouchers_amount', :'amount_added', :'amount_deleted', :'amount_redeemed', :'amount_rolledback', :'amount_subtracted', :'created_vouchers_points', :'points_deleted', :'points_subtracted', :'points_added', :'points_rewarded', :'points_redeemed', :'points_rolledback', :'points_expired', :'points_transferred_out', :'points_transferred_in', :'pending_points_added', :'pending_points_subtracted', :'pending_points_activated', :'pending_points_canceled', :'referred_customers' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 215 def self.openapi_types { :'object' => :'String', :'campaign' => :'CampaignBase', :'redemptions' => :'Integer', :'redemptions_succeeded' => :'Integer', :'redemptions_failed' => :'Integer', :'rollbacks' => :'Integer', :'rollbacks_succeeded' => :'Integer', :'rollbacks_failed' => :'Integer', :'validations' => :'Integer', :'validations_succeeded' => :'Integer', :'validations_failed' => :'Integer', :'orders_amount' => :'Integer', :'orders_rolledback_amount' => :'Integer', :'vouchers_created' => :'Integer', :'vouchers_deleted' => :'Integer', :'publications' => :'Integer', :'publications_succeeded' => :'Integer', :'publications_failed' => :'Integer', :'discounted_amount' => :'Integer', :'rolledback_discounted_amount' => :'Integer', :'created_vouchers_amount' => :'Integer', :'amount_added' => :'Integer', :'amount_deleted' => :'Integer', :'amount_redeemed' => :'Integer', :'amount_rolledback' => :'Integer', :'amount_subtracted' => :'Integer', :'created_vouchers_points' => :'Integer', :'points_deleted' => :'Integer', :'points_subtracted' => :'Integer', :'points_added' => :'Integer', :'points_rewarded' => :'Integer', :'points_redeemed' => :'Integer', :'points_rolledback' => :'Integer', :'points_expired' => :'Integer', :'points_transferred_out' => :'Integer', :'points_transferred_in' => :'Integer', :'pending_points_added' => :'Integer', :'pending_points_subtracted' => :'Integer', :'pending_points_activated' => :'Integer', :'pending_points_canceled' => :'Integer', :'referred_customers' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 501 def ==(o) return true if self.equal?(o) self.class == o.class && object == o.object && campaign == o.campaign && redemptions == o.redemptions && redemptions_succeeded == o.redemptions_succeeded && redemptions_failed == o.redemptions_failed && rollbacks == o.rollbacks && rollbacks_succeeded == o.rollbacks_succeeded && rollbacks_failed == o.rollbacks_failed && validations == o.validations && validations_succeeded == o.validations_succeeded && validations_failed == o.validations_failed && orders_amount == o.orders_amount && orders_rolledback_amount == o.orders_rolledback_amount && vouchers_created == o.vouchers_created && vouchers_deleted == o.vouchers_deleted && publications == o.publications && publications_succeeded == o.publications_succeeded && publications_failed == o.publications_failed && discounted_amount == o.discounted_amount && rolledback_discounted_amount == o.rolledback_discounted_amount && created_vouchers_amount == o.created_vouchers_amount && amount_added == o.amount_added && amount_deleted == o.amount_deleted && amount_redeemed == o.amount_redeemed && amount_rolledback == o.amount_rolledback && amount_subtracted == o.amount_subtracted && created_vouchers_points == o.created_vouchers_points && points_deleted == o.points_deleted && points_subtracted == o.points_subtracted && points_added == o.points_added && points_rewarded == o.points_rewarded && points_redeemed == o.points_redeemed && points_rolledback == o.points_rolledback && points_expired == o.points_expired && points_transferred_out == o.points_transferred_out && points_transferred_in == o.points_transferred_in && pending_points_added == o.pending_points_added && pending_points_subtracted == o.pending_points_subtracted && pending_points_activated == o.pending_points_activated && pending_points_canceled == o.pending_points_canceled && referred_customers == o.referred_customers end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
657 658 659 660 661 662 663 664 665 666 667 668 669 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 657 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#eql?(o) ⇒ Boolean
549 550 551 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 549 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
555 556 557 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 555 def hash [object, campaign, redemptions, redemptions_succeeded, redemptions_failed, rollbacks, rollbacks_succeeded, rollbacks_failed, validations, validations_succeeded, validations_failed, orders_amount, orders_rolledback_amount, vouchers_created, vouchers_deleted, publications, publications_succeeded, publications_failed, discounted_amount, rolledback_discounted_amount, created_vouchers_amount, amount_added, amount_deleted, amount_redeemed, amount_rolledback, amount_subtracted, created_vouchers_points, points_deleted, points_subtracted, points_added, points_rewarded, points_redeemed, points_rolledback, points_expired, points_transferred_out, points_transferred_in, pending_points_added, pending_points_subtracted, pending_points_activated, pending_points_canceled, referred_customers].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
484 485 486 487 488 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 484 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
633 634 635 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 633 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
639 640 641 642 643 644 645 646 647 648 649 650 651 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 639 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 |
#to_s ⇒ String
Returns the string representation of the object
627 628 629 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 627 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
492 493 494 495 496 497 |
# File 'lib/VoucherifySdk/models/campaigns_summary_get_response_body.rb', line 492 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' object_validator = EnumAttributeValidator.new('String', ["campaign_summary"]) return false unless object_validator.valid?(@object) true end |