=begin #Talon.One API #Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` The version of the OpenAPI document: Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 =end require 'spec_helper' require 'json' # Unit tests for TalonOne::ManagementApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe 'ManagementApi' do before do # run before each test @api_instance = TalonOne::ManagementApi.new end after do # run after each test end describe 'test an instance of ManagementApi' do it 'should create an instance of ManagementApi' do expect(@api_instance).to be_instance_of(TalonOne::ManagementApi) end end # unit tests for add_loyalty_card_points # Add points to card # Add points to the given loyalty card in the specified card-based loyalty program. # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param loyalty_card_id Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. # @param body body # @param [Hash] opts the optional parameters # @return [nil] describe 'add_loyalty_card_points test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for add_loyalty_points # Add points to customer profile # Add points in the specified loyalty program for the given customer. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. # @param loyalty_program_id The identifier for the loyalty program. # @param integration_id The identifier of the profile. # @param body body # @param [Hash] opts the optional parameters # @return [nil] describe 'add_loyalty_points test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for copy_campaign_to_applications # Copy the campaign into the specified Application # Copy the campaign into all specified Applications. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @return [InlineResponse2004] describe 'copy_campaign_to_applications test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_account_collection # Create account-level collection # Create account-level collection. # @param body body # @param [Hash] opts the optional parameters # @return [Collection] describe 'create_account_collection test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_additional_cost # Create additional cost # Create an [additional cost](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). These additional costs are shared across all applications in your account, and are never required. # @param body body # @param [Hash] opts the optional parameters # @return [AccountAdditionalCost] describe 'create_additional_cost test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_attribute # Create custom attribute # Create a _custom attribute_ in this account. [Custom attributes](https://docs.talon.one/docs/dev/concepts/attributes) allow you to add data to Talon.One domain entities like campaigns, coupons, customers and so on. These attributes can then be given values when creating/updating these entities, and these values can be used in your campaign rules. For example, you could define a `zipCode` field for customer sessions, and add a rule to your campaign that only allows certain ZIP codes. These attributes are shared across all Applications in your account and are never required. # @param body body # @param [Hash] opts the optional parameters # @return [Attribute] describe 'create_attribute test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_campaign_from_template # Create campaign from campaign template # Use the campaign template referenced in the request body to create a new campaign in one of the connected Applications. If the template was created from a campaign with rules referencing [campaign collections](https://docs.talon.one/docs/product/campaigns/managing-collections), the corresponding collections for the new campaign are created automatically. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @return [CreateTemplateCampaignResponse] describe 'create_campaign_from_template test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_collection # Create collection # Create a collection. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @return [Collection] describe 'create_collection test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_coupons # Create coupons # Create coupons according to some pattern. Up to 20.000 coupons can be created without a unique prefix. When a unique prefix is provided, up to 200.000 coupons can be created. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @option opts [String] :silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. # @return [InlineResponse2007] describe 'create_coupons test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_coupons_async # Create coupons asynchronously # Create up to 5,000,000 coupons asynchronously. You should typically use this enpdoint when you create at least 20,001 coupons. You receive an email when the creation is complete. If you want to create less than 20,001 coupons, you can use the [Create coupons](https://docs.talon.one/management-api#tag/Coupons/operation/createCoupons) endpoint. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @return [AsyncCouponCreationResponse] describe 'create_coupons_async test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_coupons_for_multiple_recipients # Create coupons for multiple recipients # Create coupons according to some pattern for up to 1000 recipients. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @option opts [String] :silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. # @return [InlineResponse2007] describe 'create_coupons_for_multiple_recipients test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_notification_webhook # Create notification about campaign-related changes # Create a [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). A notification about campaign-related changes is different from regular webhooks in that it is Application-scoped and has a predefined payload. [Regular webhooks](https://docs.talon.one/docs/dev/getting-started/webhooks) have user-definable payloads. **Tip:** - You can create these notifications using the Campaign Manager. See [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications). - You can review the payload you will receive in the [specs](https://docs.talon.one/outbound-notifications#/paths/campaign_created/post). # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @return [NotificationWebhook] describe 'create_notification_webhook test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_password_recovery_email # Request a password reset # Send an email with a password recovery link to the email address of an existing account. **Note:** The password recovery link expires 30 minutes after this endpoint is triggered. # @param body body # @param [Hash] opts the optional parameters # @return [NewPasswordEmail] describe 'create_password_recovery_email test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_session # Create session # Create a session to use the Management API endpoints. Use the value of the `token` property provided in the response as bearer token in other API calls. A token is valid for 3 months. In accordance with best pratices, use your generated token for all your API requests. Do **not** regenerate a token for each request. This endpoint has a rate limit of 3 to 6 requests per second per account, depending on your setup. <div class=\"redoc-section\"> <p class=\"title\">Granular API key</p> Instead of using a session, you can also use the <a href=\"https://docs.talon.one/docs/product/account/dev-tools/managing-mapi-keys\">Management API key feature</a> in the Campaign Manager to decide which endpoints can be used with a given key. </div> # @param body body # @param [Hash] opts the optional parameters # @return [Session] describe 'create_session test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for deduct_loyalty_card_points # Deduct points from card # Deduct points from the given loyalty card in the specified card-based loyalty program. # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param loyalty_card_id Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. # @param body body # @param [Hash] opts the optional parameters # @return [nil] describe 'deduct_loyalty_card_points test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_account_collection # Delete account-level collection # Delete the given account-level collection. # @param collection_id The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_account_collection test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_campaign # Delete campaign # Delete the given campaign. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_campaign test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_collection # Delete collection # Delete the given collection. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param collection_id The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_collection test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_coupon # Delete coupon # Delete the specified coupon. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param coupon_id The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_coupon test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_coupons # Delete coupons # Deletes all the coupons matching the specified criteria. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :starts_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :starts_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :expires_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :expires_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [String] :valid - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches coupons in which start date is set and in the future. # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [String] :usable - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. # @option opts [Integer] :referral_id Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. # @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code # @return [nil] describe 'delete_coupons test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_loyalty_card # Delete loyalty card # Delete the given loyalty card. # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param loyalty_card_id Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_loyalty_card test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_notification_webhook # Delete notification about campaign-related changes # Remove the given existing [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param notification_webhook_id The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_notification_webhook test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_referral # Delete referral # Delete the specified referral. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param referral_id The ID of the referral code. # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_referral test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for destroy_session # Destroy session # Destroys the session. # @param [Hash] opts the optional parameters # @return [nil] describe 'destroy_session test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for export_account_collection_items # Export account-level collection's items # Download a CSV file containing items from an account-level collection. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). # @param collection_id The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. # @param [Hash] opts the optional parameters # @return [String] describe 'export_account_collection_items test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for export_collection_items # Export a collection's items # Download a CSV file containing a collection's items. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param collection_id The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. # @param [Hash] opts the optional parameters # @return [String] describe 'export_collection_items test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for export_coupons # Export coupons # Download a CSV file containing the coupons that match the given properties. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `accountid`: The ID of your deployment. - `applicationid`: The ID of the Application this coupon is related to. - `attributes`: A json object describing _custom_ referral attribute names and their values. - `batchid`: The ID of the batch this coupon is part of. - `campaignid`: The ID of the campaign this coupon is related to. - `counter`: The number of times this coupon has been redeemed. - `created`: The creation date of the coupon code. - `deleted`: Whether the coupon code is deleted. - `deleted_changelogid`: The ID of the delete event in the logs. - `discount_counter`: The amount of discount given by this coupon. - `discount_limitval`: The maximum discount amount that can be given be this coupon. - `expirydate`: The end date in RFC3339 of the code redemption period. - `id`: The internal ID of the coupon code. - `importid`: The ID of the import job that created this coupon. - `is_reservation_mandatory`: Whether this coupon requires a reservation to be redeemed. - `limits`: The limits set on this coupon. - `limitval`: The maximum number of redemptions of this code. - `recipientintegrationid`: The integration ID of the customer considered as recipient of the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon is reserved. - `reservation_counter`: How many times this coupon has been reserved. - `reservation_limitval`: The maximum of number of reservations this coupon can have. - `startdate`: The start date in RFC3339 of the code redemption period. - `value`: The coupon code. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Float] :campaign_id Filter results by campaign. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [String] :valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. # @option opts [String] :usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. # @option opts [Integer] :referral_id Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. # @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code # @option opts [String] :date_format Determines the format of dates in the export document. # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. # @return [String] describe 'export_coupons test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for export_customer_sessions # Export customer sessions # Download a CSV file containing the customer sessions that match the request. **Important:** Archived sessions cannot be exported. See the [retention policy](https://docs.talon.one/docs/product/server-infrastructure-and-data-retention#data-retention-policy). **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). - `id`: The internal ID of the session. - `firstsession`: Whether this is a first session. - `integrationid`: The integration ID of the session. - `applicationid`: The ID of the Application. - `profileid`: The internal ID of the customer profile. - `profileintegrationid`: The integration ID of the customer profile. - `created`: The timestamp when the session was created. - `state`: The [state](https://docs.talon.one/docs/dev/concepts/entities#customer-session-states) of the session. - `cartitems`: The cart items in the session. - `discounts`: The discounts in the session. - `total`: The total value of the session. - `attributes`: The attributes set in the session. - `closedat`: Timestamp when the session was closed. - `cancelledat`: Timestamp when the session was cancelled. - `referral`: The referral code in the session. - `identifiers`: The identifiers in the session. - `additional_costs`: The [additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs) in the session. - `updated`: Timestamp of the last session update. - `coupons`: Coupon codes in the session. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string. # @option opts [String] :profile_integration_id Only return sessions for the customer that matches this customer integration ID. # @option opts [String] :date_format Determines the format of dates in the export document. # @option opts [String] :customer_session_state Filter results by state. # @return [String] describe 'export_customer_sessions test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for export_effects # Export triggered effects # Download a CSV file containing the triggered effects that match the given attributes. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `applicationid`: The ID of the Application. - `campaignid`: The ID of the campaign. - `couponid`: The ID of the coupon, when applicable to the effect. - `created`: The timestamp of the effect. - `event_type`: The name of the event. See the [docs](https://docs.talon.one/docs/dev/concepts/events). - `eventid`: The internal ID of the effect. - `name`: The effect name. See the [docs](https://docs.talon.one/docs/dev/integration-api/api-effects). - `profileintegrationid`: The ID of the customer profile, when applicable. - `props`: The [properties](https://docs.talon.one/docs/dev/integration-api/api-effects) of the effect. - `ruleindex`: The index of the rule. - `rulesetid`: The ID of the rule set. - `sessionid`: The internal ID of the session that triggered the effect. - `profileid`: The internal ID of the customer profile. - `sessionintegrationid`: The integration ID of the session. - `total_revenue`: The total revenue. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Float] :campaign_id Filter results by campaign. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [String] :date_format Determines the format of dates in the export document. # @return [String] describe 'export_effects test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for export_loyalty_balance # Export customer loyalty balance to CSV # ⚠️ Deprecation notice: Support for requests to this endpoint will end soon. To export customer loyalty balances to CSV, use the [Export customer loyalty balances to CSV](/management-api#tag/Loyalty/operation/exportLoyaltyBalances) endpoint. Download a CSV file containing the balance of each customer in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). # @param loyalty_program_id The identifier for the loyalty program. # @param [Hash] opts the optional parameters # @option opts [DateTime] :end_date Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. # @return [String] describe 'export_loyalty_balance test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for export_loyalty_balances # Export customer loyalty balances # Download a CSV file containing the balance of each customer in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `loyaltyProgramID`: The ID of the loyalty program. - `loyaltySubledger`: The name of the subdleger, when applicatble. - `profileIntegrationID`: The integration ID of the customer profile. - `currentBalance`: The current point balance. - `pendingBalance`: The number of pending points. - `expiredBalance`: The number of expired points. - `spentBalance`: The number of spent points. - `currentTier`: The tier that the customer is in at the time of the export. # @param loyalty_program_id The identifier for the loyalty program. # @param [Hash] opts the optional parameters # @option opts [DateTime] :end_date Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. # @return [String] describe 'export_loyalty_balances test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for export_loyalty_card_balances # Export all card transaction logs # Download a CSV file containing the balances of all cards in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `loyaltyProgramID`: The ID of the loyalty program. - `loyaltySubledger`: The name of the subdleger, when applicatble. - `cardIdentifier`: The alphanumeric identifier of the loyalty card. - `cardState`:The state of the loyalty card. It can be `active` or `inactive`. - `currentBalance`: The current point balance. - `pendingBalance`: The number of pending points. - `expiredBalance`: The number of expired points. - `spentBalance`: The number of spent points. # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param [Hash] opts the optional parameters # @option opts [DateTime] :end_date Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. # @return [String] describe 'export_loyalty_card_balances test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for export_loyalty_card_ledger # Export card's ledger log # Download a CSV file containing a loyalty card ledger log of the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param loyalty_card_id Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. # @param range_start Only return results from after this timestamp. This must be an RFC3339 timestamp string. # @param range_end Only return results from before this timestamp. This must be an RFC3339 timestamp string. # @param [Hash] opts the optional parameters # @option opts [String] :date_format Determines the format of dates in the export document. # @return [String] describe 'export_loyalty_card_ledger test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for export_loyalty_ledger # Export customer's transaction logs # Download a CSV file containing a customer's transaction logs in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The type of the loyalty program. - `name`: The name of the loyalty program. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. # @param range_start Only return results from after this timestamp. This must be an RFC3339 timestamp string. # @param range_end Only return results from before this timestamp. This must be an RFC3339 timestamp string. # @param loyalty_program_id The identifier for the loyalty program. # @param integration_id The identifier of the profile. # @param [Hash] opts the optional parameters # @option opts [String] :date_format Determines the format of dates in the export document. # @return [String] describe 'export_loyalty_ledger test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for export_referrals # Export referrals # Download a CSV file containing the referrals that match the given parameters. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `code`: The referral code. - `advocateprofileintegrationid`: The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A json object describing _custom_ referral attribute names and their values. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Float] :campaign_id Filter results by campaign. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [String] :valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. # @option opts [String] :usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. # @option opts [String] :batch_id Filter results by batches of referrals # @option opts [String] :date_format Determines the format of dates in the export document. # @return [String] describe 'export_referrals test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_access_logs_without_total_count # Get access logs for Application # Retrieve the list of API calls sent to the specified Application. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param range_start Only return results from after this timestamp. This must be an RFC3339 timestamp string. # @param range_end Only return results from before this timestamp. This must be an RFC3339 timestamp string. # @param [Hash] opts the optional parameters # @option opts [String] :path Only return results where the request path matches the given regular expression. # @option opts [String] :method Only return results where the request method matches the given regular expression. # @option opts [String] :status Filter results by HTTP status codes. # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @return [InlineResponse20018] describe 'get_access_logs_without_total_count test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_account # Get account details # Return the details of your companies Talon.One account. # @param account_id The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. # @param [Hash] opts the optional parameters # @return [Account] describe 'get_account test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_account_analytics # Get account analytics # Return the analytics of your Talon.One account. # @param account_id The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. # @param [Hash] opts the optional parameters # @return [AccountAnalytics] describe 'get_account_analytics test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_account_collection # Get account-level collection # Retrieve a given account-level collection. # @param collection_id The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. # @param [Hash] opts the optional parameters # @return [Collection] describe 'get_account_collection test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_additional_cost # Get additional cost # Returns the additional cost. # @param additional_cost_id The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. # @param [Hash] opts the optional parameters # @return [AccountAdditionalCost] describe 'get_additional_cost test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_additional_costs # List additional costs # Returns all the defined additional costs for the account. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @return [InlineResponse20032] describe 'get_additional_costs test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_all_access_logs # List access logs # Fetches the access logs for the entire account. Sensitive requests (logins) are _always_ filtered from the logs. # @param range_start Only return results from after this timestamp. This must be an RFC3339 timestamp string. # @param range_end Only return results from before this timestamp. This must be an RFC3339 timestamp string. # @param [Hash] opts the optional parameters # @option opts [String] :path Only return results where the request path matches the given regular expression. # @option opts [String] :method Only return results where the request method matches the given regular expression. # @option opts [String] :status Filter results by HTTP status codes. # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @return [InlineResponse20019] describe 'get_all_access_logs test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_all_roles # List roles # List all roles. # @param [Hash] opts the optional parameters # @return [InlineResponse20040] describe 'get_all_roles test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_application # Get Application # Get the application specified by the ID. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @return [Application] describe 'get_application test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_application_api_health # Get Application health # Display the health of the Application and show the last time the Application was used. You can also display this information from the **Settings** of an Application, in the **Developer Settings** menu. See the [docs](https://docs.talon.one/docs/dev/tutorials/monitoring-integration-status). # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @return [ApplicationApiHealth] describe 'get_application_api_health test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_application_customer # Get application's customer # Retrieve the customers of the specified application. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param customer_id The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. # @param [Hash] opts the optional parameters # @return [ApplicationCustomer] describe 'get_application_customer test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_application_customer_friends # List friends referred by customer profile # List the friends referred by the specified customer profile in this Application. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param integration_id The Integration ID of the Advocate's Profile. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [Boolean] :with_total_result_size When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. # @return [InlineResponse20030] describe 'get_application_customer_friends test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_application_customers # List application's customers # List all the customers of the specified application. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [String] :integration_id Filter results performing an exact matching against the profile integration identifier. # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [Boolean] :with_total_result_size When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. # @return [InlineResponse20021] describe 'get_application_customers test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_application_customers_by_attributes # List application customers matching the given attributes # Get a list of the application customers matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [Boolean] :with_total_result_size When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. # @return [InlineResponse20022] describe 'get_application_customers_by_attributes test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_application_event_types # List Applications event types # Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](https://docs.talon.one/integration-api#operation/trackEvent) # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @return [InlineResponse20028] describe 'get_application_event_types test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_application_events_without_total_count # List Applications events # Lists all events recorded for an application. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :type Comma-separated list of types by which to filter events. Must be exact match(es). # @option opts [DateTime] :created_before Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [String] :session Session integration ID filter for events. Must be exact match. # @option opts [String] :profile Profile integration ID filter for events. Must be exact match. # @option opts [String] :customer_name Customer name filter for events. Will match substrings case-insensitively. # @option opts [String] :customer_email Customer e-mail address filter for events. Will match substrings case-insensitively. # @option opts [String] :coupon_code Coupon code # @option opts [String] :referral_code Referral code # @option opts [String] :rule_query Rule name filter for events # @option opts [String] :campaign_query Campaign name filter for events # @return [InlineResponse20027] describe 'get_application_events_without_total_count test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_application_session # Get Application session # Get the details of the given session. You can list the sessions with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param session_id The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. # @param [Hash] opts the optional parameters # @return [ApplicationSession] describe 'get_application_session test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_application_sessions # List Application sessions # List all the sessions of the specified Application. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :profile Profile integration ID filter for sessions. Must be exact match. # @option opts [String] :state Filter by sessions with this state. Must be exact match. # @option opts [DateTime] :created_before Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [String] :coupon Filter by sessions with this coupon. Must be exact match. # @option opts [String] :referral Filter by sessions with this referral. Must be exact match. # @option opts [String] :integration_id Filter by sessions with this integrationId. Must be exact match. # @return [InlineResponse20026] describe 'get_application_sessions test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_applications # List Applications # List all applications in the current account. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @return [InlineResponse2003] describe 'get_applications test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_attribute # Get custom attribute # Retrieve the specified custom attribute. # @param attribute_id The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. # @param [Hash] opts the optional parameters # @return [Attribute] describe 'get_attribute test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_attributes # List custom attributes # Return all the custom attributes for the account. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :entity Returned attributes will be filtered by supplied entity. # @return [InlineResponse20031] describe 'get_attributes test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_audiences # List audiences # Get all audiences created in the account. To create an audience, use [Create audience](https://docs.talon.one/integration-api#tag/Audiences/operation/createAudienceV2). # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [Boolean] :with_total_result_size When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. # @return [InlineResponse20029] describe 'get_audiences test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_campaign # Get campaign # Retrieve the given campaign. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @return [Campaign] describe 'get_campaign test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_campaign_analytics # Get analytics of campaigns # Retrieve statistical data about the performance of the given campaign. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param range_start Only return results from after this timestamp. This must be an RFC3339 timestamp string. # @param range_end Only return results from before this timestamp. This must be an RFC3339 timestamp string. # @param [Hash] opts the optional parameters # @option opts [String] :granularity The time interval between the results in the returned time-series. # @return [InlineResponse20020] describe 'get_campaign_analytics test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_campaign_by_attributes # List campaigns that match the given attributes # Get a list of all the campaigns that match a set of attributes. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. # @return [InlineResponse2004] describe 'get_campaign_by_attributes test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_campaign_templates # List campaign templates # Retrieve a list of campaign templates. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :state Filter results by the state of the campaign template. # @option opts [String] :name Filter results performing case-insensitive matching against the name of the campaign template. # @option opts [String] :tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. # @option opts [Integer] :user_id Filter results by user ID. # @return [InlineResponse20010] describe 'get_campaign_templates test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_campaigns # List campaigns # List the campaigns of the specified application that match your filter criteria. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. # @option opts [String] :name Filter results performing case-insensitive matching against the name of the campaign. # @option opts [String] :tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [Integer] :campaign_group_id Filter results to campaigns owned by the specified campaign group ID. # @option opts [Integer] :template_id The ID of the Campaign Template this Campaign was created from. # @return [InlineResponse2004] describe 'get_campaigns test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_changes # Get audit logs for an account # Retrieve the audit logs displayed in **Accounts > Audit logs**. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [Float] :application_id Filter results by Application ID. # @option opts [String] :entity_path Filter results on a case insensitive matching of the url path of the entity # @option opts [Integer] :user_id Filter results by user ID. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [Boolean] :with_total_result_size When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. # @option opts [Integer] :management_key_id Filter results that match the given management key ID. # @option opts [Boolean] :include_old When this flag is set to false, the state without the change will not be returned. The default value is true. # @return [InlineResponse20038] describe 'get_changes test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_collection # Get collection # Retrieve a given collection. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param collection_id The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. # @param [Hash] opts the optional parameters # @return [Collection] describe 'get_collection test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_collection_items # Get collection items # Retrieve the items from the given collection. # @param collection_id The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @return [InlineResponse20016] describe 'get_collection_items test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_coupons_without_total_count # List coupons # List all the coupons matching the specified criteria. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [String] :valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. # @option opts [String] :usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. # @option opts [Integer] :referral_id Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. # @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code # @return [InlineResponse2008] describe 'get_coupons_without_total_count test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_customer_activity_report # Get customer's activity report # Fetch the summary report of a given customer in the given application, in a time range. # @param range_start Only return results from after this timestamp. This must be an RFC3339 timestamp string. # @param range_end Only return results from before this timestamp. This must be an RFC3339 timestamp string. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param customer_id The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @return [CustomerActivityReport] describe 'get_customer_activity_report test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_customer_activity_reports_without_total_count # Get Activity Reports for Application Customers # Fetch summary reports for all application customers based on a time range. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results. # @param range_start Only return results from after this timestamp. This must be an RFC3339 timestamp string. # @param range_end Only return results from before this timestamp. This must be an RFC3339 timestamp string. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :name Only return reports matching the customer name # @option opts [String] :integration_id Filter results performing an exact matching against the profile integration identifier. # @option opts [String] :campaign_name Only return reports matching the campaignName # @option opts [String] :advocate_name Only return reports matching the current customer referrer name # @return [InlineResponse20025] describe 'get_customer_activity_reports_without_total_count test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_customer_analytics # Get customer's analytics report # Fetch analytics for a given customer in the given application. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param customer_id The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @return [CustomerAnalytics] describe 'get_customer_analytics test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_customer_profile # Get customer profile # Return the details of the specified customer profile. <div class=\"redoc-section\"> <p class=\"title\">Performance tips</p> You can retrieve the same information via the Integration API, which can save you extra API requests. consider these options: - Request the customer profile to be part of the response content using [Update Customer Session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2). - Send an empty update with the [Update Customer Profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint with `runRuleEngine=false`. </div> # @param customer_id The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. # @param [Hash] opts the optional parameters # @return [CustomerProfile] describe 'get_customer_profile test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_customer_profiles # List customer profiles # List all customer profiles. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [Boolean] :sandbox Indicates whether you are pointing to a sandbox or Live customer. # @return [InlineResponse20024] describe 'get_customer_profiles test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_customers_by_attributes # List customer profiles matching the given attributes # Get a list of the customer profiles matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. # @param body body # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [Boolean] :sandbox Indicates whether you are pointing to a sandbox or Live customer. # @return [InlineResponse20023] describe 'get_customers_by_attributes test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_event_types # List event types # Fetch all event type definitions for your account. # @param [Hash] opts the optional parameters # @option opts [String] :name Filter results to event types with the given name. This parameter implies `includeOldVersions`. # @option opts [Boolean] :include_old_versions Include all versions of every event type. # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @return [InlineResponse20036] describe 'get_event_types test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_exports # Get exports # List all past exports # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [Float] :application_id Filter results by Application ID. # @option opts [Integer] :campaign_id Filter by the campaign ID on which the limit counters are used. # @option opts [String] :entity The name of the entity type that was exported. # @return [InlineResponse20039] describe 'get_exports test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_loyalty_card # Get loyalty card # Get the given loyalty card. # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param loyalty_card_id Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. # @param [Hash] opts the optional parameters # @return [LoyaltyCard] describe 'get_loyalty_card test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_loyalty_card_transaction_logs # List card's transactions # Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/loyalty-card-overview) within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param loyalty_card_id Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. # @param [Hash] opts the optional parameters # @option opts [DateTime] :start_date Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. # @option opts [DateTime] :end_date Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :subledger_id The ID of the subledger by which we filter the data. # @return [InlineResponse20014] describe 'get_loyalty_card_transaction_logs test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_loyalty_cards # List loyalty cards # For the given card-based loyalty program, list the loyalty cards that match your filter criteria. # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :identifier Optional query parameter to search cards by identifier. # @option opts [Integer] :profile_id Filter by the profile ID. # @return [InlineResponse20013] describe 'get_loyalty_cards test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_loyalty_points # Get customer's full loyalty ledger # Get the loyalty ledger for this profile integration ID. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. **Important:** To get loyalty transaction logs for a given Integration ID in a loyalty program, we recommend using the Integration API's [Get customer's loyalty logs](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions). # @param loyalty_program_id The identifier for the loyalty program. # @param integration_id The identifier of the profile. # @param [Hash] opts the optional parameters # @return [LoyaltyLedger] describe 'get_loyalty_points test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_loyalty_program # Get loyalty program # Get the specified [loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview). To list all loyalty programs in your Application, use [List loyalty programs](#operation/getLoyaltyPrograms). To list the loyalty programs that a customer profile is part of, use the [List customer data](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/getCustomerInventory) # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param [Hash] opts the optional parameters # @return [LoyaltyProgram] describe 'get_loyalty_program test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_loyalty_program_transactions # List loyalty program transactions # Retrieve all loyalty program transaction logs in a given loyalty program with filtering options applied. Manual and imported transactions are also included. If no filters are applied, the last 50 loyalty transactions for the given loyalty program are returned. **Important:** To get loyalty transaction logs for a given Integration ID in a loyalty program, we recommend using the Integration API's [Get customer's loyalty logs](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions). # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param [Hash] opts the optional parameters # @option opts [String] :loyalty_transaction_type Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. # @option opts [String] :subledger_id The ID of the subledger by which we filter the data. # @option opts [DateTime] :start_date Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. # @option opts [DateTime] :end_date Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @return [InlineResponse20012] describe 'get_loyalty_program_transactions test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_loyalty_programs # List loyalty programs # List the loyalty programs of the account. # @param [Hash] opts the optional parameters # @return [InlineResponse20011] describe 'get_loyalty_programs test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_loyalty_statistics # Get loyalty program statistics # Retrieve the statistics of the specified loyalty program such as the total active points, pending points, spent points, and expired points. **Important:** The returned data does not include the current day. All statistics are updated daily at 11:59 PM in the loyalty program time zone. # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param [Hash] opts the optional parameters # @return [LoyaltyStatistics] describe 'get_loyalty_statistics test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_notification_webhook # Get notification about campaign-related changes # Return the given [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param notification_webhook_id The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. # @param [Hash] opts the optional parameters # @return [NotificationWebhook] describe 'get_notification_webhook test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_notification_webhooks # List notifications about campaign-related changes # List all [notifications about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications) for the given Application. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @return [InlineResponse2005] describe 'get_notification_webhooks test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_referrals_without_total_count # List referrals # List all referrals of the specified campaign. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [String] :valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. # @option opts [String] :usable Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. # @option opts [String] :advocate Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field # @return [InlineResponse2009] describe 'get_referrals_without_total_count test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_role # Get role # Get the details of the specified role. To see all the roles, use [List roles](#operation/getAllRoles). # @param role_id The Id of role. # @param [Hash] opts the optional parameters # @return [Role] describe 'get_role test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_ruleset # Get ruleset # Retrieve the specified ruleset. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param ruleset_id The ID of the ruleset. # @param [Hash] opts the optional parameters # @return [Ruleset] describe 'get_ruleset test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_rulesets # List campaign rulesets # List all rulesets of this campaign. A ruleset is a revision of the rules of a campaign. **Important:** The response also includes deleted rules. You should only consider the latest revision of the returned rulesets. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @return [InlineResponse2006] describe 'get_rulesets test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_user # Get user # Retrieve the data (including an invitation code) for a user. Non-admin users can only get their own profile. # @param user_id The ID of the user. # @param [Hash] opts the optional parameters # @return [User] describe 'get_user test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_users # List users in account # Retrieve all users in your account. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @return [InlineResponse20037] describe 'get_users test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_webhook # Get webhook # Returns a webhook by its id. # @param webhook_id The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. # @param [Hash] opts the optional parameters # @return [Webhook] describe 'get_webhook test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_webhook_activation_logs # List webhook activation log entries # Webhook activation log entries are created as soon as an integration request triggers a webhook effect. See the [docs](https://docs.talon.one/docs/dev/getting-started/webhooks). # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :integration_request_uuid Filter results by integration request UUID. # @option opts [Float] :webhook_id Filter results by Webhook. # @option opts [Float] :application_id Filter results by Application ID. # @option opts [Float] :campaign_id Filter results by campaign. # @option opts [DateTime] :created_before Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. # @return [InlineResponse20034] describe 'get_webhook_activation_logs test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_webhook_logs # List webhook log entries # Retrieve all webhook log entries. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :status Filter results by HTTP status codes. # @option opts [Float] :webhook_id Filter results by Webhook. # @option opts [Float] :application_id Filter results by Application ID. # @option opts [Float] :campaign_id Filter results by campaign. # @option opts [String] :request_uuid Filter results by request UUID. # @option opts [DateTime] :created_before Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. # @return [InlineResponse20035] describe 'get_webhook_logs test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_webhooks # List webhooks # List all webhooks. # @param [Hash] opts the optional parameters # @option opts [String] :application_ids Filter by one or more application IDs separated by a comma. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @return [InlineResponse20033] describe 'get_webhooks test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for import_account_collection # Import data in existing account-level collection # Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. Example: ``` item Addidas Nike Asics ``` **Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection. # @param collection_id The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. # @param [Hash] opts the optional parameters # @option opts [String] :up_file The file with the information about the data that should be imported. # @return [Import] describe 'import_account_collection test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for import_allowed_list # Import allowed values for attribute # Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item` (required): the values in your allowed list, for example a list of SKU's. An allowed list is limited to 500,000 items. Example: ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ``` # @param attribute_id The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. # @param [Hash] opts the optional parameters # @option opts [String] :up_file The file with the information about the data that should be imported. # @return [Import] describe 'import_allowed_list test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for import_collection # Import data in existing collection # Upload a CSV file containing the collection of string values that should be attached as payload for collection. The file should be sent as multipart data. The import **replaces** the initial content of the collection. The CSV file **must** only contain the following column: - `item`: the values in your collection. A collection is limited to 500,000 items. Example: ``` item Addidas Nike Asics ``` **Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param collection_id The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. # @param [Hash] opts the optional parameters # @option opts [String] :up_file The file with the information about the data that should be imported. # @return [Import] describe 'import_collection test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for import_coupons # Import coupons # Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A json object describing _custom_ referral attribute names and their values. Double the double-quotes in the object. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated to the coupon entity, set it with `\"{\"\"category\"\": \"\"10_off\"\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [String] :up_file The file with the information about the data that should be imported. # @return [Import] describe 'import_coupons test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for import_loyalty_cards # Import loyalty cards # Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param [Hash] opts the optional parameters # @option opts [String] :up_file The file with the information about the data that should be imported. # @return [Import] describe 'import_loyalty_cards test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for import_loyalty_points # Import loyalty points # Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the loyalty program type, you can import the points into a given customer profile or into a given _active_ loyalty card. The CSV file contains the following columns: - `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate`: The earliest date when the points can be redeemed. On this date and until the expiration date, the points are `active`. - `expirydate`: The latest date when the points can be redeemed. After this date, the points are `expired`. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** For existing customer profiles and loyalty cards, the imported points are added to any previous active or pending points, depending on the value provided for `startdate`. If `startdate` matches the current date, the imported points are _active_. If it is later, the points are _pending_ until the date provided for `startdate` is reached. **Note:** We recommend limiting your file size to 500MB. **Example for profile-based programs:** ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` **Example for card-based programs:** ```text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param [Hash] opts the optional parameters # @option opts [String] :up_file The file with the information about the data that should be imported. # @return [Import] describe 'import_loyalty_points test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for import_pool_giveaways # Import giveaway codes into a giveaway pool # Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains the following columns: - `code` (required): the code of your giveaway, for instance, a gift card redemption code. - `startdate`: the start date in RFC3339 of the code redemption period. - `enddate`: the last date in RFC3339 of the code redemption period. - `attributes`: A json object describing _custom_ giveaway attribute names and their values. Double the double-quotes in the object. For example, if you [created a custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated to the giveaway entity, set it with `\"{\"\"provider\"\": \"\"myPartnerCompany\"\"}\"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ``` # @param pool_id The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. # @param [Hash] opts the optional parameters # @option opts [String] :up_file The file with the information about the data that should be imported. # @return [Import] describe 'import_pool_giveaways test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for import_referrals # Import referrals # Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A json object describing _custom_ referral attribute names and their values. Double the double-quotes in the object. For example, if you [created a custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated to the referral entity, set it with `\"{\"\"category\"\": \"\"10_off\"\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [String] :up_file The file with the information about the data that should be imported. # @return [Import] describe 'import_referrals test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_account_collections # List collections in account # List collections in account. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [Boolean] :with_total_result_size When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. # @option opts [String] :name Filter by the name of the Collection. # @return [InlineResponse20015] describe 'list_account_collections test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_collections # List collections # List collections in the campaign. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [Boolean] :with_total_result_size When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. # @option opts [String] :name Filter by the name of the Collection. # @return [InlineResponse20017] describe 'list_collections test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_collections_in_application # List collections in application # List collections from all campaigns in the Application. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [Boolean] :with_total_result_size When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. # @option opts [String] :name Filter by the name of the Collection. # @return [InlineResponse20017] describe 'list_collections_in_application test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for post_added_deducted_points_notification # Create notification about added or deducted loyalty points # Create a notification about added or deducted loyalty points in a given profile-based loyalty program. A notification for added or deducted loyalty points is different from regular webhooks in that it is loyalty program-scoped and has a predefined payload. For more information, see [Managing notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-notifications). # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param body body # @param [Hash] opts the optional parameters # @return [BaseNotification] describe 'post_added_deducted_points_notification test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for post_catalogs_strikethrough_notification # Create strikethrough notification # Create a notification for the in the given Application. For more information, see [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications). See the [payload](https://docs.talon.one/outbound-notifications) you will receive. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @return [BaseNotification] describe 'post_catalogs_strikethrough_notification test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for remove_loyalty_points # Deduct points from customer profile # Deduct points from the specified loyalty program and specified customer profile. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. # @param loyalty_program_id The identifier for the loyalty program. # @param integration_id The identifier of the profile. # @param body body # @param [Hash] opts the optional parameters # @return [nil] describe 'remove_loyalty_points test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for reset_password # Reset password # Consumes the supplied password reset token and updates the password for the associated account. # @param body body # @param [Hash] opts the optional parameters # @return [NewPassword] describe 'reset_password test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for search_coupons_advanced_application_wide_without_total_count # List coupons that match the given attributes (without total count) # List the coupons whose attributes match the query criteria in all **active** campaigns of the given Application. The match is successful if all the attributes of the request are found in a coupon, even if the coupon has more attributes that are not present on the request. **Note:** The total count is not included in the response. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [String] :valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. # @option opts [String] :usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. # @option opts [Integer] :referral_id Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. # @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field # @option opts [String] :batch_id Filter results by batches of coupons # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code # @option opts [String] :campaign_state Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. # @return [InlineResponse2008] describe 'search_coupons_advanced_application_wide_without_total_count test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for search_coupons_advanced_without_total_count # List coupons that match the given attributes in campaign (without total count) # List the coupons whose attributes match the query criteria in the given campaign. The match is successful if all the attributes of the request are found in a coupon, even if the coupon has more attributes that are not present on the request. **Note:** The total count is not included in the response. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of items in this response. # @option opts [Integer] :skip Skips the given number of items when paging through large result sets. # @option opts [String] :sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. # @option opts [String] :value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. # @option opts [String] :valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. # @option opts [String] :usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. # @option opts [Integer] :referral_id Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. # @option opts [String] :recipient_integration_id Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field # @option opts [Boolean] :exact_match Filter results to an exact case-insensitive matching against the coupon code # @option opts [String] :batch_id Filter results by batches of coupons # @return [InlineResponse2008] describe 'search_coupons_advanced_without_total_count test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for transfer_loyalty_card # Transfer card data # Transfer loyalty card data, such as linked customers, loyalty balances and transactions, from a given loyalty card to a new, automatically created loyalty card. **Important:** - The original card is automatically blocked once the new card is created, and it cannot be activated again. - The default status of the new card is _active_. # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param loyalty_card_id Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. # @param body body # @param [Hash] opts the optional parameters # @return [nil] describe 'transfer_loyalty_card test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_account_collection # Update account-level collection # Edit the description of the account-level collection and enable or disable the collection in the specified Applications. # @param collection_id The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. # @param body body # @param [Hash] opts the optional parameters # @return [Collection] describe 'update_account_collection test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_additional_cost # Update additional cost # Updates an existing additional cost. Once created, the only property of an additional cost that can be changed is the title (human readable description). This restriction is in place to prevent accidentally breaking live integrations. # @param additional_cost_id The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. # @param body body # @param [Hash] opts the optional parameters # @return [AccountAdditionalCost] describe 'update_additional_cost test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_attribute # Update custom attribute # Update an existing custom attribute. Once created, the only property of a custom attribute that can be changed is the description. To change the `type` or `name` property of a custom attribute, create a new attribute and update any relevant integrations and rules to use the new attribute. # @param attribute_id The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. # @param body body # @param [Hash] opts the optional parameters # @return [Attribute] describe 'update_attribute test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_campaign # Update campaign # Update the given campaign. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @return [Campaign] describe 'update_campaign test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_collection # Update collection description # Edit the description of the collection. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param collection_id The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. # @param body body # @param [Hash] opts the optional parameters # @return [Collection] describe 'update_collection test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_coupon # Update coupon # Update the specified coupon. <div class=\"redoc-section\"> <p class=\"title\">Important</p> <p>With this PUT endpoint only, any property you do not explicitly set in your request will be set to <code>null</code>.</p> </div> # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param coupon_id The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. # @param body body # @param [Hash] opts the optional parameters # @return [Coupon] describe 'update_coupon test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_coupon_batch # Update coupons # Update all coupons, or a specific batch of coupons, in a campaign. You can find the `batchId` in the **Coupons** view of your Application in the Campaign Manager, or you can use [List coupons](#operation/getCouponsWithoutTotalCount). <div class=\"redoc-section\"> <p class=\"title\">Important</p> <ul> <li>Only send sequential requests to this endpoint.</li> <li>Requests to this endpoint timeout after 30 minutes. If you hit a timeout, reach out to our support team.</li> </ul> </div> To update a specific coupon, use [Update coupon](#operation/updateCoupon). # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param body body # @param [Hash] opts the optional parameters # @return [nil] describe 'update_coupon_batch test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_loyalty_card # Update loyalty card status # Update the status of the given loyalty card. A card can be _active_ or _inactive_. # @param loyalty_program_id Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. # @param loyalty_card_id Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. # @param body body # @param [Hash] opts the optional parameters # @return [LoyaltyCard] describe 'update_loyalty_card test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_notification_webhook # Update notification about campaign-related changes # Update the given [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). **Tip:** You can review the payload you will receive in the [specs](https://docs.talon.one/outbound-notifications#/paths/campaign_edited/post). # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param notification_webhook_id The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. # @param body body # @param [Hash] opts the optional parameters # @return [NotificationWebhook] describe 'update_notification_webhook test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_referral # Update referral # Update the specified referral. # @param application_id The ID of the Application. It is displayed in your Talon.One deployment URL. # @param campaign_id The ID of the campaign. It is displayed in your Talon.One deployment URL. # @param referral_id The ID of the referral code. # @param body body # @param [Hash] opts the optional parameters # @return [Referral] describe 'update_referral test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end