Skip to content

Commit

Permalink
support residential field nullable (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcarrero authored Dec 13, 2023
1 parent 17ab363 commit c7f86c0
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 22 deletions.
10 changes: 5 additions & 5 deletions Conekta.net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Conekta.net", "src\Conekta.net\Conekta.net.csproj", "{641272A4-9076-40C8-AB19-15C8F278A161}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Conekta.net", "src\Conekta.net\Conekta.net.csproj", "{0C14BE4D-EA70-46AD-B1DF-D7BC4444785C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Conekta.net.Test", "src\Conekta.net.Test\Conekta.net.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Expand All @@ -12,10 +12,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{641272A4-9076-40C8-AB19-15C8F278A161}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{641272A4-9076-40C8-AB19-15C8F278A161}.Debug|Any CPU.Build.0 = Debug|Any CPU
{641272A4-9076-40C8-AB19-15C8F278A161}.Release|Any CPU.ActiveCfg = Release|Any CPU
{641272A4-9076-40C8-AB19-15C8F278A161}.Release|Any CPU.Build.0 = Release|Any CPU
{0C14BE4D-EA70-46AD-B1DF-D7BC4444785C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C14BE4D-EA70-46AD-B1DF-D7BC4444785C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C14BE4D-EA70-46AD-B1DF-D7BC4444785C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C14BE4D-EA70-46AD-B1DF-D7BC4444785C}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ publish:
clean:
dotnet clean
csharp:
mkdir -p conekta-.net && \
rm -rf /docs && \
rm -rf src/Conekta.net/Model && \
npx @openapitools/openapi-generator-cli generate \
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.6
6.0.7
2 changes: 2 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14967,6 +14967,7 @@ components:
example: MX
type: string
residential:
default: false
example: true
type: boolean
external_number:
Expand Down Expand Up @@ -16459,6 +16460,7 @@ components:
type: string
residential:
example: true
nullable: true
type: boolean
type: object
update_order_tax_response_allOf:
Expand Down
2 changes: 1 addition & 1 deletion config-netcore.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
"packageCopyright" : "Conekta",
"PackageReleaseNotes" : "",
"releaseNote" : "support for resend event, api keys and webhook keys",
"packageVersion" : "6.0.6"
"packageVersion" : "6.0.7"
}
2 changes: 1 addition & 1 deletion docs/CustomerAddress.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**City** | **string** | |
**State** | **string** | | [optional]
**Country** | **string** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | [optional]
**Residential** | **bool** | | [optional]
**Residential** | **bool** | | [optional] [default to false]
**ExternalNumber** | **string** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/CustomerFiscalEntitiesRequestAddress.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**City** | **string** | |
**State** | **string** | | [optional]
**Country** | **string** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | [optional]
**Residential** | **bool** | | [optional]
**Residential** | **bool** | | [optional] [default to false]
**ExternalNumber** | **string** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/CustomerShippingContactsResponseAddress.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**City** | **string** | | [optional]
**State** | **string** | | [optional]
**Country** | **string** | | [optional]
**Residential** | **bool** | | [optional]
**Residential** | **bool?** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

1 change: 1 addition & 0 deletions src/Conekta.net.Test/Api/OrdersApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -519,5 +519,6 @@ public void CreateOrder3ds()
Assert.Equal(orderRequest.ReturnUrl, response.NextAction.RedirectToUrl.ReturnUrl);
Assert.NotNull(response.NextAction.RedirectToUrl.Url);
Assert.Equal("redirect_to_url", response.NextAction.Type);
Assert.Null(response.ShippingContact.Address.Residential);
}
}
4 changes: 2 additions & 2 deletions src/Conekta.net/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Configuration : IReadableConfiguration
/// Version of the package.
/// </summary>
/// <value>Version of the package.</value>
public const string Version = "6.0.6";
public const string Version = "6.0.7";

/// <summary>
/// Identifier for ISO 8601 DateTime Format
Expand Down Expand Up @@ -536,7 +536,7 @@ public static string ToDebugReport()
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
report += " Version of the API: 2.1.0\n";
report += " SDK Package Version: 6.0.6\n";
report += " SDK Package Version: 6.0.7\n";

