square_connect 2.0.2.69 → 2.1.0.beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -0,0 +1,118 @@
1
+ =begin
2
+ #Square Connect API
3
+
4
+ OpenAPI spec version: 2.0
5
+ Contact: developers@squareup.com
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+ =end
9
+
10
+ require "uri"
11
+
12
+ module SquareConnect
13
+ class V1LocationsApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+
20
+ # Provides details for a business's locations, including their IDs.
21
+ # Provides details for a business's locations, including their IDs.
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [Array<V1Merchant>]
24
+ def list_locations(opts = {})
25
+ data, _status_code, _headers = list_locations_with_http_info(opts)
26
+ return data
27
+ end
28
+
29
+ # Provides details for a business&#39;s locations, including their IDs.
30
+ # Provides details for a business&#39;s locations, including their IDs.
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(Array<V1Merchant>, Fixnum, Hash)>] Array<V1Merchant> data, response status code and response headers
33
+ def list_locations_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug "Calling API: V1LocationsApi.list_locations ..."
36
+ end
37
+ # resource path
38
+ local_var_path = "/v1/me/locations".sub('{format}','json')
39
+
40
+ # query parameters
41
+ query_params = {}
42
+
43
+ # header parameters
44
+ header_params = {}
45
+ # HTTP header 'Accept' (if needed)
46
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
47
+ # HTTP header 'Content-Type'
48
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = {}
52
+
53
+ # http body (model)
54
+ post_body = nil
55
+ auth_names = ['oauth2']
56
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
57
+ :header_params => header_params,
58
+ :query_params => query_params,
59
+ :form_params => form_params,
60
+ :body => post_body,
61
+ :auth_names => auth_names,
62
+ :return_type => 'Array<V1Merchant>')
63
+ if @api_client.config.debugging
64
+ @api_client.config.logger.debug "API called: V1LocationsApi#list_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
+ end
66
+ return data, status_code, headers
67
+ end
68
+
69
+ # Get a business's information.
70
+ # Get a business's information.
71
+ # @param [Hash] opts the optional parameters
72
+ # @return [V1Merchant]
73
+ def retrieve_business(opts = {})
74
+ data, _status_code, _headers = retrieve_business_with_http_info(opts)
75
+ return data
76
+ end
77
+
78
+ # Get a business&#39;s information.
79
+ # Get a business&#39;s information.
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [Array<(V1Merchant, Fixnum, Hash)>] V1Merchant data, response status code and response headers
82
+ def retrieve_business_with_http_info(opts = {})
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "Calling API: V1LocationsApi.retrieve_business ..."
85
+ end
86
+ # resource path
87
+ local_var_path = "/v1/me".sub('{format}','json')
88
+
89
+ # query parameters
90
+ query_params = {}
91
+
92
+ # header parameters
93
+ header_params = {}
94
+ # HTTP header 'Accept' (if needed)
95
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
96
+ # HTTP header 'Content-Type'
97
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
98
+
99
+ # form parameters
100
+ form_params = {}
101
+
102
+ # http body (model)
103
+ post_body = nil
104
+ auth_names = ['oauth2']
105
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
106
+ :header_params => header_params,
107
+ :query_params => query_params,
108
+ :form_params => form_params,
109
+ :body => post_body,
110
+ :auth_names => auth_names,
111
+ :return_type => 'V1Merchant')
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug "API called: V1LocationsApi#retrieve_business\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
114
+ end
115
+ return data, status_code, headers
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,707 @@
1
+ =begin
2
+ #Square Connect API
3
+
4
+ OpenAPI spec version: 2.0
5
+ Contact: developers@squareup.com
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+ =end
9
+
10
+ require "uri"
11
+
12
+ module SquareConnect
13
+ class V1TransactionsApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+
20
+ # Issues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment.
21
+ # Issues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment.
22
+ # @param location_id The ID of the original payment&#39;s associated location.
23
+ # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [V1Refund]
26
+ def create_refund(location_id, body, opts = {})
27
+ data, _status_code, _headers = create_refund_with_http_info(location_id, body, opts)
28
+ return data
29
+ end
30
+
31
+ # Issues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment.
32
+ # Issues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment.
33
+ # @param location_id The ID of the original payment&#39;s associated location.
34
+ # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(V1Refund, Fixnum, Hash)>] V1Refund data, response status code and response headers
37
+ def create_refund_with_http_info(location_id, body, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug "Calling API: V1TransactionsApi.create_refund ..."
40
+ end
41
+ # verify the required parameter 'location_id' is set
42
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.create_refund" if location_id.nil?
43
+ # verify the required parameter 'body' is set
44
+ fail ArgumentError, "Missing the required parameter 'body' when calling V1TransactionsApi.create_refund" if body.nil?
45
+ # resource path
46
+ local_var_path = "/v1/{location_id}/refunds".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
47
+
48
+ # query parameters
49
+ query_params = {}
50
+
51
+ # header parameters
52
+ header_params = {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = @api_client.object_to_http_body(body)
63
+ auth_names = ['oauth2']
64
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names,
70
+ :return_type => 'V1Refund')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: V1TransactionsApi#create_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+
77
+ # 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.
78
+ # 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.
79
+ # @param location_id The ID of the location to list bank accounts for.
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [Array<V1BankAccount>]
82
+ def list_bank_accounts(location_id, opts = {})
83
+ data, _status_code, _headers = list_bank_accounts_with_http_info(location_id, opts)
84
+ return data
85
+ end
86
+
87
+ # Provides non-confidential details for all of a location&#39;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.
88
+ # Provides non-confidential details for all of a location&#39;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.
89
+ # @param location_id The ID of the location to list bank accounts for.
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [Array<(Array<V1BankAccount>, Fixnum, Hash)>] Array<V1BankAccount> data, response status code and response headers
92
+ def list_bank_accounts_with_http_info(location_id, opts = {})
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "Calling API: V1TransactionsApi.list_bank_accounts ..."
95
+ end
96
+ # verify the required parameter 'location_id' is set
97
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_bank_accounts" if location_id.nil?
98
+ # resource path
99
+ local_var_path = "/v1/{location_id}/bank-accounts".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
100
+
101
+ # query parameters
102
+ query_params = {}
103
+
104
+ # header parameters
105
+ header_params = {}
106
+ # HTTP header 'Accept' (if needed)
107
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
108
+ # HTTP header 'Content-Type'
109
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
110
+
111
+ # form parameters
112
+ form_params = {}
113
+
114
+ # http body (model)
115
+ post_body = nil
116
+ auth_names = ['oauth2']
117
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
118
+ :header_params => header_params,
119
+ :query_params => query_params,
120
+ :form_params => form_params,
121
+ :body => post_body,
122
+ :auth_names => auth_names,
123
+ :return_type => 'Array<V1BankAccount>')
124
+ if @api_client.config.debugging
125
+ @api_client.config.logger.debug "API called: V1TransactionsApi#list_bank_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
126
+ end
127
+ return data, status_code, headers
128
+ end
129
+
130
+ # Provides summary information for a merchant's online store orders.
131
+ # Provides summary information for a merchant's online store orders.
132
+ # @param location_id The ID of the location to list online store orders for.
133
+ # @param [Hash] opts the optional parameters
134
+ # @option opts [String] :order TThe order in which payments are listed in the response.
135
+ # @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
136
+ # @return [Array<V1Order>]
137
+ def list_orders(location_id, opts = {})
138
+ data, _status_code, _headers = list_orders_with_http_info(location_id, opts)
139
+ return data
140
+ end
141
+
142
+ # Provides summary information for a merchant&#39;s online store orders.
143
+ # Provides summary information for a merchant&#39;s online store orders.
144
+ # @param location_id The ID of the location to list online store orders for.
145
+ # @param [Hash] opts the optional parameters
146
+ # @option opts [String] :order TThe order in which payments are listed in the response.
147
+ # @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
148
+ # @return [Array<(Array<V1Order>, Fixnum, Hash)>] Array<V1Order> data, response status code and response headers
149
+ def list_orders_with_http_info(location_id, opts = {})
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "Calling API: V1TransactionsApi.list_orders ..."
152
+ end
153
+ # verify the required parameter 'location_id' is set
154
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_orders" if location_id.nil?
155
+ if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
156
+ fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
157
+ end
158
+ if !opts[:'limit'].nil? && opts[:'limit'] > 200
159
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1TransactionsApi.list_orders, must be smaller than or equal to 200.'
160
+ end
161
+
162
+ # resource path
163
+ local_var_path = "/v1/{location_id}/orders".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
164
+
165
+ # query parameters
166
+ query_params = {}
167
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
168
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
169
+
170
+ # header parameters
171
+ header_params = {}
172
+ # HTTP header 'Accept' (if needed)
173
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
174
+ # HTTP header 'Content-Type'
175
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
176
+
177
+ # form parameters
178
+ form_params = {}
179
+
180
+ # http body (model)
181
+ post_body = nil
182
+ auth_names = ['oauth2']
183
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
184
+ :header_params => header_params,
185
+ :query_params => query_params,
186
+ :form_params => form_params,
187
+ :body => post_body,
188
+ :auth_names => auth_names,
189
+ :return_type => 'Array<V1Order>')
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug "API called: V1TransactionsApi#list_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
192
+ end
193
+ return data, status_code, headers
194
+ end
195
+
196
+ # 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.
197
+ # 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.
198
+ # @param location_id The ID of the location to list payments for. If you specify me, this endpoint returns payments aggregated from all of the business&#39;s locations.
199
+ # @param [Hash] opts the optional parameters
200
+ # @option opts [String] :order The order in which payments are listed in the response.
201
+ # @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
202
+ # @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
203
+ # @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
204
+ # @return [Array<V1Payment>]
205
+ def list_payments(location_id, opts = {})
206
+ data, _status_code, _headers = list_payments_with_http_info(location_id, opts)
207
+ return data
208
+ end
209
+
210
+ # Provides summary information for all payments taken by a merchant or any of the merchant&#39;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.
211
+ # Provides summary information for all payments taken by a merchant or any of the merchant&#39;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.
212
+ # @param location_id The ID of the location to list payments for. If you specify me, this endpoint returns payments aggregated from all of the business&#39;s locations.
213
+ # @param [Hash] opts the optional parameters
214
+ # @option opts [String] :order The order in which payments are listed in the response.
215
+ # @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
216
+ # @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
217
+ # @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
218
+ # @return [Array<(Array<V1Payment>, Fixnum, Hash)>] Array<V1Payment> data, response status code and response headers
219
+ def list_payments_with_http_info(location_id, opts = {})
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug "Calling API: V1TransactionsApi.list_payments ..."
222
+ end
223
+ # verify the required parameter 'location_id' is set
224
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_payments" if location_id.nil?
225
+ if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
226
+ fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
227
+ end
228
+ if !opts[:'limit'].nil? && opts[:'limit'] > 200
229
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1TransactionsApi.list_payments, must be smaller than or equal to 200.'
230
+ end
231
+
232
+ # resource path
233
+ local_var_path = "/v1/{location_id}/payments".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
234
+
235
+ # query parameters
236
+ query_params = {}
237
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
238
+ query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil?
239
+ query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
240
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
241
+
242
+ # header parameters
243
+ header_params = {}
244
+ # HTTP header 'Accept' (if needed)
245
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
246
+ # HTTP header 'Content-Type'
247
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
248
+
249
+ # form parameters
250
+ form_params = {}
251
+
252
+ # http body (model)
253
+ post_body = nil
254
+ auth_names = ['oauth2']
255
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
256
+ :header_params => header_params,
257
+ :query_params => query_params,
258
+ :form_params => form_params,
259
+ :body => post_body,
260
+ :auth_names => auth_names,
261
+ :return_type => 'Array<V1Payment>')
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug "API called: V1TransactionsApi#list_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
264
+ end
265
+ return data, status_code, headers
266
+ end
267
+
268
+ # 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.
269
+ # 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.
270
+ # @param location_id The ID of the location to list refunds for.
271
+ # @param [Hash] opts the optional parameters
272
+ # @option opts [String] :order TThe order in which payments are listed in the response.
273
+ # @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
274
+ # @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
275
+ # @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
276
+ # @return [Array<V1Refund>]
277
+ def list_refunds(location_id, opts = {})
278
+ data, _status_code, _headers = list_refunds_with_http_info(location_id, opts)
279
+ return data
280
+ end
281
+
282
+ # Provides the details for all refunds initiated by a merchant or any of the merchant&#39;s mobile staff during a date range. Date ranges cannot exceed one year in length.
283
+ # Provides the details for all refunds initiated by a merchant or any of the merchant&#39;s mobile staff during a date range. Date ranges cannot exceed one year in length.
284
+ # @param location_id The ID of the location to list refunds for.
285
+ # @param [Hash] opts the optional parameters
286
+ # @option opts [String] :order TThe order in which payments are listed in the response.
287
+ # @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
288
+ # @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
289
+ # @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
290
+ # @return [Array<(Array<V1Refund>, Fixnum, Hash)>] Array<V1Refund> data, response status code and response headers
291
+ def list_refunds_with_http_info(location_id, opts = {})
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug "Calling API: V1TransactionsApi.list_refunds ..."
294
+ end
295
+ # verify the required parameter 'location_id' is set
296
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_refunds" if location_id.nil?
297
+ if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
298
+ fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
299
+ end
300
+ if !opts[:'limit'].nil? && opts[:'limit'] > 200
301
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1TransactionsApi.list_refunds, must be smaller than or equal to 200.'
302
+ end
303
+
304
+ # resource path
305
+ local_var_path = "/v1/{location_id}/refunds".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
306
+
307
+ # query parameters
308
+ query_params = {}
309
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
310
+ query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil?
311
+ query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
312
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
313
+
314
+ # header parameters
315
+ header_params = {}
316
+ # HTTP header 'Accept' (if needed)
317
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
318
+ # HTTP header 'Content-Type'
319
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
320
+
321
+ # form parameters
322
+ form_params = {}
323
+
324
+ # http body (model)
325
+ post_body = nil
326
+ auth_names = ['oauth2']
327
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
328
+ :header_params => header_params,
329
+ :query_params => query_params,
330
+ :form_params => form_params,
331
+ :body => post_body,
332
+ :auth_names => auth_names,
333
+ :return_type => 'Array<V1Refund>')
334
+ if @api_client.config.debugging
335
+ @api_client.config.logger.debug "API called: V1TransactionsApi#list_refunds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
336
+ end
337
+ return data, status_code, headers
338
+ end
339
+
340
+ # 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.
341
+ # 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.
342
+ # @param location_id The ID of the location to list settlements for. If you specify me, this endpoint returns payments aggregated from all of the business&#39;s locations.
343
+ # @param [Hash] opts the optional parameters
344
+ # @option opts [String] :order TThe order in which payments are listed in the response.
345
+ # @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
346
+ # @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
347
+ # @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
348
+ # @option opts [String] :status Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED).
349
+ # @return [Array<V1Settlement>]
350
+ def list_settlements(location_id, opts = {})
351
+ data, _status_code, _headers = list_settlements_with_http_info(location_id, opts)
352
+ return data
353
+ end
354
+
355
+ # Provides summary information for all deposits and withdrawals initiated by Square to a merchant&#39;s bank account during a date range. Date ranges cannot exceed one year in length.
356
+ # Provides summary information for all deposits and withdrawals initiated by Square to a merchant&#39;s bank account during a date range. Date ranges cannot exceed one year in length.
357
+ # @param location_id The ID of the location to list settlements for. If you specify me, this endpoint returns payments aggregated from all of the business&#39;s locations.
358
+ # @param [Hash] opts the optional parameters
359
+ # @option opts [String] :order TThe order in which payments are listed in the response.
360
+ # @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
361
+ # @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
362
+ # @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
363
+ # @option opts [String] :status Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED).
364
+ # @return [Array<(Array<V1Settlement>, Fixnum, Hash)>] Array<V1Settlement> data, response status code and response headers
365
+ def list_settlements_with_http_info(location_id, opts = {})
366
+ if @api_client.config.debugging
367
+ @api_client.config.logger.debug "Calling API: V1TransactionsApi.list_settlements ..."
368
+ end
369
+ # verify the required parameter 'location_id' is set
370
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_settlements" if location_id.nil?
371
+ if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
372
+ fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
373
+ end
374
+ if !opts[:'limit'].nil? && opts[:'limit'] > 200
375
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1TransactionsApi.list_settlements, must be smaller than or equal to 200.'
376
+ end
377
+
378
+ if opts[:'status'] && !['SENT', 'FAILED'].include?(opts[:'status'])
379
+ fail ArgumentError, 'invalid value for "status", must be one of SENT, FAILED'
380
+ end
381
+ # resource path
382
+ local_var_path = "/v1/{location_id}/settlements".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
383
+
384
+ # query parameters
385
+ query_params = {}
386
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
387
+ query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil?
388
+ query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
389
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
390
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
391
+
392
+ # header parameters
393
+ header_params = {}
394
+ # HTTP header 'Accept' (if needed)
395
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
396
+ # HTTP header 'Content-Type'
397
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
398
+
399
+ # form parameters
400
+ form_params = {}
401
+
402
+ # http body (model)
403
+ post_body = nil
404
+ auth_names = ['oauth2']
405
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
406
+ :header_params => header_params,
407
+ :query_params => query_params,
408
+ :form_params => form_params,
409
+ :body => post_body,
410
+ :auth_names => auth_names,
411
+ :return_type => 'Array<V1Settlement>')
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug "API called: V1TransactionsApi#list_settlements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
414
+ end
415
+ return data, status_code, headers
416
+ end
417
+
418
+ # 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.
419
+ # 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.
420
+ # @param location_id The ID of the bank account&#39;s associated location.
421
+ # @param bank_account_id The bank account&#39;s Square-issued ID. You obtain this value from Settlement objects returned.
422
+ # @param [Hash] opts the optional parameters
423
+ # @return [V1BankAccount]
424
+ def retrieve_bank_account(location_id, bank_account_id, opts = {})
425
+ data, _status_code, _headers = retrieve_bank_account_with_http_info(location_id, bank_account_id, opts)
426
+ return data
427
+ end
428
+
429
+ # Provides non-confidential details for a merchant&#39;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.
430
+ # Provides non-confidential details for a merchant&#39;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.
431
+ # @param location_id The ID of the bank account&#39;s associated location.
432
+ # @param bank_account_id The bank account&#39;s Square-issued ID. You obtain this value from Settlement objects returned.
433
+ # @param [Hash] opts the optional parameters
434
+ # @return [Array<(V1BankAccount, Fixnum, Hash)>] V1BankAccount data, response status code and response headers
435
+ def retrieve_bank_account_with_http_info(location_id, bank_account_id, opts = {})
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug "Calling API: V1TransactionsApi.retrieve_bank_account ..."
438
+ end
439
+ # verify the required parameter 'location_id' is set
440
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.retrieve_bank_account" if location_id.nil?
441
+ # verify the required parameter 'bank_account_id' is set
442
+ fail ArgumentError, "Missing the required parameter 'bank_account_id' when calling V1TransactionsApi.retrieve_bank_account" if bank_account_id.nil?
443
+ # resource path
444
+ local_var_path = "/v1/{location_id}/bank-accounts/{bank_account_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'bank_account_id' + '}', bank_account_id.to_s)
445
+
446
+ # query parameters
447
+ query_params = {}
448
+
449
+ # header parameters
450
+ header_params = {}
451
+ # HTTP header 'Accept' (if needed)
452
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
453
+ # HTTP header 'Content-Type'
454
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
455
+
456
+ # form parameters
457
+ form_params = {}
458
+
459
+ # http body (model)
460
+ post_body = nil
461
+ auth_names = ['oauth2']
462
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
463
+ :header_params => header_params,
464
+ :query_params => query_params,
465
+ :form_params => form_params,
466
+ :body => post_body,
467
+ :auth_names => auth_names,
468
+ :return_type => 'V1BankAccount')
469
+ if @api_client.config.debugging
470
+ @api_client.config.logger.debug "API called: V1TransactionsApi#retrieve_bank_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
471
+ end
472
+ return data, status_code, headers
473
+ end
474
+
475
+ # Provides comprehensive information for a single online store order, including the order's history.
476
+ # Provides comprehensive information for a single online store order, including the order's history.
477
+ # @param location_id The ID of the order&#39;s associated location.
478
+ # @param order_id The order&#39;s Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint
479
+ # @param [Hash] opts the optional parameters
480
+ # @return [V1Order]
481
+ def retrieve_order(location_id, order_id, opts = {})
482
+ data, _status_code, _headers = retrieve_order_with_http_info(location_id, order_id, opts)
483
+ return data
484
+ end
485
+
486
+ # Provides comprehensive information for a single online store order, including the order&#39;s history.
487
+ # Provides comprehensive information for a single online store order, including the order&#39;s history.
488
+ # @param location_id The ID of the order&#39;s associated location.
489
+ # @param order_id The order&#39;s Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint
490
+ # @param [Hash] opts the optional parameters
491
+ # @return [Array<(V1Order, Fixnum, Hash)>] V1Order data, response status code and response headers
492
+ def retrieve_order_with_http_info(location_id, order_id, opts = {})
493
+ if @api_client.config.debugging
494
+ @api_client.config.logger.debug "Calling API: V1TransactionsApi.retrieve_order ..."
495
+ end
496
+ # verify the required parameter 'location_id' is set
497
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.retrieve_order" if location_id.nil?
498
+ # verify the required parameter 'order_id' is set
499
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling V1TransactionsApi.retrieve_order" if order_id.nil?
500
+ # resource path
501
+ local_var_path = "/v1/{location_id}/orders/{order_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
502
+
503
+ # query parameters
504
+ query_params = {}
505
+
506
+ # header parameters
507
+ header_params = {}
508
+ # HTTP header 'Accept' (if needed)
509
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
510
+ # HTTP header 'Content-Type'
511
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
512
+
513
+ # form parameters
514
+ form_params = {}
515
+
516
+ # http body (model)
517
+ post_body = nil
518
+ auth_names = ['oauth2']
519
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
520
+ :header_params => header_params,
521
+ :query_params => query_params,
522
+ :form_params => form_params,
523
+ :body => post_body,
524
+ :auth_names => auth_names,
525
+ :return_type => 'V1Order')
526
+ if @api_client.config.debugging
527
+ @api_client.config.logger.debug "API called: V1TransactionsApi#retrieve_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
528
+ end
529
+ return data, status_code, headers
530
+ end
531
+
532
+ # Provides comprehensive information for a single payment.
533
+ # Provides comprehensive information for a single payment.
534
+ # @param location_id The ID of the payment&#39;s associated location.
535
+ # @param payment_id The payment&#39;s Square-issued ID. You obtain this value from Payment objects returned by the List Payments endpoint, or Settlement objects returned by the List Settlements endpoint.
536
+ # @param [Hash] opts the optional parameters
537
+ # @return [V1Payment]
538
+ def retrieve_payment(location_id, payment_id, opts = {})
539
+ data, _status_code, _headers = retrieve_payment_with_http_info(location_id, payment_id, opts)
540
+ return data
541
+ end
542
+
543
+ # Provides comprehensive information for a single payment.
544
+ # Provides comprehensive information for a single payment.
545
+ # @param location_id The ID of the payment&#39;s associated location.
546
+ # @param payment_id The payment&#39;s Square-issued ID. You obtain this value from Payment objects returned by the List Payments endpoint, or Settlement objects returned by the List Settlements endpoint.
547
+ # @param [Hash] opts the optional parameters
548
+ # @return [Array<(V1Payment, Fixnum, Hash)>] V1Payment data, response status code and response headers
549
+ def retrieve_payment_with_http_info(location_id, payment_id, opts = {})
550
+ if @api_client.config.debugging
551
+ @api_client.config.logger.debug "Calling API: V1TransactionsApi.retrieve_payment ..."
552
+ end
553
+ # verify the required parameter 'location_id' is set
554
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.retrieve_payment" if location_id.nil?
555
+ # verify the required parameter 'payment_id' is set
556
+ fail ArgumentError, "Missing the required parameter 'payment_id' when calling V1TransactionsApi.retrieve_payment" if payment_id.nil?
557
+ # resource path
558
+ local_var_path = "/v1/{location_id}/payments/{payment_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'payment_id' + '}', payment_id.to_s)
559
+
560
+ # query parameters
561
+ query_params = {}
562
+
563
+ # header parameters
564
+ header_params = {}
565
+ # HTTP header 'Accept' (if needed)
566
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
567
+ # HTTP header 'Content-Type'
568
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
569
+
570
+ # form parameters
571
+ form_params = {}
572
+
573
+ # http body (model)
574
+ post_body = nil
575
+ auth_names = ['oauth2']
576
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
577
+ :header_params => header_params,
578
+ :query_params => query_params,
579
+ :form_params => form_params,
580
+ :body => post_body,
581
+ :auth_names => auth_names,
582
+ :return_type => 'V1Payment')
583
+ if @api_client.config.debugging
584
+ @api_client.config.logger.debug "API called: V1TransactionsApi#retrieve_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
585
+ end
586
+ return data, status_code, headers
587
+ end
588
+
589
+ # Provides comprehensive information for a single settlement, including the entries that contribute to the settlement's total.
590
+ # Provides comprehensive information for a single settlement, including the entries that contribute to the settlement's total.
591
+ # @param location_id The ID of the settlements&#39;s associated location.
592
+ # @param settlement_id The settlement&#39;s Square-issued ID. You obtain this value from Settlement objects returned by the List Settlements endpoint.
593
+ # @param [Hash] opts the optional parameters
594
+ # @return [V1Settlement]
595
+ def retrieve_settlement(location_id, settlement_id, opts = {})
596
+ data, _status_code, _headers = retrieve_settlement_with_http_info(location_id, settlement_id, opts)
597
+ return data
598
+ end
599
+
600
+ # Provides comprehensive information for a single settlement, including the entries that contribute to the settlement&#39;s total.
601
+ # Provides comprehensive information for a single settlement, including the entries that contribute to the settlement&#39;s total.
602
+ # @param location_id The ID of the settlements&#39;s associated location.
603
+ # @param settlement_id The settlement&#39;s Square-issued ID. You obtain this value from Settlement objects returned by the List Settlements endpoint.
604
+ # @param [Hash] opts the optional parameters
605
+ # @return [Array<(V1Settlement, Fixnum, Hash)>] V1Settlement data, response status code and response headers
606
+ def retrieve_settlement_with_http_info(location_id, settlement_id, opts = {})
607
+ if @api_client.config.debugging
608
+ @api_client.config.logger.debug "Calling API: V1TransactionsApi.retrieve_settlement ..."
609
+ end
610
+ # verify the required parameter 'location_id' is set
611
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.retrieve_settlement" if location_id.nil?
612
+ # verify the required parameter 'settlement_id' is set
613
+ fail ArgumentError, "Missing the required parameter 'settlement_id' when calling V1TransactionsApi.retrieve_settlement" if settlement_id.nil?
614
+ # resource path
615
+ local_var_path = "/v1/{location_id}/settlements/{settlement_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'settlement_id' + '}', settlement_id.to_s)
616
+
617
+ # query parameters
618
+ query_params = {}
619
+
620
+ # header parameters
621
+ header_params = {}
622
+ # HTTP header 'Accept' (if needed)
623
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
624
+ # HTTP header 'Content-Type'
625
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
626
+
627
+ # form parameters
628
+ form_params = {}
629
+
630
+ # http body (model)
631
+ post_body = nil
632
+ auth_names = ['oauth2']
633
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
634
+ :header_params => header_params,
635
+ :query_params => query_params,
636
+ :form_params => form_params,
637
+ :body => post_body,
638
+ :auth_names => auth_names,
639
+ :return_type => 'V1Settlement')
640
+ if @api_client.config.debugging
641
+ @api_client.config.logger.debug "API called: V1TransactionsApi#retrieve_settlement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
642
+ end
643
+ return data, status_code, headers
644
+ end
645
+
646
+ # Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions:
647
+ # Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions:
648
+ # @param location_id The ID of the order&#39;s associated location.
649
+ # @param order_id The order&#39;s Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint
650
+ # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
651
+ # @param [Hash] opts the optional parameters
652
+ # @return [V1Order]
653
+ def update_order(location_id, order_id, body, opts = {})
654
+ data, _status_code, _headers = update_order_with_http_info(location_id, order_id, body, opts)
655
+ return data
656
+ end
657
+
658
+ # Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions:
659
+ # Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions:
660
+ # @param location_id The ID of the order&#39;s associated location.
661
+ # @param order_id The order&#39;s Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint
662
+ # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
663
+ # @param [Hash] opts the optional parameters
664
+ # @return [Array<(V1Order, Fixnum, Hash)>] V1Order data, response status code and response headers
665
+ def update_order_with_http_info(location_id, order_id, body, opts = {})
666
+ if @api_client.config.debugging
667
+ @api_client.config.logger.debug "Calling API: V1TransactionsApi.update_order ..."
668
+ end
669
+ # verify the required parameter 'location_id' is set
670
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.update_order" if location_id.nil?
671
+ # verify the required parameter 'order_id' is set
672
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling V1TransactionsApi.update_order" if order_id.nil?
673
+ # verify the required parameter 'body' is set
674
+ fail ArgumentError, "Missing the required parameter 'body' when calling V1TransactionsApi.update_order" if body.nil?
675
+ # resource path
676
+ local_var_path = "/v1/{location_id}/orders/{order_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'order_id' + '}', order_id.to_s)
677
+
678
+ # query parameters
679
+ query_params = {}
680
+
681
+ # header parameters
682
+ header_params = {}
683
+ # HTTP header 'Accept' (if needed)
684
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
685
+ # HTTP header 'Content-Type'
686
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
687
+
688
+ # form parameters
689
+ form_params = {}
690
+
691
+ # http body (model)
692
+ post_body = @api_client.object_to_http_body(body)
693
+ auth_names = ['oauth2']
694
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
695
+ :header_params => header_params,
696
+ :query_params => query_params,
697
+ :form_params => form_params,
698
+ :body => post_body,
699
+ :auth_names => auth_names,
700
+ :return_type => 'V1Order')
701
+ if @api_client.config.debugging
702
+ @api_client.config.logger.debug "API called: V1TransactionsApi#update_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
703
+ end
704
+ return data, status_code, headers
705
+ end
706
+ end
707
+ end