Skip to content
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 .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 238
openapi_spec_hash: 355ca6c73f05d0ce3888debdc2e1a7d8
openapi_spec_hash: fa67b808ca579e929aea7dd917b18cf9
config_hash: 2ae0d8aaecf01b38cbf9f9e112822c23
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*
* @phpstan-type AddressShape = array{
* city: string,
* country: string,
* line1: string,
* country?: string|null,
* line2?: string|null,
* state?: string|null,
* zip?: string|null,
Expand All @@ -33,16 +33,16 @@ final class Address implements BaseModel
public string $city;

/**
* The two-letter ISO 3166-1 alpha-2 code for the country of the address.
* The first line of the address. This is usually the street number and street.
*/
#[Required]
public string $country;
public string $line1;

/**
* The first line of the address. This is usually the street number and street.
* The two-letter ISO 3166-1 alpha-2 code for the country of the address. Defaults to `US`.
*/
#[Required]
public string $line1;
#[Optional]
public ?string $country;

/**
* The second line of the address. This might be the floor or room number.
Expand All @@ -67,13 +67,13 @@ final class Address implements BaseModel
*
* To enforce required parameters use
* ```
* Address::with(city: ..., country: ..., line1: ...)
* Address::with(city: ..., line1: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new Address)->withCity(...)->withCountry(...)->withLine1(...)
* (new Address)->withCity(...)->withLine1(...)
* ```
*/
public function __construct()
Expand All @@ -88,18 +88,18 @@ public function __construct()
*/
public static function with(
string $city,
string $country,
string $line1,
?string $country = null,
?string $line2 = null,
?string $state = null,
?string $zip = null,
): self {
$self = new self;

$self['city'] = $city;
$self['country'] = $country;
$self['line1'] = $line1;

null !== $country && $self['country'] = $country;
null !== $line2 && $self['line2'] = $line2;
null !== $state && $self['state'] = $state;
null !== $zip && $self['zip'] = $zip;
Expand All @@ -119,23 +119,23 @@ public function withCity(string $city): self
}

/**
* The two-letter ISO 3166-1 alpha-2 code for the country of the address.
* The first line of the address. This is usually the street number and street.
*/
public function withCountry(string $country): self
public function withLine1(string $line1): self
{
$self = clone $this;
$self['country'] = $country;
$self['line1'] = $line1;

return $self;
}

/**
* The first line of the address. This is usually the street number and street.
* The two-letter ISO 3166-1 alpha-2 code for the country of the address. Defaults to `US`.
*/
public function withLine1(string $line1): self
public function withCountry(string $country): self
{
$self = clone $this;
$self['line1'] = $line1;
$self['country'] = $country;

return $self;
}
Expand Down
32 changes: 16 additions & 16 deletions src/BeneficialOwners/BeneficialOwnerUpdateParams/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*
* @phpstan-type AddressShape = array{
* city: string,
* country: string,
* line1: string,
* country?: string|null,
* line2?: string|null,
* state?: string|null,
* zip?: string|null,
Expand All @@ -33,16 +33,16 @@ final class Address implements BaseModel
public string $city;

/**
* The two-letter ISO 3166-1 alpha-2 code for the country of the address.
* The first line of the address. This is usually the street number and street.
*/
#[Required]
public string $country;
public string $line1;

/**
* The first line of the address. This is usually the street number and street.
* The two-letter ISO 3166-1 alpha-2 code for the country of the address. Defaults to `US`.
*/
#[Required]
public string $line1;
#[Optional]
public ?string $country;

/**
* The second line of the address. This might be the floor or room number.
Expand All @@ -67,13 +67,13 @@ final class Address implements BaseModel
*
* To enforce required parameters use
* ```
* Address::with(city: ..., country: ..., line1: ...)
* Address::with(city: ..., line1: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new Address)->withCity(...)->withCountry(...)->withLine1(...)
* (new Address)->withCity(...)->withLine1(...)
* ```
*/
public function __construct()
Expand All @@ -88,18 +88,18 @@ public function __construct()
*/
public static function with(
string $city,
string $country,
string $line1,
?string $country = null,
?string $line2 = null,
?string $state = null,
?string $zip = null,
): self {
$self = new self;

$self['city'] = $city;
$self['country'] = $country;
$self['line1'] = $line1;

null !== $country && $self['country'] = $country;
null !== $line2 && $self['line2'] = $line2;
null !== $state && $self['state'] = $state;
null !== $zip && $self['zip'] = $zip;
Expand All @@ -119,23 +119,23 @@ public function withCity(string $city): self
}

/**
* The two-letter ISO 3166-1 alpha-2 code for the country of the address.
* The first line of the address. This is usually the street number and street.
*/
public function withCountry(string $country): self
public function withLine1(string $line1): self
{
$self = clone $this;
$self['country'] = $country;
$self['line1'] = $line1;

return $self;
}

/**
* The first line of the address. This is usually the street number and street.
* The two-letter ISO 3166-1 alpha-2 code for the country of the address. Defaults to `US`.
*/
public function withLine1(string $line1): self
public function withCountry(string $country): self
{
$self = clone $this;
$self['line1'] = $line1;
$self['country'] = $country;

return $self;
}
Expand Down
32 changes: 16 additions & 16 deletions src/Entities/EntityCreateParams/Corporation/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*
* @phpstan-type AddressShape = array{
* city: string,
* country: string,
* line1: string,
* country?: string|null,
* line2?: string|null,
* state?: string|null,
* zip?: string|null,
Expand All @@ -33,16 +33,16 @@ final class Address implements BaseModel
public string $city;

/**
* The two-letter ISO 3166-1 alpha-2 code for the country of the address.
* The first line of the address. This is usually the street number and street.
*/
#[Required]
public string $country;
public string $line1;

/**
* The first line of the address. This is usually the street number and street.
* The two-letter ISO 3166-1 alpha-2 code for the country of the address. Defaults to `US`.
*/
#[Required]
public string $line1;
#[Optional]
public ?string $country;

/**
* The second line of the address. This might be the floor or room number.
Expand All @@ -67,13 +67,13 @@ final class Address implements BaseModel
*
* To enforce required parameters use
* ```
* Address::with(city: ..., country: ..., line1: ...)
* Address::with(city: ..., line1: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new Address)->withCity(...)->withCountry(...)->withLine1(...)
* (new Address)->withCity(...)->withLine1(...)
* ```
*/
public function __construct()
Expand All @@ -88,18 +88,18 @@ public function __construct()
*/
public static function with(
string $city,
string $country,
string $line1,
?string $country = null,
?string $line2 = null,
?string $state = null,
?string $zip = null,
): self {
$self = new self;

$self['city'] = $city;
$self['country'] = $country;
$self['line1'] = $line1;

null !== $country && $self['country'] = $country;
null !== $line2 && $self['line2'] = $line2;
null !== $state && $self['state'] = $state;
null !== $zip && $self['zip'] = $zip;
Expand All @@ -119,23 +119,23 @@ public function withCity(string $city): self
}

/**
* The two-letter ISO 3166-1 alpha-2 code for the country of the address.
* The first line of the address. This is usually the street number and street.
*/
public function withCountry(string $country): self
public function withLine1(string $line1): self
{
$self = clone $this;
$self['country'] = $country;
$self['line1'] = $line1;

return $self;
}

/**
* The first line of the address. This is usually the street number and street.
* The two-letter ISO 3166-1 alpha-2 code for the country of the address. Defaults to `US`.
*/
public function withLine1(string $line1): self
public function withCountry(string $country): self
{
$self = clone $this;
$self['line1'] = $line1;
$self['country'] = $country;

return $self;
}
Expand Down
Loading