Skip to content

Commit

Permalink
[Enhancement] update type off street_number to string (#520)
Browse files Browse the repository at this point in the history
* change type off street_number to string

* update tests
  • Loading branch information
danielen-meli authored Jun 20, 2024
1 parent a12581b commit 697ba26
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/MercadoPago/Resources/Common/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Address
public ?string $street_name;

/** Street number. */
public ?int $street_number;
public ?string $street_number;

/** City. */
public array|object|null $city;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function testCreateSuccess(): void
$this->assertSame("1322811505", $customer->address->id);
$this->assertSame("02675031", $customer->address->zip_code);
$this->assertSame("Av. das Nações Unidas", $customer->address->street_name);
$this->assertSame(3000, $customer->address->street_number);
$this->assertSame("3000", $customer->address->street_number);
}

public function testCreateByEmailSuccess(): void
Expand Down Expand Up @@ -105,7 +105,7 @@ public function testGetSuccess(): void
$this->assertSame("1322811505", $customer->address->id);
$this->assertSame("02675031", $customer->address->zip_code);
$this->assertSame("Av. das Nações Unidas", $customer->address->street_name);
$this->assertSame(3000, $customer->address->street_number);
$this->assertSame("3000", $customer->address->street_number);
}

public function testUpdateSuccess(): void
Expand Down Expand Up @@ -142,7 +142,7 @@ public function testUpdateSuccess(): void
$this->assertSame("1322811505", $customer->address->id);
$this->assertSame("02675031", $customer->address->zip_code);
$this->assertSame("Av. das Nações Unidas", $customer->address->street_name);
$this->assertSame(3000, $customer->address->street_number);
$this->assertSame("3000", $customer->address->street_number);
}

public function testSearchSuccess(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"id": "1322811505",
"zip_code": "02675031",
"street_name": "Av. das Nações Unidas",
"street_number": 3000
"street_number": "3000"
},
"date_registered": null,
"description": "Customer description",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"id": "1322811505",
"zip_code": "02675031",
"street_name": "Av. das Nações Unidas",
"street_number": 3000
"street_number": "3000"
},
"date_registered": null,
"description": "Customer description",
Expand Down Expand Up @@ -130,7 +130,7 @@
"id": "1322811505",
"zip_code": "02675031",
"street_name": "Av. das Nações Unidas",
"street_number": 3000
"street_number": "3000"
},
"date_registered": null,
"description": "Customer description",
Expand Down

0 comments on commit 697ba26

Please sign in to comment.