Class: VoucherifySdk::LoyaltiesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/VoucherifySdk/api/loyalties_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ LoyaltiesApi

Returns a new instance of LoyaltiesApi.



19
20
21
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#activate_member_pending_points(member_id, pending_points_id, opts = {}) ⇒ LoyaltiesMembersPendingPointsActivateResponseBody

Activate Member Pending Points 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. 👍 Configuring pending points Pending points are configured as part of an earning rule with POST Create earning rule or PUT Update earning rule.

Parameters:

  • member_id (String)

    Unique loyalty card code assigned to a particular customer.

  • pending_points_id (String)

    Unique pending point identifier, assigned by Voucherify.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



28
29
30
31
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 28

def activate_member_pending_points(member_id, pending_points_id, opts = {})
  data, _status_code, _headers = activate_member_pending_points_with_http_info(member_id, pending_points_id, opts)
  data
end

#add_member(campaign_id, opts = {}) ⇒ LoyaltiesMembersCreateResponseBody

Add Member 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.

Parameters:

  • campaign_id (String)

    Unique campaign ID of the loyalty program.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :loyalties_members_create_request_body (LoyaltiesMembersCreateRequestBody)

    Provide details to whom the loyalty card should be assigned. You can choose to either specify the exact loyalty card code that you want to publish from existin (non-assigned) codes, or choose not to specify a voucher code. If you choose not to specify a code in the request paylaod, then the system will choose the next available voucher code available to be assigned to a customer. You can also include metadata in the request payload. This metadata will be assigned to the publication object, but will not be returned in the response to this endpoint. To see of publications (assignments of particular codes to customers) and publication metadata, use the List Publications endpoint.

Returns:



89
90
91
92
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 89

def add_member(campaign_id, opts = {})
  data, _status_code, _headers = add_member_with_http_info(campaign_id, opts)
  data
end

#adjust_member_pending_points(member_id, pending_points_id, opts = {}) ⇒ LoyaltiesMembersPendingPointsBalanceResponseBody

Adjust Member Pending Points Adjusts the pending points with a given ID. You can add or subtract the number of points. 👍 Configuring pending points Pending points are configured as part of an earning rule with POST Create earning rule or PUT Update earning rule.

Parameters:

  • member_id (String)

    Unique loyalty card code assigned to a particular customer.

  • pending_points_id (String)

    Unique pending point identifier, assigned by Voucherify.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



156
157
158
159
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 156

def adjust_member_pending_points(member_id, pending_points_id, opts = {})
  data, _status_code, _headers = adjust_member_pending_points_with_http_info(member_id, pending_points_id, opts)
  data
end

#cancel_member_pending_points(member_id, pending_points_id, opts = {}) ⇒ nil

Cancel Member Pending Points 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. 👍 Configuring pending points Pending points are configured as part of an earning rule with POST Create earning rule or PUT Update earning rule.

Parameters:

  • member_id (String)

    Unique loyalty card code assigned to a particular customer.

  • pending_points_id (String)

    Unique pending point identifier, assigned by Voucherify.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


223
224
225
226
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 223

def cancel_member_pending_points(member_id, pending_points_id, opts = {})
  cancel_member_pending_points_with_http_info(member_id, pending_points_id, opts)
  nil
end

#create_earning_rule(campaign_id, opts = {}) ⇒ Array<LoyaltiesEarningRulesCreateResponseBody>

Create Earning Rule Create earning rules for a loyalty campaign. 🚧 Maximum number of earning rules You can create up to 100 earning rules per project. The limit can be customized for clients with a single-tenant setup.

Parameters:

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :loyalties_earning_rules_create_request_body_item (Array<LoyaltiesEarningRulesCreateRequestBodyItem>)

    Customize the request body based on the type of earning rules you would like to create. The request body is an array of objects. The required minimum properties to include in the payload for each object are event and loyalty. Additionally, if you choose to add a validity_timeframe, you must include a start_date. Furthermore, an earning rule event type: - customer.segment.entered requires a segment object - a custom event requires a custom_event object - a customer.loyalty.tier.joined, customer.loyalty.tier.left, customer.loyalty.tier.upgraded, customer.loyalty.tier.downgraded, customer.loyalty.tier.prolonged requires a loyalty_tier object

Returns:



282
283
284
285
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 282

def create_earning_rule(campaign_id, opts = {})
  data, _status_code, _headers = create_earning_rule_with_http_info(campaign_id, opts)
  data
end

#create_in_bulk_loyalty_tiers(campaign_id, opts = {}) ⇒ Array<LoyaltyTier>

