voucherify 8.0.1 → 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 (289) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +1 -1
  3. data/ENDPOINTS-COVERAGE.md +69 -60
  4. data/Gemfile.lock +9 -7
  5. data/README.md +55 -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 +3 -3
  16. data/docs/CampaignBase.md +3 -2
  17. data/docs/CampaignsApi.md +3 -3
  18. data/docs/CampaignsCreateRequestBody.md +2 -1
  19. data/docs/CampaignsCreateResponseBody.md +3 -3
  20. data/docs/CampaignsGetResponseBody.md +3 -3
  21. data/docs/CampaignsUpdateRequestBody.md +3 -2
  22. data/docs/CampaignsUpdateResponseBody.md +3 -3
  23. data/docs/CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md +2 -1
  24. data/docs/CampaignsVouchersCreateResponseBodyLoyaltyCard.md +2 -1
  25. data/docs/ClientValidationsValidateResponseBodyRedeemablesItem.md +3 -2
  26. data/docs/ClientValidationsValidateResponseBodyRedeemablesItemResultDiscount.md +1 -1
  27. data/docs/CustomerLoyalty.md +1 -1
  28. data/docs/Discount.md +1 -1
  29. data/docs/DiscountUnitMultipleOneUnit.md +1 -1
  30. data/docs/EarningRule.md +1 -0
  31. data/docs/EarningRulePendingPoints.md +9 -0
  32. data/docs/Error.md +1 -0
  33. data/docs/ErrorError.md +8 -0
  34. data/docs/EventSource.md +10 -0
  35. data/docs/EventSourceApiKey.md +9 -0
  36. data/docs/EventSourceUser.md +8 -0
  37. data/docs/InapplicableTo.md +3 -2
  38. data/docs/InapplicableToOrderItemUnitsItem.md +9 -0
  39. data/docs/LoyaltiesApi.md +334 -10
  40. data/docs/LoyaltiesCreateCampaignRequestBody.md +2 -1
  41. data/docs/LoyaltiesEarningRulesCreateResponseBody.md +1 -0
  42. data/docs/LoyaltiesEarningRulesCreateResponseBodyPendingPoints.md +9 -0
  43. data/docs/LoyaltiesEarningRulesDisableResponseBody.md +1 -0
  44. data/docs/LoyaltiesEarningRulesDisableResponseBodyPendingPoints.md +9 -0
  45. data/docs/LoyaltiesEarningRulesEnableResponseBody.md +1 -0
  46. data/docs/LoyaltiesEarningRulesEnableResponseBodyPendingPoints.md +9 -0
  47. data/docs/LoyaltiesEarningRulesGetResponseBody.md +1 -0
  48. data/docs/LoyaltiesEarningRulesGetResponseBodyPendingPoints.md +9 -0
  49. data/docs/LoyaltiesEarningRulesUpdateResponseBody.md +1 -0
  50. data/docs/LoyaltiesEarningRulesUpdateResponseBodyPendingPoints.md +9 -0
  51. data/docs/LoyaltiesMembersBalanceUpdateResponseBody.md +1 -1
  52. data/docs/LoyaltiesMembersCreateResponseBodyLoyaltyCard.md +2 -1
  53. data/docs/LoyaltiesMembersGetResponseBodyLoyaltyCard.md +2 -1
  54. data/docs/LoyaltiesMembersPendingPointsActivateResponseBody.md +14 -0
  55. data/docs/LoyaltiesMembersPendingPointsActivateResponseBodyRelatedObject.md +9 -0
  56. data/docs/LoyaltiesMembersPendingPointsListResponseBody.md +12 -0
  57. data/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md +9 -9
  58. data/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md +1 -1
  59. data/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherLoyaltyCard.md +2 -1
  60. data/docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md +2 -1
  61. data/docs/LoyaltiesPendingPointsListResponseBody.md +12 -0
  62. data/docs/LoyaltiesUpdateCampaignRequestBody.md +3 -2
  63. data/docs/LoyaltyCardTransaction.md +2 -2
  64. data/docs/LoyaltyCardTransactionDetails.md +2 -0
  65. data/docs/LoyaltyCardTransactionDetailsBalance.md +5 -4
  66. data/docs/LoyaltyCardTransactionDetailsBalanceRelatedObject.md +1 -1
  67. data/docs/LoyaltyCardTransactionDetailsEarningRule.md +1 -1
  68. data/docs/LoyaltyCardTransactionDetailsHolderLoyaltyTier.md +9 -0
  69. data/docs/LoyaltyCardTransactionDetailsLoyaltyTier.md +2 -2
  70. data/docs/LoyaltyMemberLoyaltyCard.md +2 -1
  71. data/docs/LoyaltyPendingPoints.md +17 -0
  72. data/docs/LoyaltyPendingPointsDetails.md +12 -0
  73. data/docs/LoyaltyPendingPointsDetailsEarningRule.md +9 -0
  74. data/docs/LoyaltyPendingPointsDetailsEarningRuleSource.md +8 -0
  75. data/docs/LoyaltyPendingPointsDetailsEvent.md +14 -0
  76. data/docs/LoyaltyPendingPointsDetailsHolderLoyaltyTier.md +9 -0
  77. data/docs/LoyaltyPendingPointsDetailsLoyaltyTier.md +9 -0
  78. data/docs/LoyaltyPendingPointsDetailsOrder.md +9 -0
  79. data/docs/LoyaltyPointsBucket.md +16 -0
  80. data/docs/LoyaltyPointsBucketBucket.md +8 -0
  81. data/docs/LoyaltyTierExpiration.md +1 -1
  82. data/docs/Order.md +3 -3
  83. data/docs/OrderCalculated.md +12 -12
  84. data/docs/OrderCalculatedItem.md +2 -1
  85. data/docs/OrderCalculatedItemProduct.md +1 -1
  86. data/docs/OrderCalculatedItemSku.md +1 -0
  87. data/docs/OrderItem.md +1 -1
  88. data/docs/OrderItemProduct.md +1 -1
  89. data/docs/OrderItemSku.md +1 -0
  90. data/docs/OrderRedemptionsEntry.md +1 -1
  91. data/docs/OrdersCreateRequestBody.md +3 -3
  92. data/docs/OrdersCreateResponseBody.md +12 -12
  93. data/docs/OrdersGetResponseBody.md +12 -12
  94. data/docs/OrdersImportCreateRequestBodyItem.md +3 -3
  95. data/docs/OrdersUpdateRequestBody.md +3 -3
  96. data/docs/OrdersUpdateResponseBody.md +12 -12
  97. data/docs/ParameterOrderListPendingPoints.md +7 -0
  98. data/docs/Product.md +1 -1
  99. data/docs/ProductCollectionsProductsListResponseBodyDataItem.md +1 -1
  100. data/docs/ProductWithoutSkus.md +1 -1
  101. data/docs/ProductsCreateResponseBody.md +1 -1
  102. data/docs/ProductsGetResponseBody.md +1 -1
  103. data/docs/ProductsSkusCreateResponseBody.md +1 -1
  104. data/docs/ProductsSkusUpdateResponseBody.md +1 -1
  105. data/docs/ProductsUpdateResponseBody.md +1 -1
  106. data/docs/RedeemableLoyaltyCard.md +1 -1
  107. data/docs/RedeemableVoucherLoyaltyCard.md +2 -1
  108. data/docs/RedemptionEntryOrder.md +12 -12
  109. data/docs/RedemptionEntryVoucherLoyaltyCard.md +2 -1
  110. data/docs/RedemptionVoucherLoyaltyCard.md +2 -1
  111. data/docs/RedemptionsGetResponseBodyOrder.md +12 -12
  112. data/docs/RedemptionsGetResponseBodyVoucherLoyaltyCard.md +2 -1
  113. data/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md +12 -12
  114. data/docs/RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard.md +2 -1
  115. data/docs/SimpleLoyaltyCard.md +2 -1
  116. data/docs/Sku.md +1 -1
  117. data/docs/SkusGetResponseBody.md +1 -1
  118. data/docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md +2 -1
  119. data/docs/ValidationsRedeemableInapplicable.md +3 -2
  120. data/docs/ValidationsRedeemableSkipped.md +3 -2
  121. data/docs/ValidationsValidateResponseBodyRedeemablesItem.md +3 -2
  122. data/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.md +1 -1
  123. data/docs/VoucherBalance.md +14 -0
  124. data/docs/VoucherBalanceRelatedObject.md +9 -0
  125. data/docs/VoucherLoyaltyCard.md +2 -1
  126. data/docs/VoucherTransaction.md +2 -2
  127. data/docs/VoucherTransactionDetails.md +2 -0
  128. data/docs/VoucherTransactionDetailsBalance.md +5 -4
  129. data/docs/VoucherTransactionDetailsBalanceRelatedObject.md +1 -1
  130. data/docs/VoucherTransactionDetailsCustomEvent.md +2 -2
  131. data/docs/VoucherTransactionDetailsEarningRule.md +1 -1
  132. data/docs/VoucherTransactionDetailsEventSchema.md +2 -2
  133. data/docs/VoucherTransactionDetailsHolderLoyaltyTier.md +9 -0
  134. data/docs/VoucherTransactionDetailsLoyaltyTier.md +2 -2
  135. data/docs/VoucherTransactionDetailsRollback.md +1 -1
  136. data/docs/VoucherTransactionDetailsSegment.md +2 -2
  137. data/docs/VoucherWithCategoriesLoyaltyCard.md +2 -1
  138. data/docs/VouchersApi.md +6 -6
  139. data/docs/VouchersBalanceUpdateResponseBody.md +1 -1
  140. data/docs/VouchersCreateResponseBodyLoyaltyCard.md +2 -1
  141. data/docs/VouchersDisableResponseBodyLoyaltyCard.md +2 -1
  142. data/docs/VouchersEnableResponseBodyLoyaltyCard.md +2 -1
  143. data/docs/VouchersGetResponseBodyLoyaltyCard.md +2 -1
  144. data/docs/VouchersUpdateResponseBodyLoyaltyCard.md +2 -1
  145. data/lib/VoucherifySdk/api/bin_api.rb +4 -4
  146. data/lib/VoucherifySdk/api/campaigns_api.rb +4 -4
  147. data/lib/VoucherifySdk/api/loyalties_api.rb +334 -8
  148. data/lib/VoucherifySdk/api/vouchers_api.rb +10 -10
  149. data/lib/VoucherifySdk/models/access_settings.rb +219 -0
  150. data/lib/VoucherifySdk/models/access_settings_assign.rb +238 -0
  151. data/lib/VoucherifySdk/models/access_settings_campaign_assignments_list.rb +1 -1
  152. data/lib/VoucherifySdk/models/access_settings_unassign.rb +238 -0
  153. data/lib/VoucherifySdk/models/applicable_to.rb +16 -3
  154. data/lib/VoucherifySdk/models/applicable_to_order_item_units_item.rb +220 -0
  155. data/lib/VoucherifySdk/models/application_details_item.rb +284 -0
  156. data/lib/VoucherifySdk/models/area_store_campaign_assignment.rb +12 -1
  157. data/lib/VoucherifySdk/models/campaign.rb +16 -16
  158. data/lib/VoucherifySdk/models/campaign_base.rb +16 -7
  159. data/lib/VoucherifySdk/models/campaigns_create_request_body.rb +11 -2
  160. data/lib/VoucherifySdk/models/campaigns_create_response_body.rb +16 -16
  161. data/lib/VoucherifySdk/models/campaigns_get_response_body.rb +16 -16
  162. data/lib/VoucherifySdk/models/campaigns_update_request_body.rb +12 -3
  163. data/lib/VoucherifySdk/models/campaigns_update_response_body.rb +16 -16
  164. data/lib/VoucherifySdk/models/campaigns_vouchers_create_combined_response_body_loyalty_card.rb +17 -6
  165. data/lib/VoucherifySdk/models/campaigns_vouchers_create_response_body_loyalty_card.rb +17 -6
  166. data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item.rb +18 -7
  167. data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item_result_discount.rb +1 -0
  168. data/lib/VoucherifySdk/models/customer_loyalty.rb +1 -1
  169. data/lib/VoucherifySdk/models/discount.rb +1 -0
  170. data/lib/VoucherifySdk/models/discount_unit_multiple_one_unit.rb +1 -0
  171. data/lib/VoucherifySdk/models/earning_rule.rb +11 -1
  172. data/lib/VoucherifySdk/models/earning_rule_pending_points.rb +257 -0
  173. data/lib/VoucherifySdk/models/error.rb +15 -5
  174. data/lib/VoucherifySdk/models/error_error.rb +210 -0
  175. data/lib/VoucherifySdk/models/event_source.rb +254 -0
  176. data/lib/VoucherifySdk/models/event_source_api_key.rb +221 -0
  177. data/lib/VoucherifySdk/models/event_source_user.rb +210 -0
  178. data/lib/VoucherifySdk/models/inapplicable_to.rb +16 -3
  179. data/lib/VoucherifySdk/models/inapplicable_to_order_item_units_item.rb +220 -0
  180. data/lib/VoucherifySdk/models/loyalties_create_campaign_request_body.rb +11 -2
  181. data/lib/VoucherifySdk/models/loyalties_earning_rules_create_response_body.rb +11 -1
  182. data/lib/VoucherifySdk/models/loyalties_earning_rules_create_response_body_pending_points.rb +257 -0
  183. data/lib/VoucherifySdk/models/loyalties_earning_rules_disable_response_body.rb +11 -1
  184. data/lib/VoucherifySdk/models/loyalties_earning_rules_disable_response_body_pending_points.rb +257 -0
  185. data/lib/VoucherifySdk/models/loyalties_earning_rules_enable_response_body.rb +11 -1
  186. data/lib/VoucherifySdk/models/loyalties_earning_rules_enable_response_body_pending_points.rb +257 -0
  187. data/lib/VoucherifySdk/models/loyalties_earning_rules_get_response_body.rb +11 -1
  188. data/lib/VoucherifySdk/models/loyalties_earning_rules_get_response_body_pending_points.rb +257 -0
  189. data/lib/VoucherifySdk/models/loyalties_earning_rules_update_response_body.rb +11 -1
  190. data/lib/VoucherifySdk/models/loyalties_earning_rules_update_response_body_pending_points.rb +257 -0
  191. data/lib/VoucherifySdk/models/loyalties_members_balance_update_response_body.rb +1 -0
  192. data/lib/VoucherifySdk/models/loyalties_members_create_response_body_loyalty_card.rb +17 -6
  193. data/lib/VoucherifySdk/models/loyalties_members_get_response_body_loyalty_card.rb +17 -6
  194. data/lib/VoucherifySdk/models/loyalties_members_pending_points_activate_response_body.rb +309 -0
  195. data/lib/VoucherifySdk/models/loyalties_members_pending_points_activate_response_body_related_object.rb +247 -0
  196. data/lib/VoucherifySdk/models/loyalties_members_pending_points_list_response_body.rb +286 -0
  197. data/lib/VoucherifySdk/models/loyalties_members_points_expiration_list_response_body_data_item.rb +27 -77
  198. data/lib/VoucherifySdk/models/loyalties_members_points_expiration_list_response_body_data_item_bucket.rb +3 -9
  199. data/lib/VoucherifySdk/models/loyalties_members_redemption_redeem_response_body_voucher_loyalty_card.rb +17 -6
  200. data/lib/VoucherifySdk/models/loyalties_members_transfers_create_response_body_loyalty_card.rb +17 -6
  201. data/lib/VoucherifySdk/models/loyalties_pending_points_list_response_body.rb +286 -0
  202. data/lib/VoucherifySdk/models/loyalties_update_campaign_request_body.rb +12 -3
  203. data/lib/VoucherifySdk/models/loyalty_card_transaction.rb +24 -31
  204. data/lib/VoucherifySdk/models/loyalty_card_transaction_details.rb +20 -2
  205. data/lib/VoucherifySdk/models/loyalty_card_transaction_details_balance.rb +18 -19
  206. data/lib/VoucherifySdk/models/loyalty_card_transaction_details_balance_related_object.rb +1 -7
  207. data/lib/VoucherifySdk/models/loyalty_card_transaction_details_earning_rule.rb +1 -1
  208. data/lib/VoucherifySdk/models/loyalty_card_transaction_details_holder_loyalty_tier.rb +221 -0
  209. data/lib/VoucherifySdk/models/loyalty_card_transaction_details_loyalty_tier.rb +3 -1
  210. data/lib/VoucherifySdk/models/loyalty_card_transactions_type.rb +2 -1
  211. data/lib/VoucherifySdk/models/loyalty_member_loyalty_card.rb +17 -6
  212. data/lib/VoucherifySdk/models/loyalty_pending_points.rb +314 -0
  213. data/lib/VoucherifySdk/models/loyalty_pending_points_details.rb +249 -0
  214. data/lib/VoucherifySdk/models/loyalty_pending_points_details_earning_rule.rb +220 -0
  215. data/lib/VoucherifySdk/models/loyalty_pending_points_details_earning_rule_source.rb +210 -0
  216. data/lib/VoucherifySdk/models/loyalty_pending_points_details_event.rb +302 -0
  217. data/lib/VoucherifySdk/models/loyalty_pending_points_details_holder_loyalty_tier.rb +221 -0
  218. data/lib/VoucherifySdk/models/loyalty_pending_points_details_loyalty_tier.rb +221 -0
  219. data/lib/VoucherifySdk/models/loyalty_pending_points_details_order.rb +221 -0
  220. data/lib/VoucherifySdk/models/loyalty_points_bucket.rb +323 -0
  221. data/lib/VoucherifySdk/models/loyalty_points_bucket_bucket.rb +210 -0
  222. data/lib/VoucherifySdk/models/loyalty_tier_expiration.rb +1 -1
  223. data/lib/VoucherifySdk/models/order.rb +3 -3
  224. data/lib/VoucherifySdk/models/order_calculated.rb +29 -29
  225. data/lib/VoucherifySdk/models/order_calculated_item.rb +18 -6
  226. data/lib/VoucherifySdk/models/order_calculated_item_product.rb +1 -1
  227. data/lib/VoucherifySdk/models/order_calculated_item_sku.rb +16 -5
  228. data/lib/VoucherifySdk/models/order_item.rb +1 -1
  229. data/lib/VoucherifySdk/models/order_item_product.rb +1 -1
  230. data/lib/VoucherifySdk/models/order_item_sku.rb +16 -5
  231. data/lib/VoucherifySdk/models/order_redemptions_entry.rb +1 -1
  232. data/lib/VoucherifySdk/models/orders_create_request_body.rb +3 -3
  233. data/lib/VoucherifySdk/models/orders_create_response_body.rb +29 -29
  234. data/lib/VoucherifySdk/models/orders_get_response_body.rb +29 -29
  235. data/lib/VoucherifySdk/models/orders_import_create_request_body_item.rb +3 -3
  236. data/lib/VoucherifySdk/models/orders_update_request_body.rb +3 -3
  237. data/lib/VoucherifySdk/models/orders_update_response_body.rb +29 -29
  238. data/lib/VoucherifySdk/models/parameter_expand_list_campaigns.rb +2 -1
  239. data/lib/VoucherifySdk/models/parameter_order_list_pending_points.rb +40 -0
  240. data/lib/VoucherifySdk/models/product.rb +1 -1
  241. data/lib/VoucherifySdk/models/product_collections_products_list_response_body_data_item.rb +1 -1
  242. data/lib/VoucherifySdk/models/product_without_skus.rb +1 -1
  243. data/lib/VoucherifySdk/models/products_create_response_body.rb +1 -1
  244. data/lib/VoucherifySdk/models/products_get_response_body.rb +1 -1
  245. data/lib/VoucherifySdk/models/products_skus_create_response_body.rb +1 -1
  246. data/lib/VoucherifySdk/models/products_skus_update_response_body.rb +1 -1
  247. data/lib/VoucherifySdk/models/products_update_response_body.rb +1 -1
  248. data/lib/VoucherifySdk/models/qualifications_option.rb +3 -3
  249. data/lib/VoucherifySdk/models/redeemable_loyalty_card.rb +1 -1
  250. data/lib/VoucherifySdk/models/redeemable_voucher_loyalty_card.rb +17 -6
  251. data/lib/VoucherifySdk/models/redemption_entry_order.rb +29 -29
  252. data/lib/VoucherifySdk/models/redemption_entry_voucher_loyalty_card.rb +17 -6
  253. data/lib/VoucherifySdk/models/redemption_voucher_loyalty_card.rb +17 -6
  254. data/lib/VoucherifySdk/models/redemptions_get_response_body_order.rb +29 -29
  255. data/lib/VoucherifySdk/models/redemptions_get_response_body_voucher_loyalty_card.rb +17 -6
  256. data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_order.rb +28 -29
  257. data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_voucher_loyalty_card.rb +17 -6
  258. data/lib/VoucherifySdk/models/simple_loyalty_card.rb +17 -6
  259. data/lib/VoucherifySdk/models/sku.rb +1 -1
  260. data/lib/VoucherifySdk/models/skus_get_response_body.rb +1 -1
  261. data/lib/VoucherifySdk/models/templates_campaigns_campaign_setup_create_request_body.rb +11 -2
  262. data/lib/VoucherifySdk/models/validations_redeemable_inapplicable.rb +18 -7
  263. data/lib/VoucherifySdk/models/validations_redeemable_skipped.rb +18 -7
  264. data/lib/VoucherifySdk/models/validations_validate_response_body_redeemables_item.rb +18 -7
  265. data/lib/VoucherifySdk/models/validations_validate_response_body_redeemables_item_result_discount.rb +1 -0
  266. data/lib/VoucherifySdk/models/voucher_balance.rb +305 -0
  267. data/lib/VoucherifySdk/models/voucher_balance_related_object.rb +247 -0
  268. data/lib/VoucherifySdk/models/voucher_loyalty_card.rb +17 -6
  269. data/lib/VoucherifySdk/models/voucher_transaction.rb +27 -31
  270. data/lib/VoucherifySdk/models/voucher_transaction_details.rb +20 -2
  271. data/lib/VoucherifySdk/models/voucher_transaction_details_balance.rb +18 -19
  272. data/lib/VoucherifySdk/models/voucher_transaction_details_balance_related_object.rb +1 -7
  273. data/lib/VoucherifySdk/models/voucher_transaction_details_custom_event.rb +2 -2
  274. data/lib/VoucherifySdk/models/voucher_transaction_details_earning_rule.rb +1 -1
  275. data/lib/VoucherifySdk/models/voucher_transaction_details_event_schema.rb +2 -2
  276. data/lib/VoucherifySdk/models/voucher_transaction_details_holder_loyalty_tier.rb +221 -0
  277. data/lib/VoucherifySdk/models/voucher_transaction_details_loyalty_tier.rb +3 -1
  278. data/lib/VoucherifySdk/models/voucher_transaction_details_rollback.rb +1 -1
  279. data/lib/VoucherifySdk/models/voucher_transaction_details_segment.rb +2 -0
  280. data/lib/VoucherifySdk/models/voucher_with_categories_loyalty_card.rb +17 -6
  281. data/lib/VoucherifySdk/models/vouchers_balance_update_response_body.rb +1 -0
  282. data/lib/VoucherifySdk/models/vouchers_create_response_body_loyalty_card.rb +17 -6
  283. data/lib/VoucherifySdk/models/vouchers_disable_response_body_loyalty_card.rb +17 -6
  284. data/lib/VoucherifySdk/models/vouchers_enable_response_body_loyalty_card.rb +17 -6
  285. data/lib/VoucherifySdk/models/vouchers_get_response_body_loyalty_card.rb +17 -6
  286. data/lib/VoucherifySdk/models/vouchers_update_response_body_loyalty_card.rb +17 -6
  287. data/lib/VoucherifySdk/version.rb +1 -1
  288. data/lib/VoucherifySdk.rb +35 -0
  289. metadata +106 -36
