Skip to content

Commit

Permalink
GC-3471 correct PCLS cancellation examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-r-morgan committed Nov 13, 2024
1 parent a44afcd commit 2c3d010
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lob/openapi",
"version": "1.20.2",
"version": "1.20.3",
"engines": {
"node": ">=14.16.0",
"npm": ">=7.9.0"
Expand Down
4 changes: 2 additions & 2 deletions resources/checks/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ delete:
- lang: Typescript
source: |
try {
const deleteCheck = await new ChecksApi(config).delete('chk_xxxx');
const deleteCheck = await new ChecksApi(config).cancel('chk_xxxx');
} catch (err: any) {
console.error(err);
}
label: TYPESCRIPT
- lang: Javascript
source: |
Lob.checks.delete('chk_534f10783683daa0', function (err, res) {
Lob.checks.cancel('chk_534f10783683daa0', function (err, res) {
console.log(err, res);
});
label: NODE
Expand Down
4 changes: 2 additions & 2 deletions resources/letters/letter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ delete:
- lang: Typescript
source: |
try {
const deleteLetter = await new LettersApi(config).delete('ltr_xxxx')
const deleteLetter = await new LettersApi(config).cancel('ltr_xxxx')
} catch (err: any) {
console.error(err);
}
label: TYPESCRIPT
- lang: Javascript
source: |
Lob.letters.delete('ltr_4868c3b754655f90', function (err, res) {
Lob.letters.cancel('ltr_4868c3b754655f90', function (err, res) {
console.log(err, res);
});
label: NODE
Expand Down
12 changes: 6 additions & 6 deletions resources/postcards/postcard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,23 @@ delete:
- lang: Typescript
source: |
try {
const deletePostcard = await new PostcardsApi(config).delete('psc_xxxx');
const deletePostcard = await new PostcardsApi(config).cancel('psc_xxxx');
} catch (err: any) {
console.error(err);
}
label: TYPESCRIPT
- lang: Javascript
source: |
Lob.postcards.delete('psc_5c002b86ce47537a', function (err, res) {
Lob.postcards.cancel('psc_5c002b86ce47537a', function (err, res) {
console.log(err, res);
});
label: NODE
- lang: Ruby
source: |
letterApi = LettersApi.new(config)
postcardApi = PostcardsApi.new(config)
begin
deletedLetter = letterApi.cancel("ltr_4868c3b754655f90")
deletedPostcard = postcardApi.cancel("psc_4868c3b754655f90")
rescue => err
p err.message
end
Expand Down Expand Up @@ -207,7 +207,7 @@ delete:
PostcardsApi api = new PostcardsApi(config);
try {
PostcardDeletion response = api.delete("psc_5c002b86ce47537a");
PostcardDeletion response = api.cancel("psc_5c002b86ce47537a");
} catch (ApiException e) {
Console.WriteLine(e.ToString());
}
Expand All @@ -219,7 +219,7 @@ delete:
var apiClient = *lob.NewAPIClient(configuration)
deletedPostcard, _, err := apiClient.PostcardsApi.Delete(context, "psc_5c002b86ce47537a").Execute()
deletedPostcard, _, err := apiClient.PostcardsApi.Cancel(context, "psc_5c002b86ce47537a").Execute()
if err != nil {
return err
Expand Down
16 changes: 8 additions & 8 deletions resources/self_mailers/self_mailer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ delete:
- lang: typescript
source: |
try {
const deleteSelfMailer = await new SelfMailersApi(config).delete('sfm_xxxx');
const deleteSelfMailer = await new SelfMailersApi(config).cancel('sfm_xxxx');
} catch (err: any) {
console.error(err);
}
label: TYPESCRIPT
- lang: Javascript
source: |
Lob.selfMailers.delete('sfm_8ffbe811dea49dcf', function (err, res) {
Lob.selfMailers.cancel('sfm_8ffbe811dea49dcf', function (err, res) {
console.log(err, res);
});
label: NODE
Expand All @@ -161,7 +161,7 @@ delete:
selfMailerApi = SelfMailersApi.new(config)
begin
deletedSelfMailer = selfMailerApi.delete("sfm_8ffbe811dea49dcf")
deletedSelfMailer = selfMailerApi.cancel("sfm_8ffbe811dea49dcf")
rescue => err
p err.message
end
Expand All @@ -172,7 +172,7 @@ delete:
api = SelfMailersApi(api_client)
try:
deleted_resource = api.delete("sfm_8ffbe811dea49dcf")
deleted_resource = api.cancel("sfm_8ffbe811dea49dcf")
except ApiException as e:
print(e)
label: PYTHON
Expand All @@ -181,7 +181,7 @@ delete:
$apiInstance = new OpenAPI\Client\Api\SelfMailersApi($config, new GuzzleHttp\Client());
try {
$result = $apiInstance->delete("sfm_8ffbe811dea49dcf");
$result = $apiInstance->cancel("sfm_8ffbe811dea49dcf");
} catch (Exception $e) {
echo $e->getMessage(), PHP_EOL;
}
Expand All @@ -190,7 +190,7 @@ delete:
SelfMailersApi apiInstance = new SelfMailersApi(config);
try {
SelfMailerDeletion response = apiInstance.delete("sfm_8ffbe811dea49dcf");
SelfMailerDeletion response = apiInstance.cancel("sfm_8ffbe811dea49dcf");
} catch (ApiException e) {
e.printStackTrace();
}
Expand All @@ -204,7 +204,7 @@ delete:
SelfMailersApi api = new SelfMailersApi(config);
try {
SelfMailerDeletion response = api.delete("sfm_8ffbe811dea49dcf");
SelfMailerDeletion response = api.cancel("sfm_8ffbe811dea49dcf");
} catch (ApiException e) {
Console.WriteLine(e.ToString());
}
Expand All @@ -216,7 +216,7 @@ delete:
var apiClient = *lob.NewAPIClient(configuration)
deletedSelfMailer, _, err := apiClient.SelfMailersApi.Delete(context, "sfm_8ffbe811dea49dcf").Execute()
deletedSelfMailer, _, err := apiClient.SelfMailersApi.Cancel(context, "sfm_8ffbe811dea49dcf").Execute()
if err != nil {
return err
Expand Down

0 comments on commit 2c3d010

Please sign in to comment.