Create loyalty tiers Creates loyalty tiers for desired campaign.

Parameters:

  • campaign_id (String)

    Unique loyalty campaign ID or name.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



348
349
350
351
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 348

def create_in_bulk_loyalty_tiers(campaign_id, opts = {})
  data, _status_code, _headers = create_in_bulk_loyalty_tiers_with_http_info(campaign_id, opts)
  data
end

#create_loyalty_program(opts = {}) ⇒ LoyaltiesCreateCampaignResponseBody

Create Loyalty Campaign Creates a batch of loyalty cards aggregated in a single loyalty campaign. It also allows you to define a custom codes pattern. 📘 Global uniqueness All codes are unique across the whole project. Voucherify wont allow to generate the same codes in any of your campaigns. 🚧 Asynchronous action! This is an asynchronous action, you cant read or modify a newly created campaign until the code generation is completed. See creation_status field in the loyalty campaign object description.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



413
414
415
416
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 413

def create_loyalty_program(opts = {})
  data, _status_code, _headers = create_loyalty_program_with_http_info(opts)
  data
end

#create_points_expiration_export(campaign_id, opts = {}) ⇒ LoyaltiesPointsExpirationExportCreateResponseBody

Export Loyalty Campaign Point Expiration Schedule the generation of a point expiration CSV file for a particular campaign. It can list point buckets, which can have an ACTIVE or EXPIRED status.

Parameters:

  • campaign_id (String)

    Unique campaign ID or name.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



478
479
480
481
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 478

def create_points_expiration_export(campaign_id, opts = {})
  data, _status_code, _headers = create_points_expiration_export_with_http_info(campaign_id, opts)
  data
end

#create_reward_assignment1(campaign_id, opts = {}) ⇒ LoyaltiesRewardsCreateAssignmentResponseBody

Create Loyalty Campaign Reward Assignment Add rewards to a loyalty campaign.

Parameters:

  • campaign_id (String)

    Unique 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



544
545
546
547
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 544

def create_reward_assignment1(campaign_id, opts = {})
  data, _status_code, _headers = create_reward_assignment1_with_http_info(campaign_id, opts)
  data
end

#delete_earning_rule(campaign_id, earning_rule_id, opts = {}) ⇒ nil

Delete Earning Rule This method deletes an earning rule for a specific loyalty campaign.

Parameters:

  • 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.

  • earning_rule_id (String)

    A unique earning rule ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


610
611
612
613
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 610

def delete_earning_rule(campaign_id, earning_rule_id, opts = {})
  delete_earning_rule_with_http_info(campaign_id, earning_rule_id, opts)
  nil
end

#delete_loyalty_program(campaign_id, opts = {}) ⇒ LoyaltiesDeleteResponseBody

Delete Loyalty Campaign Deletes a loyalty campaign and all related loyalty cards. This action cannot be undone. Also, it immediately removes any redemptions on loyalty cards. If the force parameter is set to false or not set at all, the loyalty campaign and all related loyalty cards will be moved to the bin.

Parameters:

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :force (Boolean)

    If this flag is set to true, the campaign and related vouchers will be removed permanently. If it is set to false or not set at all, the loyalty campaign and all related loyalty cards will be moved to the bin. Going forward, the user will be able to create the next campaign with the same name.

Returns:



669
670
671
672
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 669

def delete_loyalty_program(campaign_id, opts = {})
  data, _status_code, _headers = delete_loyalty_program_with_http_info(campaign_id, opts)
  data
end

#delete_reward_assignment1(campaign_id, assignment_id, opts = {}) ⇒ nil

Delete Campaign Reward Assignment This method deletes a reward assignment for a particular loyalty campaign.

Parameters:

  • 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.

  • assignment_id (String)

    A unique reward assignment ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


731
732
733
734
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 731

def delete_reward_assignment1(campaign_id, assignment_id, opts = {})
  delete_reward_assignment1_with_http_info(campaign_id, assignment_id, opts)
  nil
end

#disable_earning_rule(campaign_id, earning_rule_id, opts = {}) ⇒ LoyaltiesEarningRulesDisableResponseBody

Disable Earning Rule Disable an earning rule.

Parameters:

  • campaign_id (String)

    Unique campaign ID or name.

  • earning_rule_id (String)

    Unique identifier of an earning rule, assigned by Voucherify.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



790
791
792
793
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 790

