voucherify 8.0.1 → 8.0.2

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 (130) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +1 -1
  3. data/ENDPOINTS-COVERAGE.md +64 -60
  4. data/Gemfile.lock +4 -4
  5. data/README.md +11 -0
  6. data/docs/Campaign.md +2 -2
  7. data/docs/CampaignBase.md +2 -2
  8. data/docs/CampaignsApi.md +3 -3
  9. data/docs/CampaignsCreateRequestBody.md +1 -1
  10. data/docs/CampaignsCreateResponseBody.md +2 -2
  11. data/docs/CampaignsGetResponseBody.md +2 -2
  12. data/docs/CampaignsUpdateRequestBody.md +2 -2
  13. data/docs/CampaignsUpdateResponseBody.md +2 -2
  14. data/docs/ClientValidationsValidateResponseBodyRedeemablesItem.md +3 -2
  15. data/docs/Error.md +1 -0
  16. data/docs/ErrorError.md +8 -0
  17. data/docs/LoyaltiesCreateCampaignRequestBody.md +1 -1
  18. data/docs/LoyaltiesMembersBalanceUpdateResponseBody.md +1 -1
  19. data/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md +9 -9
  20. data/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md +1 -1
  21. data/docs/LoyaltiesUpdateCampaignRequestBody.md +2 -2
  22. data/docs/LoyaltyCardTransaction.md +2 -2
  23. data/docs/LoyaltyCardTransactionDetailsBalance.md +5 -4
  24. data/docs/LoyaltyCardTransactionDetailsBalanceRelatedObject.md +1 -1
  25. data/docs/LoyaltyPointsBucket.md +16 -0
  26. data/docs/LoyaltyPointsBucketBucket.md +8 -0
  27. data/docs/Order.md +1 -1
  28. data/docs/OrderCalculated.md +1 -1
  29. data/docs/OrderCalculatedItem.md +1 -1
  30. data/docs/OrderCalculatedItemProduct.md +1 -1
  31. data/docs/OrderCalculatedItemSku.md +1 -0
  32. data/docs/OrderItem.md +1 -1
  33. data/docs/OrderItemProduct.md +1 -1
  34. data/docs/OrderItemSku.md +1 -0
  35. data/docs/OrdersCreateRequestBody.md +1 -1
  36. data/docs/OrdersCreateResponseBody.md +1 -1
  37. data/docs/OrdersGetResponseBody.md +1 -1
  38. data/docs/OrdersImportCreateRequestBodyItem.md +1 -1
  39. data/docs/OrdersUpdateRequestBody.md +1 -1
  40. data/docs/OrdersUpdateResponseBody.md +1 -1
  41. data/docs/Product.md +1 -1
  42. data/docs/ProductCollectionsProductsListResponseBodyDataItem.md +1 -1
  43. data/docs/ProductWithoutSkus.md +1 -1
  44. data/docs/ProductsCreateResponseBody.md +1 -1
  45. data/docs/ProductsGetResponseBody.md +1 -1
  46. data/docs/ProductsSkusCreateResponseBody.md +1 -1
  47. data/docs/ProductsSkusUpdateResponseBody.md +1 -1
  48. data/docs/ProductsUpdateResponseBody.md +1 -1
  49. data/docs/RedemptionEntryOrder.md +1 -1
  50. data/docs/RedemptionsGetResponseBodyOrder.md +1 -1
  51. data/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md +1 -1
  52. data/docs/Sku.md +1 -1
  53. data/docs/SkusGetResponseBody.md +1 -1
  54. data/docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md +1 -1
  55. data/docs/ValidationsRedeemableInapplicable.md +3 -2
  56. data/docs/ValidationsRedeemableSkipped.md +3 -2
  57. data/docs/ValidationsValidateResponseBodyRedeemablesItem.md +3 -2
  58. data/docs/VoucherBalance.md +14 -0
  59. data/docs/VoucherBalanceRelatedObject.md +9 -0
  60. data/docs/VoucherTransaction.md +2 -2
  61. data/docs/VoucherTransactionDetailsBalance.md +5 -4
  62. data/docs/VoucherTransactionDetailsBalanceRelatedObject.md +1 -1
  63. data/docs/VouchersApi.md +6 -6
  64. data/docs/VouchersBalanceUpdateResponseBody.md +1 -1
  65. data/lib/VoucherifySdk/api/campaigns_api.rb +4 -4
  66. data/lib/VoucherifySdk/api/vouchers_api.rb +10 -10
  67. data/lib/VoucherifySdk/models/access_settings_campaign_assignments_list.rb +1 -1
  68. data/lib/VoucherifySdk/models/campaign.rb +3 -3
  69. data/lib/VoucherifySdk/models/campaign_base.rb +3 -3
  70. data/lib/VoucherifySdk/models/campaigns_create_request_body.rb +1 -1
  71. data/lib/VoucherifySdk/models/campaigns_create_response_body.rb +3 -3
  72. data/lib/VoucherifySdk/models/campaigns_get_response_body.rb +3 -3
  73. data/lib/VoucherifySdk/models/campaigns_update_request_body.rb +2 -2
  74. data/lib/VoucherifySdk/models/campaigns_update_response_body.rb +3 -3
  75. data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item.rb +18 -7
  76. data/lib/VoucherifySdk/models/error.rb +15 -5
  77. data/lib/VoucherifySdk/models/error_error.rb +210 -0
  78. data/lib/VoucherifySdk/models/loyalties_create_campaign_request_body.rb +1 -1
  79. data/lib/VoucherifySdk/models/loyalties_members_balance_update_response_body.rb +1 -0
  80. data/lib/VoucherifySdk/models/loyalties_members_points_expiration_list_response_body_data_item.rb +27 -77
  81. data/lib/VoucherifySdk/models/loyalties_members_points_expiration_list_response_body_data_item_bucket.rb +3 -9
  82. data/lib/VoucherifySdk/models/loyalties_update_campaign_request_body.rb +2 -2
  83. data/lib/VoucherifySdk/models/loyalty_card_transaction.rb +24 -31
  84. data/lib/VoucherifySdk/models/loyalty_card_transaction_details.rb +0 -1
  85. data/lib/VoucherifySdk/models/loyalty_card_transaction_details_balance.rb +18 -19
  86. data/lib/VoucherifySdk/models/loyalty_card_transaction_details_balance_related_object.rb +1 -7
  87. data/lib/VoucherifySdk/models/loyalty_points_bucket.rb +323 -0
  88. data/lib/VoucherifySdk/models/loyalty_points_bucket_bucket.rb +210 -0
  89. data/lib/VoucherifySdk/models/order.rb +1 -1
  90. data/lib/VoucherifySdk/models/order_calculated.rb +1 -1
  91. data/lib/VoucherifySdk/models/order_calculated_item.rb +1 -1
  92. data/lib/VoucherifySdk/models/order_calculated_item_product.rb +1 -1
  93. data/lib/VoucherifySdk/models/order_calculated_item_sku.rb +16 -5
  94. data/lib/VoucherifySdk/models/order_item.rb +1 -1
  95. data/lib/VoucherifySdk/models/order_item_product.rb +1 -1
  96. data/lib/VoucherifySdk/models/order_item_sku.rb +16 -5
  97. data/lib/VoucherifySdk/models/orders_create_request_body.rb +1 -1
  98. data/lib/VoucherifySdk/models/orders_create_response_body.rb +1 -1
  99. data/lib/VoucherifySdk/models/orders_get_response_body.rb +1 -1
  100. data/lib/VoucherifySdk/models/orders_import_create_request_body_item.rb +1 -1
  101. data/lib/VoucherifySdk/models/orders_update_request_body.rb +1 -1
  102. data/lib/VoucherifySdk/models/orders_update_response_body.rb +1 -1
  103. data/lib/VoucherifySdk/models/parameter_expand_list_campaigns.rb +2 -1
  104. data/lib/VoucherifySdk/models/product.rb +1 -1
  105. data/lib/VoucherifySdk/models/product_collections_products_list_response_body_data_item.rb +1 -1
  106. data/lib/VoucherifySdk/models/product_without_skus.rb +1 -1
  107. data/lib/VoucherifySdk/models/products_create_response_body.rb +1 -1
  108. data/lib/VoucherifySdk/models/products_get_response_body.rb +1 -1
  109. data/lib/VoucherifySdk/models/products_skus_create_response_body.rb +1 -1
  110. data/lib/VoucherifySdk/models/products_skus_update_response_body.rb +1 -1
  111. data/lib/VoucherifySdk/models/products_update_response_body.rb +1 -1
  112. data/lib/VoucherifySdk/models/redemption_entry_order.rb +1 -1
  113. data/lib/VoucherifySdk/models/redemptions_get_response_body_order.rb +1 -1
  114. data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_order.rb +1 -1
  115. data/lib/VoucherifySdk/models/sku.rb +1 -1
  116. data/lib/VoucherifySdk/models/skus_get_response_body.rb +1 -1
  117. data/lib/VoucherifySdk/models/templates_campaigns_campaign_setup_create_request_body.rb +1 -1
  118. data/lib/VoucherifySdk/models/validations_redeemable_inapplicable.rb +18 -7
  119. data/lib/VoucherifySdk/models/validations_redeemable_skipped.rb +18 -7
  120. data/lib/VoucherifySdk/models/validations_validate_response_body_redeemables_item.rb +18 -7
  121. data/lib/VoucherifySdk/models/voucher_balance.rb +305 -0
  122. data/lib/VoucherifySdk/models/voucher_balance_related_object.rb +247 -0
  123. data/lib/VoucherifySdk/models/voucher_transaction.rb +27 -31
  124. data/lib/VoucherifySdk/models/voucher_transaction_details.rb +0 -1
  125. data/lib/VoucherifySdk/models/voucher_transaction_details_balance.rb +18 -19
  126. data/lib/VoucherifySdk/models/voucher_transaction_details_balance_related_object.rb +1 -7
  127. data/lib/VoucherifySdk/models/vouchers_balance_update_response_body.rb +1 -0
  128. data/lib/VoucherifySdk/version.rb +1 -1
  129. data/lib/VoucherifySdk.rb +5 -0
  130. metadata +12 -2
