Skip to content

Commit

Permalink
v3.0.0: Reopen session endpoint, loyalty data integration endpoints a…
Browse files Browse the repository at this point in the history
…nd loyalty card management endpoints (#22)

## 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)

### ⚠️⚠️  Migration to v3.0.0 from prior versions
As part of introducing and incorporating [Cart Item Catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs) in the SDKs, we had to introduce some breaking changes to our `CartItem` model. 

Please refer to [this migration guide](https://github.com/talon-one/talon_go/blob/master/migrations/Migration-v3.md) for a detailed explanation about the required changes.

## ⚠️ 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
* Fix talang expression field definitions
* Use management-key authorization in README's mgmt API example
* v3 migration guide, module version README examples
  • Loading branch information
altJake authored Apr 28, 2023
1 parent f0d0b19 commit bfaee0c
Show file tree
Hide file tree
Showing 637 changed files with 39,448 additions and 12,061 deletions.
164 changes: 118 additions & 46 deletions README.md

Large diffs are not rendered by default.

13,470 changes: 8,558 additions & 4,912 deletions api/openapi.yaml

Large diffs are not rendered by default.

1,388 changes: 1,163 additions & 225 deletions api_integration.go

Large diffs are not rendered by default.

11,203 changes: 7,965 additions & 3,238 deletions api_management.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* 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 are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}`
* 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}`
*
* API version: 1.0.0
* API version:
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/

Expand Down Expand Up @@ -39,7 +39,7 @@ var (
xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
)

// APIClient manages communication with the Talon.One API API v1.0.0
// APIClient manages communication with the Talon.One API API v
// In most cases there should be only one, shared, APIClient.
type APIClient struct {
cfg *Configuration
Expand Down
6 changes: 3 additions & 3 deletions configuration.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* 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 are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}`
* 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}`
*
* API version: 1.0.0
* API version:
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/

Expand Down Expand Up @@ -97,7 +97,7 @@ type Configuration struct {
func NewConfiguration() *Configuration {
cfg := &Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/2.6.1/go",
UserAgent: "OpenAPI-Generator/3.0.0/go",
Debug: false,
Servers: ServerConfigurations{
{
Expand Down
6 changes: 3 additions & 3 deletions docs/Account.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int32** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. |
**Created** | Pointer to [**time.Time**](time.Time.md) | The exact moment this entity was created. |
**Modified** | Pointer to [**time.Time**](time.Time.md) | The exact moment this entity was last modified. |
**Id** | Pointer to **int32** | Internal ID of this entity. |
**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**Modified** | Pointer to [**time.Time**](time.Time.md) | The time this entity was last modified. |
**CompanyName** | Pointer to **string** | |
**DomainName** | Pointer to **string** | Subdomain Name for yourcompany.talon.one. |
**State** | Pointer to **string** | State of the account (active, deactivated). |
Expand Down
8 changes: 4 additions & 4 deletions docs/AccountAdditionalCost.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int32** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. |
**Created** | Pointer to [**time.Time**](time.Time.md) | The exact moment this entity was created. |
**Id** | Pointer to **int32** | Internal ID of this entity. |
**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. |
**AccountId** | Pointer to **int32** | The ID of the account that owns this entity. |
**Name** | Pointer to **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. |
**Name** | Pointer to **string** | The internal name used in API requests. |
**Title** | Pointer to **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. |
**Description** | Pointer to **string** | A description of this additional cost. |
**SubscribedApplicationsIds** | Pointer to **[]int32** | A list of the IDs of the applications that are subscribed to this additional cost. | [optional]
**Type** | Pointer to **string** | The type of additional cost. The following options can be chosen: - `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 TYPE_SESSION]
**Type** | Pointer to **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 TYPE_SESSION]

## Methods

Expand Down
169 changes: 169 additions & 0 deletions docs/AccountDashboardStatistic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# AccountDashboardStatistic

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Revenue** | Pointer to [**[]AccountDashboardStatisticRevenue**](AccountDashboardStatisticRevenue.md) | Aggregated statistic for account revenue. | [optional]
**Discounts** | Pointer to [**[]AccountDashboardStatisticDiscount**](AccountDashboardStatisticDiscount.md) | Aggregated statistic for account discount. | [optional]
**LoyaltyPoints** | Pointer to [**[]AccountDashboardStatisticLoyaltyPoints**](AccountDashboardStatisticLoyaltyPoints.md) | Aggregated statistic for account loyalty points. | [optional]
**Referrals** | Pointer to [**[]AccountDashboardStatisticReferrals**](AccountDashboardStatisticReferrals.md) | Aggregated statistic for account referrals. | [optional]
**ApiCalls** | Pointer to [**[]AccountDashboardStatisticApiCalls**](AccountDashboardStatisticApiCalls.md) | Aggregated statistic for the number of account API calls. | [optional]
**Campaigns** | Pointer to [**AccountDashboardStatisticCampaigns**](AccountDashboardStatisticCampaigns.md) | |

## Methods

### GetRevenue

`func (o *AccountDashboardStatistic) GetRevenue() []AccountDashboardStatisticRevenue`

GetRevenue returns the Revenue field if non-nil, zero value otherwise.

### GetRevenueOk

`func (o *AccountDashboardStatistic) GetRevenueOk() ([]AccountDashboardStatisticRevenue, bool)`

GetRevenueOk returns a tuple with the Revenue field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### HasRevenue

`func (o *AccountDashboardStatistic) HasRevenue() bool`

HasRevenue returns a boolean if a field has been set.

### SetRevenue

`func (o *AccountDashboardStatistic) SetRevenue(v []AccountDashboardStatisticRevenue)`

SetRevenue gets a reference to the given []AccountDashboardStatisticRevenue and assigns it to the Revenue field.

### GetDiscounts

`func (o *AccountDashboardStatistic) GetDiscounts() []AccountDashboardStatisticDiscount`

GetDiscounts returns the Discounts field if non-nil, zero value otherwise.

### GetDiscountsOk

`func (o *AccountDashboardStatistic) GetDiscountsOk() ([]AccountDashboardStatisticDiscount, bool)`

GetDiscountsOk returns a tuple with the Discounts field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### HasDiscounts

`func (o *AccountDashboardStatistic) HasDiscounts() bool`

HasDiscounts returns a boolean if a field has been set.

### SetDiscounts

`func (o *AccountDashboardStatistic) SetDiscounts(v []AccountDashboardStatisticDiscount)`

SetDiscounts gets a reference to the given []AccountDashboardStatisticDiscount and assigns it to the Discounts field.

### GetLoyaltyPoints

`func (o *AccountDashboardStatistic) GetLoyaltyPoints() []AccountDashboardStatisticLoyaltyPoints`

GetLoyaltyPoints returns the LoyaltyPoints field if non-nil, zero value otherwise.

### GetLoyaltyPointsOk

`func (o *AccountDashboardStatistic) GetLoyaltyPointsOk() ([]AccountDashboardStatisticLoyaltyPoints, bool)`

GetLoyaltyPointsOk returns a tuple with the LoyaltyPoints field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### HasLoyaltyPoints

`func (o *AccountDashboardStatistic) HasLoyaltyPoints() bool`

HasLoyaltyPoints returns a boolean if a field has been set.

### SetLoyaltyPoints

`func (o *AccountDashboardStatistic) SetLoyaltyPoints(v []AccountDashboardStatisticLoyaltyPoints)`

SetLoyaltyPoints gets a reference to the given []AccountDashboardStatisticLoyaltyPoints and assigns it to the LoyaltyPoints field.

### GetReferrals

`func (o *AccountDashboardStatistic) GetReferrals() []AccountDashboardStatisticReferrals`

GetReferrals returns the Referrals field if non-nil, zero value otherwise.

### GetReferralsOk

`func (o *AccountDashboardStatistic) GetReferralsOk() ([]AccountDashboardStatisticReferrals, bool)`

GetReferralsOk returns a tuple with the Referrals field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### HasReferrals

`func (o *AccountDashboardStatistic) HasReferrals() bool`

HasReferrals returns a boolean if a field has been set.

### SetReferrals

`func (o *AccountDashboardStatistic) SetReferrals(v []AccountDashboardStatisticReferrals)`

SetReferrals gets a reference to the given []AccountDashboardStatisticReferrals and assigns it to the Referrals field.

### GetApiCalls

`func (o *AccountDashboardStatistic) GetApiCalls() []AccountDashboardStatisticApiCalls`

GetApiCalls returns the ApiCalls field if non-nil, zero value otherwise.

### GetApiCallsOk

`func (o *AccountDashboardStatistic) GetApiCallsOk() ([]AccountDashboardStatisticApiCalls, bool)`

GetApiCallsOk returns a tuple with the ApiCalls field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### HasApiCalls

`func (o *AccountDashboardStatistic) HasApiCalls() bool`

HasApiCalls returns a boolean if a field has been set.

### SetApiCalls

`func (o *AccountDashboardStatistic) SetApiCalls(v []AccountDashboardStatisticApiCalls)`

SetApiCalls gets a reference to the given []AccountDashboardStatisticApiCalls and assigns it to the ApiCalls field.

### GetCampaigns

`func (o *AccountDashboardStatistic) GetCampaigns() AccountDashboardStatisticCampaigns`

GetCampaigns returns the Campaigns field if non-nil, zero value otherwise.

### GetCampaignsOk

`func (o *AccountDashboardStatistic) GetCampaignsOk() (AccountDashboardStatisticCampaigns, bool)`

GetCampaignsOk returns a tuple with the Campaigns field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### HasCampaigns

`func (o *AccountDashboardStatistic) HasCampaigns() bool`

HasCampaigns returns a boolean if a field has been set.

### SetCampaigns

`func (o *AccountDashboardStatistic) SetCampaigns(v AccountDashboardStatisticCampaigns)`

SetCampaigns gets a reference to the given AccountDashboardStatisticCampaigns and assigns it to the Campaigns field.


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


65 changes: 65 additions & 0 deletions docs/AccountDashboardStatisticApiCalls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# AccountDashboardStatisticApiCalls

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Total** | Pointer to **float32** | Total number of API calls received. |
**Datetime** | Pointer to [**time.Time**](time.Time.md) | Values aggregated for the specified date. |

## Methods

### GetTotal

`func (o *AccountDashboardStatisticApiCalls) GetTotal() float32`

GetTotal returns the Total field if non-nil, zero value otherwise.

### GetTotalOk

`func (o *AccountDashboardStatisticApiCalls) GetTotalOk() (float32, bool)`

GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### HasTotal

`func (o *AccountDashboardStatisticApiCalls) HasTotal() bool`

HasTotal returns a boolean if a field has been set.

### SetTotal

`func (o *AccountDashboardStatisticApiCalls) SetTotal(v float32)`

SetTotal gets a reference to the given float32 and assigns it to the Total field.

### GetDatetime

`func (o *AccountDashboardStatisticApiCalls) GetDatetime() time.Time`

GetDatetime returns the Datetime field if non-nil, zero value otherwise.

### GetDatetimeOk

`func (o *AccountDashboardStatisticApiCalls) GetDatetimeOk() (time.Time, bool)`

GetDatetimeOk returns a tuple with the Datetime field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### HasDatetime

`func (o *AccountDashboardStatisticApiCalls) HasDatetime() bool`

HasDatetime returns a boolean if a field has been set.

### SetDatetime

`func (o *AccountDashboardStatisticApiCalls) SetDatetime(v time.Time)`

SetDatetime gets a reference to the given time.Time and assigns it to the Datetime field.


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


65 changes: 65 additions & 0 deletions docs/AccountDashboardStatisticCampaigns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# AccountDashboardStatisticCampaigns

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Live** | Pointer to **int32** | Number of campaigns that are active and live (across all Applications). |
**EndingSoon** | Pointer to **int32** | Campaigns with a schedule ending in 7 days or with only 10% of budget left. |

## Methods

### GetLive

`func (o *AccountDashboardStatisticCampaigns) GetLive() int32`

GetLive returns the Live field if non-nil, zero value otherwise.

### GetLiveOk

`func (o *AccountDashboardStatisticCampaigns) GetLiveOk() (int32, bool)`

GetLiveOk returns a tuple with the Live field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### HasLive

`func (o *AccountDashboardStatisticCampaigns) HasLive() bool`

HasLive returns a boolean if a field has been set.

### SetLive

`func (o *AccountDashboardStatisticCampaigns) SetLive(v int32)`

SetLive gets a reference to the given int32 and assigns it to the Live field.

### GetEndingSoon

`func (o *AccountDashboardStatisticCampaigns) GetEndingSoon() int32`

GetEndingSoon returns the EndingSoon field if non-nil, zero value otherwise.

### GetEndingSoonOk

`func (o *AccountDashboardStatisticCampaigns) GetEndingSoonOk() (int32, bool)`

GetEndingSoonOk returns a tuple with the EndingSoon field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### HasEndingSoon

`func (o *AccountDashboardStatisticCampaigns) HasEndingSoon() bool`

HasEndingSoon returns a boolean if a field has been set.

### SetEndingSoon

`func (o *AccountDashboardStatisticCampaigns) SetEndingSoon(v int32)`

SetEndingSoon gets a reference to the given int32 and assigns it to the EndingSoon field.


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


Loading

0 comments on commit bfaee0c

Please sign in to comment.