Class: SquareConnect::V1TransactionsApi
- Inherits:
-
Object
- Object
- SquareConnect::V1TransactionsApi
- Defined in:
- lib/square_connect/api/v1_transactions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_refund(location_id, body, opts = {}) ⇒ V1Refund
Issues a refund for a previously processed payment.
-
#create_refund_with_http_info(location_id, body, opts = {}) ⇒ Array<(V1Refund, Fixnum, Hash)>
Issues a refund for a previously processed payment.
-
#initialize(api_client = ApiClient.default) ⇒ V1TransactionsApi
constructor
A new instance of V1TransactionsApi.
-
#list_bank_accounts(location_id, opts = {}) ⇒ Array<V1BankAccount>
Provides non-confidential details for all of a location’s associated bank accounts.
-
#list_bank_accounts_with_http_info(location_id, opts = {}) ⇒ Array<(Array<V1BankAccount>, Fixnum, Hash)>
Provides non-confidential details for all of a location's associated bank accounts.
-
#list_orders(location_id, opts = {}) ⇒ Array<V1Order>
Provides summary information for a merchant’s online store orders.
-
#list_orders_with_http_info(location_id, opts = {}) ⇒ Array<(Array<V1Order>, Fixnum, Hash)>
Provides summary information for a merchant's online store orders.
-
#list_payments(location_id, opts = {}) ⇒ Array<V1Payment>
Provides summary information for all payments taken by a merchant or any of the merchant’s mobile staff during a date range.
-
#list_payments_with_http_info(location_id, opts = {}) ⇒ Array<(Array<V1Payment>, Fixnum, Hash)>
Provides summary information for all payments taken by a merchant or any of the merchant's mobile staff during a date range.
-
#list_refunds(location_id, opts = {}) ⇒ Array<V1Refund>
Provides the details for all refunds initiated by a merchant or any of the merchant’s mobile staff during a date range.
-
#list_refunds_with_http_info(location_id, opts = {}) ⇒ Array<(Array<V1Refund>, Fixnum, Hash)>
Provides the details for all refunds initiated by a merchant or any of the merchant's mobile staff during a date range.
-
#list_settlements(location_id, opts = {}) ⇒ Array<V1Settlement>
Provides summary information for all deposits and withdrawals initiated by Square to a merchant’s bank account during a date range.
-
#list_settlements_with_http_info(location_id, opts = {}) ⇒ Array<(Array<V1Settlement>, Fixnum, Hash)>
Provides summary information for all deposits and withdrawals initiated by Square to a merchant's bank account during a date range.
-
#retrieve_bank_account(location_id, bank_account_id, opts = {}) ⇒ V1BankAccount
Provides non-confidential details for a merchant’s associated bank account.
-
#retrieve_bank_account_with_http_info(location_id, bank_account_id, opts = {}) ⇒ Array<(V1BankAccount, Fixnum, Hash)>
Provides non-confidential details for a merchant's associated bank account.
-
#retrieve_order(location_id, order_id, opts = {}) ⇒ V1Order
Provides comprehensive information for a single online store order, including the order’s history.
-
#retrieve_order_with_http_info(location_id, order_id, opts = {}) ⇒ Array<(V1Order, Fixnum, Hash)>
Provides comprehensive information for a single online store order, including the order's history.
-
#retrieve_payment(location_id, payment_id, opts = {}) ⇒ V1Payment
Provides comprehensive information for a single payment.
-
#retrieve_payment_with_http_info(location_id, payment_id, opts = {}) ⇒ Array<(V1Payment, Fixnum, Hash)>
Provides comprehensive information for a single payment.
-
#retrieve_settlement(location_id, settlement_id, opts = {}) ⇒ V1Settlement
Provides comprehensive information for a single settlement, including the entries that contribute to the settlement’s total.
-
#retrieve_settlement_with_http_info(location_id, settlement_id, opts = {}) ⇒ Array<(V1Settlement, Fixnum, Hash)>
Provides comprehensive information for a single settlement, including the entries that contribute to the settlement's total.
-
#update_order(location_id, order_id, body, opts = {}) ⇒ V1Order
Updates the details of an online store order.
-
#update_order_with_http_info(location_id, order_id, body, opts = {}) ⇒ Array<(V1Order, Fixnum, Hash)>
Updates the details of an online store order.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ V1TransactionsApi
Returns a new instance of V1TransactionsApi.
16 17 18 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#create_refund(location_id, body, opts = {}) ⇒ V1Refund
Issues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment. Issues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment.
26 27 28 29 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 26 def create_refund(location_id, body, opts = {}) data, _status_code, _headers = create_refund_with_http_info(location_id, body, opts) return data end |
#create_refund_with_http_info(location_id, body, opts = {}) ⇒ Array<(V1Refund, Fixnum, Hash)>
Issues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment. Issues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 37 def create_refund_with_http_info(location_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: V1TransactionsApi.create_refund ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.create_refund" if location_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling V1TransactionsApi.create_refund" if body.nil? # resource path local_var_path = "/v1/{location_id}/refunds".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'V1Refund') if @api_client.config.debugging @api_client.config.logger.debug "API called: V1TransactionsApi#create_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_bank_accounts(location_id, opts = {}) ⇒ Array<V1BankAccount>
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. 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.
82 83 84 85 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 82 def list_bank_accounts(location_id, opts = {}) data, _status_code, _headers = list_bank_accounts_with_http_info(location_id, opts) return data end |
#list_bank_accounts_with_http_info(location_id, opts = {}) ⇒ Array<(Array<V1BankAccount>, Fixnum, Hash)>
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. 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.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 92 def list_bank_accounts_with_http_info(location_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: V1TransactionsApi.list_bank_accounts ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_bank_accounts" if location_id.nil? # resource path local_var_path = "/v1/{location_id}/bank-accounts".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<V1BankAccount>') if @api_client.config.debugging @api_client.config.logger.debug "API called: V1TransactionsApi#list_bank_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_orders(location_id, opts = {}) ⇒ Array<V1Order>
Provides summary information for a merchant’s online store orders. Provides summary information for a merchant’s online store orders.
138 139 140 141 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 138 def list_orders(location_id, opts = {}) data, _status_code, _headers = list_orders_with_http_info(location_id, opts) return data end |
#list_orders_with_http_info(location_id, opts = {}) ⇒ Array<(Array<V1Order>, Fixnum, Hash)>
Provides summary information for a merchant's online store orders. Provides summary information for a merchant's online store orders.
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 151 def list_orders_with_http_info(location_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: V1TransactionsApi.list_orders ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_orders" if location_id.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end if !opts[:'limit'].nil? && opts[:'limit'] > 200 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1TransactionsApi.list_orders, must be smaller than or equal to 200.' end # resource path local_var_path = "/v1/{location_id}/orders".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s) # query parameters query_params = {} query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<V1Order>') if @api_client.config.debugging @api_client.config.logger.debug "API called: V1TransactionsApi#list_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_payments(location_id, opts = {}) ⇒ Array<V1Payment>
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. 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.
209 210 211 212 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 209 def list_payments(location_id, opts = {}) data, _status_code, _headers = list_payments_with_http_info(location_id, opts) return data end |
#list_payments_with_http_info(location_id, opts = {}) ⇒ Array<(Array<V1Payment>, Fixnum, Hash)>
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. 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.
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 224 def list_payments_with_http_info(location_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: V1TransactionsApi.list_payments ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_payments" if location_id.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end if !opts[:'limit'].nil? && opts[:'limit'] > 200 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1TransactionsApi.list_payments, must be smaller than or equal to 200.' end # resource path local_var_path = "/v1/{location_id}/payments".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s) # query parameters query_params = {} query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<V1Payment>') if @api_client.config.debugging @api_client.config.logger.debug "API called: V1TransactionsApi#list_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_refunds(location_id, opts = {}) ⇒ Array<V1Refund>
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. 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.
284 285 286 287 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 284 def list_refunds(location_id, opts = {}) data, _status_code, _headers = list_refunds_with_http_info(location_id, opts) return data end |
#list_refunds_with_http_info(location_id, opts = {}) ⇒ Array<(Array<V1Refund>, Fixnum, Hash)>
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. 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.
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 299 def list_refunds_with_http_info(location_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: V1TransactionsApi.list_refunds ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_refunds" if location_id.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end if !opts[:'limit'].nil? && opts[:'limit'] > 200 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1TransactionsApi.list_refunds, must be smaller than or equal to 200.' end # resource path local_var_path = "/v1/{location_id}/refunds".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s) # query parameters query_params = {} query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<V1Refund>') if @api_client.config.debugging @api_client.config.logger.debug "API called: V1TransactionsApi#list_refunds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_settlements(location_id, opts = {}) ⇒ Array<V1Settlement>
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. 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.
360 361 362 363 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 360 def list_settlements(location_id, opts = {}) data, _status_code, _headers = list_settlements_with_http_info(location_id, opts) return data end |
#list_settlements_with_http_info(location_id, opts = {}) ⇒ Array<(Array<V1Settlement>, Fixnum, Hash)>
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. 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.
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 376 def list_settlements_with_http_info(location_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: V1TransactionsApi.list_settlements ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.list_settlements" if location_id.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end if !opts[:'limit'].nil? && opts[:'limit'] > 200 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1TransactionsApi.list_settlements, must be smaller than or equal to 200.' end if opts[:'status'] && !['SENT', 'FAILED'].include?(opts[:'status']) fail ArgumentError, 'invalid value for "status", must be one of SENT, FAILED' end # resource path local_var_path = "/v1/{location_id}/settlements".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s) # query parameters query_params = {} query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<V1Settlement>') if @api_client.config.debugging @api_client.config.logger.debug "API called: V1TransactionsApi#list_settlements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_bank_account(location_id, bank_account_id, opts = {}) ⇒ V1BankAccount
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. 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.
436 437 438 439 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 436 def retrieve_bank_account(location_id, bank_account_id, opts = {}) data, _status_code, _headers = retrieve_bank_account_with_http_info(location_id, bank_account_id, opts) return data end |
#retrieve_bank_account_with_http_info(location_id, bank_account_id, opts = {}) ⇒ Array<(V1BankAccount, Fixnum, Hash)>
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. 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.
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 447 def retrieve_bank_account_with_http_info(location_id, bank_account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: V1TransactionsApi.retrieve_bank_account ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.retrieve_bank_account" if location_id.nil? # verify the required parameter 'bank_account_id' is set fail ArgumentError, "Missing the required parameter 'bank_account_id' when calling V1TransactionsApi.retrieve_bank_account" if bank_account_id.nil? # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'V1BankAccount') if @api_client.config.debugging @api_client.config.logger.debug "API called: V1TransactionsApi#retrieve_bank_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_order(location_id, order_id, opts = {}) ⇒ V1Order
Provides comprehensive information for a single online store order, including the order’s history. Provides comprehensive information for a single online store order, including the order’s history.
493 494 495 496 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 493 def retrieve_order(location_id, order_id, opts = {}) data, _status_code, _headers = retrieve_order_with_http_info(location_id, order_id, opts) return data end |
#retrieve_order_with_http_info(location_id, order_id, opts = {}) ⇒ Array<(V1Order, Fixnum, Hash)>
Provides comprehensive information for a single online store order, including the order's history. Provides comprehensive information for a single online store order, including the order's history.
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 504 def retrieve_order_with_http_info(location_id, order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: V1TransactionsApi.retrieve_order ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.retrieve_order" if location_id.nil? # verify the required parameter 'order_id' is set fail ArgumentError, "Missing the required parameter 'order_id' when calling V1TransactionsApi.retrieve_order" if order_id.nil? # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'V1Order') if @api_client.config.debugging @api_client.config.logger.debug "API called: V1TransactionsApi#retrieve_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_payment(location_id, payment_id, opts = {}) ⇒ V1Payment
Provides comprehensive information for a single payment. Provides comprehensive information for a single payment.
550 551 552 553 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 550 def retrieve_payment(location_id, payment_id, opts = {}) data, _status_code, _headers = retrieve_payment_with_http_info(location_id, payment_id, opts) return data end |
#retrieve_payment_with_http_info(location_id, payment_id, opts = {}) ⇒ Array<(V1Payment, Fixnum, Hash)>
Provides comprehensive information for a single payment. Provides comprehensive information for a single payment.
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 561 def retrieve_payment_with_http_info(location_id, payment_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: V1TransactionsApi.retrieve_payment ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.retrieve_payment" if location_id.nil? # verify the required parameter 'payment_id' is set fail ArgumentError, "Missing the required parameter 'payment_id' when calling V1TransactionsApi.retrieve_payment" if payment_id.nil? # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'V1Payment') if @api_client.config.debugging @api_client.config.logger.debug "API called: V1TransactionsApi#retrieve_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_settlement(location_id, settlement_id, opts = {}) ⇒ V1Settlement
Provides comprehensive information for a single settlement, including the entries that contribute to the settlement’s total. Provides comprehensive information for a single settlement, including the entries that contribute to the settlement’s total.
607 608 609 610 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 607 def retrieve_settlement(location_id, settlement_id, opts = {}) data, _status_code, _headers = retrieve_settlement_with_http_info(location_id, settlement_id, opts) return data end |
#retrieve_settlement_with_http_info(location_id, settlement_id, opts = {}) ⇒ Array<(V1Settlement, Fixnum, Hash)>
Provides comprehensive information for a single settlement, including the entries that contribute to the settlement's total. Provides comprehensive information for a single settlement, including the entries that contribute to the settlement's total.
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 618 def retrieve_settlement_with_http_info(location_id, settlement_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: V1TransactionsApi.retrieve_settlement ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.retrieve_settlement" if location_id.nil? # verify the required parameter 'settlement_id' is set fail ArgumentError, "Missing the required parameter 'settlement_id' when calling V1TransactionsApi.retrieve_settlement" if settlement_id.nil? # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'V1Settlement') if @api_client.config.debugging @api_client.config.logger.debug "API called: V1TransactionsApi#retrieve_settlement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_order(location_id, order_id, body, opts = {}) ⇒ V1Order
Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions: Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions:
665 666 667 668 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 665 def update_order(location_id, order_id, body, opts = {}) data, _status_code, _headers = update_order_with_http_info(location_id, order_id, body, opts) return data end |
#update_order_with_http_info(location_id, order_id, body, opts = {}) ⇒ Array<(V1Order, Fixnum, Hash)>
Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions: Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions:
677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 |
# File 'lib/square_connect/api/v1_transactions_api.rb', line 677 def update_order_with_http_info(location_id, order_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: V1TransactionsApi.update_order ..." end # verify the required parameter 'location_id' is set fail ArgumentError, "Missing the required parameter 'location_id' when calling V1TransactionsApi.update_order" if location_id.nil? # verify the required parameter 'order_id' is set fail ArgumentError, "Missing the required parameter 'order_id' when calling V1TransactionsApi.update_order" if order_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling V1TransactionsApi.update_order" if body.nil? # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'V1Order') if @api_client.config.debugging @api_client.config.logger.debug "API called: V1TransactionsApi#update_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |