Skip to content

Commit

Permalink
Updated API from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Jan 2, 2025
1 parent b7b82f5 commit 2a4e9c2
Show file tree
Hide file tree
Showing 97 changed files with 701 additions and 242 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "changeCartPredicate",
"cartPredicate": "cartPredicateString"
}
"cartPredicate": "shippingInfo.taxRate.country = \"DE\""
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"action": "changeName",
"name": {
"en": "NewNameEN",
"de": "NewNameDE"
"en": "New name",
"de": "Neuer Name"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "changeRequiresDiscountCode",
"requiresDiscountCode": true
}
"requiresDiscountCode": false
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "changeSortOrder",
"sortOrder": "0.2"
}
"sortOrder": "0.1"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "changeStackingMode",
"stackingMode": "Stacking"
}
"stackingMode": "StopAfterThisDiscount"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "customLineItems",
"predicate": "customLineItemTotal(1 = 1) = \"20.00 EUR\""
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "lineItems",
"predicate": "shippingInfo.price = \"50.00 EUR\""
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "multiBuyCustomLineItems",
"predicate": "taxedPrice.gross = \"200.00 EUR\"",
"triggerQuantity": 2,
"discountedQuantity": 1,
"maxOccurrence": 5,
"selectionMode": "MostExpensive"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "multiBuyLineItems",
"predicate": "taxedPrice.gross = \"200.00 EUR\"",
"triggerQuantity": 5,
"discountedQuantity": 2,
"maxOccurrence": 10,
"selectionMode": "Cheapest"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"action": "setDescription",
"description": {
"en": "New Description EN",
"de": "New Description DE"
"en": "New description",
"de": "neue Beschreibung"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "setValidFrom",
"validFrom": "2017-10-15T15:00:00.000Z"
}
"validFrom": "2025-10-15T15:00:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"action": "setValidFromAndUntil",
"validFrom": "2017-10-15T15:00:00.000Z",
"validUntil": "2017-10-15T15:05:00.000Z"
}
"validFrom": "2025-10-15T15:00:00.000Z",
"validUntil": "2025-11-15T15:05:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "setValidUntil",
"validUntil": "2017-10-15T20:00:00.000Z"
}
"validUntil": "2025-11-15T20:00:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "shipping"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "totalPrice"
}
10 changes: 10 additions & 0 deletions api-specs/api/examples/CartDiscount/CartDiscountValueAbsolute.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "absolute",
"money": {
"centAmount": 2000,
"currencyCode": "EUR",
"type": "centPrecision",
"fractionDigits": 2
},
"applicationMode": "IndividualApplication"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "absolute",
"money": {
"centAmount": 2000,
"currencyCode": "EUR"
},
"applicationMode": "IndividualApplication"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "fixed",
"money": {
"centAmount": 2000,
"currencyCode": "EUR",
"type": "centPrecision",
"fractionDigits": 2
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "fixed",
"money": {
"centAmount": 2000,
"currencyCode": "EUR"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "giftLineItem",
"product": {
"id": "{{product-id}}",
"typeId" : "product"
},
"variantId": 1,
"distributionChannel": {
"id": "{{channel-id}}",
"typeId" : "channel"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "relative",
"permyriad": 1000
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"action": "setDescription",
"description": {
"en": "New Description EN",
"de": "New Description DE"
"en": "New description",
"de": "Neue Beschreibung"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "setMaxApplications",
"maxApplications": 100
}
"maxApplications": 150
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"action": "setName",
"name": {
"en": "New Name EN",
"de": "New Name DE"
"en": "New name",
"de": "Neuer Name"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "setValidFrom",
"validFrom": "2018-10-12T14:00:00.000Z"
"validFrom": "2025-10-12T14:00:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"action": "setValidFromAndUntil",
"validFrom": "2018-10-12T14:00:00.000Z",
"validUntil": "2018-10-12T14:05:00.000Z"
"validFrom": "2025-10-12T14:00:00.000Z",
"validUntil": "2025-11-12T14:05:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "setValidUntil",
"validUntil": "2018-10-12T14:00:00.000Z"
"validUntil": "2025-11-12T14:00:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"action": "changeName",
"name": {
"de": "NewProductDiscountDE",
"en": "NewProductDiscountEN"
"de": "Neuer Rabatt",
"en": "New discount"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"productId": "{{product-id}}",
"variantId": 1,
"staged": false,
"price": {
"id": "{{price-id}}",
"value": {
"currencyCode": "EUR",
"centAmount": 10000
},
"country": "DE",
"customerGroup": {
"typeId": "customer-group",
"id": "{{customer-group-id}}"
},
"tiers": [
{
"minimumQuantity": 10,
"value": {
"currencyCode": "EUR",
"centAmount": 9000
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"id": "{{price-id}}",
"value": {
"currencyCode": "EUR",
"centAmount": 10000
},
"country": "DE",
"customerGroup": {
"typeId": "customer-group",
"id": "{{customer-group-id}}"
},
"tiers": [
{
"minimumQuantity": 10,
"value": {
"currencyCode": "EUR",
"centAmount": 9000
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"action": "setDescription",
"description": {
"de": "New Product Discount Description DE",
"en": "New Product Discount Description EN"
"de": "Neue Beschreibung",
"en": "New description"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "setValidFrom",
"validFrom": "2018-10-12T14:05:00.000Z"
"validFrom": "2025-10-12T14:05:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"action": "setValidFromAndUntil",
"validFrom": "2018-10-12T14:00:00.000Z",
"validUntil": "2018-10-12T14:05:00.000Z"
"validFrom": "2025-10-12T14:00:00.000Z",
"validUntil": "2025-11-12T14:05:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "setValidUntil",
"validUntil": "2018-10-12T14:05:00.000Z"
"validUntil": "2025-11-12T14:05:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "absolute",
"money": [
{
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 100,
"fractionDigits": 2
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "absolute",
"money": [
{
"currencyCode": "EUR",
"centAmount": 100
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "external"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "relative",
"permyriad": 1000
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"staged" : false,
"value": {
"currencyCode": "EUR",
"centAmount": 10000
"centAmount": 20000
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
"id": "{{product-discount-id}}"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
},
{
"minimumQuantity": 1000,
"minimumQuantity": 150,
"value": {
"centAmount": 4000,
"currencyCode": "EUR",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "setValidFrom",
"validFrom": "2019-03-30T20:30:00.000Z"
}
"validFrom": "2025-03-30T20:30:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"action": "setValidFromAndUntil",
"validFrom": "2019-03-30T20:30:00.000Z",
"validUntil": "2019-04-21T20:30:00.000Z"
}
"validFrom": "2025-03-30T20:30:00.000Z",
"validUntil": "2025-04-21T20:30:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "setValidUntil",
"validUntil": "2019-04-21T20:30:00.000Z"
}
"validUntil": "2025-04-21T20:30:00.000Z"
}
Loading

0 comments on commit 2a4e9c2

Please sign in to comment.