Skip to content

Releases: talon-one/TalonOnePHPsdk

v9.0.0

01 Oct 09:13
cded315
Compare
Choose a tag to compare

Summary

New endpoints

Integration API

generateLoyaltyCard | POST /v1/loyalty_programs/{loyaltyProgramId}/cards | Generate loyalty card

Management API

createBatchLoyaltyCards | POST /v1/loyalty_programs/{loyaltyProgramId}/cards/batch | Create loyalty cards
createCouponsDeletionJob | POST /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs | Creates a coupon deletion job
disconnectCampaignStores | DELETE /v1/applications/{applicationId}/campaigns/{campaignId}/stores | Disconnect stores
exportCampaignStores | GET /v1/applications/{applicationId}/campaigns/{campaignId}/stores/export | Export stores
exportLoyaltyCards | GET /v1/loyalty_programs/{loyaltyProgramId}/cards/export | Export loyalty cards
importCampaignStores | POST /v1/applications/{applicationId}/campaigns/{campaignId}/stores/import | Import stores
oktaEventHandlerChallenge | GET /v1/provisioning/okta | Validate Okta API ownership
scimCreateUser | POST /v1/provisioning/scim/Users | Create SCIM user
scimDeleteUser | DELETE /v1/provisioning/scim/Users/{userId} | Delete SCIM user
scimGetResourceTypes | GET /v1/provisioning/scim/ResourceTypes | List supported SCIM resource types
scimGetSchemas | GET /v1/provisioning/scim/Schemas | List supported SCIM schemas
scimGetServiceProviderConfig | GET /v1/provisioning/scim/ServiceProviderConfig | Get SCIM service provider configuration
scimGetUser | GET /v1/provisioning/scim/Users/{userId} | Get SCIM user
scimGetUsers | GET /v1/provisioning/scim/Users | List SCIM users
scimPatchUser | PATCH /v1/provisioning/scim/Users/{userId} | Update SCIM user attributes
scimReplaceUserAttributes | PUT /v1/provisioning/scim/Users/{userId} | Update SCIM user

Changes

Management API

activateUserByEmail | POST /v1/users/activate | Enable user by email address
deactivateUserByEmail | POST /v1/users/deactivate | Disable user by email address

v8.0.0

11 Jun 06:17
26a8ef1
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}

v7.0.0

v6.0.0: Track Event V2 endpoint, loyalty integration endpoint and loyalty, catalogs management endpoints

10 Nov 10:53
5621a90
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 TrackEventV2 instead /v2/events.
  • 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

v5.1.0: Fix PHP 8.1 incompatibility issues in SDK

24 Aug 12:50
99ce1f1
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v5.0.0...v5.1.0

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

03 May 21:06
a6e7140
Compare
Choose a tag to compare

v4.0.1: Fix query parameters are not processed forwarded to the request as expected

05 Jan 14:00
4d51b5d
Compare
Choose a tag to compare

v4.0.1

Bug Fixes

  • fix: Query params are not processed and forwarded for api calls by @altJake in #16

v4.0.0: Collection Items, Catalog Sync Loyalty Transactions retrieval & Guzzle's v7 adjustments

16 Nov 17:29
2921b99
Compare
Choose a tag to compare

v4.0.0

New features support:

⚠️ Upgrade Guzzle dependency to ^7

Starting version 4.0.0, we have updated the dependency of guzzlehttp/guzzle from >= 5.3 to ^7, this is why we have also bumped a major version of the library itself.

The code is now adjusted to use Guzzle's new functions when building parameters similarly to the development versions 3.5.0 and 3.6.0.

If you have already updated the dependency in your code to one of those versions, upgrading to v4.0.0 should impose no more further changes.

v3.4.0: Multiple personal coupons creation endpoint, Loyalty and Referrals counters and Export Endpoints

14 Feb 17:54
f1111e0
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:

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

$loyalty_program_id = '1';
$export_data = $managerApi->exportLoyaltyBalance($loyalty_program_id);

$csv = str_getcsv($export_data);
$headers = array_shift($csv); // extracting headers and remove their line

foreach ($csv as $line) {
    // do something with line...
    print_r($line);
}

One can also map the contents into object per line, with the headers as the object's keys using the snippet in the following link

☝️ 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:

  • createdLoyaltyPointsCount : Total number of loyalty points created by rules in this campaign
  • createdLoyaltyPointsEffectCount : Total number of loyalty point creation effects triggered by rules in this campaign
  • redeemedLoyaltyPointsCount : Total number of loyalty points redeemed by rules in this campaign
  • redeemedLoyaltyPointsEffectCount : Total number of loyalty point redemption effects triggered by rules in this campaign
  • referralCreationCount : Total number of referrals created by rules in this campaign

☝️ Back to Table of Contents

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

Campaign's discountCount 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:

- **discountCount** | **int** | Total amount of discounts redeemed in the campaign. | [optional] 
+ **discountCount** | **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:
    • conditionIndex - The index of the condition that caused the rejection of the coupon
    • effectIndex - 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:
    • conditionIndex - The index of the condition that caused the rejection of the referral
    • effectIndex - 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](#user-co...

Read more

v3.3.0: Customer Profile Update v2 dry runs & Loyalty Program Statistics

10 Oct 21:01
67a63e7
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"

Loyalty Programs

  • Introduce Loyalty Programs statistics endpoint to get a loyalty program stats snapshot

Account Analytics

  • Account analytics now respect live/sandbox application flagging 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 PHP section.