-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated API from documentation release
- Loading branch information
1 parent
9194bac
commit cec3e86
Showing
6 changed files
with
138 additions
and
0 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
17 changes: 17 additions & 0 deletions
17
api-specs/importapi/examples/discount-code-import-request.json
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,17 @@ | ||
{ | ||
"type": "discount-code", | ||
"resources": [ | ||
{ | ||
"key": "discountCodeKey", | ||
"code": "Save10", | ||
"name": { | ||
"en": "Save10" | ||
}, | ||
"cartDiscounts": [ | ||
{ "typeId": "cart-discount", "key": "cartDiscountKey" } | ||
], | ||
"isActive": false, | ||
"groups": [] | ||
} | ||
] | ||
} |
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,72 @@ | ||
#%RAML 1.0 Library | ||
usage: Discount Code import types. | ||
(annotations.package): discount-codes | ||
|
||
uses: | ||
common: common.raml | ||
annotations: ../annotationTypes/annotations.raml | ||
custom-field: custom-field.raml | ||
|
||
types: | ||
DiscountCodeImport: | ||
description: | | ||
The data representation for a Discount Code to be imported that is persisted as a [Discount Code](/../api/projects/discountCodes#discountcode) in the Project. | ||
type: common.ImportResource | ||
properties: | ||
key: | ||
description: | | ||
User-defined unique identifier. If a [Discount Code](/../api/projects/discountCodes#discountcode) with this `key` exists, it will be updated with the imported data. | ||
type: string | ||
pattern: ^[A-Za-z0-9_-]+$ | ||
minLength: 2 | ||
maxLength: 256 | ||
name?: | ||
description: | | ||
Maps to `DiscountCode.name`. | ||
type: common.LocalizedString | ||
description?: | ||
description: | | ||
Maps to `DiscountCode.description`. | ||
type: common.LocalizedString | ||
code: | ||
description: | | ||
User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount. | ||
type: string | ||
cartDiscounts: | ||
description: | | ||
Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied. | ||
type: common.CartDiscountKeyReference[] | ||
cartPredicate?: | ||
description: | | ||
DiscountCode can only be applied to Carts that match this predicate. | ||
type: string | ||
isActive: | ||
description: | | ||
Indicates if the DiscountCode is active and can be applied to the Cart. | ||
type: boolean | ||
maxApplications?: | ||
type: number | ||
format: int64 | ||
description: | | ||
Number of times the DiscountCode can be applied. DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count. | ||
maxApplicationsPerCustomer?: | ||
type: number | ||
format: int64 | ||
description: | | ||
Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count. | ||
groups?: | ||
description: | | ||
Groups to which the DiscountCode belongs. | ||
type: string[] | ||
validFrom?: | ||
description: | | ||
Date and time (UTC) from which the DiscountCode is effective. | ||
type: datetime | ||
validUntil?: | ||
description: | | ||
Date and time (UTC) until which the DiscountCode is effective. | ||
type: datetime | ||
custom?: | ||
description: | | ||
Custom Fields of the DiscountCode. | ||
type: custom-field.Custom |
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