@@ -20,7 +20,7 @@ module VoucherifySdk
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create Voucher
23
- # Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. The code path parameter can use all letters of the English alphabet, Arabic numerals and special characters. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new stand alone voucher if no campaign name or campaign_id is provided. In case of the loyalty card, a campaign name is required.
23
+ # Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. The code path parameter can use all letters of the English alphabet, Arabic numerals and special characters. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new standalone voucher if no campaign name or campaign_id is provided. However, if an ID or name of a campaign with the type set to STANDALONE is provided, the voucher will be added to such campaign. In the case of the loyalty card, a campaign name or ID is required. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers created through the API do not have a campaign attached, so the values for campaign and campaign_id are null. Voucherify developers work on adding an optional feature to create a standalone voucher campaign through the API. Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.
24
24
  # @param code [String] A unique **code** that identifies the voucher.
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [VouchersCreateWithSpecificCodeRequestBody] :vouchers_create_with_specific_code_request_body Specify the details of the voucher that you would like to create.
@@ -31,7 +31,7 @@ module VoucherifySdk
31
31
  end
32
32
 
33
33
  # Create Voucher
34
- # Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. The code path parameter can use all letters of the English alphabet, Arabic numerals and special characters. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new stand alone voucher if no campaign name or campaign_id is provided. In case of the loyalty card, a campaign name is required.
34
+ # Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. The code path parameter can use all letters of the English alphabet, Arabic numerals and special characters. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new standalone voucher if no campaign name or campaign_id is provided. However, if an ID or name of a campaign with the type set to STANDALONE is provided, the voucher will be added to such campaign. In the case of the loyalty card, a campaign name or ID is required. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers created through the API do not have a campaign attached, so the values for campaign and campaign_id are null. Voucherify developers work on adding an optional feature to create a standalone voucher campaign through the API. Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.
35
35
  # @param code [String] A unique **code** that identifies the voucher.
