The Simpay\Model\Response\PaymentTransactionAddress
class represents an object that contains information about a payment transaction address.
Name | Type | Description |
---|---|---|
$name |
string|null | The name associated with the address |
$surname |
string|null | The surname associated with the address |
$street |
string|null | The street name associated with the address |
$building |
string|null | The building number associated with the address |
$flat |
string|null | The flat or apartment number associated with the address |
$city |
string|null | The city associated with the address |
$region |
string|null | The region or state associated with the address |
$postalCode |
string|null | The postal code associated with the address |
$country |
string|null | The country associated with the address |
$company |
string|null | The company name associated with the address |
private function __construct(
?string $name,
?string $surname,
?string $street,
?string $building,
?string $flat,
?string $city,
?string $region,
?string $postalCode,
?string $country,
?string $company
)
This method is the private constructor of the Simpay\Model\Response\PaymentTransactionAddress
class. It takes in ten parameters, each of which corresponds to one of the address properties. It sets the properties to their respective parameter values.
public static function createFromResponse(array $data): self
This method is a static factory method that creates an instance of the Simpay\Model\Response\PaymentTransactionAddress
class from an array of data. It takes in one parameter: $data
, which is an array that contains the values for the address properties. It returns a new instance of the Simpay\Model\Response\PaymentTransactionAddress
class with the properties set to the corresponding values in $data
.
$responseData = [
'name' => 'John',
'surname' => 'Doe',
'street' => 'Main Street',
'building' => '123',
'flat' => '4',