mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[API] Add locale to cart serialization + minor fixes
This commit is contained in:
parent
9fc6f7f37a
commit
51ea70294f
16 changed files with 28 additions and 14 deletions
|
|
@ -607,17 +607,17 @@ Definition
|
|||
|
||||
PUT /api/v1/carts/{cartId}/items/{id}
|
||||
|
||||
+---------------+----------------+-------------------------------------------------------------+
|
||||
| Parameter | Parameter type | Description |
|
||||
+===============+================+=============================================================+
|
||||
| Authorization | header | Token received during authentication |
|
||||
+---------------+----------------+-------------------------------------------------------------+
|
||||
| cartId | url attribute | Id of the requested cart |
|
||||
+---------------+----------------+-------------------------------------------------------------+
|
||||
| cartItemId | url attribute | Id of the requested cart item |
|
||||
+---------------+----------------+-------------------------------------------------------------+
|
||||
| quantity | request | Amount of items you want to add to the cart (cannot be < 1) |
|
||||
+---------------+----------------+-------------------------------------------------------------+
|
||||
+---------------+----------------+--------------------------------------------------------------+
|
||||
| Parameter | Parameter type | Description |
|
||||
+===============+================+==============================================================+
|
||||
| Authorization | header | Token received during authentication |
|
||||
+---------------+----------------+--------------------------------------------------------------+
|
||||
| cartId | url attribute | Id of the requested cart |
|
||||
+---------------+----------------+--------------------------------------------------------------+
|
||||
| cartItemId | url attribute | Id of the requested cart item |
|
||||
+---------------+----------------+--------------------------------------------------------------+
|
||||
| quantity | request | Amount of items you want to have in the cart (cannot be < 1) |
|
||||
+---------------+----------------+--------------------------------------------------------------+
|
||||
|
||||
Example
|
||||
^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
* :doc:`/api/introduction`
|
||||
* :doc:`/api/authorization`
|
||||
* :doc:`/api/channels`
|
||||
* :doc:`/api/orders`
|
||||
* :doc:`/api/carts`
|
||||
* :doc:`/api/orders`
|
||||
* :doc:`/api/checkouts`
|
||||
* :doc:`/api/products`
|
||||
* :doc:`/api/product_variants`
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ sylius_grid:
|
|||
type: string
|
||||
sortable: customer.email
|
||||
path: customer.email
|
||||
options:
|
||||
template: "@SyliusAdmin/Order/Grid/Field/customer.html.twig"
|
||||
total:
|
||||
type: integer
|
||||
sortable: total
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@ Sylius\Component\Core\Model\Order:
|
|||
expose: true
|
||||
type: string
|
||||
groups: [Default, Detailed, DetailedCart]
|
||||
localeCode:
|
||||
expose: true
|
||||
type: string
|
||||
groups: [Default, Detailed, DetailedCart]
|
||||
shippingAddress:
|
||||
expose: true
|
||||
groups: [Detailed]
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
}
|
||||
},
|
||||
"currency_code": "USD",
|
||||
"locale_code": "en_US",
|
||||
"checkout_state": "cart"
|
||||
},
|
||||
"quantity": 1,
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
}
|
||||
},
|
||||
"currency_code": "USD",
|
||||
"locale_code": "en_US",
|
||||
"checkout_state": "cart"
|
||||
},
|
||||
"quantity": 1,
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
}
|
||||
},
|
||||
"currency_code": "USD",
|
||||
"locale_code": "en_US",
|
||||
"checkout_state": "cart"
|
||||
},
|
||||
"quantity": 3,
|
||||
|
|
|
|||
|
|
@ -86,5 +86,6 @@
|
|||
}
|
||||
},
|
||||
"currency_code": "USD",
|
||||
"locale_code": "en_US",
|
||||
"checkout_state": "cart"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
}
|
||||
},
|
||||
"currency_code": "USD",
|
||||
"locale_code": "en_US",
|
||||
"checkout_state": "cart"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -25,5 +25,6 @@
|
|||
}
|
||||
},
|
||||
"currency_code": "USD",
|
||||
"locale_code": "en_US",
|
||||
"checkout_state": "cart"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,5 +59,6 @@
|
|||
"payments": @array@,
|
||||
"shipments": @array@,
|
||||
"currency_code": "EUR",
|
||||
"locale_code": "en_US",
|
||||
"checkout_state": "addressed"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,5 +41,6 @@
|
|||
"payments": @array@,
|
||||
"shipments": @array@,
|
||||
"currency_code": "EUR",
|
||||
"locale_code": "en_US",
|
||||
"checkout_state": "completed"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,5 +69,6 @@
|
|||
],
|
||||
"shipments": @array@,
|
||||
"currency_code": "EUR",
|
||||
"locale_code": "en_US",
|
||||
"checkout_state": "payment_selected"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,5 +77,6 @@
|
|||
}
|
||||
],
|
||||
"currency_code": "EUR",
|
||||
"locale_code": "en_US",
|
||||
"checkout_state": "shipping_selected"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
}
|
||||
},
|
||||
"currency_code": "USD",
|
||||
"locale_code": "en_US",
|
||||
"payments": [],
|
||||
"shipments": [],
|
||||
"checkout_state": "cart"
|
||||
|
|
|
|||
|
|
@ -40,5 +40,6 @@
|
|||
"payments": [],
|
||||
"shipments": [],
|
||||
"currency_code": "USD",
|
||||
"locale_code": "en_US",
|
||||
"checkout_state": "cart"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue