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
@@ -16,7 +16,7 @@ require 'time'
16
16
  module VoucherifySdk
17
17
  # Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
18
18
  class CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard
19
- # Total points incurred over the lifespan of the loyalty card.
19
+ # Total points incurred over the lifespan of the loyalty card, minus the expired points.
20
20
  attr_accessor :points
21
21
 
22
22
  # Points available for reward redemption.
@@ -28,13 +28,17 @@ module VoucherifySdk
28
28
  # The amount of points that are set to expire next.
29
29
  attr_accessor :next_expiration_points
30
30
 
31
+ # Determines the number of pending points that will be added to the loyalty card after the predefined time.
32
+ attr_accessor :pending_points
33
+
31
34
  # Attribute mapping from ruby-style variable name to JSON key.
32
35
  def self.attribute_map
33
36
  {
34
37
  :'points' => :'points',
35
38
  :'balance' => :'balance',
36
39
  :'next_expiration_date' => :'next_expiration_date',
37
- :'next_expiration_points' => :'next_expiration_points'
40
+ :'next_expiration_points' => :'next_expiration_points',
41
+ :'pending_points' => :'pending_points'
38
42
  }
39
43
  end
40
44
 
@@ -49,7 +53,8 @@ module VoucherifySdk
49
53
  :'points' => :'Integer',
50
54
  :'balance' => :'Integer',
51
55
  :'next_expiration_date' => :'Date',
52
- :'next_expiration_points' => :'Integer'
56
+ :'next_expiration_points' => :'Integer',
57
+ :'pending_points' => :'Integer'
53
58
  }
54
59
  end
55
60
 
@@ -59,7 +64,8 @@ module VoucherifySdk
59
64
  :'points',
60
65
  :'balance',
61
66
  :'next_expiration_date',
62
- :'next_expiration_points'
67
+ :'next_expiration_points',
68
+ :'pending_points'
63
69
  ])
64
70
  end
65
71
 
@@ -86,6 +92,10 @@ module VoucherifySdk
86
92
  if attributes.key?(:'next_expiration_points')
87
93
  self.next_expiration_points = attributes[:'next_expiration_points']
88
94
  end
95
+
96
+ if attributes.key?(:'pending_points')
97
+ self.pending_points = attributes[:'pending_points']
98
+ end
89
99
  end
90
100
 
91
101
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -111,7 +121,8 @@ module VoucherifySdk
111
121
  points == o.points &&
112
122
  balance == o.balance &&
113
123
  next_expiration_date == o.next_expiration_date &&
114
- next_expiration_points == o.next_expiration_points
124
+ next_expiration_points == o.next_expiration_points &&
125
+ pending_points == o.pending_points
115
126
  end
116
127
 
117
128
  # @see the `==` method
@@ -123,7 +134,7 @@ module VoucherifySdk
123
134
  # Calculates hash code according to all attributes.
124
135
  # @return [Integer] Hash code
125
136
  def hash
126
- [points, balance, next_expiration_date, next_expiration_points].hash
137
+ [points, balance, next_expiration_date, next_expiration_points, pending_points].hash
127
138
  end
128
139
 
129
140
  # Builds the object from hash
@@ -16,7 +16,7 @@ require 'time'
16
16
  module VoucherifySdk
17
17
  # Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
18
18
  class CampaignsVouchersCreateResponseBodyLoyaltyCard
19
- # Total points incurred over the lifespan of the loyalty card.
19
+ # Total points incurred over the lifespan of the loyalty card, minus the expired points.
20
20
  attr_accessor :points
21
21
 
22
22
  # Points available for reward redemption.
@@ -28,13 +28,17 @@ module VoucherifySdk
28
28
  # The amount of points that are set to expire next.
29
29
  attr_accessor :next_expiration_points
30
30
 
31
+ # Determines the number of pending points that will be added to the loyalty card after the predefined time.
32
+ attr_accessor :pending_points
33
+
31
34
  # Attribute mapping from ruby-style variable name to JSON key.
32
35
  def self.attribute_map
33
36
  {
34
37
  :'points' => :'points',
35
38
  :'balance' => :'balance',
36
39
  :'next_expiration_date' => :'next_expiration_date',
37
- :'next_expiration_points' => :'next_expiration_points'
40
+ :'next_expiration_points' => :'next_expiration_points',
41
+ :'pending_points' => :'pending_points'
38
42
  }
39
43
  end
40
44
 
@@ -49,7 +53,8 @@ module VoucherifySdk
49
53
  :'points' => :'Integer',
50
54
  :'balance' => :'Integer',
51
55
  :'next_expiration_date' => :'Date',
52
- :'next_expiration_points' => :'Integer'
56
+ :'next_expiration_points' => :'Integer',
57
+ :'pending_points' => :'Integer'
53
58
  }
54
59
  end
55
60
 
@@ -59,7 +64,8 @@ module VoucherifySdk
59
64
  :'points',
60
65
  :'balance',
61
66
  :'next_expiration_date',
62
- :'next_expiration_points'
67
+ :'next_expiration_points',
68
+ :'pending_points'
63
69
  ])
64
70
  end
65
71
 
@@ -86,6 +92,10 @@ module VoucherifySdk
86
92
  if attributes.key?(:'next_expiration_points')
87
93
  self.next_expiration_points = attributes[:'next_expiration_points']
88
94
  end
95
+
96
+ if attributes.key?(:'pending_points')
97
+ self.pending_points = attributes[:'pending_points']
98
+ end
89
99
  end
90
100
 
91
101
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -111,7 +121,8 @@ module VoucherifySdk
111
121
  points == o.points &&
112
122
  balance == o.balance &&
113
123
  next_expiration_date == o.next_expiration_date &&
114
- next_expiration_points == o.next_expiration_points
124
+ next_expiration_points == o.next_expiration_points &&
125
+ pending_points == o.pending_points
115
126
  end
116
127
 
117
128
  # @see the `==` method
@@ -123,7 +134,7 @@ module VoucherifySdk
123
134
  # Calculates hash code according to all attributes.
124
135
  # @return [Integer] Hash code
125
136
  def hash
126
- [points, balance, next_expiration_date, next_expiration_points].hash
137
+ [points, balance, next_expiration_date, next_expiration_points, pending_points].hash
127
138
  end
128
139
 
129
140
  # Builds the object from hash
@@ -36,12 +36,15 @@ module VoucherifySdk
36
36
 
37
37
  attr_accessor :categories
38
38
 
39
- # Campaign name
39
+ # Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
40
40
  attr_accessor :campaign_name
41
41
 
42
- # Unique campaign ID assigned by Voucherify.
42
+ # Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
43
43
  attr_accessor :campaign_id
44
44
 
45
+ # Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
46
+ attr_accessor :name
47
+
45
48
  class EnumAttributeValidator
46
49
  attr_reader :datatype
47
50
  attr_reader :allowable_values
@@ -77,7 +80,8 @@ module VoucherifySdk
77
80
  :'metadata' => :'metadata',
78
81
  :'categories' => :'categories',
79
82
  :'campaign_name' => :'campaign_name',
80
- :'campaign_id' => :'campaign_id'
83
+ :'campaign_id' => :'campaign_id',
84
+ :'name' => :'name'
81
85
  }
82
86
  end
83
87
 
@@ -99,7 +103,8 @@ module VoucherifySdk
99
103
  :'metadata' => :'Object',
100
104
  :'categories' => :'Array<CategoryWithStackingRulesType>',
101
105
  :'campaign_name' => :'String',
102
- :'campaign_id' => :'String'
106
+ :'campaign_id' => :'String',
107
+ :'name' => :'String'
103
108
  }
104
109
  end
105
110
 
@@ -111,7 +116,8 @@ module VoucherifySdk
111
116
  :'metadata',
112
117
  :'categories',
113
118
  :'campaign_name',
114
- :'campaign_id'
119
+ :'campaign_id',
120
+ :'name'
115
121
  ])
116
122
  end
117
123
 
@@ -168,6 +174,10 @@ module VoucherifySdk
168
174
  if attributes.key?(:'campaign_id')
169
175
  self.campaign_id = attributes[:'campaign_id']
170
176
  end
177
+
178
+ if attributes.key?(:'name')
179
+ self.name = attributes[:'name']
180
+ end
171
181
  end
172
182
 
173
183
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -204,7 +214,8 @@ module VoucherifySdk
204
214
  metadata == o.metadata &&
205
215
  categories == o.categories &&
206
216
  campaign_name == o.campaign_name &&
207
- campaign_id == o.campaign_id
217
+ campaign_id == o.campaign_id &&
218
+ name == o.name
208
219
  end
