countryCode = $countryCode; } /** * Returns Address Line 1. * The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for * data entry, and Compliance and Risk checks. This field needs to pass the full address. */ public function getAddressLine1(): ?string { return $this->addressLine1; } /** * Sets Address Line 1. * The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for * data entry, and Compliance and Risk checks. This field needs to pass the full address. * * @maps address_line_1 */ public function setAddressLine1(?string $addressLine1): void { $this->addressLine1 = $addressLine1; } /** * Returns Address Line 2. * The second line of the address, for example, a suite or apartment number. */ public function getAddressLine2(): ?string { return $this->addressLine2; } /** * Sets Address Line 2. * The second line of the address, for example, a suite or apartment number. * * @maps address_line_2 */ public function setAddressLine2(?string $addressLine2): void { $this->addressLine2 = $addressLine2; } /** * Returns Admin Area 2. * A city, town, or village. Smaller than `admin_area_level_1`. */ public function getAdminArea2(): ?string { return $this->adminArea2; } /** * Sets Admin Area 2. * A city, town, or village. Smaller than `admin_area_level_1`. * * @maps admin_area_2 */ public function setAdminArea2(?string $adminArea2): void { $this->adminArea2 = $adminArea2; } /** * Returns Admin Area 1. * The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2 * subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`. * Value, by country, is:
Note: The country code for Great Britain is*/ public function getCountryCode(): string { return $this->countryCode; } /** * Sets Country Code. * The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or * region.GBand * notUKas used in the top-level domain names for that country. Use the `C2` country * code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border * transactions.
Note: The country code for Great Britain is* * @required * @maps country_code */ public function setCountryCode(string $countryCode): void { $this->countryCode = $countryCode; } /** * Encode this object to JSON * * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields * are set. (default: false) * * @return array|stdClass */ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1) public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->addressLine1)) { $json['address_line_1'] = $this->addressLine1; } if (isset($this->addressLine2)) { $json['address_line_2'] = $this->addressLine2; } if (isset($this->adminArea2)) { $json['admin_area_2'] = $this->adminArea2; } if (isset($this->adminArea1)) { $json['admin_area_1'] = $this->adminArea1; } if (isset($this->postalCode)) { $json['postal_code'] = $this->postalCode; } $json['country_code'] = $this->countryCode; return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } }GBand * notUKas used in the top-level domain names for that country. Use the `C2` country * code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border * transactions.