@@ -33,16 +33,16 @@ module VoucherifySdk
33
33
  # Reason why the transaction occurred. In case of a redemption, this value is null.
34
34
  attr_accessor :reason
35
35
 
36
- attr_accessor :type
37
-
38
- attr_accessor :details
39
-
40
36
  # The related transaction ID on the receiving card.
41
37
  attr_accessor :related_transaction_id
42
38
 
43
39
  # Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format.
44
40
  attr_accessor :created_at
45
41
 
42
+ attr_accessor :details
43
+
44
+ attr_accessor :type
45
+
46
46
  class EnumAttributeValidator
47
47
  attr_reader :datatype
48
48
  attr_reader :allowable_values
@@ -74,10 +74,10 @@ module VoucherifySdk
74
74
  :'campaign_id' => :'campaign_id',
75
75
  :'source' => :'source',
76
76
  :'reason' => :'reason',
77
- :'type' => :'type',
78
- :'details' => :'details',
79
77
  :'related_transaction_id' => :'related_transaction_id',
80
- :'created_at' => :'created_at'
78
+ :'created_at' => :'created_at',
79
+ :'details' => :'details',
80
+ :'type' => :'type'
81
81
  }
82
82
  end
83
83
 
@@ -95,10 +95,10 @@ module VoucherifySdk
95
95
  :'campaign_id' => :'String',
