voucherify 8.0.2 → 8.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +1 -1
  3. data/ENDPOINTS-COVERAGE.md +53 -48
  4. data/Gemfile.lock +8 -6
  5. data/README.md +44 -2
  6. data/__tests__/spec/12_validation_rules_spec.rb +1 -15
  7. data/docs/AccessSettings.md +9 -0
  8. data/docs/AccessSettingsAssign.md +10 -0
  9. data/docs/AccessSettingsUnassign.md +10 -0
  10. data/docs/ApplicableTo.md +3 -2
  11. data/docs/ApplicableToOrderItemUnitsItem.md +9 -0
  12. data/docs/ApplicationDetailsItem.md +14 -0
  13. data/docs/AreaStoreCampaignAssignment.md +1 -0
  14. data/docs/BinApi.md +4 -4
  15. data/docs/Campaign.md +1 -1
  16. data/docs/CampaignBase.md +1 -0
  17. data/docs/CampaignsCreateRequestBody.md +1 -0
  18. data/docs/CampaignsCreateResponseBody.md +1 -1
  19. data/docs/CampaignsGetResponseBody.md +1 -1
  20. data/docs/CampaignsUpdateRequestBody.md +1 -0
  21. data/docs/CampaignsUpdateResponseBody.md +1 -1
  22. data/docs/CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md +2 -1
  23. data/docs/CampaignsVouchersCreateResponseBodyLoyaltyCard.md +2 -1
  24. data/docs/ClientValidationsValidateResponseBodyRedeemablesItemResultDiscount.md +1 -1
  25. data/docs/CustomerLoyalty.md +1 -1
  26. data/docs/Discount.md +1 -1
  27. data/docs/DiscountUnitMultipleOneUnit.md +1 -1
  28. data/docs/EarningRule.md +1 -0
  29. data/docs/EarningRulePendingPoints.md +9 -0
  30. data/docs/EventSource.md +10 -0
  31. data/docs/EventSourceApiKey.md +9 -0
  32. data/docs/EventSourceUser.md +8 -0
  33. data/docs/InapplicableTo.md +3 -2
  34. data/docs/InapplicableToOrderItemUnitsItem.md +9 -0
  35. data/docs/LoyaltiesApi.md +334 -10
  36. data/docs/LoyaltiesCreateCampaignRequestBody.md +1 -0
  37. data/docs/LoyaltiesEarningRulesCreateResponseBody.md +1 -0
  38. data/docs/LoyaltiesEarningRulesCreateResponseBodyPendingPoints.md +9 -0
  39. data/docs/LoyaltiesEarningRulesDisableResponseBody.md +1 -0
  40. data/docs/LoyaltiesEarningRulesDisableResponseBodyPendingPoints.md +9 -0
  41. data/docs/LoyaltiesEarningRulesEnableResponseBody.md +1 -0
  42. data/docs/LoyaltiesEarningRulesEnableResponseBodyPendingPoints.md +9 -0
  43. data/docs/LoyaltiesEarningRulesGetResponseBody.md +1 -0
  44. data/docs/LoyaltiesEarningRulesGetResponseBodyPendingPoints.md +9 -0
  45. data/docs/LoyaltiesEarningRulesUpdateResponseBody.md +1 -0
  46. data/docs/LoyaltiesEarningRulesUpdateResponseBodyPendingPoints.md +9 -0
  47. data/docs/LoyaltiesMembersCreateResponseBodyLoyaltyCard.md +2 -1
  48. data/docs/LoyaltiesMembersGetResponseBodyLoyaltyCard.md +2 -1
  49. data/docs/LoyaltiesMembersPendingPointsActivateResponseBody.md +14 -0
  50. data/docs/LoyaltiesMembersPendingPointsActivateResponseBodyRelatedObject.md +9 -0
  51. data/docs/LoyaltiesMembersPendingPointsListResponseBody.md +12 -0
  52. data/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherLoyaltyCard.md +2 -1
  53. data/docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md +2 -1
  54. data/docs/LoyaltiesPendingPointsListResponseBody.md +12 -0
  55. data/docs/LoyaltiesUpdateCampaignRequestBody.md +1 -0
  56. data/docs/LoyaltyCardTransactionDetails.md +2 -0
  57. data/docs/LoyaltyCardTransactionDetailsEarningRule.md +1 -1
  58. data/docs/LoyaltyCardTransactionDetailsHolderLoyaltyTier.md +9 -0
  59. data/docs/LoyaltyCardTransactionDetailsLoyaltyTier.md +2 -2
  60. data/docs/LoyaltyMemberLoyaltyCard.md +2 -1
  61. data/docs/LoyaltyPendingPoints.md +17 -0
  62. data/docs/LoyaltyPendingPointsDetails.md +12 -0
  63. data/docs/LoyaltyPendingPointsDetailsEarningRule.md +9 -0
  64. data/docs/LoyaltyPendingPointsDetailsEarningRuleSource.md +8 -0
  65. data/docs/LoyaltyPendingPointsDetailsEvent.md +14 -0
  66. data/docs/LoyaltyPendingPointsDetailsHolderLoyaltyTier.md +9 -0
  67. data/docs/LoyaltyPendingPointsDetailsLoyaltyTier.md +9 -0
  68. data/docs/LoyaltyPendingPointsDetailsOrder.md +9 -0
  69. data/docs/LoyaltyTierExpiration.md +1 -1
  70. data/docs/Order.md +2 -2
  71. data/docs/OrderCalculated.md +11 -11
  72. data/docs/OrderCalculatedItem.md +1 -0
  73. data/docs/OrderRedemptionsEntry.md +1 -1
  74. data/docs/OrdersCreateRequestBody.md +2 -2
  75. data/docs/OrdersCreateResponseBody.md +11 -11
  76. data/docs/OrdersGetResponseBody.md +11 -11
  77. data/docs/OrdersImportCreateRequestBodyItem.md +2 -2
  78. data/docs/OrdersUpdateRequestBody.md +2 -2
  79. data/docs/OrdersUpdateResponseBody.md +11 -11
  80. data/docs/ParameterOrderListPendingPoints.md +7 -0
  81. data/docs/RedeemableLoyaltyCard.md +1 -1
  82. data/docs/RedeemableVoucherLoyaltyCard.md +2 -1
  83. data/docs/RedemptionEntryOrder.md +11 -11
  84. data/docs/RedemptionEntryVoucherLoyaltyCard.md +2 -1
  85. data/docs/RedemptionVoucherLoyaltyCard.md +2 -1
  86. data/docs/RedemptionsGetResponseBodyOrder.md +11 -11
  87. data/docs/RedemptionsGetResponseBodyVoucherLoyaltyCard.md +2 -1
  88. data/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md +11 -11
  89. data/docs/RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard.md +2 -1
  90. data/docs/SimpleLoyaltyCard.md +2 -1
  91. data/docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md +1 -0
  92. data/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.md +1 -1
  93. data/docs/VoucherLoyaltyCard.md +2 -1
  94. data/docs/VoucherTransactionDetails.md +2 -0
  95. data/docs/VoucherTransactionDetailsCustomEvent.md +2 -2
  96. data/docs/VoucherTransactionDetailsEarningRule.md +1 -1
  97. data/docs/VoucherTransactionDetailsEventSchema.md +2 -2
  98. data/docs/VoucherTransactionDetailsHolderLoyaltyTier.md +9 -0
  99. data/docs/VoucherTransactionDetailsLoyaltyTier.md +2 -2
  100. data/docs/VoucherTransactionDetailsRollback.md +1 -1
  101. data/docs/VoucherTransactionDetailsSegment.md +2 -2
  102. data/docs/VoucherWithCategoriesLoyaltyCard.md +2 -1
  103. data/docs/VouchersCreateResponseBodyLoyaltyCard.md +2 -1
  104. data/docs/VouchersDisableResponseBodyLoyaltyCard.md +2 -1
  105. data/docs/VouchersEnableResponseBodyLoyaltyCard.md +2 -1
  106. data/docs/VouchersGetResponseBodyLoyaltyCard.md +2 -1
  107. data/docs/VouchersUpdateResponseBodyLoyaltyCard.md +2 -1
  108. data/lib/VoucherifySdk/api/bin_api.rb +4 -4
  109. data/lib/VoucherifySdk/api/loyalties_api.rb +334 -8
  110. data/lib/VoucherifySdk/models/access_settings.rb +219 -0
  111. data/lib/VoucherifySdk/models/access_settings_assign.rb +238 -0
  112. data/lib/VoucherifySdk/models/access_settings_unassign.rb +238 -0
  113. data/lib/VoucherifySdk/models/applicable_to.rb +16 -3
  114. data/lib/VoucherifySdk/models/applicable_to_order_item_units_item.rb +220 -0
  115. data/lib/VoucherifySdk/models/application_details_item.rb +284 -0
  116. data/lib/VoucherifySdk/models/area_store_campaign_assignment.rb +12 -1
  117. data/lib/VoucherifySdk/models/campaign.rb +13 -13
  118. data/lib/VoucherifySdk/models/campaign_base.rb +13 -4
  119. data/lib/VoucherifySdk/models/campaigns_create_request_body.rb +10 -1
  120. data/lib/VoucherifySdk/models/campaigns_create_response_body.rb +13 -13
  121. data/lib/VoucherifySdk/models/campaigns_get_response_body.rb +13 -13
  122. data/lib/VoucherifySdk/models/campaigns_update_request_body.rb +10 -1
  123. data/lib/VoucherifySdk/models/campaigns_update_response_body.rb +13 -13
  124. data/lib/VoucherifySdk/models/campaigns_vouchers_create_combined_response_body_loyalty_card.rb +17 -6
  125. data/lib/VoucherifySdk/models/campaigns_vouchers_create_response_body_loyalty_card.rb +17 -6
  126. data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item_result_discount.rb +1 -0
  127. data/lib/VoucherifySdk/models/customer_loyalty.rb +1 -1
  128. data/lib/VoucherifySdk/models/discount.rb +1 -0
  129. data/lib/VoucherifySdk/models/discount_unit_multiple_one_unit.rb +1 -0
  130. data/lib/VoucherifySdk/models/earning_rule.rb +11 -1
  131. data/lib/VoucherifySdk/models/earning_rule_pending_points.rb +257 -0
  132. data/lib/VoucherifySdk/models/event_source.rb +254 -0
  133. data/lib/VoucherifySdk/models/event_source_api_key.rb +221 -0
  134. data/lib/VoucherifySdk/models/event_source_user.rb +210 -0
  135. data/lib/VoucherifySdk/models/inapplicable_to.rb +16 -3
  136. data/lib/VoucherifySdk/models/inapplicable_to_order_item_units_item.rb +220 -0
  137. data/lib/VoucherifySdk/models/loyalties_create_campaign_request_body.rb +10 -1
  138. data/lib/VoucherifySdk/models/loyalties_earning_rules_create_response_body.rb +11 -1
  139. data/lib/VoucherifySdk/models/loyalties_earning_rules_create_response_body_pending_points.rb +257 -0
  140. data/lib/VoucherifySdk/models/loyalties_earning_rules_disable_response_body.rb +11 -1
  141. data/lib/VoucherifySdk/models/loyalties_earning_rules_disable_response_body_pending_points.rb +257 -0
  142. data/lib/VoucherifySdk/models/loyalties_earning_rules_enable_response_body.rb +11 -1
  143. data/lib/VoucherifySdk/models/loyalties_earning_rules_enable_response_body_pending_points.rb +257 -0
  144. data/lib/VoucherifySdk/models/loyalties_earning_rules_get_response_body.rb +11 -1
  145. data/lib/VoucherifySdk/models/loyalties_earning_rules_get_response_body_pending_points.rb +257 -0
  146. data/lib/VoucherifySdk/models/loyalties_earning_rules_update_response_body.rb +11 -1
  147. data/lib/VoucherifySdk/models/loyalties_earning_rules_update_response_body_pending_points.rb +257 -0
  148. data/lib/VoucherifySdk/models/loyalties_members_create_response_body_loyalty_card.rb +17 -6
  149. data/lib/VoucherifySdk/models/loyalties_members_get_response_body_loyalty_card.rb +17 -6
  150. data/lib/VoucherifySdk/models/loyalties_members_pending_points_activate_response_body.rb +309 -0
  151. data/lib/VoucherifySdk/models/loyalties_members_pending_points_activate_response_body_related_object.rb +247 -0
  152. data/lib/VoucherifySdk/models/loyalties_members_pending_points_list_response_body.rb +286 -0
  153. data/lib/VoucherifySdk/models/loyalties_members_redemption_redeem_response_body_voucher_loyalty_card.rb +17 -6
  154. data/lib/VoucherifySdk/models/loyalties_members_transfers_create_response_body_loyalty_card.rb +17 -6
  155. data/lib/VoucherifySdk/models/loyalties_pending_points_list_response_body.rb +286 -0
  156. data/lib/VoucherifySdk/models/loyalties_update_campaign_request_body.rb +10 -1
  157. data/lib/VoucherifySdk/models/loyalty_card_transaction_details.rb +20 -1
  158. data/lib/VoucherifySdk/models/loyalty_card_transaction_details_earning_rule.rb +1 -1
  159. data/lib/VoucherifySdk/models/loyalty_card_transaction_details_holder_loyalty_tier.rb +221 -0
  160. data/lib/VoucherifySdk/models/loyalty_card_transaction_details_loyalty_tier.rb +3 -1
  161. data/lib/VoucherifySdk/models/loyalty_card_transactions_type.rb +2 -1
  162. data/lib/VoucherifySdk/models/loyalty_member_loyalty_card.rb +17 -6
  163. data/lib/VoucherifySdk/models/loyalty_pending_points.rb +314 -0
  164. data/lib/VoucherifySdk/models/loyalty_pending_points_details.rb +249 -0
  165. data/lib/VoucherifySdk/models/loyalty_pending_points_details_earning_rule.rb +220 -0
  166. data/lib/VoucherifySdk/models/loyalty_pending_points_details_earning_rule_source.rb +210 -0
  167. data/lib/VoucherifySdk/models/loyalty_pending_points_details_event.rb +302 -0
  168. data/lib/VoucherifySdk/models/loyalty_pending_points_details_holder_loyalty_tier.rb +221 -0
  169. data/lib/VoucherifySdk/models/loyalty_pending_points_details_loyalty_tier.rb +221 -0
  170. data/lib/VoucherifySdk/models/loyalty_pending_points_details_order.rb +221 -0
  171. data/lib/VoucherifySdk/models/loyalty_tier_expiration.rb +1 -1
  172. data/lib/VoucherifySdk/models/order.rb +2 -2
  173. data/lib/VoucherifySdk/models/order_calculated.rb +28 -28
  174. data/lib/VoucherifySdk/models/order_calculated_item.rb +17 -5
  175. data/lib/VoucherifySdk/models/order_redemptions_entry.rb +1 -1
  176. data/lib/VoucherifySdk/models/orders_create_request_body.rb +2 -2
  177. data/lib/VoucherifySdk/models/orders_create_response_body.rb +28 -28
  178. data/lib/VoucherifySdk/models/orders_get_response_body.rb +28 -28
  179. data/lib/VoucherifySdk/models/orders_import_create_request_body_item.rb +2 -2
  180. data/lib/VoucherifySdk/models/orders_update_request_body.rb +2 -2
  181. data/lib/VoucherifySdk/models/orders_update_response_body.rb +28 -28
  182. data/lib/VoucherifySdk/models/parameter_order_list_pending_points.rb +40 -0
  183. data/lib/VoucherifySdk/models/qualifications_option.rb +3 -3
  184. data/lib/VoucherifySdk/models/redeemable_loyalty_card.rb +1 -1
  185. data/lib/VoucherifySdk/models/redeemable_voucher_loyalty_card.rb +17 -6
  186. data/lib/VoucherifySdk/models/redemption_entry_order.rb +28 -28
  187. data/lib/VoucherifySdk/models/redemption_entry_voucher_loyalty_card.rb +17 -6
  188. data/lib/VoucherifySdk/models/redemption_voucher_loyalty_card.rb +17 -6
  189. data/lib/VoucherifySdk/models/redemptions_get_response_body_order.rb +28 -28
  190. data/lib/VoucherifySdk/models/redemptions_get_response_body_voucher_loyalty_card.rb +17 -6
  191. data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_order.rb +27 -28
  192. data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_voucher_loyalty_card.rb +17 -6
  193. data/lib/VoucherifySdk/models/simple_loyalty_card.rb +17 -6
  194. data/lib/VoucherifySdk/models/templates_campaigns_campaign_setup_create_request_body.rb +10 -1
  195. data/lib/VoucherifySdk/models/validations_validate_response_body_redeemables_item_result_discount.rb +1 -0
  196. data/lib/VoucherifySdk/models/voucher_loyalty_card.rb +17 -6
  197. data/lib/VoucherifySdk/models/voucher_transaction.rb +1 -1
  198. data/lib/VoucherifySdk/models/voucher_transaction_details.rb +20 -1
  199. data/lib/VoucherifySdk/models/voucher_transaction_details_custom_event.rb +2 -2
  200. data/lib/VoucherifySdk/models/voucher_transaction_details_earning_rule.rb +1 -1
  201. data/lib/VoucherifySdk/models/voucher_transaction_details_event_schema.rb +2 -2
  202. data/lib/VoucherifySdk/models/voucher_transaction_details_holder_loyalty_tier.rb +221 -0
  203. data/lib/VoucherifySdk/models/voucher_transaction_details_loyalty_tier.rb +3 -1
  204. data/lib/VoucherifySdk/models/voucher_transaction_details_rollback.rb +1 -1
  205. data/lib/VoucherifySdk/models/voucher_transaction_details_segment.rb +2 -0
  206. data/lib/VoucherifySdk/models/voucher_with_categories_loyalty_card.rb +17 -6
  207. data/lib/VoucherifySdk/models/vouchers_create_response_body_loyalty_card.rb +17 -6
  208. data/lib/VoucherifySdk/models/vouchers_disable_response_body_loyalty_card.rb +17 -6
  209. data/lib/VoucherifySdk/models/vouchers_enable_response_body_loyalty_card.rb +17 -6
  210. data/lib/VoucherifySdk/models/vouchers_get_response_body_loyalty_card.rb +17 -6
  211. data/lib/VoucherifySdk/models/vouchers_update_response_body_loyalty_card.rb +17 -6
  212. data/lib/VoucherifySdk/version.rb +1 -1
  213. data/lib/VoucherifySdk.rb +30 -0
  214. metadata +96 -36
