Skip to content

Releases: talon-one/talon_one.rb

v6.0.0

v5.0.0

06 Jun 11:34
5242a11
Compare
Choose a tag to compare

Summary

New endpoints

Management API

Changes

The disabled and archived campaign states were added.

⚠️ Deprecation Notice

  • The GET /v1/roles endpoint was deprecated. Please use the new one GET /v2/roles
  • The GET /v1/roles/{roleId} endpoint was deprecated. Please use the new one GET /v2/roles/{roleId}

v4.0.0: Achievements

28 May 08:39
f276acb
Compare
Choose a tag to compare

Summary

New endpoints

Integration API

Management API

Changes

⚠️ Deprecation Notice

  • The TrackEvent endpoint /v1/events was deprecated. Please use the new endpoint /v2/events instead.
  • The endpoint to create notification about campaign-related changes (POST /v1/applications/{applicationId}/notification_webhooks) was deprecated
  • The endpoint to delete notification about campaign-related changes (DELETE /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}) was deprecated
  • The endpoint to get notification about campaign-related changes (GET /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}) was deprecated
  • The endpoint to list notifications about campaign-related changes (GET /v1/applications/{applicationId}/notification_webhooks) was deprecated
  • The endpoint to update notification about campaign-related changes (PUT /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}) was deprecated

v3.0.2: improve error handling for timeout errors

12 Jun 16:33
6bffe3a
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.0.1...v3.0.2

v3.0.1: Fix faulty response payloads in integration api endpoints

27 Apr 08:47
6779e66
Compare
Choose a tag to compare

Summary

Fix faulty response payload for Reopen customer session endpoint

Endpoint now returns a ReopenSessionResponse, which maps correctly to the endpoint returned value.

Fix faulty response payload for List card's transactions

response of the endpoint was lacking the wrapping in the "page" structure that contains the list of transactions in it's data field, see InlineResponse2001.

v3.0.0: Reopen session endpoint, loyalty data integration endpoints and loyalty card management endpoints

26 Apr 13:53
ce6c0d4
Compare
Choose a tag to compare

v2.5.1: Collections, EventsV2 & Partial Returns

29 Jun 16:30
c4fd2be
Compare
Choose a tag to compare

v2.4.0: Customer Inventory Enhancements, Referral Updates and Import Endpoint

03 May 23:12
9205712
Compare
Choose a tag to compare

Summary

Management API

Expose import endpoints as integral part of the SDK

All of our CSV import endpoints are accessible via the Web Application from the corresponding entity pages (refer to our Help Center for an example regarding Coupons).

Now these are also available endpoints as part of the SDK (links to our developer docs):

Example code snippet demonstrating import coupons using a CSV file:

# ...preparing api client...
# An example could be seen at the repository's README file: https://github.com/talon-one/talon_one.rb#management-api

referral_import_contents = File.open("/path/to/import-referrals.csv")
application_id = 1
campaign_id = 2
opts = {
  up_file: referral_import_contents # must be a `File` object
}

import_summary = api_instance.import_referrals(application_id, campaign_id, opts)

☝️ Back to Table of Contents

Introduce updateReferral Endpoint

We introduced an endpoint to update referrals in order to allow updating their scheduling, usage limits and custom attributes attached to them.

Please consult the endpoint reference in our developer docs for more details.

☝️ Back to Table of Contents

Integration API

Extended Customer Inventory Endpoint

We have added a couple of useful data points to our customer inventory to make integration even simpler.

The customer inventory endpoint now has the ability to return giveaway codes that belong to the profile in query.
In order to learn more about setting up such campaigns refer to this help center article and this developer docs tutorial.

We have also extended the coupons objects that are returned as part of the inventory and attached these two useful data-points to each returned coupon:

  • profileRedemptionCount - holds the number of times the coupon was redeemed by the profile
  • state - holds the state of the coupon and can be one of the below values:
    • active: reserved coupons that are neither pending nor used nor expired, and have a non-exhausted limit counter
    • used: coupons that are not pending, and have reached their redemption limit or were redeemed by the profile before expiration
    • expired: all non-pending, non-active, non-used coupons that were not redeemed by the profile
    • pending: coupons that have a start date in the future

☝️ Back to Table of Contents

⚠️ A reminder of The Deprecation Notice: Integration API@v1 endpoints

The deprecation was introduced already in the last release of the SDK, here is a kind reminder of the deprecation notices for Integration API@v1 endpoints:

These endpoints will be flagged deprecated on 15.07.2021, meaning support for requests to these endpoints will end on that date. We will not remove the endpoints, and they will still be accessible for you to use.

We highly encourage migrating to the correspondent v2 endpoints for easier and more granular integration, as well as new features support (See our developer docs section about API V2.0).

☝️ Back to Table of Contents

v2.3.0: Multiple personal coupons creation endpoint, Loyalty and Referrals counters and Export Endpoints

14 Feb 21:50
a03f48b
Compare
Choose a tag to compare

Summary

Management API

Introduce createCouponsForMultipleRecipients Endpoint

An endpoint to allow creation of multiple coupons of the same configuration for up to 1,000 recipients at once.

☝️ Back to Table of Contents

Expose export endpoints as integral part of the SDK

All of our CSV export endpoints are accessible via the Web Application from the corresponding entity pages (refer to our Help Center for an example regarding Coupons).

Now these are also available endpoints as part of the SDK (links to our developer docs):

Example code snippet demonstrating consuming and printing the lines of a Customer Loyalty Balance Export:

require 'talon_one'
require 'csv'

# ...preparing api client...
# An example could be seen at the repository's README file: https://github.com/talon-one/talon_one.rb#management-api

loyalty_program_id = '1'
export_contents = management_api.export_loyalty_balance(loyalty_program_id)
csv = CSV.new(export_contents)

csv.each do |line|
  # do something with line...
  puts line
end

☝️ Back to Table of Contents

Expose destroySession Endpoint

Expose an existing endpoint to allow destroying a bearer token used in the context of the management-api.
This endpoint imitates a "logout" function and will make the attached token invalid for consequent requests.

☝️ Back to Table of Contents

Introduce loyalty effects related and referrals creation counters on Campaign entities

As part of the newly added budgets to campaigns (see relevant Help Center Section), we have added new counters on campaigns with regard to loyalty and referrals:

  • created_loyalty_points_count : Total number of loyalty points created by rules in this campaign
  • created_loyalty_points_effect_count : Total number of loyalty point creation effects triggered by rules in this campaign
  • redeemed_loyalty_points_count : Total number of loyalty points redeemed by rules in this campaign
  • redeemed_loyalty_points_effect_count : Total number of loyalty point redemption effects triggered by rules in this campaign
  • referral_creation_count : Total number of referrals created by rules in this campaign

☝️ Back to Table of Contents

⚠️⚠️ Breaking Change: Fix Campaign's discount_count type from int to float

Campaign's discount_count counter property was all along calculated as a floating decimal number by our system.

From this release on the returned values will be floating decimals and not cut-off integers:

- **discount_count** | **Integer** | Total amount of discounts redeemed in the campaign. | [optional]
+ **discount_count** | **Float** | Total amount of discounts redeemed in the campaign. | [optional]

☝️ Back to Table of Contents

Integration API

Improve Responses Transparency

We are constantly extending and improving our integration API to provide our consumers with the best transparency regarding what exactly has happened within their requests.

We have added new data points to our v2 endpoints effects in order to improve the transparency we aspire for:

  • If an effect was triggered because of a specific coupon the effect will now include this coupon ID, see Effect.md
  • When a coupon is rejected we attach more details regarding the origin of the failure in RejectCouponEffectProps:
    • condition_index - The index of the condition that caused the rejection of the coupon
    • effect_index - The index of the effect that caused the rejection of the coupon
    • details - More details about the failure (if available)
  • The same applies for referrals, when a referral is rejected we attach more details regarding the origin of the failure in RejectReferralEffectProps:
    • condition_index - The index of the condition that caused the rejection of the referral
    • effect_index - The index of the effect that caused the rejection of the referral
    • details - More details about the failure (if available)

Moreover, we have introduced a new response content, ruleFailureReasons, which when requested will attach to the response a collection containing all failed rules, with details (see the ruleFailureReason model to help narrowing down failures and further debugging efforts to a specific single condition or effect that caused the failure.

One "gotcha" to keep in mind: in order to maximize transparency, and due to the fact that we do not know in advance which campaign in the application the request targets, the list contains a collection of all failure reasons.

Meaning that, it might have "white noise" with data about failures that could be considered as "obvious" to the consumer. Therefore, we suggest always filtering the list by the campaign id that was expected to trigger and did not.

☝️ Back to Table of Contents

Attach Loyalty Program ID in responses

When the consumer requires that the response will contain the details of loyalty programs involved in processing the requests, we now attach the identifier of the loyalty program to the returned loyaltyProgramLedgers models.

The idea behind attaching the identifier is to help streamline further potential requests to our Management API with regard to details about a Loyalty Program, for example getLoyaltyStatistics or getLoyaltyPoints, that require the program identifier as part of the URI of the endpoint.

☝️ Back to Table of Contents

⚠️ A reminder of The Deprecation Notice: Integration API@v1 endpoints

The deprecation was introduced already in the last release of the SDK, here is a kind reminder of the deprecation notices for Integration API@v1 endpoints:

These endpoints will be flagged deprecated on 15.07.2021, meaning support for requests to these endpoints will end on that date. We will not remove the endpoints, and they will still be accessible for you to use.

We highly encourage migrating to the correspondent v2 endpoints for easier and more granular integration, as well as new features support (See our developer docs section about API V2.0).

☝️ Back to Table of Contents

v2.2.0: Loyalty Programs pending points & statistics, Introducing Loyalty customer inventory, customer profiles v2 integration dry runs

16 Oct 08:27
7f4dbfd
Compare
Choose a tag to compare

Summary

Integration API

  • Introduce loyalty flag in getCustomerInventory endpoint to retrieve also profile's loyalty programs subscription and stats upon querying the endpoint
  • Introduce flags to control whether a customer profile update request v2 should be a "dry run" or force it to "run rule engine"

⚠️ Deprecation Notice: Integration API@v1 endpoints

This version also introduced the deprecation notices for Integration API@v1 endpoints:

These endpoints will be flagged deprecated on 15.07.2021, meaning support for requests to these endpoints will end on that date. We will not remove the endpoints, and they will still be accessible for you to use.

We do encourage migrating to the correspondent v2 endpoints for easier and more granular integration, as well as new features support (See our developer docs section about API V2.0).

Loyalty Programs

Introduce Loyalty Program pending points: points that belong to the program's balance but will become active in the future:

  • Introduce Loyalty Program setting to control default points' pending duration
  • Introduce a couple of new attributes to communicate better a ledger's points status (pending, active, expired and spent)
  • Introduce Loyalty Programs statistics endpoint to get a loyalty program stats snapshot

⚠️⚠️ Breaking Change: Loyalty Program points addition payload

This version also introduced the ability to set both loyalty points pending and validity durations.
In order to communicate these more clearly, we have renamed the former expiry_duration attribute of LoyaltyPoints entity to validity_duration:

program_id = '1'
integration_id = 'Customer_Profile_ID'
body = TalonOne::LoyaltyPoints.new(
  name: 'Points to expire in 3 days',
  points: 42.42,
-  expiry_duration: '72h'
+  validity_duration: '72h'
)

try:
  api_instance.add_loyalty_points(program_id, integration_id, body)
# ...

⚠️ Deprecation Notice: Loyalty Program Ledger's total property

Please note that we are deprecating the total property of the LoyaltySubLedger entity. In order to be more transparent and express better distinction between a customer's balance in a program (active, pending, and expired points).

We will remove this property in the next version of the SDK, please use the new totalActivePoints property instead.

Sandbox/Live Applications & Account Analytics

Applications now can be flagged as live or sandbox (available only via the web application):

  • This can be seen via the sandbox attribute of the Application entity
  • Account analytics now respect this separation and reports new data points: liveApplications, sandboxApplications and liveActiveCampaigns

Misc: OpenAPI Generator version upgrade

We have upgraded the OpenAPI Generator used to release this SDK from v4.2.3 to v4.3.1 which includes a few subtle improvements in the generated code, for full list of changes, please consult the release logs' under the Ruby section.