square_connect 2.0.2.69 → 2.1.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +133 -21
  3. data/docs/ChargeRequest.md +1 -1
  4. data/docs/CheckoutApi.md +8 -6
  5. data/docs/CustomersApi.md +389 -0
  6. data/docs/Device.md +11 -0
  7. data/docs/LocationsApi.md +55 -0
  8. data/docs/TransactionsApi.md +417 -0
  9. data/docs/V1AdjustInventoryRequest.md +12 -0
  10. data/docs/V1BankAccount.md +17 -0
  11. data/docs/V1CashDrawerEvent.md +15 -0
  12. data/docs/V1CashDrawerShift.md +28 -0
  13. data/docs/V1Category.md +11 -0
  14. data/docs/V1CreateRefundRequest.md +14 -0
  15. data/docs/V1Discount.md +16 -0
  16. data/docs/V1Employee.md +21 -0
  17. data/docs/V1EmployeeRole.md +15 -0
  18. data/docs/V1EmployeesApi.md +915 -0
  19. data/docs/V1Fee.md +18 -0
  20. data/docs/V1InventoryEntry.md +11 -0
  21. data/docs/V1Item.md +23 -0
  22. data/docs/V1ItemImage.md +11 -0
  23. data/docs/V1ItemsApi.md +2297 -0
  24. data/docs/V1LocationApi.md +102 -0
  25. data/docs/V1LocationsApi.md +102 -0
  26. data/docs/V1Merchant.md +26 -0
  27. data/docs/V1MerchantLocationDetails.md +12 -0
  28. data/docs/V1ModifierList.md +13 -0
  29. data/docs/V1ModifierOption.md +15 -0
  30. data/docs/V1Money.md +13 -0
  31. data/docs/V1Order.md +34 -0
  32. data/docs/V1OrderHistoryEntry.md +11 -0
  33. data/docs/V1Page.md +13 -0
  34. data/docs/V1PageCell.md +15 -0
  35. data/docs/V1Payment.md +33 -0
  36. data/docs/V1PaymentDiscount.md +12 -0
  37. data/docs/V1PaymentItemDetail.md +13 -0
  38. data/docs/V1PaymentItemization.md +23 -0
  39. data/docs/V1PaymentModifier.md +12 -0
  40. data/docs/V1PaymentTax.md +15 -0
  41. data/docs/V1PhoneNumber.md +13 -0
  42. data/docs/V1Refund.md +16 -0
  43. data/docs/V1Settlement.md +15 -0
  44. data/docs/V1SettlementEntry.md +13 -0
  45. data/docs/V1Tender.md +22 -0
  46. data/docs/V1Timecard.md +20 -0
  47. data/docs/V1TimecardEvent.md +14 -0
  48. data/docs/V1TransactionsApi.md +650 -0
  49. data/docs/V1UpdateModifierListRequest.md +11 -0
  50. data/docs/V1UpdateOrderRequest.md +14 -0
  51. data/docs/V1Variation.md +20 -0
  52. data/lib/.DS_Store +0 -0
  53. data/lib/square_connect.rb +46 -5
  54. data/lib/square_connect/.DS_Store +0 -0
  55. data/lib/square_connect/api/checkout_api.rb +4 -9
  56. data/lib/square_connect/api/{customer_api.rb → customers_api.rb} +150 -61
  57. data/lib/square_connect/api/{location_api.rb → locations_api.rb} +7 -12
  58. data/lib/square_connect/api/{transaction_api.rb → transactions_api.rb} +169 -65
  59. data/lib/square_connect/api/v1_employees_api.rb +974 -0
  60. data/lib/square_connect/api/v1_items_api.rb +2365 -0
  61. data/lib/square_connect/api/v1_locations_api.rb +118 -0
  62. data/lib/square_connect/api/v1_transactions_api.rb +707 -0
  63. data/lib/square_connect/api_client.rb +1 -1
  64. data/lib/square_connect/models/charge_request.rb +1 -1
  65. data/lib/square_connect/models/device.rb +196 -0
  66. data/lib/square_connect/models/v1_adjust_inventory_request.rb +206 -0
  67. data/lib/square_connect/models/v1_bank_account.rb +289 -0
  68. data/lib/square_connect/models/v1_cash_drawer_event.rb +269 -0
  69. data/lib/square_connect/models/v1_cash_drawer_shift.rb +403 -0
  70. data/lib/square_connect/models/v1_category.rb +196 -0
  71. data/lib/square_connect/models/v1_create_refund_request.rb +274 -0
  72. data/lib/square_connect/models/v1_discount.rb +291 -0
  73. data/lib/square_connect/models/v1_employee.rb +323 -0
  74. data/lib/square_connect/models/v1_employee_role.rb +269 -0
  75. data/lib/square_connect/models/v1_fee.rb +335 -0
  76. data/lib/square_connect/models/v1_inventory_entry.rb +196 -0
  77. data/lib/square_connect/models/v1_item.rb +379 -0
  78. data/lib/square_connect/models/v1_item_image.rb +196 -0
  79. data/lib/square_connect/models/v1_merchant.rb +372 -0
  80. data/lib/square_connect/models/v1_merchant_location_details.rb +186 -0
  81. data/lib/square_connect/models/v1_modifier_list.rb +251 -0
  82. data/lib/square_connect/models/v1_modifier_option.rb +236 -0
  83. data/lib/square_connect/models/v1_money.rb +229 -0
  84. data/lib/square_connect/models/v1_order.rb +463 -0
  85. data/lib/square_connect/models/v1_order_history_entry.rb +229 -0
  86. data/lib/square_connect/models/v1_page.rb +218 -0
  87. data/lib/square_connect/models/v1_page_cell.rb +261 -0
  88. data/lib/square_connect/models/v1_payment.rb +423 -0
  89. data/lib/square_connect/models/v1_payment_discount.rb +206 -0
  90. data/lib/square_connect/models/v1_payment_item_detail.rb +216 -0
  91. data/lib/square_connect/models/v1_payment_itemization.rb +355 -0
  92. data/lib/square_connect/models/v1_payment_modifier.rb +206 -0
  93. data/lib/square_connect/models/v1_payment_tax.rb +271 -0
  94. data/lib/square_connect/models/v1_phone_number.rb +206 -0
  95. data/lib/square_connect/models/v1_refund.rb +279 -0
  96. data/lib/square_connect/models/v1_settlement.rb +271 -0
  97. data/lib/square_connect/models/v1_settlement_entry.rb +249 -0
  98. data/lib/square_connect/models/v1_tender.rb +363 -0
  99. data/lib/square_connect/models/v1_timecard.rb +271 -0
  100. data/lib/square_connect/models/v1_timecard_event.rb +259 -0
  101. data/lib/square_connect/models/v1_update_modifier_list_request.rb +229 -0
  102. data/lib/square_connect/models/v1_update_order_request.rb +264 -0
  103. data/lib/square_connect/models/v1_variation.rb +331 -0
  104. data/lib/square_connect/version.rb +1 -1
  105. data/spec/.DS_Store +0 -0
  106. data/spec/api/checkout_api_spec.rb +4 -12
  107. data/spec/api/{customer_api_spec.rb → customers_api_spec.rb} +39 -41
  108. data/spec/api/{location_api_spec.rb → locations_api_spec.rb} +9 -15
  109. data/spec/api/{transaction_api_spec.rb → transactions_api_spec.rb} +43 -41
  110. data/spec/api/v1_employees_api_spec.rb +250 -0
  111. data/spec/api/v1_items_api_spec.rb +568 -0
  112. data/spec/api/v1_locations_api_spec.rb +54 -0
  113. data/spec/api/v1_transactions_api_spec.rb +186 -0
  114. data/spec/models/address_spec.rb +22 -81
  115. data/spec/models/capture_transaction_request_spec.rb +3 -6
  116. data/spec/models/capture_transaction_response_spec.rb +4 -11
  117. data/spec/models/card_brand_spec.rb +3 -6
  118. data/spec/models/card_spec.rb +14 -41
  119. data/spec/models/charge_request_spec.rb +14 -61
  120. data/spec/models/charge_response_spec.rb +5 -16
  121. data/spec/models/checkout_spec.rb +12 -51
  122. data/spec/models/country_spec.rb +3 -6
  123. data/spec/models/create_checkout_request_spec.rb +10 -41
  124. data/spec/models/create_checkout_response_spec.rb +5 -16
  125. data/spec/models/create_customer_card_request_spec.rb +6 -21
  126. data/spec/models/create_customer_card_response_spec.rb +5 -16
  127. data/spec/models/create_customer_request_spec.rb +12 -51
  128. data/spec/models/create_customer_response_spec.rb +5 -16
  129. data/spec/models/create_order_request_line_item_spec.rb +6 -21
  130. data/spec/models/create_order_request_order_spec.rb +5 -16
  131. data/spec/models/create_order_request_spec.rb +5 -16
  132. data/spec/models/create_refund_request_spec.rb +7 -26
  133. data/spec/models/create_refund_response_spec.rb +5 -16
  134. data/spec/models/currency_spec.rb +3 -6
  135. data/spec/models/customer_group_info_spec.rb +5 -16
  136. data/spec/models/customer_preferences_spec.rb +4 -11
  137. data/spec/models/customer_spec.rb +18 -81
  138. data/spec/models/delete_customer_card_request_spec.rb +3 -6
  139. data/spec/models/delete_customer_card_response_spec.rb +4 -11
  140. data/spec/models/delete_customer_request_spec.rb +3 -6
  141. data/spec/models/delete_customer_response_spec.rb +4 -11
  142. data/spec/models/device_spec.rb +45 -0
  143. data/spec/models/error_category_spec.rb +3 -6
  144. data/spec/models/error_code_spec.rb +3 -6
  145. data/spec/models/error_spec.rb +15 -26
  146. data/spec/models/list_customers_request_spec.rb +4 -11
  147. data/spec/models/list_customers_response_spec.rb +6 -21
  148. data/spec/models/list_locations_request_spec.rb +3 -6
  149. data/spec/models/list_locations_response_spec.rb +5 -16
  150. data/spec/models/list_refunds_request_spec.rb +11 -26
  151. data/spec/models/list_refunds_response_spec.rb +6 -21
  152. data/spec/models/list_transactions_request_spec.rb +11 -26
  153. data/spec/models/list_transactions_response_spec.rb +6 -21
  154. data/spec/models/location_capability_spec.rb +3 -6
  155. data/spec/models/location_spec.rb +12 -31
  156. data/spec/models/money_spec.rb +9 -16
  157. data/spec/models/order_line_item_spec.rb +8 -31
  158. data/spec/models/order_spec.rb +8 -31
  159. data/spec/models/refund_spec.rb +16 -51
  160. data/spec/models/refund_status_spec.rb +3 -6
  161. data/spec/models/retrieve_customer_request_spec.rb +3 -6
  162. data/spec/models/retrieve_customer_response_spec.rb +5 -16
  163. data/spec/models/retrieve_transaction_request_spec.rb +3 -6
  164. data/spec/models/retrieve_transaction_response_spec.rb +5 -16
  165. data/spec/models/sort_order_spec.rb +3 -6
  166. data/spec/models/tender_card_details_entry_method_spec.rb +3 -6
  167. data/spec/models/tender_card_details_spec.rb +14 -21
  168. data/spec/models/tender_card_details_status_spec.rb +3 -6
  169. data/spec/models/tender_cash_details_spec.rb +5 -16
  170. data/spec/models/tender_spec.rb +18 -61
  171. data/spec/models/tender_type_spec.rb +3 -6
  172. data/spec/models/transaction_product_spec.rb +3 -6
  173. data/spec/models/transaction_spec.rb +17 -56
  174. data/spec/models/update_customer_request_spec.rb +12 -51
  175. data/spec/models/update_customer_response_spec.rb +5 -16
  176. data/spec/models/v1_adjust_inventory_request_spec.rb +51 -0
  177. data/spec/models/v1_bank_account_spec.rb +85 -0
  178. data/spec/models/v1_cash_drawer_event_spec.rb +73 -0
  179. data/spec/models/v1_cash_drawer_shift_spec.rb +151 -0
  180. data/spec/models/v1_category_spec.rb +45 -0
  181. data/spec/models/v1_create_refund_request_spec.rb +67 -0
  182. data/spec/models/v1_discount_spec.rb +83 -0
  183. data/spec/models/v1_employee_role_spec.rb +73 -0
  184. data/spec/models/v1_employee_spec.rb +97 -0
  185. data/spec/models/v1_fee_spec.rb +103 -0
  186. data/spec/models/v1_inventory_entry_spec.rb +45 -0
  187. data/spec/models/v1_item_image_spec.rb +45 -0
  188. data/spec/models/v1_item_spec.rb +129 -0
  189. data/spec/models/v1_merchant_location_details_spec.rb +39 -0
  190. data/spec/models/v1_merchant_spec.rb +131 -0
  191. data/spec/models/v1_modifier_list_spec.rb +61 -0
  192. data/spec/models/v1_modifier_option_spec.rb +69 -0
  193. data/spec/models/v1_money_spec.rb +49 -0
  194. data/spec/models/v1_order_history_entry_spec.rb +49 -0
  195. data/spec/models/v1_order_spec.rb +187 -0
  196. data/spec/models/v1_page_cell_spec.rb +77 -0
  197. data/spec/models/v1_page_spec.rb +57 -0
  198. data/spec/models/v1_payment_discount_spec.rb +51 -0
  199. data/spec/models/v1_payment_item_detail_spec.rb +57 -0
  200. data/spec/models/v1_payment_itemization_spec.rb +121 -0
  201. data/spec/models/v1_payment_modifier_spec.rb +51 -0
  202. data/spec/models/v1_payment_spec.rb +177 -0
  203. data/spec/models/v1_payment_tax_spec.rb +73 -0
  204. data/spec/models/v1_phone_number_spec.rb +45 -0
  205. data/spec/models/v1_refund_spec.rb +79 -0
  206. data/spec/models/v1_settlement_entry_spec.rb +61 -0
  207. data/spec/models/v1_settlement_spec.rb +73 -0
  208. data/spec/models/v1_tender_spec.rb +123 -0
  209. data/spec/models/v1_timecard_event_spec.rb +67 -0
  210. data/spec/models/v1_timecard_spec.rb +87 -0
  211. data/spec/models/v1_update_modifier_list_request_spec.rb +49 -0
  212. data/spec/models/v1_update_order_request_spec.rb +67 -0
  213. data/spec/models/v1_variation_spec.rb +107 -0
  214. data/spec/models/void_transaction_request_spec.rb +3 -6
  215. data/spec/models/void_transaction_response_spec.rb +4 -11
  216. data/spec/spec_helper.rb +10 -0
  217. data/square_connect-2.0.2.gem +0 -0
  218. data/square_connect-2.1.0.gem +0 -0
  219. data/square_connect-2.1.0beta.gem +0 -0
  220. data/square_connect.gemspec +1 -1
  221. data/travis-ci/accounts.enc +0 -0
  222. metadata +197 -26
  223. data/docs/CustomerApi.md +0 -267
  224. data/docs/CustomerCardApi.md +0 -116
  225. data/docs/LocationApi.md +0 -56
  226. data/docs/RefundApi.md +0 -126
  227. data/docs/TransactionApi.md +0 -285
  228. data/lib/square_connect/api/customer_card_api.rb +0 -144
  229. data/lib/square_connect/api/refund_api.rb +0 -159
  230. data/spec/api/customer_card_api_spec.rb +0 -71
  231. data/spec/api/refund_api_spec.rb +0 -75
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21088ad57922e76b3850ce69df65d81d6f44ed04
4
- data.tar.gz: 4ce7077e295f1f9b65f89f0bc840b34b33a92449
3
+ metadata.gz: 0dd47f4de208912493332e7ed8cba8e5cf5a61e3
4
+ data.tar.gz: 34d6a856a4d28c7acf039ef6f64ca6c3aa7c3c10
5
5
  SHA512:
