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

[Enhancement] update type off street_number to string #520

Merged
merged 3 commits into from
Jun 20, 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
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
Loading