209
220
 
210
221
  # @see the `==` method
@@ -216,7 +227,7 @@ module VoucherifySdk
216
227
  # Calculates hash code according to all attributes.
217
228
  # @return [Integer] Hash code
218
229
  def hash
219
- [status, id, object, order, applicable_to, inapplicable_to, result, metadata, categories, campaign_name, campaign_id].hash
230
+ [status, id, object, order, applicable_to, inapplicable_to, result, metadata, categories, campaign_name, campaign_id, name].hash
220
231
  end
221
232
 
222
233
  # Builds the object from hash
@@ -33,6 +33,7 @@ module VoucherifySdk
33
33
  # Number of units to be granted a full value discount.
34
34
  attr_accessor :unit_off
35
35
 
36
+ # Formula used to calculate the number of units.
36
37
  attr_accessor :unit_off_formula
37
38
 
38
39
  # The product deemed as free, chosen from product inventory (e.g. time, items).
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module VoucherifySdk
17
17
  class CustomerLoyalty
18
- # Customer's loyalty points.
18
+ # Customer's loyalty points minus expired for all loyalty cards which the customer has.
19
19
  attr_accessor :points
20
20
 
21
21
  # Total number of customers referred by the customer.
@@ -33,6 +33,7 @@ module VoucherifySdk
33
33
  # Number of units to be granted a full value discount.
34
34
  attr_accessor :unit_off
35
35
 
36
+ # Formula used to calculate the number of units.
36
37
  attr_accessor :unit_off_formula
37
38
 
38
39
  # The product deemed as free, chosen from product inventory (e.g. time, items).
@@ -18,6 +18,7 @@ module VoucherifySdk
18
18
  # Number of units to be granted a full value discount.
19
19
  attr_accessor :unit_off
20
20
 
21
+ # Formula used to calculate the number of units.
21
22
  attr_accessor :unit_off_formula
22
23
 
23
24
  # Defines how the unit is added to the customer's order.
@@ -31,6 +31,8 @@ module VoucherifySdk
31
31
 
32
32
  attr_accessor :loyalty_tier
33
33
 
34
+ attr_accessor :pending_points
35
+
34
36
  attr_accessor :source
35
37
 
36
38
  # The type of the object represented by JSON. Default is earning_rule.
@@ -96,6 +98,7 @@ module VoucherifySdk
96
98
  :'custom_event' => :'custom_event',
97
99
  :'segment' => :'segment',
98
100
  :'loyalty_tier' => :'loyalty_tier',
101
+ :'pending_points' => :'pending_points',
99
102
  :'source' => :'source',
100
103
  :'object' => :'object',
101
104
  :'automation_id' => :'automation_id',
@@ -126,6 +129,7 @@ module VoucherifySdk
126
129
  :'custom_event' => :'EarningRuleCustomEvent',
127
130
  :'segment' => :'EarningRuleSegment',
128
131
  :'loyalty_tier' => :'EarningRuleLoyaltyTier',
132
+ :'pending_points' => :'EarningRulePendingPoints',
129
133
  :'source' => :'EarningRuleSource',
130
134
  :'object' => :'String',
131
135
  :'automation_id' => :'String',
@@ -150,6 +154,7 @@ module VoucherifySdk
150
154
  :'custom_event',
151
155
  :'segment',
152
156
  :'loyalty_tier',
157
+ :'pending_points',
153
158
  :'source',
154
159
  :'object',
155
160
  :'automation_id',
@@ -198,6 +203,10 @@ module VoucherifySdk
198
203
  self.loyalty_tier = attributes[:'loyalty_tier']
199
204
  end
200
205
 
206
+ if attributes.key?(:'pending_points')
207
+ self.pending_points = attributes[:'pending_points']
208
+ end
209
+
201
210
  if attributes.key?(:'source')
202
211
  self.source = attributes[:'source']
203
212
  end
@@ -280,6 +289,7 @@ module VoucherifySdk
280
289
  custom_event == o.custom_event &&
281
290
  segment == o.segment &&
282
291
  loyalty_tier == o.loyalty_tier &&
292
+ pending_points == o.pending_points &&
283
293
  source == o.source &&
284
294
  object == o.object &&
285
295
  automation_id == o.automation_id &&
@@ -303,7 +313,7 @@ module VoucherifySdk
303
313
  # Calculates hash code according to all attributes.
