-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow arbitrary values in advanced_options. Fix properties that were incorrectly marked as required.
- Loading branch information
1 parent
ef486d5
commit e4146a5
Showing
13 changed files
with
1,628 additions
and
1,088 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,61 +36,34 @@ public partial class Address | |
[JsonPropertyName("address_line1"), JsonPropertyOrder(1)] | ||
public required string AddressLine1 { get; set; } | ||
|
||
/// <summary> | ||
/// Indicates whether this is a residential address. | ||
/// </summary> | ||
/// <value>Indicates whether this is a residential address.</value> | ||
[JsonPropertyName("address_residential_indicator"), JsonPropertyOrder(2)] | ||
public required AddressResidentialIndicator AddressResidentialIndicator { get; set; } | ||
|
||
/// <summary> | ||
/// The name of the city or locality | ||
/// </summary> | ||
/// <value>The name of the city or locality</value> | ||
/// <example> | ||
/// Winnipeg | ||
/// </example> | ||
[JsonPropertyName("city_locality"), JsonPropertyOrder(3)] | ||
[JsonPropertyName("city_locality"), JsonPropertyOrder(2)] | ||
public required string CityLocality { get; set; } | ||
|
||
/// <summary> | ||
/// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | ||
/// </summary> | ||
/// <value>The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) </value> | ||
/// <example> | ||
/// CA | ||
/// </example> | ||
[JsonPropertyName("country_code"), JsonPropertyOrder(4)] | ||
public required string CountryCode { get; set; } | ||
|
||
/// <summary> | ||
/// The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. | ||
/// </summary> | ||
/// <value>The name of a contact person at this address. This field may be set instead of - or in addition to - the `company_name` field. </value> | ||
/// <example> | ||
/// John Doe | ||
/// </example> | ||
[JsonPropertyName("name"), JsonPropertyOrder(5)] | ||
[JsonPropertyName("name"), JsonPropertyOrder(3)] | ||
public required string Name { get; set; } | ||
|
||
/// <summary> | ||
/// The phone number of a contact person at this address. The format of this phone number varies depending on the country. | ||
/// </summary> | ||
/// <value>The phone number of a contact person at this address. The format of this phone number varies depending on the country. </value> | ||
/// <example> | ||
/// +1 204-253-9411 ext. 123 | ||
/// </example> | ||
[JsonPropertyName("phone"), JsonPropertyOrder(6)] | ||
public required string Phone { get; set; } | ||
|
||
/// <summary> | ||
/// postal code | ||
/// </summary> | ||
/// <value>postal code</value> | ||
/// <example> | ||
/// 78756-3717 | ||
/// </example> | ||
[JsonPropertyName("postal_code"), JsonPropertyOrder(7)] | ||
[JsonPropertyName("postal_code"), JsonPropertyOrder(4)] | ||
public required string PostalCode { get; set; } | ||
|
||
/// <summary> | ||
|
@@ -100,7 +73,7 @@ public partial class Address | |
/// <example> | ||
/// Manitoba | ||
/// </example> | ||
[JsonPropertyName("state_province"), JsonPropertyOrder(8)] | ||
[JsonPropertyName("state_province"), JsonPropertyOrder(5)] | ||
public required string StateProvince { get; set; } | ||
|
||
/// <summary> | ||
|
@@ -110,7 +83,7 @@ public partial class Address | |
/// <example> | ||
/// Unit 408 | ||
/// </example> | ||
[JsonPropertyName("address_line2"), JsonPropertyOrder(9)] | ||
[JsonPropertyName("address_line2"), JsonPropertyOrder(6)] | ||
public string? AddressLine2 { get; set; } | ||
|
||
/// <summary> | ||
|
@@ -120,29 +93,56 @@ public partial class Address | |
/// <example> | ||
/// Building #7 | ||
/// </example> | ||
[JsonPropertyName("address_line3"), JsonPropertyOrder(10)] | ||
[JsonPropertyName("address_line3"), JsonPropertyOrder(7)] | ||
public string? AddressLine3 { get; set; } | ||
|
||
/// <summary> | ||
/// Indicates whether this is a residential address. | ||
/// </summary> | ||
/// <value>Indicates whether this is a residential address.</value> | ||
[JsonPropertyName("address_residential_indicator"), JsonPropertyOrder(8)] | ||
public AddressResidentialIndicator? AddressResidentialIndicator { get; set; } | ||
|
||
/// <summary> | ||
/// If this is a business address, then the company name should be specified here. | ||
/// </summary> | ||
/// <value>If this is a business address, then the company name should be specified here. </value> | ||
/// <example> | ||
/// The Home Depot | ||
/// </example> | ||
[JsonPropertyName("company_name"), JsonPropertyOrder(11)] | ||
[JsonPropertyName("company_name"), JsonPropertyOrder(9)] | ||
public string? CompanyName { get; set; } | ||
|
||
/// <summary> | ||
/// The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) | ||
/// </summary> | ||
/// <value>The two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) </value> | ||
/// <example> | ||
/// CA | ||
/// </example> | ||
[JsonPropertyName("country_code"), JsonPropertyOrder(10)] | ||
public string? CountryCode { get; set; } | ||
|
||
/// <summary> | ||
/// Email for the address owner. | ||
/// </summary> | ||
/// <value>Email for the address owner. </value> | ||
/// <example> | ||
/// [email protected] | ||
/// </example> | ||
[JsonPropertyName("email"), JsonPropertyOrder(12)] | ||
[JsonPropertyName("email"), JsonPropertyOrder(11)] | ||
public string? Email { get; set; } | ||
|
||
/// <summary> | ||
/// The phone number of a contact person at this address. The format of this phone number varies depending on the country. | ||
/// </summary> | ||
/// <value>The phone number of a contact person at this address. The format of this phone number varies depending on the country. </value> | ||
/// <example> | ||
/// +1 204-253-9411 ext. 123 | ||
/// </example> | ||
[JsonPropertyName("phone"), JsonPropertyOrder(12)] | ||
public string? Phone { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
|
@@ -154,17 +154,17 @@ public override string ToString() | |
sb.Append("class Address {\n"); | ||
#pragma warning disable CS0612 // Type or member is obsolete | ||
sb.Append(" AddressLine1: ").Append(AddressLine1).Append("\n"); | ||
sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); | ||
sb.Append(" CityLocality: ").Append(CityLocality).Append("\n"); | ||
sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); | ||
sb.Append(" Name: ").Append(Name).Append("\n"); | ||
sb.Append(" Phone: ").Append(Phone).Append("\n"); | ||
sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); | ||
sb.Append(" StateProvince: ").Append(StateProvince).Append("\n"); | ||
sb.Append(" AddressLine2: ").Append(AddressLine2).Append("\n"); | ||
sb.Append(" AddressLine3: ").Append(AddressLine3).Append("\n"); | ||
sb.Append(" AddressResidentialIndicator: ").Append(AddressResidentialIndicator).Append("\n"); | ||
sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); | ||
sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); | ||
sb.Append(" Email: ").Append(Email).Append("\n"); | ||
sb.Append(" Phone: ").Append(Phone).Append("\n"); | ||
#pragma warning restore CS0612 // Type or member is obsolete | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.