Skip to content

Commit

Permalink
New coupon type AmountOffSubtotalWithPurchase
Browse files Browse the repository at this point in the history
  • Loading branch information
perrytew committed Feb 16, 2021
1 parent 15d37bc commit 5d8c5ac
Show file tree
Hide file tree
Showing 5 changed files with 413 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ Class | Method | HTTP request | Description
- [CouponAmountOffSubtotalFreeShippingWithPurchase](docs/Model/CouponAmountOffSubtotalFreeShippingWithPurchase.md)
- [CouponAmountOffSubtotalWithBlockPurchase](docs/Model/CouponAmountOffSubtotalWithBlockPurchase.md)
- [CouponAmountOffSubtotalWithItemsPurchase](docs/Model/CouponAmountOffSubtotalWithItemsPurchase.md)
- [CouponAmountOffSubtotalWithPurchase](docs/Model/CouponAmountOffSubtotalWithPurchase.md)
- [CouponAutoApplyCondition](docs/Model/CouponAutoApplyCondition.md)
- [CouponAutoApplyConditions](docs/Model/CouponAutoApplyConditions.md)
- [CouponAutomaticallyApplyCouponCodes](docs/Model/CouponAutomaticallyApplyCouponCodes.md)
Expand Down
1 change: 1 addition & 0 deletions docs/Model/Coupon.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Name | Type | Description | Notes
**amount_off_subtotal_and_shipping** | [**\ultracart\v2\models\CouponAmountOffSubtotalAndShipping**](CouponAmountOffSubtotalAndShipping.md) | | [optional]
**amount_off_subtotal_with_block_purchase** | [**\ultracart\v2\models\CouponAmountOffSubtotalWithBlockPurchase**](CouponAmountOffSubtotalWithBlockPurchase.md) | | [optional]
**amount_off_subtotal_with_items_purchase** | [**\ultracart\v2\models\CouponAmountOffSubtotalWithItemsPurchase**](CouponAmountOffSubtotalWithItemsPurchase.md) | | [optional]
**amount_off_subtotal_with_purchase** | [**\ultracart\v2\models\CouponAmountOffSubtotalWithPurchase**](CouponAmountOffSubtotalWithPurchase.md) | | [optional]
**automatically_apply_coupon_codes** | [**\ultracart\v2\models\CouponAutomaticallyApplyCouponCodes**](CouponAutomaticallyApplyCouponCodes.md) | | [optional]
**buy_one_get_one** | [**\ultracart\v2\models\CouponBuyOneGetOneLimit**](CouponBuyOneGetOneLimit.md) | | [optional]
**calculated_description** | **string** | Calculated description displayed to the customer if no description is specified. | [optional]
Expand Down
12 changes: 12 additions & 0 deletions docs/Model/CouponAmountOffSubtotalWithPurchase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# CouponAmountOffSubtotalWithPurchase

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency_code** | **string** | The ISO-4217 three letter currency code the customer is viewing prices in | [optional]
**discount_amount** | **float** | The amount of subtotal discount | [optional]
**purchase_amount** | **float** | The purchase amount to qualify for subtotal discount and free shipping | [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)


