Created
July 1, 2022 21:40
-
-
Save lobot/29ba63774615b1e3a54715e50ef32bbc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'lob.rb' | |
require 'pp' | |
lob = Lob::Client.new(api_key: "<TEST_API_KEY>") | |
pp lob.postcards.create( | |
description: "First Postcard", | |
to: { | |
name: "Harry Zhang", | |
address_line1: "210 King Street", | |
address_city: "San Francisco", | |
address_state: "CA", | |
address_zip: "94107" | |
}, | |
from: { | |
name: "Leore Avidar", | |
address_line1: "210 King Street", | |
address_city: "San Francisco", | |
address_state: "CA", | |
address_zip: "94107" | |
}, | |
merge_variables: { name: "Harry" }, | |
front: "<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>", | |
back: "<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment