From 30f18174b92ade1fffa2b10b2e6d8322d5bce103 Mon Sep 17 00:00:00 2001 From: Shao-Fu Sung <20245766+shaofu88@users.noreply.github.com> Date: Wed, 13 Feb 2019 10:02:54 -0800 Subject: [PATCH] Release 2.14.0 (#103) --- .travis.yml | 2 +- CHANGES.md | 21 + README.md | 3 + docs/CatalogCategory.md | 2 +- docs/CatalogDiscount.md | 4 +- docs/CatalogItem.md | 8 +- docs/CatalogItemVariation.md | 4 +- docs/CatalogModifier.md | 2 +- docs/CatalogModifierList.md | 2 +- docs/CatalogObject.md | 2 +- docs/CatalogTax.md | 2 +- docs/CheckoutApi.md | 2 +- docs/CreateOrderRequest.md | 9 +- docs/Error.md | 1 + docs/Order.md | 5 +- docs/OrderFulfillment.md | 32 ++ docs/OrderFulfillmentPickupDetails.md | 34 ++ ...derFulfillmentPickupDetailsScheduleType.md | 10 + docs/OrderFulfillmentRecipient.md | 14 + docs/OrderFulfillmentState.md | 10 + docs/OrderFulfillmentType.md | 10 + docs/OrderLineItem.md | 4 +- docs/OrderLineItemDiscount.md | 2 +- docs/OrderLineItemTax.md | 10 + docs/OrderLineItemTaxScope.md | 10 + docs/V1Timecard.md | 2 +- .../Api/CheckoutApiTests.cs | 2 +- ...lfillmentPickupDetailsScheduleTypeTests.cs | 70 ++++ .../OrderFulfillmentPickupDetailsTests.cs | 198 +++++++++ .../Model/OrderFulfillmentRecipientTests.cs | 102 +++++ .../Model/OrderFulfillmentStateTests.cs | 70 ++++ .../Model/OrderFulfillmentTests.cs | 94 +++++ .../Model/OrderFulfillmentTypeTests.cs | 70 ++++ .../Model/OrderLineItemTaxScopeTests.cs | 70 ++++ src/Square.Connect/Api/ApplePayApi.cs | 2 +- src/Square.Connect/Api/CatalogApi.cs | 22 +- src/Square.Connect/Api/CheckoutApi.cs | 18 +- src/Square.Connect/Api/CustomersApi.cs | 16 +- src/Square.Connect/Api/InventoryApi.cs | 14 +- src/Square.Connect/Api/LocationsApi.cs | 2 +- .../Api/MobileAuthorizationApi.cs | 2 +- src/Square.Connect/Api/OAuthApi.cs | 6 +- src/Square.Connect/Api/OrdersApi.cs | 4 +- src/Square.Connect/Api/ReportingApi.cs | 4 +- src/Square.Connect/Api/TransactionsApi.cs | 14 +- src/Square.Connect/Client/Configuration.cs | 6 +- src/Square.Connect/Model/CardBrand.cs | 4 +- src/Square.Connect/Model/CatalogCategory.cs | 6 +- src/Square.Connect/Model/CatalogDiscount.cs | 12 +- src/Square.Connect/Model/CatalogItem.cs | 24 +- .../Model/CatalogItemVariation.cs | 12 +- src/Square.Connect/Model/CatalogModifier.cs | 6 +- .../Model/CatalogModifierList.cs | 6 +- src/Square.Connect/Model/CatalogObject.cs | 6 +- src/Square.Connect/Model/CatalogObjectType.cs | 4 +- src/Square.Connect/Model/CatalogTax.cs | 6 +- .../Model/CreateOrderRequest.cs | 57 +-- .../Model/CreateOrderRequestDiscount.cs | 2 +- .../Model/CreateOrderRequestLineItem.cs | 2 +- .../Model/CreateOrderRequestModifier.cs | 2 +- .../Model/CreateOrderRequestTax.cs | 2 +- src/Square.Connect/Model/Error.cs | 6 + src/Square.Connect/Model/ErrorCode.cs | 6 + src/Square.Connect/Model/Order.cs | 66 ++- src/Square.Connect/Model/OrderFulfillment.cs | 214 ++++++++++ .../Model/OrderFulfillmentPickupDetails.cs | 395 ++++++++++++++++++ ...derFulfillmentPickupDetailsScheduleType.cs | 47 +++ .../Model/OrderFulfillmentRecipient.cs | 188 +++++++++ .../Model/OrderFulfillmentState.cs | 71 ++++ .../Model/OrderFulfillmentType.cs | 41 ++ src/Square.Connect/Model/OrderLineItem.cs | 12 +- .../Model/OrderLineItemDiscount.cs | 10 +- src/Square.Connect/Model/OrderLineItemTax.cs | 45 +- .../Model/OrderLineItemTaxScope.cs | 53 +++ src/Square.Connect/Model/V1Timecard.cs | 6 +- src/Square.Connect/Properties/AssemblyInfo.cs | 6 +- src/Square.Connect/Square.Connect.nuspec | 2 +- 77 files changed, 2126 insertions(+), 186 deletions(-) create mode 100644 docs/OrderFulfillment.md create mode 100644 docs/OrderFulfillmentPickupDetails.md create mode 100644 docs/OrderFulfillmentPickupDetailsScheduleType.md create mode 100644 docs/OrderFulfillmentRecipient.md create mode 100644 docs/OrderFulfillmentState.md create mode 100644 docs/OrderFulfillmentType.md create mode 100644 docs/OrderLineItemTaxScope.md create mode 100644 src/Square.Connect.Test/Model/OrderFulfillmentPickupDetailsScheduleTypeTests.cs create mode 100644 src/Square.Connect.Test/Model/OrderFulfillmentPickupDetailsTests.cs create mode 100644 src/Square.Connect.Test/Model/OrderFulfillmentRecipientTests.cs create mode 100644 src/Square.Connect.Test/Model/OrderFulfillmentStateTests.cs create mode 100644 src/Square.Connect.Test/Model/OrderFulfillmentTests.cs create mode 100644 src/Square.Connect.Test/Model/OrderFulfillmentTypeTests.cs create mode 100644 src/Square.Connect.Test/Model/OrderLineItemTaxScopeTests.cs create mode 100644 src/Square.Connect/Model/OrderFulfillment.cs create mode 100644 src/Square.Connect/Model/OrderFulfillmentPickupDetails.cs create mode 100644 src/Square.Connect/Model/OrderFulfillmentPickupDetailsScheduleType.cs create mode 100644 src/Square.Connect/Model/OrderFulfillmentRecipient.cs create mode 100644 src/Square.Connect/Model/OrderFulfillmentState.cs create mode 100644 src/Square.Connect/Model/OrderFulfillmentType.cs create mode 100644 src/Square.Connect/Model/OrderLineItemTaxScope.cs diff --git a/.travis.yml b/.travis.yml index eeb901f..662aa56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ install: script: - export frameworkVersion=netstandard2.0 - - export releaseVersion="2.13.0" + - export releaseVersion="2.14.0" - /bin/sh ./mono_nunit_test.sh after_success: diff --git a/CHANGES.md b/CHANGES.md index a8eef27..03dc617 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,26 @@ # Change Log +## Version 2.14.0 (2019-02-13) + +## New feature: Order fulfillment BETA + +The Orders API now includes beta +functionality that supports in-person fulfillment through Square Point of Sale +for orders placed online. + +## Improvement: New CreateOrder request structure + +The `CreateOrderRequest` datatype now groups order details under a single +object. + + +## Improvement: CreateOrder requests preserve order-level price adjustment objects + +The `CreateOrderResponse` datatype now retains structure of order-level +price adjustments in addition to converting them to scoped, line-item price +adjustments. Previously, `CreateOrderResponse` did not preserve the original +order-level price-adjustment objects. + ## Version 2.13.0 (2018-12-12) ## Improvement: ListCustomers return set expanded diff --git a/README.md b/README.md index 2cc6c44..f7d0520 100644 --- a/README.md +++ b/README.md @@ -321,6 +321,9 @@ Class | Method | HTTP request - [Model.ObtainTokenRequest](docs/ObtainTokenRequest.md) - [Model.ObtainTokenResponse](docs/ObtainTokenResponse.md) - [Model.Order](docs/Order.md) + - [Model.OrderFulfillment](docs/OrderFulfillment.md) + - [Model.OrderFulfillmentPickupDetails](docs/OrderFulfillmentPickupDetails.md) + - [Model.OrderFulfillmentRecipient](docs/OrderFulfillmentRecipient.md) - [Model.OrderLineItem](docs/OrderLineItem.md) - [Model.OrderLineItemDiscount](docs/OrderLineItemDiscount.md) - [Model.OrderLineItemModifier](docs/OrderLineItemModifier.md) diff --git a/docs/CatalogCategory.md b/docs/CatalogCategory.md index 4a096e9..9fcf56e 100644 --- a/docs/CatalogCategory.md +++ b/docs/CatalogCategory.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The category's name. Searchable. | [optional] +**Name** | **string** | The category's name. Searchable. This field has max length of 255 Unicode code points. | [optional] diff --git a/docs/CatalogDiscount.md b/docs/CatalogDiscount.md index 3962fe1..8b7fe43 100644 --- a/docs/CatalogDiscount.md +++ b/docs/CatalogDiscount.md @@ -3,12 +3,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The discount's name. Searchable. | [optional] +**Name** | **string** | The discount's name. Searchable. This field has max length of 255 Unicode code points. | [optional] **DiscountType** | **DiscountTypeEnum** | Indicates whether the discount is a fixed amount or percentage, or entered at the time of sale. See [CatalogDiscountType](#type-catalogdiscounttype) for all possible values. | [optional] **Percentage** | **string** | The percentage of the discount as a string representation of a decimal number, using a `.` as the decimal separator and without a `%` sign. A value of `7.5` corresponds to `7.5%`. Specify a percentage of `0` if `discount_type` is `VARIABLE_PERCENTAGE`. Do not include this field for amount-based or variable discounts. | [optional] **AmountMoney** | [**Money**](Money.md) | The amount of the discount. Specify an amount of `0` if `discount_type` is `VARIABLE_AMOUNT`. Do not include this field for percentage-based or variable discounts. | [optional] **PinRequired** | **bool?** | Indicates whether a mobile staff member needs to enter their PIN to apply the discount to a payment in the Square Point of Sale app. | [optional] -**LabelColor** | **string** | The color of the discount's display label in the Square Point of Sale app. | [optional] +**LabelColor** | **string** | The color of the discount's display label in the Square Point of Sale app. This must be a valid hex color code. | [optional] ## DiscountTypeEnum diff --git a/docs/CatalogItem.md b/docs/CatalogItem.md index 8fa577d..b0c6787 100644 --- a/docs/CatalogItem.md +++ b/docs/CatalogItem.md @@ -3,10 +3,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The item's name. Searchable. | [optional] -**Description** | **string** | The item's description. Searchable. | [optional] -**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] -**LabelColor** | **string** | The color of the item's display label in the Square Point of Sale app. | [optional] +**Name** | **string** | The item's name. Searchable. This field must not be empty. This field has max length of 512 Unicode code points. | [optional] +**Description** | **string** | The item's description. Searchable. This field has max length of 4096 Unicode code points. | [optional] +**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. This field has max length of 24 Unicode code points. | [optional] +**LabelColor** | **string** | The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code. | [optional] **AvailableOnline** | **bool?** | If `true`, the item can be added to shipping orders from the merchant's online store. | [optional] **AvailableForPickup** | **bool?** | If `true`, the item can be added to pickup orders from the merchant's online store. | [optional] **AvailableElectronically** | **bool?** | If `true`, the item can be added to electronically fulfilled orders from the merchant's online store. | [optional] diff --git a/docs/CatalogItemVariation.md b/docs/CatalogItemVariation.md index 7b82336..79007f8 100644 --- a/docs/CatalogItemVariation.md +++ b/docs/CatalogItemVariation.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ItemId** | **string** | The ID of the [CatalogItem](#type-catalogitem) associated with this item variation. Searchable. | [optional] -**Name** | **string** | The item variation's name. Searchable. | [optional] +**Name** | **string** | The item variation's name. Searchable. This field has max length of 255 Unicode code points. | [optional] **Sku** | **string** | The item variation's SKU, if any. Searchable. | [optional] **Upc** | **string** | The item variation's UPC, if any. Searchable in the Connect API. This field is only exposed in the Connect API. It is not exposed in Square's Dashboard, Square Point of Sale app or Retail Point of Sale app. | [optional] **Ordinal** | **int?** | The order in which this item variation should be displayed. This value is read-only. On writes, the ordinal for each item variation within a parent [CatalogItem](#type-catalogitem) is set according to the item variations's position. On reads, the value is not guaranteed to be sequential or unique. | [optional] @@ -14,7 +14,7 @@ Name | Type | Description | Notes **TrackInventory** | **bool?** | If `true`, inventory tracking is active for the variation. | [optional] **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] **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] -**UserData** | **string** | Arbitrary user metadata to associate with the item variation. Cannot exceed 255 characters. Searchable. | [optional] +**UserData** | **string** | Arbitrary user metadata to associate with the item variation. Searchable. This field has max length of 255 Unicode code points. | [optional] **ServiceDuration** | **long?** | If the [CatalogItem](#type-catalogitem) that owns this item variation is of type `APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For example, a 30 minute appointment would have the value `1800000`, which is equal to 30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second). | [optional] diff --git a/docs/CatalogModifier.md b/docs/CatalogModifier.md index 159871d..4303b8b 100644 --- a/docs/CatalogModifier.md +++ b/docs/CatalogModifier.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The modifier's name. Searchable. | [optional] +**Name** | **string** | The modifier's name. Searchable. This field has max length of 255 Unicode code points. | [optional] **PriceMoney** | [**Money**](Money.md) | The modifier's price. | [optional] diff --git a/docs/CatalogModifierList.md b/docs/CatalogModifierList.md index d849870..5215eaf 100644 --- a/docs/CatalogModifierList.md +++ b/docs/CatalogModifierList.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The [CatalogModifierList](#type-catalogmodifierlist)'s name. Searchable. | [optional] +**Name** | **string** | The [CatalogModifierList](#type-catalogmodifierlist)'s name. Searchable. This field has max length of 255 Unicode code points. | [optional] **SelectionType** | **SelectionTypeEnum** | Indicates whether multiple options from the [CatalogModifierList](#type-catalogmodifierlist) can be applied to a single [CatalogItem](#type-catalogitem). See [CatalogModifierListSelectionType](#type-catalogmodifierlistselectiontype) for all possible values. | [optional] **Modifiers** | [**List<CatalogObject>**](CatalogObject.md) | The options included in the [CatalogModifierList](#type-catalogmodifierlist). You must include at least one [CatalogModifier](#type-catalogmodifier). Each [CatalogObject](#type-catalogobject) must have type `MODIFIER` and contain [CatalogModifier](#type-catalogmodifier) data. | [optional] diff --git a/docs/CatalogObject.md b/docs/CatalogObject.md index d28e187..98a8f99 100644 --- a/docs/CatalogObject.md +++ b/docs/CatalogObject.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **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. | **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. | **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] -**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] +**Version** | **long?** | The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting. | [optional] **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] **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] **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. If not specified, defaults to `true`. | [optional] diff --git a/docs/CatalogTax.md b/docs/CatalogTax.md index 9fda3f9..6855921 100644 --- a/docs/CatalogTax.md +++ b/docs/CatalogTax.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The tax's name. Searchable. | [optional] +**Name** | **string** | The tax's name. Searchable. This field has max length of 255 Unicode code points. | [optional] **CalculationPhase** | **CalculationPhaseEnum** | Whether the tax is calculated based on a payment's subtotal or total. See [TaxCalculationPhase](#type-taxcalculationphase) for all possible values. | [optional] **InclusionType** | **InclusionTypeEnum** | Whether the tax is `ADDITIVE` or `INCLUSIVE`. See [TaxInclusionType](#type-taxinclusiontype) for all possible values. | [optional] **Percentage** | **string** | The percentage of the tax in decimal form, using a `'.'` as the decimal separator and without a `'%'` sign. A value of `7.5` corresponds to 7.5%. | [optional] diff --git a/docs/CheckoutApi.md b/docs/CheckoutApi.md index 37536a6..32e9913 100644 --- a/docs/CheckoutApi.md +++ b/docs/CheckoutApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description CreateCheckout -Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `checkout_page_url` that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. +Links a `checkoutId` to a `checkout_page_url` that customers will be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. ### Example ```csharp diff --git a/docs/CreateOrderRequest.md b/docs/CreateOrderRequest.md index e94adf6..7e43d74 100644 --- a/docs/CreateOrderRequest.md +++ b/docs/CreateOrderRequest.md @@ -3,11 +3,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Order** | [**Order**](Order.md) | The order to create. If this field is set, then the only other top-level field that can be set is the idempotency_key. | [optional] **IdempotencyKey** | **string** | A value you specify that uniquely identifies this order among orders you've created. If you're unsure whether a particular order was created successfully, you can reattempt it with the same idempotency key without worrying about creating duplicate orders. See [Idempotency keys](#idempotencykeys) for more information. | [optional] -**ReferenceId** | **string** | An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. | [optional] -**LineItems** | [**List<CreateOrderRequestLineItem>**](CreateOrderRequestLineItem.md) | The line items to associate with this order. Each line item represents a different product to include in a purchase. | -**Taxes** | [**List<CreateOrderRequestTax>**](CreateOrderRequestTax.md) | The taxes to include on the order. | [optional] -**Discounts** | [**List<CreateOrderRequestDiscount>**](CreateOrderRequestDiscount.md) | The discounts to include on the order. | [optional] +**ReferenceId** | **string** | __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. | [optional] +**LineItems** | [**List<CreateOrderRequestLineItem>**](CreateOrderRequestLineItem.md) | __Deprecated__: Please set the line_items on the nested [order](#type-order) field instead. The line items to associate with this order. Each line item represents a different product to include in a purchase. | [optional] +**Taxes** | [**List<CreateOrderRequestTax>**](CreateOrderRequestTax.md) | __Deprecated__: Please set the taxes on the nested [order](#type-order) field instead. The taxes to include on the order. | [optional] +**Discounts** | [**List<CreateOrderRequestDiscount>**](CreateOrderRequestDiscount.md) | __Deprecated__: Please set the discounts on the nested [order](#type-order) field instead. The discounts to include on the order. | [optional] diff --git a/docs/Error.md b/docs/Error.md index 5d7847c..cead983 100644 --- a/docs/Error.md +++ b/docs/Error.md @@ -105,6 +105,7 @@ Name | Value **NOTFOUND** | "NOT_FOUND" **APPLEPAYMENTPROCESSINGCERTIFICATEHASHNOTFOUND** | "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND" **METHODNOTALLOWED** | "METHOD_NOT_ALLOWED" +**NOTACCEPTABLE** | "NOT_ACCEPTABLE" **REQUESTTIMEOUT** | "REQUEST_TIMEOUT" **CONFLICT** | "CONFLICT" **REQUESTENTITYTOOLARGE** | "REQUEST_ENTITY_TOO_LARGE" diff --git a/docs/Order.md b/docs/Order.md index c2e91ff..7eaf577 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -6,7 +6,10 @@ Name | Type | Description | Notes **Id** | **string** | The order's unique ID. This value is only present for Order objects created by the Orders API through the [CreateOrder](#endpoint-createorder) endpoint. | [optional] **LocationId** | **string** | The ID of the merchant location this order is associated with. | **ReferenceId** | **string** | A client specified identifier to associate an entity in another system with this order. | [optional] -**LineItems** | [**List<OrderLineItem>**](OrderLineItem.md) | The line items included in the order. Every order has at least one line item. | +**LineItems** | [**List<OrderLineItem>**](OrderLineItem.md) | The line items included in the order. | [optional] +**Taxes** | [**List<OrderLineItemTax>**](OrderLineItemTax.md) | A list of taxes applied to this order. On read or retrieve, this list includes both order-level and item-level taxes. When creating an Order, set your order-level taxes in this list. | [optional] +**Discounts** | [**List<OrderLineItemDiscount>**](OrderLineItemDiscount.md) | A list of discounts applied to this order. On read or retrieve, this list includes both order-level and item-level discounts. When creating an Order, set your order-level discounts in this list. | [optional] +**Fulfillments** | [**List<OrderFulfillment>**](OrderFulfillment.md) | Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments. | [optional] **TotalMoney** | [**Money**](Money.md) | The total amount of money to collect for the order. | [optional] **TotalTaxMoney** | [**Money**](Money.md) | The total tax amount of money to collect for the order. | [optional] **TotalDiscountMoney** | [**Money**](Money.md) | The total discount amount of money to collect for the order. | [optional] diff --git a/docs/OrderFulfillment.md b/docs/OrderFulfillment.md new file mode 100644 index 0000000..3ae9846 --- /dev/null +++ b/docs/OrderFulfillment.md @@ -0,0 +1,32 @@ +# Square.Connect.Model.OrderFulfillment +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **TypeEnum** | The type of the fulfillment. | [optional] +**State** | **StateEnum** | The state of the fulfillment. | [optional] +**PickupDetails** | [**OrderFulfillmentPickupDetails**](OrderFulfillmentPickupDetails.md) | Contains pickup-specific details. Required when fulfillment type is `PICKUP`. | [optional] + + +## TypeEnum + +Name | Value +------------ | ------------- +**PICKUP** | "PICKUP" + + +## StateEnum + +Name | Value +------------ | ------------- +**PROPOSED** | "PROPOSED" +**RESERVED** | "RESERVED" +**PREPARED** | "PREPARED" +**COMPLETED** | "COMPLETED" +**CANCELED** | "CANCELED" +**FAILED** | "FAILED" + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/OrderFulfillmentPickupDetails.md b/docs/OrderFulfillmentPickupDetails.md new file mode 100644 index 0000000..e6b128f --- /dev/null +++ b/docs/OrderFulfillmentPickupDetails.md @@ -0,0 +1,34 @@ +# Square.Connect.Model.OrderFulfillmentPickupDetails +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipient** | [**OrderFulfillmentRecipient**](OrderFulfillmentRecipient.md) | The recipient of this pickup fulfillment. | [optional] +**ExpiresAt** | **string** | The expiry [timestamp](#workingwithdates) in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This timestamp indicates when the pickup fulfillment will expire if it is not accepted by the merchant. Expiration time can only be set up to 7 days in the future. If not set, this pickup fulfillment will be automatically accepted when placed. | [optional] +**AutoCompleteDuration** | **string** | The auto completion duration in RFC3339 duration format, e.g., \"P1W3D\". If set, an open and accepted pickup fulfillment will automatically move to the `COMPLETED` state after this period of time. If not set, this pickup fulfillment will remain accepted until it is canceled or completed. | [optional] +**ScheduleType** | **ScheduleTypeEnum** | The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`. | [optional] +**PickupAt** | **string** | The pickup [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". For fulfillments with the schedule type `ASAP`, this is automatically set to the current time plus the expected duration to prepare the fulfillment. This represents the start of the pickup window. | [optional] +**PickupWindowDuration** | **string** | The pickup window duration in RFC3339 duration format, e.g., \"P1W3D\". This duration represents the window of time for which the order should be picked up after the `pickup_at` time. Can be used as an informational guideline for merchants. | [optional] +**PrepTimeDuration** | **string** | The preparation time duration in RFC3339 duration format, e.g., \"P1W3D\". This duration indicates how long it takes the merchant to prepare this fulfillment. | [optional] +**Note** | **string** | A general note about the pickup fulfillment. Notes are useful for providing additional instructions and are displayed in Square apps. | [optional] +**PlacedAt** | **string** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was placed. | [optional] +**AcceptedAt** | **string** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was accepted by the merchant. | [optional] +**RejectedAt** | **string** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was rejected. | [optional] +**ReadyAt** | **string** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the merchant set the fulfillment as ready for pickup. | [optional] +**ExpiredAt** | **string** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment expired. | [optional] +**PickedUpAt** | **string** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was picked up by the recipient. | [optional] +**CanceledAt** | **string** | The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was canceled by the merchant or buyer. | [optional] +**CancelReason** | **string** | A description of why the pickup was canceled. Max length is 100 characters. | [optional] + + +## ScheduleTypeEnum + +Name | Value +------------ | ------------- +**SCHEDULED** | "SCHEDULED" +**ASAP** | "ASAP" + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/OrderFulfillmentPickupDetailsScheduleType.md b/docs/OrderFulfillmentPickupDetailsScheduleType.md new file mode 100644 index 0000000..e45a7cf --- /dev/null +++ b/docs/OrderFulfillmentPickupDetailsScheduleType.md @@ -0,0 +1,10 @@ +# Square.Connect.Model.OrderFulfillmentPickupDetailsScheduleType +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/OrderFulfillmentRecipient.md b/docs/OrderFulfillmentRecipient.md new file mode 100644 index 0000000..5d9d19f --- /dev/null +++ b/docs/OrderFulfillmentRecipient.md @@ -0,0 +1,14 @@ +# Square.Connect.Model.OrderFulfillmentRecipient +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerId** | **string** | The Customer ID of the customer associated with the fulfillment. If customer_id is provided, the corresponding recipient information fields (`display_name`, `email_address`, and `phone_number`) are automatically populated from the relevant customer profile. If the targeted profile information does not contain the necessary required information, the request will result in an error. | [optional] +**DisplayName** | **string** | The display name of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id. | [optional] +**EmailAddress** | **string** | The email address of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id. | [optional] +**PhoneNumber** | **string** | The phone number of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id. | [optional] + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/OrderFulfillmentState.md b/docs/OrderFulfillmentState.md new file mode 100644 index 0000000..5d434d1 --- /dev/null +++ b/docs/OrderFulfillmentState.md @@ -0,0 +1,10 @@ +# Square.Connect.Model.OrderFulfillmentState +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/OrderFulfillmentType.md b/docs/OrderFulfillmentType.md new file mode 100644 index 0000000..b9ce05d --- /dev/null +++ b/docs/OrderFulfillmentType.md @@ -0,0 +1,10 @@ +# Square.Connect.Model.OrderFulfillmentType +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/OrderLineItem.md b/docs/OrderLineItem.md index a929a3c..6ec9875 100644 --- a/docs/OrderLineItem.md +++ b/docs/OrderLineItem.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **CatalogObjectId** | **string** | The [CatalogItemVariation](#type-catalogitemvariation) id applied to this line item. | [optional] **VariationName** | **string** | The name of the variation applied to this line item. | [optional] **Modifiers** | [**List<OrderLineItemModifier>**](OrderLineItemModifier.md) | The [CatalogModifier](#type-catalogmodifier)s applied to this line item. | [optional] -**Taxes** | [**List<OrderLineItemTax>**](OrderLineItemTax.md) | The taxes applied to this line item. | [optional] -**Discounts** | [**List<OrderLineItemDiscount>**](OrderLineItemDiscount.md) | The discounts applied to this line item. | [optional] +**Taxes** | [**List<OrderLineItemTax>**](OrderLineItemTax.md) | A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. | [optional] +**Discounts** | [**List<OrderLineItemDiscount>**](OrderLineItemDiscount.md) | A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. | [optional] **BasePriceMoney** | [**Money**](Money.md) | The base price for a single unit of the line item. | [optional] **GrossSalesMoney** | [**Money**](Money.md) | The gross sales amount of money calculated as (item base price + modifiers price) * quantity. | [optional] **TotalTaxMoney** | [**Money**](Money.md) | The total tax amount of money to collect for the line item. | [optional] diff --git a/docs/OrderLineItemDiscount.md b/docs/OrderLineItemDiscount.md index 78745fb..4ddeedd 100644 --- a/docs/OrderLineItemDiscount.md +++ b/docs/OrderLineItemDiscount.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Percentage** | **string** | The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount. | [optional] **AmountMoney** | [**Money**](Money.md) | The total monetary amount of the applicable discount. If it is at order level, it is the value of the order level discount. If it is at line item level, it is the value of the line item level discount. The amount_money won't be set for a percentage-based discount. | [optional] **AppliedMoney** | [**Money**](Money.md) | The amount of discount actually applied to this line item. Represents the amount of money applied to a line item as a discount When an amount-based discount is at order-level, this value is different from `amount_money` because the discount is distributed across the line items. | [optional] -**Scope** | **ScopeEnum** | Indicates the level at which the discount applies. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values. | [optional] +**Scope** | **ScopeEnum** | Indicates the level at which the discount applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values. | [optional] ## TypeEnum diff --git a/docs/OrderLineItemTax.md b/docs/OrderLineItemTax.md index 82bd6f2..77beb37 100644 --- a/docs/OrderLineItemTax.md +++ b/docs/OrderLineItemTax.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **Type** | **TypeEnum** | Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values. | [optional] **Percentage** | **string** | The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. | [optional] **AppliedMoney** | [**Money**](Money.md) | The amount of the money applied by the tax in an order. | [optional] +**Scope** | **ScopeEnum** | Indicates the level at which the tax applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values. | [optional] ## TypeEnum @@ -19,6 +20,15 @@ Name | Value **INCLUSIVE** | "INCLUSIVE" +## ScopeEnum + +Name | Value +------------ | ------------- +**OTHERTAXSCOPE** | "OTHER_TAX_SCOPE" +**LINEITEM** | "LINE_ITEM" +**ORDER** | "ORDER" + + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderLineItemTaxScope.md b/docs/OrderLineItemTaxScope.md new file mode 100644 index 0000000..5463523 --- /dev/null +++ b/docs/OrderLineItemTaxScope.md @@ -0,0 +1,10 @@ +# Square.Connect.Model.OrderLineItemTaxScope +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/V1Timecard.md b/docs/V1Timecard.md index 046590a..5298f92 100644 --- a/docs/V1Timecard.md +++ b/docs/V1Timecard.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Deleted** | **bool?** | If true, the timecard was deleted by the merchant, and it is no longer valid. | [optional] **ClockinTime** | **string** | The clock-in time for the timecard, in ISO 8601 format. | [optional] **ClockoutTime** | **string** | The clock-out time for the timecard, in ISO 8601 format. Provide this value only if importing timecard information from another system. | [optional] -**ClockinLocationId** | **string** | The ID of the location the employee clocked in from. We strongly reccomend providing a clockin_location_id. Square uses the clockin_location_id to determine a timecard’s timezone and overtime rules. | [optional] +**ClockinLocationId** | **string** | The ID of the location the employee clocked in from. We strongly reccomend providing a clockin_location_id. Square uses the clockin_location_id to determine a timecard���s timezone and overtime rules. | [optional] **ClockoutLocationId** | **string** | The ID of the location the employee clocked out from. Provide this value only if importing timecard information from another system. | [optional] **CreatedAt** | **string** | The time when the timecard was created, in ISO 8601 format. | [optional] **UpdatedAt** | **string** | The time when the timecard was most recently updated, in ISO 8601 format. | [optional] diff --git a/src/Square.Connect.Test/Api/CheckoutApiTests.cs b/src/Square.Connect.Test/Api/CheckoutApiTests.cs index 95fbca3..9f36f3c 100644 --- a/src/Square.Connect.Test/Api/CheckoutApiTests.cs +++ b/src/Square.Connect.Test/Api/CheckoutApiTests.cs @@ -148,7 +148,7 @@ public void CreateCheckoutTest() FirstName: "Jane", LastName: "Doe" ), - RedirectUrl: "https://merchant.website.com/order-confirm" + RedirectUrl: "https://docs.connect.squareup.com/order-confirm" ); var response = instance.CreateCheckout(locationId, body); Assert.IsInstanceOf (response, "response is CreateCheckoutResponse"); diff --git a/src/Square.Connect.Test/Model/OrderFulfillmentPickupDetailsScheduleTypeTests.cs b/src/Square.Connect.Test/Model/OrderFulfillmentPickupDetailsScheduleTypeTests.cs new file mode 100644 index 0000000..33e7f64 --- /dev/null +++ b/src/Square.Connect.Test/Model/OrderFulfillmentPickupDetailsScheduleTypeTests.cs @@ -0,0 +1,70 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Square.Connect.Api; +using Square.Connect.Model; +using Square.Connect.Client; +using System.Reflection; + +namespace Square.Connect.Test +{ + /// + /// Class for testing OrderFulfillmentPickupDetailsScheduleType + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class OrderFulfillmentPickupDetailsScheduleTypeTests + { + // TODO uncomment below to declare an instance variable for OrderFulfillmentPickupDetailsScheduleType + //private OrderFulfillmentPickupDetailsScheduleType instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of OrderFulfillmentPickupDetailsScheduleType + //instance = new OrderFulfillmentPickupDetailsScheduleType(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OrderFulfillmentPickupDetailsScheduleType + /// + [Test] + public void OrderFulfillmentPickupDetailsScheduleTypeInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" OrderFulfillmentPickupDetailsScheduleType + //Assert.IsInstanceOfType (instance, "variable 'instance' is a OrderFulfillmentPickupDetailsScheduleType"); + } + + + } + +} diff --git a/src/Square.Connect.Test/Model/OrderFulfillmentPickupDetailsTests.cs b/src/Square.Connect.Test/Model/OrderFulfillmentPickupDetailsTests.cs new file mode 100644 index 0000000..1a79c8c --- /dev/null +++ b/src/Square.Connect.Test/Model/OrderFulfillmentPickupDetailsTests.cs @@ -0,0 +1,198 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Square.Connect.Api; +using Square.Connect.Model; +using Square.Connect.Client; +using System.Reflection; + +namespace Square.Connect.Test +{ + /// + /// Class for testing OrderFulfillmentPickupDetails + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class OrderFulfillmentPickupDetailsTests + { + // TODO uncomment below to declare an instance variable for OrderFulfillmentPickupDetails + //private OrderFulfillmentPickupDetails instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of OrderFulfillmentPickupDetails + //instance = new OrderFulfillmentPickupDetails(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OrderFulfillmentPickupDetails + /// + [Test] + public void OrderFulfillmentPickupDetailsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" OrderFulfillmentPickupDetails + //Assert.IsInstanceOfType (instance, "variable 'instance' is a OrderFulfillmentPickupDetails"); + } + + /// + /// Test the property 'Recipient' + /// + [Test] + public void RecipientTest() + { + // TODO unit test for the property 'Recipient' + } + /// + /// Test the property 'ExpiresAt' + /// + [Test] + public void ExpiresAtTest() + { + // TODO unit test for the property 'ExpiresAt' + } + /// + /// Test the property 'AutoCompleteDuration' + /// + [Test] + public void AutoCompleteDurationTest() + { + // TODO unit test for the property 'AutoCompleteDuration' + } + /// + /// Test the property 'ScheduleType' + /// + [Test] + public void ScheduleTypeTest() + { + // TODO unit test for the property 'ScheduleType' + } + /// + /// Test the property 'PickupAt' + /// + [Test] + public void PickupAtTest() + { + // TODO unit test for the property 'PickupAt' + } + /// + /// Test the property 'PickupWindowDuration' + /// + [Test] + public void PickupWindowDurationTest() + { + // TODO unit test for the property 'PickupWindowDuration' + } + /// + /// Test the property 'PrepTimeDuration' + /// + [Test] + public void PrepTimeDurationTest() + { + // TODO unit test for the property 'PrepTimeDuration' + } + /// + /// Test the property 'Note' + /// + [Test] + public void NoteTest() + { + // TODO unit test for the property 'Note' + } + /// + /// Test the property 'PlacedAt' + /// + [Test] + public void PlacedAtTest() + { + // TODO unit test for the property 'PlacedAt' + } + /// + /// Test the property 'AcceptedAt' + /// + [Test] + public void AcceptedAtTest() + { + // TODO unit test for the property 'AcceptedAt' + } + /// + /// Test the property 'RejectedAt' + /// + [Test] + public void RejectedAtTest() + { + // TODO unit test for the property 'RejectedAt' + } + /// + /// Test the property 'ReadyAt' + /// + [Test] + public void ReadyAtTest() + { + // TODO unit test for the property 'ReadyAt' + } + /// + /// Test the property 'ExpiredAt' + /// + [Test] + public void ExpiredAtTest() + { + // TODO unit test for the property 'ExpiredAt' + } + /// + /// Test the property 'PickedUpAt' + /// + [Test] + public void PickedUpAtTest() + { + // TODO unit test for the property 'PickedUpAt' + } + /// + /// Test the property 'CanceledAt' + /// + [Test] + public void CanceledAtTest() + { + // TODO unit test for the property 'CanceledAt' + } + /// + /// Test the property 'CancelReason' + /// + [Test] + public void CancelReasonTest() + { + // TODO unit test for the property 'CancelReason' + } + + } + +} diff --git a/src/Square.Connect.Test/Model/OrderFulfillmentRecipientTests.cs b/src/Square.Connect.Test/Model/OrderFulfillmentRecipientTests.cs new file mode 100644 index 0000000..59eb42e --- /dev/null +++ b/src/Square.Connect.Test/Model/OrderFulfillmentRecipientTests.cs @@ -0,0 +1,102 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Square.Connect.Api; +using Square.Connect.Model; +using Square.Connect.Client; +using System.Reflection; + +namespace Square.Connect.Test +{ + /// + /// Class for testing OrderFulfillmentRecipient + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class OrderFulfillmentRecipientTests + { + // TODO uncomment below to declare an instance variable for OrderFulfillmentRecipient + //private OrderFulfillmentRecipient instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of OrderFulfillmentRecipient + //instance = new OrderFulfillmentRecipient(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OrderFulfillmentRecipient + /// + [Test] + public void OrderFulfillmentRecipientInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" OrderFulfillmentRecipient + //Assert.IsInstanceOfType (instance, "variable 'instance' is a OrderFulfillmentRecipient"); + } + + /// + /// Test the property 'CustomerId' + /// + [Test] + public void CustomerIdTest() + { + // TODO unit test for the property 'CustomerId' + } + /// + /// Test the property 'DisplayName' + /// + [Test] + public void DisplayNameTest() + { + // TODO unit test for the property 'DisplayName' + } + /// + /// Test the property 'EmailAddress' + /// + [Test] + public void EmailAddressTest() + { + // TODO unit test for the property 'EmailAddress' + } + /// + /// Test the property 'PhoneNumber' + /// + [Test] + public void PhoneNumberTest() + { + // TODO unit test for the property 'PhoneNumber' + } + + } + +} diff --git a/src/Square.Connect.Test/Model/OrderFulfillmentStateTests.cs b/src/Square.Connect.Test/Model/OrderFulfillmentStateTests.cs new file mode 100644 index 0000000..c6eefe4 --- /dev/null +++ b/src/Square.Connect.Test/Model/OrderFulfillmentStateTests.cs @@ -0,0 +1,70 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Square.Connect.Api; +using Square.Connect.Model; +using Square.Connect.Client; +using System.Reflection; + +namespace Square.Connect.Test +{ + /// + /// Class for testing OrderFulfillmentState + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class OrderFulfillmentStateTests + { + // TODO uncomment below to declare an instance variable for OrderFulfillmentState + //private OrderFulfillmentState instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of OrderFulfillmentState + //instance = new OrderFulfillmentState(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OrderFulfillmentState + /// + [Test] + public void OrderFulfillmentStateInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" OrderFulfillmentState + //Assert.IsInstanceOfType (instance, "variable 'instance' is a OrderFulfillmentState"); + } + + + } + +} diff --git a/src/Square.Connect.Test/Model/OrderFulfillmentTests.cs b/src/Square.Connect.Test/Model/OrderFulfillmentTests.cs new file mode 100644 index 0000000..65d731a --- /dev/null +++ b/src/Square.Connect.Test/Model/OrderFulfillmentTests.cs @@ -0,0 +1,94 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Square.Connect.Api; +using Square.Connect.Model; +using Square.Connect.Client; +using System.Reflection; + +namespace Square.Connect.Test +{ + /// + /// Class for testing OrderFulfillment + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class OrderFulfillmentTests + { + // TODO uncomment below to declare an instance variable for OrderFulfillment + //private OrderFulfillment instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of OrderFulfillment + //instance = new OrderFulfillment(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OrderFulfillment + /// + [Test] + public void OrderFulfillmentInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" OrderFulfillment + //Assert.IsInstanceOfType (instance, "variable 'instance' is a OrderFulfillment"); + } + + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'State' + /// + [Test] + public void StateTest() + { + // TODO unit test for the property 'State' + } + /// + /// Test the property 'PickupDetails' + /// + [Test] + public void PickupDetailsTest() + { + // TODO unit test for the property 'PickupDetails' + } + + } + +} diff --git a/src/Square.Connect.Test/Model/OrderFulfillmentTypeTests.cs b/src/Square.Connect.Test/Model/OrderFulfillmentTypeTests.cs new file mode 100644 index 0000000..a4963f6 --- /dev/null +++ b/src/Square.Connect.Test/Model/OrderFulfillmentTypeTests.cs @@ -0,0 +1,70 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Square.Connect.Api; +using Square.Connect.Model; +using Square.Connect.Client; +using System.Reflection; + +namespace Square.Connect.Test +{ + /// + /// Class for testing OrderFulfillmentType + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class OrderFulfillmentTypeTests + { + // TODO uncomment below to declare an instance variable for OrderFulfillmentType + //private OrderFulfillmentType instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of OrderFulfillmentType + //instance = new OrderFulfillmentType(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OrderFulfillmentType + /// + [Test] + public void OrderFulfillmentTypeInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" OrderFulfillmentType + //Assert.IsInstanceOfType (instance, "variable 'instance' is a OrderFulfillmentType"); + } + + + } + +} diff --git a/src/Square.Connect.Test/Model/OrderLineItemTaxScopeTests.cs b/src/Square.Connect.Test/Model/OrderLineItemTaxScopeTests.cs new file mode 100644 index 0000000..398b945 --- /dev/null +++ b/src/Square.Connect.Test/Model/OrderLineItemTaxScopeTests.cs @@ -0,0 +1,70 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Square.Connect.Api; +using Square.Connect.Model; +using Square.Connect.Client; +using System.Reflection; + +namespace Square.Connect.Test +{ + /// + /// Class for testing OrderLineItemTaxScope + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class OrderLineItemTaxScopeTests + { + // TODO uncomment below to declare an instance variable for OrderLineItemTaxScope + //private OrderLineItemTaxScope instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of OrderLineItemTaxScope + //instance = new OrderLineItemTaxScope(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OrderLineItemTaxScope + /// + [Test] + public void OrderLineItemTaxScopeInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" OrderLineItemTaxScope + //Assert.IsInstanceOfType (instance, "variable 'instance' is a OrderLineItemTaxScope"); + } + + + } + +} diff --git a/src/Square.Connect/Api/ApplePayApi.cs b/src/Square.Connect/Api/ApplePayApi.cs index ad40e69..0565d7a 100644 --- a/src/Square.Connect/Api/ApplePayApi.cs +++ b/src/Square.Connect/Api/ApplePayApi.cs @@ -225,7 +225,7 @@ public ApiResponse< RegisterDomainResponse > RegisterDomainWithHttpInfo (Registe String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter diff --git a/src/Square.Connect/Api/CatalogApi.cs b/src/Square.Connect/Api/CatalogApi.cs index 3f4eef5..d43b69e 100644 --- a/src/Square.Connect/Api/CatalogApi.cs +++ b/src/Square.Connect/Api/CatalogApi.cs @@ -649,7 +649,7 @@ public ApiResponse< BatchDeleteCatalogObjectsResponse > BatchDeleteCatalogObject String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -812,7 +812,7 @@ public ApiResponse< BatchRetrieveCatalogObjectsResponse > BatchRetrieveCatalogOb String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -975,7 +975,7 @@ public ApiResponse< BatchUpsertCatalogObjectsResponse > BatchUpsertCatalogObject String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -1133,7 +1133,7 @@ public ApiResponse< CatalogInfoResponse > CatalogInfoWithHttpInfo () String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); // authentication (oauth2) required // oauth required @@ -1275,7 +1275,7 @@ public ApiResponse< DeleteCatalogObjectResponse > DeleteCatalogObjectWithHttpInf String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (objectId != null) localVarPathParams.Add("object_id", Configuration.ApiClient.ParameterToString(objectId)); // path parameter // authentication (oauth2) required @@ -1423,7 +1423,7 @@ public ApiResponse< ListCatalogResponse > ListCatalogWithHttpInfo (string cursor String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (cursor != null) localVarQueryParams.Add("cursor", Configuration.ApiClient.ParameterToString(cursor)); // query parameter if (types != null) localVarQueryParams.Add("types", Configuration.ApiClient.ParameterToString(types)); // query parameter @@ -1575,7 +1575,7 @@ public ApiResponse< RetrieveCatalogObjectResponse > RetrieveCatalogObjectWithHtt String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (objectId != null) localVarPathParams.Add("object_id", Configuration.ApiClient.ParameterToString(objectId)); // path parameter if (includeRelatedObjects != null) localVarQueryParams.Add("include_related_objects", Configuration.ApiClient.ParameterToString(includeRelatedObjects)); // query parameter @@ -1728,7 +1728,7 @@ public ApiResponse< SearchCatalogObjectsResponse > SearchCatalogObjectsWithHttpI String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -1891,7 +1891,7 @@ public ApiResponse< UpdateItemModifierListsResponse > UpdateItemModifierListsWit String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -2054,7 +2054,7 @@ public ApiResponse< UpdateItemTaxesResponse > UpdateItemTaxesWithHttpInfo (Updat String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -2217,7 +2217,7 @@ public ApiResponse< UpsertCatalogObjectResponse > UpsertCatalogObjectWithHttpInf String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter diff --git a/src/Square.Connect/Api/CheckoutApi.cs b/src/Square.Connect/Api/CheckoutApi.cs index 2cf185a..98fe12d 100644 --- a/src/Square.Connect/Api/CheckoutApi.cs +++ b/src/Square.Connect/Api/CheckoutApi.cs @@ -28,7 +28,7 @@ public interface ICheckoutApi : IApiAccessor /// CreateCheckout /// /// - /// Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `checkout_page_url` that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. + /// Links a `checkoutId` to a `checkout_page_url` that customers will be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. /// /// Thrown when fails to make API call /// The ID of the business location to associate the checkout with. @@ -40,7 +40,7 @@ public interface ICheckoutApi : IApiAccessor /// CreateCheckout /// /// - /// Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `checkout_page_url` that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. + /// Links a `checkoutId` to a `checkout_page_url` that customers will be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. /// /// Thrown when fails to make API call /// The ID of the business location to associate the checkout with. @@ -53,7 +53,7 @@ public interface ICheckoutApi : IApiAccessor /// CreateCheckout /// /// - /// Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `checkout_page_url` that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. + /// Links a `checkoutId` to a `checkout_page_url` that customers will be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. /// /// Thrown when fails to make API call /// The ID of the business location to associate the checkout with. @@ -65,7 +65,7 @@ public interface ICheckoutApi : IApiAccessor /// CreateCheckout /// /// - /// Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `checkout_page_url` that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. + /// Links a `checkoutId` to a `checkout_page_url` that customers will be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. /// /// Thrown when fails to make API call /// The ID of the business location to associate the checkout with. @@ -185,7 +185,7 @@ public void AddDefaultHeader(string key, string value) } /// - /// CreateCheckout Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `checkout_page_url` that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. + /// CreateCheckout Links a `checkoutId` to a `checkout_page_url` that customers will be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. /// /// Thrown when fails to make API call /// The ID of the business location to associate the checkout with. @@ -198,7 +198,7 @@ public CreateCheckoutResponse CreateCheckout (string locationId, CreateCheckoutR } /// - /// CreateCheckout Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `checkout_page_url` that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. + /// CreateCheckout Links a `checkoutId` to a `checkout_page_url` that customers will be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. /// /// Thrown when fails to make API call /// The ID of the business location to associate the checkout with. @@ -234,7 +234,7 @@ public ApiResponse< CreateCheckoutResponse > CreateCheckoutWithHttpInfo (string String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (body != null && body.GetType() != typeof(byte[])) { @@ -272,7 +272,7 @@ public ApiResponse< CreateCheckoutResponse > CreateCheckoutWithHttpInfo (string } /// - /// CreateCheckout Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `checkout_page_url` that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. + /// CreateCheckout Links a `checkoutId` to a `checkout_page_url` that customers will be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. /// /// Thrown when fails to make API call /// The ID of the business location to associate the checkout with. @@ -286,7 +286,7 @@ public async System.Threading.Tasks.Task CreateCheckoutA } /// - /// CreateCheckout Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `checkout_page_url` that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. + /// CreateCheckout Links a `checkoutId` to a `checkout_page_url` that customers will be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. /// /// Thrown when fails to make API call /// The ID of the business location to associate the checkout with. diff --git a/src/Square.Connect/Api/CustomersApi.cs b/src/Square.Connect/Api/CustomersApi.cs index 16e91a1..1695013 100644 --- a/src/Square.Connect/Api/CustomersApi.cs +++ b/src/Square.Connect/Api/CustomersApi.cs @@ -539,7 +539,7 @@ public ApiResponse< CreateCustomerResponse > CreateCustomerWithHttpInfo (CreateC String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -707,7 +707,7 @@ public ApiResponse< CreateCustomerCardResponse > CreateCustomerCardWithHttpInfo String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (customerId != null) localVarPathParams.Add("customer_id", Configuration.ApiClient.ParameterToString(customerId)); // path parameter if (body != null && body.GetType() != typeof(byte[])) { @@ -877,7 +877,7 @@ public ApiResponse< DeleteCustomerResponse > DeleteCustomerWithHttpInfo (string String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (customerId != null) localVarPathParams.Add("customer_id", Configuration.ApiClient.ParameterToString(customerId)); // path parameter // authentication (oauth2) required @@ -1031,7 +1031,7 @@ public ApiResponse< DeleteCustomerCardResponse > DeleteCustomerCardWithHttpInfo String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (customerId != null) localVarPathParams.Add("customer_id", Configuration.ApiClient.ParameterToString(customerId)); // path parameter if (cardId != null) localVarPathParams.Add("card_id", Configuration.ApiClient.ParameterToString(cardId)); // path parameter @@ -1188,7 +1188,7 @@ public ApiResponse< ListCustomersResponse > ListCustomersWithHttpInfo (string cu String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (cursor != null) localVarQueryParams.Add("cursor", Configuration.ApiClient.ParameterToString(cursor)); // query parameter if (sortField != null) localVarQueryParams.Add("sort_field", Configuration.ApiClient.ParameterToString(sortField)); // query parameter if (sortOrder != null) localVarQueryParams.Add("sort_order", Configuration.ApiClient.ParameterToString(sortOrder)); // query parameter @@ -1342,7 +1342,7 @@ public ApiResponse< RetrieveCustomerResponse > RetrieveCustomerWithHttpInfo (str String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (customerId != null) localVarPathParams.Add("customer_id", Configuration.ApiClient.ParameterToString(customerId)); // path parameter // authentication (oauth2) required @@ -1491,7 +1491,7 @@ public ApiResponse< SearchCustomersResponse > SearchCustomersWithHttpInfo (Searc String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -1659,7 +1659,7 @@ public ApiResponse< UpdateCustomerResponse > UpdateCustomerWithHttpInfo (string String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (customerId != null) localVarPathParams.Add("customer_id", Configuration.ApiClient.ParameterToString(customerId)); // path parameter if (body != null && body.GetType() != typeof(byte[])) { diff --git a/src/Square.Connect/Api/InventoryApi.cs b/src/Square.Connect/Api/InventoryApi.cs index a422cb5..8a8a8e2 100644 --- a/src/Square.Connect/Api/InventoryApi.cs +++ b/src/Square.Connect/Api/InventoryApi.cs @@ -493,7 +493,7 @@ public ApiResponse< BatchChangeInventoryResponse > BatchChangeInventoryWithHttpI String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -656,7 +656,7 @@ public ApiResponse< BatchRetrieveInventoryChangesResponse > BatchRetrieveInvento String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -819,7 +819,7 @@ public ApiResponse< BatchRetrieveInventoryCountsResponse > BatchRetrieveInventor String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -982,7 +982,7 @@ public ApiResponse< RetrieveInventoryAdjustmentResponse > RetrieveInventoryAdjus String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (adjustmentId != null) localVarPathParams.Add("adjustment_id", Configuration.ApiClient.ParameterToString(adjustmentId)); // path parameter // authentication (oauth2) required @@ -1135,7 +1135,7 @@ public ApiResponse< RetrieveInventoryChangesResponse > RetrieveInventoryChangesW String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (catalogObjectId != null) localVarPathParams.Add("catalog_object_id", Configuration.ApiClient.ParameterToString(catalogObjectId)); // path parameter if (locationIds != null) localVarQueryParams.Add("location_ids", Configuration.ApiClient.ParameterToString(locationIds)); // query parameter if (cursor != null) localVarQueryParams.Add("cursor", Configuration.ApiClient.ParameterToString(cursor)); // query parameter @@ -1296,7 +1296,7 @@ public ApiResponse< RetrieveInventoryCountResponse > RetrieveInventoryCountWithH String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (catalogObjectId != null) localVarPathParams.Add("catalog_object_id", Configuration.ApiClient.ParameterToString(catalogObjectId)); // path parameter if (locationIds != null) localVarQueryParams.Add("location_ids", Configuration.ApiClient.ParameterToString(locationIds)); // query parameter if (cursor != null) localVarQueryParams.Add("cursor", Configuration.ApiClient.ParameterToString(cursor)); // query parameter @@ -1453,7 +1453,7 @@ public ApiResponse< RetrieveInventoryPhysicalCountResponse > RetrieveInventoryPh String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (physicalCountId != null) localVarPathParams.Add("physical_count_id", Configuration.ApiClient.ParameterToString(physicalCountId)); // path parameter // authentication (oauth2) required diff --git a/src/Square.Connect/Api/LocationsApi.cs b/src/Square.Connect/Api/LocationsApi.cs index 5990d6f..1b6e04c 100644 --- a/src/Square.Connect/Api/LocationsApi.cs +++ b/src/Square.Connect/Api/LocationsApi.cs @@ -216,7 +216,7 @@ public ApiResponse< ListLocationsResponse > ListLocationsWithHttpInfo () String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); // authentication (oauth2) required // oauth required diff --git a/src/Square.Connect/Api/MobileAuthorizationApi.cs b/src/Square.Connect/Api/MobileAuthorizationApi.cs index bad0501..37b0c6c 100644 --- a/src/Square.Connect/Api/MobileAuthorizationApi.cs +++ b/src/Square.Connect/Api/MobileAuthorizationApi.cs @@ -225,7 +225,7 @@ public ApiResponse< CreateMobileAuthorizationCodeResponse > CreateMobileAuthoriz String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter diff --git a/src/Square.Connect/Api/OAuthApi.cs b/src/Square.Connect/Api/OAuthApi.cs index 9e5dcf9..4edffb1 100644 --- a/src/Square.Connect/Api/OAuthApi.cs +++ b/src/Square.Connect/Api/OAuthApi.cs @@ -313,7 +313,7 @@ public ApiResponse< ObtainTokenResponse > ObtainTokenWithHttpInfo (ObtainTokenRe String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter @@ -469,7 +469,7 @@ public ApiResponse< RenewTokenResponse > RenewTokenWithHttpInfo (string clientId String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (clientId != null) localVarPathParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // path parameter if (body != null && body.GetType() != typeof(byte[])) { @@ -638,7 +638,7 @@ public ApiResponse< RevokeTokenResponse > RevokeTokenWithHttpInfo (RevokeTokenRe String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter diff --git a/src/Square.Connect/Api/OrdersApi.cs b/src/Square.Connect/Api/OrdersApi.cs index 4dcc216..866269d 100644 --- a/src/Square.Connect/Api/OrdersApi.cs +++ b/src/Square.Connect/Api/OrdersApi.cs @@ -280,7 +280,7 @@ public ApiResponse< BatchRetrieveOrdersResponse > BatchRetrieveOrdersWithHttpInf String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (body != null && body.GetType() != typeof(byte[])) { @@ -455,7 +455,7 @@ public ApiResponse< CreateOrderResponse > CreateOrderWithHttpInfo (string locati String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (body != null && body.GetType() != typeof(byte[])) { diff --git a/src/Square.Connect/Api/ReportingApi.cs b/src/Square.Connect/Api/ReportingApi.cs index 28e7e0e..40ed01a 100644 --- a/src/Square.Connect/Api/ReportingApi.cs +++ b/src/Square.Connect/Api/ReportingApi.cs @@ -307,7 +307,7 @@ public ApiResponse< ListAdditionalRecipientReceivableRefundsResponse > ListAddit String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (beginTime != null) localVarQueryParams.Add("begin_time", Configuration.ApiClient.ParameterToString(beginTime)); // query parameter if (endTime != null) localVarQueryParams.Add("end_time", Configuration.ApiClient.ParameterToString(endTime)); // query parameter @@ -480,7 +480,7 @@ public ApiResponse< ListAdditionalRecipientReceivablesResponse > ListAdditionalR String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (beginTime != null) localVarQueryParams.Add("begin_time", Configuration.ApiClient.ParameterToString(beginTime)); // query parameter if (endTime != null) localVarQueryParams.Add("end_time", Configuration.ApiClient.ParameterToString(endTime)); // query parameter diff --git a/src/Square.Connect/Api/TransactionsApi.cs b/src/Square.Connect/Api/TransactionsApi.cs index c9554a8..3cb3c20 100644 --- a/src/Square.Connect/Api/TransactionsApi.cs +++ b/src/Square.Connect/Api/TransactionsApi.cs @@ -538,7 +538,7 @@ public ApiResponse< CaptureTransactionResponse > CaptureTransactionWithHttpInfo String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (transactionId != null) localVarPathParams.Add("transaction_id", Configuration.ApiClient.ParameterToString(transactionId)); // path parameter @@ -699,7 +699,7 @@ public ApiResponse< ChargeResponse > ChargeWithHttpInfo (string locationId, Char String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (body != null && body.GetType() != typeof(byte[])) { @@ -879,7 +879,7 @@ public ApiResponse< CreateRefundResponse > CreateRefundWithHttpInfo (string loca String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (transactionId != null) localVarPathParams.Add("transaction_id", Configuration.ApiClient.ParameterToString(transactionId)); // path parameter if (body != null && body.GetType() != typeof(byte[])) @@ -1064,7 +1064,7 @@ public ApiResponse< ListRefundsResponse > ListRefundsWithHttpInfo (string locati String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (beginTime != null) localVarQueryParams.Add("begin_time", Configuration.ApiClient.ParameterToString(beginTime)); // query parameter if (endTime != null) localVarQueryParams.Add("end_time", Configuration.ApiClient.ParameterToString(endTime)); // query parameter @@ -1237,7 +1237,7 @@ public ApiResponse< ListTransactionsResponse > ListTransactionsWithHttpInfo (str String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (beginTime != null) localVarQueryParams.Add("begin_time", Configuration.ApiClient.ParameterToString(beginTime)); // query parameter if (endTime != null) localVarQueryParams.Add("end_time", Configuration.ApiClient.ParameterToString(endTime)); // query parameter @@ -1407,7 +1407,7 @@ public ApiResponse< RetrieveTransactionResponse > RetrieveTransactionWithHttpInf String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (transactionId != null) localVarPathParams.Add("transaction_id", Configuration.ApiClient.ParameterToString(transactionId)); // path parameter @@ -1568,7 +1568,7 @@ public ApiResponse< VoidTransactionResponse > VoidTransactionWithHttpInfo (strin String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - localVarHeaderParams.Add("Square-Version", "2018-12-12"); + localVarHeaderParams.Add("Square-Version", "2019-02-13"); if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter if (transactionId != null) localVarPathParams.Add("transaction_id", Configuration.ApiClient.ParameterToString(transactionId)); // path parameter diff --git a/src/Square.Connect/Client/Configuration.cs b/src/Square.Connect/Client/Configuration.cs index a6d8b8e..5a193cb 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.20181212.0" + string userAgent = "Square-Connect-CSharp/2.20190213.0" ) { setApiClientUsingDefault(apiClient); @@ -81,7 +81,7 @@ public Configuration(ApiClient apiClient) /// Version of the package. /// /// Version of the package. - public const string Version = "2.13.0"; + public const string Version = "2.14.0"; /// /// 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.13.0\n"; + report += " SDK Package Version: 2.14.0\n"; return report; } diff --git a/src/Square.Connect/Model/CardBrand.cs b/src/Square.Connect/Model/CardBrand.cs index 87a8671..d62d5c3 100644 --- a/src/Square.Connect/Model/CardBrand.cs +++ b/src/Square.Connect/Model/CardBrand.cs @@ -24,9 +24,9 @@ namespace Square.Connect.Model { /// - /// Indicates a credit card's brand, such as `VISA` or `MASTERCARD`. + /// Indicates a card's brand, such as `VISA` or `MASTERCARD`. /// - /// Indicates a credit card's brand, such as `VISA` or `MASTERCARD`. + /// Indicates a card's brand, such as `VISA` or `MASTERCARD`. [JsonConverter(typeof(StringEnumConverter))] public enum CardBrand { diff --git a/src/Square.Connect/Model/CatalogCategory.cs b/src/Square.Connect/Model/CatalogCategory.cs index 25d21a6..993e107 100644 --- a/src/Square.Connect/Model/CatalogCategory.cs +++ b/src/Square.Connect/Model/CatalogCategory.cs @@ -32,16 +32,16 @@ public partial class CatalogCategory : IEquatable, IValidatabl /// /// Initializes a new instance of the class. /// - /// The category's name. Searchable.. + /// The category's name. Searchable. This field has max length of 255 Unicode code points.. public CatalogCategory(string Name = default(string)) { this.Name = Name; } /// - /// The category's name. Searchable. + /// The category's name. Searchable. This field has max length of 255 Unicode code points. /// - /// The category's name. Searchable. + /// The category's name. Searchable. This field has max length of 255 Unicode code points. [DataMember(Name="name", EmitDefaultValue=false)] public string Name { get; set; } /// diff --git a/src/Square.Connect/Model/CatalogDiscount.cs b/src/Square.Connect/Model/CatalogDiscount.cs index 2318d84..36d04af 100644 --- a/src/Square.Connect/Model/CatalogDiscount.cs +++ b/src/Square.Connect/Model/CatalogDiscount.cs @@ -71,12 +71,12 @@ public enum DiscountTypeEnum /// /// Initializes a new instance of the class. /// - /// The discount's name. Searchable.. + /// The discount's name. Searchable. This field has max length of 255 Unicode code points.. /// Indicates whether the discount is a fixed amount or percentage, or entered at the time of sale. See [CatalogDiscountType](#type-catalogdiscounttype) for all possible values.. /// The percentage of the discount as a string representation of a decimal number, using a `.` as the decimal separator and without a `%` sign. A value of `7.5` corresponds to `7.5%`. Specify a percentage of `0` if `discount_type` is `VARIABLE_PERCENTAGE`. Do not include this field for amount-based or variable discounts.. /// The amount of the discount. Specify an amount of `0` if `discount_type` is `VARIABLE_AMOUNT`. Do not include this field for percentage-based or variable discounts.. /// Indicates whether a mobile staff member needs to enter their PIN to apply the discount to a payment in the Square Point of Sale app.. - /// The color of the discount's display label in the Square Point of Sale app.. + /// The color of the discount's display label in the Square Point of Sale app. This must be a valid hex color code.. public CatalogDiscount(string Name = default(string), DiscountTypeEnum? DiscountType = default(DiscountTypeEnum?), string Percentage = default(string), Money AmountMoney = default(Money), bool? PinRequired = default(bool?), string LabelColor = default(string)) { this.Name = Name; @@ -88,9 +88,9 @@ public enum DiscountTypeEnum } /// - /// The discount's name. Searchable. + /// The discount's name. Searchable. This field has max length of 255 Unicode code points. /// - /// The discount's name. Searchable. + /// The discount's name. Searchable. This field has max length of 255 Unicode code points. [DataMember(Name="name", EmitDefaultValue=false)] public string Name { get; set; } /// @@ -112,9 +112,9 @@ public enum DiscountTypeEnum [DataMember(Name="pin_required", EmitDefaultValue=false)] public bool? PinRequired { get; set; } /// - /// The color of the discount's display label in the Square Point of Sale app. + /// The color of the discount's display label in the Square Point of Sale app. This must be a valid hex color code. /// - /// The color of the discount's display label in the Square Point of Sale app. + /// The color of the discount's display label in the Square Point of Sale app. This must be a valid hex color code. [DataMember(Name="label_color", EmitDefaultValue=false)] public string LabelColor { get; set; } /// diff --git a/src/Square.Connect/Model/CatalogItem.cs b/src/Square.Connect/Model/CatalogItem.cs index d7bb3a3..000cafa 100644 --- a/src/Square.Connect/Model/CatalogItem.cs +++ b/src/Square.Connect/Model/CatalogItem.cs @@ -77,10 +77,10 @@ public enum ProductTypeEnum /// /// Initializes a new instance of the class. /// - /// The item's name. Searchable.. - /// The item's description. Searchable.. - /// 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.. - /// The color of the item's display label in the Square Point of Sale app.. + /// The item's name. Searchable. This field must not be empty. This field has max length of 512 Unicode code points.. + /// The item's description. Searchable. This field has max length of 4096 Unicode code points.. + /// 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. This field has max length of 24 Unicode code points.. + /// The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code.. /// If `true`, the item can be added to shipping orders from the merchant's online store.. /// If `true`, the item can be added to pickup orders from the merchant's online store.. /// If `true`, the item can be added to electronically fulfilled orders from the merchant's online store.. @@ -110,27 +110,27 @@ public enum ProductTypeEnum } /// - /// The item's name. Searchable. + /// The item's name. Searchable. This field must not be empty. This field has max length of 512 Unicode code points. /// - /// The item's name. Searchable. + /// The item's name. Searchable. This field must not be empty. This field has max length of 512 Unicode code points. [DataMember(Name="name", EmitDefaultValue=false)] public string Name { get; set; } /// - /// The item's description. Searchable. + /// The item's description. Searchable. This field has max length of 4096 Unicode code points. /// - /// The item's description. Searchable. + /// The item's description. Searchable. This field has max length of 4096 Unicode code points. [DataMember(Name="description", EmitDefaultValue=false)] public string Description { get; set; } /// - /// 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. + /// 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. This field has max length of 24 Unicode code points. /// - /// 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. + /// 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. This field has max length of 24 Unicode code points. [DataMember(Name="abbreviation", EmitDefaultValue=false)] public string Abbreviation { get; set; } /// - /// The color of the item's display label in the Square Point of Sale app. + /// The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code. /// - /// The color of the item's display label in the Square Point of Sale app. + /// The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code. [DataMember(Name="label_color", EmitDefaultValue=false)] public string LabelColor { get; set; } /// diff --git a/src/Square.Connect/Model/CatalogItemVariation.cs b/src/Square.Connect/Model/CatalogItemVariation.cs index b0df153..6e51706 100644 --- a/src/Square.Connect/Model/CatalogItemVariation.cs +++ b/src/Square.Connect/Model/CatalogItemVariation.cs @@ -87,7 +87,7 @@ public enum InventoryAlertTypeEnum /// Initializes a new instance of the class. /// /// The ID of the [CatalogItem](#type-catalogitem) associated with this item variation. Searchable.. - /// The item variation's name. Searchable.. + /// The item variation's name. Searchable. This field has max length of 255 Unicode code points.. /// The item variation's SKU, if any. Searchable.. /// The item variation's UPC, if any. Searchable in the Connect API. This field is only exposed in the Connect API. It is not exposed in Square's Dashboard, Square Point of Sale app or Retail Point of Sale app.. /// The order in which this item variation should be displayed. This value is read-only. On writes, the ordinal for each item variation within a parent [CatalogItem](#type-catalogitem) is set according to the item variations's position. On reads, the value is not guaranteed to be sequential or unique.. @@ -97,7 +97,7 @@ public enum InventoryAlertTypeEnum /// If `true`, inventory tracking is active for the variation.. /// 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.. /// 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.. - /// Arbitrary user metadata to associate with the item variation. Cannot exceed 255 characters. Searchable.. + /// Arbitrary user metadata to associate with the item variation. Searchable. This field has max length of 255 Unicode code points.. /// If the [CatalogItem](#type-catalogitem) that owns this item variation is of type `APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For example, a 30 minute appointment would have the value `1800000`, which is equal to 30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second).. public CatalogItemVariation(string ItemId = default(string), string Name = default(string), string Sku = default(string), string Upc = default(string), int? Ordinal = default(int?), PricingTypeEnum? PricingType = default(PricingTypeEnum?), Money PriceMoney = default(Money), List LocationOverrides = default(List), bool? TrackInventory = default(bool?), InventoryAlertTypeEnum? InventoryAlertType = default(InventoryAlertTypeEnum?), long? InventoryAlertThreshold = default(long?), string UserData = default(string), long? ServiceDuration = default(long?)) { @@ -123,9 +123,9 @@ public enum InventoryAlertTypeEnum [DataMember(Name="item_id", EmitDefaultValue=false)] public string ItemId { get; set; } /// - /// The item variation's name. Searchable. + /// The item variation's name. Searchable. This field has max length of 255 Unicode code points. /// - /// The item variation's name. Searchable. + /// The item variation's name. Searchable. This field has max length of 255 Unicode code points. [DataMember(Name="name", EmitDefaultValue=false)] public string Name { get; set; } /// @@ -171,9 +171,9 @@ public enum InventoryAlertTypeEnum [DataMember(Name="inventory_alert_threshold", EmitDefaultValue=false)] public long? InventoryAlertThreshold { get; set; } /// - /// Arbitrary user metadata to associate with the item variation. Cannot exceed 255 characters. Searchable. + /// Arbitrary user metadata to associate with the item variation. Searchable. This field has max length of 255 Unicode code points. /// - /// Arbitrary user metadata to associate with the item variation. Cannot exceed 255 characters. Searchable. + /// Arbitrary user metadata to associate with the item variation. Searchable. This field has max length of 255 Unicode code points. [DataMember(Name="user_data", EmitDefaultValue=false)] public string UserData { get; set; } /// diff --git a/src/Square.Connect/Model/CatalogModifier.cs b/src/Square.Connect/Model/CatalogModifier.cs index f2e5cf6..79697c8 100644 --- a/src/Square.Connect/Model/CatalogModifier.cs +++ b/src/Square.Connect/Model/CatalogModifier.cs @@ -32,7 +32,7 @@ public partial class CatalogModifier : IEquatable, IValidatabl /// /// Initializes a new instance of the class. /// - /// The modifier's name. Searchable.. + /// The modifier's name. Searchable. This field has max length of 255 Unicode code points.. /// The modifier's price.. public CatalogModifier(string Name = default(string), Money PriceMoney = default(Money)) { @@ -41,9 +41,9 @@ public partial class CatalogModifier : IEquatable, IValidatabl } /// - /// The modifier's name. Searchable. + /// The modifier's name. Searchable. This field has max length of 255 Unicode code points. /// - /// The modifier's name. Searchable. + /// The modifier's name. Searchable. This field has max length of 255 Unicode code points. [DataMember(Name="name", EmitDefaultValue=false)] public string Name { get; set; } /// diff --git a/src/Square.Connect/Model/CatalogModifierList.cs b/src/Square.Connect/Model/CatalogModifierList.cs index 189a8e3..8737f16 100644 --- a/src/Square.Connect/Model/CatalogModifierList.cs +++ b/src/Square.Connect/Model/CatalogModifierList.cs @@ -59,7 +59,7 @@ public enum SelectionTypeEnum /// /// Initializes a new instance of the class. /// - /// The [CatalogModifierList](#type-catalogmodifierlist)'s name. Searchable.. + /// The [CatalogModifierList](#type-catalogmodifierlist)'s name. Searchable. This field has max length of 255 Unicode code points.. /// Indicates whether multiple options from the [CatalogModifierList](#type-catalogmodifierlist) can be applied to a single [CatalogItem](#type-catalogitem). See [CatalogModifierListSelectionType](#type-catalogmodifierlistselectiontype) for all possible values.. /// The options included in the [CatalogModifierList](#type-catalogmodifierlist). You must include at least one [CatalogModifier](#type-catalogmodifier). Each [CatalogObject](#type-catalogobject) must have type `MODIFIER` and contain [CatalogModifier](#type-catalogmodifier) data.. public CatalogModifierList(string Name = default(string), SelectionTypeEnum? SelectionType = default(SelectionTypeEnum?), List Modifiers = default(List)) @@ -70,9 +70,9 @@ public enum SelectionTypeEnum } /// - /// The [CatalogModifierList](#type-catalogmodifierlist)'s name. Searchable. + /// The [CatalogModifierList](#type-catalogmodifierlist)'s name. Searchable. This field has max length of 255 Unicode code points. /// - /// The [CatalogModifierList](#type-catalogmodifierlist)'s name. Searchable. + /// The [CatalogModifierList](#type-catalogmodifierlist)'s name. Searchable. This field has max length of 255 Unicode code points. [DataMember(Name="name", EmitDefaultValue=false)] public string Name { get; set; } /// diff --git a/src/Square.Connect/Model/CatalogObject.cs b/src/Square.Connect/Model/CatalogObject.cs index 6880156..e807e21 100644 --- a/src/Square.Connect/Model/CatalogObject.cs +++ b/src/Square.Connect/Model/CatalogObject.cs @@ -97,7 +97,7 @@ protected CatalogObject() { } /// 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. (required). /// 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. (required). /// 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.. - /// 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.. + /// The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting.. /// 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.. /// 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.. /// 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. If not specified, defaults to `true`.. @@ -159,9 +159,9 @@ protected CatalogObject() { } [DataMember(Name="updated_at", EmitDefaultValue=false)] public string UpdatedAt { get; set; } /// - /// 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. + /// The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting. /// - /// 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. + /// The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting. [DataMember(Name="version", EmitDefaultValue=false)] public long? Version { get; set; } /// diff --git a/src/Square.Connect/Model/CatalogObjectType.cs b/src/Square.Connect/Model/CatalogObjectType.cs index 4313868..134ea3d 100644 --- a/src/Square.Connect/Model/CatalogObjectType.cs +++ b/src/Square.Connect/Model/CatalogObjectType.cs @@ -24,9 +24,9 @@ namespace Square.Connect.Model { /// - /// Possible kinds of [CatalogObject](#type-catalogobject)s returned from the Catalog, each contaning type-specific properties in the `*_data` field corresponding to the object type. + /// Possible kinds of [CatalogObject](#type-catalogobject)s returned from the Catalog, each containing type-specific properties in the `*_data` field corresponding to the object type. /// - /// Possible kinds of [CatalogObject](#type-catalogobject)s returned from the Catalog, each contaning type-specific properties in the `*_data` field corresponding to the object type. + /// Possible kinds of [CatalogObject](#type-catalogobject)s returned from the Catalog, each containing type-specific properties in the `*_data` field corresponding to the object type. [JsonConverter(typeof(StringEnumConverter))] public enum CatalogObjectType { diff --git a/src/Square.Connect/Model/CatalogTax.cs b/src/Square.Connect/Model/CatalogTax.cs index 68b27dd..8ee7a1d 100644 --- a/src/Square.Connect/Model/CatalogTax.cs +++ b/src/Square.Connect/Model/CatalogTax.cs @@ -86,7 +86,7 @@ public enum InclusionTypeEnum /// /// Initializes a new instance of the class. /// - /// The tax's name. Searchable.. + /// The tax's name. Searchable. This field has max length of 255 Unicode code points.. /// Whether the tax is calculated based on a payment's subtotal or total. See [TaxCalculationPhase](#type-taxcalculationphase) for all possible values.. /// Whether the tax is `ADDITIVE` or `INCLUSIVE`. See [TaxInclusionType](#type-taxinclusiontype) for all possible values.. /// The percentage of the tax in decimal form, using a `'.'` as the decimal separator and without a `'%'` sign. A value of `7.5` corresponds to 7.5%.. @@ -103,9 +103,9 @@ public enum InclusionTypeEnum } /// - /// The tax's name. Searchable. + /// The tax's name. Searchable. This field has max length of 255 Unicode code points. /// - /// The tax's name. Searchable. + /// The tax's name. Searchable. This field has max length of 255 Unicode code points. [DataMember(Name="name", EmitDefaultValue=false)] public string Name { get; set; } /// diff --git a/src/Square.Connect/Model/CreateOrderRequest.cs b/src/Square.Connect/Model/CreateOrderRequest.cs index b6d3f35..d741872 100644 --- a/src/Square.Connect/Model/CreateOrderRequest.cs +++ b/src/Square.Connect/Model/CreateOrderRequest.cs @@ -32,33 +32,28 @@ public partial class CreateOrderRequest : IEquatable, IVali /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected CreateOrderRequest() { } - /// - /// Initializes a new instance of the class. - /// + /// The order to create. If this field is set, then the only other top-level field that can be set is the idempotency_key.. /// A value you specify that uniquely identifies this order among orders you've created. If you're unsure whether a particular order was created successfully, you can reattempt it with the same idempotency key without worrying about creating duplicate orders. See [Idempotency keys](#idempotencykeys) for more information.. - /// An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters.. - /// The line items to associate with this order. Each line item represents a different product to include in a purchase. (required). - /// The taxes to include on the order.. - /// The discounts to include on the order.. - public CreateOrderRequest(string IdempotencyKey = default(string), string ReferenceId = default(string), List LineItems = default(List), List Taxes = default(List), List Discounts = default(List)) + /// __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters.. + /// __Deprecated__: Please set the line_items on the nested [order](#type-order) field instead. The line items to associate with this order. Each line item represents a different product to include in a purchase.. + /// __Deprecated__: Please set the taxes on the nested [order](#type-order) field instead. The taxes to include on the order.. + /// __Deprecated__: Please set the discounts on the nested [order](#type-order) field instead. The discounts to include on the order.. + public CreateOrderRequest(Order Order = default(Order), string IdempotencyKey = default(string), string ReferenceId = default(string), List LineItems = default(List), List Taxes = default(List), List Discounts = default(List)) { - // to ensure "LineItems" is required (not null) - if (LineItems == null) - { - throw new InvalidDataException("LineItems is a required property for CreateOrderRequest and cannot be null"); - } - else - { - this.LineItems = LineItems; - } + this.Order = Order; this.IdempotencyKey = IdempotencyKey; this.ReferenceId = ReferenceId; + this.LineItems = LineItems; this.Taxes = Taxes; this.Discounts = Discounts; } + /// + /// The order to create. If this field is set, then the only other top-level field that can be set is the idempotency_key. + /// + /// The order to create. If this field is set, then the only other top-level field that can be set is the idempotency_key. + [DataMember(Name="order", EmitDefaultValue=false)] + public Order Order { get; set; } /// /// A value you specify that uniquely identifies this order among orders you've created. If you're unsure whether a particular order was created successfully, you can reattempt it with the same idempotency key without worrying about creating duplicate orders. See [Idempotency keys](#idempotencykeys) for more information. /// @@ -66,27 +61,27 @@ protected CreateOrderRequest() { } [DataMember(Name="idempotency_key", EmitDefaultValue=false)] public string IdempotencyKey { get; set; } /// - /// An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. + /// __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. /// - /// An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. + /// __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. [DataMember(Name="reference_id", EmitDefaultValue=false)] public string ReferenceId { get; set; } /// - /// The line items to associate with this order. Each line item represents a different product to include in a purchase. + /// __Deprecated__: Please set the line_items on the nested [order](#type-order) field instead. The line items to associate with this order. Each line item represents a different product to include in a purchase. /// - /// The line items to associate with this order. Each line item represents a different product to include in a purchase. + /// __Deprecated__: Please set the line_items on the nested [order](#type-order) field instead. The line items to associate with this order. Each line item represents a different product to include in a purchase. [DataMember(Name="line_items", EmitDefaultValue=false)] public List LineItems { get; set; } /// - /// The taxes to include on the order. + /// __Deprecated__: Please set the taxes on the nested [order](#type-order) field instead. The taxes to include on the order. /// - /// The taxes to include on the order. + /// __Deprecated__: Please set the taxes on the nested [order](#type-order) field instead. The taxes to include on the order. [DataMember(Name="taxes", EmitDefaultValue=false)] public List Taxes { get; set; } /// - /// The discounts to include on the order. + /// __Deprecated__: Please set the discounts on the nested [order](#type-order) field instead. The discounts to include on the order. /// - /// The discounts to include on the order. + /// __Deprecated__: Please set the discounts on the nested [order](#type-order) field instead. The discounts to include on the order. [DataMember(Name="discounts", EmitDefaultValue=false)] public List Discounts { get; set; } /// @@ -97,6 +92,7 @@ public override string ToString() { var sb = new StringBuilder(); sb.Append("class CreateOrderRequest {\n"); + sb.Append(" Order: ").Append(Order).Append("\n"); sb.Append(" IdempotencyKey: ").Append(IdempotencyKey).Append("\n"); sb.Append(" ReferenceId: ").Append(ReferenceId).Append("\n"); sb.Append(" LineItems: ").Append(LineItems).Append("\n"); @@ -138,6 +134,11 @@ public bool Equals(CreateOrderRequest other) return false; return + ( + this.Order == other.Order || + this.Order != null && + this.Order.Equals(other.Order) + ) && ( this.IdempotencyKey == other.IdempotencyKey || this.IdempotencyKey != null && @@ -176,6 +177,8 @@ public override int GetHashCode() { int hash = 41; // Suitable nullity checks etc, of course :) + if (this.Order != null) + hash = hash * 59 + this.Order.GetHashCode(); if (this.IdempotencyKey != null) hash = hash * 59 + this.IdempotencyKey.GetHashCode(); if (this.ReferenceId != null) diff --git a/src/Square.Connect/Model/CreateOrderRequestDiscount.cs b/src/Square.Connect/Model/CreateOrderRequestDiscount.cs index 8c26422..806ddeb 100644 --- a/src/Square.Connect/Model/CreateOrderRequestDiscount.cs +++ b/src/Square.Connect/Model/CreateOrderRequestDiscount.cs @@ -24,7 +24,7 @@ namespace Square.Connect.Model { /// - /// Represents a discount that can apply to either a single line item or an entire order. + /// __Deprecated__: Please use the [OrderLineItemDiscount](#type-orderlineitemdiscount) type in the order field of [CreateOrderRequest](#type-createorderrequest) instead. Represents a discount that can apply to either a single line item or an entire order. /// [DataContract] public partial class CreateOrderRequestDiscount : IEquatable, IValidatableObject diff --git a/src/Square.Connect/Model/CreateOrderRequestLineItem.cs b/src/Square.Connect/Model/CreateOrderRequestLineItem.cs index 04a1865..032227f 100644 --- a/src/Square.Connect/Model/CreateOrderRequestLineItem.cs +++ b/src/Square.Connect/Model/CreateOrderRequestLineItem.cs @@ -24,7 +24,7 @@ namespace Square.Connect.Model { /// - /// Represents a line item to include in an order. Each line item describes a different product to purchase, with its own quantity and price details. Line items can either reference objects from the merchant's catalog, or can alternatively specify a name and price instead. + /// __Deprecated__: Please use the [OrderLineItem](#type-orderlineitem) type in the order field of [CreateOrderRequest](#type-createorderrequest) instead. Represents a line item to include in an order. Each line item describes a different product to purchase, with its own quantity and price details. Line items can either reference objects from the merchant's catalog, or can alternatively specify a name and price instead. /// [DataContract] public partial class CreateOrderRequestLineItem : IEquatable, IValidatableObject diff --git a/src/Square.Connect/Model/CreateOrderRequestModifier.cs b/src/Square.Connect/Model/CreateOrderRequestModifier.cs index 9718569..de92441 100644 --- a/src/Square.Connect/Model/CreateOrderRequestModifier.cs +++ b/src/Square.Connect/Model/CreateOrderRequestModifier.cs @@ -24,7 +24,7 @@ namespace Square.Connect.Model { /// - /// Represents a modifier applied to a single line item. Modifiers can reference existing objects in a merchant catalog or be constructed ad hoc at the time of purchase by providing a name and price. + /// __Deprecated__: Please use the [OrderLineItemModifier](#type-orderlineitemmodifier) type instead. Represents a modifier applied to a single line item. Modifiers can reference existing objects in a merchant catalog or be constructed ad hoc at the time of purchase by providing a name and price. /// [DataContract] public partial class CreateOrderRequestModifier : IEquatable, IValidatableObject diff --git a/src/Square.Connect/Model/CreateOrderRequestTax.cs b/src/Square.Connect/Model/CreateOrderRequestTax.cs index 804da62..ff4f55c 100644 --- a/src/Square.Connect/Model/CreateOrderRequestTax.cs +++ b/src/Square.Connect/Model/CreateOrderRequestTax.cs @@ -24,7 +24,7 @@ namespace Square.Connect.Model { /// - /// Represents a tax that can apply to either a single line item or an entire order. + /// __Deprecated__: Please use the [OrderLineItemTax](#type-orderlineitemtax) type in the order field of [CreateOrderRequest](#type-createorderrequest) instead. Represents a tax that can apply to either a single line item or an entire order. /// [DataContract] public partial class CreateOrderRequestTax : IEquatable, IValidatableObject diff --git a/src/Square.Connect/Model/Error.cs b/src/Square.Connect/Model/Error.cs index 5f29774..64294c5 100644 --- a/src/Square.Connect/Model/Error.cs +++ b/src/Square.Connect/Model/Error.cs @@ -562,6 +562,12 @@ public enum CodeEnum [EnumMember(Value = "METHOD_NOT_ALLOWED")] METHODNOTALLOWED, + /// + /// Enum NOTACCEPTABLE for "NOT_ACCEPTABLE" + /// + [EnumMember(Value = "NOT_ACCEPTABLE")] + NOTACCEPTABLE, + /// /// Enum REQUESTTIMEOUT for "REQUEST_TIMEOUT" /// diff --git a/src/Square.Connect/Model/ErrorCode.cs b/src/Square.Connect/Model/ErrorCode.cs index 130cc0c..ce1ca01 100644 --- a/src/Square.Connect/Model/ErrorCode.cs +++ b/src/Square.Connect/Model/ErrorCode.cs @@ -511,6 +511,12 @@ public enum ErrorCode [EnumMember(Value = "METHOD_NOT_ALLOWED")] METHODNOTALLOWED, + /// + /// Enum NOTACCEPTABLE for "NOT_ACCEPTABLE" + /// + [EnumMember(Value = "NOT_ACCEPTABLE")] + NOTACCEPTABLE, + /// /// Enum REQUESTTIMEOUT for "REQUEST_TIMEOUT" /// diff --git a/src/Square.Connect/Model/Order.cs b/src/Square.Connect/Model/Order.cs index 88723d7..4839e7c 100644 --- a/src/Square.Connect/Model/Order.cs +++ b/src/Square.Connect/Model/Order.cs @@ -40,11 +40,14 @@ protected Order() { } /// The order's unique ID. This value is only present for Order objects created by the Orders API through the [CreateOrder](#endpoint-createorder) endpoint.. /// The ID of the merchant location this order is associated with. (required). /// A client specified identifier to associate an entity in another system with this order.. - /// The line items included in the order. Every order has at least one line item. (required). + /// The line items included in the order.. + /// A list of taxes applied to this order. On read or retrieve, this list includes both order-level and item-level taxes. When creating an Order, set your order-level taxes in this list.. + /// A list of discounts applied to this order. On read or retrieve, this list includes both order-level and item-level discounts. When creating an Order, set your order-level discounts in this list.. + /// Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments.. /// The total amount of money to collect for the order.. /// The total tax amount of money to collect for the order.. /// The total discount amount of money to collect for the order.. - public Order(string Id = default(string), string LocationId = default(string), string ReferenceId = default(string), List LineItems = default(List), Money TotalMoney = default(Money), Money TotalTaxMoney = default(Money), Money TotalDiscountMoney = default(Money)) + public Order(string Id = default(string), string LocationId = default(string), string ReferenceId = default(string), List LineItems = default(List), List Taxes = default(List), List Discounts = default(List), List Fulfillments = default(List), Money TotalMoney = default(Money), Money TotalTaxMoney = default(Money), Money TotalDiscountMoney = default(Money)) { // to ensure "LocationId" is required (not null) if (LocationId == null) @@ -55,17 +58,12 @@ protected Order() { } { this.LocationId = LocationId; } - // to ensure "LineItems" is required (not null) - if (LineItems == null) - { - throw new InvalidDataException("LineItems is a required property for Order and cannot be null"); - } - else - { - this.LineItems = LineItems; - } this.Id = Id; this.ReferenceId = ReferenceId; + this.LineItems = LineItems; + this.Taxes = Taxes; + this.Discounts = Discounts; + this.Fulfillments = Fulfillments; this.TotalMoney = TotalMoney; this.TotalTaxMoney = TotalTaxMoney; this.TotalDiscountMoney = TotalDiscountMoney; @@ -90,12 +88,30 @@ protected Order() { } [DataMember(Name="reference_id", EmitDefaultValue=false)] public string ReferenceId { get; set; } /// - /// The line items included in the order. Every order has at least one line item. + /// The line items included in the order. /// - /// The line items included in the order. Every order has at least one line item. + /// The line items included in the order. [DataMember(Name="line_items", EmitDefaultValue=false)] public List LineItems { get; set; } /// + /// A list of taxes applied to this order. On read or retrieve, this list includes both order-level and item-level taxes. When creating an Order, set your order-level taxes in this list. + /// + /// A list of taxes applied to this order. On read or retrieve, this list includes both order-level and item-level taxes. When creating an Order, set your order-level taxes in this list. + [DataMember(Name="taxes", EmitDefaultValue=false)] + public List Taxes { get; set; } + /// + /// A list of discounts applied to this order. On read or retrieve, this list includes both order-level and item-level discounts. When creating an Order, set your order-level discounts in this list. + /// + /// A list of discounts applied to this order. On read or retrieve, this list includes both order-level and item-level discounts. When creating an Order, set your order-level discounts in this list. + [DataMember(Name="discounts", EmitDefaultValue=false)] + public List Discounts { get; set; } + /// + /// Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments. + /// + /// Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments. + [DataMember(Name="fulfillments", EmitDefaultValue=false)] + public List Fulfillments { get; set; } + /// /// The total amount of money to collect for the order. /// /// The total amount of money to collect for the order. @@ -125,6 +141,9 @@ public override string ToString() sb.Append(" LocationId: ").Append(LocationId).Append("\n"); sb.Append(" ReferenceId: ").Append(ReferenceId).Append("\n"); sb.Append(" LineItems: ").Append(LineItems).Append("\n"); + sb.Append(" Taxes: ").Append(Taxes).Append("\n"); + sb.Append(" Discounts: ").Append(Discounts).Append("\n"); + sb.Append(" Fulfillments: ").Append(Fulfillments).Append("\n"); sb.Append(" TotalMoney: ").Append(TotalMoney).Append("\n"); sb.Append(" TotalTaxMoney: ").Append(TotalTaxMoney).Append("\n"); sb.Append(" TotalDiscountMoney: ").Append(TotalDiscountMoney).Append("\n"); @@ -184,6 +203,21 @@ public bool Equals(Order other) this.LineItems != null && this.LineItems.SequenceEqual(other.LineItems) ) && + ( + this.Taxes == other.Taxes || + this.Taxes != null && + this.Taxes.SequenceEqual(other.Taxes) + ) && + ( + this.Discounts == other.Discounts || + this.Discounts != null && + this.Discounts.SequenceEqual(other.Discounts) + ) && + ( + this.Fulfillments == other.Fulfillments || + this.Fulfillments != null && + this.Fulfillments.SequenceEqual(other.Fulfillments) + ) && ( this.TotalMoney == other.TotalMoney || this.TotalMoney != null && @@ -220,6 +254,12 @@ public override int GetHashCode() hash = hash * 59 + this.ReferenceId.GetHashCode(); if (this.LineItems != null) hash = hash * 59 + this.LineItems.GetHashCode(); + if (this.Taxes != null) + hash = hash * 59 + this.Taxes.GetHashCode(); + if (this.Discounts != null) + hash = hash * 59 + this.Discounts.GetHashCode(); + if (this.Fulfillments != null) + hash = hash * 59 + this.Fulfillments.GetHashCode(); if (this.TotalMoney != null) hash = hash * 59 + this.TotalMoney.GetHashCode(); if (this.TotalTaxMoney != null) diff --git a/src/Square.Connect/Model/OrderFulfillment.cs b/src/Square.Connect/Model/OrderFulfillment.cs new file mode 100644 index 0000000..70f7684 --- /dev/null +++ b/src/Square.Connect/Model/OrderFulfillment.cs @@ -0,0 +1,214 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + +namespace Square.Connect.Model +{ + /// + /// Contains details on how to fulfill this order. + /// + [DataContract] + public partial class OrderFulfillment : IEquatable, IValidatableObject + { + /// + /// The type of the fulfillment. + /// + /// The type of the fulfillment. + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum PICKUP for "PICKUP" + /// + [EnumMember(Value = "PICKUP")] + PICKUP + } + + /// + /// The state of the fulfillment. + /// + /// The state of the fulfillment. + [JsonConverter(typeof(StringEnumConverter))] + public enum StateEnum + { + + /// + /// Enum PROPOSED for "PROPOSED" + /// + [EnumMember(Value = "PROPOSED")] + PROPOSED, + + /// + /// Enum RESERVED for "RESERVED" + /// + [EnumMember(Value = "RESERVED")] + RESERVED, + + /// + /// Enum PREPARED for "PREPARED" + /// + [EnumMember(Value = "PREPARED")] + PREPARED, + + /// + /// Enum COMPLETED for "COMPLETED" + /// + [EnumMember(Value = "COMPLETED")] + COMPLETED, + + /// + /// Enum CANCELED for "CANCELED" + /// + [EnumMember(Value = "CANCELED")] + CANCELED, + + /// + /// Enum FAILED for "FAILED" + /// + [EnumMember(Value = "FAILED")] + FAILED + } + + /// + /// The type of the fulfillment. + /// + /// The type of the fulfillment. + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum? Type { get; set; } + /// + /// The state of the fulfillment. + /// + /// The state of the fulfillment. + [DataMember(Name="state", EmitDefaultValue=false)] + public StateEnum? State { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The type of the fulfillment.. + /// The state of the fulfillment.. + /// Contains pickup-specific details. Required when fulfillment type is `PICKUP`.. + public OrderFulfillment(TypeEnum? Type = default(TypeEnum?), StateEnum? State = default(StateEnum?), OrderFulfillmentPickupDetails PickupDetails = default(OrderFulfillmentPickupDetails)) + { + this.Type = Type; + this.State = State; + this.PickupDetails = PickupDetails; + } + + /// + /// Contains pickup-specific details. Required when fulfillment type is `PICKUP`. + /// + /// Contains pickup-specific details. Required when fulfillment type is `PICKUP`. + [DataMember(Name="pickup_details", EmitDefaultValue=false)] + public OrderFulfillmentPickupDetails PickupDetails { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OrderFulfillment {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append(" PickupDetails: ").Append(PickupDetails).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as OrderFulfillment); + } + + /// + /// Returns true if OrderFulfillment instances are equal + /// + /// Instance of OrderFulfillment to be compared + /// Boolean + public bool Equals(OrderFulfillment other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Type == other.Type || + this.Type != null && + this.Type.Equals(other.Type) + ) && + ( + this.State == other.State || + this.State != null && + this.State.Equals(other.State) + ) && + ( + this.PickupDetails == other.PickupDetails || + this.PickupDetails != null && + this.PickupDetails.Equals(other.PickupDetails) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Type != null) + hash = hash * 59 + this.Type.GetHashCode(); + if (this.State != null) + hash = hash * 59 + this.State.GetHashCode(); + if (this.PickupDetails != null) + hash = hash * 59 + this.PickupDetails.GetHashCode(); + return hash; + } + } + + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Square.Connect/Model/OrderFulfillmentPickupDetails.cs b/src/Square.Connect/Model/OrderFulfillmentPickupDetails.cs new file mode 100644 index 0000000..4e3f619 --- /dev/null +++ b/src/Square.Connect/Model/OrderFulfillmentPickupDetails.cs @@ -0,0 +1,395 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + +namespace Square.Connect.Model +{ + /// + /// Contains details necessary to fulfill a pickup order. + /// + [DataContract] + public partial class OrderFulfillmentPickupDetails : IEquatable, IValidatableObject + { + /// + /// The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`. + /// + /// The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`. + [JsonConverter(typeof(StringEnumConverter))] + public enum ScheduleTypeEnum + { + + /// + /// Enum SCHEDULED for "SCHEDULED" + /// + [EnumMember(Value = "SCHEDULED")] + SCHEDULED, + + /// + /// Enum ASAP for "ASAP" + /// + [EnumMember(Value = "ASAP")] + ASAP + } + + /// + /// The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`. + /// + /// The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`. + [DataMember(Name="schedule_type", EmitDefaultValue=false)] + public ScheduleTypeEnum? ScheduleType { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The recipient of this pickup fulfillment.. + /// The expiry [timestamp](#workingwithdates) in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This timestamp indicates when the pickup fulfillment will expire if it is not accepted by the merchant. Expiration time can only be set up to 7 days in the future. If not set, this pickup fulfillment will be automatically accepted when placed.. + /// The auto completion duration in RFC3339 duration format, e.g., \"P1W3D\". If set, an open and accepted pickup fulfillment will automatically move to the `COMPLETED` state after this period of time. If not set, this pickup fulfillment will remain accepted until it is canceled or completed.. + /// The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`.. + /// The pickup [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". For fulfillments with the schedule type `ASAP`, this is automatically set to the current time plus the expected duration to prepare the fulfillment. This represents the start of the pickup window.. + /// The pickup window duration in RFC3339 duration format, e.g., \"P1W3D\". This duration represents the window of time for which the order should be picked up after the `pickup_at` time. Can be used as an informational guideline for merchants.. + /// The preparation time duration in RFC3339 duration format, e.g., \"P1W3D\". This duration indicates how long it takes the merchant to prepare this fulfillment.. + /// A general note about the pickup fulfillment. Notes are useful for providing additional instructions and are displayed in Square apps.. + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was placed.. + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was accepted by the merchant.. + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was rejected.. + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the merchant set the fulfillment as ready for pickup.. + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment expired.. + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was picked up by the recipient.. + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was canceled by the merchant or buyer.. + /// A description of why the pickup was canceled. Max length is 100 characters.. + public OrderFulfillmentPickupDetails(OrderFulfillmentRecipient Recipient = default(OrderFulfillmentRecipient), string ExpiresAt = default(string), string AutoCompleteDuration = default(string), ScheduleTypeEnum? ScheduleType = default(ScheduleTypeEnum?), string PickupAt = default(string), string PickupWindowDuration = default(string), string PrepTimeDuration = default(string), string Note = default(string), string PlacedAt = default(string), string AcceptedAt = default(string), string RejectedAt = default(string), string ReadyAt = default(string), string ExpiredAt = default(string), string PickedUpAt = default(string), string CanceledAt = default(string), string CancelReason = default(string)) + { + this.Recipient = Recipient; + this.ExpiresAt = ExpiresAt; + this.AutoCompleteDuration = AutoCompleteDuration; + this.ScheduleType = ScheduleType; + this.PickupAt = PickupAt; + this.PickupWindowDuration = PickupWindowDuration; + this.PrepTimeDuration = PrepTimeDuration; + this.Note = Note; + this.PlacedAt = PlacedAt; + this.AcceptedAt = AcceptedAt; + this.RejectedAt = RejectedAt; + this.ReadyAt = ReadyAt; + this.ExpiredAt = ExpiredAt; + this.PickedUpAt = PickedUpAt; + this.CanceledAt = CanceledAt; + this.CancelReason = CancelReason; + } + + /// + /// The recipient of this pickup fulfillment. + /// + /// The recipient of this pickup fulfillment. + [DataMember(Name="recipient", EmitDefaultValue=false)] + public OrderFulfillmentRecipient Recipient { get; set; } + /// + /// The expiry [timestamp](#workingwithdates) in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This timestamp indicates when the pickup fulfillment will expire if it is not accepted by the merchant. Expiration time can only be set up to 7 days in the future. If not set, this pickup fulfillment will be automatically accepted when placed. + /// + /// The expiry [timestamp](#workingwithdates) in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This timestamp indicates when the pickup fulfillment will expire if it is not accepted by the merchant. Expiration time can only be set up to 7 days in the future. If not set, this pickup fulfillment will be automatically accepted when placed. + [DataMember(Name="expires_at", EmitDefaultValue=false)] + public string ExpiresAt { get; set; } + /// + /// The auto completion duration in RFC3339 duration format, e.g., \"P1W3D\". If set, an open and accepted pickup fulfillment will automatically move to the `COMPLETED` state after this period of time. If not set, this pickup fulfillment will remain accepted until it is canceled or completed. + /// + /// The auto completion duration in RFC3339 duration format, e.g., \"P1W3D\". If set, an open and accepted pickup fulfillment will automatically move to the `COMPLETED` state after this period of time. If not set, this pickup fulfillment will remain accepted until it is canceled or completed. + [DataMember(Name="auto_complete_duration", EmitDefaultValue=false)] + public string AutoCompleteDuration { get; set; } + /// + /// The pickup [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". For fulfillments with the schedule type `ASAP`, this is automatically set to the current time plus the expected duration to prepare the fulfillment. This represents the start of the pickup window. + /// + /// The pickup [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\". For fulfillments with the schedule type `ASAP`, this is automatically set to the current time plus the expected duration to prepare the fulfillment. This represents the start of the pickup window. + [DataMember(Name="pickup_at", EmitDefaultValue=false)] + public string PickupAt { get; set; } + /// + /// The pickup window duration in RFC3339 duration format, e.g., \"P1W3D\". This duration represents the window of time for which the order should be picked up after the `pickup_at` time. Can be used as an informational guideline for merchants. + /// + /// The pickup window duration in RFC3339 duration format, e.g., \"P1W3D\". This duration represents the window of time for which the order should be picked up after the `pickup_at` time. Can be used as an informational guideline for merchants. + [DataMember(Name="pickup_window_duration", EmitDefaultValue=false)] + public string PickupWindowDuration { get; set; } + /// + /// The preparation time duration in RFC3339 duration format, e.g., \"P1W3D\". This duration indicates how long it takes the merchant to prepare this fulfillment. + /// + /// The preparation time duration in RFC3339 duration format, e.g., \"P1W3D\". This duration indicates how long it takes the merchant to prepare this fulfillment. + [DataMember(Name="prep_time_duration", EmitDefaultValue=false)] + public string PrepTimeDuration { get; set; } + /// + /// A general note about the pickup fulfillment. Notes are useful for providing additional instructions and are displayed in Square apps. + /// + /// A general note about the pickup fulfillment. Notes are useful for providing additional instructions and are displayed in Square apps. + [DataMember(Name="note", EmitDefaultValue=false)] + public string Note { get; set; } + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was placed. + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was placed. + [DataMember(Name="placed_at", EmitDefaultValue=false)] + public string PlacedAt { get; set; } + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was accepted by the merchant. + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was accepted by the merchant. + [DataMember(Name="accepted_at", EmitDefaultValue=false)] + public string AcceptedAt { get; set; } + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was rejected. + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was rejected. + [DataMember(Name="rejected_at", EmitDefaultValue=false)] + public string RejectedAt { get; set; } + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the merchant set the fulfillment as ready for pickup. + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the merchant set the fulfillment as ready for pickup. + [DataMember(Name="ready_at", EmitDefaultValue=false)] + public string ReadyAt { get; set; } + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment expired. + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment expired. + [DataMember(Name="expired_at", EmitDefaultValue=false)] + public string ExpiredAt { get; set; } + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was picked up by the recipient. + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was picked up by the recipient. + [DataMember(Name="picked_up_at", EmitDefaultValue=false)] + public string PickedUpAt { get; set; } + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was canceled by the merchant or buyer. + /// + /// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\", indicating when the fulfillment was canceled by the merchant or buyer. + [DataMember(Name="canceled_at", EmitDefaultValue=false)] + public string CanceledAt { get; set; } + /// + /// A description of why the pickup was canceled. Max length is 100 characters. + /// + /// A description of why the pickup was canceled. Max length is 100 characters. + [DataMember(Name="cancel_reason", EmitDefaultValue=false)] + public string CancelReason { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OrderFulfillmentPickupDetails {\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append(" AutoCompleteDuration: ").Append(AutoCompleteDuration).Append("\n"); + sb.Append(" ScheduleType: ").Append(ScheduleType).Append("\n"); + sb.Append(" PickupAt: ").Append(PickupAt).Append("\n"); + sb.Append(" PickupWindowDuration: ").Append(PickupWindowDuration).Append("\n"); + sb.Append(" PrepTimeDuration: ").Append(PrepTimeDuration).Append("\n"); + sb.Append(" Note: ").Append(Note).Append("\n"); + sb.Append(" PlacedAt: ").Append(PlacedAt).Append("\n"); + sb.Append(" AcceptedAt: ").Append(AcceptedAt).Append("\n"); + sb.Append(" RejectedAt: ").Append(RejectedAt).Append("\n"); + sb.Append(" ReadyAt: ").Append(ReadyAt).Append("\n"); + sb.Append(" ExpiredAt: ").Append(ExpiredAt).Append("\n"); + sb.Append(" PickedUpAt: ").Append(PickedUpAt).Append("\n"); + sb.Append(" CanceledAt: ").Append(CanceledAt).Append("\n"); + sb.Append(" CancelReason: ").Append(CancelReason).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as OrderFulfillmentPickupDetails); + } + + /// + /// Returns true if OrderFulfillmentPickupDetails instances are equal + /// + /// Instance of OrderFulfillmentPickupDetails to be compared + /// Boolean + public bool Equals(OrderFulfillmentPickupDetails other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Recipient == other.Recipient || + this.Recipient != null && + this.Recipient.Equals(other.Recipient) + ) && + ( + this.ExpiresAt == other.ExpiresAt || + this.ExpiresAt != null && + this.ExpiresAt.Equals(other.ExpiresAt) + ) && + ( + this.AutoCompleteDuration == other.AutoCompleteDuration || + this.AutoCompleteDuration != null && + this.AutoCompleteDuration.Equals(other.AutoCompleteDuration) + ) && + ( + this.ScheduleType == other.ScheduleType || + this.ScheduleType != null && + this.ScheduleType.Equals(other.ScheduleType) + ) && + ( + this.PickupAt == other.PickupAt || + this.PickupAt != null && + this.PickupAt.Equals(other.PickupAt) + ) && + ( + this.PickupWindowDuration == other.PickupWindowDuration || + this.PickupWindowDuration != null && + this.PickupWindowDuration.Equals(other.PickupWindowDuration) + ) && + ( + this.PrepTimeDuration == other.PrepTimeDuration || + this.PrepTimeDuration != null && + this.PrepTimeDuration.Equals(other.PrepTimeDuration) + ) && + ( + this.Note == other.Note || + this.Note != null && + this.Note.Equals(other.Note) + ) && + ( + this.PlacedAt == other.PlacedAt || + this.PlacedAt != null && + this.PlacedAt.Equals(other.PlacedAt) + ) && + ( + this.AcceptedAt == other.AcceptedAt || + this.AcceptedAt != null && + this.AcceptedAt.Equals(other.AcceptedAt) + ) && + ( + this.RejectedAt == other.RejectedAt || + this.RejectedAt != null && + this.RejectedAt.Equals(other.RejectedAt) + ) && + ( + this.ReadyAt == other.ReadyAt || + this.ReadyAt != null && + this.ReadyAt.Equals(other.ReadyAt) + ) && + ( + this.ExpiredAt == other.ExpiredAt || + this.ExpiredAt != null && + this.ExpiredAt.Equals(other.ExpiredAt) + ) && + ( + this.PickedUpAt == other.PickedUpAt || + this.PickedUpAt != null && + this.PickedUpAt.Equals(other.PickedUpAt) + ) && + ( + this.CanceledAt == other.CanceledAt || + this.CanceledAt != null && + this.CanceledAt.Equals(other.CanceledAt) + ) && + ( + this.CancelReason == other.CancelReason || + this.CancelReason != null && + this.CancelReason.Equals(other.CancelReason) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Recipient != null) + hash = hash * 59 + this.Recipient.GetHashCode(); + if (this.ExpiresAt != null) + hash = hash * 59 + this.ExpiresAt.GetHashCode(); + if (this.AutoCompleteDuration != null) + hash = hash * 59 + this.AutoCompleteDuration.GetHashCode(); + if (this.ScheduleType != null) + hash = hash * 59 + this.ScheduleType.GetHashCode(); + if (this.PickupAt != null) + hash = hash * 59 + this.PickupAt.GetHashCode(); + if (this.PickupWindowDuration != null) + hash = hash * 59 + this.PickupWindowDuration.GetHashCode(); + if (this.PrepTimeDuration != null) + hash = hash * 59 + this.PrepTimeDuration.GetHashCode(); + if (this.Note != null) + hash = hash * 59 + this.Note.GetHashCode(); + if (this.PlacedAt != null) + hash = hash * 59 + this.PlacedAt.GetHashCode(); + if (this.AcceptedAt != null) + hash = hash * 59 + this.AcceptedAt.GetHashCode(); + if (this.RejectedAt != null) + hash = hash * 59 + this.RejectedAt.GetHashCode(); + if (this.ReadyAt != null) + hash = hash * 59 + this.ReadyAt.GetHashCode(); + if (this.ExpiredAt != null) + hash = hash * 59 + this.ExpiredAt.GetHashCode(); + if (this.PickedUpAt != null) + hash = hash * 59 + this.PickedUpAt.GetHashCode(); + if (this.CanceledAt != null) + hash = hash * 59 + this.CanceledAt.GetHashCode(); + if (this.CancelReason != null) + hash = hash * 59 + this.CancelReason.GetHashCode(); + return hash; + } + } + + public IEnumerable Validate(ValidationContext validationContext) + { + // Note (string) maxLength + if(this.Note != null && this.Note.Length > 500) + { + yield return new ValidationResult("Invalid value for Note, length must be less than 500.", new [] { "Note" }); + } + + // CancelReason (string) maxLength + if(this.CancelReason != null && this.CancelReason.Length > 100) + { + yield return new ValidationResult("Invalid value for CancelReason, length must be less than 100.", new [] { "CancelReason" }); + } + + yield break; + } + } + +} diff --git a/src/Square.Connect/Model/OrderFulfillmentPickupDetailsScheduleType.cs b/src/Square.Connect/Model/OrderFulfillmentPickupDetailsScheduleType.cs new file mode 100644 index 0000000..734c5bd --- /dev/null +++ b/src/Square.Connect/Model/OrderFulfillmentPickupDetailsScheduleType.cs @@ -0,0 +1,47 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + +namespace Square.Connect.Model +{ + /// + /// The schedule type of the pickup fulfillment. + /// + /// The schedule type of the pickup fulfillment. + [JsonConverter(typeof(StringEnumConverter))] + public enum OrderFulfillmentPickupDetailsScheduleType + { + + /// + /// Enum SCHEDULED for "SCHEDULED" + /// + [EnumMember(Value = "SCHEDULED")] + SCHEDULED, + + /// + /// Enum ASAP for "ASAP" + /// + [EnumMember(Value = "ASAP")] + ASAP + } + +} diff --git a/src/Square.Connect/Model/OrderFulfillmentRecipient.cs b/src/Square.Connect/Model/OrderFulfillmentRecipient.cs new file mode 100644 index 0000000..1814b86 --- /dev/null +++ b/src/Square.Connect/Model/OrderFulfillmentRecipient.cs @@ -0,0 +1,188 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + +namespace Square.Connect.Model +{ + /// + /// The recipient of a fulfillment. + /// + [DataContract] + public partial class OrderFulfillmentRecipient : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The Customer ID of the customer associated with the fulfillment. If customer_id is provided, the corresponding recipient information fields (`display_name`, `email_address`, and `phone_number`) are automatically populated from the relevant customer profile. If the targeted profile information does not contain the necessary required information, the request will result in an error.. + /// The display name of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id.. + /// The email address of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id.. + /// The phone number of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id.. + public OrderFulfillmentRecipient(string CustomerId = default(string), string DisplayName = default(string), string EmailAddress = default(string), string PhoneNumber = default(string)) + { + this.CustomerId = CustomerId; + this.DisplayName = DisplayName; + this.EmailAddress = EmailAddress; + this.PhoneNumber = PhoneNumber; + } + + /// + /// The Customer ID of the customer associated with the fulfillment. If customer_id is provided, the corresponding recipient information fields (`display_name`, `email_address`, and `phone_number`) are automatically populated from the relevant customer profile. If the targeted profile information does not contain the necessary required information, the request will result in an error. + /// + /// The Customer ID of the customer associated with the fulfillment. If customer_id is provided, the corresponding recipient information fields (`display_name`, `email_address`, and `phone_number`) are automatically populated from the relevant customer profile. If the targeted profile information does not contain the necessary required information, the request will result in an error. + [DataMember(Name="customer_id", EmitDefaultValue=false)] + public string CustomerId { get; set; } + /// + /// The display name of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id. + /// + /// The display name of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id. + [DataMember(Name="display_name", EmitDefaultValue=false)] + public string DisplayName { get; set; } + /// + /// The email address of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id. + /// + /// The email address of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id. + [DataMember(Name="email_address", EmitDefaultValue=false)] + public string EmailAddress { get; set; } + /// + /// The phone number of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id. + /// + /// The phone number of the fulfillment recipient. If provided, overrides the value from customer profile indicated by customer_id. + [DataMember(Name="phone_number", EmitDefaultValue=false)] + public string PhoneNumber { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OrderFulfillmentRecipient {\n"); + sb.Append(" CustomerId: ").Append(CustomerId).Append("\n"); + sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); + sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as OrderFulfillmentRecipient); + } + + /// + /// Returns true if OrderFulfillmentRecipient instances are equal + /// + /// Instance of OrderFulfillmentRecipient to be compared + /// Boolean + public bool Equals(OrderFulfillmentRecipient other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.CustomerId == other.CustomerId || + this.CustomerId != null && + this.CustomerId.Equals(other.CustomerId) + ) && + ( + this.DisplayName == other.DisplayName || + this.DisplayName != null && + this.DisplayName.Equals(other.DisplayName) + ) && + ( + this.EmailAddress == other.EmailAddress || + this.EmailAddress != null && + this.EmailAddress.Equals(other.EmailAddress) + ) && + ( + this.PhoneNumber == other.PhoneNumber || + this.PhoneNumber != null && + this.PhoneNumber.Equals(other.PhoneNumber) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.CustomerId != null) + hash = hash * 59 + this.CustomerId.GetHashCode(); + if (this.DisplayName != null) + hash = hash * 59 + this.DisplayName.GetHashCode(); + if (this.EmailAddress != null) + hash = hash * 59 + this.EmailAddress.GetHashCode(); + if (this.PhoneNumber != null) + hash = hash * 59 + this.PhoneNumber.GetHashCode(); + return hash; + } + } + + public IEnumerable Validate(ValidationContext validationContext) + { + // DisplayName (string) maxLength + if(this.DisplayName != null && this.DisplayName.Length > 255) + { + yield return new ValidationResult("Invalid value for DisplayName, length must be less than 255.", new [] { "DisplayName" }); + } + + // EmailAddress (string) maxLength + if(this.EmailAddress != null && this.EmailAddress.Length > 255) + { + yield return new ValidationResult("Invalid value for EmailAddress, length must be less than 255.", new [] { "EmailAddress" }); + } + + // PhoneNumber (string) maxLength + if(this.PhoneNumber != null && this.PhoneNumber.Length > 16) + { + yield return new ValidationResult("Invalid value for PhoneNumber, length must be less than 16.", new [] { "PhoneNumber" }); + } + + yield break; + } + } + +} diff --git a/src/Square.Connect/Model/OrderFulfillmentState.cs b/src/Square.Connect/Model/OrderFulfillmentState.cs new file mode 100644 index 0000000..114d259 --- /dev/null +++ b/src/Square.Connect/Model/OrderFulfillmentState.cs @@ -0,0 +1,71 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + +namespace Square.Connect.Model +{ + /// + /// The state of the fulfillment. + /// + /// The state of the fulfillment. + [JsonConverter(typeof(StringEnumConverter))] + public enum OrderFulfillmentState + { + + /// + /// Enum PROPOSED for "PROPOSED" + /// + [EnumMember(Value = "PROPOSED")] + PROPOSED, + + /// + /// Enum RESERVED for "RESERVED" + /// + [EnumMember(Value = "RESERVED")] + RESERVED, + + /// + /// Enum PREPARED for "PREPARED" + /// + [EnumMember(Value = "PREPARED")] + PREPARED, + + /// + /// Enum COMPLETED for "COMPLETED" + /// + [EnumMember(Value = "COMPLETED")] + COMPLETED, + + /// + /// Enum CANCELED for "CANCELED" + /// + [EnumMember(Value = "CANCELED")] + CANCELED, + + /// + /// Enum FAILED for "FAILED" + /// + [EnumMember(Value = "FAILED")] + FAILED + } + +} diff --git a/src/Square.Connect/Model/OrderFulfillmentType.cs b/src/Square.Connect/Model/OrderFulfillmentType.cs new file mode 100644 index 0000000..f415a0b --- /dev/null +++ b/src/Square.Connect/Model/OrderFulfillmentType.cs @@ -0,0 +1,41 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + +namespace Square.Connect.Model +{ + /// + /// The type of fulfillment. + /// + /// The type of fulfillment. + [JsonConverter(typeof(StringEnumConverter))] + public enum OrderFulfillmentType + { + + /// + /// Enum PICKUP for "PICKUP" + /// + [EnumMember(Value = "PICKUP")] + PICKUP + } + +} diff --git a/src/Square.Connect/Model/OrderLineItem.cs b/src/Square.Connect/Model/OrderLineItem.cs index b299f23..023544f 100644 --- a/src/Square.Connect/Model/OrderLineItem.cs +++ b/src/Square.Connect/Model/OrderLineItem.cs @@ -43,8 +43,8 @@ protected OrderLineItem() { } /// The [CatalogItemVariation](#type-catalogitemvariation) id applied to this line item.. /// The name of the variation applied to this line item.. /// The [CatalogModifier](#type-catalogmodifier)s applied to this line item.. - /// The taxes applied to this line item.. - /// The discounts applied to this line item.. + /// A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list.. + /// A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list.. /// The base price for a single unit of the line item.. /// The gross sales amount of money calculated as (item base price + modifiers price) * quantity.. /// The total tax amount of money to collect for the line item.. @@ -112,15 +112,15 @@ protected OrderLineItem() { } [DataMember(Name="modifiers", EmitDefaultValue=false)] public List Modifiers { get; set; } /// - /// The taxes applied to this line item. + /// A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. /// - /// The taxes applied to this line item. + /// A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. [DataMember(Name="taxes", EmitDefaultValue=false)] public List Taxes { get; set; } /// - /// The discounts applied to this line item. + /// A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. /// - /// The discounts applied to this line item. + /// A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. [DataMember(Name="discounts", EmitDefaultValue=false)] public List Discounts { get; set; } /// diff --git a/src/Square.Connect/Model/OrderLineItemDiscount.cs b/src/Square.Connect/Model/OrderLineItemDiscount.cs index 60ac911..b805d43 100644 --- a/src/Square.Connect/Model/OrderLineItemDiscount.cs +++ b/src/Square.Connect/Model/OrderLineItemDiscount.cs @@ -69,9 +69,9 @@ public enum TypeEnum } /// - /// Indicates the level at which the discount applies. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values. + /// Indicates the level at which the discount applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values. /// - /// Indicates the level at which the discount applies. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values. + /// Indicates the level at which the discount applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values. [JsonConverter(typeof(StringEnumConverter))] public enum ScopeEnum { @@ -102,9 +102,9 @@ public enum ScopeEnum [DataMember(Name="type", EmitDefaultValue=false)] public TypeEnum? Type { get; set; } /// - /// Indicates the level at which the discount applies. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values. + /// Indicates the level at which the discount applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values. /// - /// Indicates the level at which the discount applies. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values. + /// Indicates the level at which the discount applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values. [DataMember(Name="scope", EmitDefaultValue=false)] public ScopeEnum? Scope { get; set; } /// @@ -116,7 +116,7 @@ public enum ScopeEnum /// The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount.. /// The total monetary amount of the applicable discount. If it is at order level, it is the value of the order level discount. If it is at line item level, it is the value of the line item level discount. The amount_money won't be set for a percentage-based discount.. /// The amount of discount actually applied to this line item. Represents the amount of money applied to a line item as a discount When an amount-based discount is at order-level, this value is different from `amount_money` because the discount is distributed across the line items.. - /// Indicates the level at which the discount applies. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values.. + /// Indicates the level at which the discount applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values.. public OrderLineItemDiscount(string CatalogObjectId = default(string), string Name = default(string), TypeEnum? Type = default(TypeEnum?), string Percentage = default(string), Money AmountMoney = default(Money), Money AppliedMoney = default(Money), ScopeEnum? Scope = default(ScopeEnum?)) { this.CatalogObjectId = CatalogObjectId; diff --git a/src/Square.Connect/Model/OrderLineItemTax.cs b/src/Square.Connect/Model/OrderLineItemTax.cs index 307f585..9854d2a 100644 --- a/src/Square.Connect/Model/OrderLineItemTax.cs +++ b/src/Square.Connect/Model/OrderLineItemTax.cs @@ -56,6 +56,33 @@ public enum TypeEnum INCLUSIVE } + /// + /// Indicates the level at which the tax applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values. + /// + /// Indicates the level at which the tax applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values. + [JsonConverter(typeof(StringEnumConverter))] + public enum ScopeEnum + { + + /// + /// Enum OTHERTAXSCOPE for "OTHER_TAX_SCOPE" + /// + [EnumMember(Value = "OTHER_TAX_SCOPE")] + OTHERTAXSCOPE, + + /// + /// Enum LINEITEM for "LINE_ITEM" + /// + [EnumMember(Value = "LINE_ITEM")] + LINEITEM, + + /// + /// Enum ORDER for "ORDER" + /// + [EnumMember(Value = "ORDER")] + ORDER + } + /// /// Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values. /// @@ -63,6 +90,12 @@ public enum TypeEnum [DataMember(Name="type", EmitDefaultValue=false)] public TypeEnum? Type { get; set; } /// + /// Indicates the level at which the tax applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values. + /// + /// Indicates the level at which the tax applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values. + [DataMember(Name="scope", EmitDefaultValue=false)] + public ScopeEnum? Scope { get; set; } + /// /// Initializes a new instance of the class. /// /// The catalog object id referencing [CatalogTax](#type-catalogtax).. @@ -70,13 +103,15 @@ public enum TypeEnum /// Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values.. /// The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%.. /// The amount of the money applied by the tax in an order.. - public OrderLineItemTax(string CatalogObjectId = default(string), string Name = default(string), TypeEnum? Type = default(TypeEnum?), string Percentage = default(string), Money AppliedMoney = default(Money)) + /// Indicates the level at which the tax applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values.. + public OrderLineItemTax(string CatalogObjectId = default(string), string Name = default(string), TypeEnum? Type = default(TypeEnum?), string Percentage = default(string), Money AppliedMoney = default(Money), ScopeEnum? Scope = default(ScopeEnum?)) { this.CatalogObjectId = CatalogObjectId; this.Name = Name; this.Type = Type; this.Percentage = Percentage; this.AppliedMoney = AppliedMoney; + this.Scope = Scope; } /// @@ -116,6 +151,7 @@ public override string ToString() sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Percentage: ").Append(Percentage).Append("\n"); sb.Append(" AppliedMoney: ").Append(AppliedMoney).Append("\n"); + sb.Append(" Scope: ").Append(Scope).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -176,6 +212,11 @@ public bool Equals(OrderLineItemTax other) this.AppliedMoney == other.AppliedMoney || this.AppliedMoney != null && this.AppliedMoney.Equals(other.AppliedMoney) + ) && + ( + this.Scope == other.Scope || + this.Scope != null && + this.Scope.Equals(other.Scope) ); } @@ -200,6 +241,8 @@ public override int GetHashCode() hash = hash * 59 + this.Percentage.GetHashCode(); if (this.AppliedMoney != null) hash = hash * 59 + this.AppliedMoney.GetHashCode(); + if (this.Scope != null) + hash = hash * 59 + this.Scope.GetHashCode(); return hash; } } diff --git a/src/Square.Connect/Model/OrderLineItemTaxScope.cs b/src/Square.Connect/Model/OrderLineItemTaxScope.cs new file mode 100644 index 0000000..a2ec382 --- /dev/null +++ b/src/Square.Connect/Model/OrderLineItemTaxScope.cs @@ -0,0 +1,53 @@ +/* + * Square Connect API + * + * Client library for accessing the Square Connect APIs + * + * OpenAPI spec version: 2.0 + * Contact: developers@squareup.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + +namespace Square.Connect.Model +{ + /// + /// Indicates whether this is a line item or order level tax. + /// + /// Indicates whether this is a line item or order level tax. + [JsonConverter(typeof(StringEnumConverter))] + public enum OrderLineItemTaxScope + { + + /// + /// Enum OTHERTAXSCOPE for "OTHER_TAX_SCOPE" + /// + [EnumMember(Value = "OTHER_TAX_SCOPE")] + OTHERTAXSCOPE, + + /// + /// Enum LINEITEM for "LINE_ITEM" + /// + [EnumMember(Value = "LINE_ITEM")] + LINEITEM, + + /// + /// Enum ORDER for "ORDER" + /// + [EnumMember(Value = "ORDER")] + ORDER + } + +} diff --git a/src/Square.Connect/Model/V1Timecard.cs b/src/Square.Connect/Model/V1Timecard.cs index 38c38ea..a879595 100644 --- a/src/Square.Connect/Model/V1Timecard.cs +++ b/src/Square.Connect/Model/V1Timecard.cs @@ -42,7 +42,7 @@ protected V1Timecard() { } /// If true, the timecard was deleted by the merchant, and it is no longer valid.. /// The clock-in time for the timecard, in ISO 8601 format.. /// The clock-out time for the timecard, in ISO 8601 format. Provide this value only if importing timecard information from another system.. - /// The ID of the location the employee clocked in from. We strongly reccomend providing a clockin_location_id. Square uses the clockin_location_id to determine a timecard’s timezone and overtime rules.. + /// The ID of the location the employee clocked in from. We strongly reccomend providing a clockin_location_id. Square uses the clockin_location_id to determine a timecard���s timezone and overtime rules.. /// The ID of the location the employee clocked out from. Provide this value only if importing timecard information from another system.. /// The time when the timecard was created, in ISO 8601 format.. /// The time when the timecard was most recently updated, in ISO 8601 format.. @@ -104,9 +104,9 @@ protected V1Timecard() { } [DataMember(Name="clockout_time", EmitDefaultValue=false)] public string ClockoutTime { get; set; } /// - /// The ID of the location the employee clocked in from. We strongly reccomend providing a clockin_location_id. Square uses the clockin_location_id to determine a timecard’s timezone and overtime rules. + /// The ID of the location the employee clocked in from. We strongly reccomend providing a clockin_location_id. Square uses the clockin_location_id to determine a timecard���s timezone and overtime rules. /// - /// The ID of the location the employee clocked in from. We strongly reccomend providing a clockin_location_id. Square uses the clockin_location_id to determine a timecard’s timezone and overtime rules. + /// The ID of the location the employee clocked in from. We strongly reccomend providing a clockin_location_id. Square uses the clockin_location_id to determine a timecard���s timezone and overtime rules. [DataMember(Name="clockin_location_id", EmitDefaultValue=false)] public string ClockinLocationId { get; set; } /// diff --git a/src/Square.Connect/Properties/AssemblyInfo.cs b/src/Square.Connect/Properties/AssemblyInfo.cs index cef3068..0658cd6 100644 --- a/src/Square.Connect/Properties/AssemblyInfo.cs +++ b/src/Square.Connect/Properties/AssemblyInfo.cs @@ -28,6 +28,6 @@ // 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.13.0")] -[assembly: AssemblyFileVersion("2.13.0")] -[assembly: AssemblyInformationalVersion("Square-Connect-CSharp/2.20181212.0")] +[assembly: AssemblyVersion("2.14.0")] +[assembly: AssemblyFileVersion("2.14.0")] +[assembly: AssemblyInformationalVersion("Square-Connect-CSharp/2.20190213.0")] diff --git a/src/Square.Connect/Square.Connect.nuspec b/src/Square.Connect/Square.Connect.nuspec index 775c6c5..80b0a31 100644 --- a/src/Square.Connect/Square.Connect.nuspec +++ b/src/Square.Connect/Square.Connect.nuspec @@ -6,7 +6,7 @@ Square.Connect - 2.13.0 + 2.14.0 Square