Skip to content

Commit 6513ad5

Browse files
author
Travis CI
committed
Pushed by Travis CI from connect-api-specification. Commit: 13dd07ed564b1b1a14f00876c42483ef2eb0156f
1 parent 8c1ccc8 commit 6513ad5

File tree

198 files changed

+1112
-2525
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+1112
-2525
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Square Connect V2 C# SDK [![Build Status](https://travis-ci.org/square/connect-csharp-sdk.svg?branch=master)](https://travis-ci.org/square/connect-csharp-sdk)
1+
# Square Connect V2 C# SDK
22

33
This repository contains the released C# client SDK. Check out our [API
44
specification repository](https://github.com/square/connect-api-specification)

Square.Connect.sln

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 2012
33
VisualStudioVersion = 12.0.0.0
44
MinimumVisualStudioVersion = 10.0.0.1
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square.Connect", "src\Square.Connect\Square.Connect.csproj", "{B21B4FCA-8E96-4C69-930E-20D10CD87B39}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square.Connect", "src\Square.Connect\Square.Connect.csproj", "{AB981268-F720-4F88-81E1-955C1E1A09AE}"
66
EndProject
77
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square.Connect.Test", "src\Square.Connect.Test\Square.Connect.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
88
EndProject
@@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
1212
Release|Any CPU = Release|Any CPU
1313
EndGlobalSection
1414
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{B21B4FCA-8E96-4C69-930E-20D10CD87B39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{B21B4FCA-8E96-4C69-930E-20D10CD87B39}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{B21B4FCA-8E96-4C69-930E-20D10CD87B39}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{B21B4FCA-8E96-4C69-930E-20D10CD87B39}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{AB981268-F720-4F88-81E1-955C1E1A09AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{AB981268-F720-4F88-81E1-955C1E1A09AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{AB981268-F720-4F88-81E1-955C1E1A09AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{AB981268-F720-4F88-81E1-955C1E1A09AE}.Release|Any CPU.Build.0 = Release|Any CPU
1919
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2020
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
2121
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU

build.bat

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
11
:: Generated by: https://github.com/swagger-api/swagger-codegen.git
22
::
3-
:: Licensed under the Apache License, Version 2.0 (the "License");
4-
:: you may not use this file except in compliance with the License.
5-
:: You may obtain a copy of the License at
6-
::
7-
:: http://www.apache.org/licenses/LICENSE-2.0
8-
::
9-
:: Unless required by applicable law or agreed to in writing, software
10-
:: distributed under the License is distributed on an "AS IS" BASIS,
11-
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
:: See the License for the specific language governing permissions and
13-
:: limitations under the License.
143

154
@echo off
165

176
SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319
187

19-
208
if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')"
219
.\nuget.exe install src\Square.Connect\packages.config -o packages
2210

2311
if not exist ".\bin" mkdir bin
2412

2513
copy packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
2614
copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll
15+
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\IO.Swagger.dll /recurse:src\IO.Swagger\*.cs /doc:bin\IO.Swagger.xml
2716

28-
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll /target:library /out:bin\Square.Connect.dll /recurse:src\Square.Connect\*.cs /doc:bin\Square.Connect.xml

build.sh

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ echo "[INFO] Run 'mcs' to build bin/Square.Connect.dll"
5050

5151
mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\
5252
bin/RestSharp.dll,\
53+
System.ComponentModel.DataAnnotations.dll,\
5354
System.Runtime.Serialization.dll \
5455
-target:library \
5556
-out:bin/Square.Connect.dll \

docs/Address.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33

44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**AddressLine1** | string | The first line of the address. Fields that start with `address_line` provide the address's most specific details, like street number, street name, and building name. They do *not* provide less specific details like city, state/province, or country (these details are provided in other fields). | [optional]
7-
**AddressLine2** | string | The second line of the address, if any. | [optional]
8-
**AddressLine3** | string | The third line of the address, if any. | [optional]
9-
**Locality** | string | The city or town of the address. | [optional]
10-
**Sublocality** | string | A civil region within the address's `locality`, if any. | [optional]
11-
**Sublocality2** | string | A civil region within the address's `sublocality`, if any. | [optional]
12-
**Sublocality3** | string | A civil region within the address's `sublocality_2`, if any. | [optional]
13-
**AdministrativeDistrictLevel1** | string | A civil entity within the address's country. In the US, this is the state. | [optional]
14-
**AdministrativeDistrictLevel2** | string | A civil entity within the address's `administrative_district_level_1`. In the US, this is the county. | [optional]
15-
**AdministrativeDistrictLevel3** | string | A civil entity within the address's `administrative_district_level_2`, if any. | [optional]
16-
**PostalCode** | string | The address's postal code. | [optional]
17-
**Country** | CountryEnum | The address's country, in ISO 3166-1-alpha-2 format. | [optional]
18-
**FirstName** | string | Optional first name when it's representing recipient. | [optional]
19-
**LastName** | string | Optional last name when it's representing recipient. | [optional]
20-
**Organization** | string | Optional organization name when it's representing recipient. | [optional]
6+
**AddressLine1** | **string** | The first line of the address. Fields that start with `address_line` provide the address's most specific details, like street number, street name, and building name. They do *not* provide less specific details like city, state/province, or country (these details are provided in other fields). | [optional]
7+
**AddressLine2** | **string** | The second line of the address, if any. | [optional]
8+
**AddressLine3** | **string** | The third line of the address, if any. | [optional]
9+
**Locality** | **string** | The city or town of the address. | [optional]
10+
**Sublocality** | **string** | A civil region within the address's `locality`, if any. | [optional]
11+
**Sublocality2** | **string** | A civil region within the address's `sublocality`, if any. | [optional]
12+
**Sublocality3** | **string** | A civil region within the address's `sublocality_2`, if any. | [optional]
13+
**AdministrativeDistrictLevel1** | **string** | A civil entity within the address's country. In the US, this is the state. | [optional]
14+
**AdministrativeDistrictLevel2** | **string** | A civil entity within the address's `administrative_district_level_1`. In the US, this is the county. | [optional]
15+
**AdministrativeDistrictLevel3** | **string** | A civil entity within the address's `administrative_district_level_2`, if any. | [optional]
16+
**PostalCode** | **string** | The address's postal code. | [optional]
17+
**Country** | **CountryEnum** | The address's country, in ISO 3166-1-alpha-2 format. | [optional]
18+
**FirstName** | **string** | Optional first name when it's representing recipient. | [optional]
19+
**LastName** | **string** | Optional last name when it's representing recipient. | [optional]
20+
**Organization** | **string** | Optional organization name when it's representing recipient. | [optional]
2121

2222

2323
## CountryEnum

docs/CaptureTransactionResponse.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**Errors** | List<Error> | Any errors that occurred during the request. | [optional]
6+
**Errors** | [**List&lt;Error&gt;**](Error.md) | Any errors that occurred during the request. | [optional]
77

88

99

docs/Card.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**Id** | string | The card&#39;s unique ID, if any. | [optional]
7-
**CardBrand** | CardBrandEnum | The card&#39;s brand (such as &#x60;VISA&#x60;). See [CardBrand](#type-cardbrand) for all possible values. | [optional]
8-
**Last4** | string | The last 4 digits of the card&#39;s number. | [optional]
9-
**ExpMonth** | long? | The month of the card&#39;s expiration date. This value is always between &#x60;1&#x60; and &#x60;12&#x60;, inclusive. | [optional]
10-
**ExpYear** | long? | The four-digit year of the card&#39;s expiration date. | [optional]
11-
**CardholderName** | string | The cardholder name. This value is present only if this object represents a customer&#39;s card on file. | [optional]
12-
**BillingAddress** | Address | The card&#39;s billing address. This value is present only if this object represents a customer&#39;s card on file. | [optional]
6+
**Id** | **string** | The card&#39;s unique ID, if any. | [optional]
7+
**CardBrand** | **CardBrandEnum** | The card&#39;s brand (such as &#x60;VISA&#x60;). See [CardBrand](#type-cardbrand) for all possible values. | [optional]
8+
**Last4** | **string** | The last 4 digits of the card&#39;s number. | [optional]
9+
**ExpMonth** | **long?** | The month of the card&#39;s expiration date. This value is always between &#x60;1&#x60; and &#x60;12&#x60;, inclusive. | [optional]
10+
**ExpYear** | **long?** | The four-digit year of the card&#39;s expiration date. | [optional]
11+
**CardholderName** | **string** | The cardholder name. This value is present only if this object represents a customer&#39;s card on file. | [optional]
12+
**BillingAddress** | [**Address**](Address.md) | The card&#39;s billing address. This value is present only if this object represents a customer&#39;s card on file. | [optional]
1313

1414

1515
## CardBrandEnum

docs/ChargeRequest.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33

44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**IdempotencyKey** | string | A value you specify that uniquely identifies this transaction among transactions you&#39;ve created. If you&#39;re unsure whether a particular transaction succeeded, you can reattempt it with the same idempotency key without worrying about double-charging the buyer. See [Idempotency keys](#idempotencykeys) for more information. |
7-
**AmountMoney** | Money | The amount of money to charge. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](#workingwithmonetaryamounts) for details. The value of &#x60;currency&#x60; must match the currency associated with the business that is charging the card. |
8-
**CardNonce** | string | A nonce generated from the &#x60;SqPaymentForm&#x60; that represents the card to charge. The application that provides a nonce to this endpoint must be the _same application_ that generated the nonce with the &#x60;SqPaymentForm&#x60;. Otherwise, the nonce is invalid. Do not provide a value for this field if you provide a value for &#x60;customer_card_id&#x60;. | [optional]
9-
**CustomerCardId** | string | The ID of the customer card on file to charge. Do not provide a value for this field if you provide a value for &#x60;card_nonce&#x60;. If you provide this value, you _must_ also provide a value for &#x60;customer_id&#x60;. | [optional]
10-
**DelayCapture** | bool? | If &#x60;true&#x60;, the request will only perform an Auth on the provided card. You can then later perform either a Capture (with the [CaptureTransaction](#endpoint-capturetransaction) endpoint) or a Void (with the [VoidTransation](#endpoint-voidtransaction) endpoint). Default value: &#x60;false&#x60; | [optional]
11-
**ReferenceId** | string | An optional ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters. | [optional]
12-
**Note** | string | An optional note to associate with the transaction. This value cannot exceed 60 characters. | [optional]
13-
**CustomerId** | string | The ID of the customer to associate this transaction with. This field is required if you provide a value for &#x60;customer_card_id&#x60;, and optional otherwise. | [optional]
14-
**BillingAddress** | Address | The buyer&#39;s billing address. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor &#x60;shipping_address&#x60; is provided. | [optional]
15-
**ShippingAddress** | Address | The buyer&#39;s shipping address, if available. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor &#x60;billing_address&#x60; is provided. | [optional]
16-
**BuyerEmailAddress** | string | The buyer&#39;s email address, if available. This value is optional, but this transaction is ineligible for chargeback protection if it is not provided. | [optional]
6+
**IdempotencyKey** | **string** | A value you specify that uniquely identifies this transaction among transactions you&#39;ve created. If you&#39;re unsure whether a particular transaction succeeded, you can reattempt it with the same idempotency key without worrying about double-charging the buyer. See [Idempotency keys](#idempotencykeys) for more information. |
7+
**AmountMoney** | [**Money**](Money.md) | The amount of money to charge. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](#workingwithmonetaryamounts) for details. The value of &#x60;currency&#x60; must match the currency associated with the business that is charging the card. |
8+
**CardNonce** | **string** | A nonce generated from the &#x60;SqPaymentForm&#x60; that represents the card to charge. The application that provides a nonce to this endpoint must be the _same application_ that generated the nonce with the &#x60;SqPaymentForm&#x60;. Otherwise, the nonce is invalid. Do not provide a value for this field if you provide a value for &#x60;customer_card_id&#x60;. | [optional]
9+
**CustomerCardId** | **string** | The ID of the customer card on file to charge. Do not provide a value for this field if you provide a value for &#x60;card_nonce&#x60;. If you provide this value, you _must_ also provide a value for &#x60;customer_id&#x60;. | [optional]
10+
**DelayCapture** | **bool?** | If &#x60;true&#x60;, the request will only perform an Auth on the provided card. You can then later perform either a Capture (with the [CaptureTransaction](#endpoint-capturetransaction) endpoint) or a Void (with the [VoidTransation](#endpoint-voidtransaction) endpoint). Default value: &#x60;false&#x60; | [optional]
11+
**ReferenceId** | **string** | An optional ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters. | [optional]
12+
**Note** | **string** | An optional note to associate with the transaction. This value cannot exceed 60 characters. | [optional]
13+
**CustomerId** | **string** | The ID of the customer to associate this transaction with. This field is required if you provide a value for &#x60;customer_card_id&#x60;, and optional otherwise. | [optional]
14+
**BillingAddress** | [**Address**](Address.md) | The buyer&#39;s billing address. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor &#x60;shipping_address&#x60; is provided. | [optional]
15+
**ShippingAddress** | [**Address**](Address.md) | The buyer&#39;s shipping address, if available. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor &#x60;billing_address&#x60; is provided. | [optional]
16+
**BuyerEmailAddress** | **string** | The buyer&#39;s email address, if available. This value is optional, but this transaction is ineligible for chargeback protection if it is not provided. | [optional]
1717

1818

1919

docs/ChargeResponse.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**Errors** | List<Error> | Any errors that occurred during the request. | [optional]
7-
**Transaction** | Transaction | The created transaction. | [optional]
6+
**Errors** | [**List&lt;Error&gt;**](Error.md) | Any errors that occurred during the request. | [optional]
7+
**Transaction** | [**Transaction**](Transaction.md) | The created transaction. | [optional]
88

99

1010

0 commit comments

Comments
 (0)