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-1943/update-Lob-address #339

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
76 changes: 38 additions & 38 deletions CODE_SNIPPETS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ curl https://api.lob.com/v1/addresses \
-d "company=Lob" \
-d "email=harry@lob.com" \
-d "phone=5555555555" \
-d "address_line1=210 King St" \
-d "address_line2=# 6100" \
-d "address_line1=2261 Market Street" \
-d "address_line2=Ste 5668" \
-d "address_city=San Francisco" \
-d "address_state=CA" \
-d "address_zip=94107" \
-d "address_zip=94114" \
-d "address_country=US" \
```

Expand All @@ -68,11 +68,11 @@ try {
addressEditable.setCompany("Lob");
addressEditable.setEmail("harry@lob.com");
addressEditable.setPhone("5555555555");
addressEditable.setAddressLine1("210 King St");
addressEditable.setAddressLine2("# 6100");
addressEditable.setAddressLine1("2261 Market Street");
addressEditable.setAddressLine2("Ste 5668");
addressEditable.setAddressCity("San Francisco");
addressEditable.setAddressState("CA");
addressEditable.setAddressZip("94107");
addressEditable.setAddressZip("94114");
addressEditable.setAddressCountry(CountryExtended.US);

Address result = apiInstance.create(addressEditable);
Expand Down Expand Up @@ -199,11 +199,11 @@ curl https://api.lob.com/v1/postcards \
--data-urlencode "front=<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>" \
--data-urlencode "back=<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>" \
-d "to[name]=Harry Zhang" \
-d "to[address_line1]=210 King St" \
-d "to[address_line2]=# 6100" \
-d "to[address_line1]=2261 Market Street" \
-d "to[address_line2]=Ste 5668" \
-d "to[address_city]=San Francisco" \
-d "to[address_state]=CA" \
-d "to[address_zip]=94107" \
-d "to[address_zip]=94114" \
-d "merge_variables[name]=Harry" \
```

Expand All @@ -215,11 +215,11 @@ PostcardsApi apiInstance = new PostcardsApi(config);

AddressEditable to = new AddressEditable();
to.setName("Harry Zhang");
to.setAddressLine1("210 King St");
to.setAddressLine2("# 6100");
to.setAddressLine1("2261 Market Street");
to.setAddressLine2("Ste 5668");
to.setAddressCity("San Francisco");
to.setAddressState("CA");
to.setAddressZip("94107");
to.setAddressZip("94114");