36
36
  # @param [Hash] opts the optional parameters
37
37
  # @option opts [VouchersCreateWithSpecificCodeRequestBody] :vouchers_create_with_specific_code_request_body Specify the details of the voucher that you would like to create.
@@ -267,7 +267,7 @@ module VoucherifySdk
267
267
  # Export transactions that are associated with credit movements on a gift card or loyalty card.
268
268
  # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
269
269
  # @param [Hash] opts the optional parameters
270
- # @option opts [VouchersTransactionsExportCreateRequestBody] :vouchers_transactions_export_create_request_body Specify the parameters for the transaction export.
270
+ # @option opts [VouchersTransactionsExportCreateRequestBody] :vouchers_transactions_export_create_request_body Specify the parameters for the camapign transaction export.
271
271
  # @return [VouchersTransactionsExportCreateResponseBody]
272
272
  def export_voucher_transactions(code, opts = {})
273
273
  data, _status_code, _headers = export_voucher_transactions_with_http_info(code, opts)
@@ -278,7 +278,7 @@ module VoucherifySdk
278
278
  # Export transactions that are associated with credit movements on a gift card or loyalty card.
279
279
  # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
280
280
  # @param [Hash] opts the optional parameters
281
- # @option opts [VouchersTransactionsExportCreateRequestBody] :vouchers_transactions_export_create_request_body Specify the parameters for the transaction export.
281
+ # @option opts [VouchersTransactionsExportCreateRequestBody] :vouchers_transactions_export_create_request_body Specify the parameters for the camapign transaction export.
282
282
  # @return [Array<(VouchersTransactionsExportCreateResponseBody, Integer, Hash)>] VouchersTransactionsExportCreateResponseBody data, response status code and response headers
283
283
  private def export_voucher_transactions_with_http_info(code, opts = {})
284
284
  if @api_client.config.debugging
@@ -330,7 +330,7 @@ module VoucherifySdk
330
330
  end
331
331
 
332
332
  # Generate Random Code
333
- # Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new stand alone voucher if no campaign name or campaign_id is provided. In case of the loyalty card, a campaign name is required. You can optionally use the code parameter to define a specific code or the code_config parameter to design rules for Voucherify API to create a random code. If neither of the two parameters are passed, then a random code is generated by the Voucherify API. This method will return an error when trying to create a voucher that already exists.
333
+ # Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new standalone voucher if no campaign name or campaign_id is provided. However, if an ID or name of a campaign with the type set to STANDALONE is provided, the voucher will be added to such campaign. In case of the loyalty card, a campaign name is required. You can optionally use the code parameter to define a specific code or the code_config parameter to design rules for Voucherify API to create a random code. If neither of the two parameters are passed, then a random code is generated by the Voucherify API. This method will return an error when trying to create a voucher that already exists. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers created through the API do not have a campaign attached, so the values for campaign and campaign_id are null. Voucherify developers work on adding an optional feature to create a standalone voucher campaign through the API. Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.
334
334
  # @param [Hash] opts the optional parameters
335
335
  # @option opts [VouchersCreateRequestBody] :vouchers_create_request_body Specify the details of the voucher that you would like to create.
336
336
  # @return [VouchersCreateResponseBody]
@@ -340,7 +340,7 @@ module VoucherifySdk
340
340
  end
341
341
 
342
342
  # Generate Random Code
343
- # Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new stand alone voucher if no campaign name or campaign_id is provided. In case of the loyalty card, a campaign name is required. You can optionally use the code parameter to define a specific code or the code_config parameter to design rules for Voucherify API to create a random code. If neither of the two parameters are passed, then a random code is generated by the Voucherify API. This method will return an error when trying to create a voucher that already exists.
343
+ # Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new standalone voucher if no campaign name or campaign_id is provided. However, if an ID or name of a campaign with the type set to STANDALONE is provided, the voucher will be added to such campaign. In case of the loyalty card, a campaign name is required. You can optionally use the code parameter to define a specific code or the code_config parameter to design rules for Voucherify API to create a random code. If neither of the two parameters are passed, then a random code is generated by the Voucherify API. This method will return an error when trying to create a voucher that already exists. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers created through the API do not have a campaign attached, so the values for campaign and campaign_id are null. Voucherify developers work on adding an optional feature to create a standalone voucher campaign through the API. Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.
344
344
  # @param [Hash] opts the optional parameters
345
345
  # @option opts [VouchersCreateRequestBody] :vouchers_create_request_body Specify the details of the voucher that you would like to create.
346
346
  # @return [Array<(VouchersCreateResponseBody, Integer, Hash)>] VouchersCreateResponseBody data, response status code and response headers
@@ -453,7 +453,7 @@ module VoucherifySdk
453
453
  end
454
454
 
455
455
  # Import Vouchers
456
- # Import standalone vouchers and gift cards into the repository. 📘 Important notes - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. Any parameters not provided in the payload will be left blank or null. For both **standalone discount vouchers and gift cards**, you can import the following fields: - code - category - active - type - start_date - expiration_date - redemption.quantity - additional_info - metadata For **gift cards**, you can also import the following field: - gift.amount For **discount vouchers**, you can import the discount object. The object will slightly vary depending on the type of discount. Each discount type **requires** the type to be defined in the import. Fields other than the ones listed above wont be imported. Even if provided, they will be silently skipped. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
456
+ # Import standalone vouchers and gift cards into the repository. 📘 Important notes - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. Any parameters not provided in the payload will be left blank or null. For both **standalone discount vouchers and gift cards**, you can import the following fields: - code - category - active - type - start_date - expiration_date - redemption.quantity - additional_info - metadata For **gift cards**, you can also import the following field: - gift.amount For **discount vouchers**, you can import the discount object. The object will slightly vary depending on the type of discount. Each discount type **requires** the type to be defined in the import. Fields other than the ones listed above wont be imported. Even if provided, they will be silently skipped. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for campaign and campaign_id are null.
457
457
  # @param vouchers_import_create_item_request_body [Array<VouchersImportCreateItemRequestBody>] The request body is an array of objects. Each object contains details about a specific voucher.
458
458
  # @param [Hash] opts the optional parameters
459
459
  # @return [VouchersImportCreateResponseBody]
@@ -463,7 +463,7 @@ module VoucherifySdk
463
463
  end
464
464
 
465
465
  # Import Vouchers
466
- # Import standalone vouchers and gift cards into the repository. 📘 Important notes - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. Any parameters not provided in the payload will be left blank or null. For both **standalone discount vouchers and gift cards**, you can import the following fields: - code - category - active - type - start_date - expiration_date - redemption.quantity - additional_info - metadata For **gift cards**, you can also import the following field: - gift.amount For **discount vouchers**, you can import the discount object. The object will slightly vary depending on the type of discount. Each discount type **requires** the type to be defined in the import. Fields other than the ones listed above wont be imported. Even if provided, they will be silently skipped. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
466
+ # Import standalone vouchers and gift cards into the repository. 📘 Important notes - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. Any parameters not provided in the payload will be left blank or null. For both **standalone discount vouchers and gift cards**, you can import the following fields: - code - category - active - type - start_date - expiration_date - redemption.quantity - additional_info - metadata For **gift cards**, you can also import the following field: - gift.amount For **discount vouchers**, you can import the discount object. The object will slightly vary depending on the type of discount. Each discount type **requires** the type to be defined in the import. Fields other than the ones listed above wont be imported. Even if provided, they will be silently skipped. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for campaign and campaign_id are null.
467
467
  # @param vouchers_import_create_item_request_body [Array<VouchersImportCreateItemRequestBody>] The request body is an array of objects. Each object contains details about a specific voucher.
