From 3442d49b9dfe80b8f0e0de0eea1771935501b8bd Mon Sep 17 00:00:00 2001 From: Michael Morgan <94082162+mike-r-morgan@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:43:34 -0800 Subject: [PATCH] GC-3471 correct PCLS cancellation examples (#513) * GC-3471 correct PCLS cancellation examples * bundle --- dist/lob-api-bundled.yml | 36 ++--- docs/index.html | 36 ++--- package-lock.json | 213 +++++++++---------------- package.json | 2 +- resources/checks/check.yml | 4 +- resources/letters/letter.yml | 4 +- resources/postcards/postcard.yml | 12 +- resources/self_mailers/self_mailer.yml | 16 +- 8 files changed, 127 insertions(+), 196 deletions(-) diff --git a/dist/lob-api-bundled.yml b/dist/lob-api-bundled.yml index ccb1d517..8a5a08c2 100644 --- a/dist/lob-api-bundled.yml +++ b/dist/lob-api-bundled.yml @@ -7442,14 +7442,14 @@ paths: - 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 @@ -8441,14 +8441,14 @@ paths: - 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 @@ -9458,23 +9458,23 @@ paths: - 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 @@ -9517,7 +9517,7 @@ paths: 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()); } @@ -9529,7 +9529,7 @@ paths: 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 @@ -11220,14 +11220,14 @@ paths: - 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 @@ -11236,7 +11236,7 @@ paths: selfMailerApi = SelfMailersApi.new(config) begin - deletedSelfMailer = selfMailerApi.delete("sfm_8ffbe811dea49dcf") + deletedSelfMailer = selfMailerApi.cancel("sfm_8ffbe811dea49dcf") rescue => err p err.message end @@ -11247,7 +11247,7 @@ paths: 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 @@ -11256,7 +11256,7 @@ paths: $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; } @@ -11265,7 +11265,7 @@ paths: SelfMailersApi apiInstance = new SelfMailersApi(config); try { - SelfMailerDeletion response = apiInstance.delete("sfm_8ffbe811dea49dcf"); + SelfMailerDeletion response = apiInstance.cancel("sfm_8ffbe811dea49dcf"); } catch (ApiException e) { e.printStackTrace(); } @@ -11279,7 +11279,7 @@ paths: 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()); } @@ -11291,7 +11291,7 @@ paths: 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 diff --git a/docs/index.html b/docs/index.html index b2738683..9060685e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3268,7 +3268,7 @@
An array of tracking_event objects ordered by ascending time
. Will not be populated for postcards created in test mode.
Denotes resources created by the provided campaign id, prefixed with cmp_
. In the case of snap packs, booklets, and letters with size us_legal
, however, the campaign id is prefixed with camp_
instead of cmp_
.
The use type for each mailpiece. Can be one of marketing, operational, or null. Null use_type is only allowed if an account default use_type is selected in Account Settings. For more information on use_type, see our Help Center article.
-This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 4x6
or A5
postcard sizes.
This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 4x6
or A5
postcard sizes.
A string describing the PDF render status:
processed
- the rendering process is currently in progress.Required if to
address is international. Must either be an address ID or an inline object with correct address parameters. Must either be an address ID or an inline object with correct address parameters. All addresses will be standardized into uppercase without being modified by verification.
An optional string with the billing group ID to tag your usage with. Is used for billing purposes. Requires special activation to use. See Billing Group API for more information.
Customize and place a QR code on the creative at the required position.
-This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 4x6
or A5
postcard sizes.
This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 4x6
or A5
postcard sizes.
ratelimit-limit | integer Example: 150 The rate limit for a given endpoint. |
ratelimit-remaining | integer Example: 100 The number of requests remaining in the current window. @@ -3393,7 +3393,7 @@3. Learn more |
Array of objects or null (tracking_event_normal) An array of tracking_event objects ordered by ascending | |
campaign_id | string or null (campaign_id) ^(cmp|camp)_[a-zA-Z0-9]+$ Denotes resources created by the provided campaign id, prefixed with |
use_type | string or null (psc_use_type) Enum: "marketing" "operational" null The use type for each mailpiece. Can be one of marketing, operational, or null. Null use_type is only allowed if an account default use_type is selected in Account Settings. For more information on use_type, see our Help Center article. - |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
status | string (status) Enum: "processed" "rendered" "failed" A string describing the PDF render status:
3. Learn more |
merge_variables | object or null (merge_variables) <= 25000 characters You can input a merge variable payload object to your template or QR code redirect URLs to render dynamic content. For example, if you have a template like: |
string or string (send_date) A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default cancellation window applied to the mailpiece. Until the | |
size | string (self_mailer_size) Default: "6x18_bifold" Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold" Specifies the size of the self mailer. The |
size | string (self_mailer_size) Default: "6x18_bifold" Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold" Specifies the size of the self mailer. The |
Array of objects (thumbnail) | |
expected_delivery_date | string <date> (expected_delivery_date) A date in YYYY-MM-DD format of the mailpiece's expected delivery date based on its |
date_created | string <date-time> (date_created) A timestamp in ISO 8601 format of the date the resource was created. |
date_modified | string <date-time> (date_modified) A timestamp in ISO 8601 format of the date the resource was last modified. @@ -3435,7 +3435,7 @@3. Learn more |
inside_template_version_id | string or null^vrsn_[a-zA-Z0-9]+$ The unique ID of the specific version of the HTML template used for the inside of the self mailer. |
object | string Default: "self_mailer" Value: "self_mailer" Value is resource type. |
Array of objects (tracking_event_certified) An array of certified tracking events ordered by ascending | |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
status | string (status) Enum: "processed" "rendered" "failed" A string describing the PDF render status:
3. Learn more |
merge_variables | object or null (merge_variables) <= 25000 characters You can input a merge variable payload object to your template or QR code redirect URLs to render dynamic content. For example, if you have a template like: |
string or string (send_date) A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default cancellation window applied to the mailpiece. Until the | |
size | string (self_mailer_size) Default: "6x18_bifold" Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold" Specifies the size of the self mailer. The |
size | string (self_mailer_size) Default: "6x18_bifold" Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold" Specifies the size of the self mailer. The |
adr_id (string) or (address_editable_us (address obj with `name` defined (object) or address obj with `company` defined (object))) Required if | |
billing_group_id | string (billing_group_id) An optional string with the billing group ID to tag your usage with. Is used for billing purposes. Requires special activation to use. See Billing Group API for more information. |
object (qr_code) Customize and place a QR code on the creative at the required position. - | |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
ratelimit-limit | integer Example: 150 The rate limit for a given endpoint. |
ratelimit-remaining | integer Example: 100 The number of requests remaining in the current window. @@ -3549,7 +3549,7 @@3. Learn more |
merge_variables | object or null (merge_variables) <= 25000 characters You can input a merge variable payload object to your template or QR code redirect URLs to render dynamic content. For example, if you have a template like: |
string or string (send_date) A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default cancellation window applied to the mailpiece. Until the | |
size | string (self_mailer_size) Default: "6x18_bifold" Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold" Specifies the size of the self mailer. The |
size | string (self_mailer_size) Default: "6x18_bifold" Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold" Specifies the size of the self mailer. The |
Array of objects (thumbnail) | |
expected_delivery_date | string <date> (expected_delivery_date) A date in YYYY-MM-DD format of the mailpiece's expected delivery date based on its |
date_created | string <date-time> (date_created) A timestamp in ISO 8601 format of the date the resource was created. |
date_modified | string <date-time> (date_modified) A timestamp in ISO 8601 format of the date the resource was last modified. @@ -3560,7 +3560,7 @@3. Learn more |
inside_template_version_id | string or null^vrsn_[a-zA-Z0-9]+$ The unique ID of the specific version of the HTML template used for the inside of the self mailer. |
object | string Default: "self_mailer" Value: "self_mailer" Value is resource type. |
Array of objects (tracking_event_certified) An array of certified tracking events ordered by ascending | |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
status | string (status) Enum: "processed" "rendered" "failed" A string describing the PDF render status:
3. Learn more |
template_id | string^tmpl_[a-zA-Z0-9]+$ The unique ID of the HTML template used for the letter. |
template_version_id | string^vrsn_[a-zA-Z0-9]+$ The unique ID of the specific version of the HTML template used for the letter. |
campaign_id | string or null (campaign_id) ^(cmp|camp)_[a-zA-Z0-9]+$ Denotes resources created by the provided campaign id, prefixed with |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
status | string (status) Enum: "processed" "rendered" "failed" A string describing the PDF render status:
3. Learn more |
custom_envelope | string or null (user_provided) ^env_[a-zA-Z0-9]+$ Accepts an envelope ID for any customized envelope with available inventory. If no inventory is available for the specified ID, the letter will not be sent, and an error will be returned. If the letter has more than 6 sheets, it will be sent in a blank flat envelope. Custom envelopes may be created and ordered from the dashboard. This feature is exclusive to certain customers. Upgrade to the appropriate Print & Mail Edition to gain access. |
billing_group_id | string (billing_group_id) An optional string with the billing group ID to tag your usage with. Is used for billing purposes. Requires special activation to use. See Billing Group API for more information. |
object (qr_code) Customize and place a QR code on the creative at the required position. - | |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. Not available for |
size | string (ltr_size) Default: "us_letter" Enum: "us_letter" "us_legal" Specifies the size of the letter. It accepts two values Please note that attempting to include the |
The unique ID of the HTML template used for the letter.
The unique ID of the specific version of the HTML template used for the letter.
Denotes resources created by the provided campaign id, prefixed with cmp_
. In the case of snap packs, booklets, and letters with size us_legal
, however, the campaign id is prefixed with camp_
instead of cmp_
.
This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4
letter size.
This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4
letter size.
A string describing the PDF render status:
processed
- the rendering process is currently in progress.The unique ID of the specific version of the HTML template used for the inside of the snap pack.
Value is resource type.
An array of tracking events ordered by ascending time
. Not populated in test mode.
Contact support@lob.com or your account contact to learn more. Not available for snap_pack currently.
+Contact support@lob.com or your account contact to learn more. Not available for snap_pack currently.
A string describing the PDF render status:
processed
- the rendering process is currently in progress.The unique ID of the specific version of the HTML template used for the inside of the snap pack.
Value is resource type.
An array of tracking events ordered by ascending time
. Not populated in test mode.
Contact support@lob.com or your account contact to learn more. Not available for snap_pack currently.
+Contact support@lob.com or your account contact to learn more. Not available for snap_pack currently.
A string describing the PDF render status:
processed
- the rendering process is currently in progress.Denotes resources created by the provided campaign id, prefixed with cmp_
. In the case of snap packs, booklets, and letters with size us_legal
, however, the campaign id is prefixed with camp_
instead of cmp_
.
Specifies the size of the booklet.
Pages specifies the total number of pages in a booklet, where four pages make up one sheet. Pages must always be in increments of four to maintain booklet integrity. For a booklet with dimensions of 8.375x5.375 inches, we allow for 8, 12, 16, 20, 24, 28, or 32 pages.
-This is in beta. Contact support@lob.com or your account contact to learn more.
+This is in beta. Contact support@lob.com or your account contact to learn more.
A string describing the PDF render status:
processed
- the rendering process is currently in progress.A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default cancellation window applied to the mailpiece. Until the send_date
has passed, the mailpiece can be canceled. If a date in the format 2017-11-01
is passed, it will evaluate to midnight UTC of that date (2017-11-01T00:00:00.000Z
). If a datetime is passed, that exact time will be used. A send_date
passed with no time zone will default to UTC, while a send_date
passed with a time zone will be converted to UTC.
An optional string with the billing group ID to tag your usage with. Is used for billing purposes. Requires special activation to use. See Billing Group API for more information.
Customize and place a QR code on the creative at the required position.
-This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4
and us_legal
letter size.
This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4
and us_legal
letter size.
Defines the material used to create the mail piece, specifically for booklets. This property is directly tied to the size of the booklet, ensuring that the appropriate material is selected based on the booklet's dimensions. For booklets with size
equal to 8.375x5.375
inches, the default source material is 60# Gloss Text
.
ratelimit-limit | integer Example: 150 The rate limit for a given endpoint. @@ -4238,7 +4238,7 @@3. Learn more |
campaign_id | string or null (campaign_id) ^(cmp|camp)_[a-zA-Z0-9]+$ Denotes resources created by the provided campaign id, prefixed with |
size | string (booklet_size) Default: "8.375x5.375" Value: "8.375x5.375" Specifies the size of the booklet. |
pages | integer (booklet_pages) Pages specifies the total number of pages in a booklet, where four pages make up one sheet. Pages must always be in increments of four to maintain booklet integrity. For a booklet with dimensions of 8.375x5.375 inches, we allow for 8, 12, 16, 20, 24, 28, or 32 pages. - |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. + |
fsc | boolean Default: false This is in beta. Contact support@lob.com or your account contact to learn more. |
status | string (status) Enum: "processed" "rendered" "failed" A string describing the PDF render status:
Changelog |