try {
PostcardEditable postcardEditable = new PostcardEditable();
Expand Down Expand Up @@ -319,11 +319,11 @@ curl https://api.lob.com/v1/self_mailers \
--data-urlencode "inside=<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>" \
--data-urlencode "outside=<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>" \
-d "to[name]=Harry Zhang" \
-d "to[address_line1]=210 King St" \
-d "to[address_line2]=# 6100" \
-d "to[address_line1]=2261 Market Street" \
-d "to[address_line2]=Ste 5668" \
-d "to[address_city]=San Francisco" \
-d "to[address_state]=CA" \
-d "to[address_zip]=94107" \
-d "to[address_zip]=94114" \
-d "merge_variables[name]=Harry" \
```

Expand All @@ -335,11 +335,11 @@ SelfMailersApi apiInstance = new SelfMailersApi(config);

AddressEditable to = new AddressEditable();
to.setName("Harry Zhang");
to.setAddressLine1("210 King St");
to.setAddressLine2("# 6100");
to.setAddressLine1("2261 Market Street");
to.setAddressLine2("Ste 5668");
to.setAddressCity("San Francisco");
to.setAddressState("CA");
to.setAddressZip("94107");
to.setAddressZip("94114");

try {
SelfMailerEditable selfMailerEditable = new SelfMailerEditable();
Expand Down Expand Up @@ -439,11 +439,11 @@ curl https://api.lob.com/v1/letters \
--data-urlencode "file=<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>" \
-d "color=true" \
-d "to[name]=Harry Zhang" \
-d "to[address_line1]=210 King St" \
-d "to[address_line2]=# 6100" \
-d "to[address_line1]=2261 Market Street" \
-d "to[address_line2]=Ste 5668" \
-d "to[address_city]=San Francisco" \
-d "to[address_state]=CA" \
-d "to[address_zip]=94107" \
-d "to[address_zip]=94114" \
-d "merge_variables[name]=Harry" \
-d "cards[]=card_c51ae96f5cebf3e"
```
Expand All @@ -456,11 +456,11 @@ LettersApi apiInstance = new LettersApi(config);

AddressEditable to = new AddressEditable();
to.setName("Harry Zhang");
to.setAddressLine1("210 King St");
to.setAddressLine2("# 6100");
to.setAddressLine1("2261 Market Street");
to.setAddressLine2("Ste 5668");
to.setAddressCity("San Francisco");
to.setAddressState("CA");
to.setAddressZip("94107");
to.setAddressZip("94114");

List<String> cards = new ArrayList<String>();
cards.add("card_c51ae96f5cebf3e");
Expand Down Expand Up @@ -567,11 +567,11 @@ curl https://api.lob.com/v1/checks \
--data-urlencode "check_bottom=<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>" \
-d "from=adr_210a8d4b0b76d77b" \
-d "to[name]=Harry Zhang" \
-d "to[address_line1]=210 King St" \
-d "to[address_line2]=# 6100" \
-d "to[address_line1]=2261 Market Street" \
-d "to[address_line2]=Ste 5668" \
-d "to[address_city]=San Francisco" \
-d "to[address_state]=CA" \
-d "to[address_zip]=94107" \
-d "to[address_zip]=94114" \
-d "merge_variables[name]=Harry" \
```

Expand All @@ -583,11 +583,11 @@ ChecksApi apiInstance = new ChecksApi(config);

AddressDomestic to = new AddressDomestic();
to.setName("Harry Zhang");
to.setAddressLine1("210 King St");
to.setAddressLine2("# 6100");
to.setAddressLine1("2261 Market Street");
to.setAddressLine2("Ste 5668");
to.setAddressCity("San Francisco");
to.setAddressState("CA");
to.setAddressZip("94107");
to.setAddressZip("94114");

try {
CheckEditable checkEditable = new CheckEditable();
Expand Down Expand Up @@ -1061,10 +1061,10 @@ try {
curl https://api.lob.com/v1/bulk/us_verifications \
-u <YOUR LIVE API KEY>: \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'addresses[0][primary_line]=210 King Street' \
--data-urlencode 'addresses[0][primary_line]=2261 Market Street' \
--data-urlencode 'addresses[0][city]=San Francisco' \
--data-urlencode 'addresses[0][state]=CA' \
--data-urlencode 'addresses[0][zip_code]=94017' \
--data-urlencode 'addresses[0][zip_code]=94114' \
--data-urlencode 'addresses[1][primary_line]=185 BERRY ST STE 6600' \
--data-urlencode 'addresses[1][city]=SAN FRANCISCO' \
--data-urlencode 'addresses[1][state]=CA' \
Expand All @@ -1074,10 +1074,10 @@ curl https://api.lob.com/v1/bulk/us_verifications \
```java
MultipleComponentsList bulkVerify = new MultipleComponentsList();
MultipleComponents bulkAddress0 = new MultipleComponents();
bulkAddress0.setPrimaryLine("210 King Street");
bulkAddress0.setPrimaryLine("2261 Market Street");
bulkAddress0.setCity("San Francisco");
bulkAddress0.setState("CA");
bulkAddress0.setZipCode("94017");
bulkAddress0.setZipCode("94114");
bulkVerify.addAddressesItem(bulkAddress0);

MultipleComponents bulkAddress1 = new MultipleComponents();
Expand All @@ -1099,18 +1099,18 @@ try {
```bash
curl https://api.lob.com/v1/us_verifications \
-u <YOUR_LIVE_API_KEY>: \
-d "primary_line=210 King Street" \
-d "primary_line=2261 Market Street" \
-d "city=San Francisco" \
-d "state=CA" \
-d "zip_code=94017" \
-d "zip_code=94114" \
```

```java
UsVerificationsWritable singleVerify = new UsVerificationsWritable();
singleVerify.setPrimaryLine("210 King Street");
singleVerify.setPrimaryLine("2261 Market Street");
singleVerify.setCity("San Francisco");
singleVerify.setState("CA");
singleVerify.setZipCode("94017");
singleVerify.setZipCode("94114");

UsVerificationsApi apiInstance = new UsVerificationsApi(config);
try {
Expand Down
22 changes: 11 additions & 11 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ LobResponse<Address> response = new Address.RequestBuilder()
.setDescription("Harry - Office")
.setName("Harry Zhang")
.setCompany("Lob")
.setLine1("210 King St")
.setLine2("# 6100")
.setLine1("2261 Market Street")
.setLine2("Ste 5668")
.setCity("San Francisco")
.setState("CA")
.setZip("94107")
.setZip("94114")
.setCountry("US")
.setPhone("555-555-5555")
.setEmail("harry@lob.com")
Expand All @@ -107,11 +107,11 @@ try {
address.setCompany("Lob");
address.setEmail("harry@lob.com");
address.setPhone("5555555555");
address.setAddressLine1("210 King St");
address.setAddressLine2("# 6100");
address.setAddressLine1("2261 Market Street");
address.setAddressLine2("Ste 5668");
address.setAddressCity("San Francisco");
address.setAddressState("CA");
address.setAddressZip("94107");
address.setAddressZip("94114");
address.setAddressCountry(CountryExtended.US);

apiInstance.addressCreate(address);
Expand All @@ -132,10 +132,10 @@ LobResponse<Letter> response = new Letter.RequestBuilder()
.setTo(
new Address.RequestBuilder()
.setName("Harry Zhang")
.setLine1("210 King St Ste 6100")
.setLine1("2261 Market Street Ste 5668")
.setCity("San Francisco")
.setState("CA")
.setZip("94107")
.setZip("94114")
)
.setFrom("adr_210a8d4b0b76d77b")
.create();
Expand All @@ -149,11 +149,11 @@ The same letter can be created as follows:
try {
AddressEditable addressTo = new AddressEditable();
addressTo.setName("Harry Zhang");
addressTo.setAddressLine1("210 King St");
addressTo.setAddressLine2("# 6100");
addressTo.setAddressLine1("2261 Market Street");
addressTo.setAddressLine2("Ste 5668");
addressTo.setAddressCity("San Francisco");
addressTo.setAddressState("CA");
addressTo.setAddressZip("94107");
addressTo.setAddressZip("94114");

LetterEditable letterRaw = new LetterEditable();
letterRaw.setDescription("Demo Letter");
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ public class App
addressEditable.setDescription("Harry - Office");
addressEditable.setName("Harry Zhang");
addressEditable.setCompany("Lob");
addressEditable.setAddressLine1("210 King St");
addressEditable.setAddressLine1("2261 Market Street");
addressEditable.setAddressCity("San Francisco");
addressEditable.setAddressState("CA");
addressEditable.setAddressZip("94107");
addressEditable.setAddressZip("94114");
addressEditable.setAddressCountry(CountryExtended.US);
addressEditable.setPhone("555-555-5555");
addressEditable.setEmail("harry@lob.com");
Expand Down
12 changes: 6 additions & 6 deletions __tests__/Helper/lobster-family.csv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
recipient,primary line,city,state,zip_code
Larry Lobster,210 King St,San Francisco,CA,94107
Lloyd Lobster,210 King St,San Francisco,CA,94107
Lisa Lobster,210 King St,San Francisco,CA,94107
Linda Lobster,210 King St,San Francisco,CA,94107
Leith Lobster,210 King St,San Francisco,CA,94107
Larry Lobster,2261 Market Street,San Francisco,CA,94114
Lloyd Lobster,2261 Market Street,San Francisco,CA,94114
Lisa Lobster,2261 Market Street,San Francisco,CA,94114
Linda Lobster,2261 Market Street,San Francisco,CA,94114
Leith Lobster,2261 Market Street,San Francisco,CA,94114
Lala Lobster,Not A Real Street,San Francisco,CA,94107
Krusty Krab,212 King St,San Francisco,CA,94107
Patrick Star,211 King St,San Francisco,CA,94107
Christopher Crawdad,209 King St,San Francisco,CA,94107
Lost Lobster,210 King St,,CA,
Lost Lobster,2261 Market Street,,CA,
12 changes: 6 additions & 6 deletions __tests__/Integration/IdentityValidationApiSpecTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class IdentityValidationApiSpecTest {
public void validationTestWithCityState() throws ApiException {
MultiLineAddress cityStateMultiLineAddress = new MultiLineAddress();
cityStateMultiLineAddress.setRecipient("Lob.com");
cityStateMultiLineAddress.setPrimaryLine("210 King St");
cityStateMultiLineAddress.setPrimaryLine("2261 Market Street");
cityStateMultiLineAddress.setCity("San Francisco");
cityStateMultiLineAddress.setState("CA");
try {
Expand All @@ -38,8 +38,8 @@ public void validationTestWithCityState() throws ApiException {
public void validationTestWithZipCode() throws ApiException {
MultiLineAddress zipCodeMultiLineAddress = new MultiLineAddress();
zipCodeMultiLineAddress.setRecipient("Lob.com");
zipCodeMultiLineAddress.setPrimaryLine("210 King St");
zipCodeMultiLineAddress.setZipCode("94107");
zipCodeMultiLineAddress.setPrimaryLine("2261 Market Street");
zipCodeMultiLineAddress.setZipCode("94114");
try {
IdentityValidation response = validApi.validate(zipCodeMultiLineAddress);
}
Expand All @@ -55,7 +55,7 @@ public void validationTestWithZipCode() throws ApiException {
public void validationTestWithTestKey() throws ApiException {
MultiLineAddress cityStateMultiLineAddress = new MultiLineAddress();
cityStateMultiLineAddress.setRecipient("Lob.com");
cityStateMultiLineAddress.setPrimaryLine("210 King St");
cityStateMultiLineAddress.setPrimaryLine("2261 Market Street");
cityStateMultiLineAddress.setCity("San Francisco");
cityStateMultiLineAddress.setState("CA");

Expand All @@ -72,8 +72,8 @@ public void validationTestWithTestKey() throws ApiException {
)
public void validationTestBadParameter() throws ApiException {
MultiLineAddress invalidAddress = new MultiLineAddress();
invalidAddress.setPrimaryLine("210 King St");
invalidAddress.setZipCode("94107");
invalidAddress.setPrimaryLine("2261 Market Street");
invalidAddress.setZipCode("94114");
try {
IdentityValidation response = validApi.validate(invalidAddress);
}
Expand Down
Loading
Loading