Skip to content

Commit 0c2afbd

Browse files
authored
v5.0.0: Reopen session endpoint, loyalty data integration endpoints and loyalty card management endpoints (#26)
## Summary ### Integration API - [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession) - [Get customer's loyalty points](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyBalances) - [List customer's loyalty transactions](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions) - [Get card's point balances](https://docs.talon.one/integration-api#tag/Loyalty-cards/operation/getLoyaltyCardBalances) - [List card's transactions](https://docs.talon.one/integration-api#tag/Loyalty-cards/operation/getLoyaltyCardTransactions) - [Link customer profile to card](https://docs.talon.one/integration-api#tag/Loyalty-cards/operation/linkLoyaltyCardToProfile) ### Management API - [Add points to card](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/addLoyaltyCardPoints) - [Deduct points from card](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/deductLoyaltyCardPoints) - [Delete loyalty card](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/deleteLoyaltyCard) - [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) - [Get loyalty card](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCard) - [Import loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/importLoyaltyCards) - [Transfer card data](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/transferLoyaltyCard) - [Update loyalty card status](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/updateLoyaltyCard) - [List card's transactions](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCardTransactionLogs) - [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) - [Export customer loyalty balances](https://docs.talon.one/management-api#tag/Loyalty/operation/exportLoyaltyBalances) -- please note deprecation notice blow - [Export all card transaction logs](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/exportLoyaltyCardBalances) - [Export card's ledger log](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/exportLoyaltyCardLedger) ## Dependencies Upgrades - **`Newtonsoft.Json`**: `12.0.1` -> `13.0.2`; closes #25 - **`RestSharp`**: `106.10.1` -> `106.15.0`; closes #16 ## Fix import endpoints bug with due to RestSharp's older version 🎉 Import endpoints are now functional. **Please note** that the `upFile` argument that each endpoint expects is expected to hold the _contents_ to be imported. It's the consumer's responsibility to read the csv file to be imported, or create a csv-string and send it as the `upFile` argument. Below is an example for importing loyalty points, provided a csv file holding the contents named `loyalty-import.csv`: ```C# // initiate management api instance // ... string upFile = File.ReadAllText("/path/to/file/loyalty-import.csv"); int programID = 42; var response = mgmtAPI.ImportLoyaltyPoints(programID, upFile); ``` ## ⚠️ Deprecation Notice: Export customer loyalty balance to CSV endpoint Please note that the [Export customer loyalty balance to CSV](https://docs.talon.one/management-api#tag/Loyalty/operation/exportLoyaltyBalance) endpoint is getting deprecated, please update your code to point at the new [Export customer loyalty balances](https://docs.talon.one/management-api#tag/Loyalty/operation/exportLoyaltyBalances) ## Commit Summary * Initial Commit * Makefile small improvements * Upgrade underlying dependencies * Fixes double authentication for mgmt endpoints * Migrate RestSharp AddHandler functions to support 106.15.0 * Apply "emitdefaultvalue" fix to models
1 parent 07c63af commit 0c2afbd

File tree

1,129 files changed

+58725
-13698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,129 files changed

+58725
-13698
lines changed

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
BUILD_DIR=src/TalonOne
2-
VERSION=$(shell grep -om1 -E '^\[assembly: AssemblyVersion\("[0-9\.]+"\)\]$$' $(PWD)/$(BUILD_DIR)/Properties/AssemblyInfo.cs | sed 's/\[assembly: AssemblyVersion("\(.*\)")\]/\1/')
1+
BUILD_DIR:=src/TalonOne
2+
VERSION:=$(shell grep -om1 -E '^\[assembly: AssemblyVersion\("[0-9\.]+"\)\]$$' $(PWD)/$(BUILD_DIR)/Properties/AssemblyInfo.cs | sed 's/\[assembly: AssemblyVersion("\(.*\)")\]/\1/')
3+
DOCKER_TAG_ARCH:=$(shell [[ $(shell uname -m) == "arm64" ]] && echo "3.1-focal-arm64v8" || echo "sdk:3.1-focal")
4+
5+
default: testenv
36

47
clean:
58
rm -rf $(PWD)/$(BUILD_DIR)/TalonOne.$(VERSION)*.nupkg && \
@@ -14,7 +17,7 @@ endif
1417
--rm \
1518
-v $(PWD):/tmp/talon-client \
1619
-w "/tmp/talon-client/$(BUILD_DIR)" \
17-
mcr.microsoft.com/dotnet/sdk:3.1-focal \
20+
mcr.microsoft.com/dotnet/sdk:$(DOCKER_TAG_ARCH) \
1821
dotnet pack TalonOne.csproj \
1922
-p:PackageVersion=$(VERSION) \
2023
--output . \
@@ -34,15 +37,16 @@ endif
3437
--rm \
3538
-v $(PWD):/tmp/talon-client \
3639
-w "/tmp/talon-client/$(BUILD_DIR)" \
37-
mcr.microsoft.com/dotnet/sdk:3.1-focal \
40+
mcr.microsoft.com/dotnet/sdk:$(DOCKER_TAG_ARCH) \
3841
dotnet nuget push TalonOne.$(VERSION).nupkg \
3942
--api-key $(apiKey) \
4043
--source https://api.nuget.org/v3/index.json
4144

45+
.PHONY: testenv
4246
testenv:
4347
docker run \
4448
--rm -it \
4549
-v $(PWD):/tmp/talon-client \
4650
-w /tmp/talon-client \
47-
mcr.microsoft.com/dotnet/sdk:3.1-focal \
51+
mcr.microsoft.com/dotnet/sdk:$(DOCKER_TAG_ARCH) \
4852
/bin/bash

README.md

Lines changed: 186 additions & 55 deletions
Large diffs are not rendered by default.

docs/AcceptCouponEffectProps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The properties specific to the \"acceptCoupon\" effect. This gets triggered when
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**Value** | **string** | The coupon code that was accepted |
7+
**Value** | **string** | The coupon code that was accepted. |
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

docs/AcceptReferralEffectProps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The properties specific to the \"acceptReferral\" effect. TThis gets triggered w
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**Value** | **string** | The referral code that was accepted |
7+
**Value** | **string** | The referral code that was accepted. |
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

docs/AccessLogEntry.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# TalonOne.Model.AccessLogEntry
2-
Log of application accesses
2+
Log of application accesses.
33
## Properties
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**Uuid** | **string** | UUID reference of request |
8-
**Status** | **int** | HTTP status code of response |
9-
**Method** | **string** | HTTP method of request |
7+
**Uuid** | **string** | UUID reference of request. |
8+
**Status** | **int** | HTTP status code of response. |
9+
**Method** | **string** | HTTP method of request. |
1010
**RequestUri** | **string** | target URI of request |
1111
**Time** | **DateTime** | timestamp of request |
1212
**RequestPayload** | **string** | payload of request |

docs/Account.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**Id** | **int** | Unique ID for this entity. |
7-
**Created** | **DateTime** | The exact moment this entity was created. |
8-
**Modified** | **DateTime** | The exact moment this entity was last modified. |
6+
**Id** | **int** | Internal ID of this entity. |
7+
**Created** | **DateTime** | The time this entity was created. |
8+
**Modified** | **DateTime** | The time this entity was last modified. |
99
**CompanyName** | **string** | |
10-
**DomainName** | **string** | Subdomain Name for yourcompany.talon.one |
11-
**State** | **string** | State of the account (active, deactivated) |
10+
**DomainName** | **string** | Subdomain Name for yourcompany.talon.one. |
11+
**State** | **string** | State of the account (active, deactivated). |
1212
**BillingEmail** | **string** | The billing email address associated with your company account. |
1313
**PlanName** | **string** | The name of your booked plan. | [optional]
1414
**PlanExpires** | **DateTime** | The point in time at which your current plan expires. | [optional]
@@ -20,7 +20,7 @@ Name | Type | Description | Notes
2020
**UserCount** | **int** | The current number of Campaign Manager Users in your account. |
2121
**CampaignsActiveCount** | **int** | The current number of active Campaigns in your account. |
2222
**CampaignsInactiveCount** | **int** | The current number of inactive Campaigns in your account. |
23-
**Attributes** | [**Object**](.md) | Arbitrary properties associated with this campaign | [optional]
23+
**Attributes** | [**Object**](.md) | Arbitrary properties associated with this campaign. | [optional]
2424

2525
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2626

docs/AccountAdditionalCost.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33

44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**Id** | **int** | Unique ID for this entity. |
7-
**Created** | **DateTime** | The exact moment this entity was created. |
6+
**Id** | **int** | Internal ID of this entity. |
7+
**Created** | **DateTime** | The time this entity was created. |
88
**AccountId** | **int** | The ID of the account that owns this entity. |
9-
**Name** | **string** | The additional cost name that will be used in API requests and Talang. E.g. if `name == \"shipping\"` then you would set the shipping additional cost by including an `additionalCosts.shipping` property in your request payload. |
9+
**Name** | **string** | The internal name used in API requests. |
1010
**Title** | **string** | The human-readable name for the additional cost that will be shown in the Campaign Manager. Like `name`, the combination of entity and title must also be unique. |
1111
**Description** | **string** | A description of this additional cost. |
12-
**SubscribedApplicationsIds** | **List<int>** | A list of the IDs of the applications that are subscribed to this additional cost | [optional]
12+
**SubscribedApplicationsIds** | **List<int>** | A list of the IDs of the applications that are subscribed to this additional cost. | [optional]
13+
**Type** | **string** | The type of additional cost. Possible value: - `session`: Additional cost will be added per session. - `item`: Additional cost will be added per item. - `both`: Additional cost will be added per item and session. | [optional] [default to TypeEnum.Session]
1314

1415
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1516

docs/AccountAnalytics.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33

44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**Applications** | **int** | Total number of applications in the account |
7-
**LiveApplications** | **int** | Total number of live applications in the account |
8-
**SandboxApplications** | **int** | Total number of sandbox applications in the account |
9-
**Campaigns** | **int** | Total number of campaigns in the account |
10-
**ActiveCampaigns** | **int** | Total number of active campaigns in the account |
11-
**LiveActiveCampaigns** | **int** | Total number of active campaigns in live applications in the account |
12-
**Coupons** | **int** | Total number of coupons in the account |
13-
**ActiveCoupons** | **int** | Total number of active coupons in the account |
14-
**ExpiredCoupons** | **int** | Total number of expired coupons in the account |
15-
**ReferralCodes** | **int** | Total number of referral codes in the account |
16-
**ActiveReferralCodes** | **int** | Total number of active referral codes in the account |
17-
**ExpiredReferralCodes** | **int** | Total number of expired referral codes in the account |
18-
**ActiveRules** | **int** | Total number of active rules in the account |
19-
**Users** | **int** | Total number of users in the account |
20-
**Roles** | **int** | Total number of roles in the account |
21-
**CustomAttributes** | **int** | Total number of custom attributes in the account |
22-
**Webhooks** | **int** | Total number of webhooks in the account |
23-
**LoyaltyPrograms** | **int** | Total number of all loyalty programs in the account |
24-
**LiveLoyaltyPrograms** | **int** | Total number of live loyalty programs in the account |
6+
**Applications** | **int** | Total number of applications in the account. |
7+
**LiveApplications** | **int** | Total number of live applications in the account. |
8+
**SandboxApplications** | **int** | Total number of sandbox applications in the account. |
9+
**Campaigns** | **int** | Total number of campaigns in the account. |
10+
**ActiveCampaigns** | **int** | Total number of active campaigns in the account. |
11+
**LiveActiveCampaigns** | **int** | Total number of active campaigns in live applications in the account. |
12+
**Coupons** | **int** | Total number of coupons in the account. |
13+
**ActiveCoupons** | **int** | Total number of active coupons in the account. |
14+
**ExpiredCoupons** | **int** | Total number of expired coupons in the account. |
15+
**ReferralCodes** | **int** | Total number of referral codes in the account. |
16+
**ActiveReferralCodes** | **int** | Total number of active referral codes in the account. |
17+
**ExpiredReferralCodes** | **int** | Total number of expired referral codes in the account. |
18+
**ActiveRules** | **int** | Total number of active rules in the account. |
19+
**Users** | **int** | Total number of users in the account. |
20+
**Roles** | **int** | Total number of roles in the account. |
21+
**CustomAttributes** | **int** | Total number of custom attributes in the account. |
22+
**Webhooks** | **int** | Total number of webhooks in the account. |
23+
**LoyaltyPrograms** | **int** | Total number of all loyalty programs in the account. |
24+
**LiveLoyaltyPrograms** | **int** | Total number of live loyalty programs in the account. |
2525

2626
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2727

docs/AccountDashboardStatistic.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# TalonOne.Model.AccountDashboardStatistic
2+
## Properties
3+
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**Revenue** | [**List<AccountDashboardStatisticRevenue>**](AccountDashboardStatisticRevenue.md) | Aggregated statistic for account revenue. | [optional]
7+
**Discounts** | [**List<AccountDashboardStatisticDiscount>**](AccountDashboardStatisticDiscount.md) | Aggregated statistic for account discount. | [optional]
8+
**LoyaltyPoints** | [**List<AccountDashboardStatisticLoyaltyPoints>**](AccountDashboardStatisticLoyaltyPoints.md) | Aggregated statistic for account loyalty points. | [optional]
9+
**Referrals** | [**List<AccountDashboardStatisticReferrals>**](AccountDashboardStatisticReferrals.md) | Aggregated statistic for account referrals. | [optional]
10+
**ApiCalls** | [**List<AccountDashboardStatisticApiCalls>**](AccountDashboardStatisticApiCalls.md) | Aggregated statistic for the number of account API calls. | [optional]
11+
**Campaigns** | [**AccountDashboardStatisticCampaigns**](AccountDashboardStatisticCampaigns.md) | |
12+
13+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# TalonOne.Model.AccountDashboardStatisticApiCalls
2+
## Properties
3+
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**Total** | **decimal** | Total number of API calls received. |
7+
**Datetime** | **DateTime** | Values aggregated for the specified date. |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+

0 commit comments

Comments
 (0)