Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Bug report
description: Report a reproducible bug
title: "[Bug] "
labels:
- bug

body:
- type: markdown
attributes:
value: |
🙏 **Thanks for reporting this issue.**

We will review it and aim to provide a fix within the next **2 weeks**.

- type: textarea
id: summary
attributes:
label: Summary
description: Describe the problem clearly.
placeholder: |
Describe the problem clearly.

- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Go to ...
2. Click ...
3. Observe ...

- type: textarea
id: expected
attributes:
label: Expected behavior
placeholder: |
What should have happened?

- type: textarea
id: actual
attributes:
label: Actual behavior
placeholder: |
What happened instead?
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ stages:
- pip install -r test-requirements.txt
- pytest --cov=talon_one

pytest-3.9:
extends: .pytest
image: python:3.9-alpine
pytest-3.10:
extends: .pytest
image: python:3.10-alpine
Expand All @@ -29,3 +26,6 @@ pytest-3.12:
pytest-3.13:
extends: .pytest
image: python:3.13-alpine
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
20 changes: 20 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.github/ISSUE_TEMPLATE/bug_report.yml
.github/ISSUE_TEMPLATE/config.yml
.github/workflows/autorelease.yml
.github/workflows/publish_to_pypi.yml
.github/workflows/test.yml
Expand Down Expand Up @@ -119,6 +121,9 @@ docs/CampaignDeletedNotificationItem.md
docs/CampaignDetail.md
docs/CampaignEditedNotification.md
docs/CampaignEditedNotificationItem.md
docs/CampaignEligibility.md
docs/CampaignEligibilityDetails.md
docs/CampaignEligibilityFailureDetails.md
docs/CampaignEntity.md
docs/CampaignEvaluationGroup.md
docs/CampaignEvaluationPosition.md
Expand Down Expand Up @@ -588,6 +593,8 @@ docs/RollbackDiscountEffectProps.md
docs/RollbackIncreasedAchievementProgressEffectProps.md
docs/RollbackReferralEffectProps.md
docs/Rule.md
docs/RuleEligibility.md
docs/RuleEligibilityFailureDetails.md
docs/RuleFailureReason.md
docs/RuleMetadata.md
docs/Ruleset.md
Expand Down Expand Up @@ -694,6 +701,7 @@ docs/UpdatePicklist.md
docs/UpdatePriceType.md
docs/UpdateReferral.md
docs/UpdateReferralBatch.md
docs/UpdateReward.md
docs/UpdateRole.md
docs/UpdateStore.md
docs/UpdateUser.md
Expand Down Expand Up @@ -833,6 +841,9 @@ talon_one/models/campaign_deleted_notification_item.py
talon_one/models/campaign_detail.py
talon_one/models/campaign_edited_notification.py
talon_one/models/campaign_edited_notification_item.py
talon_one/models/campaign_eligibility.py
talon_one/models/campaign_eligibility_details.py
talon_one/models/campaign_eligibility_failure_details.py
talon_one/models/campaign_entity.py
talon_one/models/campaign_evaluation_group.py
talon_one/models/campaign_evaluation_position.py
Expand Down Expand Up @@ -1300,6 +1311,8 @@ talon_one/models/rollback_discount_effect_props.py
talon_one/models/rollback_increased_achievement_progress_effect_props.py
talon_one/models/rollback_referral_effect_props.py
talon_one/models/rule.py
talon_one/models/rule_eligibility.py
talon_one/models/rule_eligibility_failure_details.py
talon_one/models/rule_failure_reason.py
talon_one/models/rule_metadata.py
talon_one/models/ruleset.py
Expand Down Expand Up @@ -1406,6 +1419,7 @@ talon_one/models/update_picklist.py
talon_one/models/update_price_type.py
talon_one/models/update_referral.py
talon_one/models/update_referral_batch.py
talon_one/models/update_reward.py
talon_one/models/update_role.py
talon_one/models/update_store.py
talon_one/models/update_user.py
Expand Down Expand Up @@ -1534,6 +1548,9 @@ test/test_campaign_deleted_notification_item.py
test/test_campaign_detail.py
test/test_campaign_edited_notification.py
test/test_campaign_edited_notification_item.py
test/test_campaign_eligibility.py
test/test_campaign_eligibility_details.py
test/test_campaign_eligibility_failure_details.py
test/test_campaign_entity.py
test/test_campaign_evaluation_group.py
test/test_campaign_evaluation_position.py
Expand Down Expand Up @@ -2003,6 +2020,8 @@ test/test_rollback_discount_effect_props.py
test/test_rollback_increased_achievement_progress_effect_props.py
test/test_rollback_referral_effect_props.py
test/test_rule.py
test/test_rule_eligibility.py
test/test_rule_eligibility_failure_details.py
test/test_rule_failure_reason.py
test/test_rule_metadata.py
test/test_ruleset.py
Expand Down Expand Up @@ -2109,6 +2128,7 @@ test/test_update_picklist.py
test/test_update_price_type.py
test/test_update_referral.py
test/test_update_referral_batch.py
test/test_update_reward.py
test/test_update_role.py
test/test_update_store.py
test/test_update_user.py
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.21.0
7.22.0
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# ref: https://docs.travis-ci.com/user/languages/python
language: python
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
# uncomment the following if needed
#- "3.13-dev" # 3.13 development branch
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
# command to install dependencies
install:
Expand Down
16 changes: 5 additions & 11 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ pip install talon-one-sdk

