Skip to content

Commit

Permalink
Add new tags for line items in Smart Cart API
Browse files Browse the repository at this point in the history
  • Loading branch information
dimsf committed Apr 12, 2024
1 parent 360836d commit f7dbcfe
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"total_price": 35.98,
"price_includes_vat": true,
"ean": "1234567890123",
"serial_numbers": null
"serial_numbers": null,
"tags": ["plus_deal", "price_optimizer"]
},
{
"id": "3XlV8ebjxm",
Expand All @@ -91,7 +92,8 @@
"unit_price": 100,
"total_price": 200,
"price_includes_vat": true,
"serial_numbers": null
"serial_numbers": null,
"tags": ["coupon_deal"]
},
{
"id": "ZvEKMxbxr1",
Expand All @@ -102,7 +104,8 @@
"total_price": 51,
"price_includes_vat": true,
"extra_info": "Χρώμα: Πράσινο\\nΒαθμοί SPH: -6.50",
"serial_numbers": null
"serial_numbers": null,
"tags": ["two_plus_deal"]
}
],
"created_at": "2021-06-24T13:12:12+03:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
"price_includes_vat": true,
"island_vat_discount_applied": false,
"ean": "1234567890123",
"serial_numbers": null
"serial_numbers": null,
"tags": ["plus_deal", "price_optimizer"]
},
{
"id": "3XlV8ebjxm",
Expand All @@ -98,7 +99,8 @@
"total_price": 200,
"price_includes_vat": false,
"island_vat_discount_applied": false,
"serial_numbers": null
"serial_numbers": null,
"tags": ["coupon_deal"]
},
{
"id": "ZvEKMxbxr1",
Expand All @@ -110,7 +112,8 @@
"price_includes_vat": true,
"island_vat_discount_applied": false,
"extra_info": "Χρώμα: Πράσινο\\nΒαθμοί SPH: -6.50",
"serial_numbers": null
"serial_numbers": null,
"tags": ["two_plus_deal"]
}
],
"created_at": "2021-06-24T13:12:29+03:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"total_price": 35.98,
"price_includes_vat": true,
"ean": "1234567890123",
"serial_numbers": null
"serial_numbers": null,
"tags": ["plus_deal", "price_optimizer"]
},
{
"id": "3XlV8ebjxm",
Expand All @@ -75,7 +76,8 @@
"unit_price": 100,
"total_price": 200,
"price_includes_vat": true,
"serial_numbers": null
"serial_numbers": null,
"tags": ["coupon_deal"]
},
{
"id": "ZvEKMxbxr1",
Expand All @@ -86,7 +88,8 @@
"total_price": 51,
"price_includes_vat": true,
"extra_info": "Χρώμα: Πράσινο\\nΒαθμοί SPH: -6.50",
"serial_numbers": null
"serial_numbers": null,
"tags": ["two_plus_deal"]
}
],
"created_at": "2021-06-24T13:08:30+03:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"total_price": 35.98,
"price_includes_vat": true,
"ean": "1234567890123",
"serial_numbers": null
"serial_numbers": null,
"tags": ["plus_deal", "price_optimizer"]
},
{
"id": "3XlV8ebjxm",
Expand All @@ -75,7 +76,8 @@
"unit_price": 100,
"total_price": 200,
"price_includes_vat": true,
"serial_numbers": null
"serial_numbers": null,
"tags": ["coupon_deal"]
},
{
"id": "ZvEKMxbxr1",
Expand All @@ -86,7 +88,8 @@
"total_price": 51,
"price_includes_vat": true,
"extra_info": "Χρώμα: Πράσινο\\nΒαθμοί SPH: -6.50",
"serial_numbers": null
"serial_numbers": null,
"tags": ["two_plus_deal"]
}
],
"created_at": "2021-06-24T13:11:58+03:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"total_price": 35.98,
"price_includes_vat": true,
"ean": "1234567890123",
"serial_numbers": null
"serial_numbers": null,
"tags": ["plus_deal", "price_optimizer"]
}
],
"created_at": "2021-06-24T13:08:30+03:00",
Expand Down
2 changes: 1 addition & 1 deletion source/localizable/smart_cart/_order_object.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Name | Type | Description
`line_items[_].rejection_reason` | String | Rejection reason (possible values: `limited_stock`, `no_stock`, `discontinuation`, `wrong_price`)
`line_items[_].return_reason` | String | User return reason (possible values: `faulty`, `wrong_product`, `withdrawal`, `wrong_size`)
`line_items[_].serial_numbers` | String | Serial numbers for item, concatenated by ',', e.g. `SN12345,SN56789`
`line_items[_].tags` | Array | A list of tags that characterize the line item (optional). Supported tags: `["plus_deal", "coupon_deal"]`
`line_items[_].tags` | Array | A list of tags that characterize the line item (optional). Supported tags: `["plus_deal", "coupon_deal", "two_plus_deal", "price_optimizer"]`

#### Line item size

Expand Down
2 changes: 1 addition & 1 deletion source/localizable/smart_cart/webhook.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"ean": "1234567890123",
"mpn": "JA-1059",
"serial_numbers": null,
"tags": ["plus_deal", "coupon_deal"]
"tags": ["plus_deal", "coupon_deal", "two_plus_deal", "price_optimizer"]
},
{
"id": "l39vKqxqh2",
Expand Down

0 comments on commit f7dbcfe

Please sign in to comment.