def disable_earning_rule(campaign_id, earning_rule_id, opts = {})
  data, _status_code, _headers = disable_earning_rule_with_http_info(campaign_id, earning_rule_id, opts)
  data
end

#enable_earning_rule(campaign_id, earning_rule_id, opts = {}) ⇒ LoyaltiesEarningRulesEnableResponseBody

Enable Earning Rule Enable an earning rule.

Parameters:

  • campaign_id (String)

    Unique campaign ID or name.

  • earning_rule_id (String)

    Unique identifier of an earning rule, assigned by Voucherify.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



851
852
853
854
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 851

def enable_earning_rule(campaign_id, earning_rule_id, opts = {})
  data, _status_code, _headers = enable_earning_rule_with_http_info(campaign_id, earning_rule_id, opts)
  data
end

#export_loyalty_campaign_transactions(campaign_id, opts = {}) ⇒ CampaignsTransactionsExportCreateResponseBody

Export Loyalty Campaign Transactions Export transactions is an asynchronous process that generates a CSV file with the data about or point movements on all loyalty cards in a given campaign. To export transactions: 1. In the export request, use parameters to select which fields will be exported, in what order, and which data will be filtered. 2. Use the returned id to track the export status with the GET Export method. 3. In the GET Export method, when the returned status field has the DONE value, the export file has been generated. 4. Use the URL in the result property to download the file. You must be logged to your Voucherify account on a given cluster in the browser to be able to download the file. An export request will almost always result in a single file being generated by the system. However, when the data volume is large, the system may split the results into multiple files. An example export file can look as follows: 👍 Export Campaign Transactions This method works in the same way the POST Export Campaign Transactions does, but it is limited to loyalty campaigns only. The POST Export Campaign Transactions method can also export gift card campaign transactions.

Parameters:

  • campaign_id (String)

    You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



912
913
914
915
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 912

def export_loyalty_campaign_transactions(campaign_id, opts = {})
  data, _status_code, _headers = export_loyalty_campaign_transactions_with_http_info(campaign_id, opts)
  data
end

#export_loyalty_card_transactions(member_id, opts = {}) ⇒ LoyaltiesMembersTransactionsExportCreateResponseBody

Export Loyalty Card Transactions Export transactions that are associated with point movements on a loyalty card.

Parameters:

  • member_id (String)

    A unique code identifying the loyalty card that you are looking to export transaction data for.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



978
979
980
981
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 978

def export_loyalty_card_transactions(member_id, opts = {})
  data, _status_code, _headers = export_loyalty_card_transactions_with_http_info(member_id, opts)
  data
end

#export_loyalty_card_transactions1(campaign_id, member_id, opts = {}) ⇒ LoyaltiesMembersTransactionsExportCreateResponseBody

Export Loyalty Card Transactions with campaign ID Export transactions that are associated with point movements on a loyalty card.

Parameters:

  • campaign_id (String)

    A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to export.

  • member_id (String)

    A unique code identifying the loyalty card that you are looking to export transaction data for.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1045
1046
1047
1048
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1045

def export_loyalty_card_transactions1(campaign_id, member_id, opts = {})
  data, _status_code, _headers = export_loyalty_card_transactions1_with_http_info(campaign_id, member_id, opts)
  data
end

#get_earning_rule(campaign_id, earning_rule_id, opts = {}) ⇒ LoyaltiesEarningRulesGetResponseBody

Get Earning Rule Retrieves an earning rule assigned to a campaign.

Parameters:

  • 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.

  • earning_rule_id (String)

    A unique earning rule ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1112
1113
1114
1115
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1112

def get_earning_rule(campaign_id, earning_rule_id, opts = {})
  data, _status_code, _headers = get_earning_rule_with_http_info(campaign_id, earning_rule_id, opts)
  data
end

#get_loyalty_program(campaign_id, opts = {}) ⇒ LoyaltiesGetCampaignResponseBody

Get Loyalty Campaign Retrieve a specific loyalty campaign.

Parameters:

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1172
1173
1174
1175
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1172

def get_loyalty_program(campaign_id, opts = {})
  data, _status_code, _headers = get_loyalty_program_with_http_info(campaign_id, opts)
  data
end

#get_loyalty_tier(campaign_id, loyalty_tier_id, opts = {}) ⇒ LoyaltiesTiersGetResponseBody

Get Loyalty Tier Retrieve a loyalty tier from a loyalty campaign by the loyalty tier ID.

Parameters:

  • campaign_id (String)

    Unique loyalty campaign ID or name.

  • loyalty_tier_id (String)

    Unique loyalty tier ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1232
