Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Commit 8fa8d4c

Browse files
authored
Release/2.20.0 (#123)
* Release 2.20.0
1 parent efe9db3 commit 8fa8d4c

File tree

292 files changed

+1167
-24540
lines changed

Some content is hidden

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

292 files changed

+1167
-24540
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ install:
1212

1313
script:
1414
- export frameworkVersion=netstandard2.0
15-
- export releaseVersion="2.19.1"
15+
- export releaseVersion="2.20.0"
1616
- /bin/sh ./mono_nunit_test.sh
1717

1818
after_success:

CHANGES.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## Version 2.20.0 (2019-07-10)
4+
5+
* **Breaking change** — As of 2019-07-10 .NET Connect SDK does not support explicit `ENUM` types. Instead, the SDKs pass `ENUM` values as static `Strings`. Developer code can now choose to ignore unexpected `String` values when Square APIs return new values instead of being forced to throw runtime errors due to unexpected types. Additional information, including migration help, is available in the README.
6+
7+
* **Retired functionality** — The `CatalogItem.image_url` field (deprecated under `Square-Version` YYYYMMDD) is retired and no longer included in Connect SDKs.
8+
39
## Version 2.19.1 (2019-06-26)
410

511
* **Bug fix**: `Transaction.Charge` and `Customers.CreateCustomerCard` request objects — now include the `verification_token` required for [Strong Customer Authentication](https://developer.squareup.com/docs/sca-overview).

README.md

+31-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,36 @@ This repository contains the released C# client SDK. Check out our [API
77
specification repository](https://github.com/square/connect-api-specification)
88
for the specification and template files we used to generate this.
99

10+
## ENUM to String Migration
11+
The .NET SDK no longer treats enums as explicit types. Instead, all enums are handled as static strings. Previously, you would use an enum constant to represent the related string value. For example:
12+
```csharp
13+
CatalogObject beverages = new CatalogObject(
14+
Type: TypeEnum.CATEGORY,
15+
Id: BeverageIdStr,
16+
CategoryData: new CatalogCategory(Name: BeveragesStr)
17+
);
18+
```
19+
20+
As of version 2.20.0, you would work with the static string value directly. For example:
21+
```csharp
22+
CatalogObject beverages = new CatalogObject(
23+
Type: "CATEGORY",
24+
Id: BeverageIdStr,
25+
CategoryData: new CatalogCategory(Name: BeveragesStr)
26+
);
27+
```
28+
29+
But, as a best practice, we recommend representing enum strings as constants for easier reuse. For example:
30+
```csharp
31+
const string CatalogCategoryType ="CATEGORY";
32+
33+
CatalogObject beverages = new CatalogObject(
34+
Type: CatalogCategoryType,
35+
Id: BeverageIdStr,
36+
CategoryData: new CatalogCategory(Name: BeveragesStr)
37+
);
38+
```
39+
1040
## Frameworks supported
1141
- .NET Standard 2.0
1242

@@ -80,7 +110,7 @@ namespace Example
80110
// This amount is in cents. It's also hard-coded for $1, which is not very useful.
81111
int amount = 100;
82112
string currency = "USD";
83-
Money money = new Money(amount, Money.ToCurrencyEnum(currency));
113+
Money money = new Money(amount, currency);
84114

85115
string nonce = "YOUR_NONCE";
86116
string locationId = "YOUR_LOCATION_ID";

docs/Address.md

+1-257
Original file line numberDiff line numberDiff line change
@@ -19,268 +19,12 @@ Name | Type | Description | Notes
1919
**AdministrativeDistrictLevel2** | **string** | A civil entity within the address's `administrative_district_level_1`. In the US, this is the county. | [optional]
2020
**AdministrativeDistrictLevel3** | **string** | A civil entity within the address's `administrative_district_level_2`, if any. | [optional]
2121
**PostalCode** | **string** | The address's postal code. | [optional]
22-
**Country** | **CountryEnum** | The address's country, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values | [optional]
22+
**Country** | **string** | The address's country, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values | [optional]
2323
**FirstName** | **string** | Optional first name when it's representing recipient. | [optional]
2424
**LastName** | **string** | Optional last name when it's representing recipient. | [optional]
2525
**Organization** | **string** | Optional organization name when it's representing recipient. | [optional]
2626

2727

28-
## CountryEnum
29-
30-
Name | Value
31-
------------ | -------------
32-
**ZZ** | "ZZ"
33-
**AD** | "AD"
34-
**AE** | "AE"
35-
**AF** | "AF"
36-
**AG** | "AG"
37-
**AI** | "AI"
38-
**AL** | "AL"
39-
**AM** | "AM"
40-
**AO** | "AO"
41-
**AQ** | "AQ"
42-
**AR** | "AR"
43-
**AS** | "AS"
44-
**AT** | "AT"
45-
**AU** | "AU"
46-
**AW** | "AW"
47-
**AX** | "AX"
48-
**AZ** | "AZ"
49-
**BA** | "BA"
50-
**BB** | "BB"
51-
**BD** | "BD"
52-
**BE** | "BE"
53-
**BF** | "BF"
54-
**BG** | "BG"
55-
**BH** | "BH"
56-
**BI** | "BI"
57-
**BJ** | "BJ"
58-
**BL** | "BL"
59-
**BM** | "BM"
60-
**BN** | "BN"
61-
**BO** | "BO"
62-
**BQ** | "BQ"
63-
**BR** | "BR"
64-
**BS** | "BS"
65-
**BT** | "BT"
66-
**BV** | "BV"
67-
**BW** | "BW"
68-
**BY** | "BY"
69-
**BZ** | "BZ"
70-
**CA** | "CA"
71-
**CC** | "CC"
72-
**CD** | "CD"
73-
**CF** | "CF"
74-
**CG** | "CG"
75-
**CH** | "CH"
76-
**CI** | "CI"
77-
**CK** | "CK"
78-
**CL** | "CL"
79-
**CM** | "CM"
80-
**CN** | "CN"
81-
**CO** | "CO"
82-
**CR** | "CR"
83-
**CU** | "CU"
84-
**CV** | "CV"
85-
**CW** | "CW"
86-
**CX** | "CX"
87-
**CY** | "CY"
88-
**CZ** | "CZ"
89-
**DE** | "DE"
90-
**DJ** | "DJ"
91-
**DK** | "DK"
92-
**DM** | "DM"
93-
**DO** | "DO"
94-
**DZ** | "DZ"
95-
**EC** | "EC"
96-
**EE** | "EE"
97-
**EG** | "EG"
98-
**EH** | "EH"
99-
**ER** | "ER"
100-
**ES** | "ES"
101-
**ET** | "ET"
102-
**FI** | "FI"
103-
**FJ** | "FJ"
104-
**FK** | "FK"
105-
**FM** | "FM"
106-
**FO** | "FO"
107-
**FR** | "FR"
108-
**GA** | "GA"
109-
**GB** | "GB"
110-
**GD** | "GD"
111-
**GE** | "GE"
112-
**GF** | "GF"
113-
**GG** | "GG"
114-
**GH** | "GH"
115-
**GI** | "GI"
116-
**GL** | "GL"
117-
**GM** | "GM"
118-
**GN** | "GN"
119-
**GP** | "GP"
120-
**GQ** | "GQ"
121-
**GR** | "GR"
122-
**GS** | "GS"
123-
**GT** | "GT"
124-
**GU** | "GU"
125-
**GW** | "GW"
126-
**GY** | "GY"
127-
**HK** | "HK"
128-
**HM** | "HM"
129-
**HN** | "HN"
130-
**HR** | "HR"
131-
**HT** | "HT"
132-
**HU** | "HU"
133-
**ID** | "ID"
134-
**IE** | "IE"
135-
**IL** | "IL"
136-
**IM** | "IM"
137-
**IN** | "IN"
138-
**IO** | "IO"
139-
**IQ** | "IQ"
140-
**IR** | "IR"
141-
**IS** | "IS"
142-
**IT** | "IT"
143-
**JE** | "JE"
144-
**JM** | "JM"
145-
**JO** | "JO"
146-
**JP** | "JP"
147-
**KE** | "KE"
148-
**KG** | "KG"
149-
**KH** | "KH"
150-
**KI** | "KI"
151-
**KM** | "KM"
152-
**KN** | "KN"
153-
**KP** | "KP"
154-
**KR** | "KR"
155-
**KW** | "KW"
156-
**KY** | "KY"
157-
**KZ** | "KZ"
158-
**LA** | "LA"
159-
**LB** | "LB"
160-
**LC** | "LC"
161-
**LI** | "LI"
162-
**LK** | "LK"
163-
**LR** | "LR"
164-
**LS** | "LS"
165-
**LT** | "LT"
166-
**LU** | "LU"
167-
**LV** | "LV"
168-
**LY** | "LY"
169-
**MA** | "MA"
170-
**MC** | "MC"
171-
**MD** | "MD"
172-
**ME** | "ME"
173-
**MF** | "MF"
174-
**MG** | "MG"
175-
**MH** | "MH"
176-
**MK** | "MK"
177-
**ML** | "ML"
178-
**MM** | "MM"
179-
**MN** | "MN"
180-
**MO** | "MO"
181-
**MP** | "MP"
182-
**MQ** | "MQ"
183-
**MR** | "MR"
184-
**MS** | "MS"
185-
**MT** | "MT"
186-
**MU** | "MU"
187-
**MV** | "MV"
188-
**MW** | "MW"
189-
**MX** | "MX"
190-
**MY** | "MY"
191-
**MZ** | "MZ"
192-
**NA** | "NA"
193-
**NC** | "NC"
194-
**NE** | "NE"
195-
**NF** | "NF"
196-
**NG** | "NG"
197-
**NI** | "NI"
198-
**NL** | "NL"
199-
**NO** | "NO"
200-
**NP** | "NP"
201-
**NR** | "NR"
202-
**NU** | "NU"
203-
**NZ** | "NZ"
204-
**OM** | "OM"
205-
**PA** | "PA"
206-
**PE** | "PE"
207-
**PF** | "PF"
208-
**PG** | "PG"
209-
**PH** | "PH"
210-
**PK** | "PK"
211-
**PL** | "PL"
212-
**PM** | "PM"
213-
**PN** | "PN"
214-
**PR** | "PR"
215-
**PS** | "PS"
216-
**PT** | "PT"
217-
**PW** | "PW"
218-
**PY** | "PY"
219-
**QA** | "QA"
220-
**RE** | "RE"
221-
**RO** | "RO"
222-
**RS** | "RS"
223-
**RU** | "RU"
224-
**RW** | "RW"
225-
**SA** | "SA"
226-
**SB** | "SB"
227-
**SC** | "SC"
228-
**SD** | "SD"
229-
**SE** | "SE"
230-
**SG** | "SG"
231-
**SH** | "SH"
232-
**SI** | "SI"
233-
**SJ** | "SJ"
234-
**SK** | "SK"
235-
**SL** | "SL"
236-
**SM** | "SM"
237-
**SN** | "SN"
238-
**SO** | "SO"
239-
**SR** | "SR"
240-
**SS** | "SS"
241-
**ST** | "ST"
242-
**SV** | "SV"
243-
**SX** | "SX"
244-
**SY** | "SY"
245-
**SZ** | "SZ"
246-
**TC** | "TC"
247-
**TD** | "TD"
248-
**TF** | "TF"
249-
**TG** | "TG"
250-
**TH** | "TH"
251-
**TJ** | "TJ"
252-
**TK** | "TK"
253-
**TL** | "TL"
254-
**TM** | "TM"
255-
**TN** | "TN"
256-
**TO** | "TO"
257-
**TR** | "TR"
258-
**TT** | "TT"
259-
**TV** | "TV"
260-
**TW** | "TW"
261-
**TZ** | "TZ"
262-
**UA** | "UA"
263-
**UG** | "UG"
264-
**UM** | "UM"
265-
**US** | "US"
266-
**UY** | "UY"
267-
**UZ** | "UZ"
268-
**VA** | "VA"
269-
**VC** | "VC"
270-
**VE** | "VE"
271-
**VG** | "VG"
272-
**VI** | "VI"
273-
**VN** | "VN"
274-
**VU** | "VU"
275-
**WF** | "WF"
276-
**WS** | "WS"
277-
**YE** | "YE"
278-
**YT** | "YT"
279-
**ZA** | "ZA"
280-
**ZM** | "ZM"
281-
**ZW** | "ZW"
282-
283-
28428

28529
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28630

docs/AggregationStrategy.md

-15
This file was deleted.

docs/BatchRetrieveInventoryChangesRequest.md

+2-29
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,13 @@ Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
1111
**CatalogObjectIds** | **List<string>** | Filters results by [CatalogObject](#type-catalogobject) ID. Only applied when set. Default: unset. | [optional]
1212
**LocationIds** | **List<string>** | Filters results by [Location](#type-location) ID. Only applied when set. Default: unset. | [optional]
13-
**Types** | **List<TypesEnum>** | Filters results by [InventoryChangeType](#type-inventorychangetype). Default: [&#x60;PHYSICAL_COUNT&#x60;, &#x60;ADJUSTMENT&#x60;]. &#x60;TRANSFER&#x60; is not supported as a filter. See [InventoryChangeType](#type-inventorychangetype) for possible values | [optional]
14-
**States** | **List<StatesEnum>** | Filters &#x60;ADJUSTMENT&#x60; query results by [InventoryState](#type-inventorystate). Only applied when set. Default: unset. See [InventoryState](#type-inventorystate) for possible values | [optional]
13+
**Types** | **List<string>** | Filters results by [InventoryChangeType](#type-inventorychangetype). Default: [&#x60;PHYSICAL_COUNT&#x60;, &#x60;ADJUSTMENT&#x60;]. &#x60;TRANSFER&#x60; is not supported as a filter. See [InventoryChangeType](#type-inventorychangetype) for possible values | [optional]
14+
**States** | **List<string>** | Filters &#x60;ADJUSTMENT&#x60; query results by [InventoryState](#type-inventorystate). Only applied when set. Default: unset. See [InventoryState](#type-inventorystate) for possible values | [optional]
1515
**UpdatedAfter** | **string** | Provided as an RFC 3339 timestamp. Returns results whose &#x60;created_at&#x60; or &#x60;calculated_at&#x60; value is after the given time. Default: UNIX epoch (&#x60;1970-01-01T00:00:00Z&#x60;). | [optional]
1616
**UpdatedBefore** | **string** | Provided as an RFC 3339 timestamp. Returns results whose &#x60;created_at&#x60; or &#x60;calculated_at&#x60; value is strictly before the given time. Default: UNIX epoch (&#x60;1970-01-01T00:00:00Z&#x60;). | [optional]
1717
**Cursor** | **string** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Pagination](/basics/api101/pagination) for more information. | [optional]
1818

1919

20-
## List<TypesEnum>
21-
22-
Name | Value
23-
------------ | -------------
24-
**PHYSICALCOUNT** | "PHYSICAL_COUNT"
25-
**ADJUSTMENT** | "ADJUSTMENT"
26-
**TRANSFER** | "TRANSFER"
27-
28-
29-
## List<StatesEnum>
30-
31-
Name | Value
32-
------------ | -------------
33-
**CUSTOM** | "CUSTOM"
34-
**INSTOCK** | "IN_STOCK"
35-
**SOLD** | "SOLD"
36-
**RETURNEDBYCUSTOMER** | "RETURNED_BY_CUSTOMER"
37-
**RESERVEDFORSALE** | "RESERVED_FOR_SALE"
38-
**SOLDONLINE** | "SOLD_ONLINE"
39-
**ORDEREDFROMVENDOR** | "ORDERED_FROM_VENDOR"
40-
**RECEIVEDFROMVENDOR** | "RECEIVED_FROM_VENDOR"
41-
**INTRANSITTO** | "IN_TRANSIT_TO"
42-
**NONE** | "NONE"
43-
**WASTE** | "WASTE"
44-
**UNLINKEDRETURN** | "UNLINKED_RETURN"
45-
46-
4720

4821
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
4922

0 commit comments

Comments
 (0)