@@ -76,6 +76,9 @@ module VoucherifySdk
76
76
  # A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
77
77
  attr_accessor :metadata
78
78
 
79
+ # Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.
80
+ attr_accessor :application_details
81
+
79
82
  class EnumAttributeValidator
80
83
  attr_reader :datatype
81
84
  attr_reader :allowable_values
@@ -121,7 +124,8 @@ module VoucherifySdk
121
124
  :'product' => :'product',
122
125
  :'sku' => :'sku',
123
126
  :'object' => :'object',
124
- :'metadata' => :'metadata'
127
+ :'metadata' => :'metadata',
128
+ :'application_details' => :'application_details'
125
129
  }
126
130
  end
127
131
 
@@ -153,7 +157,8 @@ module VoucherifySdk
153
157
  :'product' => :'OrderCalculatedItemProduct',
154
158
  :'sku' => :'OrderCalculatedItemSku',
155
159
  :'object' => :'String',
156
- :'metadata' => :'Object'
160
+ :'metadata' => :'Object',
161
+ :'application_details' => :'Array<ApplicationDetailsItem>'
157
162
  }
158
163
  end
159
164
 
@@ -180,7 +185,7 @@ module VoucherifySdk
180
185
  :'product',
181
186
  :'sku',
182
187
  :'object',
