Skip to content

Commit f7cc66f

Browse files
authored
v4.0.0 (#51)
1 parent d26565b commit f7cc66f

File tree

764 files changed

+55131
-796
lines changed

Some content is hidden

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

764 files changed

+55131
-796
lines changed

ENDPOINTS-COVERAGE.md

+69-62
Large diffs are not rendered by default.

README.md

+353-8
Large diffs are not rendered by default.

__tests__/test_02_redemption.py

+9-10
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,19 @@ def test_03_get_customer(self):
105105
def test_04_list_redemptions(self):
106106
with voucherifyClient.ApiClient(spec_utils.configuration) as api_client:
107107
api_instance = voucherifyClient.RedemptionsApi(api_client)
108-
# OBJECTS IN QUERY ARE NOT YET SUPPORTED !!
109-
#
110-
# list_redemptions_filters = voucherifyClient.ParameterFiltersListRedemptions(
111-
# voucher_code=voucherifyClient.ParameterFiltersListRedemptionsVoucherCode(
112-
# conditions=voucherifyClient.FilterConditionsString(
113-
# var_is=voucher_code
114-
# )
115-
# )
116-
# )
108+
109+
list_redemptions_filters = voucherifyClient.ParameterFiltersListRedemptions(
110+
voucher_code=voucherifyClient.ParameterFiltersListRedemptionsVoucherCode(
111+
conditions=voucherifyClient.FilterConditionsString(
112+
is_not=voucher_code
113+
)
114+
)
115+
)
117116
try:
118117
result = api_instance.list_redemptions(
119118
100,
120119
None,None,None,None,None,None,
121-
# list_redemptions_filters
120+
list_redemptions_filters
122121
)
123122
self.assertEqual(result.object, 'list')
124123
except voucherifyClient.ApiException as e:

__tests__/test_04_publications.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_01_test_publications(self):
4545
True,
4646
voucherifyClient.PublicationsCreateRequestBody(
4747
campaign=voucherifyClient.CreatePublicationCampaign(name=campaign_name),
48-
customer=voucherifyClient.PublicationsCreateRequestBodyCustomer(
48+
customer=voucherifyClient.Customer(
4949
email=email
5050
)
5151
)

docs/AccessSettings.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# AccessSettings
2+
3+
Assigns or unassigns an area or store to the campaign. **NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**assign** | [**AccessSettingsAssign**](AccessSettingsAssign.md) | | [optional]
10+
**unassign** | [**AccessSettingsUnassign**](AccessSettingsUnassign.md) | | [optional]
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
14+

docs/AccessSettingsAssign.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# AccessSettingsAssign
2+
3+
Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only. If you want to assign the campaign to stores only, you do not have to send the area ID.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**areas_ids** | **List[str]** | List all area IDs to which the campaign will be assigned. | [optional]
10+
**area_stores_ids** | **List[str]** | List all store IDs to which the campaign will be assigned. | [optional]
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
14+

docs/AccessSettingsCampaignAssignmentsList.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AccessSettingsCampaignAssignmentsList
22

3-
Lists all assignments of the campaign to areas and stores if the Areas and Stores feature is enabled (Enterprise feature).
3+
Lists all assignments of the campaign to areas and stores. **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
44

55
## Properties
66

docs/AccessSettingsUnassign.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# AccessSettingsUnassign
2+
3+
Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only. If you want to assign the campaign to stores only, you do not have to send the area ID.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**areas_ids** | **List[str]** | List all area IDs from which the campaign will be unassigned. | [optional]
10+
**area_stores_ids** | **List[str]** | List all store IDs to which the campaign will be unassigned. | [optional]
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
14+

docs/BinApi.md

+187
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# voucherify.BinApi
2+
3+
All URIs are relative to *https://api.voucherify.io*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**delete_bin_entry**](BinApi.md#delete_bin_entry) | **DELETE** /v1/trash-bin/{binEntryId} | Delete Bin Entry
8+
[**list_bin_entries**](BinApi.md#list_bin_entries) | **GET** /v1/trash-bin | List Bin Entries
9+
10+
11+
# **delete_bin_entry**
12+
> delete_bin_entry(bin_entry_id)
13+
14+
Delete Bin Entry
15+
16+
Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU.
17+
18+
### Example
19+
20+
* Api Key Authentication (X-App-Id):
21+
* Api Key Authentication (X-App-Token):
22+
23+
```python
24+
import voucherify
25+
from voucherify.rest import ApiException
26+
from pprint import pprint
27+
28+
# Defining the host is optional and defaults to https://api.voucherify.io
29+
# See configuration.py for a list of all supported configuration parameters.
30+
configuration = voucherify.Configuration(
31+
host = "https://api.voucherify.io"
32+
)
33+
34+
# The client must configure the authentication and authorization parameters
35+
# in accordance with the API server security policy.
36+
# Examples for each auth method are provided below, use the example that
37+
# satisfies your auth use case.
38+
39+
# Configure API key authorization: X-App-Id
40+
configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
41+
42+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
43+
# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
44+
45+
# Configure API key authorization: X-App-Token
46+
configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
47+
48+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
49+
# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
50+
51+
# Enter a context with an instance of the API client
52+
with voucherify.ApiClient(configuration) as api_client:
53+
# Create an instance of the API class
54+
api_instance = voucherify.BinApi(api_client)
55+
bin_entry_id = 'bin_entry_id_example' # str | Provide the unique identifier of the bin entry.
56+
57+
try:
58+
# Delete Bin Entry
59+
api_instance.delete_bin_entry(bin_entry_id)
60+
except Exception as e:
61+
print("Exception when calling BinApi->delete_bin_entry: %s\n" % e)
62+
```
63+
64+
65+
66+
### Parameters
67+
68+
69+
Name | Type | Description | Notes
70+
------------- | ------------- | ------------- | -------------
71+
**bin_entry_id** | **str**| Provide the unique identifier of the bin entry. |
72+
73+
### Return type
74+
75+
void (empty response body)
76+
77+
### Authorization
78+
79+
[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
80+
81+
### HTTP request headers
82+
83+
- **Content-Type**: Not defined
84+
- **Accept**: Not defined
85+
86+
### HTTP response details
87+
88+
| Status code | Description | Response headers |
89+
|-------------|-------------|------------------|
90+
**2XX** | Returns no content if deletion is successful. | - |
91+
92+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
93+
94+
# **list_bin_entries**
95+
> TrashBinListResponseBody list_bin_entries(limit=limit, order=order, starting_after_id=starting_after_id, filters=filters)
96+
97+
List Bin Entries
98+
99+
Retrieves a list of resources moved to the bin. The following resources can be moved to the bin: - campaigns - vouchers - products - SKUs To use this endpoint, you must have the following permissions: - vouchers.read - campaigns.read - products.read
100+
101+
### Example
102+
103+
* Api Key Authentication (X-App-Id):
104+
* Api Key Authentication (X-App-Token):
105+
106+
```python
107+
import voucherify
108+
from voucherify.models.parameter_filters_list_bin import ParameterFiltersListBin
109+
from voucherify.models.parameter_order_list_bin import ParameterOrderListBin
110+
from voucherify.models.trash_bin_list_response_body import TrashBinListResponseBody
111+
from voucherify.rest import ApiException
112+
from pprint import pprint
113+
114+
# Defining the host is optional and defaults to https://api.voucherify.io
115+
# See configuration.py for a list of all supported configuration parameters.
116+
configuration = voucherify.Configuration(
117+
host = "https://api.voucherify.io"
118+
)
119+
120+
# The client must configure the authentication and authorization parameters
121+
# in accordance with the API server security policy.
122+
# Examples for each auth method are provided below, use the example that
123+
# satisfies your auth use case.
124+
125+
# Configure API key authorization: X-App-Id
126+
configuration.api_key['X-App-Id'] = os.environ["API_KEY"]
127+
128+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
129+
# configuration.api_key_prefix['X-App-Id'] = 'Bearer'
130+
131+
# Configure API key authorization: X-App-Token
132+
configuration.api_key['X-App-Token'] = os.environ["API_KEY"]
133+
134+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
135+
# configuration.api_key_prefix['X-App-Token'] = 'Bearer'
136+
137+
# Enter a context with an instance of the API client
138+
with voucherify.ApiClient(configuration) as api_client:
139+
# Create an instance of the API class
140+
api_instance = voucherify.BinApi(api_client)
141+
limit = 56 # int | Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
142+
order = voucherify.ParameterOrderListBin() # ParameterOrderListBin | Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order. (optional)
143+
starting_after_id = 'starting_after_id_example' # str | A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)
144+
filters = voucherify.ParameterFiltersListBin() # ParameterFiltersListBin | Filters for listing bin entries. (optional)
145+
146+
try:
147+
# List Bin Entries
148+
api_response = api_instance.list_bin_entries(limit=limit, order=order, starting_after_id=starting_after_id, filters=filters)
149+
print("The response of BinApi->list_bin_entries:\n")
150+
pprint(api_response)
151+
except Exception as e:
152+
print("Exception when calling BinApi->list_bin_entries: %s\n" % e)
153+
```
154+
155+
156+
157+
### Parameters
158+
159+
160+
Name | Type | Description | Notes
161+
------------- | ------------- | ------------- | -------------
162+
**limit** | **int**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional]
163+
**order** | [**ParameterOrderListBin**](.md)| Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order. | [optional]
164+
**starting_after_id** | **str**| A cursor for pagination. It retrieves the events starting after an event with the given ID. | [optional]
165+
**filters** | [**ParameterFiltersListBin**](.md)| Filters for listing bin entries. | [optional]
166+
167+
### Return type
168+
169+
[**TrashBinListResponseBody**](TrashBinListResponseBody.md)
170+
171+
### Authorization
172+
173+
[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
174+
175+
### HTTP request headers
176+
177+
- **Content-Type**: Not defined
178+
- **Accept**: application/json
179+
180+
### HTTP response details
181+
182+
| Status code | Description | Response headers |
183+
|-------------|-------------|------------------|
184+
**2XX** | Returns the list of all the bin entries matching the query parameters. | - |
185+
186+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
187+

docs/Campaign.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Campaign
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**id** | **str** | Unique campaign ID, assigned by Voucherify. | [optional]
9+
**name** | **str** | Campaign name. | [optional]
10+
**description** | **str** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
11+
**campaign_type** | **str** | Type of campaign. | [optional]
12+
**type** | **str** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | [optional]
13+
**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional]
14+
**auto_join** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
15+
**join_once** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
16+
**use_voucher_metadata_schema** | **bool** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional]
17+
**validity_timeframe** | [**ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
18+
**validity_day_of_week** | **List[int]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
19+
**validity_hours** | [**ValidityHours**](ValidityHours.md) | | [optional]
20+
**activity_duration_after_publishing** | **str** | Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days. | [optional]
21+
**vouchers_count** | **int** | Total number of unique vouchers in campaign. | [optional]
22+
**start_date** | **datetime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional]
23+
**expiration_date** | **datetime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional]
24+
**active** | **bool** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional]
25+
**metadata** | **object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional]
26+
**created_at** | **datetime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | [optional]
27+
**updated_at** | **datetime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | [optional]
28+
**category** | **str** | Unique category name. | [optional]
29+
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
30+
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
31+
**readonly** | **bool** | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. | [optional]
32+
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
33+
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
34+
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
35+
**object** | **str** | The type of the object represented by JSON. This object stores information about the campaign. | [optional] [default to 'campaign']
36+
**referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional]
37+
**loyalty_tiers_expiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional]
38+
**promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | [optional]
39+
**validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional]
40+
**access_settings_assignments** | [**AccessSettingsCampaignAssignmentsList**](AccessSettingsCampaignAssignmentsList.md) | | [optional]
41+
42+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
43+
44+

docs/CampaignBase.md

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Name | Type | Description | Notes
2929
**category** | **str** | Unique category name. | [optional]
3030
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
3131
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
32+
**readonly** | **bool** | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. | [optional]
3233
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
3334
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
3435
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]

docs/CampaignTemplate.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# CampaignTemplate
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**id** | **str** | Unique identifier of the campaign template. It is assigned by Voucherify. | [optional]
9+
**name** | **str** | User-defined name of the campaign template. | [optional]
10+
**description** | **str** | User-defined description of the campaign template. | [optional]
11+
**campaign_type** | **str** | Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`. | [optional]
12+
**created_at** | **datetime** | Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format. | [optional]
13+
**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'campaign_template']
14+
**updated_at** | **datetime** | Timestamp representing the date and time when the campaign template was last updated. The value is shown in the ISO 8601 format. | [optional]
15+
16+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17+
18+

0 commit comments

Comments
 (0)