square_connect 2.2.1.145 → 2.3.0.153
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -1
- data/docs/BatchRetrieveOrdersRequest.md +12 -0
- data/docs/BatchRetrieveOrdersResponse.md +13 -0
- data/docs/CatalogItemVariation.md +1 -1
- data/docs/CatalogObject.md +1 -1
- data/docs/CatalogV1Id.md +2 -2
- data/docs/CreateOrderRequest.md +5 -4
- data/docs/CreateOrderRequestDiscount.md +5 -4
- data/docs/CreateOrderRequestLineItem.md +10 -6
- data/docs/CreateOrderRequestModifier.md +12 -0
- data/docs/CreateOrderRequestTax.md +5 -4
- data/docs/CreateOrderResponse.md +13 -0
- data/docs/Currency.md +1 -0
- data/docs/CustomersApi.md +1 -1
- data/docs/ErrorCode.md +2 -0
- data/docs/ItemVariationLocationOverrides.md +5 -5
- data/docs/Location.md +9 -1
- data/docs/LocationStatus.md +13 -0
- data/docs/Order.md +1 -0
- data/docs/OrderLineItem.md +6 -1
- data/docs/OrderLineItemDiscount.md +1 -0
- data/docs/OrderLineItemDiscountScope.md +1 -0
- data/docs/OrderLineItemDiscountType.md +1 -1
- data/docs/OrderLineItemModifier.md +15 -0
- data/docs/OrderLineItemTax.md +1 -0
- data/docs/OrderLineItemTaxType.md +1 -1
- data/docs/OrdersApi.md +120 -0
- data/docs/SearchCatalogObjectsRequest.md +1 -1
- data/docs/Transaction.md +1 -1
- data/docs/TransactionsApi.md +1 -1
- data/docs/V1Payment.md +3 -3
- data/docs/V1Refund.md +0 -5
- data/lib/square_connect/api/customers_api.rb +2 -2
- data/lib/square_connect/api/orders_api.rb +134 -0
- data/lib/square_connect/api/transactions_api.rb +2 -2
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/models/batch_retrieve_orders_request.rb +193 -0
- data/lib/square_connect/models/batch_retrieve_orders_response.rb +200 -0
- data/lib/square_connect/models/catalog_item_variation.rb +1 -1
- data/lib/square_connect/models/catalog_object.rb +1 -1
- data/lib/square_connect/models/catalog_v1_id.rb +2 -2
- data/lib/square_connect/models/charge_request.rb +108 -0
- data/lib/square_connect/models/create_checkout_request.rb +16 -0
- data/lib/square_connect/models/create_order_request.rb +31 -5
- data/lib/square_connect/models/create_order_request_discount.rb +47 -5
- data/lib/square_connect/models/create_order_request_line_item.rb +106 -7
- data/lib/square_connect/models/create_order_request_modifier.rb +219 -0
- data/lib/square_connect/models/create_order_request_tax.rb +49 -7
- data/lib/square_connect/models/create_order_response.rb +198 -0
- data/lib/square_connect/models/create_refund_request.rb +72 -0
- data/lib/square_connect/models/currency.rb +1 -0
- data/lib/square_connect/models/error.rb +2 -2
- data/lib/square_connect/models/error_code.rb +2 -0
- data/lib/square_connect/models/item_variation_location_overrides.rb +5 -5
- data/lib/square_connect/models/location.rb +121 -5
- data/lib/square_connect/models/location_status.rb +19 -0
- data/lib/square_connect/models/money.rb +27 -2
- data/lib/square_connect/models/order.rb +11 -1
- data/lib/square_connect/models/order_line_item.rb +54 -2
- data/lib/square_connect/models/order_line_item_discount.rb +15 -5
- data/lib/square_connect/models/order_line_item_discount_scope.rb +1 -0
- data/lib/square_connect/models/order_line_item_discount_type.rb +1 -1
- data/lib/square_connect/models/order_line_item_modifier.rb +216 -0
- data/lib/square_connect/models/order_line_item_tax.rb +13 -3
- data/lib/square_connect/models/order_line_item_tax_type.rb +1 -1
- data/lib/square_connect/models/search_catalog_objects_request.rb +1 -1
- data/lib/square_connect/models/transaction.rb +14 -14
- data/lib/square_connect/models/v1_payment.rb +3 -0
- data/lib/square_connect/models/v1_refund.rb +1 -51
- data/lib/square_connect/version.rb +1 -1
- data/lib/square_connect.rb +7 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e55021916b5ca6827b4df313b54e19750146f89
|
4
|
+
data.tar.gz: 5ecbba7d5ff3bc43ea48f1d3ed7d7dcdc3bafbe8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faeabf0b23f80dcfcecd96b168d017502b047969d6a28cf5dac938450ec420e81b8faefe6d3a9b1e4b2dab81550d7704020e3df6e9678b44f0d6bace9d195e9e
|
7
|
+
data.tar.gz: 7b4cc05b96b8e3d5ed548e55522579c4983925f31ea7f4d348f2bef3c0107a0a76565e6c0da0de10f6e63134278598d2137d2bc7b4c66efcc7c419f7b44685c1
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ for the specification and template files we used to generate this.
|
|
10
10
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
11
11
|
|
12
12
|
- API version: 2.0
|
13
|
-
- Package version: 2.
|
13
|
+
- Package version: 2.3.0
|
14
14
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
15
15
|
|
16
16
|
For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)
|
@@ -98,6 +98,8 @@ Class | Method | HTTP request | Description
|
|
98
98
|
*SquareConnect::CustomersApi* | [**retrieve_customer**](docs/CustomersApi.md#retrieve_customer) | **GET** /v2/customers/{customer_id} | RetrieveCustomer
|
99
99
|
*SquareConnect::CustomersApi* | [**update_customer**](docs/CustomersApi.md#update_customer) | **PUT** /v2/customers/{customer_id} | UpdateCustomer
|
100
100
|
*SquareConnect::LocationsApi* | [**list_locations**](docs/LocationsApi.md#list_locations) | **GET** /v2/locations | ListLocations
|
101
|
+
*SquareConnect::OrdersApi* | [**batch_retrieve_orders**](docs/OrdersApi.md#batch_retrieve_orders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders
|
102
|
+
*SquareConnect::OrdersApi* | [**create_order**](docs/OrdersApi.md#create_order) | **POST** /v2/locations/{location_id}/orders | CreateOrder
|
101
103
|
*SquareConnect::TransactionsApi* | [**capture_transaction**](docs/TransactionsApi.md#capture_transaction) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/capture | CaptureTransaction
|
102
104
|
*SquareConnect::TransactionsApi* | [**charge**](docs/TransactionsApi.md#charge) | **POST** /v2/locations/{location_id}/transactions | Charge
|
103
105
|
*SquareConnect::TransactionsApi* | [**create_refund**](docs/TransactionsApi.md#create_refund) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/refund | CreateRefund
|
@@ -183,6 +185,8 @@ Class | Method | HTTP request | Description
|
|
183
185
|
- [SquareConnect::BatchDeleteCatalogObjectsResponse](docs/BatchDeleteCatalogObjectsResponse.md)
|
184
186
|
- [SquareConnect::BatchRetrieveCatalogObjectsRequest](docs/BatchRetrieveCatalogObjectsRequest.md)
|
185
187
|
- [SquareConnect::BatchRetrieveCatalogObjectsResponse](docs/BatchRetrieveCatalogObjectsResponse.md)
|
188
|
+
- [SquareConnect::BatchRetrieveOrdersRequest](docs/BatchRetrieveOrdersRequest.md)
|
189
|
+
- [SquareConnect::BatchRetrieveOrdersResponse](docs/BatchRetrieveOrdersResponse.md)
|
186
190
|
- [SquareConnect::BatchUpsertCatalogObjectsRequest](docs/BatchUpsertCatalogObjectsRequest.md)
|
187
191
|
- [SquareConnect::BatchUpsertCatalogObjectsResponse](docs/BatchUpsertCatalogObjectsResponse.md)
|
188
192
|
- [SquareConnect::CaptureTransactionRequest](docs/CaptureTransactionRequest.md)
|
@@ -231,7 +235,9 @@ Class | Method | HTTP request | Description
|
|
231
235
|
- [SquareConnect::CreateOrderRequest](docs/CreateOrderRequest.md)
|
232
236
|
- [SquareConnect::CreateOrderRequestDiscount](docs/CreateOrderRequestDiscount.md)
|
233
237
|
- [SquareConnect::CreateOrderRequestLineItem](docs/CreateOrderRequestLineItem.md)
|
238
|
+
- [SquareConnect::CreateOrderRequestModifier](docs/CreateOrderRequestModifier.md)
|
234
239
|
- [SquareConnect::CreateOrderRequestTax](docs/CreateOrderRequestTax.md)
|
240
|
+
- [SquareConnect::CreateOrderResponse](docs/CreateOrderResponse.md)
|
235
241
|
- [SquareConnect::CreateRefundRequest](docs/CreateRefundRequest.md)
|
236
242
|
- [SquareConnect::CreateRefundResponse](docs/CreateRefundResponse.md)
|
237
243
|
- [SquareConnect::Currency](docs/Currency.md)
|
@@ -262,12 +268,14 @@ Class | Method | HTTP request | Description
|
|
262
268
|
- [SquareConnect::ListTransactionsResponse](docs/ListTransactionsResponse.md)
|
263
269
|
- [SquareConnect::Location](docs/Location.md)
|
264
270
|
- [SquareConnect::LocationCapability](docs/LocationCapability.md)
|
271
|
+
- [SquareConnect::LocationStatus](docs/LocationStatus.md)
|
265
272
|
- [SquareConnect::Money](docs/Money.md)
|
266
273
|
- [SquareConnect::Order](docs/Order.md)
|
267
274
|
- [SquareConnect::OrderLineItem](docs/OrderLineItem.md)
|
268
275
|
- [SquareConnect::OrderLineItemDiscount](docs/OrderLineItemDiscount.md)
|
269
276
|
- [SquareConnect::OrderLineItemDiscountScope](docs/OrderLineItemDiscountScope.md)
|
270
277
|
- [SquareConnect::OrderLineItemDiscountType](docs/OrderLineItemDiscountType.md)
|
278
|
+
- [SquareConnect::OrderLineItemModifier](docs/OrderLineItemModifier.md)
|
271
279
|
- [SquareConnect::OrderLineItemTax](docs/OrderLineItemTax.md)
|
272
280
|
- [SquareConnect::OrderLineItemTaxType](docs/OrderLineItemTaxType.md)
|
273
281
|
- [SquareConnect::Refund](docs/Refund.md)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# SquareConnect::BatchRetrieveOrdersRequest
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**order_ids** | **Array<String>** | The IDs of the orders to retrieve. A maximum of 100 orders can be retrieved per request. |
|
11
|
+
|
12
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# SquareConnect::BatchRetrieveOrdersResponse
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
Defines the fields that are included in the response body of a request to the [BatchRetrieveOrders](#endpoint-batchretrieveorders) endpoint.
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**orders** | [**Array<Order>**](Order.md) | The requested orders. This will omit any requested orders that do not exist or are not charged. | [optional]
|
11
|
+
**errors** | [**Array<Error>**](Error.md) | Any errors that occurred during the request. | [optional]
|
12
|
+
|
13
|
+
|
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
|
|
13
13
|
**upc** | **String** | The item variation's UPC, if any. Searchable. | [optional]
|
14
14
|
**pricing_type** | **String** | Indicates whether the item variation's price is fixed or determined at the time of sale. See [CatalogPricingType](#type-catalogpricingtype) for all possible values. | [optional]
|
15
15
|
**price_money** | [**Money**](Money.md) | The item variation's price, if fixed pricing is used. | [optional]
|
16
|
-
**location_overrides** | [**Array<ItemVariationLocationOverrides>**](ItemVariationLocationOverrides.md) | Per-[location]
|
16
|
+
**location_overrides** | [**Array<ItemVariationLocationOverrides>**](ItemVariationLocationOverrides.md) | Per-[location](#type-location) price and inventory overrides. | [optional]
|
17
17
|
**track_inventory** | **BOOLEAN** | If `true`, inventory tracking is active for the variation. | [optional]
|
18
18
|
**inventory_alert_type** | **String** | 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]
|
19
19
|
**inventory_alert_threshold** | **Integer** | 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]
|
data/docs/CatalogObject.md
CHANGED
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
|
|
12
12
|
**updated_at** | **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]
|
13
13
|
**version** | **Integer** | 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]
|
14
14
|
**is_deleted** | **BOOLEAN** | 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]
|
15
|
-
**catalog_v1_ids** | [**Array<CatalogV1Id>**](CatalogV1Id.md) | The Connect V1 IDs for this object at each [location]
|
15
|
+
**catalog_v1_ids** | [**Array<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]
|
16
16
|
**present_at_all_locations** | **BOOLEAN** | If `true`, this object is present at all locations (including future locations), except where specified in the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations), except where specified in the `present_at_location_ids` field. | [optional]
|
17
17
|
**present_at_location_ids** | **Array<String>** | A list of locations where the object is present, even if `present_at_all_locations` is `false`. | [optional]
|
18
18
|
**absent_at_location_ids** | **Array<String>** | A list of locations where the object is not present, even if `present_at_all_locations` is `true`. | [optional]
|
data/docs/CatalogV1Id.md
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
### Description
|
4
4
|
|
5
|
-
An Items Connect V1 object ID along with its associated [location]
|
5
|
+
An Items Connect V1 object ID along with its associated [location](#type-location) ID.
|
6
6
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
10
|
**catalog_v1_id** | **String** | The ID for an object in Connect V1, if different from its Connect V2 ID. | [optional]
|
11
|
-
**location_id** | **String** | The ID of the [location]
|
11
|
+
**location_id** | **String** | The ID of the [location](#type-location) this Connect V1 ID is associated with. | [optional]
|
12
12
|
|
13
13
|
|
data/docs/CreateOrderRequest.md
CHANGED
@@ -2,14 +2,15 @@
|
|
2
2
|
|
3
3
|
### Description
|
4
4
|
|
5
|
-
|
5
|
+
|
6
6
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
|
+
**idempotency_key** | **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]
|
10
11
|
**reference_id** | **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]
|
11
|
-
**line_items** | [**Array<CreateOrderRequestLineItem>**](CreateOrderRequestLineItem.md) | The line items to associate with this order. Each line item represents a different product
|
12
|
-
**taxes** | [**Array<CreateOrderRequestTax>**](CreateOrderRequestTax.md) | The taxes include the
|
13
|
-
**discounts** | [**Array<CreateOrderRequestDiscount>**](CreateOrderRequestDiscount.md) | The discounts include the
|
12
|
+
**line_items** | [**Array<CreateOrderRequestLineItem>**](CreateOrderRequestLineItem.md) | The line items to associate with this order. Each line item represents a different product to include in a purchase. |
|
13
|
+
**taxes** | [**Array<CreateOrderRequestTax>**](CreateOrderRequestTax.md) | The taxes to include on the order. | [optional]
|
14
|
+
**discounts** | [**Array<CreateOrderRequestDiscount>**](CreateOrderRequestDiscount.md) | The discounts to include on the order. | [optional]
|
14
15
|
|
15
16
|
|
@@ -2,13 +2,14 @@
|
|
2
2
|
|
3
3
|
### Description
|
4
4
|
|
5
|
-
Represents a discount that to either a single line item or an entire order.
|
5
|
+
Represents a discount that can apply to either a single line item or an entire order.
|
6
6
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
|
-
**
|
11
|
-
**
|
12
|
-
**
|
10
|
+
**catalog_object_id** | **String** | Only used for catalog taxes. The catalog object ID from exsiting [CatalogDiscount](#type-catalogdiscount). Do not provide a value for this field if you provide values in other fields for an ad hoc discount. | [optional]
|
11
|
+
**name** | **String** | Only used for ad hoc discounts. The discount's name. | [optional]
|
12
|
+
**percentage** | **String** | Only used for ad hoc discounts. The percentage of the discount, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. This value range between 0.0 up to 100.0 | [optional]
|
13
|
+
**amount_money** | [**Money**](Money.md) | Only used for ad hoc discounts. The monetary amount of the discount. | [optional]
|
13
14
|
|
14
15
|
|
@@ -2,15 +2,19 @@
|
|
2
2
|
|
3
3
|
### Description
|
4
4
|
|
5
|
-
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.
|
5
|
+
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.
|
6
6
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
|
-
**name** | **String** | The name of the line item. This value cannot exceed 500 characters. | [optional]
|
11
|
-
**quantity** | **String** | The quantity to purchase, as a string representation of a number.
|
12
|
-
**base_price_money** | [**Money**](Money.md) | The base price for a single unit of the line item's associated variation.
|
13
|
-
**
|
14
|
-
**
|
10
|
+
**name** | **String** | Only used for ad hoc line items. The name of the line item. This value cannot exceed 500 characters. Do not provide a value for this field if you provide values in catalog_object_id. | [optional]
|
11
|
+
**quantity** | **String** | The quantity to purchase, as a string representation of a number. This string must have a positive integer value. |
|
12
|
+
**base_price_money** | [**Money**](Money.md) | Only used for ad hoc line items. The base price for a single unit of the line item's associated variation. Do not provide a value for this field if you provide a value for the `catalog_object_id`. | [optional]
|
13
|
+
**variation_name** | **String** | Only used for ad hoc line items. The variation name of the line item. This value cannot exceed 255 characters. If this value is not set for an ad hoc line item, the default value of `Regular` is used. Do not provide a value for this field if you provide a value for the `catalog_object_id`. | [optional]
|
14
|
+
**note** | **String** | The note of the line item. This value cannot exceed 50 characters. | [optional]
|
15
|
+
**catalog_object_id** | **String** | Only used for Catalog line items. The catalog object ID from existing [CatalogItemVariation](#type-catalogitemvariation). Do not provide a value for this field if you provide a value for `name` and `base_price_money`. | [optional]
|
16
|
+
**modifiers** | [**Array<CreateOrderRequestModifier>**](CreateOrderRequestModifier.md) | Only used for Catalog line items. The modifiers to include on the line item. | [optional]
|
17
|
+
**taxes** | [**Array<CreateOrderRequestTax>**](CreateOrderRequestTax.md) | The taxes to include on the line item. | [optional]
|
18
|
+
**discounts** | [**Array<CreateOrderRequestDiscount>**](CreateOrderRequestDiscount.md) | The discounts to include on the line item. | [optional]
|
15
19
|
|
16
20
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# SquareConnect::CreateOrderRequestModifier
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
Represents a modifier applied to a single line item.
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**catalog_object_id** | **String** | The catalog object ID of a [CatalogModifier](#type-catalogmodifier). |
|
11
|
+
|
12
|
+
|
@@ -2,13 +2,14 @@
|
|
2
2
|
|
3
3
|
### Description
|
4
4
|
|
5
|
-
Represents a tax that
|
5
|
+
Represents a tax that can apply to either a single line item or an entire order.
|
6
6
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
|
-
**
|
11
|
-
**
|
12
|
-
**
|
10
|
+
**catalog_object_id** | **String** | Only used for catalog taxes. The catalog object ID of an existing [CatalogTax](#type-catalogtax). Do not provide a value for this field if you provide values in other fields for an ad hoc tax. | [optional]
|
11
|
+
**name** | **String** | Only used for ad hoc taxes. The tax's name. Do not provide a value for this field if you set catalog_object_id. | [optional]
|
12
|
+
**type** | **String** | Only used for ad hoc taxes. Indicates the calculation method used to apply the line item tax. Default: `ADDITIVE`; See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values. | [optional]
|
13
|
+
**percentage** | **String** | Only used for ad hoc taxes. 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%. This value range between 0.0 up to 100.0 | [optional]
|
13
14
|
|
14
15
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# SquareConnect::CreateOrderResponse
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
Defines the fields that are included in the response body of a request to the [CreateOrder](#endpoint-createorder) endpoint. One of `errors` or `order` is present in a given response (never both).
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**order** | [**Order**](Order.md) | The newly created order. | [optional]
|
11
|
+
**errors** | [**Array<Error>**](Error.md) | Any errors that occurred during the request. | [optional]
|
12
|
+
|
13
|
+
|
data/docs/Currency.md
CHANGED
data/docs/CustomersApi.md
CHANGED
@@ -70,7 +70,7 @@ Name | Type | Description | Notes
|
|
70
70
|
|
71
71
|
CreateCustomerCard
|
72
72
|
|
73
|
-
Adds a card on file to an existing customer. In the United States Square takes care of automatically updating any cards on file that might have expired since you first attached them to a customer.
|
73
|
+
Adds a card on file to an existing customer. In the United States Square takes care of automatically updating any cards on file that might have expired since you first attached them to a customer. As with charges, calls to `CreateCustomerCard` are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call.
|
74
74
|
|
75
75
|
### Example
|
76
76
|
```ruby
|
data/docs/ErrorCode.md
CHANGED
@@ -34,6 +34,8 @@ Name | Type
|
|
34
34
|
**VALUE_TOO_LOW** | string
|
35
35
|
**VALUE_TOO_HIGH** | string
|
36
36
|
**VALUE_EMPTY** | string
|
37
|
+
**ARRAY_LENGTH_TOO_LONG** | string
|
38
|
+
**ARRAY_LENGTH_TOO_SHORT** | string
|
37
39
|
**ARRAY_EMPTY** | string
|
38
40
|
**EXPECTED_BOOLEAN** | string
|
39
41
|
**EXPECTED_INTEGER** | string
|
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
### Description
|
4
4
|
|
5
|
-
Price and inventory alerting overrides for a [CatalogItemVariation](#type-catalogitemvariation) at a specific [location]
|
5
|
+
Price and inventory alerting overrides for a [CatalogItemVariation](#type-catalogitemvariation) at a specific [location](#type-location).
|
6
6
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
|
-
**location_id** | **String** | The ID of the [location]
|
11
|
-
**price_money** | [**Money**](Money.md) | The price of the [CatalogItemVariation](#type-catalogitemvariation) at the given [location]
|
12
|
-
**pricing_type** | **String** | The pricing type (fixed or variable) for the [CatalogItemVariation](#type-catalogitemvariation) at the given [location]
|
13
|
-
**track_inventory** | **BOOLEAN** | If `true`, inventory tracking is active for the [CatalogItemVariation](#type-catalogitemvariation) at this [location]
|
10
|
+
**location_id** | **String** | The ID of the [location](#type-location). | [optional]
|
11
|
+
**price_money** | [**Money**](Money.md) | The price of the [CatalogItemVariation](#type-catalogitemvariation) at the given [location](#type-location), or blank for variable pricing. | [optional]
|
12
|
+
**pricing_type** | **String** | The pricing type (fixed or variable) for the [CatalogItemVariation](#type-catalogitemvariation) at the given [location](#type-location). See [CatalogPricingType](#type-catalogpricingtype) for all possible values. | [optional]
|
13
|
+
**track_inventory** | **BOOLEAN** | If `true`, inventory tracking is active for the [CatalogItemVariation](#type-catalogitemvariation) at this [location](#type-location). | [optional]
|
14
14
|
**inventory_alert_type** | **String** | Indicates whether the [CatalogItemVariation](#type-catalogitemvariation) 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]
|
15
15
|
**inventory_alert_threshold** | **Integer** | 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]
|
16
16
|
|
data/docs/Location.md
CHANGED
@@ -8,9 +8,17 @@ Represents one of a business's locations.
|
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
10
|
**id** | **String** | The location's unique ID. | [optional]
|
11
|
-
**name** | **String** | The location's name. | [optional]
|
11
|
+
**name** | **String** | The location's name. Location names are set by the location owner and displayed in the dashboard as the location's nickname | [optional]
|
12
12
|
**address** | [**Address**](Address.md) | The location's physical address. | [optional]
|
13
13
|
**timezone** | **String** | The [IANA Timezone Database](https://www.iana.org/time-zones) identifier for the location's timezone. | [optional]
|
14
14
|
**capabilities** | **Array<String>** | Indicates which Square features are enabled for the location. See [LocationCapability](#type-locationcapability) for possible values. | [optional]
|
15
|
+
**status** | **String** | The location's status See [LocationStatus](#type-locationstatus) for possible values. | [optional]
|
16
|
+
**created_at** | **String** | The time when the location was created, in RFC 3339 format. | [optional]
|
17
|
+
**merchant_id** | **String** | The identifier of the merchant that owns the location. | [optional]
|
18
|
+
**country** | **String** | The location's country, in ISO 3166-1-alpha-2 format. See [Country](#type-country) for possible values. | [optional]
|
19
|
+
**language_code** | **String** | The language associated with the location in [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A). | [optional]
|
20
|
+
**currency** | **String** | The currency used for all transactions at this location, specified in __ISO 4217 format__. For example, the currency for a location processing transactions in the United States is 'USD'. See [Currency](#type-currency) for possible values. | [optional]
|
21
|
+
**phone_number** | **String** | The location's phone_number. | [optional]
|
22
|
+
**business_name** | **String** | The location's business_name which is shown to its customers. For example, this is the name printed on its customer's receipts. | [optional]
|
15
23
|
|
16
24
|
|
data/docs/Order.md
CHANGED
@@ -7,6 +7,7 @@ Contains all information related to a single order to process with Square, inclu
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
|
+
**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]
|
10
11
|
**location_id** | **String** | The ID of the merchant location this order is associated with. | [optional]
|
11
12
|
**reference_id** | **String** | A client specified identifier to associate an entity in another system with this order. | [optional]
|
12
13
|
**line_items** | [**Array<OrderLineItem>**](OrderLineItem.md) | The line items included in the order. Every order has at least one line item. | [optional]
|
data/docs/OrderLineItem.md
CHANGED
@@ -8,10 +8,15 @@ Represents a line item in an order. Each line item describes a different product
|
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
10
|
**name** | **String** | The name of the line item. | [optional]
|
11
|
-
**quantity** | **String** | The quantity
|
11
|
+
**quantity** | **String** | The quantity purchased, as a string representation of a number. | [optional]
|
12
|
+
**note** | **String** | The note of the line item. | [optional]
|
13
|
+
**catalog_object_id** | **String** | The [CatalogItemVariation](#type-catalogitemvariation) id applied to this line item. | [optional]
|
14
|
+
**variation_name** | **String** | The name of the variation applied to this line item. | [optional]
|
15
|
+
**modifiers** | [**Array<OrderLineItemModifier>**](OrderLineItemModifier.md) | The [CatalogModifier](#type-catalogmodifier)s applied to this line item. | [optional]
|
12
16
|
**taxes** | [**Array<OrderLineItemTax>**](OrderLineItemTax.md) | The taxes applied to this line item. | [optional]
|
13
17
|
**discounts** | [**Array<OrderLineItemDiscount>**](OrderLineItemDiscount.md) | The discounts applied to this line item. | [optional]
|
14
18
|
**base_price_money** | [**Money**](Money.md) | The base price for a single unit of the line item. | [optional]
|
19
|
+
**gross_sales_money** | [**Money**](Money.md) | The gross sales amount of money calculated as (item base price + modifiers price) * quantity. | [optional]
|
15
20
|
**total_tax_money** | [**Money**](Money.md) | The total tax amount of money to collect for the line item. | [optional]
|
16
21
|
**total_discount_money** | [**Money**](Money.md) | The total discount amount of money to collect for the line item. | [optional]
|
17
22
|
**total_money** | [**Money**](Money.md) | The total amount of money to collect for this line item. | [optional]
|
@@ -7,6 +7,7 @@ Represents a discount that applies to one or more line items in an order. Fixed
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
|
+
**catalog_object_id** | **String** | The catalog object id referencing [CatalogDiscount](#type-catalogdiscount). | [optional]
|
10
11
|
**name** | **String** | The discount's name. | [optional]
|
11
12
|
**type** | **String** | The type of the discount. If it is created by API, it would be either `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. VARIABLE_* is not supported in API because the order is created at the time of sale and either percentage or amount has to be specified. See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values. | [optional]
|
12
13
|
**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]
|
@@ -7,7 +7,7 @@ Indicates how the discount is applied to the associated line item or order.
|
|
7
7
|
## Properties
|
8
8
|
Name | Type
|
9
9
|
------------ | -------------
|
10
|
-
**
|
10
|
+
**UNKNOWN_DISCOUNT** | string
|
11
11
|
**FIXED_PERCENTAGE** | string
|
12
12
|
**FIXED_AMOUNT** | string
|
13
13
|
**VARIABLE_PERCENTAGE** | string
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# SquareConnect::OrderLineItemModifier
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
A [CatalogModifier](#type-catalogmodifier).
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**catalog_object_id** | **String** | The catalog object id referencing [CatalogModifier](#type-catalogmodifier). | [optional]
|
11
|
+
**name** | **String** | The name of the item modifier. | [optional]
|
12
|
+
**base_price_money** | [**Money**](Money.md) | The base price of the item modifier. | [optional]
|
13
|
+
**total_price_money** | [**Money**](Money.md) | The total price of the item modifier for its line item. This is the modifier's base_price_money multiplied by the line item's quantity. | [optional]
|
14
|
+
|
15
|
+
|
data/docs/OrderLineItemTax.md
CHANGED
@@ -7,6 +7,7 @@ Represents a tax that applies to one or more line items in an order.
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
|
+
**catalog_object_id** | **String** | The catalog object id referencing [CatalogTax](#type-catalogtax). | [optional]
|
10
11
|
**name** | **String** | The tax's name. | [optional]
|
11
12
|
**type** | **String** | Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values. | [optional]
|
12
13
|
**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]
|
data/docs/OrdersApi.md
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
# SquareConnect::OrdersApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://connect.squareup.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**batch_retrieve_orders**](OrdersApi.md#batch_retrieve_orders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders
|
8
|
+
[**create_order**](OrdersApi.md#create_order) | **POST** /v2/locations/{location_id}/orders | CreateOrder
|
9
|
+
|
10
|
+
|
11
|
+
# **batch_retrieve_orders**
|
12
|
+
> BatchRetrieveOrdersResponse batch_retrieve_orders(location_id, body)
|
13
|
+
|
14
|
+
BatchRetrieveOrders
|
15
|
+
|
16
|
+
Retrieves a set of [Order](#type-order)s by their IDs. Only orders that have been successfully charged are included in the response. If any of the order IDs in the request do not exist, or are associated with uncharged orders, then those orders will not be included in the set of orders in the response. Note that in the future, uncharged orders may be returned by this endpoint.
|
17
|
+
|
18
|
+
### Example
|
19
|
+
```ruby
|
20
|
+
# load the gem
|
21
|
+
require 'square_connect'
|
22
|
+
# setup authorization
|
23
|
+
SquareConnect.configure do |config|
|
24
|
+
# Configure OAuth2 access token for authorization: oauth2
|
25
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
26
|
+
end
|
27
|
+
|
28
|
+
api_instance = SquareConnect::OrdersApi.new
|
29
|
+
|
30
|
+
location_id = "location_id_example" # String | The ID of the orders' associated location.
|
31
|
+
|
32
|
+
body = SquareConnect::BatchRetrieveOrdersRequest.new # BatchRetrieveOrdersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
33
|
+
|
34
|
+
|
35
|
+
begin
|
36
|
+
#BatchRetrieveOrders
|
37
|
+
result = api_instance.batch_retrieve_orders(location_id, body)
|
38
|
+
p result
|
39
|
+
rescue SquareConnect::ApiError => e
|
40
|
+
puts "Exception when calling OrdersApi->batch_retrieve_orders: #{e}"
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
### Parameters
|
45
|
+
|
46
|
+
Name | Type | Description | Notes
|
47
|
+
------------- | ------------- | ------------- | -------------
|
48
|
+
**location_id** | **String**| The ID of the orders' associated location. |
|
49
|
+
**body** | [**BatchRetrieveOrdersRequest**](BatchRetrieveOrdersRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
50
|
+
|
51
|
+
### Return type
|
52
|
+
|
53
|
+
[**BatchRetrieveOrdersResponse**](BatchRetrieveOrdersResponse.md)
|
54
|
+
|
55
|
+
### Authorization
|
56
|
+
|
57
|
+
[oauth2](../README.md#oauth2)
|
58
|
+
|
59
|
+
### HTTP request headers
|
60
|
+
|
61
|
+
- **Content-Type**: application/json
|
62
|
+
- **Accept**: application/json
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
# **create_order**
|
67
|
+
> CreateOrderResponse create_order(location_id, body)
|
68
|
+
|
69
|
+
CreateOrder
|
70
|
+
|
71
|
+
Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](https://docs.connect.squareup.com/articles/orders-overview).
|
72
|
+
|
73
|
+
### Example
|
74
|
+
```ruby
|
75
|
+
# load the gem
|
76
|
+
require 'square_connect'
|
77
|
+
# setup authorization
|
78
|
+
SquareConnect.configure do |config|
|
79
|
+
# Configure OAuth2 access token for authorization: oauth2
|
80
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
81
|
+
end
|
82
|
+
|
83
|
+
api_instance = SquareConnect::OrdersApi.new
|
84
|
+
|
85
|
+
location_id = "location_id_example" # String | The ID of the business location to associate the order with.
|
86
|
+
|
87
|
+
body = SquareConnect::CreateOrderRequest.new # CreateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
88
|
+
|
89
|
+
|
90
|
+
begin
|
91
|
+
#CreateOrder
|
92
|
+
result = api_instance.create_order(location_id, body)
|
93
|
+
p result
|
94
|
+
rescue SquareConnect::ApiError => e
|
95
|
+
puts "Exception when calling OrdersApi->create_order: #{e}"
|
96
|
+
end
|
97
|
+
```
|
98
|
+
|
99
|
+
### Parameters
|
100
|
+
|
101
|
+
Name | Type | Description | Notes
|
102
|
+
------------- | ------------- | ------------- | -------------
|
103
|
+
**location_id** | **String**| The ID of the business location to associate the order with. |
|
104
|
+
**body** | [**CreateOrderRequest**](CreateOrderRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
105
|
+
|
106
|
+
### Return type
|
107
|
+
|
108
|
+
[**CreateOrderResponse**](CreateOrderResponse.md)
|
109
|
+
|
110
|
+
### Authorization
|
111
|
+
|
112
|
+
[oauth2](../README.md#oauth2)
|
113
|
+
|
114
|
+
### HTTP request headers
|
115
|
+
|
116
|
+
- **Content-Type**: application/json
|
117
|
+
- **Accept**: application/json
|
118
|
+
|
119
|
+
|
120
|
+
|
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
|
11
11
|
**object_types** | **Array<String>** | The desired set of object types to appear in the search results. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`. | [optional]
|
12
12
|
**include_deleted_objects** | **BOOLEAN** | If `true`, deleted objects will be included in the results. Deleted objects will have their `is_deleted` field set to `true`. | [optional]
|
13
13
|
**include_related_objects** | **BOOLEAN** | If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. | [optional]
|
14
|
-
**begin_time** | **String** | Return
|
14
|
+
**begin_time** | **String** | Return objects modified after this [timestamp](#workingwithdates), in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". The timestamp is exclusive - objects with a timestamp equal to `begin_time` will not be included in the response. | [optional]
|
15
15
|
**query** | [**CatalogQuery**](CatalogQuery.md) | A query to be used to filter or sort the results. If no query is specified, the entire catalog will be returned. | [optional]
|
16
16
|
**limit** | **Integer** | A limit on the number of results to be returned in a single page. The limit is advisory - the implementation may return more or fewer results. If the supplied limit is negative, zero, or is higher than the maximum limit of 1,000, it will be ignored. | [optional]
|
17
17
|
|
data/docs/Transaction.md
CHANGED
@@ -15,7 +15,7 @@ Name | Type | Description | Notes
|
|
15
15
|
**reference_id** | **String** | If the transaction was created with the [Charge](#endpoint-charge) endpoint, this value is the same as the value provided for the `reference_id` parameter in the request to that endpoint. Otherwise, it is not set. | [optional]
|
16
16
|
**product** | **String** | The Square product that processed the transaction. | [optional]
|
17
17
|
**client_id** | **String** | If the transaction was created in the Square Point of Sale app, this value is the ID generated for the transaction by Square Point of Sale. This ID has no relationship to the transaction's canonical `id`, which is generated by Square's backend servers. This value is generated for bookkeeping purposes, in case the transaction cannot immediately be completed (for example, if the transaction is processed in offline mode). It is not currently possible with the Connect API to perform a transaction lookup by this value. | [optional]
|
18
|
-
**order** | [**Order**](Order.md) | The order associated with this transaction, if any. | [optional]
|
19
18
|
**shipping_address** | [**Address**](Address.md) | The shipping address provided in the request, if any. | [optional]
|
19
|
+
**order_id** | **String** | The order_id is an identifier for the order associated with this transaction, if any. | [optional]
|
20
20
|
|
21
21
|
|
data/docs/TransactionsApi.md
CHANGED
@@ -128,7 +128,7 @@ Name | Type | Description | Notes
|
|
128
128
|
|
129
129
|
CreateRefund
|
130
130
|
|
131
|
-
Initiates a refund for a previously charged tender. You must issue a refund within 120 days of the associated payment. See
|
131
|
+
Initiates a refund for a previously charged tender. You must issue a refund within 120 days of the associated payment. See [this article](https://squareup.com/help/us/en/article/5060) for more information on refund behavior.
|
132
132
|
|
133
133
|
### Example
|
134
134
|
```ruby
|
data/docs/V1Payment.md
CHANGED
@@ -21,9 +21,9 @@ Name | Type | Description | Notes
|
|
21
21
|
**processing_fee_money** | [**V1Money**](V1Money.md) | The total of all processing fees collected by Square for the payment. | [optional]
|
22
22
|
**net_total_money** | [**V1Money**](V1Money.md) | The amount to be deposited into the merchant's bank account for the payment. | [optional]
|
23
23
|
**refunded_money** | [**V1Money**](V1Money.md) | The total of all refunds applied to the payment. | [optional]
|
24
|
-
**swedish_rounding_money** | [**V1Money**](V1Money.md) |
|
25
|
-
**gross_sales_money** | [**V1Money**](V1Money.md) |
|
26
|
-
**net_sales_money** | [**V1Money**](V1Money.md) |
|
24
|
+
**swedish_rounding_money** | [**V1Money**](V1Money.md) | The total of all sales, including any applicable taxes, rounded to the smallest legal unit of currency (e.g., the nearest penny in USD, the nearest nickel in CAD) | [optional]
|
25
|
+
**gross_sales_money** | [**V1Money**](V1Money.md) | The total of all sales, including any applicable taxes. | [optional]
|
26
|
+
**net_sales_money** | [**V1Money**](V1Money.md) | The total of all sales, minus any applicable taxes. | [optional]
|
27
27
|
**inclusive_tax** | [**Array<V1PaymentTax>**](V1PaymentTax.md) | All of the inclusive taxes associated with the payment. | [optional]
|
28
28
|
**additive_tax** | [**Array<V1PaymentTax>**](V1PaymentTax.md) | All of the additive taxes associated with the payment. | [optional]
|
29
29
|
**tender** | [**Array<V1Tender>**](V1Tender.md) | All of the additive taxes associated with the payment. | [optional]
|