growsurf-python 0.7.0__tar.gz → 0.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- growsurf_python-0.8.0/.release-please-manifest.json +3 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/CHANGELOG.md +7 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/PKG-INFO +1 -1
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/api.md +18 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/pyproject.toml +1 -1
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/release-please-config.json +1 -3
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_version.py +1 -1
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/resources/campaign/__init__.py +14 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/resources/campaign/campaign.py +404 -2
- growsurf_python-0.8.0/src/growsurf/resources/campaign/rewards.py +745 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/__init__.py +2 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/__init__.py +5 -0
- growsurf_python-0.8.0/src/growsurf/types/campaign/campaign_reward_list_response.py +13 -0
- growsurf_python-0.8.0/src/growsurf/types/campaign/delete_reward_response.py +12 -0
- growsurf_python-0.8.0/src/growsurf/types/campaign/reward.py +79 -0
- growsurf_python-0.8.0/src/growsurf/types/campaign/reward_create_params.py +69 -0
- growsurf_python-0.8.0/src/growsurf/types/campaign/reward_update_params.py +68 -0
- growsurf_python-0.8.0/src/growsurf/types/campaign_create_params.py +34 -0
- growsurf_python-0.8.0/src/growsurf/types/campaign_update_params.py +35 -0
- growsurf_python-0.8.0/tests/api_resources/campaign/test_rewards.py +520 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/api_resources/test_campaign.py +304 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/uv.lock +1 -1
- growsurf_python-0.7.0/.release-please-manifest.json +0 -3
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/.gitignore +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/CONTRIBUTING.md +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/LICENSE +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/README.md +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/SECURITY.md +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/bin/check-release-environment +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/bin/publish-pypi +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/examples/.keep +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/requirements-dev.lock +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/__init__.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_base_client.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_client.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_compat.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_constants.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_exceptions.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_files.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_models.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_qs.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_resource.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_streaming.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_types.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/__init__.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_compat.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_datetime_parse.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_json.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_logs.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_path.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_proxy.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_reflection.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_resources_proxy.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_streams.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_sync.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_transform.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_typing.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/_utils/_utils.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/lib/.keep +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/py.typed +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/resources/__init__.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/resources/campaign/commission.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/resources/campaign/participant.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/resources/campaign/reward.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/campaign.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/commission_approve_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/commission_delete_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/fraud_risk_level.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_add_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_delete_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_list_commissions_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_list_payouts_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_list_referrals_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_list_rewards_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_list_rewards_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_record_transaction_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_record_transaction_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_refund_transaction_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_refund_transaction_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_reward.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_send_invites_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_send_invites_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_trigger_referral_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_trigger_referral_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/participant_update_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/referral_source.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/referral_status.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/reward_approve_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/reward_approve_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/reward_delete_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign/reward_fulfill_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign_create_mobile_participant_token_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign_create_mobile_participant_token_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign_list_commissions_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign_list_leaderboard_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign_list_participants_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign_list_payouts_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign_list_referrals_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign_list_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign_retrieve_analytics_params.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/campaign_retrieve_analytics_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/commission_structure.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/participant_commission_list.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/participant_list.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/participant_payout_list.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/src/growsurf/types/referral_list.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/__init__.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/api_resources/__init__.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/api_resources/campaign/__init__.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/api_resources/campaign/test_commission.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/api_resources/campaign/test_participant.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/api_resources/campaign/test_reward.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/conftest.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/sample_file.txt +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_client.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_extract_files.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_files.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_models.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_qs.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_required_args.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_response.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_streaming.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_transform.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_utils/test_json.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_utils/test_path.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_utils/test_proxy.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/test_utils/test_typing.py +0 -0
- {growsurf_python-0.7.0 → growsurf_python-0.8.0}/tests/utils.py +0 -0
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.0](https://github.com/growsurf/growsurf-python/compare/v0.7.0...v0.8.0) (2026-07-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** add campaign create/update/clone and program-reward CRUD ([ef2fee0](https://github.com/growsurf/growsurf-python/commit/ef2fee0997638e5461988d514ab5505c63436b35))
|
|
9
|
+
|
|
3
10
|
## 0.7.0 (2026-06-29)
|
|
4
11
|
|
|
5
12
|
Full Changelog: [v0.6.1...v0.7.0](https://github.com/growsurf/growsurf-python/compare/v0.6.1...v0.7.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: growsurf-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: The official Python library for the growsurf API
|
|
5
5
|
Project-URL: Homepage, https://github.com/growsurf/growsurf-python
|
|
6
6
|
Project-URL: Repository, https://github.com/growsurf/growsurf-python
|
|
@@ -18,8 +18,11 @@ from growsurf.types import (
|
|
|
18
18
|
|
|
19
19
|
Methods:
|
|
20
20
|
|
|
21
|
+
- <code title="post /campaigns">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">create</a>(\*\*<a href="src/growsurf/types/campaign_create_params.py">params</a>) -> <a href="./src/growsurf/types/campaign/campaign.py">Campaign</a></code>
|
|
21
22
|
- <code title="get /campaign/{id}">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">retrieve</a>(id) -> <a href="./src/growsurf/types/campaign/campaign.py">Campaign</a></code>
|
|
23
|
+
- <code title="patch /campaign/{id}">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">update</a>(id, \*\*<a href="src/growsurf/types/campaign_update_params.py">params</a>) -> <a href="./src/growsurf/types/campaign/campaign.py">Campaign</a></code>
|
|
22
24
|
- <code title="get /campaigns">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">list</a>() -> <a href="./src/growsurf/types/campaign_list_response.py">CampaignListResponse</a></code>
|
|
25
|
+
- <code title="post /campaign/{id}/clone">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">clone</a>(id) -> <a href="./src/growsurf/types/campaign/campaign.py">Campaign</a></code>
|
|
23
26
|
- <code title="post /campaign/{id}/mobile-participant-token">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">create_mobile_participant_token</a>(id, \*\*<a href="src/growsurf/types/campaign_create_mobile_participant_token_params.py">params</a>) -> <a href="./src/growsurf/types/campaign_create_mobile_participant_token_response.py">CampaignCreateMobileParticipantTokenResponse</a></code>
|
|
24
27
|
- <code title="get /campaign/{id}/commissions">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">list_commissions</a>(id, \*\*<a href="src/growsurf/types/campaign_list_commissions_params.py">params</a>) -> <a href="./src/growsurf/types/participant_commission_list.py">ParticipantCommissionList</a></code>
|
|
25
28
|
- <code title="get /campaign/{id}/leaderboard">client.campaign.<a href="./src/growsurf/resources/campaign/campaign.py">list_leaderboard</a>(id, \*\*<a href="src/growsurf/types/campaign_list_leaderboard_params.py">params</a>) -> <a href="./src/growsurf/types/participant_list.py">ParticipantList</a></code>
|
|
@@ -95,3 +98,18 @@ Methods:
|
|
|
95
98
|
|
|
96
99
|
- <code title="delete /campaign/{id}/commission/{commissionId}">client.campaign.commission.<a href="./src/growsurf/resources/campaign/commission.py">delete</a>(commission_id, \*, id) -> <a href="./src/growsurf/types/campaign/commission_delete_response.py">CommissionDeleteResponse</a></code>
|
|
97
100
|
- <code title="post /campaign/{id}/commission/{commissionId}/approve">client.campaign.commission.<a href="./src/growsurf/resources/campaign/commission.py">approve</a>(commission_id, \*, id) -> <a href="./src/growsurf/types/campaign/commission_approve_response.py">CommissionApproveResponse</a></code>
|
|
101
|
+
|
|
102
|
+
## Rewards
|
|
103
|
+
|
|
104
|
+
Types:
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
from growsurf.types.campaign import Reward, CampaignRewardListResponse, DeleteRewardResponse
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Methods:
|
|
111
|
+
|
|
112
|
+
- <code title="post /campaign/{id}/rewards">client.campaign.rewards.<a href="./src/growsurf/resources/campaign/rewards.py">create</a>(id, \*\*<a href="src/growsurf/types/campaign/reward_create_params.py">params</a>) -> <a href="./src/growsurf/types/campaign/reward.py">Reward</a></code>
|
|
113
|
+
- <code title="patch /campaign/{id}/rewards/{rewardId}">client.campaign.rewards.<a href="./src/growsurf/resources/campaign/rewards.py">update</a>(reward_id, \*, id, \*\*<a href="src/growsurf/types/campaign/reward_update_params.py">params</a>) -> <a href="./src/growsurf/types/campaign/reward.py">Reward</a></code>
|
|
114
|
+
- <code title="get /campaign/{id}/rewards">client.campaign.rewards.<a href="./src/growsurf/resources/campaign/rewards.py">list</a>(id) -> <a href="./src/growsurf/types/campaign/campaign_reward_list_response.py">CampaignRewardListResponse</a></code>
|
|
115
|
+
- <code title="delete /campaign/{id}/rewards/{rewardId}">client.campaign.rewards.<a href="./src/growsurf/resources/campaign/rewards.py">delete</a>(reward_id, \*, id) -> <a href="./src/growsurf/types/campaign/delete_reward_response.py">DeleteRewardResponse</a></code>
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
"packages": {
|
|
3
3
|
".": {}
|
|
4
4
|
},
|
|
5
|
-
"$schema": "https://raw.githubusercontent.com/
|
|
5
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
|
|
6
6
|
"include-v-in-tag": true,
|
|
7
7
|
"include-component-in-tag": false,
|
|
8
|
-
"versioning": "prerelease",
|
|
9
|
-
"prerelease": true,
|
|
10
8
|
"bump-minor-pre-major": true,
|
|
11
9
|
"bump-patch-for-minor-pre-major": false,
|
|
12
10
|
"pull-request-header": "Automated Release PR",
|
|
@@ -8,6 +8,14 @@ from .reward import (
|
|
|
8
8
|
RewardResourceWithStreamingResponse,
|
|
9
9
|
AsyncRewardResourceWithStreamingResponse,
|
|
10
10
|
)
|
|
11
|
+
from .rewards import (
|
|
12
|
+
RewardsResource,
|
|
13
|
+
AsyncRewardsResource,
|
|
14
|
+
RewardsResourceWithRawResponse,
|
|
15
|
+
AsyncRewardsResourceWithRawResponse,
|
|
16
|
+
RewardsResourceWithStreamingResponse,
|
|
17
|
+
AsyncRewardsResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
11
19
|
from .campaign import (
|
|
12
20
|
CampaignResource,
|
|
13
21
|
AsyncCampaignResource,
|
|
@@ -46,6 +54,12 @@ __all__ = [
|
|
|
46
54
|
"AsyncRewardResourceWithRawResponse",
|
|
47
55
|
"RewardResourceWithStreamingResponse",
|
|
48
56
|
"AsyncRewardResourceWithStreamingResponse",
|
|
57
|
+
"RewardsResource",
|
|
58
|
+
"AsyncRewardsResource",
|
|
59
|
+
"RewardsResourceWithRawResponse",
|
|
60
|
+
"AsyncRewardsResourceWithRawResponse",
|
|
61
|
+
"RewardsResourceWithStreamingResponse",
|
|
62
|
+
"AsyncRewardsResourceWithStreamingResponse",
|
|
49
63
|
"CommissionResource",
|
|
50
64
|
"AsyncCommissionResource",
|
|
51
65
|
"CommissionResourceWithRawResponse",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict
|
|
5
|
+
from typing import Dict, Iterable
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -16,6 +16,8 @@ from .reward import (
|
|
|
16
16
|
AsyncRewardResourceWithStreamingResponse,
|
|
17
17
|
)
|
|
18
18
|
from ...types import (
|
|
19
|
+
campaign_create_params,
|
|
20
|
+
campaign_update_params,
|
|
19
21
|
campaign_list_payouts_params,
|
|
20
22
|
campaign_list_referrals_params,
|
|
21
23
|
campaign_list_commissions_params,
|
|
@@ -24,6 +26,14 @@ from ...types import (
|
|
|
24
26
|
campaign_retrieve_analytics_params,
|
|
25
27
|
campaign_create_mobile_participant_token_params,
|
|
26
28
|
)
|
|
29
|
+
from .rewards import (
|
|
30
|
+
RewardsResource,
|
|
31
|
+
AsyncRewardsResource,
|
|
32
|
+
RewardsResourceWithRawResponse,
|
|
33
|
+
AsyncRewardsResourceWithRawResponse,
|
|
34
|
+
RewardsResourceWithStreamingResponse,
|
|
35
|
+
AsyncRewardsResourceWithStreamingResponse,
|
|
36
|
+
)
|
|
27
37
|
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
28
38
|
from ..._utils import path_template, maybe_transform, async_maybe_transform
|
|
29
39
|
from ..._compat import cached_property
|
|
@@ -51,7 +61,7 @@ from .participant import (
|
|
|
51
61
|
AsyncParticipantResourceWithStreamingResponse,
|
|
52
62
|
)
|
|
53
63
|
from ..._base_client import make_request_options
|
|
54
|
-
from ...types.campaign import ReferralStatus
|
|
64
|
+
from ...types.campaign import ReferralStatus, reward_create_params
|
|
55
65
|
from ...types.referral_list import ReferralList
|
|
56
66
|
from ...types.participant_list import ParticipantList
|
|
57
67
|
from ...types.campaign.campaign import Campaign
|
|
@@ -80,6 +90,11 @@ class CampaignResource(SyncAPIResource):
|
|
|
80
90
|
"""Affiliate transaction, commission, and payout operations."""
|
|
81
91
|
return CommissionResource(self._client)
|
|
82
92
|
|
|
93
|
+
@cached_property
|
|
94
|
+
def rewards(self) -> RewardsResource:
|
|
95
|
+
"""Program reward (`CampaignReward`) configuration operations."""
|
|
96
|
+
return RewardsResource(self._client)
|
|
97
|
+
|
|
83
98
|
@cached_property
|
|
84
99
|
def with_raw_response(self) -> CampaignResourceWithRawResponse:
|
|
85
100
|
"""
|
|
@@ -99,6 +114,71 @@ class CampaignResource(SyncAPIResource):
|
|
|
99
114
|
"""
|
|
100
115
|
return CampaignResourceWithStreamingResponse(self)
|
|
101
116
|
|
|
117
|
+
def create(
|
|
118
|
+
self,
|
|
119
|
+
*,
|
|
120
|
+
type: Literal["REFERRAL", "AFFILIATE"],
|
|
121
|
+
company_logo_image_url: str | Omit = omit,
|
|
122
|
+
company_name: str | Omit = omit,
|
|
123
|
+
currency_iso: str | Omit = omit,
|
|
124
|
+
goal: str | Omit = omit,
|
|
125
|
+
name: str | Omit = omit,
|
|
126
|
+
options: Dict[str, object] | Omit = omit,
|
|
127
|
+
rewards: Iterable[reward_create_params.RewardCreateParams] | Omit = omit,
|
|
128
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
129
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
130
|
+
extra_headers: Headers | None = None,
|
|
131
|
+
extra_query: Query | None = None,
|
|
132
|
+
extra_body: Body | None = None,
|
|
133
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
134
|
+
) -> Campaign:
|
|
135
|
+
"""
|
|
136
|
+
Creates a new program pre-populated with type-appropriate defaults, plus any
|
|
137
|
+
optional inline rewards. The new program is created in `DRAFT` status and owned
|
|
138
|
+
by the API key's account. Requires a verified account email and a paid plan
|
|
139
|
+
(referral) or a payment source on file (affiliate); subject to your plan's
|
|
140
|
+
program limit.
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
type: The program type. Immutable after creation.
|
|
144
|
+
|
|
145
|
+
currency_iso: ISO 4217 currency code. Defaults to USD.
|
|
146
|
+
|
|
147
|
+
name: The program name. Defaults to "Untitled Program".
|
|
148
|
+
|
|
149
|
+
options: A curated subset of program options to shallow-merge onto the defaults.
|
|
150
|
+
|
|
151
|
+
rewards: Optional inline rewards to create with the program.
|
|
152
|
+
|
|
153
|
+
extra_headers: Send extra headers
|
|
154
|
+
|
|
155
|
+
extra_query: Add additional query parameters to the request
|
|
156
|
+
|
|
157
|
+
extra_body: Add additional JSON properties to the request
|
|
158
|
+
|
|
159
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
160
|
+
"""
|
|
161
|
+
return self._post(
|
|
162
|
+
"/campaigns",
|
|
163
|
+
body=maybe_transform(
|
|
164
|
+
{
|
|
165
|
+
"type": type,
|
|
166
|
+
"company_logo_image_url": company_logo_image_url,
|
|
167
|
+
"company_name": company_name,
|
|
168
|
+
"currency_iso": currency_iso,
|
|
169
|
+
"goal": goal,
|
|
170
|
+
"name": name,
|
|
171
|
+
"options": options,
|
|
172
|
+
"rewards": rewards,
|
|
173
|
+
},
|
|
174
|
+
campaign_create_params.CampaignCreateParams,
|
|
175
|
+
),
|
|
176
|
+
options=make_request_options(
|
|
177
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
178
|
+
),
|
|
179
|
+
cast_to=Campaign,
|
|
180
|
+
)
|
|
181
|
+
|
|
102
182
|
def retrieve(
|
|
103
183
|
self,
|
|
104
184
|
id: str,
|
|
@@ -132,6 +212,70 @@ class CampaignResource(SyncAPIResource):
|
|
|
132
212
|
cast_to=Campaign,
|
|
133
213
|
)
|
|
134
214
|
|
|
215
|
+
def update(
|
|
216
|
+
self,
|
|
217
|
+
id: str,
|
|
218
|
+
*,
|
|
219
|
+
company_logo_image_url: str | Omit = omit,
|
|
220
|
+
company_name: str | Omit = omit,
|
|
221
|
+
currency_iso: str | Omit = omit,
|
|
222
|
+
design: Dict[str, object] | Omit = omit,
|
|
223
|
+
emails: Dict[str, object] | Omit = omit,
|
|
224
|
+
goal: str | Omit = omit,
|
|
225
|
+
installation: Dict[str, object] | Omit = omit,
|
|
226
|
+
name: str | Omit = omit,
|
|
227
|
+
notifications: Dict[str, object] | Omit = omit,
|
|
228
|
+
options: Dict[str, object] | Omit = omit,
|
|
229
|
+
status: Literal["DRAFT", "PENDING", "IN_PROGRESS", "COMPLETE", "CANCELLED"] | Omit = omit,
|
|
230
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
231
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
232
|
+
extra_headers: Headers | None = None,
|
|
233
|
+
extra_query: Query | None = None,
|
|
234
|
+
extra_body: Body | None = None,
|
|
235
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
236
|
+
) -> Campaign:
|
|
237
|
+
"""
|
|
238
|
+
Updates a program's configuration and/or status. Only the fields you send are
|
|
239
|
+
changed. `type` and `urlId` are immutable. Status changes are validated against
|
|
240
|
+
the allowed transitions; the program cannot be deleted via this endpoint.
|
|
241
|
+
|
|
242
|
+
Args:
|
|
243
|
+
status: The program status. Transitions are validated; DELETED is not allowed.
|
|
244
|
+
|
|
245
|
+
extra_headers: Send extra headers
|
|
246
|
+
|
|
247
|
+
extra_query: Add additional query parameters to the request
|
|
248
|
+
|
|
249
|
+
extra_body: Add additional JSON properties to the request
|
|
250
|
+
|
|
251
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
252
|
+
"""
|
|
253
|
+
if not id:
|
|
254
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
255
|
+
return self._patch(
|
|
256
|
+
path_template("/campaign/{id}", id=id),
|
|
257
|
+
body=maybe_transform(
|
|
258
|
+
{
|
|
259
|
+
"company_logo_image_url": company_logo_image_url,
|
|
260
|
+
"company_name": company_name,
|
|
261
|
+
"currency_iso": currency_iso,
|
|
262
|
+
"design": design,
|
|
263
|
+
"emails": emails,
|
|
264
|
+
"goal": goal,
|
|
265
|
+
"installation": installation,
|
|
266
|
+
"name": name,
|
|
267
|
+
"notifications": notifications,
|
|
268
|
+
"options": options,
|
|
269
|
+
"status": status,
|
|
270
|
+
},
|
|
271
|
+
campaign_update_params.CampaignUpdateParams,
|
|
272
|
+
),
|
|
273
|
+
options=make_request_options(
|
|
274
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
275
|
+
),
|
|
276
|
+
cast_to=Campaign,
|
|
277
|
+
)
|
|
278
|
+
|
|
135
279
|
def list(
|
|
136
280
|
self,
|
|
137
281
|
*,
|
|
@@ -151,6 +295,40 @@ class CampaignResource(SyncAPIResource):
|
|
|
151
295
|
cast_to=CampaignListResponse,
|
|
152
296
|
)
|
|
153
297
|
|
|
298
|
+
def clone(
|
|
299
|
+
self,
|
|
300
|
+
id: str,
|
|
301
|
+
*,
|
|
302
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
303
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
304
|
+
extra_headers: Headers | None = None,
|
|
305
|
+
extra_query: Query | None = None,
|
|
306
|
+
extra_body: Body | None = None,
|
|
307
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
308
|
+
) -> Campaign:
|
|
309
|
+
"""
|
|
310
|
+
Clones an existing program into a new `DRAFT` program. Integrations and
|
|
311
|
+
credentials are not copied; active rewards are cloned.
|
|
312
|
+
|
|
313
|
+
Args:
|
|
314
|
+
extra_headers: Send extra headers
|
|
315
|
+
|
|
316
|
+
extra_query: Add additional query parameters to the request
|
|
317
|
+
|
|
318
|
+
extra_body: Add additional JSON properties to the request
|
|
319
|
+
|
|
320
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
321
|
+
"""
|
|
322
|
+
if not id:
|
|
323
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
324
|
+
return self._post(
|
|
325
|
+
path_template("/campaign/{id}/clone", id=id),
|
|
326
|
+
options=make_request_options(
|
|
327
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
328
|
+
),
|
|
329
|
+
cast_to=Campaign,
|
|
330
|
+
)
|
|
331
|
+
|
|
154
332
|
def create_mobile_participant_token(
|
|
155
333
|
self,
|
|
156
334
|
id: str,
|
|
@@ -591,6 +769,11 @@ class AsyncCampaignResource(AsyncAPIResource):
|
|
|
591
769
|
"""Affiliate transaction, commission, and payout operations."""
|
|
592
770
|
return AsyncCommissionResource(self._client)
|
|
593
771
|
|
|
772
|
+
@cached_property
|
|
773
|
+
def rewards(self) -> AsyncRewardsResource:
|
|
774
|
+
"""Program reward (`CampaignReward`) configuration operations."""
|
|
775
|
+
return AsyncRewardsResource(self._client)
|
|
776
|
+
|
|
594
777
|
@cached_property
|
|
595
778
|
def with_raw_response(self) -> AsyncCampaignResourceWithRawResponse:
|
|
596
779
|
"""
|
|
@@ -610,6 +793,71 @@ class AsyncCampaignResource(AsyncAPIResource):
|
|
|
610
793
|
"""
|
|
611
794
|
return AsyncCampaignResourceWithStreamingResponse(self)
|
|
612
795
|
|
|
796
|
+
async def create(
|
|
797
|
+
self,
|
|
798
|
+
*,
|
|
799
|
+
type: Literal["REFERRAL", "AFFILIATE"],
|
|
800
|
+
company_logo_image_url: str | Omit = omit,
|
|
801
|
+
company_name: str | Omit = omit,
|
|
802
|
+
currency_iso: str | Omit = omit,
|
|
803
|
+
goal: str | Omit = omit,
|
|
804
|
+
name: str | Omit = omit,
|
|
805
|
+
options: Dict[str, object] | Omit = omit,
|
|
806
|
+
rewards: Iterable[reward_create_params.RewardCreateParams] | Omit = omit,
|
|
807
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
808
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
809
|
+
extra_headers: Headers | None = None,
|
|
810
|
+
extra_query: Query | None = None,
|
|
811
|
+
extra_body: Body | None = None,
|
|
812
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
813
|
+
) -> Campaign:
|
|
814
|
+
"""
|
|
815
|
+
Creates a new program pre-populated with type-appropriate defaults, plus any
|
|
816
|
+
optional inline rewards. The new program is created in `DRAFT` status and owned
|
|
817
|
+
by the API key's account. Requires a verified account email and a paid plan
|
|
818
|
+
(referral) or a payment source on file (affiliate); subject to your plan's
|
|
819
|
+
program limit.
|
|
820
|
+
|
|
821
|
+
Args:
|
|
822
|
+
type: The program type. Immutable after creation.
|
|
823
|
+
|
|
824
|
+
currency_iso: ISO 4217 currency code. Defaults to USD.
|
|
825
|
+
|
|
826
|
+
name: The program name. Defaults to "Untitled Program".
|
|
827
|
+
|
|
828
|
+
options: A curated subset of program options to shallow-merge onto the defaults.
|
|
829
|
+
|
|
830
|
+
rewards: Optional inline rewards to create with the program.
|
|
831
|
+
|
|
832
|
+
extra_headers: Send extra headers
|
|
833
|
+
|
|
834
|
+
extra_query: Add additional query parameters to the request
|
|
835
|
+
|
|
836
|
+
extra_body: Add additional JSON properties to the request
|
|
837
|
+
|
|
838
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
839
|
+
"""
|
|
840
|
+
return await self._post(
|
|
841
|
+
"/campaigns",
|
|
842
|
+
body=await async_maybe_transform(
|
|
843
|
+
{
|
|
844
|
+
"type": type,
|
|
845
|
+
"company_logo_image_url": company_logo_image_url,
|
|
846
|
+
"company_name": company_name,
|
|
847
|
+
"currency_iso": currency_iso,
|
|
848
|
+
"goal": goal,
|
|
849
|
+
"name": name,
|
|
850
|
+
"options": options,
|
|
851
|
+
"rewards": rewards,
|
|
852
|
+
},
|
|
853
|
+
campaign_create_params.CampaignCreateParams,
|
|
854
|
+
),
|
|
855
|
+
options=make_request_options(
|
|
856
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
857
|
+
),
|
|
858
|
+
cast_to=Campaign,
|
|
859
|
+
)
|
|
860
|
+
|
|
613
861
|
async def retrieve(
|
|
614
862
|
self,
|
|
615
863
|
id: str,
|
|
@@ -643,6 +891,70 @@ class AsyncCampaignResource(AsyncAPIResource):
|
|
|
643
891
|
cast_to=Campaign,
|
|
644
892
|
)
|
|
645
893
|
|
|
894
|
+
async def update(
|
|
895
|
+
self,
|
|
896
|
+
id: str,
|
|
897
|
+
*,
|
|
898
|
+
company_logo_image_url: str | Omit = omit,
|
|
899
|
+
company_name: str | Omit = omit,
|
|
900
|
+
currency_iso: str | Omit = omit,
|
|
901
|
+
design: Dict[str, object] | Omit = omit,
|
|
902
|
+
emails: Dict[str, object] | Omit = omit,
|
|
903
|
+
goal: str | Omit = omit,
|
|
904
|
+
installation: Dict[str, object] | Omit = omit,
|
|
905
|
+
name: str | Omit = omit,
|
|
906
|
+
notifications: Dict[str, object] | Omit = omit,
|
|
907
|
+
options: Dict[str, object] | Omit = omit,
|
|
908
|
+
status: Literal["DRAFT", "PENDING", "IN_PROGRESS", "COMPLETE", "CANCELLED"] | Omit = omit,
|
|
909
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
910
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
911
|
+
extra_headers: Headers | None = None,
|
|
912
|
+
extra_query: Query | None = None,
|
|
913
|
+
extra_body: Body | None = None,
|
|
914
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
915
|
+
) -> Campaign:
|
|
916
|
+
"""
|
|
917
|
+
Updates a program's configuration and/or status. Only the fields you send are
|
|
918
|
+
changed. `type` and `urlId` are immutable. Status changes are validated against
|
|
919
|
+
the allowed transitions; the program cannot be deleted via this endpoint.
|
|
920
|
+
|
|
921
|
+
Args:
|
|
922
|
+
status: The program status. Transitions are validated; DELETED is not allowed.
|
|
923
|
+
|
|
924
|
+
extra_headers: Send extra headers
|
|
925
|
+
|
|
926
|
+
extra_query: Add additional query parameters to the request
|
|
927
|
+
|
|
928
|
+
extra_body: Add additional JSON properties to the request
|
|
929
|
+
|
|
930
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
931
|
+
"""
|
|
932
|
+
if not id:
|
|
933
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
934
|
+
return await self._patch(
|
|
935
|
+
path_template("/campaign/{id}", id=id),
|
|
936
|
+
body=await async_maybe_transform(
|
|
937
|
+
{
|
|
938
|
+
"company_logo_image_url": company_logo_image_url,
|
|
939
|
+
"company_name": company_name,
|
|
940
|
+
"currency_iso": currency_iso,
|
|
941
|
+
"design": design,
|
|
942
|
+
"emails": emails,
|
|
943
|
+
"goal": goal,
|
|
944
|
+
"installation": installation,
|
|
945
|
+
"name": name,
|
|
946
|
+
"notifications": notifications,
|
|
947
|
+
"options": options,
|
|
948
|
+
"status": status,
|
|
949
|
+
},
|
|
950
|
+
campaign_update_params.CampaignUpdateParams,
|
|
951
|
+
),
|
|
952
|
+
options=make_request_options(
|
|
953
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
954
|
+
),
|
|
955
|
+
cast_to=Campaign,
|
|
956
|
+
)
|
|
957
|
+
|
|
646
958
|
async def list(
|
|
647
959
|
self,
|
|
648
960
|
*,
|
|
@@ -662,6 +974,40 @@ class AsyncCampaignResource(AsyncAPIResource):
|
|
|
662
974
|
cast_to=CampaignListResponse,
|
|
663
975
|
)
|
|
664
976
|
|
|
977
|
+
async def clone(
|
|
978
|
+
self,
|
|
979
|
+
id: str,
|
|
980
|
+
*,
|
|
981
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
982
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
983
|
+
extra_headers: Headers | None = None,
|
|
984
|
+
extra_query: Query | None = None,
|
|
985
|
+
extra_body: Body | None = None,
|
|
986
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
987
|
+
) -> Campaign:
|
|
988
|
+
"""
|
|
989
|
+
Clones an existing program into a new `DRAFT` program. Integrations and
|
|
990
|
+
credentials are not copied; active rewards are cloned.
|
|
991
|
+
|
|
992
|
+
Args:
|
|
993
|
+
extra_headers: Send extra headers
|
|
994
|
+
|
|
995
|
+
extra_query: Add additional query parameters to the request
|
|
996
|
+
|
|
997
|
+
extra_body: Add additional JSON properties to the request
|
|
998
|
+
|
|
999
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1000
|
+
"""
|
|
1001
|
+
if not id:
|
|
1002
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
1003
|
+
return await self._post(
|
|
1004
|
+
path_template("/campaign/{id}/clone", id=id),
|
|
1005
|
+
options=make_request_options(
|
|
1006
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1007
|
+
),
|
|
1008
|
+
cast_to=Campaign,
|
|
1009
|
+
)
|
|
1010
|
+
|
|
665
1011
|
async def create_mobile_participant_token(
|
|
666
1012
|
self,
|
|
667
1013
|
id: str,
|
|
@@ -1091,12 +1437,21 @@ class CampaignResourceWithRawResponse:
|
|
|
1091
1437
|
def __init__(self, campaign: CampaignResource) -> None:
|
|
1092
1438
|
self._campaign = campaign
|
|
1093
1439
|
|
|
1440
|
+
self.create = to_raw_response_wrapper(
|
|
1441
|
+
campaign.create,
|
|
1442
|
+
)
|
|
1094
1443
|
self.retrieve = to_raw_response_wrapper(
|
|
1095
1444
|
campaign.retrieve,
|
|
1096
1445
|
)
|
|
1446
|
+
self.update = to_raw_response_wrapper(
|
|
1447
|
+
campaign.update,
|
|
1448
|
+
)
|
|
1097
1449
|
self.list = to_raw_response_wrapper(
|
|
1098
1450
|
campaign.list,
|
|
1099
1451
|
)
|
|
1452
|
+
self.clone = to_raw_response_wrapper(
|
|
1453
|
+
campaign.clone,
|
|
1454
|
+
)
|
|
1100
1455
|
self.create_mobile_participant_token = to_raw_response_wrapper(
|
|
1101
1456
|
campaign.create_mobile_participant_token,
|
|
1102
1457
|
)
|
|
@@ -1133,17 +1488,31 @@ class CampaignResourceWithRawResponse:
|
|
|
1133
1488
|
"""Affiliate transaction, commission, and payout operations."""
|
|
1134
1489
|
return CommissionResourceWithRawResponse(self._campaign.commission)
|
|
1135
1490
|
|
|
1491
|
+
@cached_property
|
|
1492
|
+
def rewards(self) -> RewardsResourceWithRawResponse:
|
|
1493
|
+
"""Program reward (`CampaignReward`) configuration operations."""
|
|
1494
|
+
return RewardsResourceWithRawResponse(self._campaign.rewards)
|
|
1495
|
+
|
|
1136
1496
|
|
|
1137
1497
|
class AsyncCampaignResourceWithRawResponse:
|
|
1138
1498
|
def __init__(self, campaign: AsyncCampaignResource) -> None:
|
|
1139
1499
|
self._campaign = campaign
|
|
1140
1500
|
|
|
1501
|
+
self.create = async_to_raw_response_wrapper(
|
|
1502
|
+
campaign.create,
|
|
1503
|
+
)
|
|
1141
1504
|
self.retrieve = async_to_raw_response_wrapper(
|
|
1142
1505
|
campaign.retrieve,
|
|
1143
1506
|
)
|
|
1507
|
+
self.update = async_to_raw_response_wrapper(
|
|
1508
|
+
campaign.update,
|
|
1509
|
+
)
|
|
1144
1510
|
self.list = async_to_raw_response_wrapper(
|
|
1145
1511
|
campaign.list,
|
|
1146
1512
|
)
|
|
1513
|
+
self.clone = async_to_raw_response_wrapper(
|
|
1514
|
+
campaign.clone,
|
|
1515
|
+
)
|
|
1147
1516
|
self.create_mobile_participant_token = async_to_raw_response_wrapper(
|
|
1148
1517
|
campaign.create_mobile_participant_token,
|
|
1149
1518
|
)
|
|
@@ -1180,17 +1549,31 @@ class AsyncCampaignResourceWithRawResponse:
|
|
|
1180
1549
|
"""Affiliate transaction, commission, and payout operations."""
|
|
1181
1550
|
return AsyncCommissionResourceWithRawResponse(self._campaign.commission)
|
|
1182
1551
|
|
|
1552
|
+
@cached_property
|
|
1553
|
+
def rewards(self) -> AsyncRewardsResourceWithRawResponse:
|
|
1554
|
+
"""Program reward (`CampaignReward`) configuration operations."""
|
|
1555
|
+
return AsyncRewardsResourceWithRawResponse(self._campaign.rewards)
|
|
1556
|
+
|
|
1183
1557
|
|
|
1184
1558
|
class CampaignResourceWithStreamingResponse:
|
|
1185
1559
|
def __init__(self, campaign: CampaignResource) -> None:
|
|
1186
1560
|
self._campaign = campaign
|
|
1187
1561
|
|
|
1562
|
+
self.create = to_streamed_response_wrapper(
|
|
1563
|
+
campaign.create,
|
|
1564
|
+
)
|
|
1188
1565
|
self.retrieve = to_streamed_response_wrapper(
|
|
1189
1566
|
campaign.retrieve,
|
|
1190
1567
|
)
|
|
1568
|
+
self.update = to_streamed_response_wrapper(
|
|
1569
|
+
campaign.update,
|
|
1570
|
+
)
|
|
1191
1571
|
self.list = to_streamed_response_wrapper(
|
|
1192
1572
|
campaign.list,
|
|
1193
1573
|
)
|
|
1574
|
+
self.clone = to_streamed_response_wrapper(
|
|
1575
|
+
campaign.clone,
|
|
1576
|
+
)
|
|
1194
1577
|
self.create_mobile_participant_token = to_streamed_response_wrapper(
|
|
1195
1578
|
campaign.create_mobile_participant_token,
|
|
1196
1579
|
)
|
|
@@ -1227,17 +1610,31 @@ class CampaignResourceWithStreamingResponse:
|
|
|
1227
1610
|
"""Affiliate transaction, commission, and payout operations."""
|
|
1228
1611
|
return CommissionResourceWithStreamingResponse(self._campaign.commission)
|
|
1229
1612
|
|
|
1613
|
+
@cached_property
|
|
1614
|
+
def rewards(self) -> RewardsResourceWithStreamingResponse:
|
|
1615
|
+
"""Program reward (`CampaignReward`) configuration operations."""
|
|
1616
|
+
return RewardsResourceWithStreamingResponse(self._campaign.rewards)
|
|
1617
|
+
|
|
1230
1618
|
|
|
1231
1619
|
class AsyncCampaignResourceWithStreamingResponse:
|
|
1232
1620
|
def __init__(self, campaign: AsyncCampaignResource) -> None:
|
|
1233
1621
|
self._campaign = campaign
|
|
1234
1622
|
|
|
1623
|
+
self.create = async_to_streamed_response_wrapper(
|
|
1624
|
+
campaign.create,
|
|
1625
|
+
)
|
|
1235
1626
|
self.retrieve = async_to_streamed_response_wrapper(
|
|
1236
1627
|
campaign.retrieve,
|
|
1237
1628
|
)
|
|
1629
|
+
self.update = async_to_streamed_response_wrapper(
|
|
1630
|
+
campaign.update,
|
|
1631
|
+
)
|
|
1238
1632
|
self.list = async_to_streamed_response_wrapper(
|
|
1239
1633
|
campaign.list,
|
|
1240
1634
|
)
|
|
1635
|
+
self.clone = async_to_streamed_response_wrapper(
|
|
1636
|
+
campaign.clone,
|
|
1637
|
+
)
|
|
1241
1638
|
self.create_mobile_participant_token = async_to_streamed_response_wrapper(
|
|
1242
1639
|
campaign.create_mobile_participant_token,
|
|
1243
1640
|
)
|
|
@@ -1273,3 +1670,8 @@ class AsyncCampaignResourceWithStreamingResponse:
|
|
|
1273
1670
|
def commission(self) -> AsyncCommissionResourceWithStreamingResponse:
|
|
1274
1671
|
"""Affiliate transaction, commission, and payout operations."""
|
|
1275
1672
|
return AsyncCommissionResourceWithStreamingResponse(self._campaign.commission)
|
|
1673
|
+
|
|
1674
|
+
@cached_property
|
|
1675
|
+
def rewards(self) -> AsyncRewardsResourceWithStreamingResponse:
|
|
1676
|
+
"""Program reward (`CampaignReward`) configuration operations."""
|
|
1677
|
+
return AsyncRewardsResourceWithStreamingResponse(self._campaign.rewards)
|