30 changes: 30 additions & 0 deletions lib/models/Coupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class Coupon implements ModelInterface, ArrayAccess
'amount_off_subtotal_and_shipping' => '\ultracart\v2\models\CouponAmountOffSubtotalAndShipping',
'amount_off_subtotal_with_block_purchase' => '\ultracart\v2\models\CouponAmountOffSubtotalWithBlockPurchase',
'amount_off_subtotal_with_items_purchase' => '\ultracart\v2\models\CouponAmountOffSubtotalWithItemsPurchase',
'amount_off_subtotal_with_purchase' => '\ultracart\v2\models\CouponAmountOffSubtotalWithPurchase',
'automatically_apply_coupon_codes' => '\ultracart\v2\models\CouponAutomaticallyApplyCouponCodes',
'buy_one_get_one' => '\ultracart\v2\models\CouponBuyOneGetOneLimit',
'calculated_description' => 'string',
Expand Down Expand Up @@ -131,6 +132,7 @@ class Coupon implements ModelInterface, ArrayAccess
'amount_off_subtotal_and_shipping' => null,
'amount_off_subtotal_with_block_purchase' => null,
'amount_off_subtotal_with_items_purchase' => null,
'amount_off_subtotal_with_purchase' => null,
'automatically_apply_coupon_codes' => null,
'buy_one_get_one' => null,
'calculated_description' => null,
Expand Down Expand Up @@ -216,6 +218,7 @@ public static function swaggerFormats()
'amount_off_subtotal_and_shipping' => 'amount_off_subtotal_and_shipping',
'amount_off_subtotal_with_block_purchase' => 'amount_off_subtotal_with_block_purchase',
'amount_off_subtotal_with_items_purchase' => 'amount_off_subtotal_with_items_purchase',
'amount_off_subtotal_with_purchase' => 'amount_off_subtotal_with_purchase',
'automatically_apply_coupon_codes' => 'automatically_apply_coupon_codes',
'buy_one_get_one' => 'buy_one_get_one',
'calculated_description' => 'calculated_description',
Expand Down Expand Up @@ -280,6 +283,7 @@ public static function swaggerFormats()
'amount_off_subtotal_and_shipping' => 'setAmountOffSubtotalAndShipping',
'amount_off_subtotal_with_block_purchase' => 'setAmountOffSubtotalWithBlockPurchase',
'amount_off_subtotal_with_items_purchase' => 'setAmountOffSubtotalWithItemsPurchase',
'amount_off_subtotal_with_purchase' => 'setAmountOffSubtotalWithPurchase',
'automatically_apply_coupon_codes' => 'setAutomaticallyApplyCouponCodes',
'buy_one_get_one' => 'setBuyOneGetOne',
'calculated_description' => 'setCalculatedDescription',
Expand Down Expand Up @@ -344,6 +348,7 @@ public static function swaggerFormats()
'amount_off_subtotal_and_shipping' => 'getAmountOffSubtotalAndShipping',
'amount_off_subtotal_with_block_purchase' => 'getAmountOffSubtotalWithBlockPurchase',
'amount_off_subtotal_with_items_purchase' => 'getAmountOffSubtotalWithItemsPurchase',
'amount_off_subtotal_with_purchase' => 'getAmountOffSubtotalWithPurchase',
'automatically_apply_coupon_codes' => 'getAutomaticallyApplyCouponCodes',
'buy_one_get_one' => 'getBuyOneGetOne',
'calculated_description' => 'getCalculatedDescription',
Expand Down Expand Up @@ -462,6 +467,7 @@ public function __construct(array $data = null)
$this->container['amount_off_subtotal_and_shipping'] = isset($data['amount_off_subtotal_and_shipping']) ? $data['amount_off_subtotal_and_shipping'] : null;
$this->container['amount_off_subtotal_with_block_purchase'] = isset($data['amount_off_subtotal_with_block_purchase']) ? $data['amount_off_subtotal_with_block_purchase'] : null;
$this->container['amount_off_subtotal_with_items_purchase'] = isset($data['amount_off_subtotal_with_items_purchase']) ? $data['amount_off_subtotal_with_items_purchase'] : null;
$this->container['amount_off_subtotal_with_purchase'] = isset($data['amount_off_subtotal_with_purchase']) ? $data['amount_off_subtotal_with_purchase'] : null;
$this->container['automatically_apply_coupon_codes'] = isset($data['automatically_apply_coupon_codes']) ? $data['automatically_apply_coupon_codes'] : null;
$this->container['buy_one_get_one'] = isset($data['buy_one_get_one']) ? $data['buy_one_get_one'] : null;
$this->container['calculated_description'] = isset($data['calculated_description']) ? $data['calculated_description'] : null;
Expand Down Expand Up @@ -798,6 +804,30 @@ public function setAmountOffSubtotalWithItemsPurchase($amount_off_subtotal_with_
return $this;
}

/**
* Gets amount_off_subtotal_with_purchase
*
* @return \ultracart\v2\models\CouponAmountOffSubtotalWithPurchase
*/
public function getAmountOffSubtotalWithPurchase()
{
return $this->container['amount_off_subtotal_with_purchase'];
}

/**
* Sets amount_off_subtotal_with_purchase
*
* @param \ultracart\v2\models\CouponAmountOffSubtotalWithPurchase $amount_off_subtotal_with_purchase amount_off_subtotal_with_purchase
*
* @return $this
*/
public function setAmountOffSubtotalWithPurchase($amount_off_subtotal_with_purchase)
{
$this->container['amount_off_subtotal_with_purchase'] = $amount_off_subtotal_with_purchase;

return $this;
}

/**
* Gets automatically_apply_coupon_codes
*
Expand Down
Loading

0 comments on commit 5d8c5ac

Please sign in to comment.