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-1466/adds self mailer qr codes documentation #460

Merged
merged 7 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
10 changes: 5 additions & 5 deletions dist/lob-api-bundled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7714,7 +7714,7 @@ components:
type: object
description: >-
Customize and place a QR code on all the postcards and letters in a
campaign. Redirect URLs can either be unqiue for each recipient, or a
campaign. Redirect URLs can either be unique for each recipient, or a
single link can be used for the whole campaign. See `redirect_url`
attribute below for more details.
required:
Expand All @@ -7728,16 +7728,16 @@ components:
description: Sets how a QR code is being positioned in the document.
top:
type: string
description: Vertical distance(in inches) to place QR code from the top.
description: Vertical distance (in inches) to place QR code from the top.
right:
type: string
description: Horizonal distance(in inches) to place QR code from the right.
description: Horizonal distance (in inches) to place QR code from the right.
left:
type: string
description: Horizonal distance(in inches) to place QR code from the left.
description: Horizonal distance (in inches) to place QR code from the left.
bottom:
type: string
description: Vertical distance(in inches) to place QR code from the bottom.
description: Vertical distance (in inches) to place QR code from the bottom.
redirect_url:
description: >
Redirect all mail receipients to either a single URL or a custom
Expand Down
40 changes: 20 additions & 20 deletions docs/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions resources/creatives/models/letter_details.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# only diff b/t `writable` and `returned` are the `custom_envelope` and `return_envelope` fields
writable:
description: Properties that the letters in your Creative should have.
description: Properties that the letters in your Creative should have. Check within in order to add a QR code to your creative.

required:
- color
Expand Down Expand Up @@ -63,7 +63,7 @@ writable:
# size:

returned:
description: Properties that the letters in your Creative should have.
description: Properties that the letters in your Creative should have. Check within in order to add a QR code to your creative.

properties:
address_placement:
Expand Down
4 changes: 2 additions & 2 deletions resources/creatives/models/postcard_details.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
writable:
description: Properties that the postcards in your Creative should have.
description: Properties that the postcards in your Creative should have. Check within in order to add a QR code to your creative.

required:
- color
Expand All @@ -15,7 +15,7 @@ writable:
$ref: "../../../shared/models/qr_code_campaigns.yml"

returned:
description: Properties that the postcards in your Creative should have.
description: Properties that the postcards in your Creative should have. Check within in order to add a QR code to your creative.

properties:
mail_type:
Expand Down
16 changes: 16 additions & 0 deletions resources/creatives/models/returned_resource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,19 @@ oneOf:
details:
$ref: "letter_details.yml#/returned"
- $ref: "creative_base.yml"
- allOf:
- title: Self Mailer Creative
required:
- resource_type
- details
properties:
resource_type:
type: string
description: Mailpiece type for the creative
enum:
- self_mailer

details:
$ref: "self_mailer_details.yml#/returned"

- $ref: "creative_base.yml"
39 changes: 39 additions & 0 deletions resources/creatives/models/self_mailer_details.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
writable:
description: Properties that the self mailers in your Creative should have. Check within in order to add a QR code to your creative.

required:
- color

properties:
mail_type:
$ref: "../../../shared/attributes/mail_type.yml"

size:
$ref: "../../self_mailers/attributes/self_mailer_size.yml"

qr_code:
$ref: "../../../shared/models/qr_code_campaigns.yml"

returned:
description: Properties that the self mailers in your Creative should have. Check within in order to add a QR code to your creative.

properties:
mail_type:
$ref: "../../../shared/attributes/mail_type.yml"

size:
$ref: "../../self_mailers/attributes/self_mailer_size.yml"

inside_original_url:
description: The original URL of the `inside` template.
maxLength: 2083
minLength: 1
type: string
format: uri

