forked from apoloz/alfa-bank-sdk
fix(formating)
This commit is contained in:
@@ -51,6 +51,14 @@ class ChangeAccountForCashQrRequest extends Request implements HasBody
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="response_caster" intent="Return the raw JSON response as an array.">
|
||||
// <BELIEF_STATE "For this specific request, the response is currently returned as a raw array. A dedicated DTO could be created if a structured object is required.">
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="body_builder" intent="Construct the JSON body for the request.">
|
||||
// <BELIEF_STATE "The `command` field specifies the operation to the SBP API. Fields are conditionally added based on constructor parameters, ensuring the payload precisely matches the API specification.">
|
||||
protected function defaultBody(): array
|
||||
@@ -62,19 +70,17 @@ class ChangeAccountForCashQrRequest extends Request implements HasBody
|
||||
'account' => $this->account,
|
||||
];
|
||||
|
||||
if ($this->NewTermNo !== null) $body['NewTermNo'] = $this->NewTermNo;
|
||||
if ($this->NewMerchantId !== null) $body['NewMerchantId'] = $this->NewMerchantId;
|
||||
if ($this->redirectUrl !== null) $body['redirectUrl'] = $this->redirectUrl;
|
||||
if ($this->NewTermNo !== null) {
|
||||
$body['NewTermNo'] = $this->NewTermNo;
|
||||
}
|
||||
if ($this->NewMerchantId !== null) {
|
||||
$body['NewMerchantId'] = $this->NewMerchantId;
|
||||
}
|
||||
if ($this->redirectUrl !== null) {
|
||||
$body['redirectUrl'] = $this->redirectUrl;
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
// <SECTION name="response_caster" intent="Return the raw JSON response as an array.">
|
||||
// <BELIEF_STATE "For this specific request, the response is currently returned as a raw array. A dedicated DTO could be created if a structured object is required.">
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
// </SECTION>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user