voucherify 8.0.2 → 8.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Dockerfile +1 -1
- data/ENDPOINTS-COVERAGE.md +53 -48
- data/Gemfile.lock +8 -6
- data/README.md +44 -2
- data/__tests__/spec/12_validation_rules_spec.rb +1 -15
- data/docs/AccessSettings.md +9 -0
- data/docs/AccessSettingsAssign.md +10 -0
- data/docs/AccessSettingsUnassign.md +10 -0
- data/docs/ApplicableTo.md +3 -2
- data/docs/ApplicableToOrderItemUnitsItem.md +9 -0
- data/docs/ApplicationDetailsItem.md +14 -0
- data/docs/AreaStoreCampaignAssignment.md +1 -0
- data/docs/BinApi.md +4 -4
- data/docs/Campaign.md +1 -1
- data/docs/CampaignBase.md +1 -0
- data/docs/CampaignsCreateRequestBody.md +1 -0
- data/docs/CampaignsCreateResponseBody.md +1 -1
- data/docs/CampaignsGetResponseBody.md +1 -1
- data/docs/CampaignsUpdateRequestBody.md +1 -0
- data/docs/CampaignsUpdateResponseBody.md +1 -1
- data/docs/CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md +2 -1
- data/docs/CampaignsVouchersCreateResponseBodyLoyaltyCard.md +2 -1
- data/docs/ClientValidationsValidateResponseBodyRedeemablesItemResultDiscount.md +1 -1
- data/docs/CustomerLoyalty.md +1 -1
- data/docs/Discount.md +1 -1
- data/docs/DiscountUnitMultipleOneUnit.md +1 -1
- data/docs/EarningRule.md +1 -0
- data/docs/EarningRulePendingPoints.md +9 -0
- data/docs/EventSource.md +10 -0
- data/docs/EventSourceApiKey.md +9 -0
- data/docs/EventSourceUser.md +8 -0
- data/docs/InapplicableTo.md +3 -2
- data/docs/InapplicableToOrderItemUnitsItem.md +9 -0
- data/docs/LoyaltiesApi.md +334 -10
- data/docs/LoyaltiesCreateCampaignRequestBody.md +1 -0
- data/docs/LoyaltiesEarningRulesCreateResponseBody.md +1 -0
- data/docs/LoyaltiesEarningRulesCreateResponseBodyPendingPoints.md +9 -0
- data/docs/LoyaltiesEarningRulesDisableResponseBody.md +1 -0
- data/docs/LoyaltiesEarningRulesDisableResponseBodyPendingPoints.md +9 -0
- data/docs/LoyaltiesEarningRulesEnableResponseBody.md +1 -0
- data/docs/LoyaltiesEarningRulesEnableResponseBodyPendingPoints.md +9 -0
- data/docs/LoyaltiesEarningRulesGetResponseBody.md +1 -0
- data/docs/LoyaltiesEarningRulesGetResponseBodyPendingPoints.md +9 -0
- data/docs/LoyaltiesEarningRulesUpdateResponseBody.md +1 -0
- data/docs/LoyaltiesEarningRulesUpdateResponseBodyPendingPoints.md +9 -0
- data/docs/LoyaltiesMembersCreateResponseBodyLoyaltyCard.md +2 -1
- data/docs/LoyaltiesMembersGetResponseBodyLoyaltyCard.md +2 -1
- data/docs/LoyaltiesMembersPendingPointsActivateResponseBody.md +14 -0
- data/docs/LoyaltiesMembersPendingPointsActivateResponseBodyRelatedObject.md +9 -0
- data/docs/LoyaltiesMembersPendingPointsListResponseBody.md +12 -0
- data/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherLoyaltyCard.md +2 -1
- data/docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md +2 -1
- data/docs/LoyaltiesPendingPointsListResponseBody.md +12 -0
- data/docs/LoyaltiesUpdateCampaignRequestBody.md +1 -0
- data/docs/LoyaltyCardTransactionDetails.md +2 -0
- data/docs/LoyaltyCardTransactionDetailsEarningRule.md +1 -1
- data/docs/LoyaltyCardTransactionDetailsHolderLoyaltyTier.md +9 -0
- data/docs/LoyaltyCardTransactionDetailsLoyaltyTier.md +2 -2
- data/docs/LoyaltyMemberLoyaltyCard.md +2 -1
- data/docs/LoyaltyPendingPoints.md +17 -0
- data/docs/LoyaltyPendingPointsDetails.md +12 -0
- data/docs/LoyaltyPendingPointsDetailsEarningRule.md +9 -0
- data/docs/LoyaltyPendingPointsDetailsEarningRuleSource.md +8 -0
- data/docs/LoyaltyPendingPointsDetailsEvent.md +14 -0
- data/docs/LoyaltyPendingPointsDetailsHolderLoyaltyTier.md +9 -0
- data/docs/LoyaltyPendingPointsDetailsLoyaltyTier.md +9 -0
- data/docs/LoyaltyPendingPointsDetailsOrder.md +9 -0
- data/docs/LoyaltyTierExpiration.md +1 -1
- data/docs/Order.md +2 -2
- data/docs/OrderCalculated.md +11 -11
- data/docs/OrderCalculatedItem.md +1 -0
- data/docs/OrderRedemptionsEntry.md +1 -1
- data/docs/OrdersCreateRequestBody.md +2 -2
- data/docs/OrdersCreateResponseBody.md +11 -11
- data/docs/OrdersGetResponseBody.md +11 -11
- data/docs/OrdersImportCreateRequestBodyItem.md +2 -2
- data/docs/OrdersUpdateRequestBody.md +2 -2
- data/docs/OrdersUpdateResponseBody.md +11 -11
- data/docs/ParameterOrderListPendingPoints.md +7 -0
- data/docs/RedeemableLoyaltyCard.md +1 -1
- data/docs/RedeemableVoucherLoyaltyCard.md +2 -1
- data/docs/RedemptionEntryOrder.md +11 -11
- data/docs/RedemptionEntryVoucherLoyaltyCard.md +2 -1
- data/docs/RedemptionVoucherLoyaltyCard.md +2 -1
- data/docs/RedemptionsGetResponseBodyOrder.md +11 -11
- data/docs/RedemptionsGetResponseBodyVoucherLoyaltyCard.md +2 -1
- data/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md +11 -11
- data/docs/RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard.md +2 -1
- data/docs/SimpleLoyaltyCard.md +2 -1
- data/docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md +1 -0
- data/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.md +1 -1
- data/docs/VoucherLoyaltyCard.md +2 -1
- data/docs/VoucherTransactionDetails.md +2 -0
- data/docs/VoucherTransactionDetailsCustomEvent.md +2 -2
- data/docs/VoucherTransactionDetailsEarningRule.md +1 -1
- data/docs/VoucherTransactionDetailsEventSchema.md +2 -2
- data/docs/VoucherTransactionDetailsHolderLoyaltyTier.md +9 -0
- data/docs/VoucherTransactionDetailsLoyaltyTier.md +2 -2
- data/docs/VoucherTransactionDetailsRollback.md +1 -1
- data/docs/VoucherTransactionDetailsSegment.md +2 -2
- data/docs/VoucherWithCategoriesLoyaltyCard.md +2 -1
- data/docs/VouchersCreateResponseBodyLoyaltyCard.md +2 -1
- data/docs/VouchersDisableResponseBodyLoyaltyCard.md +2 -1
- data/docs/VouchersEnableResponseBodyLoyaltyCard.md +2 -1
- data/docs/VouchersGetResponseBodyLoyaltyCard.md +2 -1
- data/docs/VouchersUpdateResponseBodyLoyaltyCard.md +2 -1
- data/lib/VoucherifySdk/api/bin_api.rb +4 -4
- data/lib/VoucherifySdk/api/loyalties_api.rb +334 -8
- data/lib/VoucherifySdk/models/access_settings.rb +219 -0
- data/lib/VoucherifySdk/models/access_settings_assign.rb +238 -0
- data/lib/VoucherifySdk/models/access_settings_unassign.rb +238 -0
- data/lib/VoucherifySdk/models/applicable_to.rb +16 -3
- data/lib/VoucherifySdk/models/applicable_to_order_item_units_item.rb +220 -0
- data/lib/VoucherifySdk/models/application_details_item.rb +284 -0
- data/lib/VoucherifySdk/models/area_store_campaign_assignment.rb +12 -1
- data/lib/VoucherifySdk/models/campaign.rb +13 -13
- data/lib/VoucherifySdk/models/campaign_base.rb +13 -4
- data/lib/VoucherifySdk/models/campaigns_create_request_body.rb +10 -1
- data/lib/VoucherifySdk/models/campaigns_create_response_body.rb +13 -13
- data/lib/VoucherifySdk/models/campaigns_get_response_body.rb +13 -13
- data/lib/VoucherifySdk/models/campaigns_update_request_body.rb +10 -1
- data/lib/VoucherifySdk/models/campaigns_update_response_body.rb +13 -13
- data/lib/VoucherifySdk/models/campaigns_vouchers_create_combined_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/campaigns_vouchers_create_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item_result_discount.rb +1 -0
- data/lib/VoucherifySdk/models/customer_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/discount.rb +1 -0
- data/lib/VoucherifySdk/models/discount_unit_multiple_one_unit.rb +1 -0
- data/lib/VoucherifySdk/models/earning_rule.rb +11 -1
- data/lib/VoucherifySdk/models/earning_rule_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/event_source.rb +254 -0
- data/lib/VoucherifySdk/models/event_source_api_key.rb +221 -0
- data/lib/VoucherifySdk/models/event_source_user.rb +210 -0
- data/lib/VoucherifySdk/models/inapplicable_to.rb +16 -3
- data/lib/VoucherifySdk/models/inapplicable_to_order_item_units_item.rb +220 -0
- data/lib/VoucherifySdk/models/loyalties_create_campaign_request_body.rb +10 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_create_response_body.rb +11 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_create_response_body_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/loyalties_earning_rules_disable_response_body.rb +11 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_disable_response_body_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/loyalties_earning_rules_enable_response_body.rb +11 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_enable_response_body_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/loyalties_earning_rules_get_response_body.rb +11 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_get_response_body_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/loyalties_earning_rules_update_response_body.rb +11 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_update_response_body_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/loyalties_members_create_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/loyalties_members_get_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/loyalties_members_pending_points_activate_response_body.rb +309 -0
- data/lib/VoucherifySdk/models/loyalties_members_pending_points_activate_response_body_related_object.rb +247 -0
- data/lib/VoucherifySdk/models/loyalties_members_pending_points_list_response_body.rb +286 -0
- data/lib/VoucherifySdk/models/loyalties_members_redemption_redeem_response_body_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/loyalties_members_transfers_create_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/loyalties_pending_points_list_response_body.rb +286 -0
- data/lib/VoucherifySdk/models/loyalties_update_campaign_request_body.rb +10 -1
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details.rb +20 -1
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details_earning_rule.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details_holder_loyalty_tier.rb +221 -0
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details_loyalty_tier.rb +3 -1
- data/lib/VoucherifySdk/models/loyalty_card_transactions_type.rb +2 -1
- data/lib/VoucherifySdk/models/loyalty_member_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/loyalty_pending_points.rb +314 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details.rb +249 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_earning_rule.rb +220 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_earning_rule_source.rb +210 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_event.rb +302 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_holder_loyalty_tier.rb +221 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_loyalty_tier.rb +221 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_order.rb +221 -0
- data/lib/VoucherifySdk/models/loyalty_tier_expiration.rb +1 -1
- data/lib/VoucherifySdk/models/order.rb +2 -2
- data/lib/VoucherifySdk/models/order_calculated.rb +28 -28
- data/lib/VoucherifySdk/models/order_calculated_item.rb +17 -5
- data/lib/VoucherifySdk/models/order_redemptions_entry.rb +1 -1
- data/lib/VoucherifySdk/models/orders_create_request_body.rb +2 -2
- data/lib/VoucherifySdk/models/orders_create_response_body.rb +28 -28
- data/lib/VoucherifySdk/models/orders_get_response_body.rb +28 -28
- data/lib/VoucherifySdk/models/orders_import_create_request_body_item.rb +2 -2
- data/lib/VoucherifySdk/models/orders_update_request_body.rb +2 -2
- data/lib/VoucherifySdk/models/orders_update_response_body.rb +28 -28
- data/lib/VoucherifySdk/models/parameter_order_list_pending_points.rb +40 -0
- data/lib/VoucherifySdk/models/qualifications_option.rb +3 -3
- data/lib/VoucherifySdk/models/redeemable_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/redeemable_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/redemption_entry_order.rb +28 -28
- data/lib/VoucherifySdk/models/redemption_entry_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/redemption_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/redemptions_get_response_body_order.rb +28 -28
- data/lib/VoucherifySdk/models/redemptions_get_response_body_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_order.rb +27 -28
- data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/simple_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/templates_campaigns_campaign_setup_create_request_body.rb +10 -1
- data/lib/VoucherifySdk/models/validations_validate_response_body_redeemables_item_result_discount.rb +1 -0
- data/lib/VoucherifySdk/models/voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/voucher_transaction.rb +1 -1
- data/lib/VoucherifySdk/models/voucher_transaction_details.rb +20 -1
- data/lib/VoucherifySdk/models/voucher_transaction_details_custom_event.rb +2 -2
- data/lib/VoucherifySdk/models/voucher_transaction_details_earning_rule.rb +1 -1
- data/lib/VoucherifySdk/models/voucher_transaction_details_event_schema.rb +2 -2
- data/lib/VoucherifySdk/models/voucher_transaction_details_holder_loyalty_tier.rb +221 -0
- data/lib/VoucherifySdk/models/voucher_transaction_details_loyalty_tier.rb +3 -1
- data/lib/VoucherifySdk/models/voucher_transaction_details_rollback.rb +1 -1
- data/lib/VoucherifySdk/models/voucher_transaction_details_segment.rb +2 -0
- data/lib/VoucherifySdk/models/voucher_with_categories_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/vouchers_create_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/vouchers_disable_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/vouchers_enable_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/vouchers_get_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/vouchers_update_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/version.rb +1 -1
- data/lib/VoucherifySdk.rb +30 -0
- metadata +96 -36
@@ -19,6 +19,67 @@ module VoucherifySdk
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Activate Member Pending Points
|
23
|
+
# >🚧 Beta endpoint The endpoint is behind a feature flag as it is still in development. Contact [Voucherify support](https://www.voucherify.io/contact-support) to unlock the feature for your organization. All current parameters and fields are listed and described. Activate manually the pending points and add them to the loyalty card. The pending points are determined by the pending point ID. Once activated, the pending point entry with that ID is not listed by the endpoints: List member (with campaign ID, without campaign ID), List campaign pending points. This **POST** method does not require a request body.
|
24
|
+
# @param member_id [String] Unique loyalty card code assigned to a particular customer.
|
25
|
+
# @param pending_points_id [String] Unique pending point identifier, assigned by Voucherify.
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [LoyaltiesMembersPendingPointsActivateResponseBody]
|
28
|
+
def activate_member_pending_points(member_id, pending_points_id, opts = {})
|
29
|
+
data, _status_code, _headers = activate_member_pending_points_with_http_info(member_id, pending_points_id, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Activate Member Pending Points
|
34
|
+
# >🚧 Beta endpoint The endpoint is behind a feature flag as it is still in development. Contact [Voucherify support](https://www.voucherify.io/contact-support) to unlock the feature for your organization. All current parameters and fields are listed and described. Activate manually the pending points and add them to the loyalty card. The pending points are determined by the pending point ID. Once activated, the pending point entry with that ID is not listed by the endpoints: List member (with campaign ID, without campaign ID), List campaign pending points. This **POST** method does not require a request body.
|
35
|
+
# @param member_id [String] Unique loyalty card code assigned to a particular customer.
|
36
|
+
# @param pending_points_id [String] Unique pending point identifier, assigned by Voucherify.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(LoyaltiesMembersPendingPointsActivateResponseBody, Integer, Hash)>] LoyaltiesMembersPendingPointsActivateResponseBody data, response status code and response headers
|
39
|
+
private def activate_member_pending_points_with_http_info(member_id, pending_points_id, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: LoyaltiesApi.activate_member_pending_points ...'
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/v1/loyalties/members/{memberId}/pending-points/{pendingPointsId}/activate'.sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'pendingPointsId' + '}', CGI.escape(pending_points_id.to_s))
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:debug_body]
|
59
|
+
|
60
|
+
# return_type
|
61
|
+
return_type = opts[:debug_return_type] || 'LoyaltiesMembersPendingPointsActivateResponseBody'
|
62
|
+
|
63
|
+
# auth_names
|
64
|
+
auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
|
65
|
+
|
66
|
+
new_options = opts.merge(
|
67
|
+
:operation => :"LoyaltiesApi.activate_member_pending_points",
|
68
|
+
:header_params => header_params,
|
69
|
+
:query_params => query_params,
|
70
|
+
:form_params => form_params,
|
71
|
+
:body => post_body,
|
72
|
+
:auth_names => auth_names,
|
73
|
+
:return_type => return_type
|
74
|
+
)
|
75
|
+
|
76
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: LoyaltiesApi#activate_member_pending_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
|
22
83
|
# Add Member
|
23
84
|
# This method assigns a loyalty card to a customer. It selects a loyalty card suitable for publication, adds a publish entry, and returns the published voucher. A voucher is suitable for publication when its active and hasnt been published yet. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use **auto-update** campaign.
|
24
85
|
# @param campaign_id [String] Unique campaign ID of the loyalty program.
|
@@ -85,6 +146,65 @@ module VoucherifySdk
|
|
85
146
|
return data, status_code, headers
|
86
147
|
end
|
87
148
|
|
149
|
+
# Cancel Member Pending Points
|
150
|
+
# >🚧 Beta endpoint The endpoint is behind a feature flag as it is still in development. Contact [Voucherify support](https://www.voucherify.io/contact-support) to unlock the feature for your organization. All current parameters and fields are listed and described. Cancel manually the pending points for the loyalty card. The pending points are determined by the pending point ID. Once canceled, the pending point entry with that ID is not listed by the endpoints: List member (with campaign ID, without campaign ID), List campaign pending points. This **POST** method does not require a request body and it returns an empty, 204, response.
|
151
|
+
# @param member_id [String] Unique loyalty card code assigned to a particular customer.
|
152
|
+
# @param pending_points_id [String] Unique pending point identifier, assigned by Voucherify.
|
153
|
+
# @param [Hash] opts the optional parameters
|
154
|
+
# @return [nil]
|
155
|
+
def cancel_member_pending_points(member_id, pending_points_id, opts = {})
|
156
|
+
cancel_member_pending_points_with_http_info(member_id, pending_points_id, opts)
|
157
|
+
nil
|
158
|
+
end
|
159
|
+
|
160
|
+
# Cancel Member Pending Points
|
161
|
+
# >🚧 Beta endpoint The endpoint is behind a feature flag as it is still in development. Contact [Voucherify support](https://www.voucherify.io/contact-support) to unlock the feature for your organization. All current parameters and fields are listed and described. Cancel manually the pending points for the loyalty card. The pending points are determined by the pending point ID. Once canceled, the pending point entry with that ID is not listed by the endpoints: List member (with campaign ID, without campaign ID), List campaign pending points. This **POST** method does not require a request body and it returns an empty, 204, response.
|
162
|
+
# @param member_id [String] Unique loyalty card code assigned to a particular customer.
|
163
|
+
# @param pending_points_id [String] Unique pending point identifier, assigned by Voucherify.
|
164
|
+
# @param [Hash] opts the optional parameters
|
165
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
166
|
+
private def cancel_member_pending_points_with_http_info(member_id, pending_points_id, opts = {})
|
167
|
+
if @api_client.config.debugging
|
168
|
+
@api_client.config.logger.debug 'Calling API: LoyaltiesApi.cancel_member_pending_points ...'
|
169
|
+
end
|
170
|
+
# resource path
|
171
|
+
local_var_path = '/v1/loyalties/members/{memberId}/pending-points/{pendingPointsId}/cancel'.sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s)).sub('{' + 'pendingPointsId' + '}', CGI.escape(pending_points_id.to_s))
|
172
|
+
|
173
|
+
# query parameters
|
174
|
+
query_params = opts[:query_params] || {}
|
175
|
+
|
176
|
+
# header parameters
|
177
|
+
header_params = opts[:header_params] || {}
|
178
|
+
|
179
|
+
# form parameters
|
180
|
+
form_params = opts[:form_params] || {}
|
181
|
+
|
182
|
+
# http body (model)
|
183
|
+
post_body = opts[:debug_body]
|
184
|
+
|
185
|
+
# return_type
|
186
|
+
return_type = opts[:debug_return_type]
|
187
|
+
|
188
|
+
# auth_names
|
189
|
+
auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
|
190
|
+
|
191
|
+
new_options = opts.merge(
|
192
|
+
:operation => :"LoyaltiesApi.cancel_member_pending_points",
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names,
|
198
|
+
:return_type => return_type
|
199
|
+
)
|
200
|
+
|
201
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
202
|
+
if @api_client.config.debugging
|
203
|
+
@api_client.config.logger.debug "API called: LoyaltiesApi#cancel_member_pending_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
204
|
+
end
|
205
|
+
return data, status_code, headers
|
206
|
+
end
|
207
|
+
|
88
208
|
# Create Earning Rule
|
89
209
|
# Create earning rules for a loyalty campaign.
|
90
210
|
# @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
|
@@ -281,7 +401,7 @@ module VoucherifySdk
|
|
281
401
|
return data, status_code, headers
|
282
402
|
end
|
283
403
|
|
284
|
-
#
|
404
|
+
# Export Loyalty Campaign Point Expiration
|
285
405
|
# Schedule the generation of a points expiration CSV file for a particular campaign.
|
286
406
|
# @param campaign_id [String] Unique campaign ID or name.
|
287
407
|
# @param [Hash] opts the optional parameters
|
@@ -292,7 +412,7 @@ module VoucherifySdk
|
|
292
412
|
data
|
293
413
|
end
|
294
414
|
|
295
|
-
#
|
415
|
+
# Export Loyalty Campaign Point Expiration
|
296
416
|
# Schedule the generation of a points expiration CSV file for a particular campaign.
|
297
417
|
# @param campaign_id [String] Unique campaign ID or name.
|
298
418
|
# @param [Hash] opts the optional parameters
|
@@ -596,7 +716,7 @@ module VoucherifySdk
|
|
596
716
|
# Disable Earning Rule
|
597
717
|
# Disable an earning rule.
|
598
718
|
# @param campaign_id [String] Unique campaign ID or name.
|
599
|
-
# @param earning_rule_id [String] Unique earning rule
|
719
|
+
# @param earning_rule_id [String] Unique identifier of an earning rule, assigned by Voucherify.
|
600
720
|
# @param [Hash] opts the optional parameters
|
601
721
|
# @return [LoyaltiesEarningRulesDisableResponseBody]
|
602
722
|
def disable_earning_rule(campaign_id, earning_rule_id, opts = {})
|
@@ -607,7 +727,7 @@ module VoucherifySdk
|
|
607
727
|
# Disable Earning Rule
|
608
728
|
# Disable an earning rule.
|
609
729
|
# @param campaign_id [String] Unique campaign ID or name.
|
610
|
-
# @param earning_rule_id [String] Unique earning rule
|
730
|
+
# @param earning_rule_id [String] Unique identifier of an earning rule, assigned by Voucherify.
|
611
731
|
# @param [Hash] opts the optional parameters
|
612
732
|
# @return [Array<(LoyaltiesEarningRulesDisableResponseBody, Integer, Hash)>] LoyaltiesEarningRulesDisableResponseBody data, response status code and response headers
|
613
733
|
private def disable_earning_rule_with_http_info(campaign_id, earning_rule_id, opts = {})
|
@@ -657,7 +777,7 @@ module VoucherifySdk
|
|
657
777
|
# Enable Earning Rule
|
658
778
|
# Enable an earning rule.
|
659
779
|
# @param campaign_id [String] Unique campaign ID or name.
|
660
|
-
# @param earning_rule_id [String] Unique earning rule
|
780
|
+
# @param earning_rule_id [String] Unique identifier of an earning rule, assigned by Voucherify.
|
661
781
|
# @param [Hash] opts the optional parameters
|
662
782
|
# @return [LoyaltiesEarningRulesEnableResponseBody]
|
663
783
|
def enable_earning_rule(campaign_id, earning_rule_id, opts = {})
|
@@ -668,7 +788,7 @@ module VoucherifySdk
|
|
668
788
|
# Enable Earning Rule
|
669
789
|
# Enable an earning rule.
|
670
790
|
# @param campaign_id [String] Unique campaign ID or name.
|
671
|
-
# @param earning_rule_id [String] Unique earning rule
|
791
|
+
# @param earning_rule_id [String] Unique identifier of an earning rule, assigned by Voucherify.
|
672
792
|
# @param [Hash] opts the optional parameters
|
673
793
|
# @return [Array<(LoyaltiesEarningRulesEnableResponseBody, Integer, Hash)>] LoyaltiesEarningRulesEnableResponseBody data, response status code and response headers
|
674
794
|
private def enable_earning_rule_with_http_info(campaign_id, earning_rule_id, opts = {})
|
@@ -1333,6 +1453,74 @@ module VoucherifySdk
|
|
1333
1453
|
return data, status_code, headers
|
1334
1454
|
end
|
1335
1455
|
|
1456
|
+
# List Campaign Pending Points
|
1457
|
+
# >🚧 Beta endpoint The endpoint is behind a feature flag as it is still in development. Contact [Voucherify support](https://www.voucherify.io/contact-support) to unlock the feature for your organization. All current parameters and fields are listed and described. Lists all pending points that are currently assigned to all loyalty cards in a campaign. Once the points are added to the card, the entry is no longer returned.
|
1458
|
+
# @param campaign_id [String] Unique campaign ID.
|
1459
|
+
# @param [Hash] opts the optional parameters
|
1460
|
+
# @option opts [Integer] :limit Limit the number of the pending point entries that the API returns in the response.
|
1461
|
+
# @option opts [ParameterOrderListPendingPoints] :order Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.
|
1462
|
+
# @option opts [String] :starting_after_id A cursor for pagination. It retrieves the results starting after a result with the given ID.
|
1463
|
+
# @return [LoyaltiesPendingPointsListResponseBody]
|
1464
|
+
def list_campaign_pending_points(campaign_id, opts = {})
|
1465
|
+
data, _status_code, _headers = list_campaign_pending_points_with_http_info(campaign_id, opts)
|
1466
|
+
data
|
1467
|
+
end
|
1468
|
+
|
1469
|
+
# List Campaign Pending Points
|
1470
|
+
# >🚧 Beta endpoint The endpoint is behind a feature flag as it is still in development. Contact [Voucherify support](https://www.voucherify.io/contact-support) to unlock the feature for your organization. All current parameters and fields are listed and described. Lists all pending points that are currently assigned to all loyalty cards in a campaign. Once the points are added to the card, the entry is no longer returned.
|
1471
|
+
# @param campaign_id [String] Unique campaign ID.
|
1472
|
+
# @param [Hash] opts the optional parameters
|
1473
|
+
# @option opts [Integer] :limit Limit the number of the pending point entries that the API returns in the response.
|
1474
|
+
# @option opts [ParameterOrderListPendingPoints] :order Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.
|
1475
|
+
# @option opts [String] :starting_after_id A cursor for pagination. It retrieves the results starting after a result with the given ID.
|
1476
|
+
# @return [Array<(LoyaltiesPendingPointsListResponseBody, Integer, Hash)>] LoyaltiesPendingPointsListResponseBody data, response status code and response headers
|
1477
|
+
private def list_campaign_pending_points_with_http_info(campaign_id, opts = {})
|
1478
|
+
if @api_client.config.debugging
|
1479
|
+
@api_client.config.logger.debug 'Calling API: LoyaltiesApi.list_campaign_pending_points ...'
|
1480
|
+
end
|
1481
|
+
# resource path
|
1482
|
+
local_var_path = '/v1/loyalties/{campaignId}/pending-points'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
|
1483
|
+
|
1484
|
+
# query parameters
|
1485
|
+
query_params = opts[:query_params] || {}
|
1486
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1487
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
1488
|
+
query_params[:'starting_after_id'] = opts[:'starting_after_id'] if !opts[:'starting_after_id'].nil?
|
1489
|
+
|
1490
|
+
# header parameters
|
1491
|
+
header_params = opts[:header_params] || {}
|
1492
|
+
# HTTP header 'Accept' (if needed)
|
1493
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1494
|
+
|
1495
|
+
# form parameters
|
1496
|
+
form_params = opts[:form_params] || {}
|
1497
|
+
|
1498
|
+
# http body (model)
|
1499
|
+
post_body = opts[:debug_body]
|
1500
|
+
|
1501
|
+
# return_type
|
1502
|
+
return_type = opts[:debug_return_type] || 'LoyaltiesPendingPointsListResponseBody'
|
1503
|
+
|
1504
|
+
# auth_names
|
1505
|
+
auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
|
1506
|
+
|
1507
|
+
new_options = opts.merge(
|
1508
|
+
:operation => :"LoyaltiesApi.list_campaign_pending_points",
|
1509
|
+
:header_params => header_params,
|
1510
|
+
:query_params => query_params,
|
1511
|
+
:form_params => form_params,
|
1512
|
+
:body => post_body,
|
1513
|
+
:auth_names => auth_names,
|
1514
|
+
:return_type => return_type
|
1515
|
+
)
|
1516
|
+
|
1517
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1518
|
+
if @api_client.config.debugging
|
1519
|
+
@api_client.config.logger.debug "API called: LoyaltiesApi#list_campaign_pending_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1520
|
+
end
|
1521
|
+
return data, status_code, headers
|
1522
|
+
end
|
1523
|
+
|
1336
1524
|
# List Earning Rules
|
1337
1525
|
# Returns a list of all earning rules within a given campaign.
|
1338
1526
|
# @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
|
@@ -1995,6 +2183,144 @@ module VoucherifySdk
|
|
1995
2183
|
return data, status_code, headers
|
1996
2184
|
end
|
1997
2185
|
|
2186
|
+
# List Member Pending Points
|
2187
|
+
# >🚧 Beta endpoint The endpoint is behind a feature flag as it is still in development. Contact [Voucherify support](https://www.voucherify.io/contact-support) to unlock the feature for your organization. All current parameters and fields are listed and described. 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to list member pending points without having to provide the campaignId as a path parameter. Lists all pending points that are currently assigned to the loyalty card. Once the points are added to the card, the entry is no longer returned.
|
2188
|
+
# @param member_id [String] Unique loyalty card code assigned to a particular customer.
|
2189
|
+
# @param [Hash] opts the optional parameters
|
2190
|
+
# @option opts [Integer] :limit Limit the number of the pending point entries that the API returns in the response.
|
2191
|
+
# @option opts [ParameterOrderListPendingPoints] :order Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.
|
2192
|
+
# @option opts [String] :starting_after_id A cursor for pagination. It retrieves the results starting after a result with the given ID.
|
2193
|
+
# @return [LoyaltiesMembersPendingPointsListResponseBody]
|
2194
|
+
def list_member_pending_points(member_id, opts = {})
|
2195
|
+
data, _status_code, _headers = list_member_pending_points_with_http_info(member_id, opts)
|
2196
|
+
data
|
2197
|
+
end
|
2198
|
+
|
2199
|
+
# List Member Pending Points
|
2200
|
+
# >🚧 Beta endpoint The endpoint is behind a feature flag as it is still in development. Contact [Voucherify support](https://www.voucherify.io/contact-support) to unlock the feature for your organization. All current parameters and fields are listed and described. 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to list member pending points without having to provide the campaignId as a path parameter. Lists all pending points that are currently assigned to the loyalty card. Once the points are added to the card, the entry is no longer returned.
|
2201
|
+
# @param member_id [String] Unique loyalty card code assigned to a particular customer.
|
2202
|
+
# @param [Hash] opts the optional parameters
|
2203
|
+
# @option opts [Integer] :limit Limit the number of the pending point entries that the API returns in the response.
|
2204
|
+
# @option opts [ParameterOrderListPendingPoints] :order Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.
|
2205
|
+
# @option opts [String] :starting_after_id A cursor for pagination. It retrieves the results starting after a result with the given ID.
|
2206
|
+
# @return [Array<(LoyaltiesMembersPendingPointsListResponseBody, Integer, Hash)>] LoyaltiesMembersPendingPointsListResponseBody data, response status code and response headers
|
2207
|
+
private def list_member_pending_points_with_http_info(member_id, opts = {})
|
2208
|
+
if @api_client.config.debugging
|
2209
|
+
@api_client.config.logger.debug 'Calling API: LoyaltiesApi.list_member_pending_points ...'
|
2210
|
+
end
|
2211
|
+
# resource path
|
2212
|
+
local_var_path = '/v1/loyalties/members/{memberId}/pending-points'.sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
|
2213
|
+
|
2214
|
+
# query parameters
|
2215
|
+
query_params = opts[:query_params] || {}
|
2216
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
2217
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
2218
|
+
query_params[:'starting_after_id'] = opts[:'starting_after_id'] if !opts[:'starting_after_id'].nil?
|
2219
|
+
|
2220
|
+
# header parameters
|
2221
|
+
header_params = opts[:header_params] || {}
|
2222
|
+
# HTTP header 'Accept' (if needed)
|
2223
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2224
|
+
|
2225
|
+
# form parameters
|
2226
|
+
form_params = opts[:form_params] || {}
|
2227
|
+
|
2228
|
+
# http body (model)
|
2229
|
+
post_body = opts[:debug_body]
|
2230
|
+
|
2231
|
+
# return_type
|
2232
|
+
return_type = opts[:debug_return_type] || 'LoyaltiesMembersPendingPointsListResponseBody'
|
2233
|
+
|
2234
|
+
# auth_names
|
2235
|
+
auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
|
2236
|
+
|
2237
|
+
new_options = opts.merge(
|
2238
|
+
:operation => :"LoyaltiesApi.list_member_pending_points",
|
2239
|
+
:header_params => header_params,
|
2240
|
+
:query_params => query_params,
|
2241
|
+
:form_params => form_params,
|
2242
|
+
:body => post_body,
|
2243
|
+
:auth_names => auth_names,
|
2244
|
+
:return_type => return_type
|
2245
|
+
)
|
2246
|
+
|
2247
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2248
|
+
if @api_client.config.debugging
|
2249
|
+
@api_client.config.logger.debug "API called: LoyaltiesApi#list_member_pending_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2250
|
+
end
|
2251
|
+
return data, status_code, headers
|
2252
|
+
end
|
2253
|
+
|
2254
|
+
# List Member Pending Points
|
2255
|
+
# >🚧 Beta endpoint The endpoint is behind a feature flag as it is still in development. Contact [Voucherify support](https://www.voucherify.io/contact-support) to unlock the feature for your organization. All current parameters and fields are listed and described. Lists all pending points that are currently assigned to the loyalty card. Once the points are added to the card, the entry is no longer returned.
|
2256
|
+
# @param campaign_id [String] Unique campaign ID.
|
2257
|
+
# @param member_id [String] Unique loyalty card code assigned to a particular customer.
|
2258
|
+
# @param [Hash] opts the optional parameters
|
2259
|
+
# @option opts [Integer] :limit Limit the number of the pending point entries that the API returns in the response.
|
2260
|
+
# @option opts [ParameterOrderListPendingPoints] :order Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.
|
2261
|
+
# @option opts [String] :starting_after_id A cursor for pagination. It retrieves the results starting after a result with the given ID.
|
2262
|
+
# @return [LoyaltiesMembersPendingPointsListResponseBody]
|
2263
|
+
def list_member_pending_points1(campaign_id, member_id, opts = {})
|
2264
|
+
data, _status_code, _headers = list_member_pending_points1_with_http_info(campaign_id, member_id, opts)
|
2265
|
+
data
|
2266
|
+
end
|
2267
|
+
|
2268
|
+
# List Member Pending Points
|
2269
|
+
# >🚧 Beta endpoint The endpoint is behind a feature flag as it is still in development. Contact [Voucherify support](https://www.voucherify.io/contact-support) to unlock the feature for your organization. All current parameters and fields are listed and described. Lists all pending points that are currently assigned to the loyalty card. Once the points are added to the card, the entry is no longer returned.
|
2270
|
+
# @param campaign_id [String] Unique campaign ID.
|
2271
|
+
# @param member_id [String] Unique loyalty card code assigned to a particular customer.
|
2272
|
+
# @param [Hash] opts the optional parameters
|
2273
|
+
# @option opts [Integer] :limit Limit the number of the pending point entries that the API returns in the response.
|
2274
|
+
# @option opts [ParameterOrderListPendingPoints] :order Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.
|
2275
|
+
# @option opts [String] :starting_after_id A cursor for pagination. It retrieves the results starting after a result with the given ID.
|
2276
|
+
# @return [Array<(LoyaltiesMembersPendingPointsListResponseBody, Integer, Hash)>] LoyaltiesMembersPendingPointsListResponseBody data, response status code and response headers
|
2277
|
+
private def list_member_pending_points1_with_http_info(campaign_id, member_id, opts = {})
|
2278
|
+
if @api_client.config.debugging
|
2279
|
+
@api_client.config.logger.debug 'Calling API: LoyaltiesApi.list_member_pending_points1 ...'
|
2280
|
+
end
|
2281
|
+
# resource path
|
2282
|
+
local_var_path = '/v1/loyalties/{campaignId}/members/{memberId}/pending-points'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
|
2283
|
+
|
2284
|
+
# query parameters
|
2285
|
+
query_params = opts[:query_params] || {}
|
2286
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
2287
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
2288
|
+
query_params[:'starting_after_id'] = opts[:'starting_after_id'] if !opts[:'starting_after_id'].nil?
|
2289
|
+
|
2290
|
+
# header parameters
|
2291
|
+
header_params = opts[:header_params] || {}
|
2292
|
+
# HTTP header 'Accept' (if needed)
|
2293
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2294
|
+
|
2295
|
+
# form parameters
|
2296
|
+
form_params = opts[:form_params] || {}
|
2297
|
+
|
2298
|
+
# http body (model)
|
2299
|
+
post_body = opts[:debug_body]
|
2300
|
+
|
2301
|
+
# return_type
|
2302
|
+
return_type = opts[:debug_return_type] || 'LoyaltiesMembersPendingPointsListResponseBody'
|
2303
|
+
|
2304
|
+
# auth_names
|
2305
|
+
auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
|
2306
|
+
|
2307
|
+
new_options = opts.merge(
|
2308
|
+
:operation => :"LoyaltiesApi.list_member_pending_points1",
|
2309
|
+
:header_params => header_params,
|
2310
|
+
:query_params => query_params,
|
2311
|
+
:form_params => form_params,
|
2312
|
+
:body => post_body,
|
2313
|
+
:auth_names => auth_names,
|
2314
|
+
:return_type => return_type
|
2315
|
+
)
|
2316
|
+
|
2317
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2318
|
+
if @api_client.config.debugging
|
2319
|
+
@api_client.config.logger.debug "API called: LoyaltiesApi#list_member_pending_points1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2320
|
+
end
|
2321
|
+
return data, status_code, headers
|
2322
|
+
end
|
2323
|
+
|
1998
2324
|
# List Member Rewards
|
1999
2325
|
# Retrieves the list of rewards that the given customer (identified by member_id, which is a loyalty card assigned to a particular customer) **can get in exchange for loyalty points**. You can use the affordable_only parameter to limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Please note that rewards that are disabled (i.e. set to Not Available in the Dashboard) for a given loyalty tier reward mapping will not be returned in this endpoint.
|
2000
2326
|
# @param member_id [String] Unique loyalty card assigned to a particular customer.
|
@@ -2140,7 +2466,7 @@ module VoucherifySdk
|
|
2140
2466
|
return data, status_code, headers
|
2141
2467
|
end
|
2142
2468
|
|
2143
|
-
#
|
2469
|
+
# List Loyalty Card Point Expiration
|
2144
2470
|
# Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.
|
2145
2471
|
# @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
|
2146
2472
|
# @param member_id [String] Loyalty card code.
|
@@ -2153,7 +2479,7 @@ module VoucherifySdk
|
|
2153
2479
|
data
|
2154
2480
|
end
|
2155
2481
|
|
2156
|
-
#
|
2482
|
+
# List Loyalty Card Point Expiration
|
2157
2483
|
# Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.
|
2158
2484
|
# @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
|
2159
2485
|
# @param member_id [String] Loyalty card code.
|
@@ -0,0 +1,219 @@
|
|
1
|
+
=begin
|
2
|
+
#Voucherify API
|
3
|
+
|
4
|
+
#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v2018-08-01
|
7
|
+
Contact: support@voucherify.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module VoucherifySdk
|
17
|
+
# Assigns or unassigns an area or store to the campaign. **NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
|
18
|
+
class AccessSettings
|
19
|
+
attr_accessor :assign
|
20
|
+
|
21
|
+
attr_accessor :unassign
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'assign' => :'assign',
|
27
|
+
:'unassign' => :'unassign'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Returns all the JSON keys this model knows about
|
32
|
+
def self.acceptable_attributes
|
33
|
+
attribute_map.values
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'assign' => :'AccessSettingsAssign',
|
40
|
+
:'unassign' => :'AccessSettingsUnassign'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# List of attributes with nullable: true
|
45
|
+
def self.openapi_nullable
|
46
|
+
Set.new([
|
47
|
+
:'assign',
|
48
|
+
:'unassign'
|
49
|
+
])
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'assign')
|
61
|
+
self.assign = attributes[:'assign']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.key?(:'unassign')
|
65
|
+
self.unassign = attributes[:'unassign']
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
70
|
+
# @return Array for valid properties with the reasons
|
71
|
+
def list_invalid_properties
|
72
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
73
|
+
invalid_properties = Array.new
|
74
|
+
invalid_properties
|
75
|
+
end
|
76
|
+
|
77
|
+
# Check to see if the all the properties in the model are valid
|
78
|
+
# @return true if the model is valid
|
79
|
+
def valid?
|
80
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
81
|
+
true
|
82
|
+
end
|
83
|
+
|
84
|
+
# Checks equality by comparing each attribute.
|
85
|
+
# @param [Object] Object to be compared
|
86
|
+
def ==(o)
|
87
|
+
return true if self.equal?(o)
|
88
|
+
self.class == o.class &&
|
89
|
+
assign == o.assign &&
|
90
|
+
unassign == o.unassign
|
91
|
+
end
|
92
|
+
|
93
|
+
# @see the `==` method
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def eql?(o)
|
96
|
+
self == o
|
97
|
+
end
|
98
|
+
|
99
|
+
# Calculates hash code according to all attributes.
|
100
|
+
# @return [Integer] Hash code
|
101
|
+
def hash
|
102
|
+
[assign, unassign].hash
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def self.build_from_hash(attributes)
|
109
|
+
return nil unless attributes.is_a?(Hash)
|
110
|
+
attributes = attributes.transform_keys(&:to_sym)
|
111
|
+
transformed_hash = {}
|
112
|
+
openapi_types.each_pair do |key, type|
|
113
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
114
|
+
transformed_hash["#{key}"] = nil
|
115
|
+
elsif type =~ /\AArray<(.*)>/i
|
116
|
+
# check to ensure the input is an array given that the attribute
|
117
|
+
# is documented as an array but the input is not
|
118
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
119
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
120
|
+
end
|
121
|
+
elsif !attributes[attribute_map[key]].nil?
|
122
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
123
|
+
end
|
124
|
+
end
|
125
|
+
new(transformed_hash)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def self._deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :Time
|
135
|
+
Time.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :Boolean
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
# models (e.g. Pet) or oneOf
|
166
|
+
klass = VoucherifySdk.const_get(type)
|
167
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|