-
Notifications
You must be signed in to change notification settings - Fork 5
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
CMB-586: add booklets CRUD documentation #498
Changes from 1 commit
9846bc4
b7a1b81
fc68256
91185cb
2f89c9f
331ab53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type: string | ||
|
||
description: Unique identifier prefixed with `ord_`. | ||
|
||
pattern: "^ord_[0-9a-f]{26}$" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
type: boolean | ||
description: >- | ||
Booklets are always printed in color. | ||
default: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
allOf: | ||
- type: object | ||
|
||
properties: | ||
tracking_events: | ||
description: An array of tracking events ordered by ascending `time`. | ||
type: array | ||
items: | ||
$ref: "../../../shared/resources/tracking_events/models/tracking_event_normal.yml" | ||
|
||
description: | ||
$ref: "../../../shared/attributes/resource_description.yml" | ||
|
||
metadata: | ||
$ref: "../../../shared/models/metadata.yml" | ||
|
||
merge_variables: | ||
$ref: "../../../shared/models/merge_variables.yml" | ||
|
||
send_date: | ||
$ref: "../../../shared/attributes/send_date.yml" | ||
|
||
mail_type: | ||
$ref: "../../../shared/attributes/mail_type.yml" | ||
|
||
color: | ||
$ref: "../attributes/color.yml" | ||
|
||
- $ref: "booklet_generated_base.yml" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
allOf: | ||
- $ref: "../../../shared/models/form_factor/generated.yml" | ||
- $ref: "../../../shared/models/form_factor/from.yml" | ||
|
||
- type: object | ||
|
||
required: | ||
- id | ||
- from | ||
- use_type | ||
|
||
properties: | ||
url: | ||
$ref: "../../../shared/attributes/signed_link.yml" | ||
|
||
id: | ||
$ref: "../attributes/booklet_id.yml" | ||
|
||
template_id: | ||
allOf: | ||
- description: The unique ID of the HTML template used for the booklet. | ||
- $ref: "../../../shared/attributes/model_ids/tmpl_id.yml" | ||
|
||
template_version_id: | ||
allOf: | ||
- description: The unique ID of the specific version of the HTML template used for the booklet. | ||
type: string | ||
- $ref: "../../../shared/attributes/model_ids/vrsn_id.yml" | ||
|
||
campaign_id: | ||
$ref: "../../../shared/attributes/campaign_id.yml" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file should be updated to note that campaign ids for booklets will also be prefixed with |
||
|
||
use_type: | ||
$ref: "../attributes/booklet_use_type.yml" | ||
|
||
fsc: # Forest Stewardship Council | ||
type: boolean | ||
description: This is in beta. Contact support@lob.com or your account contact to learn more. | ||
default: false | ||
|
||
status: | ||
$ref: "../../../shared/attributes/status.yml" | ||
|
||
failure_reason: | ||
allOf: | ||
- $ref: "../../../shared/models/failure_reason/failure_reason.yml" | ||
- nullable: true | ||
|
||
object: | ||
type: string | ||
description: Value is resource type. | ||
enum: | ||
- booklet | ||
default: booklet |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
application/json: | ||
schema: | ||
$ref: "../models/booklet.yml" | ||
example: | ||
id: ord_0d6a16a3fff6318ac8f8008dc1 | ||
description: April Campaign | ||
metadata: {} | ||
to: | ||
id: adr_d3489cd64c791ab5 | ||
description: null | ||
name: HARRY ZHANG | ||
company: null | ||
phone: null | ||
email: null | ||
address_line1: 210 KING ST STE 6100 | ||
address_line2: null | ||
address_city: SAN FRANCISCO | ||
address_state: CA | ||
address_zip: 94107-1741 | ||
address_country: UNITED STATES | ||
metadata: {} | ||
date_created: "2017-09-05T15:54:53.264Z" | ||
date_modified: "2017-09-05T15:54:53.264Z" | ||
deleted: true | ||
object: address | ||
from: | ||
id: adr_b8fb5acf3a2b55db | ||
description: null | ||
name: LEORE AVIDAR | ||
company: null | ||
phone: null | ||
email: null | ||
address_line1: 210 KING ST STE 6100 | ||
address_line2: null | ||
address_city: SAN FRANCISCO | ||
address_state: CA | ||
address_zip: 94107-1741 | ||
address_country: UNITED STATES | ||
metadata: {} | ||
date_created: "2017-09-05T15:54:53.264Z" | ||
date_modified: "2017-09-05T15:54:53.264Z" | ||
deleted: true | ||
object: address | ||
color: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and here |
||
mail_type: usps_first_class | ||
url: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA | ||
carrier: USPS | ||
tracking_number: null | ||
tracking_events: [] | ||
thumbnails: | ||
- small: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA | ||
medium: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ | ||
large: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg | ||
merge_variables: | ||
name: Harry | ||
size: 9x6 | ||
expected_delivery_date: "2021-03-24" | ||
date_created: "2021-03-16T18:40:40.504Z" | ||
date_modified: "2021-03-16T18:40:40.504Z" | ||
send_date: "2021-03-16T18:45:40.493Z" | ||
use_type: marketing | ||
fsc: false | ||
object: booklet |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
description: Returns a booklet object | ||
|
||
headers: | ||
ratelimit-limit: | ||
$ref: "../../../shared/headers/ratelimit.yml#/ratelimit-limit" | ||
ratelimit-remaining: | ||
$ref: "../../../shared/headers/ratelimit.yml#/ratelimit-remaining" | ||
ratelimit-reset: | ||
$ref: "../../../shared/headers/ratelimit.yml#/ratelimit-reset" | ||
|
||
content: | ||
$ref: "booklet.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
color shouldn't be part of the booklet payload so we can remove this attribute and remove color from the samples. I think we still have it in the booklet serializer but currently it will always be undefined. I'll create a ticket to remove color and return_address.