304
314
  # @return [Integer] Hash code
305
315
  def hash
306
- [id, created_at, loyalty, event, custom_event, segment, loyalty_tier, source, object, automation_id, start_date, expiration_date, validity_timeframe, validity_day_of_week, validity_hours, metadata, validation_rule_id, updated_at, active].hash
316
+ [id, created_at, loyalty, event, custom_event, segment, loyalty_tier, pending_points, source, object, automation_id, start_date, expiration_date, validity_timeframe, validity_day_of_week, validity_hours, metadata, validation_rule_id, updated_at, active].hash
307
317
  end
308
318
 
309
319
  # Builds the object from hash
@@ -0,0 +1,257 @@
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
+ # Defines the configuration for pending points. Pending points can be used only with the `order.paid` event.
18
+ class EarningRulePendingPoints
19
+ # Defines the type of the period during which the points are in the pending state. Currently, only `DAY` value is accepted.
20
+ attr_accessor :period_type
21
+
22
+ # Defines for how long the points are in the pending state. The minimum value is 1, maximum is 90.
23
+ attr_accessor :period_value
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'period_type' => :'period_type',
51
+ :'period_value' => :'period_value'
52
+ }
53
+ end
54
+
55
+ # Returns all the JSON keys this model knows about
56
+ def self.acceptable_attributes
57
+ attribute_map.values
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.openapi_types
62
+ {
63
+ :'period_type' => :'String',
64
+ :'period_value' => :'Integer'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ :'period_type',
72
+ :'period_value'
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'period_type')
85
+ self.period_type = attributes[:'period_type']
86
+ else
87
+ self.period_type = 'DAY'
88
+ end
89
+
90
+ if attributes.key?(:'period_value')
91
+ self.period_value = attributes[:'period_value']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if !@period_value.nil? && @period_value > 90
101
+ invalid_properties.push('invalid value for "period_value", must be smaller than or equal to 90.')
102
+ end
103
+
104
+ if !@period_value.nil? && @period_value < 1
105
+ invalid_properties.push('invalid value for "period_value", must be greater than or equal to 1.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ period_type_validator = EnumAttributeValidator.new('String', ["DAY"])
116
+ return false unless period_type_validator.valid?(@period_type)
117
+ return false if !@period_value.nil? && @period_value > 90
118
+ return false if !@period_value.nil? && @period_value < 1
119
+ true
120
+ end
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param [Object] Object to be compared
124
+ def ==(o)
125
+ return true if self.equal?(o)
126
+ self.class == o.class &&
127
+ period_type == o.period_type &&
128
+ period_value == o.period_value
129
+ end
130
+
131
+ # @see the `==` method
132
+ # @param [Object] Object to be compared
133
+ def eql?(o)
134
+ self == o
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ def hash
140
+ [period_type, period_value].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def self.build_from_hash(attributes)
147
+ return nil unless attributes.is_a?(Hash)
148
+ attributes = attributes.transform_keys(&:to_sym)
149
+ transformed_hash = {}
150
+ openapi_types.each_pair do |key, type|
151
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = nil
153
+ elsif type =~ /\AArray<(.*)>/i
154
+ # check to ensure the input is an array given that the attribute
155
+ # is documented as an array but the input is not
156
+ if attributes[attribute_map[key]].is_a?(Array)
157
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
158
+ end
159
+ elsif !attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
161
+ end
162
+ end
163
+ new(transformed_hash)
164
+ end
165
+
166
+ # Deserializes the data based on type
167
+ # @param string type Data type
168
+ # @param string value Value to be deserialized
169
+ # @return [Object] Deserialized data
170
+ def self._deserialize(type, value)
171
+ case type.to_sym
172
+ when :Time
173
+ Time.parse(value)
174
+ when :Date
175
+ Date.parse(value)
176
+ when :String
177
+ value.to_s
178
+ when :Integer
179
+ value.to_i
180
+ when :Float
181
+ value.to_f
182
+ when :Boolean
183
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
184
+ true
185
+ else
186
+ false
187
+ end
188
+ when :Object
189
+ # generic object (usually a Hash), return directly
190
+ value
191
+ when /\AArray<(?<inner_type>.+)>\z/
192
+ inner_type = Regexp.last_match[:inner_type]
193
+ value.map { |v| _deserialize(inner_type, v) }
194
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
195
+ k_type = Regexp.last_match[:k_type]
196
+ v_type = Regexp.last_match[:v_type]
197
+ {}.tap do |hash|
198
+ value.each do |k, v|
199
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
200
+ end
201
+ end
202
+ else # model
203
+ # models (e.g. Pet) or oneOf
204
+ klass = VoucherifySdk.const_get(type)
205
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
206
+ end
207
+ end
208
+
209
+ # Returns the string representation of the object
210
+ # @return [String] String presentation of the object
211
+ def to_s
212
+ to_hash.to_s
213
+ end
214
+
215
+ # to_body is an alias to to_hash (backward compatibility)
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_body
218
+ to_hash
219
+ end
220
+
221
+ # Returns the object in the form of hash
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_hash
224
+ hash = {}
225
+ self.class.attribute_map.each_pair do |attr, param|
226
+ value = self.send(attr)
227
+ if value.nil?
228
+ is_nullable = self.class.openapi_nullable.include?(attr)
229
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
230
+ end
231
+
232
+ hash[param] = _to_hash(value)
233
+ end
234
+ hash
235
+ end
236
+
237
+ # Outputs non-array value in the form of hash
238
+ # For object, use to_hash. Otherwise, just return the value
239
+ # @param [Object] value Any valid value
240
+ # @return [Hash] Returns the value in the form of hash
241
+ def _to_hash(value)
242
+ if value.is_a?(Array)
243
+ value.compact.map { |v| _to_hash(v) }
244
+ elsif value.is_a?(Hash)
245
+ {}.tap do |hash|
246
+ value.each { |k, v| hash[k] = _to_hash(v) }
247
+ end
248
+ elsif value.respond_to? :to_hash
249
+ value.to_hash
250
+ else
251
+ value
252
+ end
253
+ end
254
+
255
+ end
256
+
257
+ end
@@ -37,6 +37,8 @@ module VoucherifySdk
37
37
  # The resource type.
38
38
  attr_accessor :resource_type
39
39
 
40
+ attr_accessor :error
41
+
40
42
  # Attribute mapping from ruby-style variable name to JSON key.
41
43
  def self.attribute_map
42
44
  {
@@ -46,7 +48,8 @@ module VoucherifySdk
46
48
  :'details' => :'details',
47
49
  :'request_id' => :'request_id',
48
50
  :'resource_id' => :'resource_id',
49
- :'resource_type' => :'resource_type'
51
+ :'resource_type' => :'resource_type',
52
+ :'error' => :'error'
50
53
  }
51
54
  end
52
55
 
@@ -64,7 +67,8 @@ module VoucherifySdk
64
67
  :'details' => :'String',
65
68
  :'request_id' => :'String',
66
69
  :'resource_id' => :'String',
67
- :'resource_type' => :'String'
70
+ :'resource_type' => :'String',
71
+ :'error' => :'ErrorError'
68
72
  }
69
73
  end
70
74
 
@@ -77,7 +81,8 @@ module VoucherifySdk
77
81
  :'details',
78
82
  :'request_id',
79
83
  :'resource_id',
80
- :'resource_type'
84
+ :'resource_type',
85
+ :'error'
81
86
  ])
82
87
  end
83
88
 
@@ -116,6 +121,10 @@ module VoucherifySdk
116
121
  if attributes.key?(:'resource_type')
117
122
  self.resource_type = attributes[:'resource_type']
118
123
  end
124
+
125
+ if attributes.key?(:'error')
126
+ self.error = attributes[:'error']
127
+ end
119
128
  end
120
129
 
121
130
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -144,7 +153,8 @@ module VoucherifySdk
144
153
  details == o.details &&
145
154
  request_id == o.request_id &&
146
155
  resource_id == o.resource_id &&
147
- resource_type == o.resource_type
156
+ resource_type == o.resource_type &&
157
+ error == o.error
148
158
  end
149
159
 
150
160
  # @see the `==` method
@@ -156,7 +166,7 @@ module VoucherifySdk
156
166
  # Calculates hash code according to all attributes.
157
167
  # @return [Integer] Hash code
158
168
  def hash
159
- [code, key, message, details, request_id, resource_id, resource_type].hash
169
+ [code, key, message, details, request_id, resource_id, resource_type, error].hash
160
170
  end
161
171
 
162
172
  # Builds the object from hash