Skip to content

Commit

Permalink
Merge pull request #493 from weronika-kurczyna/wk/types-001
Browse files Browse the repository at this point in the history
001 - Voucher Transactions + list validation rules assignments
  • Loading branch information
p-zielinski authored Oct 20, 2023
2 parents f040a39 + 683f3f1 commit 27cbaca
Show file tree
Hide file tree
Showing 9 changed files with 504 additions and 318 deletions.
42 changes: 42 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Changelog

# 20231019 - Vouchers

- Vouchers - List Gift Card Transactions (**GET** `/vouchers/{code}/transactions`) renamed to List Voucher Transactions
- Vouchers - Export Gift Card Transactions (**GET** `/vouchers/{code}/transactions/export`) renamed to Export Voucher Transactions

**New models**
- vouchers_list_vouchers_transactions_response_body (old `1_res_vouchers_code_transactions`)
- voucher_transaction (old `1_obj_gift_card_transaction_object`)
- gift_card_transaction
- gift_card_transaction_identity
- gift_card_transaction_base
- gift_card_transaction_created
- gift_card_transaction_details
- gift_card_transaction_redemption_details (old `1_obj_gift_card_transaction_object_redemption`)
- gift_card_transaction_refund_details (old `1_obj_gift_card_transaction_object_refund`)
- gift_card_transaction_addition_details (old `1_obj_gift_card_transaction_object_addition`)
- gift_card_transaction_removal_details (old `1_obj_gift_card_transaction_object_removal`)