96
96
  :'source' => :'String',
97
97
  :'reason' => :'String',
98
- :'type' => :'LoyaltyCardTransactionsType',
99
- :'details' => :'VoucherTransactionDetails',
100
98
  :'related_transaction_id' => :'String',
101
- :'created_at' => :'Time'
99
+ :'created_at' => :'Time',
100
+ :'details' => :'VoucherTransactionDetails',
101
+ :'type' => :'String'
102
102
  }
103
103
  end
104
104
 
@@ -111,9 +111,10 @@ module VoucherifySdk
111
111
  :'campaign_id',
112
112
  :'source',
113
113
  :'reason',
114
- :'details',
115
114
  :'related_transaction_id',
116
- :'created_at'
115
+ :'created_at',
116
+ :'details',
117
+ :'type'
117
118
  ])
118
119
  end
119
120
 
@@ -149,16 +150,6 @@ module VoucherifySdk
149
150
  self.reason = attributes[:'reason']
150
151
  end
151
152
 
152
- if attributes.key?(:'type')
153
- self.type = attributes[:'type']
154
- else
155
- self.type = nil
156
- end
157
-
158
- if attributes.key?(:'details')
159
- self.details = attributes[:'details']
160
- end
161
-
162
153
  if attributes.key?(:'related_transaction_id')
163
154
  self.related_transaction_id = attributes[:'related_transaction_id']
164
155
  end
@@ -166,6 +157,14 @@ module VoucherifySdk
166
157
  if attributes.key?(:'created_at')
167
158
  self.created_at = attributes[:'created_at']
168
159
  end
160
+
161
+ if attributes.key?(:'details')
162
+ self.details = attributes[:'details']
163
+ end
164
+
165
+ if attributes.key?(:'type')
166
+ self.type = attributes[:'type']
167
+ end
169
168
  end
170
169
 
171
170
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -173,10 +172,6 @@ module VoucherifySdk
173
172
  def list_invalid_properties
174
173
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
175
174
  invalid_properties = Array.new
176
- if @type.nil?
177
- invalid_properties.push('invalid value for "type", type cannot be nil.')
178
- end
179
-
180
175
  invalid_properties
181
176
  end
182
177
 
@@ -184,7 +179,8 @@ module VoucherifySdk
184
179
  # @return true if the model is valid
185
180
  def valid?
186
181
  warn '[DEPRECATED] the `valid?` method is obsolete'
187
- return false if @type.nil?
182
+ type_validator = EnumAttributeValidator.new('String', ["CREDITS_REDEMPTION", "CREDITS_REFUND", "CREDITS_ADDITION", "CREDITS_REMOVAL", "POINTS_PENDING_ACTIVATION", "POINTS_ACCRUAL", "POINTS_REDEMPTION", "POINTS_REFUND", "POINTS_ADDITION", "POINTS_REMOVAL", "POINTS_EXPIRATION", "POINTS_TRANSFER_IN", "POINTS_TRANSFER_OUT"])
183
+ return false unless type_validator.valid?(@type)
188
184
  true
