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
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Schema model for a campaign loyalty card.
|
|
17
|
+
# Schema model for a campaign loyalty card (**legacy loyalty**).
|
|
18
18
|
class CampaignLoyaltyCard
|
|
19
19
|
# The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card.
|
|
20
20
|
attr_accessor :points
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Defines the loyalty point expiration rule. This expiration rule applies when there are no `expiration_rules` defined for an earning rule.
|
|
17
|
+
# Defines the loyalty point expiration rule (**legacy loyalty**). This expiration rule applies when there are no `expiration_rules` defined for an earning rule.
|
|
18
18
|
class CampaignLoyaltyCardExpirationRules
|
|
19
19
|
# Type of period. Can be set for `MONTH` or `FIXED_DAY_OF_YEAR`. `MONTH` requires the `period_value` field. `FIXED_DAY_OF_YEAR` requires the `fixed_month` and `fixed_day` fields.
|
|
20
20
|
attr_accessor :period_type
|
|
@@ -24,10 +24,10 @@ module VoucherifySdk
|
|
|
24
24
|
# Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (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`: the campaign is a generic (standalone) one with a single voucher for public use (only for discount and gift card campaigns)
|
|
25
25
|
attr_accessor :type
|
|
26
26
|
|
|
27
|
-
# If this value is set to `true`, customers will be able to join the campaign only once. For loyalty campaigns, it's forced to `true`, even if `join_once: false` is passed in the request.
|
|
27
|
+
# If this value is set to `true`, customers will be able to join the campaign only once. For **legacy loyalty** campaigns, it's forced to `true`, even if `join_once: false` is passed in the request.
|
|
28
28
|
attr_accessor :join_once
|
|
29
29
|
|
|
30
|
-
# Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
|
|
30
|
+
# Indicates whether customers will be able to auto-join a **legacy loyalty** campaign if any earning rule is fulfilled.
|
|
31
31
|
attr_accessor :auto_join
|
|
32
32
|
|
|
33
33
|
# Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
|
|
@@ -33,10 +33,10 @@ module VoucherifySdk
|
|
|
33
33
|
|
|
34
34
|
attr_accessor :voucher
|
|
35
35
|
|
|
36
|
-
# Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
|
|
36
|
+
# Indicates whether customers will be able to auto-join a **legacy 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. It is always `false` for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns and it cannot be changed in them.
|
|
39
|
+
# If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for **legacy loyalty** 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.
|
|
@@ -33,10 +33,10 @@ module VoucherifySdk
|
|
|
33
33
|
|
|
34
34
|
attr_accessor :voucher
|
|
35
35
|
|
|
36
|
-
# Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
|
|
36
|
+
# Indicates whether customers will be able to auto-join a **legacy 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. It is always `false` for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns and it cannot be changed in them.
|
|
39
|
+
# If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for **legacy loyalty** 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.
|
|
@@ -48,10 +48,10 @@ module VoucherifySdk
|
|
|
48
48
|
# 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.
|
|
49
49
|
attr_accessor :activity_duration_after_publishing
|
|
50
50
|
|
|
51
|
-
# If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns and it cannot be changed in them.
|
|
51
|
+
# If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for **legacy loyalty** campaigns and it cannot be changed in them.
|
|
52
52
|
attr_accessor :join_once
|
|
53
53
|
|
|
54
|
-
# Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
|
|
54
|
+
# Indicates whether customers will be able to auto-join a **legacy loyalty** campaign if any earning rule is fulfilled.
|
|
55
55
|
attr_accessor :auto_join
|
|
56
56
|
|
|
57
57
|
# 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`.
|
|
@@ -33,10 +33,10 @@ module VoucherifySdk
|
|
|
33
33
|
|
|
34
34
|
attr_accessor :voucher
|
|
35
35
|
|
|
36
|
-
# Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
|
|
36
|
+
# Indicates whether customers will be able to auto-join a **legacy 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. It is always `false` for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns and it cannot be changed in them.
|
|
39
|
+
# If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for **legacy loyalty** 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.
|
data/lib/VoucherifySdk/models/campaigns_vouchers_create_combined_response_body_loyalty_card.rb
CHANGED
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
|
|
17
|
+
# Object representing legacy loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
|
|
18
18
|
class CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard
|
|
19
19
|
# Total number of points added to the loyalty card over its lifespan.
|
|
20
20
|
attr_accessor :points
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
|
|
17
|
+
# Object representing legacy loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
|
|
18
18
|
class CampaignsVouchersCreateResponseBodyLoyaltyCard
|
|
19
19
|
# Total number of points added to the loyalty card over its lifespan.
|
|
20
20
|
attr_accessor :points
|
|
@@ -19,7 +19,7 @@ module VoucherifySdk
|
|
|
19
19
|
# Identifies the start of the truncated aggregation period (`YYYY-MM-DD`). For `week` this is Monday. For `month` this is the first day. For `quarter` this is the quarter start.
|
|
20
20
|
attr_accessor :date
|
|
21
21
|
|
|
22
|
-
# Points credited to the card in the period. Sums `points_earned`, `points_added`, and `
|
|
22
|
+
# Points credited to the card in the period. Sums `points_earned`, `points_added`, `points_purchased`, `referrer_points_earned`, and `referee_points_earned`. Points spent, expired, subtracted, refunded, returned, or reversed are not deducted.
|
|
23
23
|
attr_accessor :points_total
|
|
24
24
|
|
|
25
25
|
# Points earned through earning rules in the period. Includes pending points activated in the period.
|
|
@@ -55,6 +55,12 @@ module VoucherifySdk
|
|
|
55
55
|
# Points unlocked in the period. Includes points released when a spending transaction is approved (also counted in `points_spent`) or rejected.
|
|
56
56
|
attr_accessor :points_unlocked
|
|
57
57
|
|
|
58
|
+
# Points credited from referral referrer awards in the period (`REFERRER_POINTS_EARNED` card transactions, for example a `LOYALTY_POINTS` reward assigned to a referrer tier). Also counted in `points_total`. Not counted in `points_earned`.
|
|
59
|
+
attr_accessor :referrer_points_earned
|
|
60
|
+
|
|
61
|
+
# Points credited from referral referee awards in the period (`REFEREE_POINTS_EARNED` card transactions, for example a `LOYALTY_POINTS` reward assigned to a referee tier). Also counted in `points_total`. Not counted in `points_earned`.
|
|
62
|
+
attr_accessor :referee_points_earned
|
|
63
|
+
|
|
58
64
|
# Pending points added in the period. Activated and canceled pending points are not deducted.
|
|
59
65
|
attr_accessor :pending_points_total
|
|
60
66
|
|
|
@@ -105,6 +111,8 @@ module VoucherifySdk
|
|
|
105
111
|
:'points_returned' => :'points_returned',
|
|
106
112
|
:'points_locked' => :'points_locked',
|
|
107
113
|
:'points_unlocked' => :'points_unlocked',
|
|
114
|
+
:'referrer_points_earned' => :'referrer_points_earned',
|
|
115
|
+
:'referee_points_earned' => :'referee_points_earned',
|
|
108
116
|
:'pending_points_total' => :'pending_points_total',
|
|
109
117
|
:'pending_points_activated' => :'pending_points_activated',
|
|
110
118
|
:'pending_points_canceled' => :'pending_points_canceled',
|
|
@@ -133,6 +141,8 @@ module VoucherifySdk
|
|
|
133
141
|
:'points_returned' => :'Float',
|
|
134
142
|
:'points_locked' => :'Float',
|
|
135
143
|
:'points_unlocked' => :'Float',
|
|
144
|
+
:'referrer_points_earned' => :'Float',
|
|
145
|
+
:'referee_points_earned' => :'Float',
|
|
136
146
|
:'pending_points_total' => :'Float',
|
|
137
147
|
:'pending_points_activated' => :'Float',
|
|
138
148
|
:'pending_points_canceled' => :'Float',
|
|
@@ -156,6 +166,8 @@ module VoucherifySdk
|
|
|
156
166
|
:'points_returned',
|
|
157
167
|
:'points_locked',
|
|
158
168
|
:'points_unlocked',
|
|
169
|
+
:'referrer_points_earned',
|
|
170
|
+
:'referee_points_earned',
|
|
159
171
|
:'pending_points_total',
|
|
160
172
|
:'pending_points_activated',
|
|
161
173
|
:'pending_points_canceled',
|
|
@@ -223,6 +235,14 @@ module VoucherifySdk
|
|
|
223
235
|
self.points_unlocked = attributes[:'points_unlocked']
|
|
224
236
|
end
|
|
225
237
|
|
|
238
|
+
if attributes.key?(:'referrer_points_earned')
|
|
239
|
+
self.referrer_points_earned = attributes[:'referrer_points_earned']
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'referee_points_earned')
|
|
243
|
+
self.referee_points_earned = attributes[:'referee_points_earned']
|
|
244
|
+
end
|
|
245
|
+
|
|
226
246
|
if attributes.key?(:'pending_points_total')
|
|
227
247
|
self.pending_points_total = attributes[:'pending_points_total']
|
|
228
248
|
end
|
|
@@ -277,6 +297,8 @@ module VoucherifySdk
|
|
|
277
297
|
points_returned == o.points_returned &&
|
|
278
298
|
points_locked == o.points_locked &&
|
|
279
299
|
points_unlocked == o.points_unlocked &&
|
|
300
|
+
referrer_points_earned == o.referrer_points_earned &&
|
|
301
|
+
referee_points_earned == o.referee_points_earned &&
|
|
280
302
|
pending_points_total == o.pending_points_total &&
|
|
281
303
|
pending_points_activated == o.pending_points_activated &&
|
|
282
304
|
pending_points_canceled == o.pending_points_canceled &&
|
|
@@ -292,7 +314,7 @@ module VoucherifySdk
|
|
|
292
314
|
# Calculates hash code according to all attributes.
|
|
293
315
|
# @return [Integer] Hash code
|
|
294
316
|
def hash
|
|
295
|
-
[date, points_total, points_earned, points_added, points_purchased, points_purchased_reversed, points_subtracted, points_expired, points_spent, points_refunded, points_returned, points_locked, points_unlocked, pending_points_total, pending_points_activated, pending_points_canceled, object].hash
|
|
317
|
+
[date, points_total, points_earned, points_added, points_purchased, points_purchased_reversed, points_subtracted, points_expired, points_spent, points_refunded, points_returned, points_locked, points_unlocked, referrer_points_earned, referee_points_earned, pending_points_total, pending_points_activated, pending_points_canceled, object].hash
|
|
296
318
|
end
|
|
297
319
|
|
|
298
320
|
# Builds the object from hash
|
|
@@ -52,6 +52,12 @@ module VoucherifySdk
|
|
|
52
52
|
# Total unlocked points (by unlocking a purchased reward).
|
|
53
53
|
attr_accessor :unlocked
|
|
54
54
|
|
|
55
|
+
# Total points credited as a referrer from a `LOYALTY_POINTS` referral reward. Already included in `total`, not in `earned`.
|
|
56
|
+
attr_accessor :referrer_earned
|
|
57
|
+
|
|
58
|
+
# Total points credited as a referee from a `LOYALTY_POINTS` referral reward. Already included in `total`, not in `earned`.
|
|
59
|
+
attr_accessor :referee_earned
|
|
60
|
+
|
|
55
61
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
62
|
def self.attribute_map
|
|
57
63
|
{
|
|
@@ -66,7 +72,9 @@ module VoucherifySdk
|
|
|
66
72
|
:'refunded' => :'refunded',
|
|
67
73
|
:'returned' => :'returned',
|
|
68
74
|
:'locked' => :'locked',
|
|
69
|
-
:'unlocked' => :'unlocked'
|
|
75
|
+
:'unlocked' => :'unlocked',
|
|
76
|
+
:'referrer_earned' => :'referrer_earned',
|
|
77
|
+
:'referee_earned' => :'referee_earned'
|
|
70
78
|
}
|
|
71
79
|
end
|
|
72
80
|
|
|
@@ -89,7 +97,9 @@ module VoucherifySdk
|
|
|
89
97
|
:'refunded' => :'Float',
|
|
90
98
|
:'returned' => :'Float',
|
|
91
99
|
:'locked' => :'Float',
|
|
92
|
-
:'unlocked' => :'Float'
|
|
100
|
+
:'unlocked' => :'Float',
|
|
101
|
+
:'referrer_earned' => :'Float',
|
|
102
|
+
:'referee_earned' => :'Float'
|
|
93
103
|
}
|
|
94
104
|
end
|
|
95
105
|
|
|
@@ -107,7 +117,9 @@ module VoucherifySdk
|
|
|
107
117
|
:'refunded',
|
|
108
118
|
:'returned',
|
|
109
119
|
:'locked',
|
|
110
|
-
:'unlocked'
|
|
120
|
+
:'unlocked',
|
|
121
|
+
:'referrer_earned',
|
|
122
|
+
:'referee_earned'
|
|
111
123
|
])
|
|
112
124
|
end
|
|
113
125
|
|
|
@@ -190,6 +202,18 @@ module VoucherifySdk
|
|
|
190
202
|
else
|
|
191
203
|
self.unlocked = 0
|
|
192
204
|
end
|
|
205
|
+
|
|
206
|
+
if attributes.key?(:'referrer_earned')
|
|
207
|
+
self.referrer_earned = attributes[:'referrer_earned']
|
|
208
|
+
else
|
|
209
|
+
self.referrer_earned = 0
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'referee_earned')
|
|
213
|
+
self.referee_earned = attributes[:'referee_earned']
|
|
214
|
+
else
|
|
215
|
+
self.referee_earned = 0
|
|
216
|
+
end
|
|
193
217
|
end
|
|
194
218
|
|
|
195
219
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -223,7 +247,9 @@ module VoucherifySdk
|
|
|
223
247
|
refunded == o.refunded &&
|
|
224
248
|
returned == o.returned &&
|
|
225
249
|
locked == o.locked &&
|
|
226
|
-
unlocked == o.unlocked
|
|
250
|
+
unlocked == o.unlocked &&
|
|
251
|
+
referrer_earned == o.referrer_earned &&
|
|
252
|
+
referee_earned == o.referee_earned
|
|
227
253
|
end
|
|
228
254
|
|
|
229
255
|
# @see the `==` method
|
|
@@ -235,7 +261,7 @@ module VoucherifySdk
|
|
|
235
261
|
# Calculates hash code according to all attributes.
|
|
236
262
|
# @return [Integer] Hash code
|
|
237
263
|
def hash
|
|
238
|
-
[total, earned, added, purchased, purchased_reversed, subtracted, expired, spent, refunded, returned, locked, unlocked].hash
|
|
264
|
+
[total, earned, added, purchased, purchased_reversed, subtracted, expired, spent, refunded, returned, locked, unlocked, referrer_earned, referee_earned].hash
|
|
239
265
|
end
|
|
240
266
|
|
|
241
267
|
# Builds the object from hash
|
|
@@ -236,7 +236,7 @@ module VoucherifySdk
|
|
|
236
236
|
return false if !@card_definition_id.nil? && @card_definition_id !~ Regexp.new(/^lcdef_[a-f0-9]+$/)
|
|
237
237
|
card_type_validator = EnumAttributeValidator.new('String', ["INDIVIDUAL"])
|
|
238
238
|
return false unless card_type_validator.valid?(@card_type)
|
|
239
|
-
type_validator = EnumAttributeValidator.new('String', ["ADMIN_CREDIT", "ADMIN_DEBIT", "ADMIN_POINTS_EXPIRATION", "POINTS_EARNED", "POINTS_SPENT_ON_REWARD", "POINTS_PURCHASED", "POINTS_PURCHASE_REVERSED", "POINTS_SPENT_ON_ORDER", "POINTS_REFUNDED", "POINTS_RETURNED", "POINTS_EXPIRED", "PENDING_POINTS_ADDED", "PENDING_POINTS_ACTIVATED", "PENDING_POINTS_CANCELED"])
|
|
239
|
+
type_validator = EnumAttributeValidator.new('String', ["ADMIN_CREDIT", "ADMIN_DEBIT", "ADMIN_POINTS_EXPIRATION", "POINTS_EARNED", "POINTS_SPENT_ON_REWARD", "POINTS_PURCHASED", "POINTS_PURCHASE_REVERSED", "POINTS_SPENT_ON_ORDER", "POINTS_REFUNDED", "POINTS_RETURNED", "POINTS_EXPIRED", "PENDING_POINTS_ADDED", "PENDING_POINTS_ACTIVATED", "PENDING_POINTS_CANCELED", "REFERRER_POINTS_EARNED", "REFEREE_POINTS_EARNED"])
|
|
240
240
|
return false unless type_validator.valid?(@type)
|
|
241
241
|
status_validator = EnumAttributeValidator.new('String', ["PENDING", "PROCESSING", "APPROVED", "REJECTED"])
|
|
242
242
|
return false unless status_validator.valid?(@status)
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# If an earning rule in a loyalty
|
|
17
|
+
# If an earning rule in a **legacy loyalty** campaign is based on a custom event, use this object to specify the loyalty card to which the custom event should be attributed.
|
|
18
18
|
class ClientEventsCreateRequestBodyLoyalty
|
|
19
19
|
# Code of the loyalty card to receive points based on the calculation method defined in the related earning rule. An earning rule is triggered for the loyalty card when the event passed in the `event` parameter of the request payload gets sent along with this loyalty card code.
|
|
20
20
|
attr_accessor :code
|
|
@@ -14,14 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
+
# Summary of the customer's **legacy loyalty** activity: points on loyalty cards and referred customers. Loyalty hub memberships are listed separately under `loyalty_memberships` on the customer object.
|
|
17
18
|
class CustomerLoyalty
|
|
18
|
-
# Customer's loyalty points minus expired for all loyalty cards which the customer has.
|
|
19
|
+
# Customer's loyalty points minus expired points for all loyalty cards (**legacy loyalty**) which the customer has.
|
|
19
20
|
attr_accessor :points
|
|
20
21
|
|
|
21
22
|
# Total number of customers referred by the customer.
|
|
22
23
|
attr_accessor :referred_customers
|
|
23
24
|
|
|
24
|
-
# Contains campaigns with details about point balances and how many customers were referred by the customer.
|
|
25
|
+
# Contains **legacy loyalty** and referral campaigns with details about point balances and how many customers were referred by the customer.
|
|
25
26
|
attr_accessor :campaigns
|
|
26
27
|
|
|
27
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,12 +14,12 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.
|
|
17
|
+
# Contains details about the point balances left on loyalty cards (**legacy loyalty**) and the number of referred customers in each campaign.
|
|
18
18
|
class CustomerLoyaltyCampaignsEntry
|
|
19
19
|
# Remaining point balance in campaign.
|
|
20
20
|
attr_accessor :points
|
|
21
21
|
|
|
22
|
-
# Customer's loyalty tier within the campaign.
|
|
22
|
+
# Customer's loyalty tier within the **legacy loyalty** campaign.
|
|
23
23
|
attr_accessor :loyalty_tier
|
|
24
24
|
|
|
25
25
|
# Number of customers referred by the customer in campaign.
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Summary of loyalty points.
|
|
17
|
+
# Summary of loyalty points (**legacy loyalty**).
|
|
18
18
|
class CustomerSummaryRedemptionsLoyaltyCard
|
|
19
19
|
# Total number of loyalty points redeemed by the customer.
|
|
20
20
|
attr_accessor :redeemed_points
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
+
# Earning rule for a **legacy loyalty** campaign. For Loyalty hub earning rules, see `/v2/loyalties/earning-rules`.
|
|
17
18
|
class EarningRule
|
|
18
19
|
# Assigned by the Voucherify API, identifies the earning rule object.
|
|
19
20
|
attr_accessor :id
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# If an earning rule in a loyalty
|
|
17
|
+
# If an earning rule in a **legacy loyalty** campaign is based on a custom event, use this object to specify the loyalty card to which the custom event should be attributed.
|
|
18
18
|
class EventsCreateRequestBodyLoyalty
|
|
19
19
|
# Code of the loyalty card to receive points based on the calculation method defined in the related earning rule. An earning rule is triggered for the loyalty card when the event passed in the `event` parameter of the request payload gets sent along with this loyalty card code.
|
|
20
20
|
attr_accessor :code
|
|
@@ -191,7 +191,7 @@ module VoucherifySdk
|
|
|
191
191
|
:'product_id' => :'String',
|
|
192
192
|
:'product_source_id' => :'String',
|
|
193
193
|
:'price' => :'Float',
|
|
194
|
-
:'price_formula' => :'
|
|
194
|
+
:'price_formula' => :'String',
|
|
195
195
|
:'effect' => :'ApplicableToEffect',
|
|
196
196
|
:'quantity_limit' => :'Integer',
|
|
197
197
|
:'aggregated_quantity_limit' => :'Integer',
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Request body schema for **POST** `/loyalties`.
|
|
17
|
+
# **Legacy loyalty.** Request body schema for **POST** `/loyalties`.
|
|
18
18
|
class LoyaltiesCreateCampaignRequestBody
|
|
19
19
|
# Campaign name.
|
|
20
20
|
attr_accessor :name
|
|
@@ -25,10 +25,10 @@ module VoucherifySdk
|
|
|
25
25
|
# Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (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`: the campaign is a generic (standalone) one with a single voucher for public use (only for discount and gift card campaigns)
|
|
26
26
|
attr_accessor :type
|
|
27
27
|
|
|
28
|
-
# If this value is set to `true`, customers will be able to join the campaign only once. For loyalty campaigns, it's forced to `true`, even if `join_once: false` is passed in the request.
|
|
28
|
+
# If this value is set to `true`, customers will be able to join the campaign only once. For **legacy loyalty** campaigns, it's forced to `true`, even if `join_once: false` is passed in the request.
|
|
29
29
|
attr_accessor :join_once
|
|
30
30
|
|
|
31
|
-
# Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
|
|
31
|
+
# Indicates whether customers will be able to auto-join a **legacy loyalty** campaign if any earning rule is fulfilled.
|
|
32
32
|
attr_accessor :auto_join
|
|
33
33
|
|
|
34
34
|
# Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Response body schema for **POST** `/loyalties`.
|
|
17
|
+
# **Legacy loyalty.** Response body schema for **POST** `/loyalties`.
|
|
18
18
|
class LoyaltiesCreateCampaignResponseBody
|
|
19
19
|
# Unique campaign ID, assigned by Voucherify.
|
|
20
20
|
attr_accessor :id
|
|
@@ -33,10 +33,10 @@ module VoucherifySdk
|
|
|
33
33
|
|
|
34
34
|
attr_accessor :voucher
|
|
35
35
|
|
|
36
|
-
# Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
|
|
36
|
+
# Indicates whether customers will be able to auto-join a **legacy loyalty** campaign if any earning rule is fulfilled.
|
|
37
37
|
attr_accessor :auto_join
|
|
38
38
|
|
|
39
|
-
# Always set to `true` for loyalty campaigns, meaning customers can join the campaign only once. It can't be changed to `false`.
|
|
39
|
+
# Always set to `true` for **legacy loyalty** campaigns, meaning customers can join the campaign only once. It can't be changed to `false`.
|
|
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.
|
data/lib/VoucherifySdk/models/loyalties_earning_rules_create_request_body_item_custom_event.rb
CHANGED
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Contains the schema
|
|
17
|
+
# Contains the schema ID of a custom event. Required for the custom event option in `event`.
|
|
18
18
|
class LoyaltiesEarningRulesCreateRequestBodyItemCustomEvent
|
|
19
19
|
# Contains a unique identifier of a custom event schema. Assigned by the Voucherify API.
|
|
20
20
|
attr_accessor :schema_id
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Contains the ID of a customer segment.
|
|
17
|
+
# Contains the ID of a customer segment. Required for the `customer.segment.entered` option in `event`.
|
|
18
18
|
class LoyaltiesEarningRulesCreateRequestBodyItemSegment
|
|
19
19
|
# Contains a unique identifier of a customer segment. Assigned by the Voucherify API.
|
|
20
20
|
attr_accessor :id
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Response body schema for listing earning rules using **GET** `v1/loyalties/{campaignId}/earning-rules` endpoint.
|
|
17
|
+
# **Legacy loyalty.** Response body schema for listing earning rules using **GET** `v1/loyalties/{campaignId}/earning-rules` endpoint.
|
|
18
18
|
class LoyaltiesEarningRulesListResponseBody
|
|
19
19
|
# The type of the object represented by JSON. This object stores information about earning rules in a dictionary.
|
|
20
20
|
attr_accessor :object
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
+
# Request body for updating an earning rule in a **legacy loyalty** campaign (`PUT /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}`).
|
|
17
18
|
class LoyaltiesEarningRulesUpdateRequestBody
|
|
18
19
|
# A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance.
|
|
19
20
|
attr_accessor :validation_rule_id
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Response body schema for **GET** `/loyalties/{campaignId}`.
|
|
17
|
+
# **Legacy loyalty.** Response body schema for **GET** `/loyalties/{campaignId}`.
|
|
18
18
|
class LoyaltiesGetCampaignResponseBody
|
|
19
19
|
# Unique campaign ID, assigned by Voucherify.
|
|
20
20
|
attr_accessor :id
|
|
@@ -33,10 +33,10 @@ module VoucherifySdk
|
|
|
33
33
|
|
|
34
34
|
attr_accessor :voucher
|
|
35
35
|
|
|
36
|
-
# Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
|
|
36
|
+
# Indicates whether customers will be able to auto-join a **legacy loyalty** campaign if any earning rule is fulfilled.
|
|
37
37
|
attr_accessor :auto_join
|
|
38
38
|
|
|
39
|
-
# Always set to `true` for loyalty campaigns, meaning customers can join the campaign only once. It can't be changed to `false`.
|
|
39
|
+
# Always set to `true` for **legacy loyalty** campaigns, meaning customers can join the campaign only once. It can't be changed to `false`.
|
|
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.
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Response body schema for **Get** `/loyalties`.
|
|
17
|
+
# **Legacy loyalty.** Response body schema for **Get** `/loyalties`.
|
|
18
18
|
class LoyaltiesListCampaignsResponseBody
|
|
19
19
|
# The type of the object represented by JSON. This object stores information about loyalty campaigns in a dictionary.
|
|
20
20
|
attr_accessor :object
|
|
@@ -22,7 +22,7 @@ module VoucherifySdk
|
|
|
22
22
|
# Identifies the name of the attribute that contains the array of voucher objects.
|
|
23
23
|
attr_accessor :data_ref
|
|
24
24
|
|
|
25
|
-
# Contains array of voucher objects representing loyalty cards
|
|
25
|
+
# Contains an array of voucher objects representing loyalty cards (legacy loyalty campaign members).
|
|
26
26
|
attr_accessor :vouchers
|
|
27
27
|
|
|
28
28
|
# Total number of voucher objects.
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# This is an object representing a loyalty tier reward.
|
|
17
|
+
# **Legacy loyalty.** This is an object representing a loyalty tier reward.
|
|
18
18
|
class LoyaltiesLoyaltyTierReward
|
|
19
19
|
attr_accessor :reward
|
|
20
20
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
|
|
17
|
+
# Object representing legacy loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
|
|
18
18
|
class LoyaltiesMembersCreateResponseBodyLoyaltyCard
|
|
19
19
|
# Total number of points added to the loyalty card over its lifespan.
|
|
20
20
|
attr_accessor :points
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
|
|
17
|
+
# Object representing legacy loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
|
|
18
18
|
class LoyaltiesMembersGetResponseBodyLoyaltyCard
|
|
19
19
|
# Total number of points added to the loyalty card over its lifespan.
|
|
20
20
|
attr_accessor :points
|
|
@@ -19,7 +19,7 @@ module VoucherifySdk
|
|
|
19
19
|
# Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. For `AUTO_REDEEM`, it is the reward assignment ID.
|
|
20
20
|
attr_accessor :channel_id
|
|
21
21
|
|
|
22
|
-
# The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard, `API` corresponds to the API, and `AUTO_REDEEM` corresponds to a loyalty campaign reward that has been redeemed automatically.
|
|
22
|
+
# The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard, `API` corresponds to the API, and `AUTO_REDEEM` corresponds to a **legacy loyalty** campaign reward that has been redeemed automatically.
|
|
23
23
|
attr_accessor :channel_type
|
|
24
24
|
|
|
25
25
|
class EnumAttributeValidator
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
|
|
17
|
+
# Object representing legacy loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
|
|
18
18
|
class LoyaltiesMembersRedemptionRedeemResponseBodyVoucherLoyaltyCard
|
|
19
19
|
# Total number of points added to the loyalty card over its lifespan.
|
|
20
20
|
attr_accessor :points
|
data/lib/VoucherifySdk/models/loyalties_members_transfers_create_response_body_loyalty_card.rb
CHANGED
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD.
|
|
17
|
+
# Object representing legacy loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD.
|
|
18
18
|
class LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard
|
|
19
19
|
# Total number of points added to the loyalty card over its lifespan.
|
|
20
20
|
attr_accessor :points
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module VoucherifySdk
|
|
17
|
-
# ID filter conditions for benefit
|
|
17
|
+
# ID filter conditions for benefit IDs. Values must match pattern `^lben_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.
|
|
18
18
|
class LoyaltiesProgramsMembersBenefitsTransactionsListRequestQueryBenefitId
|
|
19
19
|
attr_accessor :conditions
|
|
20
20
|
|
|
@@ -31,10 +31,10 @@ module VoucherifySdk
|
|
|
31
31
|
# The type of the object represented by the JSON. This object stores information about the reward assignment.
|
|
32
32
|
attr_accessor :object
|
|
33
33
|
|
|
34
|
-
# Related object ID to which the reward was assigned.
|
|
34
|
+
# Related object ID to which the reward was assigned. For `related_object_type` `campaign`, this is the campaign ID. For `referral_tier`, this is the referral tier ID.
|
|
35
35
|
attr_accessor :related_object_id
|
|
36
36
|
|
|
37
|
-
# Related object type to which the reward was assigned.
|
|
37
|
+
# Related object type to which the reward was assigned. Use `campaign` for **legacy loyalty** campaign rewards. Use `referral_tier` for `LOYALTY_POINTS` rewards that credit a `v2/loyalties` (loyalty hub) card from a referral tier. A `LOYALTY_POINTS` reward can only be assigned to a referral tier.
|
|
38
38
|
attr_accessor :related_object_type
|
|
39
39
|
|
|
40
40
|
attr_accessor :parameters
|
|
@@ -167,7 +167,7 @@ module VoucherifySdk
|
|
|
167
167
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
168
168
|
object_validator = EnumAttributeValidator.new('String', ["reward_assignment"])
|
|
169
169
|
return false unless object_validator.valid?(@object)
|
|
170
|
-
related_object_type_validator = EnumAttributeValidator.new('String', ["campaign"])
|
|
170
|
+
related_object_type_validator = EnumAttributeValidator.new('String', ["campaign", "referral_tier"])
|
|
171
171
|
return false unless related_object_type_validator.valid?(@related_object_type)
|
|
172
172
|
true
|
|
173
173
|
end
|
data/lib/VoucherifySdk/models/loyalties_reward_assignments_get_response_body_parameters_loyalty.rb
CHANGED
|
@@ -19,7 +19,7 @@ module VoucherifySdk
|
|
|
19
19
|
# The number of points required to redeem the reward.
|
|
20
20
|
attr_accessor :points
|
|
21
21
|
|
|
22
|
-
# Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`.
|
|
22
|
+
# Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a **legacy loyalty** campaign, i.e. only one can have the value `true`.
|
|
23
23
|
attr_accessor :auto_redeem
|
|
24
24
|
|
|
25
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|