- vouchers_export_transactions_request_body (old `1_req_create_gift_card_transactions_export`
- voucher_transactions_export (old `1_obj_export_transactions_object`)
- voucher_transactions_export_parameters (old `1_obj_export_gift_card_transactions`)
- voucher_transactions_filters (old `16_obj_export_gift_card_transactions`)
- voucher_transactions_export_filter_conditions (old `16_obj_filter_gift_card_transactions_voucher_id`)

- validation_rules_list_rules_assignments_response_body (old `13_res_validation-rules_validationRuleId_assignments`)
- validation_rule_assignment (old `13_obj_validation_rule_assignment_object`)

**Removed models**
- `8_obj_export_loyalty_card_transactions` - used only in one place, replaced with: `voucher_transactions_export_parameters` in `8_req_create_loyalty_card_transactions_export` schema

**Endpoint changes**

- Added missing method for endpoint: GET `/vouchers/{code}/transactions (client.vouchers.listTransactions(code, query))`
- Response body schema: `vouchers_list_vouchers_transactions_response_body`

- Added missing method for endpoint: POST `/vouchers/{code}/transactions/export (client.vouchers.exportTransactions(code, body))`
- Request body schema: `vouchers_export_transactions_request_body`

- Added missing method for endpoint: GET `/validation-rules-assignments (client.client.validationRules.listRulesAssignments(validationRuleId))`
- Request body schema: `validation_rules_list_rules_assignments_response_body`


## 20231016 - Rewards

**New models**
Expand Down
6 changes: 3 additions & 3 deletions docs/reference-docs/CAMPAIGNS-API-Campaign-Object.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ order: 1
|:-----|:--------|
| object</br>`string` | <p>The type of object represented by JSON. This object stores information about validation rule assignments.</p> |
| data_ref</br>`string` | <p>Identifies the name of the JSON property that contains the array of validation rule assignments.</p> |
| data</br>`array` | <p>A dictionary that contains an array of validation rule assignments.</p> Array of [Validation Rule Assignment Object](#validation-rule-assignment-object) |
| data</br>`array` | <p>A dictionary that contains an array of validation rule assignments.</p> Array of [Validation Rule Assignment](#validation-rule-assignment) |
| total</br>`integer` | <p>Total number of validation rule assignments.</p> |

## Calendar Periods
Expand All @@ -211,15 +211,15 @@ order: 1
| unit</br>`string` | <p>Defines the type of unit of time in which the rounding period is counted.</p> Available values: `MONTH` |
| value</br>`integer` | <p>Value for the unit of time that the rounding applies to. Units for this parameter are defined by the <code>rounding.unit</code> parameter.</p><ul><li><code>0</code>: January</li><li><code>1</code>: February</li><li><code>2</code>: March</li><li><code>3</code>: April</li><li><code>4</code>: May</li><li><code>5</code>: June</li><li><code>6</code>: July</li><li><code>7</code>: August</li><li><code>8</code>: September</li><li><code>9</code>: October</li><li><code>10</code>: November</li><li><code>11</code>: December</li></ul> |

## Validation Rule Assignment Object
## Validation Rule Assignment
| Attributes | Description |
|:-----|:--------|
| id</br>`string` | <p>Validation rule assignment ID.</p> **Example:** <p>asgm_74F7QZoYbUoljwQO</p> |
| rule_id</br>`string` | <p>Validation rule ID.</p> **Example:** <p>val_4j7DCRm2IS59</p> |
| related_object_id</br>`string` | <p>The resource ID to which the validation rule was assigned.</p> **Example:** <p>v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT</p> |
| related_object_type</br>`string` | <p>The type of resource to which the validation rule was assigned.</p> Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` |
| created_at</br>`string` | <p>Timestamp representing the date and time when the validation rule assignment was created in ISO 8601 format.</p> **Example:** <p>2022-02-17T08:18:15.085Z</p> |
| object</br>`string` | <p>The type of object represented by the ID.</p> |
| object</br>`string` | <p>The type of object represented by the ID.</p> Available values: `validation_rules_assignment` |

[block:html]
{
Expand Down
6 changes: 3 additions & 3 deletions docs/reference-docs/PROMOTIONS-API-Promotion-Tier-Object.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ order: 1
|:-----|:--------|
| object</br>`string` | <p>The type of object represented by JSON. This object stores information about validation rule assignments.</p> |
| data_ref</br>`string` | <p>Identifies the name of the JSON property that contains the array of validation rule assignments.</p> |
| data</br>`array` | <p>A dictionary that contains an array of validation rule assignments.</p> Array of [Validation Rule Assignment Object](#validation-rule-assignment-object) |
| data</br>`array` | <p>A dictionary that contains an array of validation rule assignments.</p> Array of [Validation Rule Assignment](#validation-rule-assignment) |
| total</br>`integer` | <p>Total number of validation rule assignments.</p> |

## Category Object
Expand All @@ -101,15 +101,15 @@ order: 1
| updated_at</br>`string` | <p>Timestamp representing the date and time when the category was updated in ISO 8601 format.</p> **Example:** <p>2022-08-16T10:52:08.094Z</p> |
| object</br>`string` | <p>The type of object represented by the JSON. This object stores information about the category.</p> |

## Validation Rule Assignment Object
## Validation Rule Assignment
| Attributes | Description |
|:-----|:--------|
| id</br>`string` | <p>Validation rule assignment ID.</p> **Example:** <p>asgm_74F7QZoYbUoljwQO</p> |
| rule_id</br>`string` | <p>Validation rule ID.</p> **Example:** <p>val_4j7DCRm2IS59</p> |
| related_object_id</br>`string` | <p>The resource ID to which the validation rule was assigned.</p> **Example:** <p>v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT</p> |
| related_object_type</br>`string` | <p>The type of resource to which the validation rule was assigned.</p> Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` |
| created_at</br>`string` | <p>Timestamp representing the date and time when the validation rule assignment was created in ISO 8601 format.</p> **Example:** <p>2022-02-17T08:18:15.085Z</p> |
| object</br>`string` | <p>The type of object represented by the ID.</p> |
| object</br>`string` | <p>The type of object represented by the ID.</p> Available values: `validation_rules_assignment` |

[block:html]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,23 +403,23 @@ One of:
|:-----|:--------|
| object</br>`string` | <p>The type of object represented by JSON. This object stores information about validation rule assignments.</p> |
| data_ref</br>`string` | <p>Identifies the name of the JSON property that contains the array of validation rule assignments.</p> |
| data</br>`array` | <p>A dictionary that contains an array of validation rule assignments.</p> Array of [Validation Rule Assignment Object](#validation-rule-assignment-object) |
| data</br>`array` | <p>A dictionary that contains an array of validation rule assignments.</p> Array of [Validation Rule Assignment](#validation-rule-assignment) |
| total</br>`integer` | <p>Total number of validation rule assignments.</p> |

## Unstacked Redemption
| Attributes | Description |
|:-----|:--------|
| redemption_ID</br>`object` | <p>The property name is the unique redemption ID; i.e. <code>r_0ba186c4824e4881e1</code>. This object contains information about the redemption of an incentive.</p> <table><thead><tr><th style="text-align:left">Attributes</th><th style="text-align:left">Description</th></tr></thead><tbody><tr><td style="text-align:left">date</br><code>string</code></td><td style="text-align:left"><p>Timestamp representing the date and time when the redemption was created in ISO 8601 format.</p> <strong>Example:</strong> <p>2022-09-02T17:06:56.649Z</p></td></tr><tr><td style="text-align:left">related_object_type</br><code>string</code></td><td style="text-align:left"><p>The source of the incentive.</p> Available values: <code>voucher</code>, <code>promotion_tier</code></td></tr><tr><td style="text-align:left">related_object_id</br><code>string</code></td><td style="text-align:left"><p>Unique ID of the related object that defines the incentive.</p></td></tr><tr><td style="text-align:left">related_object_parent_id</br><code>string</code></td><td style="text-align:left"><p>Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign.</p></td></tr></tbody></table> |

## Validation Rule Assignment Object
## Validation Rule Assignment
| Attributes | Description |
|:-----|:--------|
| id</br>`string` | <p>Validation rule assignment ID.</p> **Example:** <p>asgm_74F7QZoYbUoljwQO</p> |
| rule_id</br>`string` | <p>Validation rule ID.</p> **Example:** <p>val_4j7DCRm2IS59</p> |
| related_object_id</br>`string` | <p>The resource ID to which the validation rule was assigned.</p> **Example:** <p>v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT</p> |
| related_object_type</br>`string` | <p>The type of resource to which the validation rule was assigned.</p> Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` |
| created_at</br>`string` | <p>Timestamp representing the date and time when the validation rule assignment was created in ISO 8601 format.</p> **Example:** <p>2022-02-17T08:18:15.085Z</p> |
| object</br>`string` | <p>The type of object represented by the ID.</p> |
| object</br>`string` | <p>The type of object represented by the ID.</p> Available values: `validation_rules_assignment` |

[block:html]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ hidden: false
order: 2
---

## Validation Rule Assignment Object
## Validation Rule Assignment
| Attributes | Description |
|:-----|:--------|
| id</br>`string` | <p>Validation rule assignment ID.</p> **Example:** <p>asgm_74F7QZoYbUoljwQO</p> |
| rule_id</br>`string` | <p>Validation rule ID.</p> **Example:** <p>val_4j7DCRm2IS59</p> |
| related_object_id</br>`string` | <p>The resource ID to which the validation rule was assigned.</p> **Example:** <p>v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT</p> |
| related_object_type</br>`string` | <p>The type of resource to which the validation rule was assigned.</p> Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` |
| created_at</br>`string` | <p>Timestamp representing the date and time when the validation rule assignment was created in ISO 8601 format.</p> **Example:** <p>2022-02-17T08:18:15.085Z</p> |
| object</br>`string` | <p>The type of object represented by the ID.</p> |
| object</br>`string` | <p>The type of object represented by the ID.</p> Available values: `validation_rules_assignment` |

[block:html]
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Export Gift Card Transactions
title: Export Voucher Transactions
type: endpoint
categorySlug: voucherify-api
slug: export-gift-card-transactions
slug: export-voucher-transactions
parentDocSlug: vouchers-api
hidden: false
order: 12
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: List Gift Card Transactions
title: List Voucher Transactions
type: endpoint
categorySlug: voucherify-api
slug: list-gift-card-transactions
slug: list-voucher-transactions
parentDocSlug: vouchers-api
hidden: false
order: 11
Expand Down
Loading

0 comments on commit 27cbaca

Please sign in to comment.