Skip to content

Commit

Permalink
Merge pull request #227 from lob/GC-1941/update-lob-address
Browse files Browse the repository at this point in the history
GC-1941/updates Lob address
  • Loading branch information
juanfriss authored Jan 16, 2024
2 parents 5217a9d + 5eae5c6 commit 0214dc5
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 51 deletions.
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 protected]" \
-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 @@ -65,11 +65,11 @@ addressCreate = AddressEditable.new({
company: "Lob",
email: "[email protected]",
phone: "5555555555",
address_line1: "210 King St",
address_line2: "# 6100",
address_line1: "2261 Market Street",
address_line2: "Ste 5668",
address_city: "San Francisco",
address_state: "CA",
address_zip: "94107",
address_zip: "94114",
address_country: "US",
});

Expand Down Expand Up @@ -195,11 +195,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 @@ -211,11 +211,11 @@ postcardCreate = PostcardEditable.new({
back: "<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>",
to: AddressEditable.new({
name: "Harry Zhang",
address_line1: "210 King St",
address_line2: "# 6100",
address_line1: "2261 Market Street",
address_line2: "Ste 5668",
address_city: "San Francisco",
address_state: "CA",
address_zip: "94107",
address_zip: "94114",
}),
merge_variables: {
name: "Harry"
Expand Down Expand Up @@ -304,11 +304,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 @@ -320,11 +320,11 @@ selfMailerCreate = SelfMailerEditable.new({
outside: "<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>",
to: AddressEditable.new({
name: "Harry Zhang",
address_line1: "210 King St",
address_line2: "# 6100",
address_line1: "2261 Market Street",
address_line2: "Ste 5668",
address_city: "San Francisco",
address_state: "CA",
address_zip: "94107",
address_zip: "94114",
}),
merge_variables: {
name: "Harry"
Expand Down Expand Up @@ -413,11 +413,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 @@ -430,11 +430,11 @@ letterCreate = LetterEditable.new({
color: "true",
to: AddressEditable.new({
name: "Harry Zhang",
address_line1: "210 King St",
address_line2: "# 6100",
address_line1: "2261 Market Street",
address_line2: "Ste 5668",
address_city: "San Francisco",
address_state: "CA",
address_zip: "94107",
address_zip: "94114",
}),
merge_variables: {
name: "Harry"
Expand Down Expand Up @@ -529,11 +529,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 @@ -548,11 +548,11 @@ checkCreate = CheckEditable.new({
from: "adr_210a8d4b0b76d77b",
to: AddressDomestic.new({
name: "Harry Zhang",
address_line1: "210 King St",
address_line2: "# 6100",
address_line1: "2261 Market Street",
address_line2: "Ste 5668",
address_city: "San Francisco",
address_state: "CA",
address_zip: "94107",
address_zip: "94114",
}),
merge_variables: {
name: "Harry"
Expand Down Expand Up @@ -1688,10 +1688,10 @@ end
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 @@ -1703,10 +1703,10 @@ usVerificationsApi = UsVerificationsApi.new(config)


verificationData0 = MultipleComponents.new({
primary_line: "210 King Street",
primary_line: "2261 Market Street",
city: "San Francisco",
state: "CA",
zip_code: "94017",
zip_code: "94114",
})

verificationData1 = MultipleComponents.new({
Expand Down Expand Up @@ -1735,20 +1735,20 @@ end
```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" \
```

```ruby
usVerificationsApi = UsVerificationsApi.new(config)

verificationData = UsVerificationsWritable.new({
primary_line: "210 King Street",
primary_line: "2261 Market Street",
city: "San Francisco",
state: "CA",
zip_code: "94017",
zip_code: "94114",
})

begin
Expand Down
6 changes: 3 additions & 3 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ Here is a sample of the legacy lob-ruby CREATE function:
company: 'Lob',
email: '[email protected]',
phone: '5555555555',
address_line1: '210 King St',
address_line2: '# 6100',
address_line1: '2261 Market Street',
address_line2: 'Ste 5668',
address_city: 'San Francisco',
address_state: 'CA',
address_country: 'US',
address_zip: '94107'
address_zip: '94114'
)
```

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ addressEditable = Lob::AddressEditable.new({
company: "Lob",
email: "[email protected]",
phone: "5555555555",
address_line1: "210 King St",
address_line2: "# 6100",
address_line1: "2261 Market Street",
address_line2: "Ste 5668",
address_city: "San Francisco",
address_state: "CA",
address_zip: "94107",
address_zip: "94114",
address_country: "US",
});

Expand Down
8 changes: 4 additions & 4 deletions __tests__/Integration/UsVerification.spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
@usVerificationApi = UsVerificationsApi.new(api)

@validAddress = UsVerificationsWritable.new({
primary_line: "210 KING ST",
primary_line: "2261 MARKET ST",
city: "SAN FRANCISCO",
state: "CA",
zip_code: "94107"
zip_code: "94114"
})
@invalidAddress = UsVerificationsWritable.new({
primary_line: "1 CEMETERY ST",
Expand All @@ -29,10 +29,10 @@
zip_code: "07000"
})
mc1 = MultipleComponents.new({
primary_line: "210 KING ST",
primary_line: "2261 MARKET Street",
city: "SAN FRANCISCO",
state: "CA",
zip_code: "94107"
zip_code: "94114"
})
mc2 = MultipleComponents.new({
primary_line: "001 CEMETERY LN",
Expand Down
2 changes: 1 addition & 1 deletion docs/UsVerificationsWritable.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **address** | **String** | The entire address in one string (e.g., \&quot;210 King Street 94107\&quot;). _Does not support a recipient and will error when other payload parameters are provided._ | [optional] |
| **address** | **String** | The entire address in one string (e.g., \&quot;2261 Market Street 94114\&quot;). _Does not support a recipient and will error when other payload parameters are provided._ | [optional] |
| **recipient** | **String** | The intended recipient, typically a person&#39;s or firm&#39;s name. | [optional] |
| **primary_line** | **String** | The primary delivery line (usually the street address) of the address. Combination of the following applicable &#x60;components&#x60;: * &#x60;primary_number&#x60; * &#x60;street_predirection&#x60; * &#x60;street_name&#x60; * &#x60;street_suffix&#x60; * &#x60;street_postdirection&#x60; * &#x60;secondary_designator&#x60; * &#x60;secondary_number&#x60; * &#x60;pmb_designator&#x60; * &#x60;pmb_number&#x60; | [optional] |
| **secondary_line** | **String** | The secondary delivery line of the address. This field is typically empty but may contain information if &#x60;primary_line&#x60; is too long. | [optional] |
Expand Down
2 changes: 1 addition & 1 deletion lib/openapi_client/models/us_verifications_writable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

module Lob
class UsVerificationsWritable
# The entire address in one string (e.g., \"210 King Street 94107\"). _Does not support a recipient and will error when other payload parameters are provided._
# The entire address in one string (e.g., \"2261 Market Street 94114\"). _Does not support a recipient and will error when other payload parameters are provided._
attr_accessor :address

# The intended recipient, typically a person's or firm's name.
Expand Down
2 changes: 1 addition & 1 deletion lib/openapi_client/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
=end

module Lob
VERSION = '6.0.5'
VERSION = '6.0.6'
end

0 comments on commit 0214dc5

Please sign in to comment.