## Authentication

Authentication configuration has changed to use scheme-specific keys:
Authentication configuration has changed to use scheme-specific keys.

The authentication scheme in the new SDK is `api_key_v1` (previously `Authorization`).

**Before**

```python
# Create configuration with your host destination and authorization using management_key
# Create configuration with your host destination and authorization using api_key_v1
configuration = talon_one.Configuration(
host="https://yourbaseurl.talon.one",
api_key_prefix={"Authorization": "ApiKey-v1"},
Expand All @@ -40,22 +42,14 @@ configuration = talon_one.Configuration(
**After**

```python
# Create configuration with your host destination and authorization using management_key
# Create configuration with your host destination and authorization using api_key_v1
configuration = talon_one.Configuration(
host="https://yourbaseurl.talon.one",
api_key_prefix={"api_key_v1": "ApiKey-v1"},
api_key={"api_key_v1": "your-api-key"}
)
```

**Available authentication schemes:**

| Scheme | Old Key | New Key | Use Case |
| ---------------- | --------------- | ---------------- | ---------------------------------- |
| `api_key_v1` | `Authorization` | `api_key_v1` | Integration API |
| `management_key` | `Authorization` | `management_key` | Management API with management key |
| `manager_auth` | `Authorization` | `manager_auth` | Management API with session token |

## Type validation and models

All models now use [Pydantic](https://docs.pydantic.dev/latest/) v2 with strict runtime
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ import talon_one
from pprint import pprint
import json

# Create configuration with your host destination and authorization using management_key
# Create configuration with your host destination and authorization using api_key_v1
configuration = talon_one.Configuration(
host = "https://yourbaseurl.talon.one", # No trailing slash!
api_key_prefix = {
Expand Down Expand Up @@ -490,6 +490,9 @@ Class | Method | HTTP request | Description
- [CampaignDetail](docs/CampaignDetail.md)
- [CampaignEditedNotification](docs/CampaignEditedNotification.md)
- [CampaignEditedNotificationItem](docs/CampaignEditedNotificationItem.md)
- [CampaignEligibility](docs/CampaignEligibility.md)
- [CampaignEligibilityDetails](docs/CampaignEligibilityDetails.md)
- [CampaignEligibilityFailureDetails](docs/CampaignEligibilityFailureDetails.md)
- [CampaignEntity](docs/CampaignEntity.md)
- [CampaignEvaluationGroup](docs/CampaignEvaluationGroup.md)
- [CampaignEvaluationPosition](docs/CampaignEvaluationPosition.md)
Expand Down Expand Up @@ -957,6 +960,8 @@ Class | Method | HTTP request | Description
- [RollbackIncreasedAchievementProgressEffectProps](docs/RollbackIncreasedAchievementProgressEffectProps.md)
- [RollbackReferralEffectProps](docs/RollbackReferralEffectProps.md)
- [Rule](docs/Rule.md)
- [RuleEligibility](docs/RuleEligibility.md)
- [RuleEligibilityFailureDetails](docs/RuleEligibilityFailureDetails.md)
- [RuleFailureReason](docs/RuleFailureReason.md)
- [RuleMetadata](docs/RuleMetadata.md)
- [Ruleset](docs/Ruleset.md)
Expand Down Expand Up @@ -1063,6 +1068,7 @@ Class | Method | HTTP request | Description
- [UpdatePriceType](docs/UpdatePriceType.md)
- [UpdateReferral](docs/UpdateReferral.md)
- [UpdateReferralBatch](docs/UpdateReferralBatch.md)
- [UpdateReward](docs/UpdateReward.md)
- [UpdateRole](docs/UpdateRole.md)
- [UpdateStore](docs/UpdateStore.md)
- [UpdateUser](docs/UpdateUser.md)
Expand Down
1 change: 1 addition & 0 deletions docs/Audience.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Name | Type | Description | Notes
**name** | **str** | The human-friendly display name for this audience. |
**sandbox** | **bool** | Indicates if this is a live or sandbox Application. | [optional]
**description** | **str** | A description of the audience. | [optional]
**subscribed_applications_ids** | **List[int]** | A list of the IDs of the Applications that are connected to this audience. | [optional]
**integration** | **str** | The Talon.One-supported [3rd-party platform](https://docs.talon.one/docs/dev/technology-partners/overview) that this audience was created in. For example, `mParticle`, `Segment`, `Shopify`, `Braze`, or `Iterable`. **Note:** If you do not integrate with any of these platforms, do not use this property. | [optional]
**integration_id** | **str** | The ID of this audience in the third-party integration. **Note:** To create an audience that doesn't come from a 3rd party platform, do not use this property. | [optional]
**created_in3rd_party** | **bool** | Determines if this audience is a 3rd party audience or not. | [optional]
Expand Down
40 changes: 40 additions & 0 deletions docs/CampaignEligibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# CampaignEligibility


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | Unique ID of Campaign. |
**application_id** | **int** | The ID of the Application that owns this entity. |
**name** | **str** | The name of the campaign. |
**description** | **str** | A detailed description of the campaign. | [optional]
**start_time** | **datetime** | Timestamp when the campaign will become active. | [optional]
**end_time** | **datetime** | Timestamp when the campaign will become inactive. | [optional]
**attributes** | **object** | Arbitrary properties associated with this campaign. | [optional]
**state** | **str** | The state of the campaign. | [default to 'enabled']
**tags** | **List[str]** | A list of tags for the campaign. |
**features** | **List[str]** | The features enabled in this campaign. |
**rules** | [**List[RuleMetadata]**](RuleMetadata.md) | A list of rules containing customer-facing details of the rewards defined in the campaign. | [optional]
**eligibility** | [**List[CampaignEligibilityDetails]**](CampaignEligibilityDetails.md) | The customer's eligibility for each campaign in the current customer session. |

## Example

```python
from talon_one.models.campaign_eligibility import CampaignEligibility