1233
1234
1235
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1232

def get_loyalty_tier(campaign_id, loyalty_tier_id, opts = {})
  data, _status_code, _headers = get_loyalty_tier_with_http_info(campaign_id, loyalty_tier_id, opts)
  data
end

#get_member(member_id, opts = {}) ⇒ LoyaltiesMembersGetResponseBody

Get Member Retrieve loyalty card with the given member ID (i.e. voucher code). 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to allow you to retrieve loyalty card details without having to provide the campaignId as a path parameter.

Parameters:

  • member_id (String)

    Unique loyalty card code assigned to a particular customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1292
1293
1294
1295
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1292

def get_member(member_id, opts = {})
  data, _status_code, _headers = get_member_with_http_info(member_id, opts)
  data
end

#get_member1(campaign_id, member_id, opts = {}) ⇒ LoyaltiesMembersGetResponseBody

Get Member with campaign ID Retrieves the loyalty card with the given member ID (i.e. voucher code).

Parameters:

  • campaign_id (String)

    Unique campaign ID.

  • member_id (String)

    Unique code that identifies the loyalty card.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1352
1353
1354
1355
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1352

def get_member1(campaign_id, member_id, opts = {})
  data, _status_code, _headers = get_member1_with_http_info(campaign_id, member_id, opts)
  data
end

#get_reward_assignment1(campaign_id, assignment_id, opts = {}) ⇒ LoyaltiesRewardAssignmentsGetResponseBody

Get Campaign Reward Assignments Retrieve specific reward assignment.

Parameters:

  • 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.

  • assignment_id (String)

    Unique reward assignment ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1413
1414
1415
1416
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1413

def get_reward_assignment1(campaign_id, assignment_id, opts = {})
  data, _status_code, _headers = get_reward_assignment1_with_http_info(campaign_id, assignment_id, opts)
  data
end

#get_reward_assignment2(campaign_id, assignment_id, opts = {}) ⇒ LoyaltiesRewardsGetResponseBody

Get Campaign Reward Assignment Retrieve specific reward assignment. 📘 Alternative endpoint This endpoint is an alternative to this endpoint.

Parameters:

  • 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.

  • assignment_id (String)

    A unique reward assignment ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1474
1475
1476
1477
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1474

def get_reward_assignment2(campaign_id, assignment_id, opts = {})
  data, _status_code, _headers = get_reward_assignment2_with_http_info(campaign_id, assignment_id, opts)
  data
end

#get_reward_details(campaign_id, assignment_id, opts = {}) ⇒ LoyaltiesRewardAssignmentsRewardGetResponseBody

Get Reward Details Get reward details in the context of a loyalty campaign and reward assignment ID.

Parameters:

  • 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.

  • assignment_id (String)

    Unique reward assignment ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1535
1536
1537
1538
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1535

def get_reward_details(campaign_id, assignment_id, opts = {})
  data, _status_code, _headers = get_reward_details_with_http_info(campaign_id, assignment_id, opts)
  data
end

#list_campaign_pending_points(campaign_id, opts = {}) ⇒ LoyaltiesPendingPointsListResponseBody

List Campaign Pending Points 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. 👍 Configuring pending points Pending points are configured as part of an earning rule with POST Create earning rule or PUT Update earning rule.

Parameters:

  • campaign_id (String)

    Unique campaign ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limit the number of the pending point entries that the API returns in the response.

  • :order (ParameterOrderListPendingPoints)

    Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.

  • :starting_after_id (String)

    A cursor for pagination. It retrieves the results starting after a result with the given ID.

Returns:



1598
1599
1600
1601
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1598

def list_campaign_pending_points(campaign_id, opts = {})
  data, _status_code, _headers = list_campaign_pending_points_with_http_info(campaign_id, opts)
  data
end

#list_earning_rules(campaign_id, opts = {}) ⇒ LoyaltiesEarningRulesListResponseBody

List Earning Rules Returns a list of all earning rules within a given campaign.

Parameters:

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :page (Integer)

    Which page of results to return. The lowest value is 1.

  • :order (ParameterOrderListEarningRules)

    Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

Returns:



1666
1667
1668
1669
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1666

def list_earning_rules(campaign_id, opts = {})
  data, _status_code, _headers = list_earning_rules_with_http_info(campaign_id, opts)
  data
end

#list_loyalty_campaign_transactions(campaign_id, opts = {}) ⇒ LoyaltiesTransactionsListResponseBody

List Loyalty Campaign Transactions Retrieves all transactions for the campaign with the given campaign ID or campaign name.

