Skip to content

Commit e007ffd

Browse files
author
Francisco Rojas
authored
Release 2.2.0 (square#33)
* From connect-api-specification: Fix push-lang-sdk script to correctly look for proposed branch (square#60) * Add Checkout Test with Taxes and discount (square#34)
1 parent bfdb7f5 commit e007ffd

Some content is hidden

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

65 files changed

+1552
-318
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=net45
15-
- export releaseVersion="2.1.0"
15+
- export releaseVersion="2.2.0"
1616
- /bin/sh ./mono_nunit_test.sh
1717

1818
after_success:

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,10 @@ Class | Method | HTTP request
252252
- [Model.CreateCustomerCardResponse](docs/CreateCustomerCardResponse.md)
253253
- [Model.CreateCustomerRequest](docs/CreateCustomerRequest.md)
254254
- [Model.CreateCustomerResponse](docs/CreateCustomerResponse.md)
255+
- [Model.CreateOrderRequest](docs/CreateOrderRequest.md)
256+
- [Model.CreateOrderRequestDiscount](docs/CreateOrderRequestDiscount.md)
255257
- [Model.CreateOrderRequestLineItem](docs/CreateOrderRequestLineItem.md)
256-
- [Model.CreateOrderRequestOrder](docs/CreateOrderRequestOrder.md)
258+
- [Model.CreateOrderRequestTax](docs/CreateOrderRequestTax.md)
257259
- [Model.CreateRefundRequest](docs/CreateRefundRequest.md)
258260
- [Model.CreateRefundResponse](docs/CreateRefundResponse.md)
259261
- [Model.Customer](docs/Customer.md)
@@ -282,6 +284,8 @@ Class | Method | HTTP request
282284
- [Model.Money](docs/Money.md)
283285
- [Model.Order](docs/Order.md)
284286
- [Model.OrderLineItem](docs/OrderLineItem.md)
287+
- [Model.OrderLineItemDiscount](docs/OrderLineItemDiscount.md)
288+
- [Model.OrderLineItemTax](docs/OrderLineItemTax.md)
285289
- [Model.Refund](docs/Refund.md)
286290
- [Model.RetrieveCatalogObjectRequest](docs/RetrieveCatalogObjectRequest.md)
287291
- [Model.RetrieveCatalogObjectResponse](docs/RetrieveCatalogObjectResponse.md)
@@ -364,8 +368,8 @@ Class | Method | HTTP request
364368
- BANK_ACCOUNTS_READ: GET endpoints related to a merchant's bank accounts
365369
- ITEMS_READ: GET endpoints related to a merchant's item library
366370
- ITEMS_WRITE: POST, PUT, and DELETE endpoints related to a merchant's item library
367-
- ORDERS_READ: GET endpoints related to a merchant's Square online store.
368-
- ORDERS_WRITE: POST, PUT, and DELETE endpoints related to a merchant's Square online store
371+
- ORDERS_READ: GET endpoints related to a merchant's orders
372+
- ORDERS_WRITE: POST, PUT, and DELETE endpoints related to a merchant's orders
369373
- EMPLOYEES_READ: GET endpoints related to employee management
370374
- EMPLOYEES_WRITE: POST, PUT, and DELETE endpoints related to employee management
371375
- TIMECARDS_READ: GET endpoints related to employee timecards

docs/Card.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**ExpYear** | **long?** | The four-digit year of the card's expiration date. | [optional]
1111
**CardholderName** | **string** | The cardholder name. This value is present only if this object represents a customer's card on file. | [optional]
1212
**BillingAddress** | [**Address**](Address.md) | The card's billing address. This value is present only if this object represents a customer's card on file. | [optional]
13+
**Fingerprint** | **string** | The unique string fingerprint for the card. The fingerprint is based on the credit card number and is unique to the merchant. If a card is used at multiple locations for the same merchant, it will have the same fingerprint in each case. Note: Fingerprint may not exist on old transactions. | [optional]
1314

1415

1516
## CardBrandEnum

docs/CatalogApi.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Name | Type | Description | Notes
8888
8989
BatchRetrieveCatalogObjects
9090

91-
Returns a set of objects based on the provided ID. [CatalogItem](#type-catalogitem)s returned in the set include all of the child information including: all [CatalogItemVariation](#type-catalogitemvariation) objects, references to its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of any [CatalogTax](#type-catalogtax) objects that apply to it.
91+
Returns a set of objects based on the provided ID. Each [CatalogItem](#type-catalogitem) returned in the set includes all of its child information including: all of its [CatalogItemVariation](#type-catalogitemvariation) objects, references to its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of any [CatalogTax](#type-catalogtax) objects that apply to it.
9292

9393
### Example
9494
```csharp
@@ -433,7 +433,7 @@ namespace Example
433433

434434
var apiInstance = new CatalogApi();
435435
var objectId = objectId_example; // string | The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved.
436-
var includeRelatedObjects = true; // bool? | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. (optional)
436+
var includeRelatedObjects = true; // bool? | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` (optional)
437437
438438
try
439439
{
@@ -455,7 +455,7 @@ namespace Example
455455
Name | Type | Description | Notes
456456
------------- | ------------- | ------------- | -------------
457457
**objectId** | **string**| The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. |
458-
**includeRelatedObjects** | **bool?**| If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. | [optional]
458+
**includeRelatedObjects** | **bool?**| If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` | [optional]
459459

460460
### Return type
461461

@@ -478,7 +478,7 @@ Name | Type | Description | Notes
478478
479479
SearchCatalogObjects
480480

481-
Queries the targeted catalog using a variety of query types ([CatalogQuerySortedAttribute](#type-catalogquerysortedattribute), ([CatalogQueryExact](#type-catalogqueryexact, ([CatalogQueryRange](#type-catalogqueryrange), ([CatalogQueryText](#type-catalogquerytext), ([CatalogQueryItemsForTax](#type-catalogqueryitemsfortax), ([CatalogQueryItemsForModifierList](#type-catalogqueryitemsformodifierlist)).
481+
Queries the targeted catalog using a variety of query types ([CatalogQuerySortedAttribute](#type-catalogquerysortedattribute), ([CatalogQueryExact](#type-catalogqueryexact), ([CatalogQueryRange](#type-catalogqueryrange), ([CatalogQueryText](#type-catalogquerytext), ([CatalogQueryItemsForTax](#type-catalogqueryitemsfortax), ([CatalogQueryItemsForModifierList](#type-catalogqueryitemsformodifierlist)).
482482

483483
### Example
484484
```csharp

docs/CatalogItem.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
**Name** | **string** | The item's name. Searchable. |
77
**Description** | **string** | The item's description. Searchable. | [optional]
88
**Abbreviation** | **string** | The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. Searchable. | [optional]
9-
**LabelColor** | **string** | The color of the item's display label in the Square Point of Sale app. Searchable. | [optional]
9+
**LabelColor** | **string** | The color of the item's display label in the Square Point of Sale app. | [optional]
1010
**AvailableOnline** | **bool?** | If `true`, the item can be added to shipping orders from the merchant's online store. | [optional]
1111
**AvailableForPickup** | **bool?** | If `true`, the item can be added to pickup orders from the merchant's online store. | [optional]
1212
**AvailableElectronically** | **bool?** | If `true`, the item can be added to electronically fulfilled orders from the merchant's online store. | [optional]

docs/CatalogItemVariation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
99
**Upc** | **string** | The item variation's UPC, if any. Searchable. | [optional]
1010
**PricingType** | **PricingTypeEnum** | Indicates whether the item variation's price is fixed or determined at the time of sale. See [CatalogPricingType](#type-catalogpricingtype) for all possible values. | [optional]
1111
**PriceMoney** | [**Money**](Money.md) | The item variation's price, if fixed pricing is used. | [optional]
12-
**LocationOverrides** | [**List<ItemVariationLocationOverrides>**](ItemVariationLocationOverrides.md) | Per-location price and inventory overrides. | [optional]
12+
**LocationOverrides** | [**List<ItemVariationLocationOverrides>**](ItemVariationLocationOverrides.md) | Per-[location][#type-location] price and inventory overrides. | [optional]
1313
**TrackInventory** | **bool?** | If `true`, inventory tracking is active for the variation. | [optional]
1414
**InventoryAlertType** | **InventoryAlertTypeEnum** | Indicates whether the item variation displays an alert when its inventory quantity is less than or equal to its `inventory_alert_threshold`. See [InventoryAlertType](#type-inventoryalerttype) for all possible values. | [optional]
1515
**InventoryAlertThreshold** | **long?** | If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type` is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard. This value is always an integer. | [optional]

docs/CatalogObject.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**Type** | **TypeEnum** | The type of this object. Each object type has expected properties expressed in a structured format within its corresponding `*_data` field below. See [CatalogObjectType](#type-catalogobjecttype) for all possible values. |
7-
**Id** | **string** | A unique Square-assigned identifier to reference this object in the catalog. |
7+
**Id** | **string** | An identifier to reference this object in the catalog. When a new CatalogObject is inserted, the client should set the id to a temporary identifier starting with a `'#'` character. Other objects being inserted or updated within the same request may use this identifier to refer to the new object. When the server receives the new object, it will supply a unique identifier that replaces the temporary identifier for all future references. |
88
**UpdatedAt** | **string** | Last modification [timestamp](#workingwithdates) in RFC 3339 format, e.g., `\"2016-08-15T23:59:33.123Z\"` would indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds. | [optional]
99
**Version** | **long?** | The version of the object. When updating an object, the version supplied by the must match the version in the database, otherwise the write will be rejected as conflicting. | [optional]
10-
**IsDeleted** | **bool?** | If `true`, the object has been deleted from the database. Must be `false` for new objects being inserted. When deleted, the `updated_at` field will equal the deletion time. being inserted. When deleted, the `updated_at` field will equal the deletion time. | [optional]
11-
**CatalogV1Ids** | [**List<CatalogV1Id>**](CatalogV1Id.md) | The Connect V1 IDs for this object at each location where it is present, where they differ from the object's Connect V2 ID. The field will only be present for objects that have been created or modified by legacy APIs. | [optional]
10+
**IsDeleted** | **bool?** | If `true`, the object has been deleted from the database. Must be `false` for new objects being inserted. When deleted, the `updated_at` field will equal the deletion time. | [optional]
11+
**CatalogV1Ids** | [**List<CatalogV1Id>**](CatalogV1Id.md) | The Connect V1 IDs for this object at each [location][#type-location] where it is present, where they differ from the object's Connect V2 ID. The field will only be present for objects that have been created or modified by legacy APIs. | [optional]
1212
**PresentAtAllLocations** | **bool?** | If `true`, this object is present at all locations (including future locations), except where specified in the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations), except where specified in the `present_at_location_ids` field. | [optional]
1313
**PresentAtLocationIds** | **List<string>** | A list of locations where the object is present, even if &#x60;present_at_all_locations&#x60; is &#x60;false&#x60;. | [optional]
1414
**AbsentAtLocationIds** | **List<string>** | A list of locations where the object is not present, even if &#x60;present_at_all_locations&#x60; is &#x60;true&#x60;. | [optional]

docs/CatalogQuery.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
**ExactQuery** | [**CatalogQueryExact**](CatalogQueryExact.md) | A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive value. | [optional]
88
**PrefixQuery** | [**CatalogQueryPrefix**](CatalogQueryPrefix.md) | A query that returns only objects for which the given (string-valued) attribute has the given case-insensitive prefix. | [optional]
99
**RangeQuery** | [**CatalogQueryRange**](CatalogQueryRange.md) | A query that returns only objects for which the given (integer-valued) attribute lies in the given range. | [optional]
10-
**TextQuery** | [**CatalogQueryText**](CatalogQueryText.md) | A query that returns only objects whose searchable attributes contain all of the given keywords as prefixes. For example, if a [CatalogItem](#type-catalogitem) contains attributes &#x60;{\&quot;name\&quot;: \&quot;t-shirt\&quot;}&#x60; and &#x60;{\&quot;description\&quot;: \&quot;Small, Red\&quot;}&#x60;, it will be matched by the query &#x60;{\&quot;keywords\&quot;: [\&quot;shirt\&quot;, \&quot;sm\&quot;, \&quot;re\&quot;]}&#x60;. | [optional]
10+
**TextQuery** | [**CatalogQueryText**](CatalogQueryText.md) | A query that returns only objects whose searchable attributes contain all of the given keywords as prefixes. For example, if a [CatalogItem](#type-catalogitem) contains attributes &#x60;{\&quot;name\&quot;: \&quot;t-shirt\&quot;}&#x60; and &#x60;{\&quot;description\&quot;: \&quot;Small, Purple\&quot;}&#x60;, it will be matched by the query &#x60;{\&quot;keywords\&quot;: [\&quot;shirt\&quot;, \&quot;sma\&quot;, \&quot;purp\&quot;]}&#x60;. | [optional]
1111
**ItemsForTaxQuery** | [**CatalogQueryItemsForTax**](CatalogQueryItemsForTax.md) | A query that returns all [CatalogItem](#type-catalogitem)s that have any of the given [CatalogTax](#type-catalogtax)es enabled. | [optional]
1212
**ItemsForModifierListQuery** | [**CatalogQueryItemsForModifierList**](CatalogQueryItemsForModifierList.md) | A query that returns all [CatalogItem](#type-catalogitem)s that have any of the given [CatalogModifierList](#type-catalogmodifierlist)s enabled. | [optional]
1313

docs/CatalogTax.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
**Name** | **string** | The tax&#39;s name. Searchable. |
77
**CalculationPhase** | **CalculationPhaseEnum** | Whether the tax is calculated based on a payment&#39;s subtotal or total. See [TaxCalculationPhase](#type-taxcalculationphase) for all possible values. | [optional]
88
**InclusionType** | **InclusionTypeEnum** | Whether the tax is &#x60;ADDITIVE&#x60; or &#x60;INCLUSIVE&#x60;. See [TaxInclusionType](#type-taxinclusiontype) for all possible values. | [optional]
9-
**Percentage** | **string** | The percentage of the tax in decimal form, using a &#39;.&#39; as the decimal separator and without a &#39;%&#39; sign. A value of &#x60;7.5&#x60; corresponds to 7.5%. | [optional]
9+
**Percentage** | **string** | The percentage of the tax in decimal form, using a &#x60;&#39;.&#39;&#x60; as the decimal separator and without a &#x60;&#39;%&#39;&#x60; sign. A value of &#x60;7.5&#x60; corresponds to 7.5%. | [optional]
1010
**AppliesToCustomAmounts** | **bool?** | If &#x60;true&#x60;, the fee applies to custom amounts entered into the Square Point of Sale app that are not associated with a particular [CatalogItem](#type-catalogitem). | [optional]
1111
**Enabled** | **bool?** | If &#x60;true&#x60;, the tax will be shown as enabled in the Square Point of Sale app. | [optional]
1212

docs/CatalogV1Id.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**_CatalogV1Id** | **string** | The ID for an object in Connect V1, if different from its Connect V2 ID. | [optional]
7-
**LocationId** | **string** | The ID of the location this Connect V1 ID is associated with. | [optional]
7+
**LocationId** | **string** | The ID of the [location][#type-location] this Connect V1 ID is associated with. | [optional]
88

99

1010

docs/CreateCheckoutRequest.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**IdempotencyKey** | **string** | A unique string that identifies this checkout among others you&#39;ve created. It can be any valid string but must be unique for every order sent to Square Checkout for a given location ID. The idempotency key is used to avoid processing the same order more than once. If you&#39;re unsure whether a particular checkout was created successfully, you can reattempt it with the same idempotency key and all the same other parameters without worrying about creating duplicates. We recommend using a random number/string generator native to the language you are working in to generate strings for your idempotency keys. See [Idempotency keys](#idempotencykeys) for more information. |
7-
**Order** | [**CreateOrderRequestOrder**](CreateOrderRequestOrder.md) | The order including line items to be checked out. |
7+
**Order** | [**CreateOrderRequest**](CreateOrderRequest.md) | The order including line items to be checked out. |
88
**AskForShippingAddress** | **bool?** | If &#x60;true&#x60;, Square Checkout will collect shipping information on your behalf and store that information with the transaction information in your Square Dashboard. Default: &#x60;false&#x60;. | [optional]
99
**MerchantSupportEmail** | **string** | The email address to display on the Square Checkout confirmation page and confirmation email that the buyer can use to contact the merchant. If this value is not set, the confirmation page and email will display the primary email address associated with the merchant&#39;s Square account. Default: none; only exists if explicitly set. | [optional]
1010
**PrePopulateBuyerEmail** | **string** | If provided, the buyer&#39;s email is pre-populated on the checkout page as an editable text field. Default: none; only exists if explicitly set. | [optional]

0 commit comments

Comments
 (0)