-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- renamed `CreateOrUpdateCoupon` to `CouponRequest` - renamed `CreateOrUpdatePercentageCouponPercentage` to `CouponPayloadPercentage` - changed `CreateOrUpdateCouponCoupon` to `CouponPayload` - There're no longer 2 distinct models for Flat amount and Percentage coupon. They're merged into `CouponPayload`. Using it, specify either `amount_in_cents` or `percentage` property - `code`, `name`, `description`, `amount_in_cents` and `percentage` are not required properties in `CouponPayload` model. It means they're not send as nulls if unset. It enables patching coupon with `updateCoupon` without specifying these properties values. Previous version enforced setting them. - `CouponPayload` `endDate` changes type from `ZonedDateTime` to `LocalDate`. Response `Coupon` `endDate` is still `ZonedDateTime` (its calculated as end of the day) - `updateCoupon` now throws `ErrorListResponseException` - added `currencyPrices` for `Coupon` response. Note you need to specify suitable query parameters to access it - added `currencyPrices` query parameter for `readCoupon` and `findCoupon` - added some missing descriptions
- Loading branch information
1 parent
42b966b
commit 0a98bfc
Showing
20 changed files
with
399 additions
and
1,034 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
# Coupon Payload Percentage | ||
|
||
## Class Name | ||
|
||
`CouponPayloadPercentage` | ||
|
||
## Cases | ||
|
||
| Type | Factory Method | | ||
| --- | --- | | ||
| `String` | CouponPayloadPercentage.fromString(String string) | | ||
| `double` | CouponPayloadPercentage.fromPrecision(double precision) | | ||
|
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
doc/models/containers/create-or-update-percentage-coupon-percentage.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
# Coupon Payload | ||
|
||
## Structure | ||
|
||
`CouponPayload` | ||
|
||
## Fields | ||
|
||
| Name | Type | Tags | Description | Getter | Setter | | ||
| --- | --- | --- | --- | --- | --- | | ||
| `Name` | `String` | Optional | Required when creating a new coupon. This name is not displayed to customers and is limited to 255 characters. | String getName() | setName(String name) | | ||
| `Code` | `String` | Optional | Required when creating a new coupon. The code is limited to 255 characters. May contain uppercase alphanumeric characters and these special characters (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.” | String getCode() | setCode(String code) | | ||
| `Description` | `String` | Optional | Required when creating a new coupon. A description of the coupon that can be displayed to customers in transactions and on statements. The description is limited to 255 characters. | String getDescription() | setDescription(String description) | | ||
| `Percentage` | [`CouponPayloadPercentage`](../../doc/models/containers/coupon-payload-percentage.md) | Optional | This is a container for one-of cases. | CouponPayloadPercentage getPercentage() | setPercentage(CouponPayloadPercentage percentage) | | ||
| `AmountInCents` | `Long` | Optional | Required when creating a new flat amount coupon. Can't be used together with percentage. Flat USD discount | Long getAmountInCents() | setAmountInCents(Long amountInCents) | | ||
| `AllowNegativeBalance` | `Boolean` | Optional | If set to true, discount is not limited (credits will carry forward to next billing). Can't be used together with restrictions. | Boolean getAllowNegativeBalance() | setAllowNegativeBalance(Boolean allowNegativeBalance) | | ||
| `Recurring` | `Boolean` | Optional | - | Boolean getRecurring() | setRecurring(Boolean recurring) | | ||
| `EndDate` | `LocalDate` | Optional | After the end of the given day, this coupon code will be invalid for new signups. Recurring discounts started before this date will continue to recur even after this date. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | | ||
| `ProductFamilyId` | `String` | Optional | - | String getProductFamilyId() | setProductFamilyId(String productFamilyId) | | ||
| `Stackable` | `Boolean` | Optional | A stackable coupon can be combined with other coupons on a Subscription. | Boolean getStackable() | setStackable(Boolean stackable) | | ||
| `CompoundingStrategy` | [`CompoundingStrategy`](../../doc/models/compounding-strategy.md) | Optional | Applicable only to stackable coupons. For `compound`, Percentage-based discounts will be calculated against the remaining price, after prior discounts have been calculated. For `full-price`, Percentage-based discounts will always be calculated against the original item price, before other discounts are applied. | CompoundingStrategy getCompoundingStrategy() | setCompoundingStrategy(CompoundingStrategy compoundingStrategy) | | ||
| `ExcludeMidPeriodAllocations` | `Boolean` | Optional | - | Boolean getExcludeMidPeriodAllocations() | setExcludeMidPeriodAllocations(Boolean excludeMidPeriodAllocations) | | ||
| `ApplyOnCancelAtEndOfPeriod` | `Boolean` | Optional | - | Boolean getApplyOnCancelAtEndOfPeriod() | setApplyOnCancelAtEndOfPeriod(Boolean applyOnCancelAtEndOfPeriod) | | ||
| `ApplyOnSubscriptionExpiration` | `Boolean` | Optional | - | Boolean getApplyOnSubscriptionExpiration() | setApplyOnSubscriptionExpiration(Boolean applyOnSubscriptionExpiration) | | ||
|
||
## Example (as JSON) | ||
|
||
```json | ||
{ | ||
"name": "name8", | ||
"code": "code6", | ||
"description": "description8", | ||
"percentage": "String7", | ||
"amount_in_cents": 110 | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.