outside_original_url:
description: The original URL of the `outside` template.
maxLength: 2083
minLength: 1
type: string
format: uri
12 changes: 6 additions & 6 deletions shared/models/qr_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@ properties:
type: string
enum:
- relative
description: Sets how a QR code is being positioned in the document.
description: Sets how a QR code is being positioned in the document. When using position 'relative', you should provide one of 'top' or 'bottom', and one of 'left' or 'right'.

top:
type: string
description: Vertical distance(in inches) to place QR code from the top.
description: Vertical distance (in inches) to place QR code from the top.

right:
type: string
description: Horizonal distance(in inches) to place QR code from the right.
description: Horizonal distance (in inches) to place QR code from the right.

left:
type: string
description: Horizonal distance(in inches) to place QR code from the left.

bottom:
type: string
description: Vertical distance(in inches) to place QR code from the bottom.
description: Vertical distance (in inches) to place QR code from the bottom.

redirect_url:
type: string
description: The url to redirect the user when a QR code is scanned. The url must start with `https://`

width:
type: string
description: The size(in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square.
description: The size (in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square.

pages:
type: string
description: Specify the pages where the QR code should be stamped in a comma separated format. For postcards, the values should be either `front`, `back`, or `front,back`. For letters, the values can be specific page numbers or page number ranges. For selfmailers, the values should be either `inside`, `outside`, or `inside,outside`.
description: Specify the pages where the QR code should be stamped in a comma separated format. Your QR code can be printed in the same position on multiple pages. For postcards, the values should either be "front", "back" (for either front or back) or "front,back" (for the QR code to be printed on both sides). For self-mailers, the values should either be "inside", "outside" (for either inside or outside) or "inside,outside" (for the QR code to be printed on both sides). For letters, the values can be specific page numbers ("1", "3"), page number ranges such as "1-3", or a comma separated combination of both ("1,3,5-7").
18 changes: 9 additions & 9 deletions shared/models/qr_code_campaigns.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type: object
description: Customize and place a QR code on all the postcards and letters in a campaign. Redirect URLs can either be unqiue for each recipient, or a single link can be used for the whole campaign. See `redirect_url` attribute below for more details.
description: Customize and place a QR code on all the postcards and letters in a campaign. Redirect URLs can either be unique for each recipient, or a single link can be used for the whole campaign. See `redirect_url` attribute below for more details.
required:
- position
- width
Expand All @@ -8,24 +8,24 @@ properties:
position:
type: string
enum:
- relative
description: Sets how a QR code is being positioned in the document.
- relative, fixed
description: Sets how a QR code is being positioned in the document. When using position 'relative', you should provide one of 'top' or 'bottom', and one of 'left' or 'right'.

top:
type: string
description: Vertical distance(in inches) to place QR code from the top.
description: Vertical distance (in inches) to place QR code from the top.

right:
type: string
description: Horizonal distance(in inches) to place QR code from the right.
description: Horizonal distance (in inches) to place QR code from the right.

left:
type: string
description: Horizonal distance(in inches) to place QR code from the left.
description: Horizonal distance (in inches) to place QR code from the left.

bottom:
type: string
description: Vertical distance(in inches) to place QR code from the bottom.
description: Vertical distance (in inches) to place QR code from the bottom.

redirect_url:
description: >
Expand All @@ -39,8 +39,8 @@ properties:

width:
type: string
description: The size(in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square.
description: The size (in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square.

pages:
type: string
description: Specify the pages where the QR code should be stamped in a comma separated format. For postcards, the values should be either `front`, `back`, or `front,back`. For letters, the values can be specific page numbers or page number ranges.
description: Specify the pages where the QR code should be stamped in a comma separated format. Your QR code can be printed in the same position on multiple pages. For postcards, the values should either be "front", "back" (for either front or back) or "front,back" (for the QR code to be printed on both sides). For self-mailers, the values should either be "inside", "outside" (for either inside or outside) or "inside,outside" (for the QR code to be printed on both sides). For letters, the values can be specific page numbers ("1", "3"), page number ranges such as "1-3", or a comma separated combination of both ("1,3,5-7").
Loading