Skip to content

Commit

Permalink
Merge branch 'release-candidate' into pz/fixes-2
Browse files Browse the repository at this point in the history
  • Loading branch information
p-zielinski committed Nov 18, 2023
2 parents 92a192c + efdc2ff commit 6206d4d
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 166 deletions.
4 changes: 2 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

**Added schemas**

- OrdersImportOrdersRequestBody
- OrdersImportRequestBody
- ValidationRulesListResponseBody
- ValidationRulesCreateRequestBody
- ValidationRuleResponse
- ValidationRuleRequest
- ValidationRulesUpdateRequestBody

- POST `/v1/orders/import`
- Request body schema was replaced with new one: `OrdersImportOrdersRequestBody` (old one: `10_req_orders_import`)
- Request body schema was replaced with new one: `OrdersImportRequestBody` (old one: `10_req_orders_import`)
- GET `/v1/validation-rules`
- Response body schema was replaced with new one: `ValidationRulesListResponseBody` (old one: `13_res_list_validation_rules`)
- POST `/v1/validation-rules`
Expand Down
4 changes: 3 additions & 1 deletion docs/guides/getting_started/Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ The documentation is divided into four main categories.

2. **[Integration Blueprint](doc:integration-overview)** - Discover how to seamlessly plan your integration and learn how to build advanced promotion limits to personalize your campaigns and prevent fraud. Recommended for architects and readers who want to know how to plan out the integration.

3. **[Implementation Blueprint](doc:implementation-checklist)** - Dive into detailed implementation options, including example data mapping, processes, and more. Recommended for developers and integrators.
3. **[Implementation Blueprint](doc:welcome)** - Dive into detailed implementation options, including example data mapping, processes, and more. Recommended for developers and integrators.

4. **[API Reference](doc:api-reference)** - Explore endpoints and attributes with request/response examples and error messages.

 
 