189
185
  end
190
186
 
@@ -199,10 +195,10 @@ module VoucherifySdk
199
195
  campaign_id == o.campaign_id &&
200
196
  source == o.source &&
201
197
  reason == o.reason &&
202
- type == o.type &&
203
- details == o.details &&
204
198
  related_transaction_id == o.related_transaction_id &&
205
- created_at == o.created_at
199
+ created_at == o.created_at &&
200
+ details == o.details &&
201
+ type == o.type
206
202
  end
207
203
 
208
204
  # @see the `==` method
@@ -214,7 +210,7 @@ module VoucherifySdk
214
210
  # Calculates hash code according to all attributes.
215
211
  # @return [Integer] Hash code
216
212
  def hash
217
- [id, source_id, voucher_id, campaign_id, source, reason, type, details, related_transaction_id, created_at].hash
213
+ [id, source_id, voucher_id, campaign_id, source, reason, related_transaction_id, created_at, details, type].hash
218
214
  end
219
215
 
220
216
  # Builds the object from hash
@@ -36,6 +36,10 @@ module VoucherifySdk
36
36
 
37
37
  attr_accessor :event_schema
38
38
 
39
+ attr_accessor :holder_loyalty_tier
40
+
41
+ attr_accessor :pending_points
42
+
39
43
  attr_accessor :reward
40
44
 
41
45
  attr_accessor :source_voucher
@@ -55,6 +59,8 @@ module VoucherifySdk
55
59
  :'rollback' => :'rollback',
56
60
  :'custom_event' => :'custom_event',
57
61
  :'event_schema' => :'event_schema',
62
+ :'holder_loyalty_tier' => :'holder_loyalty_tier',
63
+ :'pending_points' => :'pending_points',
58
64
  :'reward' => :'reward',
59
65
  :'source_voucher' => :'source_voucher',
60
66
  :'destination_voucher' => :'destination_voucher'
@@ -79,6 +85,8 @@ module VoucherifySdk
79
85
  :'rollback' => :'VoucherTransactionDetailsRollback',
80
86
  :'custom_event' => :'VoucherTransactionDetailsCustomEvent',
81
87
  :'event_schema' => :'VoucherTransactionDetailsEventSchema',
88
+ :'holder_loyalty_tier' => :'VoucherTransactionDetailsHolderLoyaltyTier',
89
+ :'pending_points' => :'LoyaltyPendingPoints',
82
90
  :'reward' => :'VoucherTransactionDetailsReward',
83
91
  :'source_voucher' => :'SimpleVoucher',
84
92
  :'destination_voucher' => :'SimpleVoucher'
@@ -88,7 +96,6 @@ module VoucherifySdk
88
96
  # List of attributes with nullable: true
89
97
  def self.openapi_nullable
90
98
  Set.new([
91
- :'balance',
92
99
  :'order',
93
100
  :'event',
94
101
  :'earning_rule',
@@ -98,6 +105,7 @@ module VoucherifySdk
98
105
  :'rollback',
99
106
  :'custom_event',
100
107
  :'event_schema',
108
+ :'holder_loyalty_tier',
101
109
  :'reward',
102
110
  ])
103
111
  end
@@ -150,6 +158,14 @@ module VoucherifySdk
150
158
  self.event_schema = attributes[:'event_schema']
151
159
  end
152
160
 
161
+ if attributes.key?(:'holder_loyalty_tier')
162
+ self.holder_loyalty_tier = attributes[:'holder_loyalty_tier']
163
+ end
164
+
165
+ if attributes.key?(:'pending_points')
166
+ self.pending_points = attributes[:'pending_points']
167
+ end
168
+
153
169
  if attributes.key?(:'reward')
154
170
  self.reward = attributes[:'reward']
155
171
  end
@@ -193,6 +209,8 @@ module VoucherifySdk
193
209
  rollback == o.rollback &&
194
210
  custom_event == o.custom_event &&
195
211
  event_schema == o.event_schema &&
