Skip to content

Commit 5f1b9a7

Browse files
committed
Updated API from documentation release
1 parent 4c16ce7 commit 5f1b9a7

File tree

7 files changed

+59
-0
lines changed

7 files changed

+59
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#%RAML 1.0 DataType
2+
(package): Cart
3+
type: DiscountTypeCombination
4+
displayName: BestDeal
5+
discriminatorValue: BestDeal
6+
description: |
7+
Indicates the best deal logic applies to a Cart or Order and indicates the discount type that offers the best deal.
8+
properties:
9+
chosenDiscountType:
10+
type: string
11+
description: |
12+
Discount type that offers the best deal; the value can be `product-discount` or `cart-discount`.

api-specs/api/types/cart/Cart.raml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ properties:
185185
type: CustomFields
186186
description: |
187187
Custom Fields of the Cart.
188+
discountTypeCombination?:
189+
type: DiscountTypeCombination
190+
description: |
191+
Indicates if a combination of discount types can apply on a Cart.
188192
deleteDaysAfterLastModification?:
189193
type: integer
190194
description: |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#%RAML 1.0 DataType
2+
(package): Cart
3+
type: object
4+
displayName: DiscountTypeCombination
5+
discriminator: type
6+
properties:
7+
type:
8+
type: string
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#%RAML 1.0 DataType
2+
(package): Cart
3+
type: DiscountTypeCombination
4+
displayName: Stacking
5+
discriminatorValue: Stacking
6+
description: |
7+
Indicates both Product Discounts and Cart Discounts apply to a Cart and Order.

api-specs/api/types/order/Order.raml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ properties:
212212
type: ReturnInfo[]
213213
description: |
214214
Contains information regarding the returns associated with the Order.
215+
discountTypeCombination?:
216+
type: DiscountTypeCombination
217+
description: |
218+
Indicates if a combination of discount types can apply on an Order.
215219
lastMessageSequenceNumber?:
216220
(markDeprecated): true
217221
type: number

api-specs/api/types/types.raml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ CartDiscountSetStoresAction: !include cart-discount/updates/CartDiscountSetStore
180180
CartDiscountSetValidFromAction: !include cart-discount/updates/CartDiscountSetValidFromAction.raml
181181
CartDiscountSetValidFromAndUntilAction: !include cart-discount/updates/CartDiscountSetValidFromAndUntilAction.raml
182182
CartDiscountSetValidUntilAction: !include cart-discount/updates/CartDiscountSetValidUntilAction.raml
183+
BestDeal: !include cart/BestDeal.raml
183184
Cart: !include cart/Cart.raml
184185
CartDraft: !include cart/CartDraft.raml
185186
CartOrigin: !include cart/CartOrigin.raml
@@ -201,6 +202,7 @@ DirectDiscountReference: !include cart/DirectDiscountReference.raml
201202
DiscountCodeInfo: !include cart/DiscountCodeInfo.raml
202203
DiscountCodeState: !include cart/DiscountCodeState.raml
203204
DiscountOnTotalPrice: !include cart/DiscountOnTotalPrice.raml
205+
DiscountTypeCombination: !include cart/DiscountTypeCombination.raml
204206
DiscountedLineItemPortion: !include cart/DiscountedLineItemPortion.raml
205207
DiscountedLineItemPortionDraft: !include cart/DiscountedLineItemPortionDraft.raml
206208
DiscountedLineItemPrice: !include cart/DiscountedLineItemPrice.raml
@@ -231,6 +233,7 @@ ShippingMethodState: !include cart/ShippingMethodState.raml
231233
ShippingMode: !include cart/ShippingMode.raml
232234
ShippingRateInput: !include cart/ShippingRateInput.raml
233235
ShippingRateInputDraft: !include cart/ShippingRateInputDraft.raml
236+
Stacking: !include cart/Stacking.raml
234237
TaxCalculationMode: !include cart/TaxCalculationMode.raml
235238
TaxMode: !include cart/TaxMode.raml
236239
TaxPortion: !include cart/TaxPortion.raml

api-specs/graphql/schema.sdl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,6 +1737,7 @@ type Cart implements Versioned & ReferenceExpandable {
17371737
taxedShippingPrice: TaxedPrice
17381738
shippingMode: ShippingMode!
17391739
shippingCustomFields: CustomFieldsType
1740+
discountTypeCombination: DiscountTypeCombination
17401741
cartState: CartState!
17411742
key: String
17421743
custom: CustomFieldsType
@@ -1963,6 +1964,25 @@ input CartDiscountValueInput {
19631964
giftLineItem: GiftLineItemValueInput
19641965
}
19651966

1967+
"Chosen discount type for the cart as part of best deal"
1968+
enum ChosenDiscountType {
1969+
CartDiscount
1970+
ProductDiscount
1971+
}
1972+
1973+
interface DiscountTypeCombination {
1974+
type: String!
1975+
}
1976+
1977+
type Stacking implements DiscountTypeCombination {
1978+
type: String!
1979+
}
1980+
1981+
type BestDeal implements DiscountTypeCombination {
1982+
type: String!
1983+
chosenDiscountType: ChosenDiscountType
1984+
}
1985+
19661986
input CartDraft {
19671987
currency: Currency!
19681988
country: Country
@@ -6820,6 +6840,7 @@ type Order implements Versioned & ReferenceExpandable {
68206840
shippingInfo: ShippingInfo
68216841
discountCodes: [DiscountCodeInfo!]!
68226842
directDiscounts: [DirectDiscount!]!
6843+
discountTypeCombination: DiscountTypeCombination
68236844
refusedGifts: [CartDiscount!]!
68246845
refusedGiftsRefs: [Reference!]!
68256846
paymentInfo: PaymentInfo

0 commit comments

Comments
 (0)