Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 2b65ac8

Browse files
authored
Merge pull request #2 from voucherifyio/pz/stackable-validation
pz/stackable-validation
2 parents 1fdd39a + 6a422b6 commit 2b65ac8

27 files changed

+424
-4250
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,6 @@ Class | Method | HTTP request | Description
279279
- [ClientValidationsValidateRequestBody](docs/Model/ClientValidationsValidateRequestBody.md)
280280
- [ClientValidationsValidateRequestBodyAllOfOptions](docs/Model/ClientValidationsValidateRequestBodyAllOfOptions.md)
281281
- [ClientValidationsValidateResponseBody](docs/Model/ClientValidationsValidateResponseBody.md)
282-
- [ClientValidationsValidateResponseBodyRedeemablesItem](docs/Model/ClientValidationsValidateResponseBodyRedeemablesItem.md)
283-
- [ClientValidationsValidateResponseBodyRedeemablesItemResult](docs/Model/ClientValidationsValidateResponseBodyRedeemablesItemResult.md)
284-
- [ClientValidationsValidateResponseBodyRedeemablesItemResultDiscount](docs/Model/ClientValidationsValidateResponseBodyRedeemablesItemResultDiscount.md)
285-
- [ClientValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct](docs/Model/ClientValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.md)
286-
- [ClientValidationsValidateResponseBodyRedeemablesItemResultGift](docs/Model/ClientValidationsValidateResponseBodyRedeemablesItemResultGift.md)
287-
- [ClientValidationsValidateResponseBodyRedeemablesItemResultLoyaltyCard](docs/Model/ClientValidationsValidateResponseBodyRedeemablesItemResultLoyaltyCard.md)
288282
- [CodeConfig](docs/Model/CodeConfig.md)
289283
- [CodeConfigRequiredLengthCharsetPattern](docs/Model/CodeConfigRequiredLengthCharsetPattern.md)
290284
- [CreatePublicationCampaign](docs/Model/CreatePublicationCampaign.md)
@@ -610,7 +604,6 @@ Class | Method | HTTP request | Description
610604
- [QualificationsRedeemable](docs/Model/QualificationsRedeemable.md)
611605
- [QualificationsRedeemableBase](docs/Model/QualificationsRedeemableBase.md)
612606
- [QualificationsRedeemables](docs/Model/QualificationsRedeemables.md)
613-
- [QualificationsStackingRules](docs/Model/QualificationsStackingRules.md)
614607
- [RedeemableGift](docs/Model/RedeemableGift.md)
615608
- [RedeemableLoyaltyCard](docs/Model/RedeemableLoyaltyCard.md)
616609
- [RedeemableResult](docs/Model/RedeemableResult.md)
@@ -746,6 +739,7 @@ Class | Method | HTTP request | Description
746739
- [StackableValidateRedeemBaseRedeemablesItem](docs/Model/StackableValidateRedeemBaseRedeemablesItem.md)
747740
- [StackableValidateRedeemBaseRedeemablesItemGift](docs/Model/StackableValidateRedeemBaseRedeemablesItemGift.md)
748741
- [StackableValidateRedeemBaseRedeemablesItemReward](docs/Model/StackableValidateRedeemBaseRedeemablesItemReward.md)
742+
- [StackingRules](docs/Model/StackingRules.md)
749743
- [ValidationEntity](docs/Model/ValidationEntity.md)
750744
- [ValidationRule](docs/Model/ValidationRule.md)
751745
- [ValidationRuleAssignment](docs/Model/ValidationRuleAssignment.md)
@@ -765,7 +759,6 @@ Class | Method | HTTP request | Description
765759
- [ValidationsRedeemableApplicableResult](docs/Model/ValidationsRedeemableApplicableResult.md)
766760
- [ValidationsRedeemableApplicableResultDiscount](docs/Model/ValidationsRedeemableApplicableResultDiscount.md)
767761
- [ValidationsRedeemableApplicableResultDiscountProduct](docs/Model/ValidationsRedeemableApplicableResultDiscountProduct.md)
768-
- [ValidationsRedeemableApplicableResultGift](docs/Model/ValidationsRedeemableApplicableResultGift.md)
769762
- [ValidationsRedeemableApplicableResultLoyaltyCard](docs/Model/ValidationsRedeemableApplicableResultLoyaltyCard.md)
770763
- [ValidationsRedeemableInapplicable](docs/Model/ValidationsRedeemableInapplicable.md)
771764
- [ValidationsRedeemableInapplicableResult](docs/Model/ValidationsRedeemableInapplicableResult.md)

docs/Model/ClientQualificationsCheckEligibilityResponseBody.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Name | Type | Description | Notes
77
**redeemables** | [**\OpenAPI\Client\Model\QualificationsRedeemables**](QualificationsRedeemables.md) | | [optional]
88
**tracking_id** | **string** | This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID. | [optional]
99
**order** | [**\OpenAPI\Client\Model\OrderCalculated**](OrderCalculated.md) | | [optional]
10-
**stacking_rules** | [**\OpenAPI\Client\Model\QualificationsStackingRules**](QualificationsStackingRules.md) | | [optional]
10+
**stacking_rules** | [**\OpenAPI\Client\Model\StackingRules**](StackingRules.md) | | [optional]
1111

1212
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/ClientValidationsValidateResponseBody.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**valid** | **bool** | The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. |
8-
**redeemables** | [**\OpenAPI\Client\Model\ClientValidationsValidateResponseBodyRedeemablesItem[]**](ClientValidationsValidateResponseBodyRedeemablesItem.md) | Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`. |
8+
**redeemables** | [**\OpenAPI\Client\Model\ValidationsValidateResponseBodyRedeemablesItem[]**](ValidationsValidateResponseBodyRedeemablesItem.md) | |
9+
**skipped_redeemables** | [**ValidationsRedeemableInapplicable[]**](ValidationsRedeemableInapplicable.md) | Lists validation results of each skipped redeemable. | [optional]
10+
**inapplicable_redeemables** | [**ValidationsRedeemableInapplicable[]**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional]
911
**order** | [**\OpenAPI\Client\Model\OrderCalculated**](OrderCalculated.md) | | [optional]
1012
**tracking_id** | **string** | Hashed customer source ID. | [optional]
1113
**session** | [**\OpenAPI\Client\Model\Session**](Session.md) | | [optional]
12-
**application_mode** | **string** | |
13-
**inapplicable_redeemables** | [**ValidationsRedeemableInapplicable[]**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional]
14+
**stacking_rules** | [**\OpenAPI\Client\Model\StackingRules**](StackingRules.md) | | [optional]
1415

1516
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/QualificationsCheckEligibilityResponseBody.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Name | Type | Description | Notes
77
**redeemables** | [**\OpenAPI\Client\Model\QualificationsRedeemables**](QualificationsRedeemables.md) | | [optional]
88
**tracking_id** | **string** | This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID. | [optional]
99
**order** | [**\OpenAPI\Client\Model\OrderCalculated**](OrderCalculated.md) | | [optional]
10-
**stacking_rules** | [**\OpenAPI\Client\Model\QualificationsStackingRules**](QualificationsStackingRules.md) | | [optional]
10+
**stacking_rules** | [**\OpenAPI\Client\Model\StackingRules**](StackingRules.md) | | [optional]
1111

1212
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/StackingRules.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# # StackingRules
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**redeemables_limit** | **int** | Defines how many redeemables can be sent in one stacking request (note: more redeemables means more processing time!). | [default to 30]
8+
**applicable_redeemables_limit** | **int** | Defines how many of the sent redeemables will be applied to the order. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be labelled as SKIPPED. | [default to 5]
9+
**applicable_exclusive_redeemables_limit** | **int** | Defines how many redeemables with an exclusive category can be applied in one request. | [default to 1]
10+
**applicable_redeemables_per_category_limit** | **int** | Defines how many redeemables per category can be applied in one request. | [optional] [default to 1]
11+
**exclusive_categories** | **string[]** | Lists all exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint. |
12+
**joint_categories** | **string[]** | Lists all joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns. |
13+
**redeemables_application_mode** | **string** | Defines redeemables application mode. | [optional]
14+
**redeemables_sorting_rule** | **string** | Defines redeemables sorting rule. | [optional] [default to 'REQUESTED_ORDER']
15+
16+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/ValidationsRedeemableApplicableResult.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**discount** | [**\OpenAPI\Client\Model\ValidationsRedeemableApplicableResultDiscount**](ValidationsRedeemableApplicableResultDiscount.md) | | [optional]
8-
**gift** | [**\OpenAPI\Client\Model\ValidationsRedeemableApplicableResultGift**](ValidationsRedeemableApplicableResultGift.md) | | [optional]
8+
**gift** | [**\OpenAPI\Client\Model\ValidationsValidateResponseBodyRedeemablesItemResultGift**](ValidationsValidateResponseBodyRedeemablesItemResultGift.md) | | [optional]
99
**loyalty_card** | [**\OpenAPI\Client\Model\ValidationsRedeemableApplicableResultLoyaltyCard**](ValidationsRedeemableApplicableResultLoyaltyCard.md) | | [optional]
1010

1111
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/ValidationsValidateResponseBody.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**valid** | **bool** | The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. |
8-
**redeemables** | [**\OpenAPI\Client\Model\ValidationsValidateResponseBodyRedeemablesItem[]**](ValidationsValidateResponseBodyRedeemablesItem.md) | Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`. |
8+
**redeemables** | [**\OpenAPI\Client\Model\ValidationsValidateResponseBodyRedeemablesItem[]**](ValidationsValidateResponseBodyRedeemablesItem.md) | |
9+
**skipped_redeemables** | [**ValidationsRedeemableInapplicable[]**](ValidationsRedeemableInapplicable.md) | Lists validation results of each skipped redeemable. | [optional]
10+
**inapplicable_redeemables** | [**ValidationsRedeemableInapplicable[]**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional]
911
**order** | [**\OpenAPI\Client\Model\OrderCalculated**](OrderCalculated.md) | | [optional]
1012
**tracking_id** | **string** | Hashed customer source ID. | [optional]
1113
**session** | [**\OpenAPI\Client\Model\Session**](Session.md) | | [optional]
12-
**application_mode** | **string** | |
13-
**inapplicable_redeemables** | [**ValidationsRedeemableInapplicable[]**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional]
14+
**stacking_rules** | [**\OpenAPI\Client\Model\StackingRules**](StackingRules.md) | | [optional]
1415