212
+ holder_loyalty_tier == o.holder_loyalty_tier &&
213
+ pending_points == o.pending_points &&
196
214
  reward == o.reward &&
197
215
  source_voucher == o.source_voucher &&
198
216
  destination_voucher == o.destination_voucher
@@ -207,7 +225,7 @@ module VoucherifySdk
207
225
  # Calculates hash code according to all attributes.
208
226
  # @return [Integer] Hash code
209
227
  def hash
210
- [balance, order, event, earning_rule, segment, loyalty_tier, redemption, rollback, custom_event, event_schema, reward, source_voucher, destination_voucher].hash
228
+ [balance, order, event, earning_rule, segment, loyalty_tier, redemption, rollback, custom_event, event_schema, holder_loyalty_tier, pending_points, reward, source_voucher, destination_voucher].hash
211
229
  end
212
230
 
213
231
  # Builds the object from hash
@@ -19,18 +19,21 @@ module VoucherifySdk
19
19
  # The type of voucher whose balance is being adjusted due to the transaction.
20
20
  attr_accessor :type
21
21
 
22
- # The number of all points accumulated on the card as affected by add or subtract operations.
22
+ # The number of all points or credits accumulated on the card as affected by add or subtract operations.
23
23
  attr_accessor :total
24
24
 
25
25
  # The type of the object represented by the JSON.
26
26
  attr_accessor :object
27
27
 
28
- # Points added or subtracted in the transaction.
28
+ # Points added or subtracted in the transaction of a loyalty card.
29
29
  attr_accessor :points
30
30
 
31
- # The available points on the card after the transaction as affected by redemption or rollback.
31
+ # The available points or credits on the card after the transaction as affected by redemption or rollback.
32
32
  attr_accessor :balance
33
33
 
34
+ # The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption.
35
+ attr_accessor :operation_type
36
+
34
37
  attr_accessor :related_object
35
38
 
36
39
  class EnumAttributeValidator
@@ -63,6 +66,7 @@ module VoucherifySdk
63
66
  :'object' => :'object',
64
67
  :'points' => :'points',
65
68
  :'balance' => :'balance',
69
+ :'operation_type' => :'operation_type',
66
70
  :'related_object' => :'related_object'
67
71
  }
68
72
  end
@@ -80,6 +84,7 @@ module VoucherifySdk
80
84
  :'object' => :'String',
81
85
  :'points' => :'Integer',
82
86
  :'balance' => :'Integer',
87
+ :'operation_type' => :'String',
83
88
  :'related_object' => :'VoucherTransactionDetailsBalanceRelatedObject'
84
89
  }
85
90
  end
@@ -92,6 +97,7 @@ module VoucherifySdk
92
97
  :'object',
93
98
  :'points',
94
99
  :'balance',
100
+ :'operation_type',
95
101
  :'related_object'
96
102
  ])
97
103
  end
@@ -106,8 +112,6 @@ module VoucherifySdk
106
112
 
107
113
  if attributes.key?(:'type')
108
114
  self.type = attributes[:'type']
109
- else
110
- self.type = 'loyalty_card'
111
115
  end
112
116
 
113
117
  if attributes.key?(:'total')
@@ -128,6 +132,10 @@ module VoucherifySdk
128
132
  self.balance = attributes[:'balance']
129
133
  end
130
134
 
135
+ if attributes.key?(:'operation_type')
136
+ self.operation_type = attributes[:'operation_type']
137
+ end
138
+
131
139
  if attributes.key?(:'related_object')
132
140
  self.related_object = attributes[:'related_object']
133
141
  end
@@ -138,16 +146,6 @@ module VoucherifySdk
138
146
  def list_invalid_properties
139
147
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
140
148
  invalid_properties = Array.new
141
- pattern = Regexp.new(/loyalty_card/)
142
- if !@type.nil? && @type !~ pattern
143
- invalid_properties.push("invalid value for \"type\", must conform to the pattern #{pattern}.")
144
- end
145
-
146
- pattern = Regexp.new(/balance/)
147
- if !@object.nil? && @object !~ pattern
148
- invalid_properties.push("invalid value for \"object\", must conform to the pattern #{pattern}.")
149
- end
150
-
151
149
  invalid_properties
152
150
  end
153
151
 
@@ -155,12 +153,12 @@ module VoucherifySdk
155
153
  # @return true if the model is valid
156
154
  def valid?
157
155
  warn '[DEPRECATED] the `valid?` method is obsolete'
158
- type_validator = EnumAttributeValidator.new('String', ["loyalty_card"])
156
+ type_validator = EnumAttributeValidator.new('String', ["loyalty_card", "gift_voucher"])
159
157
  return false unless type_validator.valid?(@type)
160
- return false if !@type.nil? && @type !~ Regexp.new(/loyalty_card/)
161
158
  object_validator = EnumAttributeValidator.new('String', ["balance"])
162
159
  return false unless object_validator.valid?(@object)
163
- return false if !@object.nil? && @object !~ Regexp.new(/balance/)
160
+ operation_type_validator = EnumAttributeValidator.new('String', ["MANUAL", "AUTOMATIC"])
161
+ return false unless operation_type_validator.valid?(@operation_type)
164
162
  true
165
163
  end
166
164
 
@@ -174,6 +172,7 @@ module VoucherifySdk
174
172
  object == o.object &&
175
173
  points == o.points &&
176
174
  balance == o.balance &&
175
+ operation_type == o.operation_type &&
177
176
  related_object == o.related_object
178
177
  end
