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

GC-1583: updated sdk #174

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions lib/Api/BuckslipsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,17 @@ public function createWithHttpInfo($buckslip_editable, $front = null)
$options = $this->createHttpClientOption();
$requestError = null;
try {
if(file != null) {
$response = $this->client->request(
'POST',
$request->getUri()->__toString(),
[
'multipart' => [[
'name' => 'file',
'contents' => Utils::tryFopen($file, 'r')
]],
'auth' => $options['auth']
]
);
}
$response = $this->client->request(
'POST',
$request->getUri()->__toString(),
[
'multipart' => [[
'name' => 'file',
'contents' => Utils::tryFopen($file, 'r')
]],
'auth' => $options['auth']
]
);
} catch (RequestException $e) {
$errorBody = json_decode($e->getResponse()->getBody()->getContents())->error;
$requestError = new LobError();
Expand Down
27 changes: 11 additions & 16 deletions lib/Api/LettersApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,22 +340,17 @@ public function createWithHttpInfo($letter_editable, $idempotency_key = null, $f
$options = $this->createHttpClientOption();
$requestError = null;
try {
if($file != null) {
$response = $this->client->request(
'POST',
$request->getUri()->__toString(),
[
'multipart' => [[
'name' => 'file',
'contents' => Utils::tryFopen($file, 'r')
]],
'auth' => $options['auth']
]
);
}
else {
$response = $this->client->send($request, $options);
}
$response = $this->client->request(
'POST',
$request->getUri()->__toString(),
[
'multipart' => [[
'name' => 'file',
'contents' => Utils::tryFopen($file, 'r')
]],
'auth' => $options['auth']
]
);
} catch (RequestException $e) {
$errorBody = json_decode($e->getResponse()->getBody()->getContents())->error;
$requestError = new LobError();
Expand Down
24 changes: 11 additions & 13 deletions lib/Api/UploadsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -955,19 +955,17 @@ public function upload_fileWithHttpInfo($upl_id, $file)
$options = $this->createHttpClientOption();
$requestError = null;
try {
if(file != null) {
$response = $this->client->request(
'POST',
$request->getUri()->__toString(),
[
'multipart' => [[
'name' => 'file',
'contents' => Utils::tryFopen($file, 'r')
]],
'auth' => $options['auth']
]
);
}
$response = $this->client->request(
'POST',
$request->getUri()->__toString(),
[
'multipart' => [[
'name' => 'file',
'contents' => Utils::tryFopen($file, 'r')
]],
'auth' => $options['auth']
]
);
} catch (RequestException $e) {
$errorBody = json_decode($e->getResponse()->getBody()->getContents())->error;
$requestError = new LobError();
Expand Down
Loading
Loading