183
- :'metadata'
188
+ :'metadata',
184
189
  ])
185
190
  end
186
191
 
@@ -277,6 +282,12 @@ module VoucherifySdk
277
282
  if attributes.key?(:'metadata')
278
283
  self.metadata = attributes[:'metadata']
279
284
  end
285
+
286
+ if attributes.key?(:'application_details')
287
+ if (value = attributes[:'application_details']).is_a?(Array)
288
+ self.application_details = value
289
+ end
290
+ end
280
291
  end
281
292
 
282
293
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -323,7 +334,8 @@ module VoucherifySdk
323
334
  product == o.product &&
324
335
  sku == o.sku &&
325
336
  object == o.object &&
326
- metadata == o.metadata
337
+ metadata == o.metadata &&
338
+ application_details == o.application_details
327
339
  end
328
340
 
329
341
  # @see the `==` method
@@ -335,7 +347,7 @@ module VoucherifySdk
335
347
  # Calculates hash code according to all attributes.
336
348
  # @return [Integer] Hash code
337
349
  def hash
338
- [id, sku_id, product_id, related_object, source_id, quantity, discount_quantity, initial_quantity, amount, discount_amount, applied_discount_amount, applied_discount_quantity, applied_quantity, applied_quantity_amount, initial_amount, price, subtotal_amount, product, sku, object, metadata].hash
350
+ [id, sku_id, product_id, related_object, source_id, quantity, discount_quantity, initial_quantity, amount, discount_amount, applied_discount_amount, applied_discount_quantity, applied_quantity, applied_quantity_amount, initial_amount, price, subtotal_amount, product, sku, object, metadata, application_details].hash
339
351
  end
340
352
 
341
353
  # Builds the object from hash
@@ -21,7 +21,7 @@ module VoucherifySdk
21
21
  # Unique ID of the redemption rollback.
22
22
  attr_accessor :rollback_id
23
23
 
24
- # Timestamp representing the date and tiem when the redemption rollback was created. The value is shown in the ISO 8601 format.
24
+ # Timestamp representing the date and time when the redemption rollback was created. The value is shown in the ISO 8601 format.
25
25
  attr_accessor :rollback_date
26
26
 
27
27
  # The source of the incentive.
@@ -31,10 +31,10 @@ module VoucherifySdk
31
31
  # A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
32
32
  attr_accessor :initial_amount
33
33
 
34
- # Sum of all order-level discounts applied to the order.
34
+ # Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
35
35
  attr_accessor :discount_amount
36
36
 
37
- # Array of items applied to the order. It can include up 500 items.
37
+ # Array of items applied to the order. It can include up to 500 items.
38
38
  attr_accessor :items
39
39
 
40
40
  # A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
@@ -25,36 +25,33 @@ module VoucherifySdk
25
25
  # The order status.
26
26
  attr_accessor :status
27
27
 
28
- # A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
28
+ # This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
29
29
  attr_accessor :amount
30
30
 
31
- # A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
31
+ # This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
32
32
  attr_accessor :initial_amount
33
33
 
34
- # Sum of all order-level discounts applied to the order.
34
+ # Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
35
35
  attr_accessor :discount_amount
36
36
 
37
- # Sum of all product-specific discounts applied to the order.
37
+ # Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
38
38
  attr_accessor :items_discount_amount
39
39
 
40
- # Sum of all order-level AND all product-specific discounts applied to the order.
40
+ # Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
41
41
  attr_accessor :total_discount_amount
42
42
 
43
- # Order amount after undoing all the discounts through the rollback redemption.
43
+ # Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
44
44
  attr_accessor :total_amount
45
45
 
46
- # This field shows the order-level discount applied.
46
+ # This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
47
47
  attr_accessor :applied_discount_amount
48
48
 
49
- # Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)`
49
+ # Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). `sum(items, i => i.applied_discount_amount)`
50
50
  attr_accessor :items_applied_discount_amount
51
51
 
52
- # Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`
52
+ # Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`
53
53
  attr_accessor :total_applied_discount_amount
54
54
 
55
- # Array of items applied to the order. It can include up 500 items.
56
- attr_accessor :items
57
-
58
55
  # A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
59
56
  attr_accessor :metadata
60
57
 
@@ -67,7 +64,7 @@ module VoucherifySdk
67
64
  # Timestamp representing the date and time when the order was last updated in ISO 8601 format.
68
65
  attr_accessor :updated_at
69
66
 
70
- # Unique customer ID of the customer making the purchase.
67
+ # Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
71
68
  attr_accessor :customer_id
72
69
 
73
70
  # Unique referrer ID.
@@ -79,6 +76,9 @@ module VoucherifySdk
79
76
 
80
77
  attr_accessor :redemptions
81
78
 
79
+ # Array of items applied to the order. It can include up to 500 items.
80
+ attr_accessor :items
81
+
82
82
  class EnumAttributeValidator
83
83
  attr_reader :datatype
84
84
  attr_reader :allowable_values
@@ -116,7 +116,6 @@ module VoucherifySdk
116
116
  :'applied_discount_amount' => :'applied_discount_amount',
117
117
  :'items_applied_discount_amount' => :'items_applied_discount_amount',
118
118
  :'total_applied_discount_amount' => :'total_applied_discount_amount',
119
- :'items' => :'items',
120
119
  :'metadata' => :'metadata',
121
120
  :'object' => :'object',
122
121
  :'created_at' => :'created_at',
@@ -125,7 +124,8 @@ module VoucherifySdk
125
124
  :'referrer_id' => :'referrer_id',
126
125
  :'customer' => :'customer',
127
126
  :'referrer' => :'referrer',
128
- :'redemptions' => :'redemptions'
127
+ :'redemptions' => :'redemptions',
128
+ :'items' => :'items'
129
129
  }
130
130
  end
131
131
 
@@ -149,7 +149,6 @@ module VoucherifySdk
149
149
  :'applied_discount_amount' => :'Integer',
150
150
  :'items_applied_discount_amount' => :'Integer',
151
151
  :'total_applied_discount_amount' => :'Integer',
152
- :'items' => :'Array<OrderCalculatedItem>',
153
152
  :'metadata' => :'Object',
154
153
  :'object' => :'String',
155
154
  :'created_at' => :'Time',
@@ -158,7 +157,8 @@ module VoucherifySdk
158
157
  :'referrer_id' => :'String',
159
158
  :'customer' => :'CustomerId',
160
159
  :'referrer' => :'ReferrerId',
161
- :'redemptions' => :'Hash<String, OrderRedemptionsEntry>'
160
+ :'redemptions' => :'Hash<String, OrderRedemptionsEntry>',
161
+ :'items' => :'Array<OrderCalculatedItem>'
162
162
  }
163
163
  end
164
164
 
@@ -177,14 +177,14 @@ module VoucherifySdk
177
177
  :'applied_discount_amount',
178
178
  :'items_applied_discount_amount',
179
179
  :'total_applied_discount_amount',
180
- :'items',
181
180
  :'metadata',
182
181
  :'object',
183
182
  :'created_at',
184
183
  :'updated_at',
185
184
  :'customer_id',
186
185
  :'referrer_id',
187
- :'redemptions'
186
+ :'redemptions',
187
+ :'items'
188
188
  ])
189
189
  end
190
190
 
@@ -244,12 +244,6 @@ module VoucherifySdk
244
244
  self.total_applied_discount_amount = attributes[:'total_applied_discount_amount']
245
245
  end
246
246
 
247
- if attributes.key?(:'items')
248
- if (value = attributes[:'items']).is_a?(Array)
249
- self.items = value
250
- end
251
- end
252
-
253
247
  if attributes.key?(:'metadata')
254
248
  self.metadata = attributes[:'metadata']
255
249
  end
@@ -289,6 +283,12 @@ module VoucherifySdk
289
283
  self.redemptions = value
290
284
  end
291
285
  end