Parameters:

  • campaign_id (String)

    You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :order (ParameterOrderListTransactions)

    Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

  • :starting_after_id (String)

    A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID.

  • :filters (ParametersFiltersListCampaignTransactions)

    Filters for listing responses. The id filter denotes the unique transaction identifier.

Returns:



1735
1736
1737
1738
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1735

def list_loyalty_campaign_transactions(campaign_id, opts = {})
  data, _status_code, _headers = list_loyalty_campaign_transactions_with_http_info(campaign_id, opts)
  data
end

#list_loyalty_card_transactions(member_id, opts = {}) ⇒ LoyaltiesMembersTransactionsListResponseBody

List Loyalty Card Transactions Retrieve transaction data related to point movements for a specific loyalty card.

Parameters:

  • member_id (String)

    A unique code identifying the loyalty card that you are looking to retrieve transaction data for.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :order (ParameterOrderListTransactions)

    Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

  • :starting_after_id (String)

    A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID.

Returns:



1805
1806
1807
1808
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1805

def list_loyalty_card_transactions(member_id, opts = {})
  data, _status_code, _headers = list_loyalty_card_transactions_with_http_info(member_id, opts)
  data
end

#list_loyalty_card_transactions1(campaign_id, member_id, opts = {}) ⇒ LoyaltiesMembersTransactionsListResponseBody

List Loyalty Card Transactions with campaign ID Retrieve transaction data related to point movements for a specific loyalty card.

Parameters:

  • campaign_id (String)

    A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to return.

  • member_id (String)

    A unique code identifying the loyalty card that you are looking to retrieve transaction data for.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :order (ParameterOrderListTransactions)

    Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

  • :starting_after_id (String)

    A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID.

Returns:



1874
1875
1876
1877
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1874

def list_loyalty_card_transactions1(campaign_id, member_id, opts = {})
  data, _status_code, _headers = list_loyalty_card_transactions1_with_http_info(campaign_id, member_id, opts)
  data
end

#list_loyalty_programs(opts = {}) ⇒ LoyaltiesListCampaignsResponseBody

List Loyalty Campaigns Returns a list of your loyalty campaigns.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :page (Integer)

    Which page of results to return. The lowest value is 1.

  • :order (ParameterOrderListCampaigns)

    Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

Returns:



1942
1943
1944
1945
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 1942

def list_loyalty_programs(opts = {})
  data, _status_code, _headers = list_loyalty_programs_with_http_info(opts)
  data
end

#list_loyalty_tier_earning_rules(campaign_id, loyalty_tier_id, opts = {}) ⇒ LoyaltiesTiersEarningRulesListResponseBody

List Loyalty Tier Earning Rules Retrieve available earning rules for a given tier and the calculation method for earning points.

Parameters:

  • campaign_id (String)

    Unique campaign ID or name.

  • loyalty_tier_id (String)

    Unique loyalty tier ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :page (Integer)

    Which page of results to return. The lowest value is 1.

Returns:



2009
2010
2011
2012
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2009

def list_loyalty_tier_earning_rules(campaign_id, loyalty_tier_id, opts = {})
  data, _status_code, _headers = list_loyalty_tier_earning_rules_with_http_info(campaign_id, loyalty_tier_id, opts)
  data
end

#list_loyalty_tier_rewards(campaign_id, loyalty_tier_id, opts = {}) ⇒ LoyaltiesTiersRewardsListResponseBody

List Loyalty Tier Rewards Get available rewards for a given tier.

Parameters:

  • campaign_id (String)

    Unique campaign ID or name.

  • loyalty_tier_id (String)

    Unique loyalty tier ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2074
2075
2076
2077
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2074

def list_loyalty_tier_rewards(campaign_id, loyalty_tier_id, opts = {})
  data, _status_code, _headers = list_loyalty_tier_rewards_with_http_info(campaign_id, loyalty_tier_id, opts)
  data
end

#list_loyalty_tiers(campaign_id, opts = {}) ⇒ LoyaltiesTiersListResponseBody

List Loyalty Tiers Retrieve a list of loyalty tiers which were added to the loyalty program.

Parameters:

  • campaign_id (String)

    Unique loyalty campaign ID or name.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :order (ParameterOrderListLoyaltyTiers)

    Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

Returns:



2136
2137
2138
2139
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2136

def list_loyalty_tiers(campaign_id, opts = {})
  data, _status_code, _headers = list_loyalty_tiers_with_http_info(campaign_id, opts)
  data
end

