Skip to content

Commit

Permalink
Build from OpenAPI v3.0.1
Browse files Browse the repository at this point in the history
Fixes #501 : Payments API does not parse returned Warnings property
  • Loading branch information
Anu Thomas committed Feb 9, 2024
1 parent d7e6dc1 commit f191a21
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/AccountingApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 3.0.0
// The version of the OpenAPI document: 3.0.1


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/AppStoreApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 3.0.0
// The version of the OpenAPI document: 3.0.1


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/AssetApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 3.0.0
// The version of the OpenAPI document: 3.0.1


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/BankFeedsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 3.0.0
// The version of the OpenAPI document: 3.0.1


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/FilesApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 3.0.0
// The version of the OpenAPI document: 3.0.1


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/FinanceApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 3.0.0
// The version of the OpenAPI document: 3.0.1


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/IdentityApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 3.0.0
// The version of the OpenAPI document: 3.0.1


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/PayrollAUApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 3.0.0
// The version of the OpenAPI document: 3.0.1


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/PayrollNZApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 3.0.0
// The version of the OpenAPI document: 3.0.1


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/PayrollUkApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 3.0.0
// The version of the OpenAPI document: 3.0.1


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/ProjectApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

// The version of the OpenAPI document: 3.0.0
// The version of the OpenAPI document: 3.0.1


using System;
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public static String ToDebugReport()
{
String report = "C# SDK (Xero.NetStandard.OAuth2) Debug Report:\n";
report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n";
report += " Version of the API: 3.0.0\n";
report += " Version of the API: 3.0.1\n";
report += " SDK Package Version: 4.0.0\n";

return report;
Expand Down
16 changes: 16 additions & 0 deletions Xero.NetStandard.OAuth2/Model/Accounting/Payment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,13 @@ public enum PaymentTypeEnum
[DataMember(Name="ValidationErrors", EmitDefaultValue=false)]
public List<ValidationError> ValidationErrors { get; set; }

/// <summary>
/// Displays array of warning messages from the API
/// </summary>
/// <value>Displays array of warning messages from the API</value>
[DataMember(Name="Warnings", EmitDefaultValue=false)]
public List<ValidationError> Warnings { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand Down Expand Up @@ -325,6 +332,7 @@ public override string ToString()
sb.Append(" HasValidationErrors: ").Append(HasValidationErrors).Append("\n");
sb.Append(" StatusAttributeString: ").Append(StatusAttributeString).Append("\n");
sb.Append(" ValidationErrors: ").Append(ValidationErrors).Append("\n");
sb.Append(" Warnings: ").Append(Warnings).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down Expand Up @@ -492,6 +500,12 @@ public bool Equals(Payment input)
this.ValidationErrors != null &&
input.ValidationErrors != null &&
this.ValidationErrors.SequenceEqual(input.ValidationErrors)
) &&
(
this.Warnings == input.Warnings ||
this.Warnings != null &&
input.Warnings != null &&
this.Warnings.SequenceEqual(input.Warnings)
);
}

Expand Down Expand Up @@ -556,6 +570,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.StatusAttributeString.GetHashCode();
if (this.ValidationErrors != null)
hashCode = hashCode * 59 + this.ValidationErrors.GetHashCode();
if (this.Warnings != null)
hashCode = hashCode * 59 + this.Warnings.GetHashCode();
return hashCode;
}
}
Expand Down
7 changes: 7 additions & 0 deletions docs/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4377,6 +4377,13 @@
"items" : {
"$ref" : "#/components/schemas/ValidationError"
}
},
"Warnings" : {
"type" : "array",
"description" : "Displays array of warning messages from the API",
"items" : {
"$ref" : "#/components/schemas/ValidationError"
}
}
},
"description" : "",
Expand Down

0 comments on commit f191a21

Please sign in to comment.