286
+
287
+ if attributes.key?(:'items')
288
+ if (value = attributes[:'items']).is_a?(Array)
289
+ self.items = value
290
+ end
291
+ end
292
292
  end
293
293
 
294
294
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -327,7 +327,6 @@ module VoucherifySdk
327
327
  applied_discount_amount == o.applied_discount_amount &&
328
328
  items_applied_discount_amount == o.items_applied_discount_amount &&
329
329
  total_applied_discount_amount == o.total_applied_discount_amount &&
330
- items == o.items &&
331
330
  metadata == o.metadata &&
332
331
  object == o.object &&
333
332
  created_at == o.created_at &&
@@ -336,7 +335,8 @@ module VoucherifySdk
336
335
  referrer_id == o.referrer_id &&
337
336
  customer == o.customer &&
338
337
  referrer == o.referrer &&
339
- redemptions == o.redemptions
338
+ redemptions == o.redemptions &&
339
+ items == o.items
340
340
  end
341
341
 
342
342
  # @see the `==` method
@@ -348,7 +348,7 @@ module VoucherifySdk
348
348
  # Calculates hash code according to all attributes.
349
349
  # @return [Integer] Hash code
350
350
  def hash
351
- [id, source_id, status, amount, initial_amount, discount_amount, items_discount_amount, total_discount_amount, total_amount, applied_discount_amount, items_applied_discount_amount, total_applied_discount_amount, items, metadata, object, created_at, updated_at, customer_id, referrer_id, customer, referrer, redemptions].hash
351
+ [id, source_id, status, amount, initial_amount, discount_amount, items_discount_amount, total_discount_amount, total_amount, applied_discount_amount, items_applied_discount_amount, total_applied_discount_amount, metadata, object, created_at, updated_at, customer_id, referrer_id, customer, referrer, redemptions, items].hash
352
352
  end
353
353
 
354
354
  # Builds the object from hash
@@ -25,36 +25,33 @@ module VoucherifySdk
25
25
  # The order status.
26
26
  attr_accessor :status
27
27
 
28
- # A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
28
+ # This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
29
29
  attr_accessor :amount
30
30
 
31
- # A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
31
+ # This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
32
32
  attr_accessor :initial_amount
33
33
 
34
- # Sum of all order-level discounts applied to the order.
34
+ # Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
35
35
  attr_accessor :discount_amount
36
36
 
37
- # Sum of all product-specific discounts applied to the order.
37
+ # Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
38
38
  attr_accessor :items_discount_amount
39
39
 
40
- # Sum of all order-level AND all product-specific discounts applied to the order.
40
+ # Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
41
41
  attr_accessor :total_discount_amount
42
42
 
43
- # Order amount after undoing all the discounts through the rollback redemption.
43
+ # Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
44
44
  attr_accessor :total_amount
45
45
 
46
- # This field shows the order-level discount applied.
46
+ # This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
47
47
  attr_accessor :applied_discount_amount
48
48
 
49
- # Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)`
49
+ # Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). `sum(items, i => i.applied_discount_amount)`
50
50
  attr_accessor :items_applied_discount_amount
51
51
 
52
- # Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`
52
+ # Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`
53
53
  attr_accessor :total_applied_discount_amount
54
54
 
55
- # Array of items applied to the order. It can include up 500 items.
56
- attr_accessor :items
57
-
58
55
  # A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
59
56
  attr_accessor :metadata
60
57
 
@@ -67,7 +64,7 @@ module VoucherifySdk
67
64
  # Timestamp representing the date and time when the order was last updated in ISO 8601 format.
68
65
  attr_accessor :updated_at
69
66
 
70
- # Unique customer ID of the customer making the purchase.
67
+ # Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
71
68
  attr_accessor :customer_id
72
69
 
73
70
  # Unique referrer ID.
@@ -79,6 +76,9 @@ module VoucherifySdk
79
76
 
80
77
  attr_accessor :redemptions
81
78
 
79
+ # Array of items applied to the order. It can include up to 500 items.
80
+ attr_accessor :items
81
+
82
82
  class EnumAttributeValidator
83
83
  attr_reader :datatype
84
84
  attr_reader :allowable_values
@@ -116,7 +116,6 @@ module VoucherifySdk
116
116
  :'applied_discount_amount' => :'applied_discount_amount',
117
117
  :'items_applied_discount_amount' => :'items_applied_discount_amount',
118
118
  :'total_applied_discount_amount' => :'total_applied_discount_amount',
119
- :'items' => :'items',
120
119
  :'metadata' => :'metadata',
121
120
  :'object' => :'object',
122
121
  :'created_at' => :'created_at',
@@ -125,7 +124,8 @@ module VoucherifySdk
125
124
  :'referrer_id' => :'referrer_id',
126
125
  :'customer' => :'customer',
127
126
  :'referrer' => :'referrer',
128
- :'redemptions' => :'redemptions'
127
+ :'redemptions' => :'redemptions',
128
+ :'items' => :'items'
129
129
  }
130
130
  end
131
131
 
@@ -149,7 +149,6 @@ module VoucherifySdk
149
149
  :'applied_discount_amount' => :'Integer',
150
150
  :'items_applied_discount_amount' => :'Integer',
151
151
  :'total_applied_discount_amount' => :'Integer',
152
- :'items' => :'Array<OrderCalculatedItem>',
153
152
  :'metadata' => :'Object',
154
153
  :'object' => :'String',
155
154
  :'created_at' => :'Time',
@@ -158,7 +157,8 @@ module VoucherifySdk
158
157
  :'referrer_id' => :'String',
159
158
  :'customer' => :'CustomerId',
160
159
  :'referrer' => :'ReferrerId',
161
- :'redemptions' => :'Hash<String, OrderRedemptionsEntry>'
160
+ :'redemptions' => :'Hash<String, OrderRedemptionsEntry>',
161
+ :'items' => :'Array<OrderCalculatedItem>'
162
162
  }
163
163
  end
164
164
 
@@ -177,14 +177,14 @@ module VoucherifySdk
177
177
  :'applied_discount_amount',
178
178
  :'items_applied_discount_amount',
179
179
  :'total_applied_discount_amount',
180
- :'items',
181
180
  :'metadata',
182
181
  :'object',
183
182
  :'created_at',
184
183
  :'updated_at',
185
184
  :'customer_id',
186
185
  :'referrer_id',
187
- :'redemptions'
186
+ :'redemptions',
187
+ :'items'
188
188
  ])
189
189
  end
190
190
 
@@ -244,12 +244,6 @@ module VoucherifySdk
244
244
  self.total_applied_discount_amount = attributes[:'total_applied_discount_amount']
245
245
  end
246
246
 
247
- if attributes.key?(:'items')
248
- if (value = attributes[:'items']).is_a?(Array)
249
- self.items = value
250
- end
251
- end
252
-
253
247
  if attributes.key?(:'metadata')
254
248
  self.metadata = attributes[:'metadata']
255
249
  end
@@ -289,6 +283,12 @@ module VoucherifySdk
289
283
  self.redemptions = value
290
284
  end
291
285
  end
286
+
287
+ if attributes.key?(:'items')
288
+ if (value = attributes[:'items']).is_a?(Array)
289
+ self.items = value
290
+ end
291
+ end
292
292
  end
293
293
 
294
294
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -327,7 +327,6 @@ module VoucherifySdk
327
327
  applied_discount_amount == o.applied_discount_amount &&
328
328
  items_applied_discount_amount == o.items_applied_discount_amount &&
329
329
  total_applied_discount_amount == o.total_applied_discount_amount &&
330
- items == o.items &&
331
330
  metadata == o.metadata &&
332
331
  object == o.object &&
333
332
  created_at == o.created_at &&
@@ -336,7 +335,8 @@ module VoucherifySdk
336
335
  referrer_id == o.referrer_id &&
337
336
  customer == o.customer &&
338
337
  referrer == o.referrer &&
339
- redemptions == o.redemptions
338
+ redemptions == o.redemptions &&
339
+ items == o.items
340
340
  end
341
341
 
342
342
  # @see the `==` method
@@ -348,7 +348,7 @@ module VoucherifySdk
348
348
  # Calculates hash code according to all attributes.
349
349
  # @return [Integer] Hash code
350
350
  def hash
351
- [id, source_id, status, amount, initial_amount, discount_amount, items_discount_amount, total_discount_amount, total_amount, applied_discount_amount, items_applied_discount_amount, total_applied_discount_amount, items, metadata, object, created_at, updated_at, customer_id, referrer_id, customer, referrer, redemptions].hash
351
+ [id, source_id, status, amount, initial_amount, discount_amount, items_discount_amount, total_discount_amount, total_amount, applied_discount_amount, items_applied_discount_amount, total_applied_discount_amount, metadata, object, created_at, updated_at, customer_id, referrer_id, customer, referrer, redemptions, items].hash
352
352
  end
353
353
 
354
354
  # Builds the object from hash
@@ -30,10 +30,10 @@ module VoucherifySdk
30
30
  # A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
31
31
  attr_accessor :initial_amount
32
32
 
33
- # Sum of all order-level discounts applied to the order.
33
+ # Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
34
34
  attr_accessor :discount_amount
35
35
 
36
- # Array of items applied to the order. It can include up 500 items.
36
+ # Array of items applied to the order. It can include up to 500 items.
37
37
  attr_accessor :items
38
38
 
39
39
  # A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
@@ -28,10 +28,10 @@ module VoucherifySdk
28
28
  # A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
29
29
  attr_accessor :initial_amount
30
30
 
31
- # Sum of all order-level discounts applied to the order.
31
+ # Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
32
32
  attr_accessor :discount_amount
33
33
 
34
- # Array of items applied to the order. It can include up 500 items.
34
+ # Array of items applied to the order. It can include up to 500 items.
35
35
  attr_accessor :items
36
36
 
37
37
  # A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
@@ -25,36 +25,33 @@ module VoucherifySdk
25
25
  # The order status.
26
26
  attr_accessor :status
27
27
 
28
- # A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
28
+ # This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
29
29
  attr_accessor :amount
30
30
 
31
- # A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
31
+ # This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
32
32
  attr_accessor :initial_amount
33
33
 
34
- # Sum of all order-level discounts applied to the order.
34
+ # Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
35
35
  attr_accessor :discount_amount
36
36
 
37
- # Sum of all product-specific discounts applied to the order.
37
+ # Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
38
38
  attr_accessor :items_discount_amount
39
39
 
40
- # Sum of all order-level AND all product-specific discounts applied to the order.
40
+ # Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
41
41
  attr_accessor :total_discount_amount
42
42
 
43
- # Order amount after undoing all the discounts through the rollback redemption.
43
+ # Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
44
44
  attr_accessor :total_amount
45
45
 
46
- # This field shows the order-level discount applied.
46
+ # This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
47
47
  attr_accessor :applied_discount_amount
48
48
 
49
- # Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)`
49
+ # Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). `sum(items, i => i.applied_discount_amount)`
50
50
  attr_accessor :items_applied_discount_amount
51
51
 
52
- # Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`
52
+ # Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`
53
53
  attr_accessor :total_applied_discount_amount
54
54
 
55
- # Array of items applied to the order. It can include up 500 items.
56
- attr_accessor :items
57
-
58
55
  # A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
