Skip to content

Commit

Permalink
v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
p-zielinski committed Oct 23, 2024
1 parent d26565b commit 5b26488
Show file tree
Hide file tree
Showing 764 changed files with 55,131 additions and 796 deletions.
131 changes: 69 additions & 62 deletions ENDPOINTS-COVERAGE.md

Large diffs are not rendered by default.

361 changes: 353 additions & 8 deletions README.md

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletions __tests__/test_02_redemption.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,19 @@ def test_03_get_customer(self):
def test_04_list_redemptions(self):
with voucherifyClient.ApiClient(spec_utils.configuration) as api_client:
api_instance = voucherifyClient.RedemptionsApi(api_client)
# OBJECTS IN QUERY ARE NOT YET SUPPORTED !!
#
# list_redemptions_filters = voucherifyClient.ParameterFiltersListRedemptions(
# voucher_code=voucherifyClient.ParameterFiltersListRedemptionsVoucherCode(
# conditions=voucherifyClient.FilterConditionsString(
# var_is=voucher_code
# )
# )
# )

list_redemptions_filters = voucherifyClient.ParameterFiltersListRedemptions(
voucher_code=voucherifyClient.ParameterFiltersListRedemptionsVoucherCode(
conditions=voucherifyClient.FilterConditionsString(
is_not=voucher_code
)
)
)
try:
result = api_instance.list_redemptions(
100,
None,None,None,None,None,None,
# list_redemptions_filters
list_redemptions_filters
)
self.assertEqual(result.object, 'list')
except voucherifyClient.ApiException as e:
Expand Down
2 changes: 1 addition & 1 deletion __tests__/test_04_publications.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_01_test_publications(self):
True,
voucherifyClient.PublicationsCreateRequestBody(
campaign=voucherifyClient.CreatePublicationCampaign(name=campaign_name),
customer=voucherifyClient.PublicationsCreateRequestBodyCustomer(
customer=voucherifyClient.Customer(
email=email
)
)
Expand Down
14 changes: 14 additions & 0 deletions docs/AccessSettings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# AccessSettings

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.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**assign** | [**AccessSettingsAssign**](AccessSettingsAssign.md) | | [optional]
**unassign** | [**AccessSettingsUnassign**](AccessSettingsUnassign.md) | | [optional]

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


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

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.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**areas_ids** | **List[str]** | List all area IDs to which the campaign will be assigned. | [optional]
**area_stores_ids** | **List[str]** | List all store IDs to which the campaign will be assigned. | [optional]

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


2 changes: 1 addition & 1 deletion docs/AccessSettingsCampaignAssignmentsList.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AccessSettingsCampaignAssignmentsList

Lists all assignments of the campaign to areas and stores if the Areas and Stores feature is enabled (Enterprise feature).
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.

## Properties

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

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.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**areas_ids** | **List[str]** | List all area IDs from which the campaign will be unassigned. | [optional]
**area_stores_ids** | **List[str]** | List all store IDs to which the campaign will be unassigned. | [optional]

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


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

All URIs are relative to *https://api.voucherify.io*

Method | HTTP request | Description
------------- | ------------- | -------------
[**delete_bin_entry**](BinApi.md#delete_bin_entry) | **DELETE** /v1/trash-bin/{binEntryId} | Delete Bin Entry
[**list_bin_entries**](BinApi.md#list_bin_entries) | **GET** /v1/trash-bin | List Bin Entries


# **delete_bin_entry**
> delete_bin_entry(bin_entry_id)
Delete Bin Entry

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.

### Example

* Api Key Authentication (X-App-Id):
* Api Key Authentication (X-App-Token):

```python
import voucherify
from voucherify.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.voucherify.io
# See configuration.py for a list of all supported configuration parameters.
configuration = voucherify.Configuration(
host = "https://api.voucherify.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: X-App-Id
configuration.api_key['X-App-Id'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-App-Id'] = 'Bearer'

# Configure API key authorization: X-App-Token
configuration.api_key['X-App-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-App-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with voucherify.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = voucherify.BinApi(api_client)
bin_entry_id = 'bin_entry_id_example' # str | Provide the unique identifier of the bin entry.

try:
# Delete Bin Entry
api_instance.delete_bin_entry(bin_entry_id)
except Exception as e:
print("Exception when calling BinApi->delete_bin_entry: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**bin_entry_id** | **str**| Provide the unique identifier of the bin entry. |

### Return type

void (empty response body)

### Authorization

[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**2XX** | Returns no content if deletion is successful. | - |

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

# **list_bin_entries**
> TrashBinListResponseBody list_bin_entries(limit=limit, order=order, starting_after_id=starting_after_id, filters=filters)
List Bin Entries

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

### Example

* Api Key Authentication (X-App-Id):
* Api Key Authentication (X-App-Token):

```python
import voucherify
from voucherify.models.parameter_filters_list_bin import ParameterFiltersListBin
from voucherify.models.parameter_order_list_bin import ParameterOrderListBin
from voucherify.models.trash_bin_list_response_body import TrashBinListResponseBody
from voucherify.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.voucherify.io
# See configuration.py for a list of all supported configuration parameters.
configuration = voucherify.Configuration(
host = "https://api.voucherify.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: X-App-Id
configuration.api_key['X-App-Id'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-App-Id'] = 'Bearer'

# Configure API key authorization: X-App-Token
configuration.api_key['X-App-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-App-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with voucherify.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = voucherify.BinApi(api_client)
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)
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)
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)
filters = voucherify.ParameterFiltersListBin() # ParameterFiltersListBin | Filters for listing bin entries. (optional)

try:
# List Bin Entries
api_response = api_instance.list_bin_entries(limit=limit, order=order, starting_after_id=starting_after_id, filters=filters)
print("The response of BinApi->list_bin_entries:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BinApi->list_bin_entries: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**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]
**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]
**starting_after_id** | **str**| A cursor for pagination. It retrieves the events starting after an event with the given ID. | [optional]
**filters** | [**ParameterFiltersListBin**](.md)| Filters for listing bin entries. | [optional]

### Return type

[**TrashBinListResponseBody**](TrashBinListResponseBody.md)

### Authorization

[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**2XX** | Returns the list of all the bin entries matching the query parameters. | - |

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

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


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Unique campaign ID, assigned by Voucherify. | [optional]
**name** | **str** | Campaign name. | [optional]
**description** | **str** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
**campaign_type** | **str** | Type of campaign. | [optional]
**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]
**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional]
**auto_join** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
**join_once** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
**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]
**validity_timeframe** | [**ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
**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]
**validity_hours** | [**ValidityHours**](ValidityHours.md) | | [optional]
**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]
**vouchers_count** | **int** | Total number of unique vouchers in campaign. | [optional]
**start_date** | **datetime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional]
**expiration_date** | **datetime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional]
**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]
**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]
**created_at** | **datetime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | [optional]
**updated_at** | **datetime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | [optional]
**category** | **str** | Unique category name. | [optional]
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
**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]
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
**object** | **str** | The type of the object represented by JSON. This object stores information about the campaign. | [optional] [default to 'campaign']
**referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional]
**loyalty_tiers_expiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional]
**promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | [optional]
**validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional]
**access_settings_assignments** | [**AccessSettingsCampaignAssignmentsList**](AccessSettingsCampaignAssignmentsList.md) | | [optional]

[[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/CampaignBase.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Name | Type | Description | Notes
**category** | **str** | Unique category name. | [optional]
**creation_status** | **str** | Indicates the status of the campaign creation. | [optional]
**vouchers_generation_status** | **str** | Indicates the status of the campaign's voucher generation. | [optional]
**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]
**protected** | **bool** | Indicates whether the resource can be deleted. | [optional]
**category_id** | **str** | Unique category ID that this campaign belongs to. | [optional]
**categories** | [**List[Category]**](Category.md) | Contains details about the category. | [optional]
Expand Down
18 changes: 18 additions & 0 deletions docs/CampaignTemplate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# CampaignTemplate


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Unique identifier of the campaign template. It is assigned by Voucherify. | [optional]
**name** | **str** | User-defined name of the campaign template. | [optional]
**description** | **str** | User-defined description of the campaign template. | [optional]
**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]
**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]
**object** | **str** | The type of the object represented by JSON. | [optional] [default to 'campaign_template']
**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]

[[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 5b26488

Please sign in to comment.