refactor(cart): own checkout item editing
This commit is contained in:
@@ -8,7 +8,6 @@ declare(strict_types=1);
|
||||
* Run from the backend root with:
|
||||
* php postman/generate-shopit-collection.php
|
||||
*/
|
||||
|
||||
$root = dirname(__DIR__);
|
||||
chdir($root);
|
||||
|
||||
@@ -38,7 +37,7 @@ function jsonBody(array $payload): array
|
||||
}
|
||||
|
||||
/** @param array<string, string> $fields
|
||||
* @return array<string, mixed>
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
function formDataBody(array $fields, array $fileFields = []): array
|
||||
{
|
||||
@@ -85,7 +84,8 @@ function bodyFor(string $method, string $uri): ?array
|
||||
'POST api/tenants/{tenant:codigo}/catalog-items/{catalogItem}/variant-options' => ['selected_values' => ['color' => 'azul'], 'cart_item_id' => '{{cart_item_id}}'],
|
||||
'POST api/tenants/{tenant:codigo}/compras/start-checkout' => ['cart_id' => '{{cart_id}}'],
|
||||
'PATCH api/tenants/{tenant:codigo}/compras/{compra}/customer-data' => ['dni' => '30123456', 'telefono' => '+5491112345678', 'nombre_apellido' => 'Usuario Demo', 'email' => '{{user_email}}'],
|
||||
'PATCH api/tenants/{tenant:codigo}/compras/{compra}/items/{item}' => ['quantity' => 2],
|
||||
'PATCH api/tenants/{tenant:codigo}/checkout-carts/{cart}/items/{cartItem}' => ['cantidad' => 2],
|
||||
'POST api/tenants/{tenant:codigo}/checkout-carts/{cart}/edit' => [],
|
||||
'POST api/tenants/{tenant:codigo}/compras/{compra}/payment-intent' => ['method' => 'transfer', 'transfer_payer_dni' => '30123456'],
|
||||
'POST api/tenants/{tenant:codigo}/tickets/pdf' => ['ticket_ids' => [1]],
|
||||
'POST api/v1/adminapp/login' => ['email' => '{{admin_email}}', 'password' => '{{admin_password}}'],
|
||||
@@ -245,10 +245,12 @@ function requestName(string $method, string $action, bool $multiMethod): string
|
||||
$verbs = [
|
||||
'index' => 'List', 'store' => 'Create', 'show' => 'Get', 'update' => 'Update',
|
||||
'destroy' => 'Delete', 'addItem' => 'Add Item', 'updateItemQuantity' => 'Update Item Quantity',
|
||||
'updateCheckoutItem' => 'Update Checkout Cart Item',
|
||||
'prepareCheckoutEditing' => 'Prepare Checkout Cart Editing',
|
||||
'removeItem' => 'Remove Item', 'search' => 'Search', 'category' => 'Get Category',
|
||||
'featuredGroupItems' => 'List Featured Group Items', 'variantOptions' => 'Get Variant Options',
|
||||
'startCheckout' => 'Start Checkout', 'updateCustomerData' => 'Update Customer Data',
|
||||
'prepareItemEditing' => 'Prepare Item Editing', 'paymentIntent' => 'Create Payment Intent',
|
||||
'paymentIntent' => 'Create Payment Intent',
|
||||
'submitForReview' => 'Submit for Review', 'cancel' => 'Cancel', 'complete' => 'Complete',
|
||||
'downloadPdf' => 'Download PDF', 'downloadModificationsPdf' => 'Download Modifications PDF',
|
||||
'modifications' => 'List Modifications', 'tickets' => 'List Tickets', 'confirm' => 'Confirm',
|
||||
|
||||
Reference in New Issue
Block a user