Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue for update in RecipientAccountGateway.php #66

Open
AndriiOleinych opened this issue Oct 13, 2023 · 0 comments
Open

fix issue for update in RecipientAccountGateway.php #66

AndriiOleinych opened this issue Oct 13, 2023 · 0 comments

Comments

@AndriiOleinych
Copy link

fix return type please in RecipientAccountGateway for update method
public function update($recipientId, $accountId, $attrib) { $response = $this->_http->patch('/v1/recipients/' . $recipientId . '/accounts/' . $accountId, $attrib); if ($response['ok']) { return Recipient::factory($response['account']); } else if ($response['errors']){ throw new Exception\Standard($response['errors']); } else { throw new Exception\DownForMaintenance(); } }

correct version:
public function update($recipientId, $accountId, $attrib) { $response = $this->_http->patch('/v1/recipients/' . $recipientId . '/accounts/' . $accountId, $attrib); if ($response['ok']) { return RecipientAccount::factory($response['account']); // fix } else if ($response['errors']){ throw new Exception\Standard($response['errors']); } else { throw new Exception\DownForMaintenance(); } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant