voucherify 8.2.0 → 8.3.0
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.
- checksums.yaml +4 -4
- data/Dockerfile +1 -1
- data/ENDPOINTS-COVERAGE.md +17 -15
- data/Gemfile.lock +9 -9
- data/README.md +12 -0
- data/__tests__/lib/campaigns.rb +2 -2
- data/__tests__/spec/snapshots/campaigns/created_validation_rule_applicable_to.snap +1 -1
- data/__tests__/spec/snapshots/campaigns/created_validation_rule_more_than.snap +1 -1
- data/docs/AccessSettingsAssign.md +3 -3
- data/docs/AccessSettingsProductCollectionAssignmentsList.md +11 -0
- data/docs/AccessSettingsUnassign.md +3 -3
- data/docs/ApplicableTo.md +1 -1
- data/docs/AreaStoreProductCollectionAssignment.md +14 -0
- data/docs/Campaign.md +2 -2
- data/docs/CampaignBase.md +2 -2
- data/docs/CampaignsApi.md +4 -4
- data/docs/CampaignsCreateRequestBody.md +2 -2
- data/docs/CampaignsCreateResponseBody.md +2 -2
- data/docs/CampaignsGetResponseBody.md +2 -2
- data/docs/CampaignsUpdateRequestBody.md +2 -2
- data/docs/CampaignsUpdateResponseBody.md +2 -2
- data/docs/CardDailyReportEntry.md +3 -1
- data/docs/CardLifetimeBucketPoints.md +2 -0
- data/docs/CustomerLoyalty.md +2 -2
- data/docs/CustomerLoyaltyCampaignsEntry.md +1 -1
- data/docs/CustomersApi.md +4 -4
- data/docs/InapplicableTo.md +1 -1
- data/docs/LV2BenefitsApi.md +1 -1
- data/docs/LV2EarningRulesApi.md +1 -1
- data/docs/LV2ExamineApi.md +2 -2
- data/docs/LV2ProgramsApi.md +44 -44
- data/docs/LV2RewardsApi.md +1 -1
- data/docs/ListPublicationsItemVoucher.md +1 -1
- data/docs/LoyaltiesApi.md +6 -6
- data/docs/LoyaltiesCreateCampaignRequestBody.md +2 -2
- data/docs/LoyaltiesCreateCampaignResponseBody.md +2 -2
- data/docs/LoyaltiesGetCampaignResponseBody.md +2 -2
- data/docs/LoyaltiesListMembersResponseBody.md +1 -1
- data/docs/LoyaltiesMembersRedemptionRedeemResponseBodyChannel.md +1 -1
- data/docs/LoyaltiesRewardAssignmentsGetResponseBody.md +2 -2
- data/docs/LoyaltiesRewardAssignmentsGetResponseBodyParametersLoyalty.md +1 -1
- data/docs/LoyaltiesRewardAssignmentsRewardGetResponseBody.md +1 -1
- data/docs/LoyaltiesRewardsCreateAssignmentResponseBody.md +2 -2
- data/docs/LoyaltiesRewardsCreateAssignmentResponseBodyParametersLoyalty.md +1 -1
- data/docs/LoyaltiesRewardsGetResponseBody.md +2 -2
- data/docs/LoyaltiesRewardsGetResponseBodyParametersLoyalty.md +1 -1
- data/docs/LoyaltiesRewardsUpdateAssignmentRequestBodyParametersLoyalty.md +1 -1
- data/docs/LoyaltiesRewardsUpdateAssignmentResponseBody.md +2 -2
- data/docs/LoyaltiesRewardsUpdateAssignmentResponseBodyParametersLoyalty.md +1 -1
- data/docs/LoyaltiesTiersListResponseBody.md +1 -1
- data/docs/LoyaltiesUpdateCampaignRequestBody.md +2 -2
- data/docs/LoyaltiesUpdateCampaignResponseBody.md +2 -2
- data/docs/LoyaltyCampaign.md +2 -2
- data/docs/LoyaltyV2ActivityBenefitStockLimited.md +1 -1
- data/docs/LoyaltyV2ActivityEarningRuleEffectPointsExpirationCalendarExpirationDate.md +1 -1
- data/docs/LoyaltyV2ActivityEarningRuleEffectPointsExpirationRollingExpirationRounding.md +1 -1
- data/docs/LoyaltyV2ActivityEarningRulePointsProportionalEvery.md +1 -1
- data/docs/LoyaltyV2ActivityEarningRulePointsProportionalMetadata.md +1 -1
- data/docs/ManagementApi.md +2 -2
- data/docs/ManagementProjectsCreateRequestBodyUsersItem.md +2 -2
- data/docs/ManagementProjectsUsersAssignRequestBody.md +2 -2
- data/docs/MetadataSchemasApi.md +1 -1
- data/docs/ProductCollectionsApi.md +4 -4
- data/docs/ProductCollectionsCreateRequestBody.md +1 -0
- data/docs/ProductCollectionsCreateResponseBody.md +2 -0
- data/docs/ProductCollectionsGetResponseBody.md +2 -0
- data/docs/ProductCollectionsItem.md +2 -0
- data/docs/ProductCollectionsListResponseBody.md +1 -1
- data/docs/ProductsApi.md +1 -1
- data/docs/RedemptionChannel.md +1 -1
- data/docs/RedemptionRewardResult.md +1 -1
- data/docs/RedemptionRewardResultParametersCoin.md +1 -1
- data/docs/Reward.md +1 -1
- data/docs/RewardAssignment.md +2 -2
- data/docs/RewardAssignmentParametersLoyalty.md +1 -1
- data/docs/RewardType.md +1 -0
- data/docs/RewardTypeCoin.md +2 -2
- data/docs/RewardTypeLoyaltyPoints.md +11 -0
- data/docs/RewardsApi.md +5 -5
- data/docs/RewardsAssignmentsCreateRequestBody.md +2 -0
- data/docs/RewardsAssignmentsCreateRequestBodyParametersLoyalty.md +1 -1
- data/docs/RewardsAssignmentsCreateResponseBody.md +2 -2
- data/docs/RewardsAssignmentsCreateResponseBodyParametersLoyalty.md +1 -1
- data/docs/RewardsAssignmentsGetResponseBody.md +2 -2
- data/docs/RewardsAssignmentsGetResponseBodyParametersLoyalty.md +1 -1
- data/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md +1 -1
- data/docs/RewardsAssignmentsUpdateResponseBody.md +2 -2
- data/docs/RewardsAssignmentsUpdateResponseBodyParametersLoyalty.md +1 -1
- data/docs/RewardsCreateRequestBody.md +1 -0
- data/docs/RewardsCreateRequestBodyParameters.md +1 -0
- data/docs/RewardsCreateRequestBodyParametersCoin.md +1 -1
- data/docs/RewardsCreateRequestBodyParametersLoyaltyPoints.md +11 -0
- data/docs/RewardsCreateResponseBody.md +1 -1
- data/docs/RewardsUpdateRequestBodyParameters.md +1 -0
- data/docs/RewardsUpdateRequestBodyParametersCoin.md +1 -1
- data/docs/RewardsUpdateRequestBodyParametersLoyaltyPoints.md +11 -0
- data/docs/RewardsUpdateResponseBody.md +1 -1
- data/docs/TemplatesApi.md +1 -1
- data/docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md +2 -2
- data/docs/V2LoyaltiesBenefitsGetResponseBody.md +1 -1
- data/docs/V2LoyaltiesBenefitsGetResponseBodyPoints.md +1 -1
- data/docs/V2LoyaltiesBenefitsGetResponseBodyPointsProportional.md +2 -2
- data/docs/V2LoyaltiesEarningRulesGetResponseBody.md +1 -1
- data/docs/VouchersApi.md +6 -6
- data/lib/VoucherifySdk/api/campaigns_api.rb +6 -6
- data/lib/VoucherifySdk/api/customers_api.rb +4 -4
- data/lib/VoucherifySdk/api/loyalties_api.rb +8 -8
- data/lib/VoucherifySdk/api/lv2_benefits_api.rb +2 -2
- data/lib/VoucherifySdk/api/lv2_earning_rules_api.rb +2 -2
- data/lib/VoucherifySdk/api/lv2_examine_api.rb +4 -4
- data/lib/VoucherifySdk/api/lv2_programs_api.rb +88 -88
- data/lib/VoucherifySdk/api/lv2_rewards_api.rb +2 -2
- data/lib/VoucherifySdk/api/management_api.rb +4 -4
- data/lib/VoucherifySdk/api/metadata_schemas_api.rb +2 -2
- data/lib/VoucherifySdk/api/product_collections_api.rb +8 -8
- data/lib/VoucherifySdk/api/products_api.rb +2 -2
- data/lib/VoucherifySdk/api/rewards_api.rb +8 -8
- data/lib/VoucherifySdk/api/templates_api.rb +2 -2
- data/lib/VoucherifySdk/api/vouchers_api.rb +12 -12
- data/lib/VoucherifySdk/models/access_settings.rb +1 -1
- data/lib/VoucherifySdk/models/access_settings_assign.rb +4 -4
- data/lib/VoucherifySdk/models/access_settings_product_collection_assignments_list.rb +280 -0
- data/lib/VoucherifySdk/models/access_settings_unassign.rb +4 -4
- data/lib/VoucherifySdk/models/applicable_to.rb +1 -1
- data/lib/VoucherifySdk/models/area_store_product_collection_assignment.rb +302 -0
- data/lib/VoucherifySdk/models/benefit_points_proportional_custom_event_metadata.rb +1 -1
- data/lib/VoucherifySdk/models/benefit_points_proportional_customer_metadata.rb +1 -1
- data/lib/VoucherifySdk/models/benefit_points_proportional_order_amount.rb +1 -1
- data/lib/VoucherifySdk/models/benefit_points_proportional_order_metadata.rb +1 -1
- data/lib/VoucherifySdk/models/benefit_points_proportional_order_total_amount.rb +1 -1
- data/lib/VoucherifySdk/models/campaign.rb +2 -2
- data/lib/VoucherifySdk/models/campaign_base.rb +2 -2
- data/lib/VoucherifySdk/models/campaign_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/campaign_loyalty_card_expiration_rules.rb +1 -1
- data/lib/VoucherifySdk/models/campaigns_create_request_body.rb +2 -2
- data/lib/VoucherifySdk/models/campaigns_create_response_body.rb +2 -2
- data/lib/VoucherifySdk/models/campaigns_get_response_body.rb +2 -2
- data/lib/VoucherifySdk/models/campaigns_update_request_body.rb +2 -2
- data/lib/VoucherifySdk/models/campaigns_update_response_body.rb +2 -2
- data/lib/VoucherifySdk/models/campaigns_vouchers_create_combined_response_body_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/campaigns_vouchers_create_response_body_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/card_daily_report_entry.rb +24 -2
- data/lib/VoucherifySdk/models/card_lifetime_bucket_points.rb +31 -5
- data/lib/VoucherifySdk/models/card_transaction.rb +1 -1
- data/lib/VoucherifySdk/models/client_events_create_request_body_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/customer_loyalty.rb +3 -2
- data/lib/VoucherifySdk/models/customer_loyalty_campaigns_entry.rb +2 -2
- data/lib/VoucherifySdk/models/customer_summary_redemptions_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/earning_rule.rb +1 -0
- data/lib/VoucherifySdk/models/events_create_request_body_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/inapplicable_to.rb +1 -1
- data/lib/VoucherifySdk/models/list_publications_item_voucher.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_create_campaign_request_body.rb +3 -3
- data/lib/VoucherifySdk/models/loyalties_create_campaign_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/loyalties_earning_rules_create_request_body_item_custom_event.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_create_request_body_item_segment.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_list_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_update_request_body.rb +1 -0
- data/lib/VoucherifySdk/models/loyalties_get_campaign_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/loyalties_list_campaigns_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_list_members_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_loyalty_tier_reward.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_members_create_response_body_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_members_get_response_body_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_members_redemption_redeem_response_body_channel.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_members_redemption_redeem_response_body_voucher_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_members_transfers_create_response_body_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_programs_members_benefits_transactions_list_request_query_benefit_id.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_reward_assignments_get_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/loyalties_reward_assignments_get_response_body_parameters_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_reward_assignments_reward_get_response_body.rb +2 -2
- data/lib/VoucherifySdk/models/loyalties_rewards_create_assignment_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/loyalties_rewards_create_assignment_response_body_parameters_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_rewards_get_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/loyalties_rewards_get_response_body_parameters_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_rewards_update_assignment_request_body_parameters_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_rewards_update_assignment_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/loyalties_rewards_update_assignment_response_body_parameters_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_tiers_list_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_transfer_points.rb +1 -0
- data/lib/VoucherifySdk/models/loyalties_update_campaign_request_body.rb +3 -3
- data/lib/VoucherifySdk/models/loyalties_update_campaign_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/loyalty_campaign.rb +3 -2
- data/lib/VoucherifySdk/models/loyalty_campaign_voucher.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details_holder_loyalty_tier.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details_loyalty_tier.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_member.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_member_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_holder_loyalty_tier.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_tier.rb +1 -0
- data/lib/VoucherifySdk/models/loyalty_tiers_expiration_all.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_v2_activity_benefit_stock_limited.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_effect_points_expiration_calendar_expiration_date.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_effect_points_expiration_rolling_expiration_rounding.rb +2 -2
- data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_points_proportional_every.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_v2_activity_earning_rule_points_proportional_metadata.rb +1 -1
- data/lib/VoucherifySdk/models/management_projects_create_request_body_users_item.rb +2 -2
- data/lib/VoucherifySdk/models/management_projects_users_assign_request_body.rb +2 -2
- data/lib/VoucherifySdk/models/member_activity.rb +1 -1
- data/lib/VoucherifySdk/models/parameter_filters_list_customer_redeemables_campaign_type.rb +1 -1
- data/lib/VoucherifySdk/models/product_collections_create_request_body.rb +10 -1
- data/lib/VoucherifySdk/models/product_collections_create_response_body.rb +21 -1
- data/lib/VoucherifySdk/models/product_collections_get_response_body.rb +21 -1
- data/lib/VoucherifySdk/models/product_collections_item.rb +21 -1
- data/lib/VoucherifySdk/models/product_collections_list_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/redeemable_voucher_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/redemption_channel.rb +1 -1
- data/lib/VoucherifySdk/models/redemption_reward_result.rb +2 -2
- data/lib/VoucherifySdk/models/redemption_reward_result_parameters_coin.rb +2 -2
- data/lib/VoucherifySdk/models/redemption_voucher_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/reward.rb +2 -2
- data/lib/VoucherifySdk/models/reward_assignment.rb +3 -3
- data/lib/VoucherifySdk/models/reward_assignment_parameters_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/reward_type.rb +15 -5
- data/lib/VoucherifySdk/models/reward_type_coin.rb +3 -3
- data/lib/VoucherifySdk/models/reward_type_loyalty_points.rb +284 -0
- data/lib/VoucherifySdk/models/rewards_assignments_create_request_body.rb +50 -5
- data/lib/VoucherifySdk/models/rewards_assignments_create_request_body_parameters_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/rewards_assignments_create_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/rewards_assignments_create_response_body_parameters_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/rewards_assignments_get_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/rewards_assignments_get_response_body_parameters_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/rewards_assignments_update_request_body_parameters_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/rewards_assignments_update_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/rewards_assignments_update_response_body_parameters_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/rewards_create_request_body.rb +35 -1
- data/lib/VoucherifySdk/models/rewards_create_request_body_parameters.rb +15 -5
- data/lib/VoucherifySdk/models/rewards_create_request_body_parameters_coin.rb +2 -2
- data/lib/VoucherifySdk/models/rewards_create_request_body_parameters_loyalty_points.rb +284 -0
- data/lib/VoucherifySdk/models/rewards_create_response_body.rb +2 -2
- data/lib/VoucherifySdk/models/rewards_update_request_body_parameters.rb +15 -5
- data/lib/VoucherifySdk/models/rewards_update_request_body_parameters_coin.rb +2 -2
- data/lib/VoucherifySdk/models/rewards_update_request_body_parameters_loyalty_points.rb +284 -0
- data/lib/VoucherifySdk/models/rewards_update_response_body.rb +2 -2
- data/lib/VoucherifySdk/models/simple_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/templates_campaigns_campaign_setup_create_request_body.rb +2 -2
- data/lib/VoucherifySdk/models/v2_loyalties_benefits_get_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/v2_loyalties_benefits_get_response_body_points.rb +1 -1
- data/lib/VoucherifySdk/models/v2_loyalties_benefits_get_response_body_points_proportional.rb +3 -3
- data/lib/VoucherifySdk/models/v2_loyalties_earning_rules_get_response_body.rb +2 -2
- data/lib/VoucherifySdk/models/voucher_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/voucher_transaction_details_holder_loyalty_tier.rb +1 -1
- data/lib/VoucherifySdk/models/voucher_transaction_details_loyalty_tier.rb +1 -1
- data/lib/VoucherifySdk/models/voucher_with_categories_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/vouchers_create_response_body_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/vouchers_disable_response_body_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/vouchers_enable_response_body_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/vouchers_get_response_body_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/vouchers_update_response_body_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/version.rb +1 -1
- data/lib/VoucherifySdk.rb +5 -0
- metadata +39 -29
|
@@ -20,7 +20,7 @@ module VoucherifySdk
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Get reward by ID
|
|
23
|
-
# Returns a single reward by its ID.
|
|
23
|
+
# Returns a single reward by its ID. A successful call records no activity.
|
|
24
24
|
# @param reward_id [String] Identifies the reward. Format lrew_[a-f0-9]+.
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [V2LoyaltiesRewardsGetResponseBody]
|
|
@@ -30,7 +30,7 @@ module VoucherifySdk
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Get reward by ID
|
|
33
|
-
# Returns a single reward by its ID.
|
|
33
|
+
# Returns a single reward by its ID. A successful call records no activity.
|
|
34
34
|
# @param reward_id [String] Identifies the reward. Format lrew_[a-f0-9]+.
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(V2LoyaltiesRewardsGetResponseBody, Integer, Hash)>] V2LoyaltiesRewardsGetResponseBody data, response status code and response headers
|
|
@@ -218,7 +218,7 @@ module VoucherifySdk
|
|
|
218
218
|
end
|
|
219
219
|
|
|
220
220
|
# Create Metadata Schema
|
|
221
|
-
# Creates a new metadata (custom attribute) schema for a given resource. The schema consists of a set of key-value pairs to customize Voucherify resources. You can nest your object within a standard metadata schema, e.g. within a campaign or customer schema. However, your nested object cant include another nested object. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward Use this endpoint to define a metadata schema of a given resource for the first time. Once you configure a metadata schema for a given related_object, use the PUT [Update metadata schema](/api-reference/management/update-metadata-schema) endpoint to either update or add new metadata key-value pairs. For example, use this endpoint to define a metadata schema for related_object: campaign for the first time. If you want define a new metadata property for campaign, use the [PUT Update metadata schema](/api-reference/management/update-metadata-schema) endpoint. <Note> <Badge color blue>Metadata Documentation</Badge> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify. </Note>
|
|
221
|
+
# Creates a new metadata (custom attribute) schema for a given resource. The schema consists of a set of key-value pairs to customize Voucherify resources. You can nest your object within a standard metadata schema, e.g. within a campaign or customer schema. However, your nested object cant include another nested object. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward Use this endpoint to define a metadata schema of a given resource for the first time. Once you configure a metadata schema for a given related_object, use the PUT [Update metadata schema](/api-reference/management/update-metadata-schema) endpoint to either update or add new metadata key-value pairs. For example, use this endpoint to define a metadata schema for related_object: campaign for the first time. If you want define a new metadata property for campaign, use the [PUT Update metadata schema](/api-reference/management/update-metadata-schema) endpoint. <Note> <Badge color blue>Metadata Documentation</Badge> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify. </Note> loyalty_tier / Loyalty Tier and earning_rule / Earning rule metadata schemas apply to **legacy loyalty** campaigns. Loyalty hub resources use Loyalty v2 metadata where configured.
|
|
222
222
|
# @param project_id [String] Provide the unique identifier of the project.
|
|
223
223
|
# @param [Hash] opts the optional parameters
|
|
224
224
|
# @option opts [ManagementProjectsMetadataSchemasCreateRequestBody] :management_projects_metadata_schemas_create_request_body Defines the metadata schema.
|
|
@@ -229,7 +229,7 @@ module VoucherifySdk
|
|
|
229
229
|
end
|
|
230
230
|
|
|
231
231
|
# Create Metadata Schema
|
|
232
|
-
# Creates a new metadata (custom attribute) schema for a given resource. The schema consists of a set of key-value pairs to customize Voucherify resources. You can nest your object within a standard metadata schema, e.g. within a campaign or customer schema. However, your nested object cant include another nested object. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward Use this endpoint to define a metadata schema of a given resource for the first time. Once you configure a metadata schema for a given related_object, use the PUT [Update metadata schema](/api-reference/management/update-metadata-schema) endpoint to either update or add new metadata key-value pairs. For example, use this endpoint to define a metadata schema for related_object: campaign for the first time. If you want define a new metadata property for campaign, use the [PUT Update metadata schema](/api-reference/management/update-metadata-schema) endpoint. <Note> <Badge color blue>Metadata Documentation</Badge> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify. </Note>
|
|
232
|
+
# Creates a new metadata (custom attribute) schema for a given resource. The schema consists of a set of key-value pairs to customize Voucherify resources. You can nest your object within a standard metadata schema, e.g. within a campaign or customer schema. However, your nested object cant include another nested object. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward Use this endpoint to define a metadata schema of a given resource for the first time. Once you configure a metadata schema for a given related_object, use the PUT [Update metadata schema](/api-reference/management/update-metadata-schema) endpoint to either update or add new metadata key-value pairs. For example, use this endpoint to define a metadata schema for related_object: campaign for the first time. If you want define a new metadata property for campaign, use the [PUT Update metadata schema](/api-reference/management/update-metadata-schema) endpoint. <Note> <Badge color blue>Metadata Documentation</Badge> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify. </Note> loyalty_tier / Loyalty Tier and earning_rule / Earning rule metadata schemas apply to **legacy loyalty** campaigns. Loyalty hub resources use Loyalty v2 metadata where configured.
|
|
233
233
|
# @param project_id [String] Provide the unique identifier of the project.
|
|
234
234
|
# @param [Hash] opts the optional parameters
|
|
235
235
|
# @option opts [ManagementProjectsMetadataSchemasCreateRequestBody] :management_projects_metadata_schemas_create_request_body Defines the metadata schema.
|
|
@@ -598,7 +598,7 @@ module VoucherifySdk
|
|
|
598
598
|
end
|
|
599
599
|
|
|
600
600
|
# Delete Metadata Schema
|
|
601
|
-
# Deletes permanently the metadata schema. In standard metadata schemas, this endpoint removes permanently all definitions. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward If you want to delete only one definition, use the [Update Metadata Schema](/api-reference/management/update-metadata-schema) endpoint. In the request, provide the deleted: true pair in the definition object. This definition will be moved to Removed definitions. If you want to create a new standard metadata schema, use the [Create Metadata Schema](/api-reference/management/create-metadata-schema) endpoint. <Warning> <Badge color yellow>Metadata Purging</Badge> This endpoint deletes permanently the metadata schemas only. However, it does not purge the metadata from associated entities, so the metadata added to those entities will remain. If you want to purge metadata from the entities: 1. Remove all the definitions you want to purge. You can do this either in Voucherify Project Settings > Metadata Schema tab or with the [Update Metadata Schema](/api-reference/management/update-metadata-schema) endpoint. 2. In Voucherify Project Settings > Metadata Schema tab, go to the relevant metadata schema. 3. In Removed definitions, click the bin button next to the definitions whose metadata you want to purge from entities. Note: - This is an asynchronous action. You will be notified when it has been completed. - You cannot purge metadata for the Redemption and Publication schemas. 4. Use the Delete Metadata Schema request to delete the metadata schema from Voucherify. </Warning> <Note> <Badge color blue>Metadata Documentation</Badge> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify. </Note>
|
|
601
|
+
# Deletes permanently the metadata schema. In standard metadata schemas, this endpoint removes permanently all definitions. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward If you want to delete only one definition, use the [Update Metadata Schema](/api-reference/management/update-metadata-schema) endpoint. In the request, provide the deleted: true pair in the definition object. This definition will be moved to Removed definitions. If you want to create a new standard metadata schema, use the [Create Metadata Schema](/api-reference/management/create-metadata-schema) endpoint. <Warning> <Badge color yellow>Metadata Purging</Badge> This endpoint deletes permanently the metadata schemas only. However, it does not purge the metadata from associated entities, so the metadata added to those entities will remain. If you want to purge metadata from the entities: 1. Remove all the definitions you want to purge. You can do this either in Voucherify Project Settings > Metadata Schema tab or with the [Update Metadata Schema](/api-reference/management/update-metadata-schema) endpoint. 2. In Voucherify Project Settings > Metadata Schema tab, go to the relevant metadata schema. 3. In Removed definitions, click the bin button next to the definitions whose metadata you want to purge from entities. Note: - This is an asynchronous action. You will be notified when it has been completed. - You cannot purge metadata for the Redemption and Publication schemas. 4. Use the Delete Metadata Schema request to delete the metadata schema from Voucherify. </Warning> <Note> <Badge color blue>Metadata Documentation</Badge> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify. </Note> loyalty_tier / Loyalty Tier and earning_rule / Earning rule metadata schemas apply to **legacy loyalty** campaigns. Loyalty hub resources use Loyalty v2 metadata where configured.
|
|
602
602
|
# @param project_id [String] Provide the unique identifier of the project.
|
|
603
603
|
# @param metadata_schema_id [String] Provide the unique identifier of the metadata schema.
|
|
604
604
|
# @param [Hash] opts the optional parameters
|
|
@@ -609,7 +609,7 @@ module VoucherifySdk
|
|
|
609
609
|
end
|
|
610
610
|
|
|
611
611
|
# Delete Metadata Schema
|
|
612
|
-
# Deletes permanently the metadata schema. In standard metadata schemas, this endpoint removes permanently all definitions. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward If you want to delete only one definition, use the [Update Metadata Schema](/api-reference/management/update-metadata-schema) endpoint. In the request, provide the deleted: true pair in the definition object. This definition will be moved to Removed definitions. If you want to create a new standard metadata schema, use the [Create Metadata Schema](/api-reference/management/create-metadata-schema) endpoint. <Warning> <Badge color yellow>Metadata Purging</Badge> This endpoint deletes permanently the metadata schemas only. However, it does not purge the metadata from associated entities, so the metadata added to those entities will remain. If you want to purge metadata from the entities: 1. Remove all the definitions you want to purge. You can do this either in Voucherify Project Settings > Metadata Schema tab or with the [Update Metadata Schema](/api-reference/management/update-metadata-schema) endpoint. 2. In Voucherify Project Settings > Metadata Schema tab, go to the relevant metadata schema. 3. In Removed definitions, click the bin button next to the definitions whose metadata you want to purge from entities. Note: - This is an asynchronous action. You will be notified when it has been completed. - You cannot purge metadata for the Redemption and Publication schemas. 4. Use the Delete Metadata Schema request to delete the metadata schema from Voucherify. </Warning> <Note> <Badge color blue>Metadata Documentation</Badge> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify. </Note>
|
|
612
|
+
# Deletes permanently the metadata schema. In standard metadata schemas, this endpoint removes permanently all definitions. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward If you want to delete only one definition, use the [Update Metadata Schema](/api-reference/management/update-metadata-schema) endpoint. In the request, provide the deleted: true pair in the definition object. This definition will be moved to Removed definitions. If you want to create a new standard metadata schema, use the [Create Metadata Schema](/api-reference/management/create-metadata-schema) endpoint. <Warning> <Badge color yellow>Metadata Purging</Badge> This endpoint deletes permanently the metadata schemas only. However, it does not purge the metadata from associated entities, so the metadata added to those entities will remain. If you want to purge metadata from the entities: 1. Remove all the definitions you want to purge. You can do this either in Voucherify Project Settings > Metadata Schema tab or with the [Update Metadata Schema](/api-reference/management/update-metadata-schema) endpoint. 2. In Voucherify Project Settings > Metadata Schema tab, go to the relevant metadata schema. 3. In Removed definitions, click the bin button next to the definitions whose metadata you want to purge from entities. Note: - This is an asynchronous action. You will be notified when it has been completed. - You cannot purge metadata for the Redemption and Publication schemas. 4. Use the Delete Metadata Schema request to delete the metadata schema from Voucherify. </Warning> <Note> <Badge color blue>Metadata Documentation</Badge> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify. </Note> loyalty_tier / Loyalty Tier and earning_rule / Earning rule metadata schemas apply to **legacy loyalty** campaigns. Loyalty hub resources use Loyalty v2 metadata where configured.
|
|
613
613
|
# @param project_id [String] Provide the unique identifier of the project.
|
|
614
614
|
# @param metadata_schema_id [String] Provide the unique identifier of the metadata schema.
|
|
615
615
|
# @param [Hash] opts the optional parameters
|
|
@@ -20,7 +20,7 @@ module VoucherifySdk
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Get Metadata Schema
|
|
23
|
-
# Retrieves a metadata schema per resource type. # Resource types ## Standard You can retrieve metadata schemas for the standard metadata schema definitions listed below. Add one of these types as the resource path parameter. - campaign - customer - earning_rule - loyalty_tier - order - order_item - product - promotion_tier - publication - redemption - reward - voucher ## Custom If you have defined a [custom metadata schema](/prepare/metadata#add-metadata), provide its name in the resource field to retrieve its details. <Note> <Badge color blue>Management API</Badge> If you have Management API enabled, you can also use the [Get Metadata Schemas](/api-reference/management/get-metadata-schema) endpoint to retrieve a metadata schema using its ID. </Note>
|
|
23
|
+
# Retrieves a metadata schema per resource type. # Resource types ## Standard You can retrieve metadata schemas for the standard metadata schema definitions listed below. Add one of these types as the resource path parameter. - campaign - customer - earning_rule - loyalty_tier - order - order_item - product - promotion_tier - publication - redemption - reward - voucher ## Custom If you have defined a [custom metadata schema](/prepare/metadata#add-metadata), provide its name in the resource field to retrieve its details. <Note> <Badge color blue>Management API</Badge> If you have Management API enabled, you can also use the [Get Metadata Schemas](/api-reference/management/get-metadata-schema) endpoint to retrieve a metadata schema using its ID. </Note> loyalty_tier / Loyalty Tier and earning_rule / Earning rule metadata schemas apply to **legacy loyalty** campaigns. Loyalty hub resources use Loyalty v2 metadata where configured.
|
|
24
24
|
# @param resource [String] There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas.
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [MetadataSchemasGetResponseBody]
|
|
@@ -30,7 +30,7 @@ module VoucherifySdk
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Get Metadata Schema
|
|
33
|
-
# Retrieves a metadata schema per resource type. # Resource types ## Standard You can retrieve metadata schemas for the standard metadata schema definitions listed below. Add one of these types as the resource path parameter. - campaign - customer - earning_rule - loyalty_tier - order - order_item - product - promotion_tier - publication - redemption - reward - voucher ## Custom If you have defined a [custom metadata schema](/prepare/metadata#add-metadata), provide its name in the resource field to retrieve its details. <Note> <Badge color blue>Management API</Badge> If you have Management API enabled, you can also use the [Get Metadata Schemas](/api-reference/management/get-metadata-schema) endpoint to retrieve a metadata schema using its ID. </Note>
|
|
33
|
+
# Retrieves a metadata schema per resource type. # Resource types ## Standard You can retrieve metadata schemas for the standard metadata schema definitions listed below. Add one of these types as the resource path parameter. - campaign - customer - earning_rule - loyalty_tier - order - order_item - product - promotion_tier - publication - redemption - reward - voucher ## Custom If you have defined a [custom metadata schema](/prepare/metadata#add-metadata), provide its name in the resource field to retrieve its details. <Note> <Badge color blue>Management API</Badge> If you have Management API enabled, you can also use the [Get Metadata Schemas](/api-reference/management/get-metadata-schema) endpoint to retrieve a metadata schema using its ID. </Note> loyalty_tier / Loyalty Tier and earning_rule / Earning rule metadata schemas apply to **legacy loyalty** campaigns. Loyalty hub resources use Loyalty v2 metadata where configured.
|
|
34
34
|
# @param resource [String] There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas.
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(MetadataSchemasGetResponseBody, Integer, Hash)>] MetadataSchemasGetResponseBody data, response status code and response headers
|
|
@@ -20,7 +20,7 @@ module VoucherifySdk
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create Product Collection
|
|
23
|
-
#
|
|
23
|
+
# Creates a new product collection. To assign the collection to areas, stores, or all stores, send access_settings with assign. Assignments are available only when the Areas and Stores enterprise feature is enabled for product collections. <Note>A restricted user must assign the new collection to at least one area or store. Areas and stores that the restricted user isnt assigned to are ignored. If none are left, the request fails with a 400 error. A restricted user is a user with the Restricted user role, or with a custom role that has the Join areas and stores permission. An API key with the Restricted user role is also restricted. Users who cant join areas and stores can assign any area or store.</Note>
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [ProductCollectionsCreateRequestBody] :product_collections_create_request_body
|
|
26
26
|
# @return [ProductCollectionsCreateResponseBody]
|
|
@@ -30,7 +30,7 @@ module VoucherifySdk
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create Product Collection
|
|
33
|
-
#
|
|
33
|
+
# Creates a new product collection. To assign the collection to areas, stores, or all stores, send access_settings with assign. Assignments are available only when the Areas and Stores enterprise feature is enabled for product collections. <Note>A restricted user must assign the new collection to at least one area or store. Areas and stores that the restricted user isnt assigned to are ignored. If none are left, the request fails with a 400 error. A restricted user is a user with the Restricted user role, or with a custom role that has the Join areas and stores permission. An API key with the Restricted user role is also restricted. Users who cant join areas and stores can assign any area or store.</Note>
|
|
34
34
|
# @param [Hash] opts the optional parameters
|
|
35
35
|
# @option opts [ProductCollectionsCreateRequestBody] :product_collections_create_request_body
|
|
36
36
|
# @return [Array<(ProductCollectionsCreateResponseBody, Integer, Hash)>] ProductCollectionsCreateResponseBody data, response status code and response headers
|
|
@@ -84,7 +84,7 @@ module VoucherifySdk
|
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
# Delete Product Collection
|
|
87
|
-
# Deletes a product collection. <Warning>This endpoint performs database-heavy operations. It is not designed for highly frequent use.</Warning>
|
|
87
|
+
# Deletes a product collection. <Note>If the Areas and Stores enterprise feature is enabled for product collections, the area and store assignments of the product collection are deleted with it. A restricted user cant delete a product collection that is read-only for them or that is not assigned to their areas and stores. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.</Note> <Warning>This endpoint performs database-heavy operations. It is not designed for highly frequent use.</Warning>
|
|
88
88
|
# @param product_collection_id [String] A unique product collection ID.
|
|
89
89
|
# @param [Hash] opts the optional parameters
|
|
90
90
|
# @return [nil]
|
|
@@ -94,7 +94,7 @@ module VoucherifySdk
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# Delete Product Collection
|
|
97
|
-
# Deletes a product collection. <Warning>This endpoint performs database-heavy operations. It is not designed for highly frequent use.</Warning>
|
|
97
|
+
# Deletes a product collection. <Note>If the Areas and Stores enterprise feature is enabled for product collections, the area and store assignments of the product collection are deleted with it. A restricted user cant delete a product collection that is read-only for them or that is not assigned to their areas and stores. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.</Note> <Warning>This endpoint performs database-heavy operations. It is not designed for highly frequent use.</Warning>
|
|
98
98
|
# @param product_collection_id [String] A unique product collection ID.
|
|
99
99
|
# @param [Hash] opts the optional parameters
|
|
100
100
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -141,7 +141,7 @@ module VoucherifySdk
|
|
|
141
141
|
end
|
|
142
142
|
|
|
143
143
|
# Get Product Collection
|
|
144
|
-
# Retrieves the product collection.
|
|
144
|
+
# Retrieves the product collection. <Note>If the Areas and Stores enterprise feature is enabled for product collections, a restricted user receives a forbidden error when the product collection is not assigned to their areas and stores. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.</Note>
|
|
145
145
|
# @param product_collection_id [String] A unique product collection ID.
|
|
146
146
|
# @param [Hash] opts the optional parameters
|
|
147
147
|
# @return [ProductCollectionsGetResponseBody]
|
|
@@ -151,7 +151,7 @@ module VoucherifySdk
|
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
# Get Product Collection
|
|
154
|
-
# Retrieves the product collection.
|
|
154
|
+
# Retrieves the product collection. <Note>If the Areas and Stores enterprise feature is enabled for product collections, a restricted user receives a forbidden error when the product collection is not assigned to their areas and stores. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.</Note>
|
|
155
155
|
# @param product_collection_id [String] A unique product collection ID.
|
|
156
156
|
# @param [Hash] opts the optional parameters
|
|
157
157
|
# @return [Array<(ProductCollectionsGetResponseBody, Integer, Hash)>] ProductCollectionsGetResponseBody data, response status code and response headers
|
|
@@ -200,7 +200,7 @@ module VoucherifySdk
|
|
|
200
200
|
end
|
|
201
201
|
|
|
202
202
|
# List Product Collections
|
|
203
|
-
# This method returns a list of product collections.
|
|
203
|
+
# This method returns a list of product collections. <Note>A restricted user sees only the product collections assigned to their areas and stores. A restricted user is a user with the Restricted user role, or with a custom role that has the Join areas and stores permission. An API key with the Restricted user role is also restricted.</Note>
|
|
204
204
|
# @param [Hash] opts the optional parameters
|
|
205
205
|
# @option opts [Integer] :limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
|
|
206
206
|
# @option opts [Integer] :page Which page of results to return. The lowest value is 1.
|
|
@@ -212,7 +212,7 @@ module VoucherifySdk
|
|
|
212
212
|
end
|
|
213
213
|
|
|
214
214
|
# List Product Collections
|
|
215
|
-
# This method returns a list of product collections.
|
|
215
|
+
# This method returns a list of product collections. <Note>A restricted user sees only the product collections assigned to their areas and stores. A restricted user is a user with the Restricted user role, or with a custom role that has the Join areas and stores permission. An API key with the Restricted user role is also restricted.</Note>
|
|
216
216
|
# @param [Hash] opts the optional parameters
|
|
217
217
|
# @option opts [Integer] :limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
|
|
218
218
|
# @option opts [Integer] :page Which page of results to return. The lowest value is 1.
|
|
@@ -455,7 +455,7 @@ module VoucherifySdk
|
|
|
455
455
|
end
|
|
456
456
|
|
|
457
457
|
# Import SKUs using CSV
|
|
458
|
-
# Import SKUs into the repository using a CSV file. The CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). <Warning> <Badge color yellow>Import sequence</Badge> First import products using the [dedicated endpoint](/api-reference/products/import-products-using-csv), then import SKUs using this endpoint to properly match SKUs to products. </Warning> <Note> <Badge color blue>Standard SKU fields mapping</Badge> -
|
|
458
|
+
# Import SKUs into the repository using a CSV file. The CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). <Warning> <Badge color yellow>Import sequence</Badge> First import products using the [dedicated endpoint](/api-reference/products/import-products-using-csv), then import SKUs using this endpoint to properly match SKUs to products. </Warning> <Note> <Badge color blue>Standard SKU fields mapping</Badge> - Required fields are source_id and product_id. - Supported CSV file headers: product_id,sku,source_id,price,image_url,attributes - SKU **source_id** must be unique in the entire product catalog, no duplicates are allowed. - SKU attributes need to be in the form of a stringy-fied json, i.e.{color:blue}. These attributes must be defined in the **product** beforehand so you can import them to the SKU. - You can use this method to update the following parameters in bulk: **sku** and the sku **price**. - Columns that cannot be mapped to standard fields will be mapped to Custom attributes and added as product metadata. There is no limit on the number of custom attributes that you can import as metadata. </Note> 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](/api-reference/async-actions/get-async-action).
|
|
459
459
|
# @param [Hash] opts the optional parameters
|
|
460
460
|
# @option opts [File] :file File path.
|
|
461
461
|
# @return [SkusImportCsvCreateResponseBody]
|
|
@@ -465,7 +465,7 @@ module VoucherifySdk
|
|
|
465
465
|
end
|
|
466
466
|
|
|
467
467
|
# Import SKUs using CSV
|
|
468
|
-
# Import SKUs into the repository using a CSV file. The CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). <Warning> <Badge color yellow>Import sequence</Badge> First import products using the [dedicated endpoint](/api-reference/products/import-products-using-csv), then import SKUs using this endpoint to properly match SKUs to products. </Warning> <Note> <Badge color blue>Standard SKU fields mapping</Badge> -
|
|
468
|
+
# Import SKUs into the repository using a CSV file. The CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). <Warning> <Badge color yellow>Import sequence</Badge> First import products using the [dedicated endpoint](/api-reference/products/import-products-using-csv), then import SKUs using this endpoint to properly match SKUs to products. </Warning> <Note> <Badge color blue>Standard SKU fields mapping</Badge> - Required fields are source_id and product_id. - Supported CSV file headers: product_id,sku,source_id,price,image_url,attributes - SKU **source_id** must be unique in the entire product catalog, no duplicates are allowed. - SKU attributes need to be in the form of a stringy-fied json, i.e.{color:blue}. These attributes must be defined in the **product** beforehand so you can import them to the SKU. - You can use this method to update the following parameters in bulk: **sku** and the sku **price**. - Columns that cannot be mapped to standard fields will be mapped to Custom attributes and added as product metadata. There is no limit on the number of custom attributes that you can import as metadata. </Note> 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](/api-reference/async-actions/get-async-action).
|
|
469
469
|
# @param [Hash] opts the optional parameters
|
|
470
470
|
# @option opts [File] :file File path.
|
|
471
471
|
# @return [Array<(SkusImportCsvCreateResponseBody, Integer, Hash)>] SkusImportCsvCreateResponseBody data, response status code and response headers
|
|
@@ -20,7 +20,7 @@ module VoucherifySdk
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create Reward
|
|
23
|
-
# Create a new reward.
|
|
23
|
+
# Create a new reward. Use this endpoint for campaign-linked rewards (referral campaigns and **legacy loyalty**) and for LOYALTY_POINTS rewards that credit a v2/loyalties (loyalty hub) card from a referral tier. For Loyalty hub program rewards (a different resource), use POST /v2/loyalties/rewards.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [RewardsCreateRequestBody] :rewards_create_request_body Define parameters of the new reward.
|
|
26
26
|
# @return [RewardsCreateResponseBody]
|
|
@@ -30,7 +30,7 @@ module VoucherifySdk
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create Reward
|
|
33
|
-
# Create a new reward.
|
|
33
|
+
# Create a new reward. Use this endpoint for campaign-linked rewards (referral campaigns and **legacy loyalty**) and for LOYALTY_POINTS rewards that credit a v2/loyalties (loyalty hub) card from a referral tier. For Loyalty hub program rewards (a different resource), use POST /v2/loyalties/rewards.
|
|
34
34
|
# @param [Hash] opts the optional parameters
|
|
35
35
|
# @option opts [RewardsCreateRequestBody] :rewards_create_request_body Define parameters of the new reward.
|
|
36
36
|
# @return [Array<(RewardsCreateResponseBody, Integer, Hash)>] RewardsCreateResponseBody data, response status code and response headers
|
|
@@ -84,10 +84,10 @@ module VoucherifySdk
|
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
# Create Reward Assignment
|
|
87
|
-
# Assigns a reward to a
|
|
87
|
+
# Assigns a reward to a related object. For **legacy loyalty** and digital or material rewards, send campaign with a loyalty or referral campaign ID. For a LOYALTY_POINTS reward (credits a v2/loyalties (loyalty hub) card), send related_object_type referral_tier and related_object_id set to the referral tier ID. A LOYALTY_POINTS reward cannot be assigned to a campaign. Assigning it with campaign (or any non-referral_tier related object) returns 400 with invalid_related_to. POST /v1/loyalties/{campaignId}/rewards also cannot assign a LOYALTY_POINTS reward to a campaign. For Loyalty hub program rewards, use /v2/loyalties reward endpoints.
|
|
88
88
|
# @param reward_id [String] A unique reward ID.
|
|
89
89
|
# @param [Hash] opts the optional parameters
|
|
90
|
-
# @option opts [RewardsAssignmentsCreateRequestBody] :rewards_assignments_create_request_body
|
|
90
|
+
# @option opts [RewardsAssignmentsCreateRequestBody] :rewards_assignments_create_request_body For digital, material, and pay-with-points rewards, provide the campaign ID and, when required, the loyalty points cost. For a LOYALTY_POINTS reward, provide related_object_type referral_tier and the referral tier ID.
|
|
91
91
|
# @return [RewardsAssignmentsCreateResponseBody]
|
|
92
92
|
def create_reward_assignment(reward_id, opts = {})
|
|
93
93
|
data, _status_code, _headers = create_reward_assignment_with_http_info(reward_id, opts)
|
|
@@ -95,10 +95,10 @@ module VoucherifySdk
|
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
# Create Reward Assignment
|
|
98
|
-
# Assigns a reward to a
|
|
98
|
+
# Assigns a reward to a related object. For **legacy loyalty** and digital or material rewards, send campaign with a loyalty or referral campaign ID. For a LOYALTY_POINTS reward (credits a v2/loyalties (loyalty hub) card), send related_object_type referral_tier and related_object_id set to the referral tier ID. A LOYALTY_POINTS reward cannot be assigned to a campaign. Assigning it with campaign (or any non-referral_tier related object) returns 400 with invalid_related_to. POST /v1/loyalties/{campaignId}/rewards also cannot assign a LOYALTY_POINTS reward to a campaign. For Loyalty hub program rewards, use /v2/loyalties reward endpoints.
|
|
99
99
|
# @param reward_id [String] A unique reward ID.
|
|
100
100
|
# @param [Hash] opts the optional parameters
|
|
101
|
-
# @option opts [RewardsAssignmentsCreateRequestBody] :rewards_assignments_create_request_body
|
|
101
|
+
# @option opts [RewardsAssignmentsCreateRequestBody] :rewards_assignments_create_request_body For digital, material, and pay-with-points rewards, provide the campaign ID and, when required, the loyalty points cost. For a LOYALTY_POINTS reward, provide related_object_type referral_tier and the referral tier ID.
|
|
102
102
|
# @return [Array<(RewardsAssignmentsCreateResponseBody, Integer, Hash)>] RewardsAssignmentsCreateResponseBody data, response status code and response headers
|
|
103
103
|
private def create_reward_assignment_with_http_info(reward_id, opts = {})
|
|
104
104
|
if @api_client.config.debugging
|
|
@@ -451,7 +451,7 @@ module VoucherifySdk
|
|
|
451
451
|
end
|
|
452
452
|
|
|
453
453
|
# List Rewards
|
|
454
|
-
# Retrieve rewards.
|
|
454
|
+
# Retrieve campaign-linked rewards (referral campaigns and **legacy loyalty**). For Loyalty hub rewards, use GET /v2/loyalties/rewards.
|
|
455
455
|
# @param [Hash] opts the optional parameters
|
|
456
456
|
# @option opts [Integer] :limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
|
|
457
457
|
# @option opts [Integer] :page Which page of results to return. The lowest value is 1.
|
|
@@ -463,7 +463,7 @@ module VoucherifySdk
|
|
|
463
463
|
end
|
|
464
464
|
|
|
465
465
|
# List Rewards
|
|
466
|
-
# Retrieve rewards.
|
|
466
|
+
# Retrieve campaign-linked rewards (referral campaigns and **legacy loyalty**). For Loyalty hub rewards, use GET /v2/loyalties/rewards.
|
|
467
467
|
# @param [Hash] opts the optional parameters
|
|
468
468
|
# @option opts [Integer] :limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
|
|
469
469
|
# @option opts [Integer] :page Which page of results to return. The lowest value is 1.
|
|
@@ -152,7 +152,7 @@ module VoucherifySdk
|
|
|
152
152
|
end
|
|
153
153
|
|
|
154
154
|
# Create Campaign Template
|
|
155
|
-
# Creates a template for a discount or gift campaign, or a promotion tier. A template stores campaign configuration **without** the following details: - Campaign name - Category - Code count The following elements are not supported by campaign templates: - Redeeming API keys - Redeeming users - Customer loyalty tier - Static segments <Tip> <Badge color green>Promotion Tiers and Campaign Templates</Badge> You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - [Discount campaign](/api-reference/templates/create-campaign-from-template), - [Promotion tier](/api-reference/templates/add-promotion-tier-from-template). </Tip> <Note> <Badge color blue>Campaign Templates – Documentation</Badge> Read the [Campaign Templates documentation](/build/campaign-templates) to learn more about this feature. </Note>
|
|
155
|
+
# Creates a template for a discount or gift campaign, or a promotion tier. A template stores campaign configuration **without** the following details: - Campaign name - Category - Code count The following elements are not supported by campaign templates: - Redeeming API keys - Redeeming users - Customer loyalty tier (**legacy loyalty**) - Static segments <Tip> <Badge color green>Promotion Tiers and Campaign Templates</Badge> You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - [Discount campaign](/api-reference/templates/create-campaign-from-template), - [Promotion tier](/api-reference/templates/add-promotion-tier-from-template). </Tip> <Note> <Badge color blue>Campaign Templates – Documentation</Badge> Read the [Campaign Templates documentation](/build/campaign-templates) to learn more about this feature. </Note>
|
|
156
156
|
# @param [Hash] opts the optional parameters
|
|
157
157
|
# @option opts [TemplatesCampaignsCreateRequestBody] :templates_campaigns_create_request_body Provide details for a campaign template
|
|
158
158
|
# @return [TemplatesCampaignsCreateTemplateResponseBody]
|
|
@@ -162,7 +162,7 @@ module VoucherifySdk
|
|
|
162
162
|
end
|
|
163
163
|
|
|
164
164
|
# Create Campaign Template
|
|
165
|
-
# Creates a template for a discount or gift campaign, or a promotion tier. A template stores campaign configuration **without** the following details: - Campaign name - Category - Code count The following elements are not supported by campaign templates: - Redeeming API keys - Redeeming users - Customer loyalty tier - Static segments <Tip> <Badge color green>Promotion Tiers and Campaign Templates</Badge> You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - [Discount campaign](/api-reference/templates/create-campaign-from-template), - [Promotion tier](/api-reference/templates/add-promotion-tier-from-template). </Tip> <Note> <Badge color blue>Campaign Templates – Documentation</Badge> Read the [Campaign Templates documentation](/build/campaign-templates) to learn more about this feature. </Note>
|
|
165
|
+
# Creates a template for a discount or gift campaign, or a promotion tier. A template stores campaign configuration **without** the following details: - Campaign name - Category - Code count The following elements are not supported by campaign templates: - Redeeming API keys - Redeeming users - Customer loyalty tier (**legacy loyalty**) - Static segments <Tip> <Badge color green>Promotion Tiers and Campaign Templates</Badge> You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - [Discount campaign](/api-reference/templates/create-campaign-from-template), - [Promotion tier](/api-reference/templates/add-promotion-tier-from-template). </Tip> <Note> <Badge color blue>Campaign Templates – Documentation</Badge> Read the [Campaign Templates documentation](/build/campaign-templates) to learn more about this feature. </Note>
|
|
166
166
|
# @param [Hash] opts the optional parameters
|
|
167
167
|
# @option opts [TemplatesCampaignsCreateRequestBody] :templates_campaigns_create_request_body Provide details for a campaign template
|
|
168
168
|
# @return [Array<(TemplatesCampaignsCreateTemplateResponseBody, Integer, Hash)>] TemplatesCampaignsCreateTemplateResponseBody data, response status code and response headers
|
|
@@ -20,7 +20,7 @@ module VoucherifySdk
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create Voucher
|
|
23
|
-
# Create a generic (standalone) voucher or a voucher in a campaign. 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. If no campaign name or campaign_id is provided, the new voucher will be a generic (standalone) one. However, if an ID or name of a campaign with the type set to STANDALONE is provided, the voucher will be added to this campaign. For a loyalty card, a campaign name or ID is required. <Warning> <Badge color yellow>Standalone Vouchers and Campaigns</Badge> Generic (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. However, vouchers created through The vouchers created with POST Create voucher and POST Generate random code endpoints do not have a campaign attached, so the values for campaign and campaign_id are null. To create a generic (standalone) voucher with a type: STANDALONE, use the [POST Create campaign](/api-reference/campaigns/create-campaign) endpoint. </Warning>
|
|
23
|
+
# Create a generic (standalone) voucher or a voucher in a campaign. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a legacy 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. If no campaign name or campaign_id is provided, the new voucher will be a generic (standalone) one. However, if an ID or name of a campaign with the type set to STANDALONE is provided, the voucher will be added to this campaign. For a loyalty card, a campaign name or ID is required. <Warning> <Badge color yellow>Standalone Vouchers and Campaigns</Badge> Generic (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. However, vouchers created through The vouchers created with POST Create voucher and POST Generate random code endpoints do not have a campaign attached, so the values for campaign and campaign_id are null. To create a generic (standalone) voucher with a type: STANDALONE, use the [POST Create campaign](/api-reference/campaigns/create-campaign) endpoint. </Warning>
|
|
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 generic (standalone) voucher or a voucher in a campaign. 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. If no campaign name or campaign_id is provided, the new voucher will be a generic (standalone) one. However, if an ID or name of a campaign with the type set to STANDALONE is provided, the voucher will be added to this campaign. For a loyalty card, a campaign name or ID is required. <Warning> <Badge color yellow>Standalone Vouchers and Campaigns</Badge> Generic (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. However, vouchers created through The vouchers created with POST Create voucher and POST Generate random code endpoints do not have a campaign attached, so the values for campaign and campaign_id are null. To create a generic (standalone) voucher with a type: STANDALONE, use the [POST Create campaign](/api-reference/campaigns/create-campaign) endpoint. </Warning>
|
|
34
|
+
# Create a generic (standalone) voucher or a voucher in a campaign. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a legacy 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. If no campaign name or campaign_id is provided, the new voucher will be a generic (standalone) one. However, if an ID or name of a campaign with the type set to STANDALONE is provided, the voucher will be added to this campaign. For a loyalty card, a campaign name or ID is required. <Warning> <Badge color yellow>Standalone Vouchers and Campaigns</Badge> Generic (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. However, vouchers created through The vouchers created with POST Create voucher and POST Generate random code endpoints do not have a campaign attached, so the values for campaign and campaign_id are null. To create a generic (standalone) voucher with a type: STANDALONE, use the [POST Create campaign](/api-reference/campaigns/create-campaign) endpoint. </Warning>
|
|
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.
|
|
@@ -264,7 +264,7 @@ module VoucherifySdk
|
|
|
264
264
|
end
|
|
265
265
|
|
|
266
266
|
# Export Voucher Transactions
|
|
267
|
-
# Export transactions that are associated with credit movements on a gift card or loyalty card.
|
|
267
|
+
# Export transactions that are associated with credit movements on a gift card or loyalty card (**legacy loyalty**).
|
|
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
270
|
# @option opts [VouchersTransactionsExportCreateRequestBody] :vouchers_transactions_export_create_request_body Specify the parameters for the camapign transaction export.
|
|
@@ -275,7 +275,7 @@ module VoucherifySdk
|
|
|
275
275
|
end
|
|
276
276
|
|
|
277
277
|
# Export Voucher Transactions
|
|
278
|
-
# Export transactions that are associated with credit movements on a gift card or loyalty card.
|
|
278
|
+
# Export transactions that are associated with credit movements on a gift card or loyalty card (**legacy loyalty**).
|
|
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
281
|
# @option opts [VouchersTransactionsExportCreateRequestBody] :vouchers_transactions_export_create_request_body Specify the parameters for the camapign transaction export.
|
|
@@ -330,7 +330,7 @@ module VoucherifySdk
|
|
|
330
330
|
end
|
|
331
331
|
|
|
332
332
|
# Generate Random Code
|
|
333
|
-
# Create a generic (standalone) vouchers. 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 generic (standalone) vouchers 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. <Warning> <Badge color yellow>Standalone Vouchers and Campaigns</Badge> Generic (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. The vouchers created with POST Create voucher and POST Generate random code endpoints do not have a campaign attached, so the values for campaign and campaign_id are null. To create a generic (standalone) voucher with a type: STANDALONE, use the [POST Create campaign](/api-reference/campaigns/create-campaign) endpoint. </Warning>
|
|
333
|
+
# Create a generic (standalone) vouchers. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a legacy LOYALTY_CARD. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new generic (standalone) vouchers 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. <Warning> <Badge color yellow>Standalone Vouchers and Campaigns</Badge> Generic (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. The vouchers created with POST Create voucher and POST Generate random code endpoints do not have a campaign attached, so the values for campaign and campaign_id are null. To create a generic (standalone) voucher with a type: STANDALONE, use the [POST Create campaign](/api-reference/campaigns/create-campaign) endpoint. </Warning>
|
|
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 generic (standalone) vouchers. 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 generic (standalone) vouchers 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. <Warning> <Badge color yellow>Standalone Vouchers and Campaigns</Badge> Generic (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. The vouchers created with POST Create voucher and POST Generate random code endpoints do not have a campaign attached, so the values for campaign and campaign_id are null. To create a generic (standalone) voucher with a type: STANDALONE, use the [POST Create campaign](/api-reference/campaigns/create-campaign) endpoint. </Warning>
|
|
343
|
+
# Create a generic (standalone) vouchers. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a legacy LOYALTY_CARD. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new generic (standalone) vouchers 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. <Warning> <Badge color yellow>Standalone Vouchers and Campaigns</Badge> Generic (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. The vouchers created with POST Create voucher and POST Generate random code endpoints do not have a campaign attached, so the values for campaign and campaign_id are null. To create a generic (standalone) voucher with a type: STANDALONE, use the [POST Create campaign](/api-reference/campaigns/create-campaign) endpoint. </Warning>
|
|
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
|
|
@@ -585,7 +585,7 @@ module VoucherifySdk
|
|
|
585
585
|
end
|
|
586
586
|
|
|
587
587
|
# List Voucher Transactions
|
|
588
|
-
# List transactions that are associated with credit movements on a gift card or loyalty card.
|
|
588
|
+
# List transactions that are associated with credit movements on a gift card or loyalty card (**legacy loyalty**).
|
|
589
589
|
# @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
|
|
590
590
|
# @param [Hash] opts the optional parameters
|
|
591
591
|
# @option opts [Integer] :limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
|
|
@@ -598,7 +598,7 @@ module VoucherifySdk
|
|
|
598
598
|
end
|
|
599
599
|
|
|
600
600
|
# List Voucher Transactions
|
|
601
|
-
# List transactions that are associated with credit movements on a gift card or loyalty card.
|
|
601
|
+
# List transactions that are associated with credit movements on a gift card or loyalty card (**legacy loyalty**).
|
|
602
602
|
# @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
|
|
603
603
|
# @param [Hash] opts the optional parameters
|
|
604
604
|
# @option opts [Integer] :limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
|
|
@@ -802,7 +802,7 @@ module VoucherifySdk
|
|
|
802
802
|
end
|
|
803
803
|
|
|
804
804
|
# Update Voucher
|
|
805
|
-
# Updates the specified voucher by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body wont be modified. Even if provided, they will be silently skipped. If you want to change the amount on a gift card or the number of points on a loyalty card, use the [Adjust voucher balance](/api-reference/vouchers/adjust-voucher-balance) endpoint.
|
|
805
|
+
# Updates the specified voucher by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body wont be modified. Even if provided, they will be silently skipped. If you want to change the amount on a gift card or the number of points on a loyalty card (**legacy loyalty**), use the [Adjust voucher balance](/api-reference/vouchers/adjust-voucher-balance) endpoint.
|
|
806
806
|
# @param code [String] A unique **code** that identifies the voucher.
|
|
807
807
|
# @param vouchers_update_request_body [VouchersUpdateRequestBody] Specify the parameters to be updated.
|
|
808
808
|
# @param [Hash] opts the optional parameters
|
|
@@ -813,7 +813,7 @@ module VoucherifySdk
|
|
|
813
813
|
end
|
|
814
814
|
|
|
815
815
|
# Update Voucher
|
|
816
|
-
# Updates the specified voucher by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body wont be modified. Even if provided, they will be silently skipped. If you want to change the amount on a gift card or the number of points on a loyalty card, use the [Adjust voucher balance](/api-reference/vouchers/adjust-voucher-balance) endpoint.
|
|
816
|
+
# Updates the specified voucher by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body wont be modified. Even if provided, they will be silently skipped. If you want to change the amount on a gift card or the number of points on a loyalty card (**legacy loyalty**), use the [Adjust voucher balance](/api-reference/vouchers/adjust-voucher-balance) endpoint.
|
|
817
817
|
# @param code [String] A unique **code** that identifies the voucher.
|
|
818
818
|
# @param vouchers_update_request_body [VouchersUpdateRequestBody] Specify the parameters to be updated.
|
|
819
819
|
# @param [Hash] opts the optional parameters
|
|
@@ -868,7 +868,7 @@ module VoucherifySdk
|
|
|
868
868
|
end
|
|
869
869
|
|
|
870
870
|
# Adjust Voucher Balance
|
|
871
|
-
# Add balance to an existing gift card or loyalty card. For loyalty cards,
|
|
871
|
+
# Add balance to an existing gift card or loyalty card. For loyalty cards (**legacy loyalty**), the card must be assigned to a holder. For Loyalty hub cards, use /v2/loyalties card transaction endpoints.
|
|
872
872
|
# @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
|
|
873
873
|
# @param vouchers_balance_update_request_body [VouchersBalanceUpdateRequestBody] Provide the amount to be added to/subtracted from the voucher.
|
|
874
874
|
# @param [Hash] opts the optional parameters
|
|
@@ -879,7 +879,7 @@ module VoucherifySdk
|
|
|
879
879
|
end
|
|
880
880
|
|
|
881
881
|
# Adjust Voucher Balance
|
|
882
|
-
# Add balance to an existing gift card or loyalty card. For loyalty cards,
|
|
882
|
+
# Add balance to an existing gift card or loyalty card. For loyalty cards (**legacy loyalty**), the card must be assigned to a holder. For Loyalty hub cards, use /v2/loyalties card transaction endpoints.
|
|
883
883
|
# @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
|
|
884
884
|
# @param vouchers_balance_update_request_body [VouchersBalanceUpdateRequestBody] Provide the amount to be added to/subtracted from the voucher.
|
|
885
885
|
# @param [Hash] opts the optional parameters
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Assigns or unassigns an area or store to the campaign.
|
|
17
|
+
# Assigns or unassigns an area or store to the resource, for example a campaign or a product collection. <Note>This object can be sent if the Areas and Stores enterprise feature is enabled for the given resource type. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.</Note>
|
|
18
18
|
class AccessSettings
|
|
19
19
|
attr_accessor :assign
|
|
20
20
|
|
|
@@ -14,15 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Assigns the
|
|
17
|
+
# Assigns the resource to an area or a store. Provide the area and/or store IDs in the respective arrays. If a resource changes assignments between areas or stores, unassign it from the area. For example, if a resource is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the resource from Area-01 and assign to Store-01 only. If you want to assign the resource to stores only, you do not have to send the area ID.
|
|
18
18
|
class AccessSettingsAssign
|
|
19
|
-
# List all area IDs to which the
|
|
19
|
+
# List all area IDs to which the resource will be assigned.
|
|
20
20
|
attr_accessor :areas_ids
|
|
21
21
|
|
|
22
|
-
# List all store IDs to which the
|
|
22
|
+
# List all store IDs to which the resource will be assigned.
|
|
23
23
|
attr_accessor :area_stores_ids
|
|
24
24
|
|
|
25
|
-
# List all area IDs where the
|
|
25
|
+
# List all area IDs where the resource is assigned to all stores in the area. This assignment is not equal to the assignment to all `area_stores_ids` listed separately.
|
|
26
26
|
attr_accessor :area_all_stores_ids
|
|
27
27
|
|
|
28
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|