Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated PR for Release: 38.2.0 #133

Merged
merged 1 commit into from
Oct 17, 2024
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
20 changes: 10 additions & 10 deletions Square.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square", "Square/Square.csproj", "{c39be2e6-d740-4d77-ac72-72a520e5d22c}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square", "Square/Square.csproj", "{bee637ca-ab68-4b8d-9d12-616dd084a64b}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square.Tests", "Square.Tests/Square.Tests.csproj", "{b99edfd0-825e-455e-8da4-7c1ea286b08c}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square.Tests", "Square.Tests/Square.Tests.csproj", "{8b8f7c78-50fa-4e42-bbc6-6b5f6ace2a12}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{c39be2e6-d740-4d77-ac72-72a520e5d22c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{c39be2e6-d740-4d77-ac72-72a520e5d22c}.Debug|Any CPU.Build.0 = Debug|Any CPU
{c39be2e6-d740-4d77-ac72-72a520e5d22c}.Release|Any CPU.ActiveCfg = Release|Any CPU
{c39be2e6-d740-4d77-ac72-72a520e5d22c}.Release|Any CPU.Build.0 = Release|Any CPU
{b99edfd0-825e-455e-8da4-7c1ea286b08c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{b99edfd0-825e-455e-8da4-7c1ea286b08c}.Debug|Any CPU.Build.0 = Debug|Any CPU
{b99edfd0-825e-455e-8da4-7c1ea286b08c}.Release|Any CPU.ActiveCfg = Release|Any CPU
{b99edfd0-825e-455e-8da4-7c1ea286b08c}.Release|Any CPU.Build.0 = Release|Any CPU
{bee637ca-ab68-4b8d-9d12-616dd084a64b}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{bee637ca-ab68-4b8d-9d12-616dd084a64b}.Debug|Any CPU.Build.0 = Debug|Any CPU
{bee637ca-ab68-4b8d-9d12-616dd084a64b}.Release|Any CPU.ActiveCfg = Release|Any CPU
{bee637ca-ab68-4b8d-9d12-616dd084a64b}.Release|Any CPU.Build.0 = Release|Any CPU
{8b8f7c78-50fa-4e42-bbc6-6b5f6ace2a12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8b8f7c78-50fa-4e42-bbc6-6b5f6ace2a12}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8b8f7c78-50fa-4e42-bbc6-6b5f6ace2a12}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8b8f7c78-50fa-4e42-bbc6-6b5f6ace2a12}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
62 changes: 56 additions & 6 deletions Square/Models/DestinationDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ public class DestinationDetails
/// Initializes a new instance of the <see cref="DestinationDetails"/> class.
/// </summary>
/// <param name="cardDetails">card_details.</param>
/// <param name="cashDetails">cash_details.</param>
/// <param name="externalDetails">external_details.</param>
public DestinationDetails(
Models.DestinationDetailsCardRefundDetails cardDetails = null)
Models.DestinationDetailsCardRefundDetails cardDetails = null,
Models.DestinationDetailsCashRefundDetails cashDetails = null,
Models.DestinationDetailsExternalRefundDetails externalDetails = null)
{
this.CardDetails = cardDetails;
this.CashDetails = cashDetails;
this.ExternalDetails = externalDetails;
}

/// <summary>
Expand All @@ -34,6 +40,18 @@ public DestinationDetails(
[JsonProperty("card_details", NullValueHandling = NullValueHandling.Ignore)]
public Models.DestinationDetailsCardRefundDetails CardDetails { get; }

/// <summary>
/// Stores details about a cash refund. Contains only non-confidential information.
/// </summary>
[JsonProperty("cash_details", NullValueHandling = NullValueHandling.Ignore)]
public Models.DestinationDetailsCashRefundDetails CashDetails { get; }

/// <summary>
/// Stores details about an external refund. Contains only non-confidential information.
/// </summary>
[JsonProperty("external_details", NullValueHandling = NullValueHandling.Ignore)]
public Models.DestinationDetailsExternalRefundDetails ExternalDetails { get; }

/// <inheritdoc/>
public override string ToString()
{
Expand All @@ -56,14 +74,16 @@ public override bool Equals(object obj)
{
return true;
}
return obj is DestinationDetails other && ((this.CardDetails == null && other.CardDetails == null) || (this.CardDetails?.Equals(other.CardDetails) == true));
return obj is DestinationDetails other && ((this.CardDetails == null && other.CardDetails == null) || (this.CardDetails?.Equals(other.CardDetails) == true)) &&
((this.CashDetails == null && other.CashDetails == null) || (this.CashDetails?.Equals(other.CashDetails) == true)) &&
((this.ExternalDetails == null && other.ExternalDetails == null) || (this.ExternalDetails?.Equals(other.ExternalDetails) == true));
}

/// <inheritdoc/>
public override int GetHashCode()
{
int hashCode = -1174244865;
hashCode = HashCode.Combine(this.CardDetails);
int hashCode = -165986961;
hashCode = HashCode.Combine(this.CardDetails, this.CashDetails, this.ExternalDetails);

return hashCode;
}
Expand All @@ -74,6 +94,8 @@ public override int GetHashCode()
protected void ToString(List<string> toStringOutput)
{
toStringOutput.Add($"this.CardDetails = {(this.CardDetails == null ? "null" : this.CardDetails.ToString())}");
toStringOutput.Add($"this.CashDetails = {(this.CashDetails == null ? "null" : this.CashDetails.ToString())}");
toStringOutput.Add($"this.ExternalDetails = {(this.ExternalDetails == null ? "null" : this.ExternalDetails.ToString())}");
}

/// <summary>
Expand All @@ -83,7 +105,9 @@ protected void ToString(List<string> toStringOutput)
public Builder ToBuilder()
{
var builder = new Builder()
.CardDetails(this.CardDetails);
.CardDetails(this.CardDetails)
.CashDetails(this.CashDetails)
.ExternalDetails(this.ExternalDetails);
return builder;
}

Expand All @@ -93,6 +117,8 @@ public Builder ToBuilder()
public class Builder
{
private Models.DestinationDetailsCardRefundDetails cardDetails;
private Models.DestinationDetailsCashRefundDetails cashDetails;
private Models.DestinationDetailsExternalRefundDetails externalDetails;

/// <summary>
/// CardDetails.
Expand All @@ -105,14 +131,38 @@ public Builder CardDetails(Models.DestinationDetailsCardRefundDetails cardDetail
return this;
}

/// <summary>
/// CashDetails.
/// </summary>
/// <param name="cashDetails"> cashDetails. </param>
/// <returns> Builder. </returns>
public Builder CashDetails(Models.DestinationDetailsCashRefundDetails cashDetails)
{
this.cashDetails = cashDetails;
return this;
}

/// <summary>
/// ExternalDetails.
/// </summary>
/// <param name="externalDetails"> externalDetails. </param>
/// <returns> Builder. </returns>
public Builder ExternalDetails(Models.DestinationDetailsExternalRefundDetails externalDetails)
{
this.externalDetails = externalDetails;
return this;
}

/// <summary>
/// Builds class object.
/// </summary>
/// <returns> DestinationDetails. </returns>
public DestinationDetails Build()
{
return new DestinationDetails(
this.cardDetails);
this.cardDetails,
this.cashDetails,
this.externalDetails);
}
}
}
Expand Down
164 changes: 164 additions & 0 deletions Square/Models/DestinationDetailsCashRefundDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using APIMatic.Core.Utilities.Converters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Square;
using Square.Utilities;

namespace Square.Models
{
/// <summary>
/// DestinationDetailsCashRefundDetails.
/// </summary>
public class DestinationDetailsCashRefundDetails
{
/// <summary>
/// Initializes a new instance of the <see cref="DestinationDetailsCashRefundDetails"/> class.
/// </summary>
/// <param name="sellerSuppliedMoney">seller_supplied_money.</param>
/// <param name="changeBackMoney">change_back_money.</param>
public DestinationDetailsCashRefundDetails(
Models.Money sellerSuppliedMoney,
Models.Money changeBackMoney = null)
{
this.SellerSuppliedMoney = sellerSuppliedMoney;
this.ChangeBackMoney = changeBackMoney;
}

/// <summary>
/// Represents an amount of money. `Money` fields can be signed or unsigned.
/// Fields that do not explicitly define whether they are signed or unsigned are
/// considered unsigned and can only hold positive amounts. For signed fields, the
/// sign of the value indicates the purpose of the money transfer. See
/// [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
/// for more information.
/// </summary>
[JsonProperty("seller_supplied_money")]
public Models.Money SellerSuppliedMoney { get; }

/// <summary>
/// Represents an amount of money. `Money` fields can be signed or unsigned.
/// Fields that do not explicitly define whether they are signed or unsigned are
/// considered unsigned and can only hold positive amounts. For signed fields, the
/// sign of the value indicates the purpose of the money transfer. See
/// [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
/// for more information.
/// </summary>
[JsonProperty("change_back_money", NullValueHandling = NullValueHandling.Ignore)]
public Models.Money ChangeBackMoney { get; }

/// <inheritdoc/>
public override string ToString()
{
var toStringOutput = new List<string>();

this.ToString(toStringOutput);

return $"DestinationDetailsCashRefundDetails : ({string.Join(", ", toStringOutput)})";
}

/// <inheritdoc/>
public override bool Equals(object obj)
{
if (obj == null)
{
return false;
}

if (obj == this)
{
return true;
}
return obj is DestinationDetailsCashRefundDetails other && ((this.SellerSuppliedMoney == null && other.SellerSuppliedMoney == null) || (this.SellerSuppliedMoney?.Equals(other.SellerSuppliedMoney) == true)) &&
((this.ChangeBackMoney == null && other.ChangeBackMoney == null) || (this.ChangeBackMoney?.Equals(other.ChangeBackMoney) == true));
}

/// <inheritdoc/>
public override int GetHashCode()
{
int hashCode = -2083907783;
hashCode = HashCode.Combine(this.SellerSuppliedMoney, this.ChangeBackMoney);

return hashCode;
}
/// <summary>
/// ToString overload.
/// </summary>
/// <param name="toStringOutput">List of strings.</param>
protected void ToString(List<string> toStringOutput)
{
toStringOutput.Add($"this.SellerSuppliedMoney = {(this.SellerSuppliedMoney == null ? "null" : this.SellerSuppliedMoney.ToString())}");
toStringOutput.Add($"this.ChangeBackMoney = {(this.ChangeBackMoney == null ? "null" : this.ChangeBackMoney.ToString())}");
}

/// <summary>
/// Converts to builder object.
/// </summary>
/// <returns> Builder. </returns>
public Builder ToBuilder()
{
var builder = new Builder(
this.SellerSuppliedMoney)
.ChangeBackMoney(this.ChangeBackMoney);
return builder;
}

/// <summary>
/// Builder class.
/// </summary>
public class Builder
{
private Models.Money sellerSuppliedMoney;
private Models.Money changeBackMoney;

/// <summary>
/// Initialize Builder for DestinationDetailsCashRefundDetails.
/// </summary>
/// <param name="sellerSuppliedMoney"> sellerSuppliedMoney. </param>
public Builder(
Models.Money sellerSuppliedMoney)
{
this.sellerSuppliedMoney = sellerSuppliedMoney;
}

/// <summary>
/// SellerSuppliedMoney.
/// </summary>
/// <param name="sellerSuppliedMoney"> sellerSuppliedMoney. </param>
/// <returns> Builder. </returns>
public Builder SellerSuppliedMoney(Models.Money sellerSuppliedMoney)
{
this.sellerSuppliedMoney = sellerSuppliedMoney;
return this;
}

/// <summary>
/// ChangeBackMoney.
/// </summary>
/// <param name="changeBackMoney"> changeBackMoney. </param>
/// <returns> Builder. </returns>
public Builder ChangeBackMoney(Models.Money changeBackMoney)
{
this.changeBackMoney = changeBackMoney;
return this;
}

/// <summary>
/// Builds class object.
/// </summary>
/// <returns> DestinationDetailsCashRefundDetails. </returns>
public DestinationDetailsCashRefundDetails Build()
{
return new DestinationDetailsCashRefundDetails(
this.sellerSuppliedMoney,
this.changeBackMoney);
}
}
}
}
Loading
Loading