468
468
  # @param [Hash] opts the optional parameters
469
469
  # @return [Array<(VouchersImportCreateResponseBody, Integer, Hash)>] VouchersImportCreateResponseBody data, response status code and response headers
@@ -517,7 +517,7 @@ module VoucherifySdk
517
517
  end
518
518
 
519
519
  # Import Vouchers using CSV
520
- # Import standalone vouchers into the repository using a CSV file. The CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object. You can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons). ___ 📘 Standard voucher fields mapping - Go to the import vouchers endpoint to see all standard CSV fields description (body params section). - Supported CSV file headers: Code,Voucher Type,Value,Discount Type,Category,Start Date,Expiration Date,Redemption Limit,Redeemed Quantity, Redeemed Amount,Active,Additional Info,Custom Metadata Property Name - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - YYYY-MM-DD - YYYY-MM-DDTHH - YYYY-MM-DDTHH:mm - YYYY-MM-DDTHH:mm:ss - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ss.SSSZ - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. 📘 Categories In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the List Vouchers endpoint. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
520
+ # Import standalone vouchers into the repository using a CSV file. The CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object. You can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons). ___ 📘 Standard voucher fields mapping - Go to the import vouchers endpoint to see all standard CSV fields description (body params section). - Supported CSV file headers: Code,Voucher Type,Value,Discount Type,Category,Start Date,Expiration Date,Redemption Limit,Redeemed Quantity, Redeemed Amount,Active,Additional Info,Custom Metadata Property Name - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - YYYY-MM-DD - YYYY-MM-DDTHH - YYYY-MM-DDTHH:mm - YYYY-MM-DDTHH:mm:ss - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ss.SSSZ - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. 📘 Categories In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the List Vouchers endpoint. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for campaign and campaign_id are null.
521
521
  # @param [Hash] opts the optional parameters
522
522
  # @option opts [File] :file File path.
523
523
  # @return [VouchersImportCsvCreateResponseBody]
@@ -527,7 +527,7 @@ module VoucherifySdk
527
527
  end
528
528
 
529
529
  # Import Vouchers using CSV
530
- # Import standalone vouchers into the repository using a CSV file. The CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object. You can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons). ___ 📘 Standard voucher fields mapping - Go to the import vouchers endpoint to see all standard CSV fields description (body params section). - Supported CSV file headers: Code,Voucher Type,Value,Discount Type,Category,Start Date,Expiration Date,Redemption Limit,Redeemed Quantity, Redeemed Amount,Active,Additional Info,Custom Metadata Property Name - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - YYYY-MM-DD - YYYY-MM-DDTHH - YYYY-MM-DDTHH:mm - YYYY-MM-DDTHH:mm:ss - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ss.SSSZ - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. 📘 Categories In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the List Vouchers endpoint. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
530
+ # Import standalone vouchers into the repository using a CSV file. The CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object. You can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons). ___ 📘 Standard voucher fields mapping - Go to the import vouchers endpoint to see all standard CSV fields description (body params section). - Supported CSV file headers: Code,Voucher Type,Value,Discount Type,Category,Start Date,Expiration Date,Redemption Limit,Redeemed Quantity, Redeemed Amount,Active,Additional Info,Custom Metadata Property Name - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - YYYY-MM-DD - YYYY-MM-DDTHH - YYYY-MM-DDTHH:mm - YYYY-MM-DDTHH:mm:ss - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ss.SSSZ - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. 📘 Categories In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the List Vouchers endpoint. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for campaign and campaign_id are null.
531
531
  # @param [Hash] opts the optional parameters
532
532
  # @option opts [File] :file File path.
533
533
  # @return [Array<(VouchersImportCsvCreateResponseBody, Integer, Hash)>] VouchersImportCsvCreateResponseBody data, response status code and response headers
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module VoucherifySdk
17
- # Lists all assignments of the campaign to areas and stores. **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
17
+ # Lists all assignments of the campaign to areas and stores. For [GET List Campaigns](ref:list-campaigns), this is returned if the `expand=access_settings_assignments` query parameter is passed in the request. **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
18
18
  class AccessSettingsCampaignAssignmentsList
19
19
  # The type of the object represented by JSON. Default is `list`. This object stores information about campaign assignments to areas and stores
20
20
  attr_accessor :object
@@ -27,7 +27,7 @@ module VoucherifySdk
27
27
  # Type of campaign.
28
28
  attr_accessor :campaign_type
29
29
 
30
- # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
30
+ # Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers
31
31
  attr_accessor :type
32
32
 
33
33
  attr_accessor :voucher
@@ -35,7 +35,7 @@ module VoucherifySdk
35
35
  # Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
36
36
  attr_accessor :auto_join
37
37
 
38
- # If this value is set to `true`, customers will be able to join the campaign only once.
38
+ # If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
39
39
  attr_accessor :join_once
40
40
 
41
41
  # Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
@@ -402,7 +402,7 @@ module VoucherifySdk
402
402
  warn '[DEPRECATED] the `valid?` method is obsolete'
403
403
  campaign_type_validator = EnumAttributeValidator.new('String', ["LOYALTY_PROGRAM", "GIFT_VOUCHERS", "DISCOUNT_COUPONS", "PROMOTION", "REFERRAL_PROGRAM"])
404
404
  return false unless campaign_type_validator.valid?(@campaign_type)
405
- type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
405
+ type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC", "STANDALONE"])
406
406
  return false unless type_validator.valid?(@type)
407
407
  creation_status_validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
408
408
  return false unless creation_status_validator.valid?(@creation_status)
@@ -28,7 +28,7 @@ module VoucherifySdk
28
28
  # Type of campaign.
29
29
  attr_accessor :campaign_type
30
30
 
31
- # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
31
+ # Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers
32
32
  attr_accessor :type
33
33
 
34
34
  attr_accessor :voucher
@@ -36,7 +36,7 @@ module VoucherifySdk
36
36
  # Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
37
37
  attr_accessor :auto_join
38
38
 
39
- # If this value is set to `true`, customers will be able to join the campaign only once.
39
+ # If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
40
40
  attr_accessor :join_once
41
41
 
42
42
  # Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
@@ -379,7 +379,7 @@ module VoucherifySdk
379
379
  warn '[DEPRECATED] the `valid?` method is obsolete'
380
380
  campaign_type_validator = EnumAttributeValidator.new('String', ["LOYALTY_PROGRAM", "GIFT_VOUCHERS", "DISCOUNT_COUPONS", "PROMOTION", "REFERRAL_PROGRAM"])
381
381
  return false unless campaign_type_validator.valid?(@campaign_type)
382
- type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
382
+ type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC", "STANDALONE"])
383
383
  return false unless type_validator.valid?(@type)
384
384
  creation_status_validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
385
385
  return false unless creation_status_validator.valid?(@creation_status)
@@ -21,7 +21,7 @@ module VoucherifySdk
21
21
  # An optional field to keep any extra textual information about the campaign such as a campaign description and details.
22
22
  attr_accessor :description
23
23
 
24
- # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.
24
+ # Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
25
25
  attr_accessor :type
26
26
 
27
27
  # If this value is set to `true`, customers will be able to join the campaign only once.
@@ -28,7 +28,7 @@ module VoucherifySdk
28
28
  # Type of campaign.
29
29
  attr_accessor :campaign_type
30
30
 
31
- # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
31
+ # Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers
32
32
  attr_accessor :type
33
33
 
34
34
  attr_accessor :voucher
@@ -36,7 +36,7 @@ module VoucherifySdk
36
36
  # Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
37
37
  attr_accessor :auto_join
38
38
 
39
- # If this value is set to `true`, customers will be able to join the campaign only once.
39
+ # If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
40
40
  attr_accessor :join_once
41
41
 