1516
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/ValidationsValidateResponseBodyRedeemablesItem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**applicable_to** | [**\OpenAPI\Client\Model\ApplicableToResultList**](ApplicableToResultList.md) | | [optional]
1212
**inapplicable_to** | [**\OpenAPI\Client\Model\InapplicableToResultList**](InapplicableToResultList.md) | | [optional]
1313
**result** | [**\OpenAPI\Client\Model\ValidationsValidateResponseBodyRedeemablesItemResult**](ValidationsValidateResponseBodyRedeemablesItemResult.md) | | [optional]
14-
**metadata** | **object** | | [optional]
14+
**metadata** | **object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional]
1515
**categories** | [**\OpenAPI\Client\Model\Category[]**](Category.md) | | [optional]
1616

1717
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

src/Model/ClientQualificationsCheckEligibilityResponseBody.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class ClientQualificationsCheckEligibilityResponseBody implements ModelInterface
6262
'redeemables' => '\OpenAPI\Client\Model\QualificationsRedeemables',
6363
'tracking_id' => 'string',
6464
'order' => '\OpenAPI\Client\Model\OrderCalculated',
65-
'stacking_rules' => '\OpenAPI\Client\Model\QualificationsStackingRules'
65+
'stacking_rules' => '\OpenAPI\Client\Model\StackingRules'
6666
];
6767

6868
/**
@@ -396,7 +396,7 @@ public function setOrder($order)
396396
/**
397397
* Gets stacking_rules
398398
*
399-
* @return \OpenAPI\Client\Model\QualificationsStackingRules|null
399+
* @return \OpenAPI\Client\Model\StackingRules|null
400400
*/
401401
public function getStackingRules()
402402
{
@@ -406,7 +406,7 @@ public function getStackingRules()
406406
/**
407407
* Sets stacking_rules
408408
*
409-
* @param \OpenAPI\Client\Model\QualificationsStackingRules|null $stacking_rules stacking_rules
409+
* @param \OpenAPI\Client\Model\StackingRules|null $stacking_rules stacking_rules
410410
*
411411
* @return self
412412
*/

0 commit comments

Comments
 (0)