Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GC-1944/Change Lob Address
Browse files Browse the repository at this point in the history
haroutrs committed Jan 26, 2024
1 parent 9f18830 commit 558306b
Showing 9 changed files with 176 additions and 161 deletions.
291 changes: 153 additions & 138 deletions CODE_SNIPPETS.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions config.php
Original file line number Diff line number Diff line change
@@ -19,11 +19,11 @@
$to = new OpenAPI\Client\Model\AddressEditable(
array(
"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",
)
);

Binary file added docs/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/Model/SingleLineAddress.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address** | **string** | 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._ | [optional]
**address** | **string** | 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._ | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Model/UsVerificationsWritable.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address** | **string** | 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._ | [optional]
**address** | **string** | 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._ | [optional]
**recipient** | **string** | The intended recipient, typically a person's or firm's name. | [optional]
**primary_line** | **string** | The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number` | [optional]
**secondary_line** | **string** | The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. | [optional]
2 changes: 1 addition & 1 deletion lib/Model/UsVerificationsWritable.php
Original file line number Diff line number Diff line change
@@ -310,7 +310,7 @@ public function getAddress()
/**
* Sets address
*
* @param string|null $address 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._
* @param string|null $address 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._
*
* @return self
*/
10 changes: 5 additions & 5 deletions test/Integration/IdentityValidationApiSpecTest.php
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ public static function setUpBeforeClass(): void

self::$cityStateMultiLineAddress = new MultiLineAddress();
self::$cityStateMultiLineAddress->setRecipient("Lob.com");
self::$cityStateMultiLineAddress->setPrimaryLine("210 King St");
self::$cityStateMultiLineAddress->setPrimaryLine("2261 Market Street");
self::$cityStateMultiLineAddress->setCity("San Francisco");
self::$cityStateMultiLineAddress->setState("CA");
}
@@ -104,8 +104,8 @@ public function testIdentityValidationWithZipCode()
{
$zipCodeMultiLineAddress = new MultiLineAddress();
$zipCodeMultiLineAddress->setRecipient("Lob.com");
$zipCodeMultiLineAddress->setPrimaryLine("210 King St");
$zipCodeMultiLineAddress->setZipCode("94107");
$zipCodeMultiLineAddress->setPrimaryLine("2261 Market Street");
$zipCodeMultiLineAddress->setZipCode("94114");

try {
$identityValidationObject = self::$identityValidationApi->validate($zipCodeMultiLineAddress);
@@ -142,8 +142,8 @@ public function testIdentityValidationBadParameter()
try {
// error validation object
$invalidAddress = new MultiLineAddress();
$invalidAddress->setPrimaryLine("210 King St");
$invalidAddress->setZipCode("94107");
$invalidAddress->setPrimaryLine("2261 Market Street");
$invalidAddress->setZipCode("94114");

$this->expectException(\Exception::class);
$this->expectExceptionMessageMatches("/recipient is required/");
12 changes: 6 additions & 6 deletions test/Integration/UsVerificationsApiSpecTest.php
Original file line number Diff line number Diff line change
@@ -70,10 +70,10 @@ public static function setUpBeforeClass(): void
self::$invalidUsvApi = new UsVerificationsApi($wrongConfig);

self::$validAddress1 = new UsVerificationsWritable();
self::$validAddress1->setPrimaryLine("210 KING ST");
self::$validAddress1->setPrimaryLine("2261 Market Street");
self::$validAddress1->setCity("SAN FRANCISCO");
self::$validAddress1->setState("CA");
self::$validAddress1->setZipCode("94107");
self::$validAddress1->setZipCode("94114");

self::$validAddress2 = new UsVerificationsWritable();
self::$validAddress2->setPrimaryLine("001 CEMETERY LN");
@@ -83,10 +83,10 @@ public static function setUpBeforeClass(): void
self::$validAddress2->setZipCode("07000");

$mc1 = new MultipleComponents();
$mc1->setPrimaryLine("210 KING ST");
$mc1->setPrimaryLine("2261 Market Street");
$mc1->setCity("SAN FRANCISCO");
$mc1->setState("CA");
$mc1->setZipCode("94107");
$mc1->setZipCode("94114");

$mc2 = new MultipleComponents();
$mc2->setPrimaryLine("001 CEMETERY LN");
@@ -183,10 +183,10 @@ public function testBulkUsVerificationError()
{
try {
$mc1 = new MultipleComponents();
$mc1->setPrimaryLine("210 KING ST");
$mc1->setPrimaryLine("2261 Market Street");
$mc1->setCity("SAN FRANCISCO");
$mc1->setState("CA");
$mc1->setZipCode("94107");
$mc1->setZipCode("94114");

// second entry has no primary line, should error
$mc2 = new MultipleComponents();
12 changes: 6 additions & 6 deletions test/assets/lobster-family.csv
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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,

0 comments on commit 558306b

Please sign in to comment.