square_connect 2.1.0.beta → 2.1.0.78

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +71 -8
  3. data/docs/BatchDeleteCatalogObjectsRequest.md +12 -0
  4. data/docs/BatchDeleteCatalogObjectsResponse.md +14 -0
  5. data/docs/BatchRetrieveCatalogObjectsRequest.md +13 -0
  6. data/docs/BatchRetrieveCatalogObjectsResponse.md +14 -0
  7. data/docs/BatchUpsertCatalogObjectsRequest.md +13 -0
  8. data/docs/BatchUpsertCatalogObjectsResponse.md +15 -0
  9. data/docs/CatalogApi.md +592 -0
  10. data/docs/CatalogCategory.md +12 -0
  11. data/docs/CatalogDiscount.md +17 -0
  12. data/docs/CatalogDiscountType.md +15 -0
  13. data/docs/CatalogIdMapping.md +13 -0
  14. data/docs/CatalogInfoRequest.md +11 -0
  15. data/docs/CatalogInfoResponse.md +13 -0
  16. data/docs/CatalogInfoResponseLimits.md +22 -0
  17. data/docs/CatalogItem.md +25 -0
  18. data/docs/CatalogItemModifierListInfo.md +16 -0
  19. data/docs/CatalogItemProductType.md +16 -0
  20. data/docs/CatalogItemVariation.md +23 -0
  21. data/docs/CatalogModifier.md +13 -0
  22. data/docs/CatalogModifierList.md +14 -0
  23. data/docs/CatalogModifierListSelectionType.md +13 -0
  24. data/docs/CatalogModifierOverride.md +13 -0
  25. data/docs/CatalogObject.md +27 -0
  26. data/docs/CatalogObjectBatch.md +12 -0
  27. data/docs/CatalogObjectType.md +18 -0
  28. data/docs/CatalogPricingType.md +13 -0
  29. data/docs/CatalogQuery.md +18 -0
  30. data/docs/CatalogQueryExact.md +13 -0
  31. data/docs/CatalogQueryItemsForModifierList.md +12 -0
  32. data/docs/CatalogQueryItemsForTax.md +12 -0
  33. data/docs/CatalogQueryPrefix.md +13 -0
  34. data/docs/CatalogQueryRange.md +14 -0
  35. data/docs/CatalogQuerySortedAttribute.md +14 -0
  36. data/docs/CatalogQueryText.md +12 -0
  37. data/docs/CatalogTax.md +17 -0
  38. data/docs/CatalogV1Id.md +13 -0
  39. data/docs/Checkout.md +4 -4
  40. data/docs/CreateCheckoutRequest.md +5 -5
  41. data/docs/DeleteCatalogObjectRequest.md +11 -0
  42. data/docs/DeleteCatalogObjectResponse.md +14 -0
  43. data/docs/ErrorCode.md +2 -0
  44. data/docs/InventoryAlertType.md +13 -0
  45. data/docs/ItemVariationLocationOverrides.md +17 -0
  46. data/docs/ListCatalogRequest.md +13 -0
  47. data/docs/ListCatalogResponse.md +14 -0
  48. data/docs/RetrieveCatalogObjectRequest.md +12 -0
  49. data/docs/RetrieveCatalogObjectResponse.md +14 -0
  50. data/docs/SearchCatalogObjectsRequest.md +18 -0
  51. data/docs/SearchCatalogObjectsResponse.md +15 -0
  52. data/docs/TaxCalculationPhase.md +13 -0
  53. data/docs/TaxInclusionType.md +13 -0
  54. data/docs/UpdateItemModifierListsRequest.md +14 -0
  55. data/docs/UpdateItemModifierListsResponse.md +13 -0
  56. data/docs/UpdateItemTaxesRequest.md +14 -0
  57. data/docs/UpdateItemTaxesResponse.md +13 -0
  58. data/docs/UpsertCatalogObjectRequest.md +13 -0
  59. data/docs/UpsertCatalogObjectResponse.md +14 -0
  60. data/docs/V1Item.md +1 -1
  61. data/docs/V1Variation.md +0 -1
  62. data/lib/square_connect.rb +54 -1
  63. data/lib/square_connect/api/catalog_api.rb +604 -0
  64. data/lib/square_connect/models/batch_delete_catalog_objects_request.rb +188 -0
  65. data/lib/square_connect/models/batch_delete_catalog_objects_response.rb +210 -0
  66. data/lib/square_connect/models/batch_retrieve_catalog_objects_request.rb +203 -0
  67. data/lib/square_connect/models/batch_retrieve_catalog_objects_response.rb +212 -0
  68. data/lib/square_connect/models/batch_upsert_catalog_objects_request.rb +222 -0
  69. data/lib/square_connect/models/batch_upsert_catalog_objects_response.rb +222 -0
  70. data/lib/square_connect/models/catalog_category.rb +210 -0
  71. data/lib/square_connect/models/catalog_discount.rb +293 -0
  72. data/lib/square_connect/models/catalog_discount_type.rb +21 -0
  73. data/lib/square_connect/models/catalog_id_mapping.rb +196 -0
  74. data/lib/square_connect/models/catalog_info_request.rb +176 -0
  75. data/lib/square_connect/models/catalog_info_response.rb +198 -0
  76. data/lib/square_connect/models/catalog_info_response_limits.rb +286 -0
  77. data/lib/square_connect/models/catalog_item.rb +379 -0
  78. data/lib/square_connect/models/catalog_item_modifier_list_info.rb +252 -0
  79. data/lib/square_connect/models/catalog_item_product_type.rb +22 -0
  80. data/lib/square_connect/models/catalog_item_variation.rb +343 -0
  81. data/lib/square_connect/models/catalog_modifier.rb +220 -0
  82. data/lib/square_connect/models/catalog_modifier_list.rb +265 -0
  83. data/lib/square_connect/models/catalog_modifier_list_selection_type.rb +19 -0
  84. data/lib/square_connect/models/catalog_modifier_override.rb +220 -0
  85. data/lib/square_connect/models/catalog_object.rb +404 -0
  86. data/lib/square_connect/models/catalog_object_batch.rb +188 -0
  87. data/lib/square_connect/models/catalog_object_type.rb +24 -0
  88. data/lib/square_connect/models/catalog_pricing_type.rb +19 -0
  89. data/lib/square_connect/models/catalog_query.rb +246 -0
  90. data/lib/square_connect/models/catalog_query_exact.rb +225 -0
  91. data/lib/square_connect/models/catalog_query_items_for_modifier_list.rb +193 -0
  92. data/lib/square_connect/models/catalog_query_items_for_tax.rb +193 -0
  93. data/lib/square_connect/models/catalog_query_prefix.rb +244 -0
  94. data/lib/square_connect/models/catalog_query_range.rb +230 -0
  95. data/lib/square_connect/models/catalog_query_sorted_attribute.rb +263 -0
  96. data/lib/square_connect/models/catalog_query_text.rb +193 -0
  97. data/lib/square_connect/models/catalog_tax.rb +305 -0
  98. data/lib/square_connect/models/catalog_v1_id.rb +196 -0
  99. data/lib/square_connect/models/checkout.rb +4 -4
  100. data/lib/square_connect/models/create_checkout_request.rb +5 -5
  101. data/lib/square_connect/models/delete_catalog_object_request.rb +176 -0
  102. data/lib/square_connect/models/delete_catalog_object_response.rb +210 -0
  103. data/lib/square_connect/models/error.rb +2 -2
  104. data/lib/square_connect/models/error_code.rb +2 -0
  105. data/lib/square_connect/models/inventory_alert_type.rb +19 -0
  106. data/lib/square_connect/models/item_variation_location_overrides.rb +281 -0
  107. data/lib/square_connect/models/list_catalog_request.rb +196 -0
  108. data/lib/square_connect/models/list_catalog_response.rb +210 -0
  109. data/lib/square_connect/models/retrieve_catalog_object_request.rb +186 -0
  110. data/lib/square_connect/models/retrieve_catalog_object_response.rb +210 -0
  111. data/lib/square_connect/models/search_catalog_objects_request.rb +269 -0
  112. data/lib/square_connect/models/search_catalog_objects_response.rb +222 -0
  113. data/lib/square_connect/models/tax_calculation_phase.rb +19 -0
  114. data/lib/square_connect/models/tax_inclusion_type.rb +19 -0
  115. data/lib/square_connect/models/update_item_modifier_lists_request.rb +217 -0
  116. data/lib/square_connect/models/update_item_modifier_lists_response.rb +198 -0
  117. data/lib/square_connect/models/update_item_taxes_request.rb +217 -0
  118. data/lib/square_connect/models/update_item_taxes_response.rb +198 -0
  119. data/lib/square_connect/models/{create_order_request.rb → upsert_catalog_object_request.rb} +14 -23
  120. data/lib/square_connect/models/upsert_catalog_object_response.rb +210 -0
  121. data/lib/square_connect/models/v1_item.rb +1 -1
  122. data/lib/square_connect/models/v1_variation.rb +1 -11
  123. data/lib/square_connect/version.rb +1 -1
  124. data/spec/api/catalog_api_spec.rb +611 -0
  125. data/spec/models/batch_delete_catalog_objects_request_spec.rb +39 -0
  126. data/spec/models/batch_delete_catalog_objects_response_spec.rb +51 -0
  127. data/spec/models/batch_retrieve_catalog_objects_request_spec.rb +45 -0
  128. data/spec/models/batch_retrieve_catalog_objects_response_spec.rb +51 -0
  129. data/spec/models/batch_upsert_catalog_objects_request_spec.rb +45 -0
  130. data/spec/models/batch_upsert_catalog_objects_response_spec.rb +57 -0
  131. data/spec/models/catalog_category_spec.rb +39 -0
  132. data/spec/models/catalog_discount_spec.rb +73 -0
  133. data/spec/models/catalog_discount_type_spec.rb +33 -0
  134. data/spec/models/catalog_id_mapping_spec.rb +45 -0
  135. data/spec/models/catalog_info_request_spec.rb +33 -0
  136. data/spec/models/catalog_info_response_limits_spec.rb +99 -0
  137. data/spec/models/catalog_info_response_spec.rb +45 -0
  138. data/spec/models/catalog_item_modifier_list_info_spec.rb +63 -0
  139. data/spec/models/catalog_item_product_type_spec.rb +33 -0
  140. data/spec/models/catalog_item_spec.rb +121 -0
  141. data/spec/models/catalog_item_variation_spec.rb +113 -0
  142. data/spec/models/catalog_modifier_list_selection_type_spec.rb +33 -0
  143. data/spec/models/catalog_modifier_list_spec.rb +55 -0
  144. data/spec/models/catalog_modifier_override_spec.rb +45 -0
  145. data/spec/models/catalog_modifier_spec.rb +45 -0
  146. data/spec/models/catalog_object_batch_spec.rb +39 -0
  147. data/spec/models/catalog_object_spec.rb +133 -0
  148. data/spec/models/catalog_object_type_spec.rb +33 -0
  149. data/spec/models/catalog_pricing_type_spec.rb +33 -0
  150. data/spec/models/catalog_query_exact_spec.rb +45 -0
  151. data/spec/models/catalog_query_items_for_modifier_list_spec.rb +39 -0
  152. data/spec/models/catalog_query_items_for_tax_spec.rb +39 -0
  153. data/spec/models/catalog_query_prefix_spec.rb +45 -0
  154. data/spec/models/catalog_query_range_spec.rb +51 -0
  155. data/spec/models/catalog_query_sorted_attribute_spec.rb +55 -0
  156. data/spec/models/catalog_query_spec.rb +75 -0
  157. data/spec/models/catalog_query_text_spec.rb +39 -0
  158. data/spec/models/catalog_tax_spec.rb +77 -0
  159. data/spec/models/catalog_v1_id_spec.rb +45 -0
  160. data/spec/models/delete_catalog_object_request_spec.rb +39 -0
  161. data/spec/models/delete_catalog_object_response_spec.rb +51 -0
  162. data/spec/models/inventory_alert_type_spec.rb +33 -0
  163. data/spec/models/item_variation_location_overrides_spec.rb +77 -0
  164. data/spec/models/list_catalog_request_spec.rb +45 -0
  165. data/spec/models/list_catalog_response_spec.rb +51 -0
  166. data/spec/models/retrieve_catalog_object_request_spec.rb +45 -0
  167. data/spec/models/retrieve_catalog_object_response_spec.rb +51 -0
  168. data/spec/models/search_catalog_objects_request_spec.rb +79 -0
  169. data/spec/models/search_catalog_objects_response_spec.rb +57 -0
  170. data/spec/models/tax_calculation_phase_spec.rb +33 -0
  171. data/spec/models/tax_inclusion_type_spec.rb +33 -0
  172. data/spec/models/update_item_modifier_lists_request_spec.rb +51 -0
  173. data/spec/models/update_item_modifier_lists_response_spec.rb +45 -0
  174. data/spec/models/update_item_taxes_request_spec.rb +51 -0
  175. data/spec/models/update_item_taxes_response_spec.rb +45 -0
  176. data/spec/models/{create_order_request_spec.rb → upsert_catalog_object_request_spec.rb} +7 -7
  177. data/spec/models/upsert_catalog_object_response_spec.rb +51 -0
  178. data/square_connect.gemspec +1 -1
  179. data/travis-ci/accounts.enc +0 -0
  180. metadata +222 -17
  181. data/docs/CreateOrderRequest.md +0 -13
  182. data/docs/V1LocationApi.md +0 -102
  183. data/lib/.DS_Store +0 -0
  184. data/lib/square_connect/.DS_Store +0 -0
  185. data/spec/.DS_Store +0 -0
  186. data/square_connect-2.0.2.gem +0 -0
  187. data/square_connect-2.1.0.gem +0 -0
  188. data/square_connect-2.1.0beta.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0dd47f4de208912493332e7ed8cba8e5cf5a61e3