42
42
  # Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
@@ -403,7 +403,7 @@ module VoucherifySdk
403
403
  warn '[DEPRECATED] the `valid?` method is obsolete'
404
404
  campaign_type_validator = EnumAttributeValidator.new('String', ["LOYALTY_PROGRAM", "GIFT_VOUCHERS", "DISCOUNT_COUPONS", "PROMOTION", "REFERRAL_PROGRAM"])
405
405
  return false unless campaign_type_validator.valid?(@campaign_type)
406
- type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
406
+ type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC", "STANDALONE"])
407
407
  return false unless type_validator.valid?(@type)
408
408
  creation_status_validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
409
409
  return false unless creation_status_validator.valid?(@creation_status)
@@ -28,7 +28,7 @@ module VoucherifySdk
28
28
  # Type of campaign.
29
29
  attr_accessor :campaign_type
30
30
 
31
- # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
31
+ # Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers
32
32
  attr_accessor :type
33
33
 
34
34
  attr_accessor :voucher
@@ -36,7 +36,7 @@ module VoucherifySdk
36
36
  # Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
37
37
  attr_accessor :auto_join
38
38
 
39
- # If this value is set to `true`, customers will be able to join the campaign only once.
39
+ # If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
40
40
  attr_accessor :join_once
41
41
 
42
42
  # Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
@@ -403,7 +403,7 @@ module VoucherifySdk
403
403
  warn '[DEPRECATED] the `valid?` method is obsolete'
404
404
  campaign_type_validator = EnumAttributeValidator.new('String', ["LOYALTY_PROGRAM", "GIFT_VOUCHERS", "DISCOUNT_COUPONS", "PROMOTION", "REFERRAL_PROGRAM"])
405
405
  return false unless campaign_type_validator.valid?(@campaign_type)
406
- type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
406
+ type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC", "STANDALONE"])
407
407
  return false unless type_validator.valid?(@type)
408
408
  creation_status_validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
409
409
  return false unless creation_status_validator.valid?(@creation_status)
@@ -46,13 +46,13 @@ module VoucherifySdk
46
46
  # Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.
47
47
  attr_accessor :activity_duration_after_publishing
48
48
 
49
- # If this value is set to `true`, customers will be able to join the campaign only once.
49
+ # If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
50
50
  attr_accessor :join_once
51
51
 
52
52
  # Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
53
53
  attr_accessor :auto_join
54
54
 
55
- # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.
55
+ # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. If the `type` of the campaign is `STANDALONE`, the type cannot be changed. Also, the `type` cannot be changed to `STANDALONE`.
56
56
  attr_accessor :type
57
57
 
58
58
  attr_accessor :discount
@@ -28,7 +28,7 @@ module VoucherifySdk
28
28
  # Type of campaign.
29
29
  attr_accessor :campaign_type
30
30
 
31
- # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
31
+ # Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers
32
32
  attr_accessor :type
33
33
 
34
34
  attr_accessor :voucher
@@ -36,7 +36,7 @@ module VoucherifySdk
36
36
  # Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
37
37
  attr_accessor :auto_join
38
38
 
39
- # If this value is set to `true`, customers will be able to join the campaign only once.
39
+ # If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
40
40
  attr_accessor :join_once
41
41
 
42
42
  # Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
@@ -403,7 +403,7 @@ module VoucherifySdk
403
403
  warn '[DEPRECATED] the `valid?` method is obsolete'
404
404
  campaign_type_validator = EnumAttributeValidator.new('String', ["LOYALTY_PROGRAM", "GIFT_VOUCHERS", "DISCOUNT_COUPONS", "PROMOTION", "REFERRAL_PROGRAM"])
405
405
  return false unless campaign_type_validator.valid?(@campaign_type)
406
- type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
406
+ type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC", "STANDALONE"])
407
407
  return false unless type_validator.valid?(@type)
408
408
  creation_status_validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
409
409
  return false unless creation_status_validator.valid?(@creation_status)
@@ -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
@@ -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