6
- metadata.gz: 11cf637ffb902cdfeaa56ac01a65219aceda99339ef0554318f0e2859c77e61536928b6f34a4c03e6dc168637408ce20dae2684c3ce52fbcad9162ba5076bb2e
7
- data.tar.gz: 5c02e80bbb2ee7a4f60879f2fd395c9d76d92c805619ce4db1c7c0176d6a3a8a86fa864acbf9007350324a246b5db7e4aac521a4c825ad1b8418a6fb6b73d9a9
6
+ metadata.gz: 8d660d20f253bb973a562ccae4193ebeb7bec5c457a814c754f8528630e46a58a83637845baa3c177f10eb73546709e105a78dc3870b17bb4a742fda42135032
7
+ data.tar.gz: b0bff99a4e1974fa7f936d0c94b967a8dcc4be1bac6dc993997fc42ccac3e86f7162bb41de3afd8a12447cc5a64cd6d09a8be470399d6cff1cf1303f4d2caaaf
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
- Connect v2 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
- ===============
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
+ ==================
3
3
 
4
4
  This repository contains the released Ruby client SDK. Check out our [API
5
5
  specification repository](https://github.com/square/connect-api-specification)
@@ -8,7 +8,7 @@ for the specification and template files we used to generate this.
8
8
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
9
9
 
10
10
  - API version: 2.0
11
- - Package version: 2.0.2
11
+ - Package version: 2.1.0
12
12
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
13
13
 
14
14
  For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)