4
- data.tar.gz: 34d6a856a4d28c7acf039ef6f64ca6c3aa7c3c10
3
+ metadata.gz: e96e8cef9e8325b5e7d5bfa82cf8ce2a0bf8e0ac
4
+ data.tar.gz: 155d5dd0bc86fe672626bbfcd56090c76cfcdd8a
5
5
  SHA512:
6
- metadata.gz: 8d660d20f253bb973a562ccae4193ebeb7bec5c457a814c754f8528630e46a58a83637845baa3c177f10eb73546709e105a78dc3870b17bb4a742fda42135032
7
- data.tar.gz: b0bff99a4e1974fa7f936d0c94b967a8dcc4be1bac6dc993997fc42ccac3e86f7162bb41de3afd8a12447cc5a64cd6d09a8be470399d6cff1cf1303f4d2caaaf
6
+ metadata.gz: 3527bc21da434a01c4078f41b33d10c6e6f9230a8a896cfcc2a2d58fd928d47d7842c6a09e239594eef7ce23615868e65cfea1e1836d0921f50e3a69375abd67
7
+ data.tar.gz: 31e9bf0f39e7261e094b815e4c3e856276ef312e29e3809595e767fbd1e8cf4156a9b55106982cac0fa24a08515e3eaf00cdb180558583246edeee36b8076bd4
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  Square Connect Ruby SDKs [![Build Status](https://travis-ci.org/square/connect-ruby-sdk.svg?branch=master)](https://travis-ci.org/square/connect-ruby-sdk)[![Gem Version](https://badge.fury.io/rb/square_connect.svg)](https://badge.fury.io/rb/square_connect)
2
2
  ==================
3
3
 
4
+ **If you have feedback about the new SDKs, or just want to talk to other Square Developers, request an invite to the new [slack community for Square Developers](https://docs.google.com/forms/d/e/1FAIpQLSfAZGIEZoNs-XryKqUoW3atFQHdQw5UqXLMOVPq3V4DEq-AJw/viewform?usp=sf_link#response=ACYDBNj5LFgPy8Tcac2gSgv_IjXvgWsPy2CO2xTXwnc0OSSxCvWFgc7SCDHvVQ)**
5
+
4
6
  This repository contains the released Ruby client SDK. Check out our [API
5
7
  specification repository](https://github.com/square/connect-api-specification)
6
8
  for the specification and template files we used to generate this.
@@ -55,19 +57,17 @@ SquareConnect.configure do |config|
55
57
  config.access_token = 'YOUR ACCESS TOKEN'
56
58
  end
57
59
 
58
- api_instance = SquareConnect::CheckoutApi.new
59
-
60
- location_id = "location_id_example" # String | The ID of the business location to associate the checkout with.
60
+ api_instance = SquareConnect::CatalogApi.new
61
61
 
62
- body = SquareConnect::CreateCheckoutRequest.new # CreateCheckoutRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
62
+ body = SquareConnect::BatchDeleteCatalogObjectsRequest.new # BatchDeleteCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
63
63
 
64
64
 
65
65
  begin
66
- #CreateCheckout
67
- result = api_instance.create_checkout(location_id, body)
66
+ #BatchDeleteCatalogObjects
67
+ result = api_instance.batch_delete_catalog_objects(body)
68
68
  p result
69
69
  rescue SquareConnect::ApiError => e
70
- puts "Exception when calling CheckoutApi->create_checkout: #{e}"
70
+ puts "Exception when calling CatalogApi->batch_delete_catalog_objects: #{e}"
71
71
  end
72
72
 
73
73
  ```
@@ -78,6 +78,17 @@ All URIs are relative to *https://connect.squareup.com*
78
78
 
79
79
  Class | Method | HTTP request | Description
80
80
  ------------ | ------------- | ------------- | -------------
81
+ *SquareConnect::CatalogApi* | [**batch_delete_catalog_objects**](docs/CatalogApi.md#batch_delete_catalog_objects) | **POST** /v2/catalog/batch-delete | BatchDeleteCatalogObjects
82
+ *SquareConnect::CatalogApi* | [**batch_retrieve_catalog_objects**](docs/CatalogApi.md#batch_retrieve_catalog_objects) | **POST** /v2/catalog/batch-retrieve | BatchRetrieveCatalogObjects
83
+ *SquareConnect::CatalogApi* | [**batch_upsert_catalog_objects**](docs/CatalogApi.md#batch_upsert_catalog_objects) | **POST** /v2/catalog/batch-upsert | BatchUpsertCatalogObjects
84
+ *SquareConnect::CatalogApi* | [**catalog_info**](docs/CatalogApi.md#catalog_info) | **GET** /v2/catalog/info | CatalogInfo
85
+ *SquareConnect::CatalogApi* | [**delete_catalog_object**](docs/CatalogApi.md#delete_catalog_object) | **DELETE** /v2/catalog/object/{object_id} | DeleteCatalogObject
86
+ *SquareConnect::CatalogApi* | [**list_catalog**](docs/CatalogApi.md#list_catalog) | **GET** /v2/catalog/list | ListCatalog
87
+ *SquareConnect::CatalogApi* | [**retrieve_catalog_object**](docs/CatalogApi.md#retrieve_catalog_object) | **GET** /v2/catalog/object/{object_id} | RetrieveCatalogObject
88
+ *SquareConnect::CatalogApi* | [**search_catalog_objects**](docs/CatalogApi.md#search_catalog_objects) | **POST** /v2/catalog/search | SearchCatalogObjects
89
+ *SquareConnect::CatalogApi* | [**update_item_modifier_lists**](docs/CatalogApi.md#update_item_modifier_lists) | **POST** /v2/catalog/update-item-modifier-lists | UpdateItemModifierLists
90
+ *SquareConnect::CatalogApi* | [**update_item_taxes**](docs/CatalogApi.md#update_item_taxes) | **POST** /v2/catalog/update-item-taxes | UpdateItemTaxes
91
+ *SquareConnect::CatalogApi* | [**upsert_catalog_object**](docs/CatalogApi.md#upsert_catalog_object) | **POST** /v2/catalog/object | UpsertCatalogObject
81
92
  *SquareConnect::CheckoutApi* | [**create_checkout**](docs/CheckoutApi.md#create_checkout) | **POST** /v2/locations/{location_id}/checkouts | CreateCheckout
82
93
  *SquareConnect::CustomersApi* | [**create_customer**](docs/CustomersApi.md#create_customer) | **POST** /v2/customers | CreateCustomer
83
94
  *SquareConnect::CustomersApi* | [**create_customer_card**](docs/CustomersApi.md#create_customer_card) | **POST** /v2/customers/{customer_id}/cards | CreateCustomerCard
@@ -168,10 +179,45 @@ Class | Method | HTTP request | Description
168
179
  ## Documentation for Models
169
180
 
170
181
  - [SquareConnect::Address](docs/Address.md)
182
+ - [SquareConnect::BatchDeleteCatalogObjectsRequest](docs/BatchDeleteCatalogObjectsRequest.md)
183
+ - [SquareConnect::BatchDeleteCatalogObjectsResponse](docs/BatchDeleteCatalogObjectsResponse.md)
184
+ - [SquareConnect::BatchRetrieveCatalogObjectsRequest](docs/BatchRetrieveCatalogObjectsRequest.md)
185
+ - [SquareConnect::BatchRetrieveCatalogObjectsResponse](docs/BatchRetrieveCatalogObjectsResponse.md)
186
+ - [SquareConnect::BatchUpsertCatalogObjectsRequest](docs/BatchUpsertCatalogObjectsRequest.md)
187
+ - [SquareConnect::BatchUpsertCatalogObjectsResponse](docs/BatchUpsertCatalogObjectsResponse.md)
171
188
  - [SquareConnect::CaptureTransactionRequest](docs/CaptureTransactionRequest.md)
172
189
  - [SquareConnect::CaptureTransactionResponse](docs/CaptureTransactionResponse.md)
173
190
  - [SquareConnect::Card](docs/Card.md)
174
191
  - [SquareConnect::CardBrand](docs/CardBrand.md)
192
+ - [SquareConnect::CatalogCategory](docs/CatalogCategory.md)
193
+ - [SquareConnect::CatalogDiscount](docs/CatalogDiscount.md)
194
+ - [SquareConnect::CatalogDiscountType](docs/CatalogDiscountType.md)
195
+ - [SquareConnect::CatalogIdMapping](docs/CatalogIdMapping.md)
196
+ - [SquareConnect::CatalogInfoRequest](docs/CatalogInfoRequest.md)
197
+ - [SquareConnect::CatalogInfoResponse](docs/CatalogInfoResponse.md)
198
+ - [SquareConnect::CatalogInfoResponseLimits](docs/CatalogInfoResponseLimits.md)
199
+ - [SquareConnect::CatalogItem](docs/CatalogItem.md)
200
+ - [SquareConnect::CatalogItemModifierListInfo](docs/CatalogItemModifierListInfo.md)
201
+ - [SquareConnect::CatalogItemProductType](docs/CatalogItemProductType.md)
202
+ - [SquareConnect::CatalogItemVariation](docs/CatalogItemVariation.md)
203
+ - [SquareConnect::CatalogModifier](docs/CatalogModifier.md)
204
+ - [SquareConnect::CatalogModifierList](docs/CatalogModifierList.md)
205
+ - [SquareConnect::CatalogModifierListSelectionType](docs/CatalogModifierListSelectionType.md)
206
+ - [SquareConnect::CatalogModifierOverride](docs/CatalogModifierOverride.md)
207
+ - [SquareConnect::CatalogObject](docs/CatalogObject.md)
208
+ - [SquareConnect::CatalogObjectBatch](docs/CatalogObjectBatch.md)
209
+ - [SquareConnect::CatalogObjectType](docs/CatalogObjectType.md)
210
+ - [SquareConnect::CatalogPricingType](docs/CatalogPricingType.md)
211
+ - [SquareConnect::CatalogQuery](docs/CatalogQuery.md)
212
+ - [SquareConnect::CatalogQueryExact](docs/CatalogQueryExact.md)
213
+ - [SquareConnect::CatalogQueryItemsForModifierList](docs/CatalogQueryItemsForModifierList.md)
214
+ - [SquareConnect::CatalogQueryItemsForTax](docs/CatalogQueryItemsForTax.md)
215
+ - [SquareConnect::CatalogQueryPrefix](docs/CatalogQueryPrefix.md)
216
+ - [SquareConnect::CatalogQueryRange](docs/CatalogQueryRange.md)
217
+ - [SquareConnect::CatalogQuerySortedAttribute](docs/CatalogQuerySortedAttribute.md)
218
+ - [SquareConnect::CatalogQueryText](docs/CatalogQueryText.md)
219
+ - [SquareConnect::CatalogTax](docs/CatalogTax.md)
220
+ - [SquareConnect::CatalogV1Id](docs/CatalogV1Id.md)
175
221
  - [SquareConnect::ChargeRequest](docs/ChargeRequest.md)
176
222
  - [SquareConnect::ChargeResponse](docs/ChargeResponse.md)
177
223
  - [SquareConnect::Checkout](docs/Checkout.md)
@@ -182,7 +228,6 @@ Class | Method | HTTP request | Description
182
228
  - [SquareConnect::CreateCustomerCardResponse](docs/CreateCustomerCardResponse.md)
183
229
  - [SquareConnect::CreateCustomerRequest](docs/CreateCustomerRequest.md)
184
230
  - [SquareConnect::CreateCustomerResponse](docs/CreateCustomerResponse.md)
185
- - [SquareConnect::CreateOrderRequest](docs/CreateOrderRequest.md)
186
231
  - [SquareConnect::CreateOrderRequestLineItem](docs/CreateOrderRequestLineItem.md)
187
232
  - [SquareConnect::CreateOrderRequestOrder](docs/CreateOrderRequestOrder.md)
188
233
  - [SquareConnect::CreateRefundRequest](docs/CreateRefundRequest.md)
@@ -191,6 +236,8 @@ Class | Method | HTTP request | Description
191
236
  - [SquareConnect::Customer](docs/Customer.md)
192
237
  - [SquareConnect::CustomerGroupInfo](docs/CustomerGroupInfo.md)
193
238
  - [SquareConnect::CustomerPreferences](docs/CustomerPreferences.md)
239
+ - [SquareConnect::DeleteCatalogObjectRequest](docs/DeleteCatalogObjectRequest.md)
240
+ - [SquareConnect::DeleteCatalogObjectResponse](docs/DeleteCatalogObjectResponse.md)
194
241
  - [SquareConnect::DeleteCustomerCardRequest](docs/DeleteCustomerCardRequest.md)
195
242
  - [SquareConnect::DeleteCustomerCardResponse](docs/DeleteCustomerCardResponse.md)
196
243
  - [SquareConnect::DeleteCustomerRequest](docs/DeleteCustomerRequest.md)
@@ -199,6 +246,10 @@ Class | Method | HTTP request | Description
199
246
  - [SquareConnect::Error](docs/Error.md)
200
247
  - [SquareConnect::ErrorCategory](docs/ErrorCategory.md)
201
248
  - [SquareConnect::ErrorCode](docs/ErrorCode.md)
249
+ - [SquareConnect::InventoryAlertType](docs/InventoryAlertType.md)
250
+ - [SquareConnect::ItemVariationLocationOverrides](docs/ItemVariationLocationOverrides.md)
251
+ - [SquareConnect::ListCatalogRequest](docs/ListCatalogRequest.md)
252
+ - [SquareConnect::ListCatalogResponse](docs/ListCatalogResponse.md)
202
253
  - [SquareConnect::ListCustomersRequest](docs/ListCustomersRequest.md)
203
254
  - [SquareConnect::ListCustomersResponse](docs/ListCustomersResponse.md)
204
255
  - [SquareConnect::ListLocationsRequest](docs/ListLocationsRequest.md)
@@ -214,11 +265,17 @@ Class | Method | HTTP request | Description
214
265
  - [SquareConnect::OrderLineItem](docs/OrderLineItem.md)
215
266
  - [SquareConnect::Refund](docs/Refund.md)
216
267
  - [SquareConnect::RefundStatus](docs/RefundStatus.md)
268
+ - [SquareConnect::RetrieveCatalogObjectRequest](docs/RetrieveCatalogObjectRequest.md)
269
+ - [SquareConnect::RetrieveCatalogObjectResponse](docs/RetrieveCatalogObjectResponse.md)
217
270
  - [SquareConnect::RetrieveCustomerRequest](docs/RetrieveCustomerRequest.md)
218
271
  - [SquareConnect::RetrieveCustomerResponse](docs/RetrieveCustomerResponse.md)
219
272
  - [SquareConnect::RetrieveTransactionRequest](docs/RetrieveTransactionRequest.md)
220
273
  - [SquareConnect::RetrieveTransactionResponse](docs/RetrieveTransactionResponse.md)
274
+ - [SquareConnect::SearchCatalogObjectsRequest](docs/SearchCatalogObjectsRequest.md)
275
+ - [SquareConnect::SearchCatalogObjectsResponse](docs/SearchCatalogObjectsResponse.md)
221
276
  - [SquareConnect::SortOrder](docs/SortOrder.md)
277
+ - [SquareConnect::TaxCalculationPhase](docs/TaxCalculationPhase.md)
278
+ - [SquareConnect::TaxInclusionType](docs/TaxInclusionType.md)
222
279
  - [SquareConnect::Tender](docs/Tender.md)
223
280
  - [SquareConnect::TenderCardDetails](docs/TenderCardDetails.md)
224
281
  - [SquareConnect::TenderCardDetailsEntryMethod](docs/TenderCardDetailsEntryMethod.md)
@@ -229,6 +286,12 @@ Class | Method | HTTP request | Description
229
286
  - [SquareConnect::TransactionProduct](docs/TransactionProduct.md)
230
287
  - [SquareConnect::UpdateCustomerRequest](docs/UpdateCustomerRequest.md)
231
288
  - [SquareConnect::UpdateCustomerResponse](docs/UpdateCustomerResponse.md)
289
+ - [SquareConnect::UpdateItemModifierListsRequest](docs/UpdateItemModifierListsRequest.md)
290
+ - [SquareConnect::UpdateItemModifierListsResponse](docs/UpdateItemModifierListsResponse.md)
291
+ - [SquareConnect::UpdateItemTaxesRequest](docs/UpdateItemTaxesRequest.md)
292
+ - [SquareConnect::UpdateItemTaxesResponse](docs/UpdateItemTaxesResponse.md)
293
+ - [SquareConnect::UpsertCatalogObjectRequest](docs/UpsertCatalogObjectRequest.md)
294
+ - [SquareConnect::UpsertCatalogObjectResponse](docs/UpsertCatalogObjectResponse.md)
232
295
  - [SquareConnect::V1AdjustInventoryRequest](docs/V1AdjustInventoryRequest.md)
233
296
  - [SquareConnect::V1BankAccount](docs/V1BankAccount.md)
234
297
  - [SquareConnect::V1CashDrawerEvent](docs/V1CashDrawerEvent.md)
@@ -0,0 +1,12 @@
1
+ # SquareConnect::BatchDeleteCatalogObjectsRequest
2
+
3
+ ### Description
4
+
5
+
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **object_ids** | **Array<String>** | The IDs of the [CatalogObject](#type-catalogobject)s to be deleted. When an object is deleted, other objects in the graph that depend on that object will be deleted as well (for example, deleting a [CatalogItem](#type-catalogitem) will delete its [CatalogItemVariation](#type-catalogitemvariation)s). | [optional]
11
+
12
+
@@ -0,0 +1,14 @@
1
+ # SquareConnect::BatchDeleteCatalogObjectsResponse
2
+
3
+ ### Description
4
+
5
+
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **errors** | [**Array<Error>**](Error.md) | The set of [Error](#type-error)s encountered. | [optional]
11
+ **deleted_object_ids** | **Array<String>** | The IDs of all [CatalogObject](#type-catalogobject)s deleted by this request. | [optional]
12
+ **deleted_at** | **String** | The database [timestamp](#workingwithdates) of this deletion in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
13
+
14
+
@@ -0,0 +1,13 @@
1
+ # SquareConnect::BatchRetrieveCatalogObjectsRequest
2
+
3
+ ### Description
4
+
5
+
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **object_ids** | **Array<String>** | The IDs of the [CatalogObject](#type-catalogobject)s to be retrieved. |
11
+ **include_related_objects** | **BOOLEAN** | If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. | [optional]
12
+
13
+
@@ -0,0 +1,14 @@
1
+ # SquareConnect::BatchRetrieveCatalogObjectsResponse
2
+
3
+ ### Description
4
+
5
+
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **errors** | [**Array<Error>**](Error.md) | The set of [Error](#type-error)s encountered. | [optional]
11
+ **objects** | [**Array<CatalogObject>**](CatalogObject.md) | A list of [CatalogObject](#type-catalogobject)s returned. | [optional]
12
+ **related_objects** | [**Array<CatalogObject>**](CatalogObject.md) | A list of [CatalogObject](#type-catalogobject)s referenced by the object in the `objects` field. | [optional]
13
+
14
+
@@ -0,0 +1,13 @@
1
+ # SquareConnect::BatchUpsertCatalogObjectsRequest
2
+
3
+ ### Description
4
+
5
+
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **idempotency_key** | **String** | A value you specify that uniquely identifies this request among all your requests. A common way to create a valid idempotency key is to use a Universally unique identifier (UUID). If you're unsure whether a particular request was successful, you can reattempt it with the same idempotency key without worrying about creating duplicate objects. See [Idempotency keys](#idempotencykeys) for more information. |
11
+ **batches** | [**Array<CatalogObjectBatch>**](CatalogObjectBatch.md) | A batch of [CatalogObject](#type-catalogobject)s to be inserted/updated atomically. The objects within a batch will be inserted in an all-or-nothing fashion, i.e., if an error occurs attempting to insert or update an object within a batch, the entire batch will be rejected. However, an error in one batch will not affect other batches within the same request. For each object, its `updated_at` field is ignored and replaced with a current [timestamp](#workingwithdates), and its `is_deleted` field must not be set to `true`. To modify an existing object, supply its ID. To create a new object, use an ID starting with `#`. These IDs may be used to create relationships between an object and attributes of other objects that reference it. For example, you can create a [CatalogItem](#type-catalogitem) with ID `#ABC` and a [CatalogItemVariation](#type-catalogitemvariation) with its `item_id` attribute set to `#ABC` in order to associate the [CatalogItemVariation](#type-catalogitemvariation) with its parent [CatalogItem](#type-catalogitem). Any `#`-prefixed IDs are valid only within a single atomic batch, and will be replaced by server-generated IDs. Each batch may contain up to 1,000 objects. The total number of objects across all batches for a single request may not exceed 10,000. If either of these limits is violated, an error will be returned and no objects will be inserted or updated. | [optional]
12
+
13
+
@@ -0,0 +1,15 @@
1
+ # SquareConnect::BatchUpsertCatalogObjectsResponse
2
+
3
+ ### Description
4
+
5
+
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **errors** | [**Array<Error>**](Error.md) | The set of [Error](#type-error)s encountered. | [optional]
11
+ **objects** | [**Array<CatalogObject>**](CatalogObject.md) | The created [CatalogObject](#type-catalogobject)s | [optional]
12
+ **updated_at** | **String** | The database [timestamp](#workingwithdates) of this update in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional]
13
+ **id_mappings** | [**Array<CatalogIdMapping>**](CatalogIdMapping.md) | The mapping between client and server IDs for this Upsert. | [optional]
14
+
15
+
@@ -0,0 +1,592 @@
1
+ # SquareConnect::CatalogApi
2
+
3
+ All URIs are relative to *https://connect.squareup.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**batch_delete_catalog_objects**](CatalogApi.md#batch_delete_catalog_objects) | **POST** /v2/catalog/batch-delete | BatchDeleteCatalogObjects
8
+ [**batch_retrieve_catalog_objects**](CatalogApi.md#batch_retrieve_catalog_objects) | **POST** /v2/catalog/batch-retrieve | BatchRetrieveCatalogObjects
9
+ [**batch_upsert_catalog_objects**](CatalogApi.md#batch_upsert_catalog_objects) | **POST** /v2/catalog/batch-upsert | BatchUpsertCatalogObjects
10
+ [**catalog_info**](CatalogApi.md#catalog_info) | **GET** /v2/catalog/info | CatalogInfo
11
+ [**delete_catalog_object**](CatalogApi.md#delete_catalog_object) | **DELETE** /v2/catalog/object/{object_id} | DeleteCatalogObject
12
+ [**list_catalog**](CatalogApi.md#list_catalog) | **GET** /v2/catalog/list | ListCatalog
13
+ [**retrieve_catalog_object**](CatalogApi.md#retrieve_catalog_object) | **GET** /v2/catalog/object/{object_id} | RetrieveCatalogObject
14
+ [**search_catalog_objects**](CatalogApi.md#search_catalog_objects) | **POST** /v2/catalog/search | SearchCatalogObjects
15
+ [**update_item_modifier_lists**](CatalogApi.md#update_item_modifier_lists) | **POST** /v2/catalog/update-item-modifier-lists | UpdateItemModifierLists
16
+ [**update_item_taxes**](CatalogApi.md#update_item_taxes) | **POST** /v2/catalog/update-item-taxes | UpdateItemTaxes
17
+ [**upsert_catalog_object**](CatalogApi.md#upsert_catalog_object) | **POST** /v2/catalog/object | UpsertCatalogObject
18
+
19
+
20
+ # **batch_delete_catalog_objects**
21
+ > BatchDeleteCatalogObjectsResponse batch_delete_catalog_objects(body)
22
+
23
+ BatchDeleteCatalogObjects
24
+
25
+ Deletes a set of [CatalogItem](#type-catalogitem)s based on the provided list of target IDs and returns a set of successfully deleted IDs in the response. Deletion is a cascading event such that all children of the targeted object are also deleted. For example, deleting a CatalogItem will also delete all of its [CatalogItemVariation](#type-catalogitemvariation) children. `BatchDeleteCatalogObjects` succeeds even if only a portion of the targeted IDs can be deleted. The response will only include IDs that were actually deleted.
26
+
27
+ ### Example
28
+ ```ruby
29
+ # load the gem
30
+ require 'square_connect'
31
+ # setup authorization
32
+ SquareConnect.configure do |config|
33
+ # Configure OAuth2 access token for authorization: oauth2
34
+ config.access_token = 'YOUR ACCESS TOKEN'
35
+ end
36
+
37
+ api_instance = SquareConnect::CatalogApi.new
38
+
39
+ body = SquareConnect::BatchDeleteCatalogObjectsRequest.new # BatchDeleteCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
40
+
41
+
42
+ begin
43
+ #BatchDeleteCatalogObjects
44
+ result = api_instance.batch_delete_catalog_objects(body)
45
+ p result
46
+ rescue SquareConnect::ApiError => e
47
+ puts "Exception when calling CatalogApi->batch_delete_catalog_objects: #{e}"
48
+ end
49
+ ```
50
+
51
+ ### Parameters
52
+
53
+ Name | Type | Description | Notes
54
+ ------------- | ------------- | ------------- | -------------
55
+ **body** | [**BatchDeleteCatalogObjectsRequest**](BatchDeleteCatalogObjectsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
56
+
57
+ ### Return type
58
+
59
+ [**BatchDeleteCatalogObjectsResponse**](BatchDeleteCatalogObjectsResponse.md)
60
+
61
+ ### Authorization
62
+
63
+ [oauth2](../README.md#oauth2)
64
+
65
+ ### HTTP request headers
66
+
67
+ - **Content-Type**: application/json
68
+ - **Accept**: application/json
69
+
70
+
71
+
72
+ # **batch_retrieve_catalog_objects**
73
+ > BatchRetrieveCatalogObjectsResponse batch_retrieve_catalog_objects(body)
74
+
75
+ BatchRetrieveCatalogObjects
76
+
77
+ Returns a set of objects based on the provided ID. [CatalogItem](#type-catalogitem)s returned in the set include all of the child information including: all [CatalogItemVariation](#type-catalogitemvariation) objects, references to its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of any [CatalogTax](#type-catalogtax) objects that apply to it.
78
+
79
+ ### Example
80
+ ```ruby
81
+ # load the gem
82
+ require 'square_connect'
83
+ # setup authorization
84
+ SquareConnect.configure do |config|
85
+ # Configure OAuth2 access token for authorization: oauth2
86
+ config.access_token = 'YOUR ACCESS TOKEN'
87
+ end
88
+
89
+ api_instance = SquareConnect::CatalogApi.new
90
+
91
+ body = SquareConnect::BatchRetrieveCatalogObjectsRequest.new # BatchRetrieveCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
92
+
93
+
94
+ begin
95
+ #BatchRetrieveCatalogObjects
96
+ result = api_instance.batch_retrieve_catalog_objects(body)
97
+ p result
98
+ rescue SquareConnect::ApiError => e
99
+ puts "Exception when calling CatalogApi->batch_retrieve_catalog_objects: #{e}"
100
+ end
101
+ ```
102
+
103
+ ### Parameters
104
+
105
+ Name | Type | Description | Notes
106
+ ------------- | ------------- | ------------- | -------------
107
+ **body** | [**BatchRetrieveCatalogObjectsRequest**](BatchRetrieveCatalogObjectsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
108
+
109
+ ### Return type
110
+
111
+ [**BatchRetrieveCatalogObjectsResponse**](BatchRetrieveCatalogObjectsResponse.md)
112
+
113
+ ### Authorization
114
+
115
+ [oauth2](../README.md#oauth2)
116
+
117
+ ### HTTP request headers
118
+
119
+ - **Content-Type**: application/json
120
+ - **Accept**: application/json
121
+
122
+
123
+
124
+ # **batch_upsert_catalog_objects**
125
+ > BatchUpsertCatalogObjectsResponse batch_upsert_catalog_objects(body)
126
+
127
+ BatchUpsertCatalogObjects
128
+
129
+ Creates or updates up to 10,000 target objects based on the provided list of objects. The target objects are grouped into batches and each batch is inserted/updated in an all-or-nothing manner. If an object within a batch is malformed in some way, or violates a database constraint, the entire batch containing that item will be disregarded. However, other batches in the same request may still succeed. Each batch may contain up to 1,000 objects, and batches will be processed in order as long as the total object count for the request (items, variations, modifier lists, discounts, and taxes) is no more than 10,000.
130
+
131
+ ### Example
132
+ ```ruby
133
+ # load the gem
134
+ require 'square_connect'
135
+ # setup authorization
136
+ SquareConnect.configure do |config|
137
+ # Configure OAuth2 access token for authorization: oauth2
138
+ config.access_token = 'YOUR ACCESS TOKEN'
139
+ end
140
+
141
+ api_instance = SquareConnect::CatalogApi.new
142
+
143
+ body = SquareConnect::BatchUpsertCatalogObjectsRequest.new # BatchUpsertCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
144
+
145
+
146
+ begin
147
+ #BatchUpsertCatalogObjects
148
+ result = api_instance.batch_upsert_catalog_objects(body)
149
+ p result
150
+ rescue SquareConnect::ApiError => e
151
+ puts "Exception when calling CatalogApi->batch_upsert_catalog_objects: #{e}"
152
+ end
153
+ ```
154
+
155
+ ### Parameters
156
+
157
+ Name | Type | Description | Notes
158
+ ------------- | ------------- | ------------- | -------------
159
+ **body** | [**BatchUpsertCatalogObjectsRequest**](BatchUpsertCatalogObjectsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
160
+
161
+ ### Return type
162
+
163
+ [**BatchUpsertCatalogObjectsResponse**](BatchUpsertCatalogObjectsResponse.md)
164
+
165
+ ### Authorization
166
+
167
+ [oauth2](../README.md#oauth2)
168
+
169
+ ### HTTP request headers
170
+
171
+ - **Content-Type**: application/json
172
+ - **Accept**: application/json
173
+
174
+
175
+
176
+ # **catalog_info**
177
+ > CatalogInfoResponse catalog_info
178
+
179
+ CatalogInfo
180
+
181
+ Returns information about the Square Catalog API, such as batch size limits for `BatchUpsertCatalogObjects`.
182
+
183
+ ### Example
184
+ ```ruby
185
+ # load the gem
186
+ require 'square_connect'
187
+ # setup authorization
188
+ SquareConnect.configure do |config|
189
+ # Configure OAuth2 access token for authorization: oauth2
190
+ config.access_token = 'YOUR ACCESS TOKEN'
191
+ end
192
+
193
+ api_instance = SquareConnect::CatalogApi.new
194
+
195
+ begin
196
+ #CatalogInfo
197
+ result = api_instance.catalog_info
198
+ p result
199
+ rescue SquareConnect::ApiError => e
200
+ puts "Exception when calling CatalogApi->catalog_info: #{e}"
201
+ end
202
+ ```
203
+
204
+ ### Parameters
205
+ This endpoint does not need any parameter.
206
+
207
+ ### Return type
208
+
209
+ [**CatalogInfoResponse**](CatalogInfoResponse.md)
210
+
211
+ ### Authorization
212
+
213
+ [oauth2](../README.md#oauth2)
214
+
215
+ ### HTTP request headers
216
+
217
+ - **Content-Type**: application/json
218
+ - **Accept**: application/json
219
+
220
+
221
+
222
+ # **delete_catalog_object**
223
+ > DeleteCatalogObjectResponse delete_catalog_object(object_id)
224
+
225
+ DeleteCatalogObject
226
+
227
+ Deletes a single [CatalogObject](#type-catalogobject) based on the provided ID and returns the set of successfully deleted IDs in the response. Deletion is a cascading event such that all children of the targeted object are also deleted. For example, deleting a [CatalogItem](#type-catalogitem) will also delete all of its [CatalogItemVariation](#type-catalogitemvariation) children.
228
+
229
+ ### Example
230
+ ```ruby
231
+ # load the gem
232
+ require 'square_connect'
233
+ # setup authorization
234
+ SquareConnect.configure do |config|
235
+ # Configure OAuth2 access token for authorization: oauth2
236
+ config.access_token = 'YOUR ACCESS TOKEN'
237
+ end
238
+
239
+ api_instance = SquareConnect::CatalogApi.new
240
+
241
+ object_id = "object_id_example" # String | The ID of the [CatalogObject](#type-catalogobject) to be deleted. When an object is deleted, other objects in the graph that depend on that object will be deleted as well (for example, deleting a [CatalogItem](#type-catalogitem) will delete its [CatalogItemVariation](#type-catalogitemvariation)s).
242
+
243
+
244
+ begin
245
+ #DeleteCatalogObject
246
+ result = api_instance.delete_catalog_object(object_id)
247
+ p result
248
+ rescue SquareConnect::ApiError => e
249
+ puts "Exception when calling CatalogApi->delete_catalog_object: #{e}"
250
+ end
251
+ ```
252
+
253
+ ### Parameters
254
+
255
+ Name | Type | Description | Notes
256
+ ------------- | ------------- | ------------- | -------------
257
+ **object_id** | **String**| The ID of the [CatalogObject](#type-catalogobject) to be deleted. When an object is deleted, other objects in the graph that depend on that object will be deleted as well (for example, deleting a [CatalogItem](#type-catalogitem) will delete its [CatalogItemVariation](#type-catalogitemvariation)s). |
258
+
259
+ ### Return type
260
+
261
+ [**DeleteCatalogObjectResponse**](DeleteCatalogObjectResponse.md)
262
+
263
+ ### Authorization
264
+
265
+ [oauth2](../README.md#oauth2)
266
+
267
+ ### HTTP request headers
268
+
269
+ - **Content-Type**: application/json
270
+ - **Accept**: application/json
271
+
272
+
273
+
274
+ # **list_catalog**
275
+ > ListCatalogResponse list_catalog(opts)
276
+
277
+ ListCatalog
278
+
279
+ Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The types parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`.
280
+
281
+ ### Example
282
+ ```ruby
283
+ # load the gem
284
+ require 'square_connect'
285
+ # setup authorization
286
+ SquareConnect.configure do |config|
287
+ # Configure OAuth2 access token for authorization: oauth2
288
+ config.access_token = 'YOUR ACCESS TOKEN'
289
+ end
290
+
291
+ api_instance = SquareConnect::CatalogApi.new
292
+
293
+ opts = {
294
+ cursor: "cursor_example", # String | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Paginating results](#paginatingresults) for more information.
295
+ types: "types_example" # String | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`.
296
+ }
297
+
298
+ begin
299
+ #ListCatalog
300
+ result = api_instance.list_catalog(opts)
301
+ p result
302
+ rescue SquareConnect::ApiError => e
303
+ puts "Exception when calling CatalogApi->list_catalog: #{e}"
304
+ end
305
+ ```
306
+
307
+ ### Parameters
308
+
309
+ Name | Type | Description | Notes
310
+ ------------- | ------------- | ------------- | -------------
311
+ **cursor** | **String**| The pagination cursor returned in the previous response. Leave unset for an initial request. See [Paginating results](#paginatingresults) for more information. | [optional]
312
+ **types** | **String**| An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`. | [optional]
313
+
314
+ ### Return type
315
+
316
+ [**ListCatalogResponse**](ListCatalogResponse.md)
317
+
318
+ ### Authorization
319
+
320
+ [oauth2](../README.md#oauth2)
321
+
322
+ ### HTTP request headers
323
+
324
+ - **Content-Type**: application/json
325
+ - **Accept**: application/json
326
+
327
+
328
+
329
+ # **retrieve_catalog_object**
330
+ > RetrieveCatalogObjectResponse retrieve_catalog_object(object_id, opts)
331
+
332
+ RetrieveCatalogObject
333
+
334
+ Returns a single [CatalogItem](#type-catalogitem) as a [CatalogObject](#type-catalogobject) based on the provided ID. The returned object includes all of the relevant [CatalogItem](#type-catalogitem) information including: [CatalogItemVariation](#type-catalogitemvariation) children, references to its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of any [CatalogTax](#type-catalogtax) objects that apply to it.
335
+
336
+ ### Example
337
+ ```ruby
338
+ # load the gem
339
+ require 'square_connect'
340
+ # setup authorization
341
+ SquareConnect.configure do |config|
342
+ # Configure OAuth2 access token for authorization: oauth2
343
+ config.access_token = 'YOUR ACCESS TOKEN'
344
+ end
345
+
346
+ api_instance = SquareConnect::CatalogApi.new
347
+
348
+ object_id = "object_id_example" # String | The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved.
349
+
350
+ opts = {
351
+ include_related_objects: true # BOOLEAN | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response.
352
+ }
353
+
354
+ begin
355
+ #RetrieveCatalogObject
356
+ result = api_instance.retrieve_catalog_object(object_id, opts)
357
+ p result
358
+ rescue SquareConnect::ApiError => e
359
+ puts "Exception when calling CatalogApi->retrieve_catalog_object: #{e}"
360
+ end
361
+ ```
362
+
363
+ ### Parameters
364
+
365
+ Name | Type | Description | Notes
366
+ ------------- | ------------- | ------------- | -------------
367
+ **object_id** | **String**| The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. |
368
+ **include_related_objects** | **BOOLEAN**| If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. | [optional]
369
+
370
+ ### Return type
371
+
372
+ [**RetrieveCatalogObjectResponse**](RetrieveCatalogObjectResponse.md)
373
+
374
+ ### Authorization
375
+
376
+ [oauth2](../README.md#oauth2)
377
+
378
+ ### HTTP request headers
379
+
380
+ - **Content-Type**: application/json
381
+ - **Accept**: application/json
382
+
383
+
384
+
385
+ # **search_catalog_objects**
386
+ > SearchCatalogObjectsResponse search_catalog_objects(body)
387
+
388
+ SearchCatalogObjects
389
+
390
+ Queries the targeted catalog using a variety of query types ([CatalogQuerySortedAttribute](#type-catalogquerysortedattribute), ([CatalogQueryExact](#type-catalogqueryexact, ([CatalogQueryRange](#type-catalogqueryrange), ([CatalogQueryText](#type-catalogquerytext), ([CatalogQueryItemsForTax](#type-catalogqueryitemsfortax), ([CatalogQueryItemsForModifierList](#type-catalogqueryitemsformodifierlist)).
391
+
392
+ ### Example
393
+ ```ruby
394
+ # load the gem
395
+ require 'square_connect'
396
+ # setup authorization
397
+ SquareConnect.configure do |config|
398
+ # Configure OAuth2 access token for authorization: oauth2
399
+ config.access_token = 'YOUR ACCESS TOKEN'
400
+ end
401
+
402
+ api_instance = SquareConnect::CatalogApi.new
403
+
404
+ body = SquareConnect::SearchCatalogObjectsRequest.new # SearchCatalogObjectsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
405
+
406
+
407
+ begin
408
+ #SearchCatalogObjects
409
+ result = api_instance.search_catalog_objects(body)
410
+ p result
411
+ rescue SquareConnect::ApiError => e
412
+ puts "Exception when calling CatalogApi->search_catalog_objects: #{e}"
413
+ end
414
+ ```
415
+
416
+ ### Parameters
417
+
418
+ Name | Type | Description | Notes
419
+ ------------- | ------------- | ------------- | -------------
420
+ **body** | [**SearchCatalogObjectsRequest**](SearchCatalogObjectsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
421
+
422
+ ### Return type
423
+
424
+ [**SearchCatalogObjectsResponse**](SearchCatalogObjectsResponse.md)
425
+
426
+ ### Authorization
427
+
428
+ [oauth2](../README.md#oauth2)
429
+
430
+ ### HTTP request headers
431
+
432
+ - **Content-Type**: application/json
433
+ - **Accept**: application/json
434
+
435
+
436
+
437
+ # **update_item_modifier_lists**
438
+ > UpdateItemModifierListsResponse update_item_modifier_lists(body)
439
+
440
+ UpdateItemModifierLists
441
+
442
+ Updates the [CatalogModifierList](#type-catalogmodifierlist) objects that apply to the targeted [CatalogItem](#type-catalogitem) without having to perform an upsert on the entire item.
443
+
444
+ ### Example
445
+ ```ruby
446
+ # load the gem
447
+ require 'square_connect'
448
+ # setup authorization
449
+ SquareConnect.configure do |config|
450
+ # Configure OAuth2 access token for authorization: oauth2
451
+ config.access_token = 'YOUR ACCESS TOKEN'
452
+ end
453
+
454
+ api_instance = SquareConnect::CatalogApi.new
455
+
456
+ body = SquareConnect::UpdateItemModifierListsRequest.new # UpdateItemModifierListsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
457
+
458
+
459
+ begin
460
+ #UpdateItemModifierLists
461
+ result = api_instance.update_item_modifier_lists(body)
462
+ p result
463
+ rescue SquareConnect::ApiError => e
464
+ puts "Exception when calling CatalogApi->update_item_modifier_lists: #{e}"
465
+ end
466
+ ```
467
+
468
+ ### Parameters
469
+
470
+ Name | Type | Description | Notes
471
+ ------------- | ------------- | ------------- | -------------
472
+ **body** | [**UpdateItemModifierListsRequest**](UpdateItemModifierListsRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
473
+
474
+ ### Return type
475
+
476
+ [**UpdateItemModifierListsResponse**](UpdateItemModifierListsResponse.md)
477
+
478
+ ### Authorization
479
+
480
+ [oauth2](../README.md#oauth2)
481
+
482
+ ### HTTP request headers
483
+
484
+ - **Content-Type**: application/json
485
+ - **Accept**: application/json
486
+
487
+
488
+
489
+ # **update_item_taxes**
490
+ > UpdateItemTaxesResponse update_item_taxes(body)
491
+
492
+ UpdateItemTaxes
493
+
494
+ Updates the [CatalogTax](#type-catalogtax) objects that apply to the targeted [CatalogItem](#type-catalogitem) without having to perform an upsert on the entire item.
495
+
496
+ ### Example
497
+ ```ruby
498
+ # load the gem
499
+ require 'square_connect'
500
+ # setup authorization
501
+ SquareConnect.configure do |config|
502
+ # Configure OAuth2 access token for authorization: oauth2
503
+ config.access_token = 'YOUR ACCESS TOKEN'
504
+ end
505
+
506
+ api_instance = SquareConnect::CatalogApi.new
507
+
508
+ body = SquareConnect::UpdateItemTaxesRequest.new # UpdateItemTaxesRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
509
+
510
+
511
+ begin
512
+ #UpdateItemTaxes
513
+ result = api_instance.update_item_taxes(body)
514
+ p result
515
+ rescue SquareConnect::ApiError => e
516
+ puts "Exception when calling CatalogApi->update_item_taxes: #{e}"
517
+ end
518
+ ```
519
+
520
+ ### Parameters
521
+
522
+ Name | Type | Description | Notes
523
+ ------------- | ------------- | ------------- | -------------
524
+ **body** | [**UpdateItemTaxesRequest**](UpdateItemTaxesRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
525
+
526
+ ### Return type
527
+
528
+ [**UpdateItemTaxesResponse**](UpdateItemTaxesResponse.md)
529
+
530
+ ### Authorization
531
+
532
+ [oauth2](../README.md#oauth2)
533
+
534
+ ### HTTP request headers
535
+
536
+ - **Content-Type**: application/json
537
+ - **Accept**: application/json
538
+
539
+
540
+
541
+ # **upsert_catalog_object**
542
+ > UpsertCatalogObjectResponse upsert_catalog_object(body)
543
+
544
+ UpsertCatalogObject
545
+
546
+ Creates or updates the target [CatalogObject](#type-catalogobject).
547
+
548
+ ### Example
549
+ ```ruby
550
+ # load the gem
551
+ require 'square_connect'
552
+ # setup authorization
553
+ SquareConnect.configure do |config|
554
+ # Configure OAuth2 access token for authorization: oauth2
555
+ config.access_token = 'YOUR ACCESS TOKEN'
556
+ end
557
+
558
+ api_instance = SquareConnect::CatalogApi.new
559
+
560
+ body = SquareConnect::UpsertCatalogObjectRequest.new # UpsertCatalogObjectRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
561
+
562
+
563
+ begin
564
+ #UpsertCatalogObject
565
+ result = api_instance.upsert_catalog_object(body)
566
+ p result
567
+ rescue SquareConnect::ApiError => e
568
+ puts "Exception when calling CatalogApi->upsert_catalog_object: #{e}"
569
+ end
570
+ ```
571
+
572
+ ### Parameters
573
+
574
+ Name | Type | Description | Notes
575
+ ------------- | ------------- | ------------- | -------------
576
+ **body** | [**UpsertCatalogObjectRequest**](UpsertCatalogObjectRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
577
+
578
+ ### Return type
579
+
580
+ [**UpsertCatalogObjectResponse**](UpsertCatalogObjectResponse.md)
581
+
582
+ ### Authorization
583
+
584
+ [oauth2](../README.md#oauth2)
585
+
586
+ ### HTTP request headers
587
+
588
+ - **Content-Type**: application/json
589
+ - **Accept**: application/json
590
+
591
+
592
+