179
178
 
@@ -186,7 +185,7 @@ module VoucherifySdk
186
185
  # Calculates hash code according to all attributes.
187
186
  # @return [Integer] Hash code
188
187
  def hash
189
- [type, total, object, points, balance, related_object].hash
188
+ [type, total, object, points, balance, operation_type, related_object].hash
190
189
  end
191
190
 
192
191
  # Builds the object from hash
@@ -16,7 +16,7 @@ require 'time'
16
16
  module VoucherifySdk
17
17
  # Defines the resource that is being modified with the values that are returned in the balance object.
18
18
  class VoucherTransactionDetailsBalanceRelatedObject
19
- # Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API.
19
+ # Identifies the voucher that is being modified. The ID is assigned by the Voucherify API.
20
20
  attr_accessor :id
21
21
 
22
22
  # The object being modified, i.e. voucher.
@@ -97,11 +97,6 @@ module VoucherifySdk
97
97
  def list_invalid_properties
98
98
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
99
  invalid_properties = Array.new
100
- pattern = Regexp.new(/voucher/)
101
- if !@type.nil? && @type !~ pattern
102
- invalid_properties.push("invalid value for \"type\", must conform to the pattern #{pattern}.")
103
- end
104
-
105
100
  invalid_properties
106
101
  end
107
102
 
@@ -111,7 +106,6 @@ module VoucherifySdk
111
106
  warn '[DEPRECATED] the `valid?` method is obsolete'
112
107
  type_validator = EnumAttributeValidator.new('String', ["voucher"])
113
108
  return false unless type_validator.valid?(@type)
114
- return false if !@type.nil? && @type !~ Regexp.new(/voucher/)
115
109
  true
116
110
  end
117
111
 
@@ -16,10 +16,10 @@ require 'time'
16
16
  module VoucherifySdk
17
17
  # Contains information about the custom event that triggers the point accrual.
18
18
  class VoucherTransactionDetailsCustomEvent
19
- # Unique event ID.
19
+ # Unique identifier of the event.
20
20
  attr_accessor :id
21
21
 
22
- # Type of custom event.
22
+ # Type of the custom event.
23
23
  attr_accessor :type
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -16,7 +16,7 @@ require 'time'
16
16
  module VoucherifySdk
17
17
  # Contains information about the earning rule.
18
18
  class VoucherTransactionDetailsEarningRule
19
- # Unique earning rule ID.
19
+ # Unique identifier of an earning rule, assigned by Voucherify.
20
20
  attr_accessor :id
21
21
 
22
22
  attr_accessor :source
@@ -16,10 +16,10 @@ require 'time'
16
16
  module VoucherifySdk
17
17
  # Contains information about the custom event metadata schema.
18
18
  class VoucherTransactionDetailsEventSchema
19
- # Unique metadata schema ID.
19
+ # Unique identifier of the metadata schema.
20
20
  attr_accessor :id
21
21
 
22
- # Type of custom event.
22
+ # Type of the custom event.
23
23
  attr_accessor :name
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -0,0 +1,221 @@
1
+ =begin
2
+ #Voucherify API
3
+
4
+ #Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
5
+
6
+ The version of the OpenAPI document: v2018-08-01
7
+ Contact: support@voucherify.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module VoucherifySdk
17
+ # Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.
18
+ class VoucherTransactionDetailsHolderLoyaltyTier
19
+ # Unique identifier of the loyalty tier, assigned by Voucherify.
20
+ attr_accessor :id
21
+
22
+ # User-defined name of the loyalty tier.
23
+ attr_accessor :name
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'id' => :'id',
29
+ :'name' => :'name'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'id' => :'String',
42
+ :'name' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ :'id',
50
+ :'name'
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'id')
63
+ self.id = attributes[:'id']
64
+ end
65
+
66
+ if attributes.key?(:'name')
67
+ self.name = attributes[:'name']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ id == o.id &&
92
+ name == o.name
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [id, name].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def self._deserialize(type, value)
135
+ case type.to_sym
136
+ when :Time
137
+ Time.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :Boolean
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ # models (e.g. Pet) or oneOf
168
+ klass = VoucherifySdk.const_get(type)
169
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map { |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+
219
+ end
220
+
221
+ end
@@ -14,10 +14,12 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module VoucherifySdk
17
- # Contains information about the loyalty tier.
17
+ # Contains information about the loyalty tier that is mapped for the earning rule and used in the transaction.
18
18
  class VoucherTransactionDetailsLoyaltyTier
19
+ # Unique identifier of the loyalty tier, assigned by Voucherify.
19
20
  attr_accessor :id
20
21
 
22
+ # User-defined name of the loyalty tier.
21
23
  attr_accessor :name
22
24
 
23
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -16,7 +16,7 @@ require 'time'
16
16
  module VoucherifySdk
17
17
  # Contains information about the redemption rollback.
18
18
  class VoucherTransactionDetailsRollback
19
- # Unique redemption rollback ID.
19
+ # Unique identifier of the redemption rollback.
20
20
  attr_accessor :id
21
21
 
22
22
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -16,8 +16,10 @@ require 'time'
16
16
  module VoucherifySdk
17
17
  # Contains information about the segment.
18
18
  class VoucherTransactionDetailsSegment
19
+ # Unique identifier of the segment.
19
20
  attr_accessor :id
20
21
 
22
+ # Name of the segment.
21
23
  attr_accessor :name
22
24
 
23
25
  # Attribute mapping from ruby-style variable name to JSON key.