@@ -49,9 +49,13 @@ Please follow the [installation](#installation) procedure and then run the follo
49
49
  # Load the gem
50
50
  require 'square_connect'
51
51
 
52
- api_instance = SquareConnect::CheckoutApi.new
52
+ # Setup authorization
53
+ SquareConnect.configure do |config|
54
+ # Configure OAuth2 access token for authorization: oauth2
55
+ config.access_token = 'YOUR ACCESS TOKEN'
56
+ end
53
57
 
54
- authorization = "authorization_example" # String | The value to provide in the Authorization header of your request. This value should follow the format `Bearer YOUR_ACCESS_TOKEN_HERE`.
58
+ api_instance = SquareConnect::CheckoutApi.new
55
59
 
56
60
  location_id = "location_id_example" # String | The ID of the business location to associate the checkout with.
57
61
 
@@ -60,7 +64,7 @@ body = SquareConnect::CreateCheckoutRequest.new # CreateCheckoutRequest | An obj
60
64
 
61
65
  begin
62
66
  #CreateCheckout
63
- result = api_instance.create_checkout(authorization, location_id, body)
67
+ result = api_instance.create_checkout(location_id, body)
64
68
  p result
65
69
  rescue SquareConnect::ApiError => e
66
70
  puts "Exception when calling CheckoutApi->create_checkout: #{e}"
@@ -75,21 +79,90 @@ All URIs are relative to *https://connect.squareup.com*
75
79
  Class | Method | HTTP request | Description
76
80
  ------------ | ------------- | ------------- | -------------
77
81
  *SquareConnect::CheckoutApi* | [**create_checkout**](docs/CheckoutApi.md#create_checkout) | **POST** /v2/locations/{location_id}/checkouts | CreateCheckout
78
- *SquareConnect::CustomerApi* | [**create_customer**](docs/CustomerApi.md#create_customer) | **POST** /v2/customers | CreateCustomer
79
- *SquareConnect::CustomerApi* | [**delete_customer**](docs/CustomerApi.md#delete_customer) | **DELETE** /v2/customers/{customer_id} | DeleteCustomer
80
- *SquareConnect::CustomerApi* | [**list_customers**](docs/CustomerApi.md#list_customers) | **GET** /v2/customers | ListCustomers
81
- *SquareConnect::CustomerApi* | [**retrieve_customer**](docs/CustomerApi.md#retrieve_customer) | **GET** /v2/customers/{customer_id} | RetrieveCustomer
82
- *SquareConnect::CustomerApi* | [**update_customer**](docs/CustomerApi.md#update_customer) | **PUT** /v2/customers/{customer_id} | UpdateCustomer
83
- *SquareConnect::CustomerCardApi* | [**create_customer_card**](docs/CustomerCardApi.md#create_customer_card) | **POST** /v2/customers/{customer_id}/cards | CreateCustomerCard
84
- *SquareConnect::CustomerCardApi* | [**delete_customer_card**](docs/CustomerCardApi.md#delete_customer_card) | **DELETE** /v2/customers/{customer_id}/cards/{card_id} | DeleteCustomerCard
85
- *SquareConnect::LocationApi* | [**list_locations**](docs/LocationApi.md#list_locations) | **GET** /v2/locations | ListLocations
86
- *SquareConnect::RefundApi* | [**create_refund**](docs/RefundApi.md#create_refund) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/refund | CreateRefund
87
- *SquareConnect::RefundApi* | [**list_refunds**](docs/RefundApi.md#list_refunds) | **GET** /v2/locations/{location_id}/refunds | ListRefunds
88
- *SquareConnect::TransactionApi* | [**capture_transaction**](docs/TransactionApi.md#capture_transaction) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/capture | CaptureTransaction
89
- *SquareConnect::TransactionApi* | [**charge**](docs/TransactionApi.md#charge) | **POST** /v2/locations/{location_id}/transactions | Charge
90
- *SquareConnect::TransactionApi* | [**list_transactions**](docs/TransactionApi.md#list_transactions) | **GET** /v2/locations/{location_id}/transactions | ListTransactions
91
- *SquareConnect::TransactionApi* | [**retrieve_transaction**](docs/TransactionApi.md#retrieve_transaction) | **GET** /v2/locations/{location_id}/transactions/{transaction_id} | RetrieveTransaction
92
- *SquareConnect::TransactionApi* | [**void_transaction**](docs/TransactionApi.md#void_transaction) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/void | VoidTransaction
82
+ *SquareConnect::CustomersApi* | [**create_customer**](docs/CustomersApi.md#create_customer) | **POST** /v2/customers | CreateCustomer
83
+ *SquareConnect::CustomersApi* | [**create_customer_card**](docs/CustomersApi.md#create_customer_card) | **POST** /v2/customers/{customer_id}/cards | CreateCustomerCard
84
+ *SquareConnect::CustomersApi* | [**delete_customer**](docs/CustomersApi.md#delete_customer) | **DELETE** /v2/customers/{customer_id} | DeleteCustomer
85
+ *SquareConnect::CustomersApi* | [**delete_customer_card**](docs/CustomersApi.md#delete_customer_card) | **DELETE** /v2/customers/{customer_id}/cards/{card_id} | DeleteCustomerCard
86
+ *SquareConnect::CustomersApi* | [**list_customers**](docs/CustomersApi.md#list_customers) | **GET** /v2/customers | ListCustomers
87
+ *SquareConnect::CustomersApi* | [**retrieve_customer**](docs/CustomersApi.md#retrieve_customer) | **GET** /v2/customers/{customer_id} | RetrieveCustomer
88
+ *SquareConnect::CustomersApi* | [**update_customer**](docs/CustomersApi.md#update_customer) | **PUT** /v2/customers/{customer_id} | UpdateCustomer
89
+ *SquareConnect::LocationsApi* | [**list_locations**](docs/LocationsApi.md#list_locations) | **GET** /v2/locations | ListLocations
90
+ *SquareConnect::TransactionsApi* | [**capture_transaction**](docs/TransactionsApi.md#capture_transaction) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/capture | CaptureTransaction
91
+ *SquareConnect::TransactionsApi* | [**charge**](docs/TransactionsApi.md#charge) | **POST** /v2/locations/{location_id}/transactions | Charge
92
+ *SquareConnect::TransactionsApi* | [**create_refund**](docs/TransactionsApi.md#create_refund) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/refund | CreateRefund
93
+ *SquareConnect::TransactionsApi* | [**list_refunds**](docs/TransactionsApi.md#list_refunds) | **GET** /v2/locations/{location_id}/refunds | ListRefunds
94
+ *SquareConnect::TransactionsApi* | [**list_transactions**](docs/TransactionsApi.md#list_transactions) | **GET** /v2/locations/{location_id}/transactions | ListTransactions
95
+ *SquareConnect::TransactionsApi* | [**retrieve_transaction**](docs/TransactionsApi.md#retrieve_transaction) | **GET** /v2/locations/{location_id}/transactions/{transaction_id} | RetrieveTransaction
96
+ *SquareConnect::TransactionsApi* | [**void_transaction**](docs/TransactionsApi.md#void_transaction) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/void | VoidTransaction
97
+ *SquareConnect::V1EmployeesApi* | [**create_employee**](docs/V1EmployeesApi.md#create_employee) | **POST** /v1/me/employees | Creates an employee for a business.
98
+ *SquareConnect::V1EmployeesApi* | [**create_employee_role**](docs/V1EmployeesApi.md#create_employee_role) | **POST** /v1/me/roles | Creates an employee role you can then assign to employees.
99
+ *SquareConnect::V1EmployeesApi* | [**create_timecard**](docs/V1EmployeesApi.md#create_timecard) | **POST** /v1/me/timecards | Creates a timecard for an employee. Each timecard corresponds to a single shift.
100
+ *SquareConnect::V1EmployeesApi* | [**delete_timecard**](docs/V1EmployeesApi.md#delete_timecard) | **DELETE** /v1/me/timecards/{timecard_id} | Deletes a timecard. Deleted timecards are still accessible from Connect API endpoints, but the value of their deleted field is set to true. See Handling deleted timecards for more information.
101
+ *SquareConnect::V1EmployeesApi* | [**list_cash_drawer_shifts**](docs/V1EmployeesApi.md#list_cash_drawer_shifts) | **GET** /v1/{location_id}/cash-drawer-shifts | Provides the details for all of a location's cash drawer shifts during a date range. The date range you specify cannot exceed 90 days.
102
+ *SquareConnect::V1EmployeesApi* | [**list_employee_roles**](docs/V1EmployeesApi.md#list_employee_roles) | **GET** /v1/me/roles | Provides summary information for all of a business's employee roles.
103
+ *SquareConnect::V1EmployeesApi* | [**list_employees**](docs/V1EmployeesApi.md#list_employees) | **GET** /v1/me/employees | Provides summary information for all of a business's employees.
104
+ *SquareConnect::V1EmployeesApi* | [**list_timecard_events**](docs/V1EmployeesApi.md#list_timecard_events) | **GET** /v1/me/timecards/{timecard_id}/events | Provides summary information for all events associated with a particular timecard.
105
+ *SquareConnect::V1EmployeesApi* | [**list_timecards**](docs/V1EmployeesApi.md#list_timecards) | **GET** /v1/me/timecards | Provides summary information for all of a business's employee timecards.
106
+ *SquareConnect::V1EmployeesApi* | [**retrieve_cash_drawer_shift**](docs/V1EmployeesApi.md#retrieve_cash_drawer_shift) | **GET** /v1/{location_id}/cash-drawer-shifts/{shift_id} | Provides the details for a single cash drawer shift, including all events that occurred during the shift.
107
+ *SquareConnect::V1EmployeesApi* | [**retrieve_employee**](docs/V1EmployeesApi.md#retrieve_employee) | **GET** /v1/me/employees/{employee_id} | Provides the details for a single employee.
108
+ *SquareConnect::V1EmployeesApi* | [**retrieve_employee_role**](docs/V1EmployeesApi.md#retrieve_employee_role) | **GET** /v1/me/roles/{role_id} | Provides the details for a single employee role.
109
+ *SquareConnect::V1EmployeesApi* | [**retrieve_timecard**](docs/V1EmployeesApi.md#retrieve_timecard) | **GET** /v1/me/timecards/{timecard_id} | Provides the details for a single timecard.
110
+ *SquareConnect::V1EmployeesApi* | [**update_employee**](docs/V1EmployeesApi.md#update_employee) | **PUT** /v1/me/employees/{employee_id} | V1 UpdateEmployee
111
+ *SquareConnect::V1EmployeesApi* | [**update_employee_role**](docs/V1EmployeesApi.md#update_employee_role) | **PUT** /v1/me/roles/{role_id} | Modifies the details of an employee role.
112
+ *SquareConnect::V1EmployeesApi* | [**update_timecard**](docs/V1EmployeesApi.md#update_timecard) | **PUT** /v1/me/timecards/{timecard_id} | Modifies a timecard's details. This creates an API_EDIT event for the timecard. You can view a timecard's event history with the List Timecard Events endpoint.
113
+ *SquareConnect::V1ItemsApi* | [**adjust_inventory**](docs/V1ItemsApi.md#adjust_inventory) | **POST** /v1/{location_id}/inventory/{variation_id} | Adjusts an item variation's current available inventory.
114
+ *SquareConnect::V1ItemsApi* | [**apply_fee**](docs/V1ItemsApi.md#apply_fee) | **PUT** /v1/{location_id}/items/{item_id}/fees/{fee_id} | Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register.
115
+ *SquareConnect::V1ItemsApi* | [**apply_modifier_list**](docs/V1ItemsApi.md#apply_modifier_list) | **PUT** /v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id} | Associates a modifier list with an item, meaning modifier options from the list can be applied to the item.
116
+ *SquareConnect::V1ItemsApi* | [**create_category**](docs/V1ItemsApi.md#create_category) | **POST** /v1/{location_id}/categories | Creates an item category.
117
+ *SquareConnect::V1ItemsApi* | [**create_discount**](docs/V1ItemsApi.md#create_discount) | **POST** /v1/{location_id}/discounts | Creates a discount.
118
+ *SquareConnect::V1ItemsApi* | [**create_fee**](docs/V1ItemsApi.md#create_fee) | **POST** /v1/{location_id}/fees | Creates a fee (tax).
119
+ *SquareConnect::V1ItemsApi* | [**create_item**](docs/V1ItemsApi.md#create_item) | **POST** /v1/{location_id}/items | Creates an item and at least one variation for it.
120
+ *SquareConnect::V1ItemsApi* | [**create_modifier_list**](docs/V1ItemsApi.md#create_modifier_list) | **POST** /v1/{location_id}/modifier-lists | Creates an item modifier list and at least one modifier option for it.
121
+ *SquareConnect::V1ItemsApi* | [**create_modifier_option**](docs/V1ItemsApi.md#create_modifier_option) | **POST** /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options | Creates an item modifier option and adds it to a modifier list.
122
+ *SquareConnect::V1ItemsApi* | [**create_page**](docs/V1ItemsApi.md#create_page) | **POST** /v1/{location_id}/pages | Creates a Favorites page in Square Register.
123
+ *SquareConnect::V1ItemsApi* | [**create_variation**](docs/V1ItemsApi.md#create_variation) | **POST** /v1/{location_id}/items/{item_id}/variations | Creates an item variation for an existing item.
124
+ *SquareConnect::V1ItemsApi* | [**delete_category**](docs/V1ItemsApi.md#delete_category) | **DELETE** /v1/{location_id}/categories/{category_id} | Deletes an existing item category.
125
+ *SquareConnect::V1ItemsApi* | [**delete_discount**](docs/V1ItemsApi.md#delete_discount) | **DELETE** /v1/{location_id}/discounts/{discount_id} | Deletes an existing discount.
126
+ *SquareConnect::V1ItemsApi* | [**delete_fee**](docs/V1ItemsApi.md#delete_fee) | **DELETE** /v1/{location_id}/fees/{fee_id} | Deletes an existing fee (tax).
127
+ *SquareConnect::V1ItemsApi* | [**delete_item**](docs/V1ItemsApi.md#delete_item) | **DELETE** /v1/{location_id}/items/{item_id} | Deletes an existing item and all item variations associated with it.
128
+ *SquareConnect::V1ItemsApi* | [**delete_modifier_list**](docs/V1ItemsApi.md#delete_modifier_list) | **DELETE** /v1/{location_id}/modifier-lists/{modifier_list_id} | Deletes an existing item modifier list and all modifier options associated with it.
129
+ *SquareConnect::V1ItemsApi* | [**delete_modifier_option**](docs/V1ItemsApi.md#delete_modifier_option) | **DELETE** /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id} | Deletes an existing item modifier option from a modifier list.
130
+ *SquareConnect::V1ItemsApi* | [**delete_page**](docs/V1ItemsApi.md#delete_page) | **DELETE** /v1/{location_id}/pages/{page_id} | Deletes an existing Favorites page and all of its cells.
131
+ *SquareConnect::V1ItemsApi* | [**delete_page_cell**](docs/V1ItemsApi.md#delete_page_cell) | **DELETE** /v1/{location_id}/pages/{page_id}/cells | Deletes a cell from a Favorites page in Square Register.
132
+ *SquareConnect::V1ItemsApi* | [**delete_variation**](docs/V1ItemsApi.md#delete_variation) | **DELETE** /v1/{location_id}/items/{item_id}/variations/{variation_id} | Deletes an existing item variation from an item.
133
+ *SquareConnect::V1ItemsApi* | [**list_categories**](docs/V1ItemsApi.md#list_categories) | **GET** /v1/{location_id}/categories | Lists all of a location's item categories.
134
+ *SquareConnect::V1ItemsApi* | [**list_discounts**](docs/V1ItemsApi.md#list_discounts) | **GET** /v1/{location_id}/discounts | Lists all of a location's discounts.
135
+ *SquareConnect::V1ItemsApi* | [**list_fees**](docs/V1ItemsApi.md#list_fees) | **GET** /v1/{location_id}/fees | Lists all of a location's fees (taxes).
136
+ *SquareConnect::V1ItemsApi* | [**list_inventory**](docs/V1ItemsApi.md#list_inventory) | **GET** /v1/{location_id}/inventory | Provides inventory information for all of a merchant's inventory-enabled item variations.
137
+ *SquareConnect::V1ItemsApi* | [**list_items**](docs/V1ItemsApi.md#list_items) | **GET** /v1/{location_id}/items | Provides summary information for all of a location's items.
138
+ *SquareConnect::V1ItemsApi* | [**list_modifier_lists**](docs/V1ItemsApi.md#list_modifier_lists) | **GET** /v1/{location_id}/modifier-lists | Lists all of a location's modifier lists.
139
+ *SquareConnect::V1ItemsApi* | [**list_pages**](docs/V1ItemsApi.md#list_pages) | **GET** /v1/{location_id}/pages | Lists all of a location's Favorites pages in Square Register.
140
+ *SquareConnect::V1ItemsApi* | [**remove_fee**](docs/V1ItemsApi.md#remove_fee) | **DELETE** /v1/{location_id}/items/{item_id}/fees/{fee_id} | Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register.
141
+ *SquareConnect::V1ItemsApi* | [**remove_modifier_list**](docs/V1ItemsApi.md#remove_modifier_list) | **DELETE** /v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id} | Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.
142
+ *SquareConnect::V1ItemsApi* | [**retrieve_item**](docs/V1ItemsApi.md#retrieve_item) | **GET** /v1/{location_id}/items/{item_id} | Provides the details for a single item, including associated modifier lists and fees.
143
+ *SquareConnect::V1ItemsApi* | [**retrieve_modifier_list**](docs/V1ItemsApi.md#retrieve_modifier_list) | **GET** /v1/{location_id}/modifier-lists/{modifier_list_id} | Provides the details for a single modifier list.
144
+ *SquareConnect::V1ItemsApi* | [**update_category**](docs/V1ItemsApi.md#update_category) | **PUT** /v1/{location_id}/categories/{category_id} | Modifies the details of an existing item category.
145
+ *SquareConnect::V1ItemsApi* | [**update_discount**](docs/V1ItemsApi.md#update_discount) | **PUT** /v1/{location_id}/discounts/{discount_id} | Modifies the details of an existing discount.
146
+ *SquareConnect::V1ItemsApi* | [**update_fee**](docs/V1ItemsApi.md#update_fee) | **PUT** /v1/{location_id}/fees/{fee_id} | Modifies the details of an existing fee (tax).
147
+ *SquareConnect::V1ItemsApi* | [**update_item**](docs/V1ItemsApi.md#update_item) | **PUT** /v1/{location_id}/items/{item_id} | Modifies the core details of an existing item.
148
+ *SquareConnect::V1ItemsApi* | [**update_modifier_list**](docs/V1ItemsApi.md#update_modifier_list) | **PUT** /v1/{location_id}/modifier-lists/{modifier_list_id} | Modifies the details of an existing item modifier list.
149
+ *SquareConnect::V1ItemsApi* | [**update_modifier_option**](docs/V1ItemsApi.md#update_modifier_option) | **PUT** /v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id} | Modifies the details of an existing item modifier option.
150
+ *SquareConnect::V1ItemsApi* | [**update_page**](docs/V1ItemsApi.md#update_page) | **PUT** /v1/{location_id}/pages/{page_id} | Modifies the details of a Favorites page in Square Register.
151
+ *SquareConnect::V1ItemsApi* | [**update_page_cell**](docs/V1ItemsApi.md#update_page_cell) | **PUT** /v1/{location_id}/pages/{page_id}/cells | Modifies a cell of a Favorites page in Square Register.
152
+ *SquareConnect::V1ItemsApi* | [**update_variation**](docs/V1ItemsApi.md#update_variation) | **PUT** /v1/{location_id}/items/{item_id}/variations/{variation_id} | Modifies the details of an existing item variation.
153
+ *SquareConnect::V1LocationsApi* | [**list_locations**](docs/V1LocationsApi.md#list_locations) | **GET** /v1/me/locations | Provides details for a business's locations, including their IDs.
154
+ *SquareConnect::V1LocationsApi* | [**retrieve_business**](docs/V1LocationsApi.md#retrieve_business) | **GET** /v1/me | Get a business's information.
155
+ *SquareConnect::V1TransactionsApi* | [**create_refund**](docs/V1TransactionsApi.md#create_refund) | **POST** /v1/{location_id}/refunds | Issues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment.
156
+ *SquareConnect::V1TransactionsApi* | [**list_bank_accounts**](docs/V1TransactionsApi.md#list_bank_accounts) | **GET** /v1/{location_id}/bank-accounts | Provides non-confidential details for all of a location's associated bank accounts. This endpoint does not provide full bank account numbers, and there is no way to obtain a full bank account number with the Connect API.
157
+ *SquareConnect::V1TransactionsApi* | [**list_orders**](docs/V1TransactionsApi.md#list_orders) | **GET** /v1/{location_id}/orders | Provides summary information for a merchant's online store orders.
158
+ *SquareConnect::V1TransactionsApi* | [**list_payments**](docs/V1TransactionsApi.md#list_payments) | **GET** /v1/{location_id}/payments | Provides summary information for all payments taken by a merchant or any of the merchant's mobile staff during a date range. Date ranges cannot exceed one year in length. See Date ranges for details of inclusive and exclusive dates.
159
+ *SquareConnect::V1TransactionsApi* | [**list_refunds**](docs/V1TransactionsApi.md#list_refunds) | **GET** /v1/{location_id}/refunds | Provides the details for all refunds initiated by a merchant or any of the merchant's mobile staff during a date range. Date ranges cannot exceed one year in length.
160
+ *SquareConnect::V1TransactionsApi* | [**list_settlements**](docs/V1TransactionsApi.md#list_settlements) | **GET** /v1/{location_id}/settlements | Provides summary information for all deposits and withdrawals initiated by Square to a merchant's bank account during a date range. Date ranges cannot exceed one year in length.
161
+ *SquareConnect::V1TransactionsApi* | [**retrieve_bank_account**](docs/V1TransactionsApi.md#retrieve_bank_account) | **GET** /v1/{location_id}/bank-accounts/{bank_account_id} | Provides non-confidential details for a merchant's associated bank account. This endpoint does not provide full bank account numbers, and there is no way to obtain a full bank account number with the Connect API.
162
+ *SquareConnect::V1TransactionsApi* | [**retrieve_order**](docs/V1TransactionsApi.md#retrieve_order) | **GET** /v1/{location_id}/orders/{order_id} | Provides comprehensive information for a single online store order, including the order's history.
163
+ *SquareConnect::V1TransactionsApi* | [**retrieve_payment**](docs/V1TransactionsApi.md#retrieve_payment) | **GET** /v1/{location_id}/payments/{payment_id} | Provides comprehensive information for a single payment.
164
+ *SquareConnect::V1TransactionsApi* | [**retrieve_settlement**](docs/V1TransactionsApi.md#retrieve_settlement) | **GET** /v1/{location_id}/settlements/{settlement_id} | Provides comprehensive information for a single settlement, including the entries that contribute to the settlement's total.
165
+ *SquareConnect::V1TransactionsApi* | [**update_order**](docs/V1TransactionsApi.md#update_order) | **PUT** /v1/{location_id}/orders/{order_id} | Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions:
93
166
 
94
167
 
95
168
  ## Documentation for Models
@@ -122,6 +195,7 @@ Class | Method | HTTP request | Description
122
195
  - [SquareConnect::DeleteCustomerCardResponse](docs/DeleteCustomerCardResponse.md)
123
196
  - [SquareConnect::DeleteCustomerRequest](docs/DeleteCustomerRequest.md)
124
197
  - [SquareConnect::DeleteCustomerResponse](docs/DeleteCustomerResponse.md)
198
+ - [SquareConnect::Device](docs/Device.md)
125
199
  - [SquareConnect::Error](docs/Error.md)
126
200
  - [SquareConnect::ErrorCategory](docs/ErrorCategory.md)
127
201
  - [SquareConnect::ErrorCode](docs/ErrorCode.md)
@@ -155,6 +229,44 @@ Class | Method | HTTP request | Description
155
229
  - [SquareConnect::TransactionProduct](docs/TransactionProduct.md)
156
230
  - [SquareConnect::UpdateCustomerRequest](docs/UpdateCustomerRequest.md)
157
231
  - [SquareConnect::UpdateCustomerResponse](docs/UpdateCustomerResponse.md)
232
+ - [SquareConnect::V1AdjustInventoryRequest](docs/V1AdjustInventoryRequest.md)
233
+ - [SquareConnect::V1BankAccount](docs/V1BankAccount.md)
234
+ - [SquareConnect::V1CashDrawerEvent](docs/V1CashDrawerEvent.md)
235
+ - [SquareConnect::V1CashDrawerShift](docs/V1CashDrawerShift.md)
236
+ - [SquareConnect::V1Category](docs/V1Category.md)
237
+ - [SquareConnect::V1CreateRefundRequest](docs/V1CreateRefundRequest.md)
238
+ - [SquareConnect::V1Discount](docs/V1Discount.md)
239
+ - [SquareConnect::V1Employee](docs/V1Employee.md)
240
+ - [SquareConnect::V1EmployeeRole](docs/V1EmployeeRole.md)
241
+ - [SquareConnect::V1Fee](docs/V1Fee.md)
242
+ - [SquareConnect::V1InventoryEntry](docs/V1InventoryEntry.md)
243
+ - [SquareConnect::V1Item](docs/V1Item.md)
244
+ - [SquareConnect::V1ItemImage](docs/V1ItemImage.md)
245
+ - [SquareConnect::V1Merchant](docs/V1Merchant.md)
246
+ - [SquareConnect::V1MerchantLocationDetails](docs/V1MerchantLocationDetails.md)
247
+ - [SquareConnect::V1ModifierList](docs/V1ModifierList.md)
248
+ - [SquareConnect::V1ModifierOption](docs/V1ModifierOption.md)
249
+ - [SquareConnect::V1Money](docs/V1Money.md)
250
+ - [SquareConnect::V1Order](docs/V1Order.md)
251
+ - [SquareConnect::V1OrderHistoryEntry](docs/V1OrderHistoryEntry.md)
252
+ - [SquareConnect::V1Page](docs/V1Page.md)
253
+ - [SquareConnect::V1PageCell](docs/V1PageCell.md)
254
+ - [SquareConnect::V1Payment](docs/V1Payment.md)
255
+ - [SquareConnect::V1PaymentDiscount](docs/V1PaymentDiscount.md)
256
+ - [SquareConnect::V1PaymentItemDetail](docs/V1PaymentItemDetail.md)
257
+ - [SquareConnect::V1PaymentItemization](docs/V1PaymentItemization.md)
258
+ - [SquareConnect::V1PaymentModifier](docs/V1PaymentModifier.md)
259
+ - [SquareConnect::V1PaymentTax](docs/V1PaymentTax.md)
260
+ - [SquareConnect::V1PhoneNumber](docs/V1PhoneNumber.md)
261
+ - [SquareConnect::V1Refund](docs/V1Refund.md)
262
+ - [SquareConnect::V1Settlement](docs/V1Settlement.md)
263
+ - [SquareConnect::V1SettlementEntry](docs/V1SettlementEntry.md)
264
+ - [SquareConnect::V1Tender](docs/V1Tender.md)
265
+ - [SquareConnect::V1Timecard](docs/V1Timecard.md)
266
+ - [SquareConnect::V1TimecardEvent](docs/V1TimecardEvent.md)
267
+ - [SquareConnect::V1UpdateModifierListRequest](docs/V1UpdateModifierListRequest.md)
268
+ - [SquareConnect::V1UpdateOrderRequest](docs/V1UpdateOrderRequest.md)
269
+ - [SquareConnect::V1Variation](docs/V1Variation.md)
158
270
  - [SquareConnect::VoidTransactionRequest](docs/VoidTransactionRequest.md)
159
271
  - [SquareConnect::VoidTransactionResponse](docs/VoidTransactionResponse.md)
160
272
 
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
11
11
  **amount_money** | [**Money**](Money.md) | The amount of money to charge. Note that you specify the amount in the __smallest denomination of the applicable currency__. For example, US dollar amounts are specified in cents. See [Working with monetary amounts](#workingwithmonetaryamounts) for details. The value of `currency` must match the currency associated with the business that is charging the card. |
12
12
  **card_nonce** | **String** | A nonce generated from the `SqPaymentForm` that represents the card to charge. The application that provides a nonce to this endpoint must be the _same application_ that generated the nonce with the `SqPaymentForm`. Otherwise, the nonce is invalid. Do not provide a value for this field if you provide a value for `customer_card_id`. | [optional]
13
13
  **customer_card_id** | **String** | The ID of the customer card on file to charge. Do not provide a value for this field if you provide a value for `card_nonce`. If you provide this value, you _must_ also provide a value for `customer_id`. | [optional]
14
- **delay_capture** | **BOOLEAN** | If `true`, the request will only perform an Auth on the provided card. You can then later perform either a Capture (with the [CaptureTransaction](#endpoint-capturetransaction) endpoint) or a Void (with the [VoidTransation](#endpoint-voidtransaction) endpoint). Default value: `false` | [optional]
14
+ **delay_capture** | **BOOLEAN** | If `true`, the request will only perform an Auth on the provided card. You can then later perform either a Capture (with the [CaptureTransaction](#endpoint-capturetransaction) endpoint) or a Void (with the [VoidTransaction](#endpoint-voidtransaction) endpoint). Default value: `false` | [optional]
15
15
  **reference_id** | **String** | An optional ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters. | [optional]
16
16
  **note** | **String** | An optional note to associate with the transaction. This value cannot exceed 60 characters. | [optional]
17
17
  **customer_id** | **String** | The ID of the customer to associate this transaction with. This field is required if you provide a value for `customer_card_id`, and optional otherwise. | [optional]
data/docs/CheckoutApi.md CHANGED
@@ -8,7 +8,7 @@ Method | HTTP request | Description
8
8
 
9
9
 
10
10
  # **create_checkout**
11
- > CreateCheckoutResponse create_checkout(authorization, location_id, body)
11
+ > CreateCheckoutResponse create_checkout(location_id, body)
12
12
 
13
13
  CreateCheckout
14
14
 
@@ -18,11 +18,14 @@ Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `che
18
18
  ```ruby
19
19
  # load the gem
20
20
  require 'square_connect'
21
+ # setup authorization
22
+ SquareConnect.configure do |config|
23
+ # Configure OAuth2 access token for authorization: oauth2
24
+ config.access_token = 'YOUR ACCESS TOKEN'
25
+ end
21
26
 
22
27
  api_instance = SquareConnect::CheckoutApi.new
23
28
 
24
- authorization = "authorization_example" # String | The value to provide in the Authorization header of your request. This value should follow the format `Bearer YOUR_ACCESS_TOKEN_HERE`.
25
-
26
29
  location_id = "location_id_example" # String | The ID of the business location to associate the checkout with.
27
30
 
28
31
  body = SquareConnect::CreateCheckoutRequest.new # CreateCheckoutRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
@@ -30,7 +33,7 @@ body = SquareConnect::CreateCheckoutRequest.new # CreateCheckoutRequest | An obj
30
33
 
31
34
  begin
32
35
  #CreateCheckout
33
- result = api_instance.create_checkout(authorization, location_id, body)
36
+ result = api_instance.create_checkout(location_id, body)
34
37
  p result
35
38
  rescue SquareConnect::ApiError => e
36
39
  puts "Exception when calling CheckoutApi->create_checkout: #{e}"
@@ -41,7 +44,6 @@ end
41
44
 
42
45
  Name | Type | Description | Notes
43
46
  ------------- | ------------- | ------------- | -------------
44
- **authorization** | **String**| The value to provide in the Authorization header of your request. This value should follow the format `Bearer YOUR_ACCESS_TOKEN_HERE`. |
45
47
  **location_id** | **String**| The ID of the business location to associate the checkout with. |
46
48
  **body** | [**CreateCheckoutRequest**](CreateCheckoutRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
47
49
 
@@ -51,7 +53,7 @@ Name | Type | Description | Notes
51
53
 
52
54
  ### Authorization
53
55
 
54
- No authorization required
56
+ [oauth2](../README.md#oauth2)
55
57
 
56
58
  ### HTTP request headers
57
59
 
@@ -0,0 +1,389 @@
1
+ # SquareConnect::CustomersApi
2
+
3
+ All URIs are relative to *https://connect.squareup.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create_customer**](CustomersApi.md#create_customer) | **POST** /v2/customers | CreateCustomer
8
+ [**create_customer_card**](CustomersApi.md#create_customer_card) | **POST** /v2/customers/{customer_id}/cards | CreateCustomerCard
9
+ [**delete_customer**](CustomersApi.md#delete_customer) | **DELETE** /v2/customers/{customer_id} | DeleteCustomer
10
+ [**delete_customer_card**](CustomersApi.md#delete_customer_card) | **DELETE** /v2/customers/{customer_id}/cards/{card_id} | DeleteCustomerCard
11
+ [**list_customers**](CustomersApi.md#list_customers) | **GET** /v2/customers | ListCustomers
12
+ [**retrieve_customer**](CustomersApi.md#retrieve_customer) | **GET** /v2/customers/{customer_id} | RetrieveCustomer
13
+ [**update_customer**](CustomersApi.md#update_customer) | **PUT** /v2/customers/{customer_id} | UpdateCustomer
14
+
15
+
16
+ # **create_customer**
17
+ > CreateCustomerResponse create_customer(body)
18
+
19
+ CreateCustomer
20
+
21
+ Creates a new customer for a business, which can have associated cards on file. You must provide __at least one__ of the following values in your request to this endpoint: - `given_name` - `family_name` - `company_name` - `email_address` - `phone_number` This endpoint does not accept an idempotency key. If you accidentally create a duplicate customer, you can delete it with the [DeleteCustomer](#endpoint-deletecustomer) endpoint.
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::CustomersApi.new
34
+
35
+ body = SquareConnect::CreateCustomerRequest.new # CreateCustomerRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
36
+
37
+
38
+ begin
39
+ #CreateCustomer
40
+ result = api_instance.create_customer(body)
41
+ p result
42
+ rescue SquareConnect::ApiError => e
43
+ puts "Exception when calling CustomersApi->create_customer: #{e}"
44
+ end
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+ Name | Type | Description | Notes
50
+ ------------- | ------------- | ------------- | -------------
51
+ **body** | [**CreateCustomerRequest**](CreateCustomerRequest.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
+ [**CreateCustomerResponse**](CreateCustomerResponse.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
+ # **create_customer_card**
69
+ > CreateCustomerCardResponse create_customer_card(customer_id, body)
70
+
71
+ CreateCustomerCard
72
+
73
+ Adds a card on file to an existing customer.
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::CustomersApi.new
86
+
87
+ customer_id = "customer_id_example" # String | The ID of the customer to link the card on file to.
88
+
89
+ body = SquareConnect::CreateCustomerCardRequest.new # CreateCustomerCardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
90
+
91
+
92
+ begin
93
+ #CreateCustomerCard
94
+ result = api_instance.create_customer_card(customer_id, body)
95
+ p result
96
+ rescue SquareConnect::ApiError => e
97
+ puts "Exception when calling CustomersApi->create_customer_card: #{e}"
98
+ end
99
+ ```
100
+
101
+ ### Parameters
102
+
103
+ Name | Type | Description | Notes
104
+ ------------- | ------------- | ------------- | -------------
105
+ **customer_id** | **String**| The ID of the customer to link the card on file to. |
106
+ **body** | [**CreateCustomerCardRequest**](CreateCustomerCardRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
107
+
108
+ ### Return type
109
+
110
+ [**CreateCustomerCardResponse**](CreateCustomerCardResponse.md)
111
+
112
+ ### Authorization
113
+
114
+ [oauth2](../README.md#oauth2)
115
+
116
+ ### HTTP request headers
117
+
118
+ - **Content-Type**: application/json
119
+ - **Accept**: application/json
120
+
121
+
122
+
123
+ # **delete_customer**
124
+ > DeleteCustomerResponse delete_customer(customer_id)
125
+
126
+ DeleteCustomer
127
+
128
+ Deletes a customer from a business, along with any linked cards on file.
129
+
130
+ ### Example
131
+ ```ruby
132
+ # load the gem
133
+ require 'square_connect'
134
+ # setup authorization
135
+ SquareConnect.configure do |config|
136
+ # Configure OAuth2 access token for authorization: oauth2
137
+ config.access_token = 'YOUR ACCESS TOKEN'
138
+ end
139
+
140
+ api_instance = SquareConnect::CustomersApi.new
141
+
142
+ customer_id = "customer_id_example" # String | The ID of the customer to delete.
143
+
144
+
145
+ begin
146
+ #DeleteCustomer
147
+ result = api_instance.delete_customer(customer_id)
148
+ p result
149
+ rescue SquareConnect::ApiError => e
150
+ puts "Exception when calling CustomersApi->delete_customer: #{e}"
151
+ end
152
+ ```
153
+
154
+ ### Parameters
155
+
156
+ Name | Type | Description | Notes
157
+ ------------- | ------------- | ------------- | -------------
158
+ **customer_id** | **String**| The ID of the customer to delete. |
159
+
160
+ ### Return type
161
+
162
+ [**DeleteCustomerResponse**](DeleteCustomerResponse.md)
163
+
164
+ ### Authorization
165
+
166
+ [oauth2](../README.md#oauth2)
167
+
168
+ ### HTTP request headers
169
+
170
+ - **Content-Type**: application/json
171
+ - **Accept**: application/json
172
+
173
+
174
+
175
+ # **delete_customer_card**
176
+ > DeleteCustomerCardResponse delete_customer_card(customer_id, card_id)
177
+
178
+ DeleteCustomerCard
179
+
180
+ Removes a card on file from a customer.
181
+
182
+ ### Example
183
+ ```ruby
184
+ # load the gem
185
+ require 'square_connect'
186
+ # setup authorization
187
+ SquareConnect.configure do |config|
188
+ # Configure OAuth2 access token for authorization: oauth2
189
+ config.access_token = 'YOUR ACCESS TOKEN'
190
+ end
191
+
192
+ api_instance = SquareConnect::CustomersApi.new
193
+
194
+ customer_id = "customer_id_example" # String | The ID of the customer that the card on file belongs to.
195
+
196
+ card_id = "card_id_example" # String | The ID of the card on file to delete.
197
+
198
+
199
+ begin
200
+ #DeleteCustomerCard
201
+ result = api_instance.delete_customer_card(customer_id, card_id)
202
+ p result
203
+ rescue SquareConnect::ApiError => e
204
+ puts "Exception when calling CustomersApi->delete_customer_card: #{e}"
205
+ end
206
+ ```
207
+
208
+ ### Parameters
209
+
210
+ Name | Type | Description | Notes
211
+ ------------- | ------------- | ------------- | -------------
212
+ **customer_id** | **String**| The ID of the customer that the card on file belongs to. |
213
+ **card_id** | **String**| The ID of the card on file to delete. |
214
+
215
+ ### Return type
216
+
217
+ [**DeleteCustomerCardResponse**](DeleteCustomerCardResponse.md)
218
+
219
+ ### Authorization
220
+
221
+ [oauth2](../README.md#oauth2)
222
+
223
+ ### HTTP request headers
224
+
225
+ - **Content-Type**: application/json
226
+ - **Accept**: application/json
227
+
228
+
229
+
230
+ # **list_customers**
231
+ > ListCustomersResponse list_customers(opts)
232
+
233
+ ListCustomers
234
+
235
+ Lists a business's customers.
236
+
237
+ ### Example
238
+ ```ruby
239
+ # load the gem
240
+ require 'square_connect'
241
+ # setup authorization
242
+ SquareConnect.configure do |config|
243
+ # Configure OAuth2 access token for authorization: oauth2
244
+ config.access_token = 'YOUR ACCESS TOKEN'
245
+ end
246
+
247
+ api_instance = SquareConnect::CustomersApi.new
248
+
249
+ opts = {
250
+ 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 your original query. See [Paginating results](#paginatingresults) for more information.
251
+ }
252
+
253
+ begin
254
+ #ListCustomers
255
+ result = api_instance.list_customers(opts)
256
+ p result
257
+ rescue SquareConnect::ApiError => e
258
+ puts "Exception when calling CustomersApi->list_customers: #{e}"
259
+ end
260
+ ```
261
+
262
+ ### Parameters
263
+
264
+ Name | Type | Description | Notes
265
+ ------------- | ------------- | ------------- | -------------
266
+ **cursor** | **String**| A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information. | [optional]
267
+
268
+ ### Return type
269
+
270
+ [**ListCustomersResponse**](ListCustomersResponse.md)
271
+
272
+ ### Authorization
273
+
274
+ [oauth2](../README.md#oauth2)
275
+
276
+ ### HTTP request headers
277
+
278
+ - **Content-Type**: application/json
279
+ - **Accept**: application/json
280
+
281
+
282
+
283
+ # **retrieve_customer**
284
+ > RetrieveCustomerResponse retrieve_customer(customer_id)
285
+
286
+ RetrieveCustomer
287
+
288
+ Returns details for a single customer.
289
+
290
+ ### Example
291
+ ```ruby
292
+ # load the gem
293
+ require 'square_connect'
294
+ # setup authorization
295
+ SquareConnect.configure do |config|
296
+ # Configure OAuth2 access token for authorization: oauth2
297
+ config.access_token = 'YOUR ACCESS TOKEN'
298
+ end
299
+
300
+ api_instance = SquareConnect::CustomersApi.new
301
+
302
+ customer_id = "customer_id_example" # String | The ID of the customer to retrieve.
303
+
304
+
305
+ begin
306
+ #RetrieveCustomer
307
+ result = api_instance.retrieve_customer(customer_id)
308
+ p result
309
+ rescue SquareConnect::ApiError => e
310
+ puts "Exception when calling CustomersApi->retrieve_customer: #{e}"
311
+ end
312
+ ```
313
+
314
+ ### Parameters
315
+
316
+ Name | Type | Description | Notes
317
+ ------------- | ------------- | ------------- | -------------
318
+ **customer_id** | **String**| The ID of the customer to retrieve. |
319
+
320
+ ### Return type
321
+
322
+ [**RetrieveCustomerResponse**](RetrieveCustomerResponse.md)
323
+
324
+ ### Authorization
325
+
326
+ [oauth2](../README.md#oauth2)
327
+
328
+ ### HTTP request headers
329
+
330
+ - **Content-Type**: application/json
331
+ - **Accept**: application/json
332
+
333
+
334
+
335
+ # **update_customer**
336
+ > UpdateCustomerResponse update_customer(customer_id, body)
337
+
338
+ UpdateCustomer
339
+
340
+ Updates the details of an existing customer. 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.
341
+
342
+ ### Example
343
+ ```ruby
344
+ # load the gem
345
+ require 'square_connect'
346
+ # setup authorization
347
+ SquareConnect.configure do |config|
348
+ # Configure OAuth2 access token for authorization: oauth2
349
+ config.access_token = 'YOUR ACCESS TOKEN'
350
+ end
351
+
352
+ api_instance = SquareConnect::CustomersApi.new
353
+
354
+ customer_id = "customer_id_example" # String | The ID of the customer to update.
355
+
356
+ body = SquareConnect::UpdateCustomerRequest.new # UpdateCustomerRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
357
+
358
+
359
+ begin
360
+ #UpdateCustomer
361
+ result = api_instance.update_customer(customer_id, body)
362
+ p result
363
+ rescue SquareConnect::ApiError => e
364
+ puts "Exception when calling CustomersApi->update_customer: #{e}"
365
+ end
366
+ ```
367
+
368
+ ### Parameters
369
+
370
+ Name | Type | Description | Notes
371
+ ------------- | ------------- | ------------- | -------------
372
+ **customer_id** | **String**| The ID of the customer to update. |
373
+ **body** | [**UpdateCustomerRequest**](UpdateCustomerRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
374
+
375
+ ### Return type
376
+
377
+ [**UpdateCustomerResponse**](UpdateCustomerResponse.md)
378
+
379
+ ### Authorization
380
+
381
+ [oauth2](../README.md#oauth2)
382
+
383
+ ### HTTP request headers
384
+
385
+ - **Content-Type**: application/json
386
+ - **Accept**: application/json
387
+
388
+
389
+