Skip to content
Closed
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: fa67b808ca579e929aea7dd917b18cf9
openapi_spec_hash: 7f33ff43b4b498d0954b28032669a1a6
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 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.
*/
#[Required]
public string $line1;
public string $country;

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

/**
* 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: ..., line1: ...)
* Address::with(city: ..., country: ..., line1: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new Address)->withCity(...)->withLine1(...)
* (new Address)->withCity(...)->withCountry(...)->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 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.
*/
public function withLine1(string $line1): self
public function withCountry(string $country): self
{
$self = clone $this;
$self['line1'] = $line1;
$self['country'] = $country;

return $self;
}

/**
* The two-letter ISO 3166-1 alpha-2 code for the country of the address. Defaults to `US`.
* 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;
}
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 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.
*/
#[Required]
public string $line1;
public string $country;

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

/**
* 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: ..., line1: ...)
* Address::with(city: ..., country: ..., line1: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new Address)->withCity(...)->withLine1(...)
* (new Address)->withCity(...)->withCountry(...)->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 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.
*/
public function withLine1(string $line1): self
public function withCountry(string $country): self
{
$self = clone $this;
$self['line1'] = $line1;
$self['country'] = $country;

return $self;
}

/**
* The two-letter ISO 3166-1 alpha-2 code for the country of the address. Defaults to `US`.
* 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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public function __construct(
'Accept' => 'application/json',
'User-Agent' => sprintf('increase/PHP %s', VERSION),
'X-Stainless-Lang' => 'php',
'X-Stainless-Package-Version' => '0.139.0',
'X-Stainless-Package-Version' => '0.140.0',
'X-Stainless-Arch' => Util::machtype(),
'X-Stainless-OS' => Util::ostype(),
'X-Stainless-Runtime' => php_sapi_name(),
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 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.
*/
#[Required]
public string $line1;
public string $country;

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

/**
* 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: ..., line1: ...)
* Address::with(city: ..., country: ..., line1: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new Address)->withCity(...)->withLine1(...)
* (new Address)->withCity(...)->withCountry(...)->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 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.
*/
public function withLine1(string $line1): self
public function withCountry(string $country): self
{
$self = clone $this;
$self['line1'] = $line1;
$self['country'] = $country;

return $self;
}

/**
* The two-letter ISO 3166-1 alpha-2 code for the country of the address. Defaults to `US`.
* 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;
}
Expand Down
Loading