Configure the default payment deadline of one provider of the tenant
Sets the default payment deadline of one provider for the tenant of the credentials you authenticate with, in calendar days after the due date (0 is a deadline on the due date). days: null returns to the provider’s default: the row stays and its version moves on, as on any accepted write. The write and its history line are recorded in one transaction, with the actor, the instant, the previous and the new days, the reason and the trace.
The setting applies to boletos issued after the write by that provider: single boletos and installment series that carry no paymentDeadline, and the items of a batch (POST /v1/boletos/batches), whose payment deadline is the due date plus these days, recorded on the boleto and sent to the provider. A paymentDeadline sent on a single boleto or a series prevails. Boletos already issued keep the deadline they were issued with. An issuance reads the setting once, a batch once for all its items, so one under way when the setting changes keeps the value it read, and a resend of the same request is answered with the boletos as they were issued. An issuance is refused with 422 PBP-0006 when days past the provider’s current maximum are configured, and, with 0 days, when it carries a fine or interest that would start the day after the due date; in a batch, each such item is a problem PBP-0006 and the whole batch is refused with 422 PBP-0123.
VALIDATION. days must be null or 0 to 3650, reason must not be blank and version must not be negative; otherwise 400 PBP-0001, before any write. A provider not installed on this deployment is refused with 422 PBP-0702 reason PROVIDER_NOT_INSTALLED; one that registers no payment deadline, or sets its default itself (LERIAN, from the agreement), with reason CAPABILITY_MISSING; days past the provider’s maximum with reason PAYMENT_DEADLINE_ABOVE_MAXIMUM and the maximum in maxDays; a provider not connected to the tenant with reason PROVIDER_NOT_CONNECTED. A write of the days already stored (or of null with nothing stored) is refused with reason NO_CHANGE. Writing the provider’s default as a number stores it: it stays if the provider’s default changes later. Nothing is written on any refusal. A connection that cannot be read answers 503 PBP-0008 and nothing is written. Writes of the same provider are serialized; one that cannot take its turn in time answers 503 PBP-0008, nothing written, and can be resent under the same Idempotency-Key.
OPTIMISTIC CONCURRENCY. version must be the current version of the setting (0 when never written), read with getProviderPaymentDeadline. A stale version is refused with 409 PBP-0705.
IDEMPOTENT under Idempotency-Key: a retry with the same key replays the stored 200. A missing or malformed key is refused with 400 PBP-0012.
WHO MAY CALL IT: provider-routes:configure; otherwise 403 PBP-0004.
Encabezados
Parámetros de ruta
Cuerpo
The days, the reason and the version read.
Calendar days after the due date; 0 is a deadline on the due date. Null returns to the provider's default. Required: send null explicitly to return to the default. Above the provider's maxDays is refused with 422 PBP-0702 reason PAYMENT_DEADLINE_ABOVE_MAXIMUM.
0 <= x <= 365010
Respuesta
OK

