OK
PaymentMethod removed successfully
PaymentMethod created successfully
PaymentMethod updated successfully
const response = await fetch('https://api.zydon.com.br/api/sales/payment-methods/{id}', { method: 'GET', headers: { "Authorization": "Bearer JWT" }, }); const data = await response.json();
{ "id": "text", "name": "text", "type": "text", "minimum_value": 0, "maximum_value": 0, "has_online_payment_integration": false, "active": false }
const response = await fetch('https://api.zydon.com.br/api/sales/payment-methods/{id}', { method: 'DELETE', headers: { "Authorization": "Bearer JWT" }, }); const data = await response.json();
{ "id": "text" }
const response = await fetch('https://api.zydon.com.br/api/sales/payment-methods', { method: 'GET', headers: { "Authorization": "Bearer JWT" }, }); const data = await response.json();
{ "items": [ { "id": "text", "name": "text", "type": "text", "minimum_value": 0, "maximum_value": 0, "has_online_payment_integration": false, "active": false } ] }
const response = await fetch('https://api.zydon.com.br/api/sales/payment-methods', { method: 'POST', headers: { "Authorization": "Bearer JWT", "Content-Type": "application/json" }, body: JSON.stringify({ "active": false, "has_online_payment_integration": false, "maximum_value": 0, "minimum_value": 0, "name": "text", "type": "text" }), }); const data = await response.json();
const response = await fetch('https://api.zydon.com.br/api/sales/payment-methods/{id}', { method: 'PUT', headers: { "Authorization": "Bearer JWT", "Content-Type": "application/json" }, body: JSON.stringify({ "active": false, "has_online_payment_integration": false, "maximum_value": 0, "minimum_value": 0, "name": "text", "type": "text" }), }); const data = await response.json();