return report;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Conekta.net/Conekta.net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Description>This is a .net library that allows interaction with https://api.conekta.io API.</Description>
<Copyright>Conekta</Copyright>
<RootNamespace>Conekta.net</RootNamespace>
<Version>6.0.6</Version>
<Version>6.0.7</Version>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Conekta.net.xml</DocumentationFile>
<RepositoryUrl>https://github.com/conekta/conekta-.net.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
4 changes: 2 additions & 2 deletions src/Conekta.net/Model/CustomerAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ protected CustomerAddress() { }
/// <param name="city">city (required).</param>
/// <param name="state">state.</param>
/// <param name="country">this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).</param>
/// <param name="residential">residential.</param>
/// <param name="residential">residential (default to false).</param>
/// <param name="externalNumber">externalNumber.</param>
public CustomerAddress(string street1 = default(string), string street2 = default(string), string postalCode = default(string), string city = default(string), string state = default(string), string country = default(string), bool residential = default(bool), string externalNumber = default(string))
public CustomerAddress(string street1 = default(string), string street2 = default(string), string postalCode = default(string), string city = default(string), string state = default(string), string country = default(string), bool residential = false, string externalNumber = default(string))
{
// to ensure "street1" is required (not null)
if (street1 == null)
Expand Down
4 changes: 2 additions & 2 deletions src/Conekta.net/Model/CustomerFiscalEntitiesRequestAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ protected CustomerFiscalEntitiesRequestAddress() { }
/// <param name="city">city (required).</param>
/// <param name="state">state.</param>
/// <param name="country">this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).</param>
/// <param name="residential">residential.</param>
/// <param name="residential">residential (default to false).</param>
/// <param name="externalNumber">externalNumber.</param>
public CustomerFiscalEntitiesRequestAddress(string street1 = default(string), string street2 = default(string), string postalCode = default(string), string city = default(string), string state = default(string), string country = default(string), bool residential = default(bool), string externalNumber = default(string))
public CustomerFiscalEntitiesRequestAddress(string street1 = default(string), string street2 = default(string), string postalCode = default(string), string city = default(string), string state = default(string), string country = default(string), bool residential = false, string externalNumber = default(string))
{
// to ensure "street1" is required (not null)
if (street1 == null)
Expand Down
12 changes: 8 additions & 4 deletions src/Conekta.net/Model/CustomerShippingContactsResponseAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public partial class CustomerShippingContactsResponseAddress : IEquatable<Custom
/// <param name="state">state.</param>
/// <param name="country">country.</param>
/// <param name="residential">residential.</param>
public CustomerShippingContactsResponseAddress(string varObject = default(string), string street1 = default(string), string street2 = default(string), string postalCode = default(string), string city = default(string), string state = default(string), string country = default(string), bool residential = default(bool))
public CustomerShippingContactsResponseAddress(string varObject = default(string), string street1 = default(string), string street2 = default(string), string postalCode = default(string), string city = default(string), string state = default(string), string country = default(string), bool? residential = default(bool?))
{
this.VarObject = varObject;
this.Street1 = street1;
Expand Down Expand Up @@ -109,7 +109,7 @@ public partial class CustomerShippingContactsResponseAddress : IEquatable<Custom
/// </summary>
/// <example>true</example>
[DataMember(Name = "residential", EmitDefaultValue = true)]
public bool Residential { get; set; }
public bool? Residential { get; set; }

/// <summary>
/// Returns the string presentation of the object
Expand Down Expand Up @@ -199,7 +199,8 @@ public bool Equals(CustomerShippingContactsResponseAddress input)
) &&
(
this.Residential == input.Residential ||
this.Residential.Equals(input.Residential)
(this.Residential != null &&
this.Residential.Equals(input.Residential))
);
}

Expand Down Expand Up @@ -240,7 +241,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.Country.GetHashCode();
}
hashCode = (hashCode * 59) + this.Residential.GetHashCode();
if (this.Residential != null)
{
hashCode = (hashCode * 59) + this.Residential.GetHashCode();
}
return hashCode;
}
}
Expand Down

0 comments on commit c7f86c0

Please sign in to comment.