#list_member_activity(member_id, opts = {}) ⇒ LoyaltiesMemberActivityListResponseBody

List Member Activity 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to allow you to get member activities without having to provide the campaignId as a path parameter. Retrieves the list of activities for the given member ID related to a voucher and customer who is the holder of the voucher.

Parameters:

  • member_id (String)

    Unique loyalty card assigned to a particular customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :order (ParameterOrderCreatedAt)

    Apply this filter to order the events according the date and time when it was created. The dash - preceding a sorting option means sorting in a descending order.

  • :starting_after_id (String)

    A cursor for pagination. It retrieves the events starting after an event with the given ID.

Returns:



2202
2203
2204
2205
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2202

def list_member_activity(member_id, opts = {})
  data, _status_code, _headers = list_member_activity_with_http_info(member_id, opts)
  data
end

#list_member_activity1(campaign_id, member_id, opts = {}) ⇒ LoyaltiesMemberActivityListResponseBody

List Member Activity with campaign ID Retrieves the list of activities for the given member ID related to a voucher and customer who is the holder of the voucher.

Parameters:

  • campaign_id (String)

    Unique campaign ID.

  • member_id (String)

    A code that identifies the loyalty card.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :order (ParameterOrderCreatedAt)

    Apply this filter to order the events according the date and time when it was created. The dash - preceding a sorting option means sorting in a descending order.

  • :starting_after_id (String)

    A cursor for pagination. It retrieves the events starting after an event with the given ID.

Returns:



2271
2272
2273
2274
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2271

def list_member_activity1(campaign_id, member_id, opts = {})
  data, _status_code, _headers = list_member_activity1_with_http_info(campaign_id, member_id, opts)
  data
end

#list_member_loyalty_tier(member_id, opts = {}) ⇒ LoyaltiesMembersTiersListResponseBody

List Member's Loyalty Tiers Retrieve member tiers using the loyalty card ID.

Parameters:

  • member_id (String)

    Unique loyalty card assigned to a particular customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2337
2338
2339
2340
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2337

def list_member_loyalty_tier(member_id, opts = {})
  data, _status_code, _headers = list_member_loyalty_tier_with_http_info(member_id, opts)
  data
end

#list_member_pending_points(member_id, opts = {}) ⇒ LoyaltiesMembersPendingPointsListResponseBody

List Member Pending Points 📘 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. 👍 Configuring pending points Pending points are configured as part of an earning rule with POST Create earning rule or PUT Update earning rule.

Parameters:

  • member_id (String)

    Unique loyalty card code assigned to a particular customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limit the number of the pending point entries that the API returns in the response.

  • :order (ParameterOrderListPendingPoints)

    Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.

  • :starting_after_id (String)

    A cursor for pagination. It retrieves the results starting after a result with the given ID.

Returns:



2399
2400
2401
2402
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2399

def list_member_pending_points(member_id, opts = {})
  data, _status_code, _headers = list_member_pending_points_with_http_info(member_id, opts)
  data
end

#list_member_pending_points1(campaign_id, member_id, opts = {}) ⇒ LoyaltiesMembersPendingPointsListResponseBody

List Member Pending Points with campaign ID 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. 👍 Configuring pending points Pending points are configured as part of an earning rule with POST Create earning rule or PUT Update earning rule.

Parameters:

  • campaign_id (String)

    Unique campaign ID.

  • member_id (String)

    Unique loyalty card code assigned to a particular customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limit the number of the pending point entries that the API returns in the response.

  • :order (ParameterOrderListPendingPoints)

    Orders the pending point entries according the pending point entry ID. The dash - preceding a sorting option means sorting in a descending order.

  • :starting_after_id (String)

    A cursor for pagination. It retrieves the results starting after a result with the given ID.

Returns:



2468
2469
2470
2471
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2468

def list_member_pending_points1(campaign_id, member_id, opts = {})
  data, _status_code, _headers = list_member_pending_points1_with_http_info(campaign_id, member_id, opts)
  data
end

#list_member_rewards(member_id, opts = {}) ⇒ LoyaltiesMembersRewardsListResponseBody

List Member Rewards 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.

Parameters:

  • member_id (String)

    Unique loyalty card assigned to a particular customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :affordable_only (Boolean)

    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). Set this flag to true to return rewards which the customer can actually afford.

Returns:



2535
2536
2537
2538
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2535

def list_member_rewards(member_id, opts = {})
  data, _status_code, _headers = list_member_rewards_with_http_info(member_id, opts)
  data
end

