Contrato histórico: PUT update-business-paymethod
Contrato histórico de API. Esta página describe un contrato anterior. Los métodos, las rutas y las respuestas pueden diferir de la API vigente.
Significado histórico
Editar opción de pago de negocio
Este endpoint de la API se utiliza para actualizar una opción de pago de un negocio.
API vigente
Para desarrollar una integración nueva, consulta la referencia o guía vigente enlazada.
Parámetros
[
{
"name": "language",
"in": "path",
"schema": {
"type": "string",
"default": "en"
},
"required": true
},
{
"name": "project",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-personal>"
},
"required": true
},
{
"name": "business_id",
"in": "path",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
},
{
"name": "paymethod_id",
"in": "path",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
},
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
}
]
Cuerpo de solicitud
{
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"paymethod_id": {
"type": "integer",
"format": "int32"
},
"sandbox": {
"type": "boolean"
},
"data": {
"type": "string",
"format": "json"
},
"data_sandbox": {
"type": "string",
"format": "json"
},
"enabled": {
"type": "boolean"
}
}
}
}
}
}
Respuestas
{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"id\": 5,\n \"paymethod_id\": 32,\n \"business_id\": \"<redacted-id>\",\n \"sandbox\": true,\n \"data\": {\n \"publishable\": \"<redacted-secret>\",\n \"secret\": \"<redacted-secret>\"\n },\n \"data_sandbox\": {\n \"publishable\": \"<redacted-secret>\",\n \"secret\": \"<redacted-secret>\"\n },\n \"enabled\": true,\n \"created_at\": \"2018-10-06 18:18:25\",\n \"updated_at\": \"2018-10-06 18:18:25\"\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 5,
"default": 0
},
"paymethod_id": {
"type": "integer",
"example": 32,
"default": 0
},
"business_id": {
"type": "string",
"example": "<redacted-id>"
},
"sandbox": {
"type": "boolean",
"example": true,
"default": true
},
"data": {
"type": "object",
"properties": {
"publishable": {
"type": "string",
"example": "<redacted-secret>"
},
"secret": {
"type": "string",
"example": "<redacted-secret>"
}
}
},
"data_sandbox": {
"type": "object",
"properties": {
"publishable": {
"type": "string",
"example": "<redacted-secret>"
},
"secret": {
"type": "string",
"example": "<redacted-secret>"
}
}
},
"enabled": {
"type": "boolean",
"example": true,
"default": true
},
"created_at": {
"type": "string",
"example": "2018-10-06 18:18:25"
},
"updated_at": {
"type": "string",
"example": "2018-10-06 18:18:25"
}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"The credentials could not be updated.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "The credentials could not be updated."
}
}
}
}
}
}
},
"401": {
"description": "401",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"You do not have permission.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "You do not have permission."
}
}
}
}
}
}
}
}