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

Commit

Permalink
Release/2.20.0 (#123)
Browse files Browse the repository at this point in the history
* Release 2.20.0
  • Loading branch information
ssung88 committed Jul 10, 2019
1 parent efe9db3 commit 8fa8d4c
Show file tree
Hide file tree
Showing 292 changed files with 1,167 additions and 24,540 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ install:

script:
- export frameworkVersion=netstandard2.0
- export releaseVersion="2.19.1"
- export releaseVersion="2.20.0"
- /bin/sh ./mono_nunit_test.sh

after_success:
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## Version 2.20.0 (2019-07-10)

* **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.

* **Retired functionality** — The `CatalogItem.image_url` field (deprecated under `Square-Version` YYYYMMDD) is retired and no longer included in Connect SDKs.

## Version 2.19.1 (2019-06-26)

* **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).
Expand Down
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,36 @@ This repository contains the released C# client SDK. Check out our [API
specification repository](https://github.com/square/connect-api-specification)
for the specification and template files we used to generate this.

## ENUM to String Migration
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:
```csharp
CatalogObject beverages = new CatalogObject(
Type: TypeEnum.CATEGORY,
Id: BeverageIdStr,
CategoryData: new CatalogCategory(Name: BeveragesStr)
);
```

As of version 2.20.0, you would work with the static string value directly. For example:
```csharp
CatalogObject beverages = new CatalogObject(
Type: "CATEGORY",
Id: BeverageIdStr,
CategoryData: new CatalogCategory(Name: BeveragesStr)
);
```

But, as a best practice, we recommend representing enum strings as constants for easier reuse. For example:
```csharp
const string CatalogCategoryType ="CATEGORY";

CatalogObject beverages = new CatalogObject(
Type: CatalogCategoryType,
Id: BeverageIdStr,
CategoryData: new CatalogCategory(Name: BeveragesStr)
);
```

## Frameworks supported
- .NET Standard 2.0

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

string nonce = "YOUR_NONCE";
string locationId = "YOUR_LOCATION_ID";
Expand Down
258 changes: 1 addition & 257 deletions docs/Address.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,268 +19,12 @@ Name | Type | Description | Notes
**AdministrativeDistrictLevel2** | **string** | A civil entity within the address's `administrative_district_level_1`. In the US, this is the county. | [optional]
**AdministrativeDistrictLevel3** | **string** | A civil entity within the address's `administrative_district_level_2`, if any. | [optional]
**PostalCode** | **string** | The address's postal code. | [optional]
**Country** | **CountryEnum** | The address's country, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values | [optional]
**Country** | **string** | The address's country, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values | [optional]
**FirstName** | **string** | Optional first name when it's representing recipient. | [optional]
**LastName** | **string** | Optional last name when it's representing recipient. | [optional]
**Organization** | **string** | Optional organization name when it's representing recipient. | [optional]


## CountryEnum

Name | Value
------------ | -------------
**ZZ** | "ZZ"
**AD** | "AD"
**AE** | "AE"
**AF** | "AF"
**AG** | "AG"
**AI** | "AI"
**AL** | "AL"
**AM** | "AM"
**AO** | "AO"
**AQ** | "AQ"
**AR** | "AR"
**AS** | "AS"
**AT** | "AT"
**AU** | "AU"
**AW** | "AW"
**AX** | "AX"
**AZ** | "AZ"
**BA** | "BA"
**BB** | "BB"
**BD** | "BD"
**BE** | "BE"
**BF** | "BF"
**BG** | "BG"
**BH** | "BH"
**BI** | "BI"
**BJ** | "BJ"
**BL** | "BL"
**BM** | "BM"
**BN** | "BN"
**BO** | "BO"
**BQ** | "BQ"
**BR** | "BR"
**BS** | "BS"
**BT** | "BT"
**BV** | "BV"
**BW** | "BW"
**BY** | "BY"
**BZ** | "BZ"
**CA** | "CA"
**CC** | "CC"
**CD** | "CD"
**CF** | "CF"
**CG** | "CG"
**CH** | "CH"
**CI** | "CI"
**CK** | "CK"
**CL** | "CL"
**CM** | "CM"
**CN** | "CN"
**CO** | "CO"
**CR** | "CR"
**CU** | "CU"
**CV** | "CV"
**CW** | "CW"
**CX** | "CX"
**CY** | "CY"
**CZ** | "CZ"
**DE** | "DE"
**DJ** | "DJ"
**DK** | "DK"
**DM** | "DM"
**DO** | "DO"
**DZ** | "DZ"
**EC** | "EC"
**EE** | "EE"
**EG** | "EG"
**EH** | "EH"
**ER** | "ER"
**ES** | "ES"
**ET** | "ET"
**FI** | "FI"
**FJ** | "FJ"
**FK** | "FK"
**FM** | "FM"
**FO** | "FO"
**FR** | "FR"
**GA** | "GA"
**GB** | "GB"
**GD** | "GD"
**GE** | "GE"
**GF** | "GF"
**GG** | "GG"
**GH** | "GH"
**GI** | "GI"
**GL** | "GL"
**GM** | "GM"
**GN** | "GN"
**GP** | "GP"
**GQ** | "GQ"
**GR** | "GR"
**GS** | "GS"
**GT** | "GT"
**GU** | "GU"
**GW** | "GW"
**GY** | "GY"
**HK** | "HK"
**HM** | "HM"
**HN** | "HN"
**HR** | "HR"
**HT** | "HT"
**HU** | "HU"
**ID** | "ID"
**IE** | "IE"
**IL** | "IL"
**IM** | "IM"
**IN** | "IN"
**IO** | "IO"
**IQ** | "IQ"
**IR** | "IR"
**IS** | "IS"
**IT** | "IT"
**JE** | "JE"
**JM** | "JM"
**JO** | "JO"
**JP** | "JP"
**KE** | "KE"
**KG** | "KG"
**KH** | "KH"
**KI** | "KI"
**KM** | "KM"
**KN** | "KN"
**KP** | "KP"
**KR** | "KR"
**KW** | "KW"
**KY** | "KY"
**KZ** | "KZ"
**LA** | "LA"
**LB** | "LB"
**LC** | "LC"
**LI** | "LI"
**LK** | "LK"
**LR** | "LR"
**LS** | "LS"
**LT** | "LT"
**LU** | "LU"
**LV** | "LV"
**LY** | "LY"
**MA** | "MA"
**MC** | "MC"
**MD** | "MD"
**ME** | "ME"
**MF** | "MF"
**MG** | "MG"
**MH** | "MH"
**MK** | "MK"
**ML** | "ML"
**MM** | "MM"
**MN** | "MN"
**MO** | "MO"
**MP** | "MP"
**MQ** | "MQ"
**MR** | "MR"
**MS** | "MS"
**MT** | "MT"
**MU** | "MU"
**MV** | "MV"
**MW** | "MW"
**MX** | "MX"
**MY** | "MY"
**MZ** | "MZ"
**NA** | "NA"
**NC** | "NC"
**NE** | "NE"
**NF** | "NF"
**NG** | "NG"
**NI** | "NI"
**NL** | "NL"
**NO** | "NO"
**NP** | "NP"
**NR** | "NR"
**NU** | "NU"
**NZ** | "NZ"
**OM** | "OM"
**PA** | "PA"
**PE** | "PE"
**PF** | "PF"
**PG** | "PG"
**PH** | "PH"
**PK** | "PK"
**PL** | "PL"
**PM** | "PM"
**PN** | "PN"
**PR** | "PR"
**PS** | "PS"
**PT** | "PT"
**PW** | "PW"
**PY** | "PY"
**QA** | "QA"
**RE** | "RE"
**RO** | "RO"
**RS** | "RS"
**RU** | "RU"
**RW** | "RW"
**SA** | "SA"
**SB** | "SB"
**SC** | "SC"
**SD** | "SD"
**SE** | "SE"
**SG** | "SG"
**SH** | "SH"
**SI** | "SI"
**SJ** | "SJ"
**SK** | "SK"
**SL** | "SL"
**SM** | "SM"
**SN** | "SN"
**SO** | "SO"
**SR** | "SR"
**SS** | "SS"
**ST** | "ST"
**SV** | "SV"
**SX** | "SX"
**SY** | "SY"
**SZ** | "SZ"
**TC** | "TC"
**TD** | "TD"
**TF** | "TF"
**TG** | "TG"
**TH** | "TH"
**TJ** | "TJ"
**TK** | "TK"
**TL** | "TL"
**TM** | "TM"
**TN** | "TN"
**TO** | "TO"
**TR** | "TR"
**TT** | "TT"
**TV** | "TV"
**TW** | "TW"
**TZ** | "TZ"
**UA** | "UA"
**UG** | "UG"
**UM** | "UM"
**US** | "US"
**UY** | "UY"
**UZ** | "UZ"
**VA** | "VA"
**VC** | "VC"
**VE** | "VE"
**VG** | "VG"
**VI** | "VI"
**VN** | "VN"
**VU** | "VU"
**WF** | "WF"
**WS** | "WS"
**YE** | "YE"
**YT** | "YT"
**ZA** | "ZA"
**ZM** | "ZM"
**ZW** | "ZW"



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

15 changes: 0 additions & 15 deletions docs/AggregationStrategy.md

This file was deleted.

31 changes: 2 additions & 29 deletions docs/BatchRetrieveInventoryChangesRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,13 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CatalogObjectIds** | **List<string>** | Filters results by [CatalogObject](#type-catalogobject) ID. Only applied when set. Default: unset. | [optional]
**LocationIds** | **List<string>** | Filters results by [Location](#type-location) ID. Only applied when set. Default: unset. | [optional]
**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]
**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]
**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]
**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]
**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]
**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]
**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]


## List<TypesEnum>

Name | Value
------------ | -------------
**PHYSICALCOUNT** | "PHYSICAL_COUNT"
**ADJUSTMENT** | "ADJUSTMENT"
**TRANSFER** | "TRANSFER"


## List<StatesEnum>

Name | Value
------------ | -------------
**CUSTOM** | "CUSTOM"
**INSTOCK** | "IN_STOCK"
**SOLD** | "SOLD"
**RETURNEDBYCUSTOMER** | "RETURNED_BY_CUSTOMER"
**RESERVEDFORSALE** | "RESERVED_FOR_SALE"
**SOLDONLINE** | "SOLD_ONLINE"
**ORDEREDFROMVENDOR** | "ORDERED_FROM_VENDOR"
**RECEIVEDFROMVENDOR** | "RECEIVED_FROM_VENDOR"
**INTRANSITTO** | "IN_TRANSIT_TO"
**NONE** | "NONE"
**WASTE** | "WASTE"
**UNLINKEDRETURN** | "UNLINKED_RETURN"



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

Loading

0 comments on commit 8fa8d4c

Please sign in to comment.