#list_members(campaign_id, opts = {}) ⇒ LoyaltiesListMembersResponseBody

List Members Returns a list of your loyalty cards. The loyalty cards are sorted by creation date, with the most recent loyalty cards appearing first.

Parameters:

  • campaign_id (String)

    Unique campaign ID of the loyalty program.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :page (Integer)

    Which page of results to return. The lowest value is 1.

  • :customer (String)

    A tracking identifier of a customer who is the holder of the vouchers. It can be an id generated by Voucherify or the source_id. Remember to use the proper URL escape codes if the source_id contains special characters.

  • :created_at (ParameterCreatedBeforeAfter)

    A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z

  • :updated_at (ParameterUpdatedBeforeAfter)

    A filter on the list based on the object updated_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [updated_at][before] 2017-09-08T13:52:18.227Z

  • :order (ParameterOrderVouchers)

    Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

  • :code (String)
  • :ids (Array<String>)

Returns:



2604
2605
2606
2607
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2604

def list_members(campaign_id, opts = {})
  data, _status_code, _headers = list_members_with_http_info(campaign_id, opts)
  data
end

#list_points_expiration(campaign_id, member_id, opts = {}) ⇒ LoyaltiesMembersPointsExpirationListResponseBody

List Loyalty Card Point Expiration 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.

Parameters:

  • 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.

  • member_id (String)

    Loyalty card code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :page (Integer)

    Which page of results to return. The lowest value is 1.

Returns:



2682
2683
2684
2685
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2682

def list_points_expiration(campaign_id, member_id, opts = {})
  data, _status_code, _headers = list_points_expiration_with_http_info(campaign_id, member_id, opts)
  data
end

#list_reward_assignments1(campaign_id, opts = {}) ⇒ LoyaltiesRewardAssignmentsListResponseBody

List Reward Assignments with campaign ID Returns reward assignments from a given loyalty campaign. 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to be more contextual to the type of data returned in the response.

Parameters:

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :page (Integer)

    Which page of results to return. The lowest value is 1.

  • :assignment_id (String)

    A unique reward assignment ID.

Returns:



2749
2750
2751
2752
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2749

def list_reward_assignments1(campaign_id, opts = {})
  data, _status_code, _headers = list_reward_assignments1_with_http_info(campaign_id, opts)
  data
end

#list_reward_assignments2(campaign_id, opts = {}) ⇒ LoyaltiesRewardsListAssignmentsResponseBody

List Campaign Rewards Returns active rewards from a given loyalty campaign.

Parameters:

  • campaign_id (String)

    Unique 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :page (Integer)

    Which page of results to return. The lowest value is 1.

  • :assignment_id (String)

    A unique reward assignment ID.

Returns:



2817
2818
2819
2820
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2817

def list_reward_assignments2(campaign_id, opts = {})
  data, _status_code, _headers = list_reward_assignments2_with_http_info(campaign_id, opts)
  data
end

#redeem_reward(member_id, opts = {}) ⇒ LoyaltiesMembersRedemptionRedeemResponseBody

Redeem Reward 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to allow you to redeem a reward without having to provide the campaignId as a path parameter.

Parameters:

  • member_id (String)

    Unique loyalty card assigned to a particular customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :loyalties_members_redemption_redeem_request_body (LoyaltiesMembersRedemptionRedeemRequestBody)

    Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order.

Returns:



2883
2884
2885
2886
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2883

def redeem_reward(member_id, opts = {})
  data, _status_code, _headers = redeem_reward_with_http_info(member_id, opts)
  data
end

#redeem_reward1(campaign_id, member_id, opts = {}) ⇒ LoyaltiesMembersRedemptionRedeemResponseBody

Redeem Reward with campaign ID Exchange points from a loyalty card for a specified reward. This API method returns an assigned award in the response. It means that if a requesting customer gets a coupon code with a discount for the next order, that discount code will be visible in response as part of the reward object definition.

Parameters:

  • campaign_id (String)

    Unique campaign ID.

  • member_id (String)

    A code that identifies the loyalty card.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :loyalties_members_redemption_redeem_request_body (LoyaltiesMembersRedemptionRedeemRequestBody)

    Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order.

Returns:



2950
2951
2952
2953
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 2950

def redeem_reward1(campaign_id, member_id, opts = {})
  data, _status_code, _headers = redeem_reward1_with_http_info(campaign_id, member_id, opts)
  data
end

#transfer_points(campaign_id, member_id, opts = {}) ⇒ LoyaltiesMembersTransfersCreateResponseBody

Transfer Loyalty Points Transfer points between different loyalty cards which have holders. Provide the campaign ID and the loyalty card ID you want the points to be transferred to as path parameters. In the request body, provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card. Transfer works only for loyalty cards that have holders, meaning the cards were published to customers. The transferred points expire according to the target program expiration rules.

Parameters:

  • campaign_id (String)

    A unique identifier of the loyalty campaign containing the voucher to which the loyalty points will be sent (destination).

  • member_id (String)

    A unique code identifying the loyalty card to which the user wants to transfer loyalty points (destination).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :loyalties_transfer_points (Array<LoyaltiesTransferPoints>)

    Provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.

Returns:



3018
3019
3020
3021
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 3018

def transfer_points(campaign_id, member_id, opts = {})
  data, _status_code, _headers = transfer_points_with_http_info(campaign_id, member_id, opts)
  data
end

#update_earning_rule(campaign_id, earning_rule_id, opts = {}) ⇒ LoyaltiesEarningRulesUpdateResponseBody

Update Earning Rule Update an earning rule definition.

Parameters:

  • 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.

  • earning_rule_id (String)

    A unique earning rule ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



3086
3087
3088
3089
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 3086

def update_earning_rule(campaign_id, earning_rule_id, opts = {})
  data, _status_code, _headers = update_earning_rule_with_http_info(campaign_id, earning_rule_id, opts)
  data
end

#update_loyalty_card_balance(member_id, opts = {}) ⇒ LoyaltiesMembersBalanceUpdateResponseBody

Adjust Loyalty Card Balance This method gives adds or removes balance to an existing loyalty card that is assigned to a holder. The removal of points will consume the points that expire the soonest. >🚧 Async Action This is an async action. If you want to perform several add or remove loyalty card balance actions in a short time and their order matters, set up sufficient time-out between the calls. 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to allow you to add or remove loyalty card balance without having to provide the campaignId as a path parameter.

Parameters:

  • member_id (String)

    Unique loyalty card assigned to a particular customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



3153
3154
3155
3156
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 3153

def update_loyalty_card_balance(member_id, opts = {})
  data, _status_code, _headers = update_loyalty_card_balance_with_http_info(member_id, opts)
  data
end

#update_loyalty_card_balance1(campaign_id, member_id, opts = {}) ⇒ LoyaltiesMembersBalanceUpdateResponseBody

Adjust Loyalty Card Balance with campaign ID This method adds or removes balance to an existing loyalty card that is assigned to a holder. The removal of points will consume the points that expire the soonest. >🚧 Async Action This is an async action. If you want to perform several add or remove loyalty card balance actions in a short time and their order matters, set up sufficient time-out between the calls.

Parameters:

  • campaign_id (String)

    Unique campaign ID.

  • member_id (String)

    A code that identifies the loyalty card.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



3220
3221
3222
3223
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 3220

def update_loyalty_card_balance1(campaign_id, member_id, opts = {})
  data, _status_code, _headers = update_loyalty_card_balance1_with_http_info(campaign_id, member_id, opts)
  data
end

#update_loyalty_program(campaign_id, opts = {}) ⇒ LoyaltiesUpdateCampaignResponseBody

Update Loyalty Campaign Updates a loyalty program. Fields other than those specified in the allowed request body payload wont be modified (even if provided they are silently skipped). Any parameters not provided will be left unchanged. This method will update the loyalty cards which have not been published or redeemed yet.

Parameters:

  • 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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :loyalties_update_campaign_request_body (LoyaltiesUpdateCampaignRequestBody)

    Specify the new values for the parameters that you would like to update for the given loyalty campaign.

Returns:



3287
3288
3289
3290
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 3287

def update_loyalty_program(campaign_id, opts = {})
  data, _status_code, _headers = update_loyalty_program_with_http_info(campaign_id, opts)
  data
end

#update_reward_assignment1(campaign_id, assignment_id, opts = {}) ⇒ LoyaltiesRewardsUpdateAssignmentResponseBody

Update Campaign Reward Assignment Updates rewards parameters, i.e. the points cost for the specific reward.

Parameters:

  • 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.

  • assignment_id (String)

    A unique reward assignment ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



3354
3355
3356
3357
# File 'lib/VoucherifySdk/api/loyalties_api.rb', line 3354

def update_reward_assignment1(campaign_id, assignment_id, opts = {})
  data, _status_code, _headers = update_reward_assignment1_with_http_info(campaign_id, assignment_id, opts)
  data
end