From 24e7fed8b636fcd0fa444cc2865c79fe6d3bafe7 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 19 Jun 2017 23:40:41 +0000 Subject: [PATCH 1/2] From connect-api-specification: Merge pull request #53 from square/tristans/fix-payment-model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit update data type for v1payments>creator_id, bump versions, remove out… --- .travis.yml | 2 +- README.md | 8 ++++---- docs/V1Payment.md | 2 +- src/Square.Connect/Client/Configuration.cs | 6 +++--- src/Square.Connect/Model/V1Payment.cs | 4 ++-- src/Square.Connect/Properties/AssemblyInfo.cs | 4 ++-- src/Square.Connect/Square.Connect.nuspec | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 245e252..77d2c72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ install: script: - export frameworkVersion=net45 - - export releaseVersion="2.1.0" + - export releaseVersion="2.1.1" - /bin/sh ./mono_nunit_test.sh after_success: diff --git a/README.md b/README.md index 1c83bde..161a8f3 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,8 @@ namespace Example // Retrieving your location IDs public void RetrieveLocations() { - LocationsApi _locationsApi = new LocationsApi(); - var response = _locationsApi.ListLocations(); + LocationApi _locationApi = new LocationApi(); + var response = _locationApi.ListLocations(); } // Charge the card nonce @@ -95,8 +95,8 @@ namespace Example string nonce = "YOUR_NONCE"; string locationId = "YOUR_LOCATION_ID"; ChargeRequest body = new ChargeRequest(AmountMoney: money, IdempotencyKey: idempotencyKey, CardNonce: nonce); - TransactionsApi transactionsApi = new TransactionsApi(); - var response = transactionsApi.Charge(locationId, body); + TransactionApi transactionApi = new TransactionApi(); + var response = transactionApi.Charge(locationId, body); } } } diff --git a/docs/V1Payment.md b/docs/V1Payment.md index 1febdbe..bc12a80 100644 --- a/docs/V1Payment.md +++ b/docs/V1Payment.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **string** | The payment's unique identifier. | [optional] **MerchantId** | **string** | The unique identifier of the merchant that took the payment. | [optional] **CreatedAt** | **string** | The time when the payment was created, in ISO 8601 format. | [optional] -**CreatorId** | **bool?** | The unique identifier of the Square account that took the payment. | [optional] +**CreatorId** | **string** | The unique identifier of the Square account that took the payment. | [optional] **Device** | [**Device**](Device.md) | The device that took the payment. | [optional] **PaymentUrl** | **string** | The URL of the payment's detail page in the merchant dashboard. The merchant must be signed in to the merchant dashboard to view this page. | [optional] **ReceiptUrl** | **string** | The URL of the receipt for the payment. Note that for split tender payments, this URL corresponds to the receipt for the first tender listed in the payment's tender field. Each Tender object has its own receipt_url field you can use to get the other receipts associated with a split tender payment. | [optional] diff --git a/src/Square.Connect/Client/Configuration.cs b/src/Square.Connect/Client/Configuration.cs index 65bc74e..66dad0c 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.1.0" + string userAgent = "Square-Connect-CSharp/2.1.1" ) { setApiClientUsingDefault(apiClient); @@ -81,7 +81,7 @@ public Configuration(ApiClient apiClient) /// Version of the package. /// /// Version of the package. - public const string Version = "2.1.0"; + public const string Version = "2.1.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.1.0\n"; + report += " SDK Package Version: 2.1.1\n"; return report; } diff --git a/src/Square.Connect/Model/V1Payment.cs b/src/Square.Connect/Model/V1Payment.cs index 873fae8..13a591f 100644 --- a/src/Square.Connect/Model/V1Payment.cs +++ b/src/Square.Connect/Model/V1Payment.cs @@ -56,7 +56,7 @@ public partial class V1Payment : IEquatable, IValidatableObject /// All of the additive taxes associated with the payment.. /// All of the refunds applied to the payment.. /// The items purchased in the payment.. - public V1Payment(string Id = default(string), string MerchantId = default(string), string CreatedAt = default(string), bool? CreatorId = default(bool?), 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)) + 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)) { this.Id = Id; this.MerchantId = MerchantId; @@ -107,7 +107,7 @@ public partial class V1Payment : IEquatable, IValidatableObject /// /// The unique identifier of the Square account that took the payment. [DataMember(Name="creator_id", EmitDefaultValue=false)] - public bool? CreatorId { get; set; } + public string CreatorId { get; set; } /// /// The device that took the payment. /// diff --git a/src/Square.Connect/Properties/AssemblyInfo.cs b/src/Square.Connect/Properties/AssemblyInfo.cs index ff19eac..3f75820 100644 --- a/src/Square.Connect/Properties/AssemblyInfo.cs +++ b/src/Square.Connect/Properties/AssemblyInfo.cs @@ -28,5 +28,5 @@ // 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.1.0")] -[assembly: AssemblyFileVersion("2.1.0")] +[assembly: AssemblyVersion("2.1.1")] +[assembly: AssemblyFileVersion("2.1.1")] diff --git a/src/Square.Connect/Square.Connect.nuspec b/src/Square.Connect/Square.Connect.nuspec index 9b28666..3d501bc 100644 --- a/src/Square.Connect/Square.Connect.nuspec +++ b/src/Square.Connect/Square.Connect.nuspec @@ -6,7 +6,7 @@ Square.Connect - 2.1.0 + 2.1.1 Square From 898e862dd023e000528fda40ea17c7b3962985d3 Mon Sep 17 00:00:00 2001 From: Tristan Sokol Date: Wed, 21 Jun 2017 08:44:04 -0700 Subject: [PATCH 2/2] fix variable names in readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 161a8f3..1c83bde 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,8 @@ namespace Example // Retrieving your location IDs public void RetrieveLocations() { - LocationApi _locationApi = new LocationApi(); - var response = _locationApi.ListLocations(); + LocationsApi _locationsApi = new LocationsApi(); + var response = _locationsApi.ListLocations(); } // Charge the card nonce @@ -95,8 +95,8 @@ namespace Example string nonce = "YOUR_NONCE"; string locationId = "YOUR_LOCATION_ID"; ChargeRequest body = new ChargeRequest(AmountMoney: money, IdempotencyKey: idempotencyKey, CardNonce: nonce); - TransactionApi transactionApi = new TransactionApi(); - var response = transactionApi.Charge(locationId, body); + TransactionsApi transactionsApi = new TransactionsApi(); + var response = transactionsApi.Charge(locationId, body); } } }