59
56
  attr_accessor :metadata
60
57
 
@@ -67,7 +64,7 @@ module VoucherifySdk
67
64
  # Timestamp representing the date and time when the order was last updated in ISO 8601 format.
68
65
  attr_accessor :updated_at
69
66
 
70
- # Unique customer ID of the customer making the purchase.
67
+ # Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
71
68
  attr_accessor :customer_id
72
69
 
73
70
  # Unique referrer ID.
@@ -79,6 +76,9 @@ module VoucherifySdk
79
76
 
80
77
  attr_accessor :redemptions
81
78
 
79
+ # Array of items applied to the order. It can include up to 500 items.
80
+ attr_accessor :items
81
+
82
82
  class EnumAttributeValidator
83
83
  attr_reader :datatype
84
84
  attr_reader :allowable_values
@@ -116,7 +116,6 @@ module VoucherifySdk
116
116
  :'applied_discount_amount' => :'applied_discount_amount',
117
117
  :'items_applied_discount_amount' => :'items_applied_discount_amount',
118
118
  :'total_applied_discount_amount' => :'total_applied_discount_amount',
119
- :'items' => :'items',
120
119
  :'metadata' => :'metadata',
121
120
  :'object' => :'object',
122
121
  :'created_at' => :'created_at',
@@ -125,7 +124,8 @@ module VoucherifySdk
125
124
  :'referrer_id' => :'referrer_id',
126
125
  :'customer' => :'customer',
127
126
  :'referrer' => :'referrer',
128
- :'redemptions' => :'redemptions'
127
+ :'redemptions' => :'redemptions',
128
+ :'items' => :'items'
129
129
  }
130
130
  end
131
131
 
@@ -149,7 +149,6 @@ module VoucherifySdk
149
149
  :'applied_discount_amount' => :'Integer',
150
150
  :'items_applied_discount_amount' => :'Integer',
151
151
  :'total_applied_discount_amount' => :'Integer',
152
- :'items' => :'Array<OrderCalculatedItem>',
153
152
  :'metadata' => :'Object',
154
153
  :'object' => :'String',
155
154
  :'created_at' => :'Time',
@@ -158,7 +157,8 @@ module VoucherifySdk
158
157
  :'referrer_id' => :'String',
159
158
  :'customer' => :'CustomerId',
160
159
  :'referrer' => :'ReferrerId',
161
- :'redemptions' => :'Hash<String, OrderRedemptionsEntry>'
160
+ :'redemptions' => :'Hash<String, OrderRedemptionsEntry>',
161
+ :'items' => :'Array<OrderCalculatedItem>'
162
162
  }
163
163
  end
164
164
 
@@ -177,14 +177,14 @@ module VoucherifySdk
177
177
  :'applied_discount_amount',
178
178
  :'items_applied_discount_amount',
179
179
  :'total_applied_discount_amount',
180
- :'items',
181
180
  :'metadata',
182
181
  :'object',
183
182
  :'created_at',
184
183
  :'updated_at',
185
184
  :'customer_id',
186
185
  :'referrer_id',
187
- :'redemptions'
186
+ :'redemptions',
187
+ :'items'
188
188
  ])
189
189
  end
190
190
 
@@ -244,12 +244,6 @@ module VoucherifySdk
244
244
  self.total_applied_discount_amount = attributes[:'total_applied_discount_amount']
245
245
  end
246
246
 
247
- if attributes.key?(:'items')
248
- if (value = attributes[:'items']).is_a?(Array)
249
- self.items = value
250
- end
251
- end
252
-
253
247
  if attributes.key?(:'metadata')
254
248
  self.metadata = attributes[:'metadata']
255
249
  end
@@ -289,6 +283,12 @@ module VoucherifySdk
289
283
  self.redemptions = value
290
284
  end
291
285
  end
286
+
287
+ if attributes.key?(:'items')
288
+ if (value = attributes[:'items']).is_a?(Array)
289
+ self.items = value
290
+ end
291
+ end
292
292
  end
293
293
 
294
294
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -327,7 +327,6 @@ module VoucherifySdk
327
327
  applied_discount_amount == o.applied_discount_amount &&
328
328
  items_applied_discount_amount == o.items_applied_discount_amount &&
329
329
  total_applied_discount_amount == o.total_applied_discount_amount &&
330
- items == o.items &&
331
330
  metadata == o.metadata &&
332
331
  object == o.object &&
333
332
  created_at == o.created_at &&
@@ -336,7 +335,8 @@ module VoucherifySdk
336
335
  referrer_id == o.referrer_id &&
337
336
  customer == o.customer &&
338
337
  referrer == o.referrer &&
339
- redemptions == o.redemptions
338
+ redemptions == o.redemptions &&
339
+ items == o.items
340
340
  end
341
341
 
342
342
  # @see the `==` method
@@ -348,7 +348,7 @@ module VoucherifySdk
348
348
  # Calculates hash code according to all attributes.
349
349
  # @return [Integer] Hash code
350
350
  def hash
351
- [id, source_id, status, amount, initial_amount, discount_amount, items_discount_amount, total_discount_amount, total_amount, applied_discount_amount, items_applied_discount_amount, total_applied_discount_amount, items, metadata, object, created_at, updated_at, customer_id, referrer_id, customer, referrer, redemptions].hash
351
+ [id, source_id, status, amount, initial_amount, discount_amount, items_discount_amount, total_discount_amount, total_amount, applied_discount_amount, items_applied_discount_amount, total_applied_discount_amount, metadata, object, created_at, updated_at, customer_id, referrer_id, customer, referrer, redemptions, items].hash
352
352
  end
353
353
 
354
354
  # Builds the object from hash