# TODO update the JSON string below
json = "{}"
# create an instance of CampaignEligibility from a JSON string
campaign_eligibility_instance = CampaignEligibility.from_json(json)
# print the JSON string representation of the object
print(CampaignEligibility.to_json())

# convert the object into a dict
campaign_eligibility_dict = campaign_eligibility_instance.to_dict()
# create an instance of CampaignEligibility from a dict
campaign_eligibility_from_dict = CampaignEligibility.from_dict(campaign_eligibility_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


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


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**passed** | **bool** | Indicates whether the customer was eligible for the campaign in the current session. |
**coupon_code** | **str** | The coupon code used to check a customer's eligibility for the campaign in the current session, if applicable. | [optional]
**details** | [**CampaignEligibilityFailureDetails**](CampaignEligibilityFailureDetails.md) | The details about why the customer was not eligible for the campaign in the current session. Only returned when `passed` is `false`. | [optional]

## Example

```python
from talon_one.models.campaign_eligibility_details import CampaignEligibilityDetails

# TODO update the JSON string below
json = "{}"
# create an instance of CampaignEligibilityDetails from a JSON string
campaign_eligibility_details_instance = CampaignEligibilityDetails.from_json(json)
# print the JSON string representation of the object
print(CampaignEligibilityDetails.to_json())

# convert the object into a dict
campaign_eligibility_details_dict = campaign_eligibility_details_instance.to_dict()
# create an instance of CampaignEligibilityDetails from a dict
campaign_eligibility_details_from_dict = CampaignEligibilityDetails.from_dict(campaign_eligibility_details_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


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

The details about why the customer was not eligible for the campaign in the current session.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**failure_code** | **str** | A code identifying why the customer was not eligible for the campaign. |

## Example

```python
from talon_one.models.campaign_eligibility_failure_details import CampaignEligibilityFailureDetails

# TODO update the JSON string below
json = "{}"
# create an instance of CampaignEligibilityFailureDetails from a JSON string
campaign_eligibility_failure_details_instance = CampaignEligibilityFailureDetails.from_json(json)
# print the JSON string representation of the object
print(CampaignEligibilityFailureDetails.to_json())

# convert the object into a dict
campaign_eligibility_failure_details_dict = campaign_eligibility_failure_details_instance.to_dict()
# create an instance of CampaignEligibilityFailureDetails from a dict
campaign_eligibility_failure_details_from_dict = CampaignEligibilityFailureDetails.from_dict(campaign_eligibility_failure_details_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


1 change: 1 addition & 0 deletions docs/CustomerProfileIntegrationResponseV2.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Name | Type | Description | Notes
**loyalty** | [**Loyalty**](Loyalty.md) | | [optional]
**triggered_campaigns** | [**List[Campaign]**](Campaign.md) | | [optional]
**rule_failure_reasons** | [**List[RuleFailureReason]**](RuleFailureReason.md) | | [optional]
**campaign_eligibility** | [**List[CampaignEligibility]**](CampaignEligibility.md) | | [optional]
**awarded_giveaways** | [**List[Giveaway]**](Giveaway.md) | | [optional]
**effects** | [**List[Effect]**](Effect.md) | The effects generated by the rules in your running campaigns. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). |
**created_coupons** | [**List[Coupon]**](Coupon.md) | |
Expand Down
2 changes: 2 additions & 0 deletions docs/IntegrationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -3092,6 +3092,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**204** | No content | - |
**400** | Bad request | - |
**401** | Unauthorized - Invalid API key | - |
**409** | Too many requests or limit reached - Avoid parallel requests. See the [docs](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one#managing-parallel-requests). | - |
Expand Down Expand Up @@ -3642,6 +3643,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**204** | No content | - |
**400** | Bad request | - |
**401** | Unauthorized - Invalid API key | - |

Expand Down
Loading
Loading