> 📘 Help and support
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ order: 1
|:-----|:--------|
| id</br>`string` | <p>Unique validation rule ID.</p> **Example:** <p>val_eR1c41hu0vUU</p> |
| name</br>`string` | <p>Custom, unique name for set of validation rules.</p> **Example:** <p>Business Validation Rule</p> |
| rules</br>`object` | <p>Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consequtively beginning from <code>1</code>. The values are objects containing the rule conditions.</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">logic</br><code>string</code></td><td style="text-align:left"><p>Defines the logic between the rules.</p> <strong>Example:</strong> <p>(1 and 2) and (3)</p></td></tr><tr><td style="text-align:left">[propertyName]</br><code>object</code></td><td style="text-align:left"><p>Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.</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">name</br><code>string</code></td><td style="text-align:left"><p>Voucherify specific rule name. The list of available names is provided below.</p><p><strong>Name</strong></td></tr><tr><td style="text-align:left">property</br><code>string,null</code></td><td style="text-align:left"><p>Custom name for a metadata property associated with the condition to be satisfied. <strong>Required</strong> if the property <code>name</code> is any of the following:<br>customer_metadata<br>custom_event_metadata<br>order_items_metadata<br>order_metadata<br>product_metadata<br>redemption_metadata</p></td></tr><tr><td style="text-align:left">conditions</br><code>object</code></td><td style="text-align:left"><p>A set of key value pairs representing the condition name and value. The list of available conditions is provided below:</p><table><thead><tr><th><strong>Condition (key)</strong></th><th><strong>Definition</strong></th><th><strong>Does not support Types</strong></th></tr></thead><tbody><tr><td>$is</td><td>A property is a predefined value.</td><td></td></tr><tr><td>$is_not</td><td>A property is not a predefined value.</td><td></td></tr><tr><td>$in</td><td>A property either one value in a predefined list of values.</td><td></td></tr><tr><td>$less_than</td><td>A property is less than a predefined value.</td><td>boolean</td></tr><tr><td>$less_than_or_equal</td><td>A property is less than or equal to a predefined value.</td><td>boolean</td></tr><tr><td>$more_than</td><td>A property is more than a predefined value.</td><td>boolean</td></tr><tr><td>$more_than_or_equal</td><td>A property is more than or equal to a predefined value.</td><td>boolean</td></tr><tr><td>$starts_with</td><td>A property starts with the predefined sequence of characters.</td><td>boolean, number</td></tr><tr><td>$ends_with</td><td>A property ends with the predefined sequence of characters.</td><td>boolean, number</td></tr><tr><td>$contains</td><td>A property contains the predefined sequence of characters.</td><td>boolean, number</td></tr><tr><td>$timeframe</td><td></td><td>boolean, number</td></tr><tr><td>$dow</td><td></td><td>boolean, string</td></tr><tr><td>$count</td><td></td><td>boolean, string</td></tr><tr><td>$count_more</td><td></td><td>boolean, string</td></tr><tr><td>$count_less</td><td></td><td>boolean, string</td></tr></tbody></table> <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">$one_of_voucherify_conditions</br><code>array</code></td><td style="text-align:left"><p>Contains a set of conditions for the rule.</p></td></tr></tbody></table></td></tr><tr><td style="text-align:left">rules</br><code>object</code></td><td style="text-align:left"><p>Contains all the nested rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consequtively beginning from <code>1</code>. The values are objects containing the rule conditions.</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">1</br><code>object</code></td><td style="text-align:left"><p>Defines the nested rule.</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">name</br><code>string</code></td><td style="text-align:left"></td></tr><tr><td style="text-align:left">property</br><code>string</code></td><td style="text-align:left"></td></tr><tr><td style="text-align:left">conditions</br><code>object</code></td><td style="text-align:left"></td></tr><tr><td style="text-align:left">rules</br><code>object</code></td><td style="text-align:left"></td></tr></tbody></table></td></tr><tr><td style="text-align:left">logic</br><code>string</code></td><td style="text-align:left"></td></tr></tbody></table></td></tr><tr><td style="text-align:left">error</br><code>object</code></td><td style="text-align:left"><p>Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.</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">message</br><code>string</code></td><td style="text-align:left"><p>The error message returned from API when validation / redemption fails to meet requirements of defined rule.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table> |
| rules | See: [Validation Rule Rules](#validation-rule-rules) |
| error</br>`object` | <p>Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.</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">message</br><code>string</code></td><td style="text-align:left"><p>The error message returned from API when validation / redemption fails to meet requirements of defined rules.</p></td></tr></tbody></table> |
| applicable_to</br>`object,null` | |
| created_at</br>`string` | <p>Timestamp representing the date and time when the validation rule was created in ISO 8601 format.</p> **Example:** <p>2022-03-23T07:44:00.444Z</p> |
Expand All @@ -23,6 +23,42 @@ order: 1
| assignments_count</br>`integer` | <p>The number of instances the validation rule has been assigned to different types of redeemables.</p> |
| object</br>`string` | <p>The type of object represented by JSON. This object stores information about the validation rule.</p> |

## Validation Rule Rules
| Attributes | Description |
|:-----|:--------|
| logic</br>`string` | <p>Defines the logic between the rules.</p> **Example:** <p>(1 and 2) and (3)</p> |
| [propertyName]</br>`object` | <p>Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.</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">name</br><code>string</code></td><td style="text-align:left"><p>Voucherify specific rule name. The list of available names is provided below.</p><p><strong>Name</strong></td></tr><tr><td style="text-align:left">property</br><code>string,null</code></td><td style="text-align:left"><p>Custom name for a metadata property associated with the condition to be satisfied. <strong>Required</strong> if the property <code>name</code> is any of the following:<br>customer_metadata<br>custom_event_metadata<br>order_items_metadata<br>order_metadata<br>product_metadata<br>redemption_metadata</p></td></tr><tr><td style="text-align:left">conditions</td><td style="text-align:left">See: <a href="#validation-rule-conditions">Validation Rule Conditions</a></td></tr><tr><td style="text-align:left">rules</td><td style="text-align:left">See: <a href="#validation-rule-rules">Validation Rule Rules</a></td></tr><tr><td style="text-align:left">error</br><code>object</code></td><td style="text-align:left"><p>Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.</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">message</br><code>string</code></td><td style="text-align:left"><p>The error message returned from API when validation / redemption fails to meet requirements of defined rule.</p></td></tr></tbody></table></td></tr></tbody></table> |

## Validation Rule Conditions
| Attributes | Description |
|:-----|:--------|
| $is | See: [Any](#any) |
| $is_not | See: [Any](#any) |
| $in | See: [Any](#any) |
| $not_in | See: [Any](#any) |
| $less_than | See: [Any](#any) |
| $less_than_or_equal | See: [Any](#any) |
| $more_than | See: [Any](#any) |
| $more_than_or_equal | See: [Any](#any) |
| $starts_with | See: [Any](#any) |
| $ends_with | See: [Any](#any) |
| $contains | See: [Any](#any) |
| $timeframe | See: [Any](#any) |
| $timeframe_absolute | See: [Any](#any) |
| $dow | See: [Any](#any) |
| $count | See: [Any](#any) |
| $count_more | See: [Any](#any) |
| $count_less | See: [Any](#any) |
| $from | See: [Any](#any) |

## Any
Any of:

1. Array any of: string, number, object
2. string
3. number
4. object

[block:html]
{
"html": "<style>\n[title=\"Toggle library\"] { \n display: none; }\n.LanguagePicker-divider { \n display: none; }\n.Playground-section3VTXuaYZivJK > .APISectionHeader3LN_-QIR0m7x {\n display: none; }\n.LanguagePicker-languages1qVVo_v6AlP9 {\n display: none; }\n.headline-container-article-info2GaOf2jMpV0r {\n display: none; }\n.APISectionHeader3LN_-QIR0m7x {\n display: none; }\n.APIResponseSchemaPicker-label3XMQ9E-slNcS {\n display: none; }\n.PlaygroundC7DInM9NFvBg {\n display: none; }\n.Modal-Header3VPrQs3MUWWd {\n display: none; }\n.rm-ReferenceMain .rm-Article {\n max-width: 2000px; }\n</style>"
Expand Down
Loading

0 comments on commit 6206d4d

Please sign in to comment.