square_connect 2.20180712.2.237 → 2.20180918.0.244
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +20 -1
- data/README.md +33 -1
- data/docs/BatchChangeInventoryRequest.md +14 -0
- data/docs/BatchChangeInventoryResponse.md +13 -0
- data/docs/BatchRetrieveInventoryChangesRequest.md +18 -0
- data/docs/BatchRetrieveInventoryChangesResponse.md +14 -0
- data/docs/BatchRetrieveInventoryCountsRequest.md +15 -0
- data/docs/BatchRetrieveInventoryCountsResponse.md +14 -0
- data/docs/Card.md +1 -1
- data/docs/CreateCustomerRequest.md +1 -0
- data/docs/Customer.md +1 -0
- data/docs/CustomersApi.md +2 -2
- data/docs/ErrorCode.md +2 -0
- data/docs/InventoryAdjustment.md +28 -0
- data/docs/InventoryApi.md +391 -0
- data/docs/InventoryChange.md +15 -0
- data/docs/InventoryChangeType.md +14 -0
- data/docs/InventoryCount.md +17 -0
- data/docs/InventoryPhysicalCount.md +22 -0
- data/docs/InventoryState.md +23 -0
- data/docs/InventoryTransfer.md +23 -0
- data/docs/Product.md +19 -0
- data/docs/RetrieveInventoryAdjustmentRequest.md +11 -0
- data/docs/RetrieveInventoryAdjustmentResponse.md +13 -0
- data/docs/RetrieveInventoryChangesRequest.md +13 -0
- data/docs/RetrieveInventoryChangesResponse.md +14 -0
- data/docs/RetrieveInventoryCountRequest.md +13 -0
- data/docs/RetrieveInventoryCountResponse.md +14 -0
- data/docs/RetrieveInventoryPhysicalCountRequest.md +11 -0
- data/docs/RetrieveInventoryPhysicalCountResponse.md +13 -0
- data/docs/SourceApplication.md +14 -0
- data/docs/TransactionsApi.md +1 -1
- data/docs/UpdateCustomerRequest.md +1 -0
- data/docs/V1Timecard.md +4 -1
- data/lib/square_connect.rb +24 -0
- data/lib/square_connect/api/apple_pay_api.rb +1 -1
- data/lib/square_connect/api/catalog_api.rb +11 -11
- data/lib/square_connect/api/checkout_api.rb +1 -1
- data/lib/square_connect/api/customers_api.rb +12 -12
- data/lib/square_connect/api/inventory_api.rb +417 -0
- data/lib/square_connect/api/locations_api.rb +1 -1
- data/lib/square_connect/api/mobile_authorization_api.rb +1 -1
- data/lib/square_connect/api/o_auth_api.rb +3 -3
- data/lib/square_connect/api/orders_api.rb +2 -2
- data/lib/square_connect/api/reporting_api.rb +2 -2
- data/lib/square_connect/api/transactions_api.rb +9 -9
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/models/batch_change_inventory_request.rb +208 -0
- data/lib/square_connect/models/batch_change_inventory_response.rb +200 -0
- data/lib/square_connect/models/batch_retrieve_inventory_changes_request.rb +275 -0
- data/lib/square_connect/models/batch_retrieve_inventory_changes_response.rb +210 -0
- data/lib/square_connect/models/batch_retrieve_inventory_counts_request.rb +220 -0
- data/lib/square_connect/models/batch_retrieve_inventory_counts_response.rb +210 -0
- data/lib/square_connect/models/card.rb +1 -1
- data/lib/square_connect/models/create_customer_request.rb +14 -4
- data/lib/square_connect/models/customer.rb +11 -1
- data/lib/square_connect/models/error.rb +2 -2
- data/lib/square_connect/models/error_code.rb +2 -0
- data/lib/square_connect/models/inventory_adjustment.rb +391 -0
- data/lib/square_connect/models/inventory_change.rb +249 -0
- data/lib/square_connect/models/inventory_change_type.rb +20 -0
- data/lib/square_connect/models/inventory_count.rb +269 -0
- data/lib/square_connect/models/inventory_physical_count.rb +319 -0
- data/lib/square_connect/models/inventory_state.rb +29 -0
- data/lib/square_connect/models/inventory_transfer.rb +329 -0
- data/lib/square_connect/models/money.rb +0 -9
- data/lib/square_connect/models/product.rb +25 -0
- data/lib/square_connect/models/retrieve_inventory_adjustment_request.rb +176 -0
- data/lib/square_connect/models/retrieve_inventory_adjustment_response.rb +198 -0
- data/lib/square_connect/models/retrieve_inventory_changes_request.rb +196 -0
- data/lib/square_connect/models/retrieve_inventory_changes_response.rb +210 -0
- data/lib/square_connect/models/retrieve_inventory_count_request.rb +196 -0
- data/lib/square_connect/models/retrieve_inventory_count_response.rb +210 -0
- data/lib/square_connect/models/retrieve_inventory_physical_count_request.rb +176 -0
- data/lib/square_connect/models/retrieve_inventory_physical_count_response.rb +198 -0
- data/lib/square_connect/models/source_application.rb +239 -0
- data/lib/square_connect/models/update_customer_request.rb +14 -4
- data/lib/square_connect/models/v1_timecard.rb +35 -5
- data/lib/square_connect/version.rb +1 -1
- data/spec/api/inventory_api_spec.rb +120 -0
- data/spec/models/batch_change_inventory_request_spec.rb +51 -0
- data/spec/models/batch_change_inventory_response_spec.rb +45 -0
- data/spec/models/batch_retrieve_inventory_changes_request_spec.rb +83 -0
- data/spec/models/batch_retrieve_inventory_changes_response_spec.rb +51 -0
- data/spec/models/batch_retrieve_inventory_counts_request_spec.rb +57 -0
- data/spec/models/batch_retrieve_inventory_counts_response_spec.rb +51 -0
- data/spec/models/inventory_adjustment_spec.rb +143 -0
- data/spec/models/inventory_change_spec.rb +61 -0
- data/spec/models/inventory_change_type_spec.rb +33 -0
- data/spec/models/inventory_count_spec.rb +73 -0
- data/spec/models/inventory_physical_count_spec.rb +103 -0
- data/spec/models/inventory_state_spec.rb +33 -0
- data/spec/models/inventory_transfer_spec.rb +109 -0
- data/spec/models/product_spec.rb +33 -0
- data/spec/models/retrieve_inventory_adjustment_request_spec.rb +33 -0
- data/spec/models/retrieve_inventory_adjustment_response_spec.rb +45 -0
- data/spec/models/retrieve_inventory_changes_request_spec.rb +45 -0
- data/spec/models/retrieve_inventory_changes_response_spec.rb +51 -0
- data/spec/models/retrieve_inventory_count_request_spec.rb +45 -0
- data/spec/models/retrieve_inventory_count_response_spec.rb +51 -0
- data/spec/models/retrieve_inventory_physical_count_request_spec.rb +33 -0
- data/spec/models/retrieve_inventory_physical_count_response_spec.rb +45 -0
- data/spec/models/source_application_spec.rb +55 -0
- metadata +99 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee178c2811ad57f0fd692c6b253c0be29ff2df35c5c0fdd234af918833cc8c58
|
4
|
+
data.tar.gz: 1ff05aea12921bcb8694ff3f2b8770b56e0bfc6749c10b60cc7a9e14bafccdc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f473942c9cb063b717568b4aa59741095b52da3fd6c480b01d90f7319d96ac8a613b7a4c2ec167ef787f8c154b242b8e549c12d3bd3d985c4233cfdb564ddc6
|
7
|
+
data.tar.gz: e5b68256f3feaca28287d9d10069fa60e1a39ee08add4c6bd78cafa6527935bcfb27e3fc57247ad09e4f7ba3f64516b0f243453e4a498589db985d70adbaf760
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## Version 2.20180918.0 (2018-09-18)
|
4
|
+
|
5
|
+
We have added Connect v2 Inventory API and birthdays in `Customer` entities.
|
6
|
+
|
7
|
+
### New API: Inventory API (Connect V2)
|
8
|
+
|
9
|
+
The Connect v2 Inventory API replaces the Connect v1 Inventory API
|
10
|
+
and introduces new functionality:
|
11
|
+
|
12
|
+
* Moving item variations quantities through predefined states
|
13
|
+
(e.g., from `IN_STOCK` to `WASTE`).
|
14
|
+
* Viewing the inventory adjustment history for an item variation.
|
15
|
+
* Batch inventory adjustments and information retrieval.
|
16
|
+
|
17
|
+
### New feature: Customer Birthdays (Connect V2)
|
18
|
+
|
19
|
+
* Customer profiles now include a `birthday` field.
|
20
|
+
Dates are recorded in RFC-3339 format and can be
|
21
|
+
set through the `CreateCustomer` and `UpdateCustomer` endpoints.
|
3
22
|
## Version 2.20180712.2 (2018-08-21)
|
4
23
|
|
5
24
|
The Connect SDK now includes functionality for the OAuth API. The Square OAuth API lets applications request and obtain permission from a Square account to make API calls on behalf of that account. Applications can request individual permissions so that users do not need to grant full access to their Square accounts.
|
@@ -157,7 +176,7 @@ represent the value of returned goods in an exchange, rather than actual money m
|
|
157
176
|
|
158
177
|
### New features: Orders API
|
159
178
|
|
160
|
-
* For Catalog-backed line items, setting `CreateOrderRequestLineItem.base_price_money` will now override
|
179
|
+
* For Catalog-backed line items, setting `CreateOrderRequestLineItem.base_price_money` will now override
|
161
180
|
the catalog item variation's price.
|
162
181
|
* `CreateOrderRequestModifier`s may now be created ad hoc using the new `name` and `base_price_money` fields.
|
163
182
|
|
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.20180918.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)
|
@@ -94,6 +94,13 @@ Class | Method | HTTP request | Description
|
|
94
94
|
*SquareConnect::CustomersApi* | [**retrieve_customer**](docs/CustomersApi.md#retrieve_customer) | **GET** /v2/customers/{customer_id} | RetrieveCustomer
|
95
95
|
*SquareConnect::CustomersApi* | [**search_customers**](docs/CustomersApi.md#search_customers) | **POST** /v2/customers/search | SearchCustomers
|
96
96
|
*SquareConnect::CustomersApi* | [**update_customer**](docs/CustomersApi.md#update_customer) | **PUT** /v2/customers/{customer_id} | UpdateCustomer
|
97
|
+
*SquareConnect::InventoryApi* | [**batch_change_inventory**](docs/InventoryApi.md#batch_change_inventory) | **POST** /v2/inventory/batch-change | BatchChangeInventory
|
98
|
+
*SquareConnect::InventoryApi* | [**batch_retrieve_inventory_changes**](docs/InventoryApi.md#batch_retrieve_inventory_changes) | **POST** /v2/inventory/batch-retrieve-changes | BatchRetrieveInventoryChanges
|
99
|
+
*SquareConnect::InventoryApi* | [**batch_retrieve_inventory_counts**](docs/InventoryApi.md#batch_retrieve_inventory_counts) | **POST** /v2/inventory/batch-retrieve-counts | BatchRetrieveInventoryCounts
|
100
|
+
*SquareConnect::InventoryApi* | [**retrieve_inventory_adjustment**](docs/InventoryApi.md#retrieve_inventory_adjustment) | **GET** /v2/inventory/adjustment/{adjustment_id} | RetrieveInventoryAdjustment
|
101
|
+
*SquareConnect::InventoryApi* | [**retrieve_inventory_changes**](docs/InventoryApi.md#retrieve_inventory_changes) | **GET** /v2/inventory/{catalog_object_id}/changes | RetrieveInventoryChanges
|
102
|
+
*SquareConnect::InventoryApi* | [**retrieve_inventory_count**](docs/InventoryApi.md#retrieve_inventory_count) | **GET** /v2/inventory/{catalog_object_id} | RetrieveInventoryCount
|
103
|
+
*SquareConnect::InventoryApi* | [**retrieve_inventory_physical_count**](docs/InventoryApi.md#retrieve_inventory_physical_count) | **GET** /v2/inventory/physical-count/{physical_count_id} | RetrieveInventoryPhysicalCount
|
97
104
|
*SquareConnect::LocationsApi* | [**list_locations**](docs/LocationsApi.md#list_locations) | **GET** /v2/locations | ListLocations
|
98
105
|
*SquareConnect::MobileAuthorizationApi* | [**create_mobile_authorization_code**](docs/MobileAuthorizationApi.md#create_mobile_authorization_code) | **POST** /mobile/authorization-code | CreateMobileAuthorizationCode
|
99
106
|
*SquareConnect::OAuthApi* | [**obtain_token**](docs/OAuthApi.md#obtain_token) | **POST** /oauth2/token | ObtainToken
|
@@ -187,10 +194,16 @@ Class | Method | HTTP request | Description
|
|
187
194
|
- [SquareConnect::AdditionalRecipientReceivable](docs/AdditionalRecipientReceivable.md)
|
188
195
|
- [SquareConnect::AdditionalRecipientReceivableRefund](docs/AdditionalRecipientReceivableRefund.md)
|
189
196
|
- [SquareConnect::Address](docs/Address.md)
|
197
|
+
- [SquareConnect::BatchChangeInventoryRequest](docs/BatchChangeInventoryRequest.md)
|
198
|
+
- [SquareConnect::BatchChangeInventoryResponse](docs/BatchChangeInventoryResponse.md)
|
190
199
|
- [SquareConnect::BatchDeleteCatalogObjectsRequest](docs/BatchDeleteCatalogObjectsRequest.md)
|
191
200
|
- [SquareConnect::BatchDeleteCatalogObjectsResponse](docs/BatchDeleteCatalogObjectsResponse.md)
|
192
201
|
- [SquareConnect::BatchRetrieveCatalogObjectsRequest](docs/BatchRetrieveCatalogObjectsRequest.md)
|
193
202
|
- [SquareConnect::BatchRetrieveCatalogObjectsResponse](docs/BatchRetrieveCatalogObjectsResponse.md)
|
203
|
+
- [SquareConnect::BatchRetrieveInventoryChangesRequest](docs/BatchRetrieveInventoryChangesRequest.md)
|
204
|
+
- [SquareConnect::BatchRetrieveInventoryChangesResponse](docs/BatchRetrieveInventoryChangesResponse.md)
|
205
|
+
- [SquareConnect::BatchRetrieveInventoryCountsRequest](docs/BatchRetrieveInventoryCountsRequest.md)
|
206
|
+
- [SquareConnect::BatchRetrieveInventoryCountsResponse](docs/BatchRetrieveInventoryCountsResponse.md)
|
194
207
|
- [SquareConnect::BatchRetrieveOrdersRequest](docs/BatchRetrieveOrdersRequest.md)
|
195
208
|
- [SquareConnect::BatchRetrieveOrdersResponse](docs/BatchRetrieveOrdersResponse.md)
|
196
209
|
- [SquareConnect::BatchUpsertCatalogObjectsRequest](docs/BatchUpsertCatalogObjectsRequest.md)
|
@@ -270,7 +283,14 @@ Class | Method | HTTP request | Description
|
|
270
283
|
- [SquareConnect::Error](docs/Error.md)
|
271
284
|
- [SquareConnect::ErrorCategory](docs/ErrorCategory.md)
|
272
285
|
- [SquareConnect::ErrorCode](docs/ErrorCode.md)
|
286
|
+
- [SquareConnect::InventoryAdjustment](docs/InventoryAdjustment.md)
|
273
287
|
- [SquareConnect::InventoryAlertType](docs/InventoryAlertType.md)
|
288
|
+
- [SquareConnect::InventoryChange](docs/InventoryChange.md)
|
289
|
+
- [SquareConnect::InventoryChangeType](docs/InventoryChangeType.md)
|
290
|
+
- [SquareConnect::InventoryCount](docs/InventoryCount.md)
|
291
|
+
- [SquareConnect::InventoryPhysicalCount](docs/InventoryPhysicalCount.md)
|
292
|
+
- [SquareConnect::InventoryState](docs/InventoryState.md)
|
293
|
+
- [SquareConnect::InventoryTransfer](docs/InventoryTransfer.md)
|
274
294
|
- [SquareConnect::ItemVariationLocationOverrides](docs/ItemVariationLocationOverrides.md)
|
275
295
|
- [SquareConnect::ListAdditionalRecipientReceivableRefundsRequest](docs/ListAdditionalRecipientReceivableRefundsRequest.md)
|
276
296
|
- [SquareConnect::ListAdditionalRecipientReceivableRefundsResponse](docs/ListAdditionalRecipientReceivableRefundsResponse.md)
|
@@ -301,6 +321,7 @@ Class | Method | HTTP request | Description
|
|
301
321
|
- [SquareConnect::OrderLineItemModifier](docs/OrderLineItemModifier.md)
|
302
322
|
- [SquareConnect::OrderLineItemTax](docs/OrderLineItemTax.md)
|
303
323
|
- [SquareConnect::OrderLineItemTaxType](docs/OrderLineItemTaxType.md)
|
324
|
+
- [SquareConnect::Product](docs/Product.md)
|
304
325
|
- [SquareConnect::Refund](docs/Refund.md)
|
305
326
|
- [SquareConnect::RefundStatus](docs/RefundStatus.md)
|
306
327
|
- [SquareConnect::RegisterDomainRequest](docs/RegisterDomainRequest.md)
|
@@ -312,6 +333,14 @@ Class | Method | HTTP request | Description
|
|
312
333
|
- [SquareConnect::RetrieveCatalogObjectResponse](docs/RetrieveCatalogObjectResponse.md)
|
313
334
|
- [SquareConnect::RetrieveCustomerRequest](docs/RetrieveCustomerRequest.md)
|
314
335
|
- [SquareConnect::RetrieveCustomerResponse](docs/RetrieveCustomerResponse.md)
|
336
|
+
- [SquareConnect::RetrieveInventoryAdjustmentRequest](docs/RetrieveInventoryAdjustmentRequest.md)
|
337
|
+
- [SquareConnect::RetrieveInventoryAdjustmentResponse](docs/RetrieveInventoryAdjustmentResponse.md)
|
338
|
+
- [SquareConnect::RetrieveInventoryChangesRequest](docs/RetrieveInventoryChangesRequest.md)
|
339
|
+
- [SquareConnect::RetrieveInventoryChangesResponse](docs/RetrieveInventoryChangesResponse.md)
|
340
|
+
- [SquareConnect::RetrieveInventoryCountRequest](docs/RetrieveInventoryCountRequest.md)
|
341
|
+
- [SquareConnect::RetrieveInventoryCountResponse](docs/RetrieveInventoryCountResponse.md)
|
342
|
+
- [SquareConnect::RetrieveInventoryPhysicalCountRequest](docs/RetrieveInventoryPhysicalCountRequest.md)
|
343
|
+
- [SquareConnect::RetrieveInventoryPhysicalCountResponse](docs/RetrieveInventoryPhysicalCountResponse.md)
|
315
344
|
- [SquareConnect::RetrieveTransactionRequest](docs/RetrieveTransactionRequest.md)
|
316
345
|
- [SquareConnect::RetrieveTransactionResponse](docs/RetrieveTransactionResponse.md)
|
317
346
|
- [SquareConnect::RevokeTokenRequest](docs/RevokeTokenRequest.md)
|
@@ -321,6 +350,7 @@ Class | Method | HTTP request | Description
|
|
321
350
|
- [SquareConnect::SearchCustomersRequest](docs/SearchCustomersRequest.md)
|
322
351
|
- [SquareConnect::SearchCustomersResponse](docs/SearchCustomersResponse.md)
|
323
352
|
- [SquareConnect::SortOrder](docs/SortOrder.md)
|
353
|
+
- [SquareConnect::SourceApplication](docs/SourceApplication.md)
|
324
354
|
- [SquareConnect::TaxCalculationPhase](docs/TaxCalculationPhase.md)
|
325
355
|
- [SquareConnect::TaxInclusionType](docs/TaxInclusionType.md)
|
326
356
|
- [SquareConnect::Tender](docs/Tender.md)
|
@@ -409,6 +439,8 @@ Class | Method | HTTP request | Description
|
|
409
439
|
- TIMECARDS_WRITE: POST, PUT, and DELETE endpoints related to employee timecards
|
410
440
|
- PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS: Allow third party applications to deduct a portion of each transaction amount.
|
411
441
|
- PAYMENTS_WRITE_IN_PERSON: POST, PUT, and DELETE endpoints. Grants write access to transaction and refunds information.
|
442
|
+
- INVENTORY_READ: GET endpoints related to a merchant's inventory
|
443
|
+
- INVENTORY_WRITE: POST, PUT, and DELETE endpoints related to a merchant's inventory
|
412
444
|
|
413
445
|
### oauth2ClientSecret
|
414
446
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# SquareConnect::BatchChangeInventoryRequest
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**idempotency_key** | **String** | A client-supplied, universally unique identifier (UUID) for the request. See [Idempotency](/basics/api101/idempotency) in the [API Development 101](/basics/api101/overview) section for more information. | [optional]
|
11
|
+
**changes** | [**Array<InventoryChange>**](InventoryChange.md) | The set of physical counts and inventory adjustments to be made. Changes are applied based on the client-supplied timestamp and may be sent out of order. Max size is 100 changes. | [optional]
|
12
|
+
**ignore_unchanged_counts** | **BOOLEAN** | Indicates whether the current physical count should be ignored if the quantity is unchanged since the last physical count. Default: `true`. | [optional]
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# SquareConnect::BatchChangeInventoryResponse
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**errors** | [**Array<Error>**](Error.md) | Any errors that occurred during the request. | [optional]
|
11
|
+
**counts** | [**Array<InventoryCount>**](InventoryCount.md) | The current counts for all objects referenced in the request. | [optional]
|
12
|
+
|
13
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# SquareConnect::BatchRetrieveInventoryChangesRequest
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**catalog_object_ids** | **Array<String>** | Filters results by [CatalogObject](#type-catalogobject) ID. Only applied when set. Default: unset. | [optional]
|
11
|
+
**location_ids** | **Array<String>** | Filters results by [Location](#type-location) ID. Only applied when set. Default: unset. | [optional]
|
12
|
+
**types** | **Array<String>** | Filters results by [InventoryChangeType](#type-inventorychangetype). Default: [`PHYSICAL_COUNT`, `ADJUSTMENT`]. `TRANSFER` is not supported as a filter. | [optional]
|
13
|
+
**states** | **Array<String>** | Filters `ADJUSTMENT` query results by [InventoryState](#type-inventorystate). Only applied when set. Default: unset. | [optional]
|
14
|
+
**updated_after** | **String** | Provided as an RFC 3339 timestamp. Returns results whose `created_at` or `calculated_at` value is after the given time. Default: UNIX epoch (`1970-01-01T00:00:00Z`). | [optional]
|
15
|
+
**updated_before** | **String** | Provided as an RFC 3339 timestamp. Returns results whose `created_at` or `calculated_at` value is strictly before the given time. Default: UNIX epoch (`1970-01-01T00:00:00Z`). | [optional]
|
16
|
+
**cursor** | **String** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Paginating results](#paginatingresults) for more information. | [optional]
|
17
|
+
|
18
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# SquareConnect::BatchRetrieveInventoryChangesResponse
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**errors** | [**Array<Error>**](Error.md) | Any errors that occurred during the request. | [optional]
|
11
|
+
**changes** | [**Array<InventoryChange>**](InventoryChange.md) | The current calculated inventory changes for the requested objects and locations. | [optional]
|
12
|
+
**cursor** | **String** | The pagination cursor to be used in a subsequent request. If unset, this is the final response. See [Paginating results](#paginatingresults) for more information. | [optional]
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# SquareConnect::BatchRetrieveInventoryCountsRequest
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**catalog_object_ids** | **Array<String>** | Filters results by [CatalogObject](#type-catalogobject) ID. Only applied when set. Default: unset. | [optional]
|
11
|
+
**location_ids** | **Array<String>** | Filters results by [Location](#type-location) ID. Only applied when set. Default: unset. | [optional]
|
12
|
+
**updated_after** | **String** | Provided as an RFC 3339 timestamp. Returns results whose `calculated_at` value is after the given time. Default: UNIX epoch (`1970-01-01T00:00:00Z`). | [optional]
|
13
|
+
**cursor** | **String** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Paginating results](#paginatingresults) for more information. | [optional]
|
14
|
+
|
15
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# SquareConnect::BatchRetrieveInventoryCountsResponse
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**errors** | [**Array<Error>**](Error.md) | Any errors that occurred during the request. | [optional]
|
11
|
+
**counts** | [**Array<InventoryCount>**](InventoryCount.md) | The current calculated inventory counts for the requested objects and locations. | [optional]
|
12
|
+
**cursor** | **String** | The pagination cursor to be used in a subsequent request. If unset, this is the final response. See [Paginating results](#paginatingresults) for more information. | [optional]
|
13
|
+
|
14
|
+
|
data/docs/Card.md
CHANGED
@@ -14,6 +14,6 @@ Name | Type | Description | Notes
|
|
14
14
|
**exp_year** | **Integer** | The four-digit year of the card's expiration date. | [optional]
|
15
15
|
**cardholder_name** | **String** | The cardholder name. This value is present only if this object represents a customer's card on file. | [optional]
|
16
16
|
**billing_address** | [**Address**](Address.md) | The card's billing address. This value is present only if this object represents a customer's card on file. | [optional]
|
17
|
-
**fingerprint** | **String** | The unique string fingerprint for the card.
|
17
|
+
**fingerprint** | **String** | The unique string fingerprint for the card. The fingerprint is based on the credit card number and is unique to the merchant. If a card is used at multiple locations for the same merchant, it will have the same fingerprint in each case. Note: Fingerprint may not exist on old transactions. | [optional]
|
18
18
|
|
19
19
|
|
@@ -16,5 +16,6 @@ Name | Type | Description | Notes
|
|
16
16
|
**phone_number** | **String** | The customer's phone number. | [optional]
|
17
17
|
**reference_id** | **String** | An optional second ID you can set to associate the customer with an entity in another system. | [optional]
|
18
18
|
**note** | **String** | An optional note to associate with the customer. | [optional]
|
19
|
+
**birthday** | **String** | The customer birthday in RFC-3339 format. Year is optional, timezone and times are not allowed. Example: `0000-09-01T00:00:00-00:00` for a birthday on September 1st. `1998-09-01T00:00:00-00:00` for a birthday on September 1st 1998. | [optional]
|
19
20
|
|
20
21
|
|
data/docs/Customer.md
CHANGED
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
|
|
18
18
|
**email_address** | **String** | The customer's email address. | [optional]
|
19
19
|
**address** | [**Address**](Address.md) | The customer's physical address. | [optional]
|
20
20
|
**phone_number** | **String** | The customer's phone number. | [optional]
|
21
|
+
**birthday** | **String** | The customer's birthday in RFC-3339 format. Year is optional, timezone and times are not allowed. Example: `0000-09-01T00:00:00-00:00` for a birthday on September 1st. `1998-09-01T00:00:00-00:00` for a birthday on September 1st 1998. | [optional]
|
21
22
|
**reference_id** | **String** | A second ID you can set to associate the customer with an entity in another system. | [optional]
|
22
23
|
**note** | **String** | A note to associate with the customer. | [optional]
|
23
24
|
**preferences** | [**CustomerPreferences**](CustomerPreferences.md) | The customer's preferences. | [optional]
|
data/docs/CustomersApi.md
CHANGED
@@ -126,7 +126,7 @@ Name | Type | Description | Notes
|
|
126
126
|
|
127
127
|
DeleteCustomer
|
128
128
|
|
129
|
-
Deletes a customer from a business, along with any linked cards on file.
|
129
|
+
Deletes a customer from a business, along with any linked cards on file. When two profiles are merged into a single profile, that profile is assigned a new `customer_id`. You must use the new `customer_id` to delete merged profiles.
|
130
130
|
|
131
131
|
### Example
|
132
132
|
```ruby
|
@@ -394,7 +394,7 @@ Name | Type | Description | Notes
|
|
394
394
|
|
395
395
|
UpdateCustomer
|
396
396
|
|
397
|
-
Updates the details of an existing customer.
|
397
|
+
Updates the details of an existing customer. When two profiles are merged into a single profile, that profile is assigned a new `customer_id`. You must use the new `customer_id` to update merged profiles. You cannot edit a customer's cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-createcustomercard) endpoint.
|
398
398
|
|
399
399
|
### Example
|
400
400
|
```ruby
|
data/docs/ErrorCode.md
CHANGED
@@ -77,11 +77,13 @@ Name | Type
|
|
77
77
|
**INVALID_EMAIL_ADDRESS** | string
|
78
78
|
**INVALID_PHONE_NUMBER** | string
|
79
79
|
**CHECKOUT_EXPIRED** | string
|
80
|
+
**BAD_CERTIFICATE** | string
|
80
81
|
**CARD_DECLINED** | string
|
81
82
|
**VERIFY_CVV_FAILURE** | string
|
82
83
|
**VERIFY_AVS_FAILURE** | string
|
83
84
|
**CARD_DECLINED_CALL_ISSUER** | string
|
84
85
|
**NOT_FOUND** | string
|
86
|
+
**APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND** | string
|
85
87
|
**METHOD_NOT_ALLOWED** | string
|
86
88
|
**REQUEST_TIMEOUT** | string
|
87
89
|
**CONFLICT** | string
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# SquareConnect::InventoryAdjustment
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
Represents a change in state or quantity of product inventory at a particular time and location.
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type | Description | Notes
|
9
|
+
------------ | ------------- | ------------- | -------------
|
10
|
+
**id** | **String** | A unique ID generated by Square for the [InventoryAdjustment](#type-inventoryadjustment). | [optional]
|
11
|
+
**reference_id** | **String** | An optional ID provided by the application to tie the [InventoryAdjustment](#type-inventoryadjustment) to an external system. | [optional]
|
12
|
+
**from_state** | **String** | The [InventoryState](#type-inventorystate) of the related quantity of items before the adjustment. | [optional]
|
13
|
+
**to_state** | **String** | The [InventoryState](#type-inventorystate) of the related quantity of items after the adjustment. | [optional]
|
14
|
+
**location_id** | **String** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
|
15
|
+
**catalog_object_id** | **String** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional]
|
16
|
+
**catalog_object_type** | **String** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional]
|
17
|
+
**quantity** | **String** | The number of items affected by the adjustment as a decimal string. Fractional quantities are not supported. | [optional]
|
18
|
+
**total_price_money** | [**Money**](Money.md) | The read-only total price paid for goods associated with the adjustment. Present if and only if `to_state` is `SOLD`. Always non-negative. | [optional]
|
19
|
+
**occurred_at** | **String** | A client-generated timestamp in RFC 3339 format that indicates when the adjustment took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional]
|
20
|
+
**created_at** | **String** | A read-only timestamp in RFC 3339 format that indicates when Square received the adjustment. | [optional]
|
21
|
+
**source** | [**SourceApplication**](SourceApplication.md) | Read-only information about the application that caused the inventory adjustment. | [optional]
|
22
|
+
**employee_id** | **String** | The Square ID of the [Employee](#type-employee) responsible for the inventory adjustment. | [optional]
|
23
|
+
**transaction_id** | **String** | The read-only Square ID of the [Transaction][#type-transaction] that caused the adjustment. Only relevant for payment-related state transitions. | [optional]
|
24
|
+
**refund_id** | **String** | The read-only Square ID of the [Refund][#type-refund] that caused the adjustment. Only relevant for refund-related state transitions. | [optional]
|
25
|
+
**purchase_order_id** | **String** | The read-only Square ID of the purchase order that caused the adjustment. Only relevant for state transitions from the Square for Retail app. | [optional]
|
26
|
+
**goods_receipt_id** | **String** | The read-only Square ID of the Square goods receipt that caused the adjustment. Only relevant for state transitions from the Square for Retail app. | [optional]
|
27
|
+
|
28
|
+
|
@@ -0,0 +1,391 @@
|
|
1
|
+
# SquareConnect::InventoryApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://connect.squareup.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**batch_change_inventory**](InventoryApi.md#batch_change_inventory) | **POST** /v2/inventory/batch-change | BatchChangeInventory
|
8
|
+
[**batch_retrieve_inventory_changes**](InventoryApi.md#batch_retrieve_inventory_changes) | **POST** /v2/inventory/batch-retrieve-changes | BatchRetrieveInventoryChanges
|
9
|
+
[**batch_retrieve_inventory_counts**](InventoryApi.md#batch_retrieve_inventory_counts) | **POST** /v2/inventory/batch-retrieve-counts | BatchRetrieveInventoryCounts
|
10
|
+
[**retrieve_inventory_adjustment**](InventoryApi.md#retrieve_inventory_adjustment) | **GET** /v2/inventory/adjustment/{adjustment_id} | RetrieveInventoryAdjustment
|
11
|
+
[**retrieve_inventory_changes**](InventoryApi.md#retrieve_inventory_changes) | **GET** /v2/inventory/{catalog_object_id}/changes | RetrieveInventoryChanges
|
12
|
+
[**retrieve_inventory_count**](InventoryApi.md#retrieve_inventory_count) | **GET** /v2/inventory/{catalog_object_id} | RetrieveInventoryCount
|
13
|
+
[**retrieve_inventory_physical_count**](InventoryApi.md#retrieve_inventory_physical_count) | **GET** /v2/inventory/physical-count/{physical_count_id} | RetrieveInventoryPhysicalCount
|
14
|
+
|
15
|
+
|
16
|
+
# **batch_change_inventory**
|
17
|
+
> BatchChangeInventoryResponse batch_change_inventory(body)
|
18
|
+
|
19
|
+
BatchChangeInventory
|
20
|
+
|
21
|
+
Applies adjustments and counts to the provided item quantities. On success: returns the current calculated counts for all objects referenced in the request. On failure: returns a list of related errors.
|
22
|
+
|
23
|
+
### Example
|
24
|
+
```ruby
|
25
|
+
# load the gem
|
26
|
+
require 'square_connect'
|
27
|
+
# setup authorization
|
28
|
+
SquareConnect.configure do |config|
|
29
|
+
# Configure OAuth2 access token for authorization: oauth2
|
30
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
31
|
+
end
|
32
|
+
|
33
|
+
api_instance = SquareConnect::InventoryApi.new
|
34
|
+
|
35
|
+
body = SquareConnect::BatchChangeInventoryRequest.new # BatchChangeInventoryRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
36
|
+
|
37
|
+
|
38
|
+
begin
|
39
|
+
#BatchChangeInventory
|
40
|
+
result = api_instance.batch_change_inventory(body)
|
41
|
+
p result
|
42
|
+
rescue SquareConnect::ApiError => e
|
43
|
+
puts "Exception when calling InventoryApi->batch_change_inventory: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
Name | Type | Description | Notes
|
50
|
+
------------- | ------------- | ------------- | -------------
|
51
|
+
**body** | [**BatchChangeInventoryRequest**](BatchChangeInventoryRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
52
|
+
|
53
|
+
### Return type
|
54
|
+
|
55
|
+
[**BatchChangeInventoryResponse**](BatchChangeInventoryResponse.md)
|
56
|
+
|
57
|
+
### Authorization
|
58
|
+
|
59
|
+
[oauth2](../README.md#oauth2)
|
60
|
+
|
61
|
+
### HTTP request headers
|
62
|
+
|
63
|
+
- **Content-Type**: application/json
|
64
|
+
- **Accept**: application/json
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
# **batch_retrieve_inventory_changes**
|
69
|
+
> BatchRetrieveInventoryChangesResponse batch_retrieve_inventory_changes(body)
|
70
|
+
|
71
|
+
BatchRetrieveInventoryChanges
|
72
|
+
|
73
|
+
Returns historical physical counts and adjustments based on the provided filter criteria. Results are paginated and sorted in ascending order according their `occurred_at` timestamp (oldest first). BatchRetrieveInventoryChanges is a catch-all query endpoint for queries that cannot be handled by other, simpler endpoints.
|
74
|
+
|
75
|
+
### Example
|
76
|
+
```ruby
|
77
|
+
# load the gem
|
78
|
+
require 'square_connect'
|
79
|
+
# setup authorization
|
80
|
+
SquareConnect.configure do |config|
|
81
|
+
# Configure OAuth2 access token for authorization: oauth2
|
82
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
83
|
+
end
|
84
|
+
|
85
|
+
api_instance = SquareConnect::InventoryApi.new
|
86
|
+
|
87
|
+
body = SquareConnect::BatchRetrieveInventoryChangesRequest.new # BatchRetrieveInventoryChangesRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
88
|
+
|
89
|
+
|
90
|
+
begin
|
91
|
+
#BatchRetrieveInventoryChanges
|
92
|
+
result = api_instance.batch_retrieve_inventory_changes(body)
|
93
|
+
p result
|
94
|
+
rescue SquareConnect::ApiError => e
|
95
|
+
puts "Exception when calling InventoryApi->batch_retrieve_inventory_changes: #{e}"
|
96
|
+
end
|
97
|
+
```
|
98
|
+
|
99
|
+
### Parameters
|
100
|
+
|
101
|
+
Name | Type | Description | Notes
|
102
|
+
------------- | ------------- | ------------- | -------------
|
103
|
+
**body** | [**BatchRetrieveInventoryChangesRequest**](BatchRetrieveInventoryChangesRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
104
|
+
|
105
|
+
### Return type
|
106
|
+
|
107
|
+
[**BatchRetrieveInventoryChangesResponse**](BatchRetrieveInventoryChangesResponse.md)
|
108
|
+
|
109
|
+
### Authorization
|
110
|
+
|
111
|
+
[oauth2](../README.md#oauth2)
|
112
|
+
|
113
|
+
### HTTP request headers
|
114
|
+
|
115
|
+
- **Content-Type**: application/json
|
116
|
+
- **Accept**: application/json
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
# **batch_retrieve_inventory_counts**
|
121
|
+
> BatchRetrieveInventoryCountsResponse batch_retrieve_inventory_counts(body)
|
122
|
+
|
123
|
+
BatchRetrieveInventoryCounts
|
124
|
+
|
125
|
+
Returns current counts for the provided [CatalogObject](#type-catalogobject)s at the requested [Location](#type-location)s. Results are paginated and sorted in descending order according to their `calculated_at` timestamp (newest first). When `updated_at` is specified, only counts that have changed since that time (based on the server timestamp for the most recent change) are returned. This allows clients to perform a \"sync\" operation, for example in response to receiving a Webhook notification.
|
126
|
+
|
127
|
+
### Example
|
128
|
+
```ruby
|
129
|
+
# load the gem
|
130
|
+
require 'square_connect'
|
131
|
+
# setup authorization
|
132
|
+
SquareConnect.configure do |config|
|
133
|
+
# Configure OAuth2 access token for authorization: oauth2
|
134
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
135
|
+
end
|
136
|
+
|
137
|
+
api_instance = SquareConnect::InventoryApi.new
|
138
|
+
|
139
|
+
body = SquareConnect::BatchRetrieveInventoryCountsRequest.new # BatchRetrieveInventoryCountsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
140
|
+
|
141
|
+
|
142
|
+
begin
|
143
|
+
#BatchRetrieveInventoryCounts
|
144
|
+
result = api_instance.batch_retrieve_inventory_counts(body)
|
145
|
+
p result
|
146
|
+
rescue SquareConnect::ApiError => e
|
147
|
+
puts "Exception when calling InventoryApi->batch_retrieve_inventory_counts: #{e}"
|
148
|
+
end
|
149
|
+
```
|
150
|
+
|
151
|
+
### Parameters
|
152
|
+
|
153
|
+
Name | Type | Description | Notes
|
154
|
+
------------- | ------------- | ------------- | -------------
|
155
|
+
**body** | [**BatchRetrieveInventoryCountsRequest**](BatchRetrieveInventoryCountsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
|
156
|
+
|
157
|
+
### Return type
|
158
|
+
|
159
|
+
[**BatchRetrieveInventoryCountsResponse**](BatchRetrieveInventoryCountsResponse.md)
|
160
|
+
|
161
|
+
### Authorization
|
162
|
+
|
163
|
+
[oauth2](../README.md#oauth2)
|
164
|
+
|
165
|
+
### HTTP request headers
|
166
|
+
|
167
|
+
- **Content-Type**: application/json
|
168
|
+
- **Accept**: application/json
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
# **retrieve_inventory_adjustment**
|
173
|
+
> RetrieveInventoryAdjustmentResponse retrieve_inventory_adjustment(adjustment_id)
|
174
|
+
|
175
|
+
RetrieveInventoryAdjustment
|
176
|
+
|
177
|
+
Returns the [InventoryAdjustment](#type-inventoryadjustment) object with the provided `adjustment_id`.
|
178
|
+
|
179
|
+
### Example
|
180
|
+
```ruby
|
181
|
+
# load the gem
|
182
|
+
require 'square_connect'
|
183
|
+
# setup authorization
|
184
|
+
SquareConnect.configure do |config|
|
185
|
+
# Configure OAuth2 access token for authorization: oauth2
|
186
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
187
|
+
end
|
188
|
+
|
189
|
+
api_instance = SquareConnect::InventoryApi.new
|
190
|
+
|
191
|
+
adjustment_id = "adjustment_id_example" # String | ID of the [InventoryAdjustment](#type-inventoryadjustment) to retrieve.
|
192
|
+
|
193
|
+
|
194
|
+
begin
|
195
|
+
#RetrieveInventoryAdjustment
|
196
|
+
result = api_instance.retrieve_inventory_adjustment(adjustment_id)
|
197
|
+
p result
|
198
|
+
rescue SquareConnect::ApiError => e
|
199
|
+
puts "Exception when calling InventoryApi->retrieve_inventory_adjustment: #{e}"
|
200
|
+
end
|
201
|
+
```
|
202
|
+
|
203
|
+
### Parameters
|
204
|
+
|
205
|
+
Name | Type | Description | Notes
|
206
|
+
------------- | ------------- | ------------- | -------------
|
207
|
+
**adjustment_id** | **String**| ID of the [InventoryAdjustment](#type-inventoryadjustment) to retrieve. |
|
208
|
+
|
209
|
+
### Return type
|
210
|
+
|
211
|
+
[**RetrieveInventoryAdjustmentResponse**](RetrieveInventoryAdjustmentResponse.md)
|
212
|
+
|
213
|
+
### Authorization
|
214
|
+
|
215
|
+
[oauth2](../README.md#oauth2)
|
216
|
+
|
217
|
+
### HTTP request headers
|
218
|
+
|
219
|
+
- **Content-Type**: application/json
|
220
|
+
- **Accept**: application/json
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
# **retrieve_inventory_changes**
|
225
|
+
> RetrieveInventoryChangesResponse retrieve_inventory_changes(catalog_object_id, opts)
|
226
|
+
|
227
|
+
RetrieveInventoryChanges
|
228
|
+
|
229
|
+
Returns a set of physical counts and inventory adjustments for the provided [CatalogObject](#type-catalogobject) at the requested [Location](#type-location)s. Results are paginated and sorted in descending order according to their `occurred_at` timestamp (newest first). There are no limits on how far back the caller can page. This endpoint is useful when displaying recent changes for a specific item. For more sophisticated queries, use a batch endpoint.
|
230
|
+
|
231
|
+
### Example
|
232
|
+
```ruby
|
233
|
+
# load the gem
|
234
|
+
require 'square_connect'
|
235
|
+
# setup authorization
|
236
|
+
SquareConnect.configure do |config|
|
237
|
+
# Configure OAuth2 access token for authorization: oauth2
|
238
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
239
|
+
end
|
240
|
+
|
241
|
+
api_instance = SquareConnect::InventoryApi.new
|
242
|
+
|
243
|
+
catalog_object_id = "catalog_object_id_example" # String | ID of the [CatalogObject](#type-catalogobject) to retrieve.
|
244
|
+
|
245
|
+
opts = {
|
246
|
+
location_ids: "location_ids_example", # String | The [Location](#type-location) IDs to look up as a comma-separated list. An empty list queries all locations.
|
247
|
+
cursor: "cursor_example" # String | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Paginating results](#paginatingresults) for more information.
|
248
|
+
}
|
249
|
+
|
250
|
+
begin
|
251
|
+
#RetrieveInventoryChanges
|
252
|
+
result = api_instance.retrieve_inventory_changes(catalog_object_id, opts)
|
253
|
+
p result
|
254
|
+
rescue SquareConnect::ApiError => e
|
255
|
+
puts "Exception when calling InventoryApi->retrieve_inventory_changes: #{e}"
|
256
|
+
end
|
257
|
+
```
|
258
|
+
|
259
|
+
### Parameters
|
260
|
+
|
261
|
+
Name | Type | Description | Notes
|
262
|
+
------------- | ------------- | ------------- | -------------
|
263
|
+
**catalog_object_id** | **String**| ID of the [CatalogObject](#type-catalogobject) to retrieve. |
|
264
|
+
**location_ids** | **String**| The [Location](#type-location) IDs to look up as a comma-separated list. An empty list queries all locations. | [optional]
|
265
|
+
**cursor** | **String**| A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Paginating results](#paginatingresults) for more information. | [optional]
|
266
|
+
|
267
|
+
### Return type
|
268
|
+
|
269
|
+
[**RetrieveInventoryChangesResponse**](RetrieveInventoryChangesResponse.md)
|
270
|
+
|
271
|
+
### Authorization
|
272
|
+
|
273
|
+
[oauth2](../README.md#oauth2)
|
274
|
+
|
275
|
+
### HTTP request headers
|
276
|
+
|
277
|
+
- **Content-Type**: application/json
|
278
|
+
- **Accept**: application/json
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
# **retrieve_inventory_count**
|
283
|
+
> RetrieveInventoryCountResponse retrieve_inventory_count(catalog_object_id, opts)
|
284
|
+
|
285
|
+
RetrieveInventoryCount
|
286
|
+
|
287
|
+
Retrieves the current calculated stock count for a given [CatalogObject](#type-catalogobject) at a given set of [Location](#type-location)s. Responses are paginated and unsorted. For more sophisticated queries, use a batch endpoint.
|
288
|
+
|
289
|
+
### Example
|
290
|
+
```ruby
|
291
|
+
# load the gem
|
292
|
+
require 'square_connect'
|
293
|
+
# setup authorization
|
294
|
+
SquareConnect.configure do |config|
|
295
|
+
# Configure OAuth2 access token for authorization: oauth2
|
296
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
297
|
+
end
|
298
|
+
|
299
|
+
api_instance = SquareConnect::InventoryApi.new
|
300
|
+
|
301
|
+
catalog_object_id = "catalog_object_id_example" # String | ID of the [CatalogObject](#type-catalogobject) to retrieve.
|
302
|
+
|
303
|
+
opts = {
|
304
|
+
location_ids: "location_ids_example", # String | The [Location](#type-location) IDs to look up as a comma-separated list. An empty list queries all locations.
|
305
|
+
cursor: "cursor_example" # String | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Paginating results](#paginatingresults) for more information.
|
306
|
+
}
|
307
|
+
|
308
|
+
begin
|
309
|
+
#RetrieveInventoryCount
|
310
|
+
result = api_instance.retrieve_inventory_count(catalog_object_id, opts)
|
311
|
+
p result
|
312
|
+
rescue SquareConnect::ApiError => e
|
313
|
+
puts "Exception when calling InventoryApi->retrieve_inventory_count: #{e}"
|
314
|
+
end
|
315
|
+
```
|
316
|
+
|
317
|
+
### Parameters
|
318
|
+
|
319
|
+
Name | Type | Description | Notes
|
320
|
+
------------- | ------------- | ------------- | -------------
|
321
|
+
**catalog_object_id** | **String**| ID of the [CatalogObject](#type-catalogobject) to retrieve. |
|
322
|
+
**location_ids** | **String**| The [Location](#type-location) IDs to look up as a comma-separated list. An empty list queries all locations. | [optional]
|
323
|
+
**cursor** | **String**| A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See [Paginating results](#paginatingresults) for more information. | [optional]
|
324
|
+
|
325
|
+
### Return type
|
326
|
+
|
327
|
+
[**RetrieveInventoryCountResponse**](RetrieveInventoryCountResponse.md)
|
328
|
+
|
329
|
+
### Authorization
|
330
|
+
|
331
|
+
[oauth2](../README.md#oauth2)
|
332
|
+
|
333
|
+
### HTTP request headers
|
334
|
+
|
335
|
+
- **Content-Type**: application/json
|
336
|
+
- **Accept**: application/json
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
# **retrieve_inventory_physical_count**
|
341
|
+
> RetrieveInventoryPhysicalCountResponse retrieve_inventory_physical_count(physical_count_id)
|
342
|
+
|
343
|
+
RetrieveInventoryPhysicalCount
|
344
|
+
|
345
|
+
Returns the [InventoryPhysicalCount](#type-inventoryphysicalcount) object with the provided `physical_count_id`.
|
346
|
+
|
347
|
+
### Example
|
348
|
+
```ruby
|
349
|
+
# load the gem
|
350
|
+
require 'square_connect'
|
351
|
+
# setup authorization
|
352
|
+
SquareConnect.configure do |config|
|
353
|
+
# Configure OAuth2 access token for authorization: oauth2
|
354
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
355
|
+
end
|
356
|
+
|
357
|
+
api_instance = SquareConnect::InventoryApi.new
|
358
|
+
|
359
|
+
physical_count_id = "physical_count_id_example" # String | ID of the [InventoryPhysicalCount](#type-inventoryphysicalcount) to retrieve.
|
360
|
+
|
361
|
+
|
362
|
+
begin
|
363
|
+
#RetrieveInventoryPhysicalCount
|
364
|
+
result = api_instance.retrieve_inventory_physical_count(physical_count_id)
|
365
|
+
p result
|
366
|
+
rescue SquareConnect::ApiError => e
|
367
|
+
puts "Exception when calling InventoryApi->retrieve_inventory_physical_count: #{e}"
|
368
|
+
end
|
369
|
+
```
|
370
|
+
|
371
|
+
### Parameters
|
372
|
+
|
373
|
+
Name | Type | Description | Notes
|
374
|
+
------------- | ------------- | ------------- | -------------
|
375
|
+
**physical_count_id** | **String**| ID of the [InventoryPhysicalCount](#type-inventoryphysicalcount) to retrieve. |
|
376
|
+
|
377
|
+
### Return type
|
378
|
+
|
379
|
+
[**RetrieveInventoryPhysicalCountResponse**](RetrieveInventoryPhysicalCountResponse.md)
|
380
|
+
|
381
|
+
### Authorization
|
382
|
+
|
383
|
+
[oauth2](../README.md#oauth2)
|
384
|
+
|
385
|
+
### HTTP request headers
|
386
|
+
|
387
|
+
- **Content-Type**: application/json
|
388
|
+
- **Accept**: application/json
|
389
|
+
|
390
|
+
|
391
|
+
|