diff --git a/.travis.yml b/.travis.yml index 27b8800..ce3d269 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ install: script: - export frameworkVersion=netstandard2.0 - - export releaseVersion="2.11.0" + - export releaseVersion="2.11.1" - /bin/sh ./mono_nunit_test.sh after_success: diff --git a/CHANGES.md b/CHANGES.md index f3ae912..1003dcd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,20 @@ # Change Log +## Version 2.11.1 (2018-10-24) + +### New feature: Support for Partial Payments in Connect v1 + +The Connect SDK now supports partial payment functionality for the Connect v1 Transactions API with the addition of a new `Payment` field: +* `Payment.is_partial` — Indicates whether or not the payment is only partially paid for. If `true`, the payment will have the tenders collected so far, but the itemizations will be empty until the payment is completed. + +`Tender` also includes 2 new fields to help resolve timing around payments with multiple tenders. Invoices that involve partial payment (e.g., requiring a deposit) may include tenders settled well before the entire payment is completed: +* `Tender.tendered_at` — The time when the tender was accepted by the merchant. +* `Tender.settled_at` — The time when the tender was captured, in ISO 8601 format. Typically the same as (or within moments of) `tendered_at` unless the tender was part of a delay capture transaction. + +The change also makes some behavioral changes to the Connect v1 Payment endpoints: +* **Create Refunds** rejects requests for invoices that have partial payments pending. +* **List Payments** takes a new request field, `include_partial` to indicate whether partial payments should be included in the response. + ## Version 2.11.0 (2018-09-18) We have added Connect v2 Inventory API and birthdays in `Customer` entities. diff --git a/docs/V1Payment.md b/docs/V1Payment.md index 66ad405..5eda49f 100644 --- a/docs/V1Payment.md +++ b/docs/V1Payment.md @@ -29,6 +29,7 @@ Name | Type | Description | Notes **Itemizations** | [**List<V1PaymentItemization>**](V1PaymentItemization.md) | The items purchased in the payment. | [optional] **SurchargeMoney** | [**V1Money**](V1Money.md) | The total of all surcharges applied to the payment. | [optional] **Surcharges** | [**List<V1PaymentSurcharge>**](V1PaymentSurcharge.md) | A list of all surcharges associated with the payment. | [optional] +**IsPartial** | **bool?** | Indicates whether or not the payment is only partially paid for. If true, this payment will have the tenders collected so far, but the itemizations will be empty until the payment is completed. | [optional] diff --git a/docs/V1PaymentSurcharge.md b/docs/V1PaymentSurcharge.md index a1e5b71..a403f08 100644 --- a/docs/V1PaymentSurcharge.md +++ b/docs/V1PaymentSurcharge.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **Type** | **TypeEnum** | Indicates the source of the surcharge. For example, if it was applied as an automatic gratuity for a large group. | [optional] **Taxable** | **bool?** | Indicates whether the surcharge is taxable. | [optional] **Taxes** | [**List<V1PaymentTax>**](V1PaymentTax.md) | The list of taxes that should be applied to the surcharge. | [optional] -**SurchargeId** | **string** | | [optional] +**SurchargeId** | **string** | A Square-issued unique identifier associated with the surcharge. | [optional] ## TypeEnum diff --git a/docs/V1Tender.md b/docs/V1Tender.md index 392dcf2..7308421 100644 --- a/docs/V1Tender.md +++ b/docs/V1Tender.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **PaymentNote** | **string** | Notes entered by the merchant about the tender at the time of payment, if any. Typically only present for tender with the type: OTHER. | [optional] **TotalMoney** | [**V1Money**](V1Money.md) | The total amount of money provided in this form of tender. | [optional] **TenderedMoney** | [**V1Money**](V1Money.md) | The amount of total_money applied to the payment. | [optional] +**TenderedAt** | **string** | The time when the tender was created, in ISO 8601 format. | [optional] +**SettledAt** | **string** | The time when the tender was settled, in ISO 8601 format. | [optional] **ChangeBackMoney** | [**V1Money**](V1Money.md) | The amount of total_money returned to the buyer as change. | [optional] **RefundedMoney** | [**V1Money**](V1Money.md) | The total of all refunds applied to this tender. This amount is always negative or zero. | [optional] **IsExchange** | **bool?** | Indicates whether or not the tender is associated with an exchange. If is_exchange is true, the tender represents the value of goods returned in an exchange not the actual money paid. The exchange value reduces the tender amounts needed to pay for items purchased in the exchange. | [optional] diff --git a/docs/V1TransactionsApi.md b/docs/V1TransactionsApi.md index 37cb18c..9c74658 100644 --- a/docs/V1TransactionsApi.md +++ b/docs/V1TransactionsApi.md @@ -222,7 +222,7 @@ Name | Type | Description | Notes # **ListPayments** -> List ListPayments (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null) +> List ListPayments (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null, bool? includePartial = null) Provides summary information for all payments taken by a merchant or any of the merchant's mobile staff during a date range. Date ranges cannot exceed one year in length. See Date ranges for details of inclusive and exclusive dates. @@ -253,11 +253,12 @@ namespace Example var endTime = endTime_example; // string | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. (optional) var limit = 56; // int? | The maximum number of payments to return in a single response. This value cannot exceed 200. (optional) var batchToken = batchToken_example; // string | A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional) + var includePartial = true; // bool? | Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. (optional) try { // Provides summary information for all payments taken by a merchant or any of the merchant's mobile staff during a date range. Date ranges cannot exceed one year in length. See Date ranges for details of inclusive and exclusive dates. - List<V1Payment> result = apiInstance.ListPayments(locationId, order, beginTime, endTime, limit, batchToken); + List<V1Payment> result = apiInstance.ListPayments(locationId, order, beginTime, endTime, limit, batchToken, includePartial); Debug.WriteLine(result); } catch (Exception e) @@ -279,6 +280,7 @@ Name | Type | Description | Notes **endTime** | **string**| The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. | [optional] **limit** | **int?**| The maximum number of payments to return in a single response. This value cannot exceed 200. | [optional] **batchToken** | **string**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional] + **includePartial** | **bool?**| Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. | [optional] ### Return type diff --git a/src/Square.Connect/Api/V1TransactionsApi.cs b/src/Square.Connect/Api/V1TransactionsApi.cs index be3ea8e..9ec5cb0 100644 --- a/src/Square.Connect/Api/V1TransactionsApi.cs +++ b/src/Square.Connect/Api/V1TransactionsApi.cs @@ -108,8 +108,9 @@ public interface IV1TransactionsApi : IApiAccessor /// The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. (optional) /// The maximum number of payments to return in a single response. This value cannot exceed 200. (optional) /// A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional) + /// Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. (optional) /// List<V1Payment> - List ListPayments (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null); + List ListPayments (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null, bool? includePartial = null); /// /// Provides summary information for all payments taken by a merchant or any of the merchant's mobile staff during a date range. Date ranges cannot exceed one year in length. See Date ranges for details of inclusive and exclusive dates. @@ -124,8 +125,9 @@ public interface IV1TransactionsApi : IApiAccessor /// The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. (optional) /// The maximum number of payments to return in a single response. This value cannot exceed 200. (optional) /// A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional) + /// Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. (optional) /// ApiResponse of List<V1Payment> - ApiResponse> ListPaymentsWithHttpInfo (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null); + ApiResponse> ListPaymentsWithHttpInfo (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null, bool? includePartial = null); /// /// Provides the details for all refunds initiated by a merchant or any of the merchant's mobile staff during a date range. Date ranges cannot exceed one year in length. /// @@ -393,8 +395,9 @@ public interface IV1TransactionsApi : IApiAccessor /// The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. (optional) /// The maximum number of payments to return in a single response. This value cannot exceed 200. (optional) /// A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional) + /// Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. (optional) /// Task of List<V1Payment> - System.Threading.Tasks.Task> ListPaymentsAsync (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null); + System.Threading.Tasks.Task> ListPaymentsAsync (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null, bool? includePartial = null); /// /// Provides summary information for all payments taken by a merchant or any of the merchant's mobile staff during a date range. Date ranges cannot exceed one year in length. See Date ranges for details of inclusive and exclusive dates. @@ -409,8 +412,9 @@ public interface IV1TransactionsApi : IApiAccessor /// The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. (optional) /// The maximum number of payments to return in a single response. This value cannot exceed 200. (optional) /// A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional) + /// Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. (optional) /// Task of ApiResponse (List<V1Payment>) - System.Threading.Tasks.Task>> ListPaymentsAsyncWithHttpInfo (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null); + System.Threading.Tasks.Task>> ListPaymentsAsyncWithHttpInfo (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null, bool? includePartial = null); /// /// Provides the details for all refunds initiated by a merchant or any of the merchant's mobile staff during a date range. Date ranges cannot exceed one year in length. /// @@ -1202,10 +1206,11 @@ public async System.Threading.Tasks.Task>> ListOrdersA /// The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. (optional) /// The maximum number of payments to return in a single response. This value cannot exceed 200. (optional) /// A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional) + /// Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. (optional) /// List<V1Payment> - public List ListPayments (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null) + public List ListPayments (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null, bool? includePartial = null) { - ApiResponse> localVarResponse = ListPaymentsWithHttpInfo(locationId, order, beginTime, endTime, limit, batchToken); + ApiResponse> localVarResponse = ListPaymentsWithHttpInfo(locationId, order, beginTime, endTime, limit, batchToken, includePartial); return localVarResponse.Data; } @@ -1219,8 +1224,9 @@ public List ListPayments (string locationId, string order = null, str /// The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. (optional) /// The maximum number of payments to return in a single response. This value cannot exceed 200. (optional) /// A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional) + /// Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. (optional) /// ApiResponse of List<V1Payment> - public ApiResponse< List > ListPaymentsWithHttpInfo (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null) + public ApiResponse< List > ListPaymentsWithHttpInfo (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null, bool? includePartial = null) { // verify the required parameter 'locationId' is set if (locationId == null) @@ -1253,6 +1259,7 @@ public ApiResponse< List > ListPaymentsWithHttpInfo (string locationI if (endTime != null) localVarQueryParams.Add("end_time", Configuration.ApiClient.ParameterToString(endTime)); // query parameter if (limit != null) localVarQueryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter if (batchToken != null) localVarQueryParams.Add("batch_token", Configuration.ApiClient.ParameterToString(batchToken)); // query parameter + if (includePartial != null) localVarQueryParams.Add("include_partial", Configuration.ApiClient.ParameterToString(includePartial)); // query parameter // authentication (oauth2) required // oauth required @@ -1290,10 +1297,11 @@ public ApiResponse< List > ListPaymentsWithHttpInfo (string locationI /// The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. (optional) /// The maximum number of payments to return in a single response. This value cannot exceed 200. (optional) /// A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional) + /// Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. (optional) /// Task of List<V1Payment> - public async System.Threading.Tasks.Task> ListPaymentsAsync (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null) + public async System.Threading.Tasks.Task> ListPaymentsAsync (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null, bool? includePartial = null) { - ApiResponse> localVarResponse = await ListPaymentsAsyncWithHttpInfo(locationId, order, beginTime, endTime, limit, batchToken); + ApiResponse> localVarResponse = await ListPaymentsAsyncWithHttpInfo(locationId, order, beginTime, endTime, limit, batchToken, includePartial); return localVarResponse.Data; } @@ -1308,8 +1316,9 @@ public async System.Threading.Tasks.Task> ListPaymentsAsync (str /// The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. (optional) /// The maximum number of payments to return in a single response. This value cannot exceed 200. (optional) /// A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional) + /// Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. (optional) /// Task of ApiResponse (List<V1Payment>) - public async System.Threading.Tasks.Task>> ListPaymentsAsyncWithHttpInfo (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null) + public async System.Threading.Tasks.Task>> ListPaymentsAsyncWithHttpInfo (string locationId, string order = null, string beginTime = null, string endTime = null, int? limit = null, string batchToken = null, bool? includePartial = null) { // verify the required parameter 'locationId' is set if (locationId == null) @@ -1343,6 +1352,7 @@ public async System.Threading.Tasks.Task>> ListPayme if (endTime != null) localVarQueryParams.Add("end_time", Configuration.ApiClient.ParameterToString(endTime)); // query parameter if (limit != null) localVarQueryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter if (batchToken != null) localVarQueryParams.Add("batch_token", Configuration.ApiClient.ParameterToString(batchToken)); // query parameter + if (includePartial != null) localVarQueryParams.Add("include_partial", Configuration.ApiClient.ParameterToString(includePartial)); // query parameter // authentication (oauth2) required // oauth required diff --git a/src/Square.Connect/Client/Configuration.cs b/src/Square.Connect/Client/Configuration.cs index 9166f0e..0c5fe76 100644 --- a/src/Square.Connect/Client/Configuration.cs +++ b/src/Square.Connect/Client/Configuration.cs @@ -46,7 +46,7 @@ public Configuration(ApiClient apiClient = null, string tempFolderPath = null, string dateTimeFormat = null, int timeout = 100000, - string userAgent = "Square-Connect-CSharp/2.20180918.0" + string userAgent = "Square-Connect-CSharp/2.20180918.1" ) { setApiClientUsingDefault(apiClient); @@ -81,7 +81,7 @@ public Configuration(ApiClient apiClient) /// Version of the package. /// /// Version of the package. - public const string Version = "2.11.0"; + public const string Version = "2.11.1"; /// /// Gets or sets the default Configuration. @@ -318,7 +318,7 @@ public static String ToDebugReport() .GetReferencedAssemblies() .Where(x => x.Name == "System.Core").First().Version.ToString() + "\n"; report += " Version of the API: 2.0\n"; - report += " SDK Package Version: 2.11.0\n"; + report += " SDK Package Version: 2.11.1\n"; return report; } diff --git a/src/Square.Connect/Model/V1Payment.cs b/src/Square.Connect/Model/V1Payment.cs index 6e66d7d..c39eba8 100644 --- a/src/Square.Connect/Model/V1Payment.cs +++ b/src/Square.Connect/Model/V1Payment.cs @@ -58,7 +58,8 @@ public partial class V1Payment : IEquatable, IValidatableObject /// The items purchased in the payment.. /// The total of all surcharges applied to the payment.. /// A list of all surcharges associated with the payment.. - public V1Payment(string Id = default(string), string MerchantId = default(string), string CreatedAt = default(string), string CreatorId = default(string), Device Device = default(Device), string PaymentUrl = default(string), string ReceiptUrl = default(string), V1Money InclusiveTaxMoney = default(V1Money), V1Money AdditiveTaxMoney = default(V1Money), V1Money TaxMoney = default(V1Money), V1Money TipMoney = default(V1Money), V1Money DiscountMoney = default(V1Money), V1Money TotalCollectedMoney = default(V1Money), V1Money ProcessingFeeMoney = default(V1Money), V1Money NetTotalMoney = default(V1Money), V1Money RefundedMoney = default(V1Money), V1Money SwedishRoundingMoney = default(V1Money), V1Money GrossSalesMoney = default(V1Money), V1Money NetSalesMoney = default(V1Money), List InclusiveTax = default(List), List AdditiveTax = default(List), List Tender = default(List), List Refunds = default(List), List Itemizations = default(List), V1Money SurchargeMoney = default(V1Money), List Surcharges = default(List)) + /// Indicates whether or not the payment is only partially paid for. If true, this payment will have the tenders collected so far, but the itemizations will be empty until the payment is completed.. + public V1Payment(string Id = default(string), string MerchantId = default(string), string CreatedAt = default(string), string CreatorId = default(string), Device Device = default(Device), string PaymentUrl = default(string), string ReceiptUrl = default(string), V1Money InclusiveTaxMoney = default(V1Money), V1Money AdditiveTaxMoney = default(V1Money), V1Money TaxMoney = default(V1Money), V1Money TipMoney = default(V1Money), V1Money DiscountMoney = default(V1Money), V1Money TotalCollectedMoney = default(V1Money), V1Money ProcessingFeeMoney = default(V1Money), V1Money NetTotalMoney = default(V1Money), V1Money RefundedMoney = default(V1Money), V1Money SwedishRoundingMoney = default(V1Money), V1Money GrossSalesMoney = default(V1Money), V1Money NetSalesMoney = default(V1Money), List InclusiveTax = default(List), List AdditiveTax = default(List), List Tender = default(List), List Refunds = default(List), List Itemizations = default(List), V1Money SurchargeMoney = default(V1Money), List Surcharges = default(List), bool? IsPartial = default(bool?)) { this.Id = Id; this.MerchantId = MerchantId; @@ -86,6 +87,7 @@ public partial class V1Payment : IEquatable, IValidatableObject this.Itemizations = Itemizations; this.SurchargeMoney = SurchargeMoney; this.Surcharges = Surcharges; + this.IsPartial = IsPartial; } /// @@ -245,6 +247,12 @@ public partial class V1Payment : IEquatable, IValidatableObject [DataMember(Name="surcharges", EmitDefaultValue=false)] public List Surcharges { get; set; } /// + /// Indicates whether or not the payment is only partially paid for. If true, this payment will have the tenders collected so far, but the itemizations will be empty until the payment is completed. + /// + /// Indicates whether or not the payment is only partially paid for. If true, this payment will have the tenders collected so far, but the itemizations will be empty until the payment is completed. + [DataMember(Name="is_partial", EmitDefaultValue=false)] + public bool? IsPartial { get; set; } + /// /// Returns the string presentation of the object /// /// String presentation of the object @@ -278,6 +286,7 @@ public override string ToString() sb.Append(" Itemizations: ").Append(Itemizations).Append("\n"); sb.Append(" SurchargeMoney: ").Append(SurchargeMoney).Append("\n"); sb.Append(" Surcharges: ").Append(Surcharges).Append("\n"); + sb.Append(" IsPartial: ").Append(IsPartial).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -443,6 +452,11 @@ public bool Equals(V1Payment other) this.Surcharges == other.Surcharges || this.Surcharges != null && this.Surcharges.SequenceEqual(other.Surcharges) + ) && + ( + this.IsPartial == other.IsPartial || + this.IsPartial != null && + this.IsPartial.Equals(other.IsPartial) ); } @@ -509,6 +523,8 @@ public override int GetHashCode() hash = hash * 59 + this.SurchargeMoney.GetHashCode(); if (this.Surcharges != null) hash = hash * 59 + this.Surcharges.GetHashCode(); + if (this.IsPartial != null) + hash = hash * 59 + this.IsPartial.GetHashCode(); return hash; } } diff --git a/src/Square.Connect/Model/V1PaymentSurcharge.cs b/src/Square.Connect/Model/V1PaymentSurcharge.cs index 54c161d..77bb1db 100644 --- a/src/Square.Connect/Model/V1PaymentSurcharge.cs +++ b/src/Square.Connect/Model/V1PaymentSurcharge.cs @@ -72,7 +72,7 @@ public enum TypeEnum /// Indicates the source of the surcharge. For example, if it was applied as an automatic gratuity for a large group.. /// Indicates whether the surcharge is taxable.. /// The list of taxes that should be applied to the surcharge.. - /// SurchargeId. + /// A Square-issued unique identifier associated with the surcharge.. public V1PaymentSurcharge(string Name = default(string), V1Money AppliedMoney = default(V1Money), string Rate = default(string), V1Money AmountMoney = default(V1Money), TypeEnum? Type = default(TypeEnum?), bool? Taxable = default(bool?), List Taxes = default(List), string SurchargeId = default(string)) { this.Name = Name; @@ -122,8 +122,9 @@ public enum TypeEnum [DataMember(Name="taxes", EmitDefaultValue=false)] public List Taxes { get; set; } /// - /// Gets or Sets SurchargeId + /// A Square-issued unique identifier associated with the surcharge. /// + /// A Square-issued unique identifier associated with the surcharge. [DataMember(Name="surcharge_id", EmitDefaultValue=false)] public string SurchargeId { get; set; } /// diff --git a/src/Square.Connect/Model/V1Tender.cs b/src/Square.Connect/Model/V1Tender.cs index ffbe2a4..d337854 100644 --- a/src/Square.Connect/Model/V1Tender.cs +++ b/src/Square.Connect/Model/V1Tender.cs @@ -232,10 +232,12 @@ public enum EntryMethodEnum /// Notes entered by the merchant about the tender at the time of payment, if any. Typically only present for tender with the type: OTHER.. /// The total amount of money provided in this form of tender.. /// The amount of total_money applied to the payment.. + /// The time when the tender was created, in ISO 8601 format.. + /// The time when the tender was settled, in ISO 8601 format.. /// The amount of total_money returned to the buyer as change.. /// The total of all refunds applied to this tender. This amount is always negative or zero.. /// Indicates whether or not the tender is associated with an exchange. If is_exchange is true, the tender represents the value of goods returned in an exchange not the actual money paid. The exchange value reduces the tender amounts needed to pay for items purchased in the exchange.. - public V1Tender(string Id = default(string), TypeEnum? Type = default(TypeEnum?), string Name = default(string), string EmployeeId = default(string), string ReceiptUrl = default(string), CardBrandEnum? CardBrand = default(CardBrandEnum?), string PanSuffix = default(string), EntryMethodEnum? EntryMethod = default(EntryMethodEnum?), string PaymentNote = default(string), V1Money TotalMoney = default(V1Money), V1Money TenderedMoney = default(V1Money), V1Money ChangeBackMoney = default(V1Money), V1Money RefundedMoney = default(V1Money), bool? IsExchange = default(bool?)) + public V1Tender(string Id = default(string), TypeEnum? Type = default(TypeEnum?), string Name = default(string), string EmployeeId = default(string), string ReceiptUrl = default(string), CardBrandEnum? CardBrand = default(CardBrandEnum?), string PanSuffix = default(string), EntryMethodEnum? EntryMethod = default(EntryMethodEnum?), string PaymentNote = default(string), V1Money TotalMoney = default(V1Money), V1Money TenderedMoney = default(V1Money), string TenderedAt = default(string), string SettledAt = default(string), V1Money ChangeBackMoney = default(V1Money), V1Money RefundedMoney = default(V1Money), bool? IsExchange = default(bool?)) { this.Id = Id; this.Type = Type; @@ -248,6 +250,8 @@ public enum EntryMethodEnum this.PaymentNote = PaymentNote; this.TotalMoney = TotalMoney; this.TenderedMoney = TenderedMoney; + this.TenderedAt = TenderedAt; + this.SettledAt = SettledAt; this.ChangeBackMoney = ChangeBackMoney; this.RefundedMoney = RefundedMoney; this.IsExchange = IsExchange; @@ -302,6 +306,18 @@ public enum EntryMethodEnum [DataMember(Name="tendered_money", EmitDefaultValue=false)] public V1Money TenderedMoney { get; set; } /// + /// The time when the tender was created, in ISO 8601 format. + /// + /// The time when the tender was created, in ISO 8601 format. + [DataMember(Name="tendered_at", EmitDefaultValue=false)] + public string TenderedAt { get; set; } + /// + /// The time when the tender was settled, in ISO 8601 format. + /// + /// The time when the tender was settled, in ISO 8601 format. + [DataMember(Name="settled_at", EmitDefaultValue=false)] + public string SettledAt { get; set; } + /// /// The amount of total_money returned to the buyer as change. /// /// The amount of total_money returned to the buyer as change. @@ -338,6 +354,8 @@ public override string ToString() sb.Append(" PaymentNote: ").Append(PaymentNote).Append("\n"); sb.Append(" TotalMoney: ").Append(TotalMoney).Append("\n"); sb.Append(" TenderedMoney: ").Append(TenderedMoney).Append("\n"); + sb.Append(" TenderedAt: ").Append(TenderedAt).Append("\n"); + sb.Append(" SettledAt: ").Append(SettledAt).Append("\n"); sb.Append(" ChangeBackMoney: ").Append(ChangeBackMoney).Append("\n"); sb.Append(" RefundedMoney: ").Append(RefundedMoney).Append("\n"); sb.Append(" IsExchange: ").Append(IsExchange).Append("\n"); @@ -432,6 +450,16 @@ public bool Equals(V1Tender other) this.TenderedMoney != null && this.TenderedMoney.Equals(other.TenderedMoney) ) && + ( + this.TenderedAt == other.TenderedAt || + this.TenderedAt != null && + this.TenderedAt.Equals(other.TenderedAt) + ) && + ( + this.SettledAt == other.SettledAt || + this.SettledAt != null && + this.SettledAt.Equals(other.SettledAt) + ) && ( this.ChangeBackMoney == other.ChangeBackMoney || this.ChangeBackMoney != null && @@ -482,6 +510,10 @@ public override int GetHashCode() hash = hash * 59 + this.TotalMoney.GetHashCode(); if (this.TenderedMoney != null) hash = hash * 59 + this.TenderedMoney.GetHashCode(); + if (this.TenderedAt != null) + hash = hash * 59 + this.TenderedAt.GetHashCode(); + if (this.SettledAt != null) + hash = hash * 59 + this.SettledAt.GetHashCode(); if (this.ChangeBackMoney != null) hash = hash * 59 + this.ChangeBackMoney.GetHashCode(); if (this.RefundedMoney != null) diff --git a/src/Square.Connect/Properties/AssemblyInfo.cs b/src/Square.Connect/Properties/AssemblyInfo.cs index 57d271e..4ee96b9 100644 --- a/src/Square.Connect/Properties/AssemblyInfo.cs +++ b/src/Square.Connect/Properties/AssemblyInfo.cs @@ -28,6 +28,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.11.0")] -[assembly: AssemblyFileVersion("2.11.0")] -[assembly: AssemblyInformationalVersion("Square-Connect-CSharp/2.20180918.0")] +[assembly: AssemblyVersion("2.11.1")] +[assembly: AssemblyFileVersion("2.11.1")] +[assembly: AssemblyInformationalVersion("Square-Connect-CSharp/2.20180918.1")] diff --git a/src/Square.Connect/Square.Connect.nuspec b/src/Square.Connect/Square.Connect.nuspec index fb72701..72e79b7 100644 --- a/src/Square.Connect/Square.Connect.nuspec +++ b/src/Square.Connect/Square.Connect.nuspec @@ -6,7 +6,7 @@ Square.Connect - 2.11.0 + 2.11.1 Square