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
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
10
10
  require "uri"
11
11
 
12
12
  module SquareConnect
13
- class LocationApi
13
+ class LocationsApi
14
14
  attr_accessor :api_client
15
15
 
16
16
  def initialize(api_client = ApiClient.default)
@@ -19,25 +19,21 @@ module SquareConnect
19
19
 
20
20
  # ListLocations
21
21
  # Provides the details for all of a business's locations. Most other Connect API endpoints have a required `location_id` path parameter. The `id` field of the [`Location`](#type-location) objects returned by this endpoint correspond to that `location_id` parameter.
22
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format `Bearer YOUR_ACCESS_TOKEN_HERE`.
23
22
  # @param [Hash] opts the optional parameters
24
23
  # @return [ListLocationsResponse]
25
- def list_locations(authorization, opts = {})
26
- data, _status_code, _headers = list_locations_with_http_info(authorization, opts)
24
+ def list_locations(opts = {})
25
+ data, _status_code, _headers = list_locations_with_http_info(opts)
27
26
  return data
28
27
  end
29
28
 
30
29
  # ListLocations
31
30
  # Provides the details for all of a business's locations. Most other Connect API endpoints have a required `location_id` path parameter. The `id` field of the [`Location`](#type-location) objects returned by this endpoint correspond to that `location_id` parameter.
32
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format `Bearer YOUR_ACCESS_TOKEN_HERE`.
33
31
  # @param [Hash] opts the optional parameters
34
32
  # @return [Array<(ListLocationsResponse, Fixnum, Hash)>] ListLocationsResponse data, response status code and response headers
35
- def list_locations_with_http_info(authorization, opts = {})
33
+ def list_locations_with_http_info(opts = {})
36
34
  if @api_client.config.debugging
37
- @api_client.config.logger.debug "Calling API: LocationApi.list_locations ..."
35
+ @api_client.config.logger.debug "Calling API: LocationsApi.list_locations ..."
38
36
  end
39
- # verify the required parameter 'authorization' is set
40
- fail ArgumentError, "Missing the required parameter 'authorization' when calling LocationApi.list_locations" if authorization.nil?
41
37
  # resource path
42
38
  local_var_path = "/v2/locations".sub('{format}','json')
43
39
 
@@ -50,14 +46,13 @@ module SquareConnect
50
46
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
47
  # HTTP header 'Content-Type'
52
48
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
53
- header_params[:'Authorization'] = authorization
54
49
 
55
50
  # form parameters
56
51
  form_params = {}
57
52
 
58
53
  # http body (model)
59
54
  post_body = nil
60
- auth_names = []
55
+ auth_names = ['oauth2']
61
56
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
62
57
  :header_params => header_params,
63
58
  :query_params => query_params,
@@ -66,7 +61,7 @@ module SquareConnect
66
61
  :auth_names => auth_names,
67
62
  :return_type => 'ListLocationsResponse')
68
63
  if @api_client.config.debugging
69
- @api_client.config.logger.debug "API called: LocationApi#list_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
64
+ @api_client.config.logger.debug "API called: LocationsApi#list_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
65
  end
71
66
  return data, status_code, headers
72
67
  end
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
10
10
  require "uri"
11
11
 
12
12
  module SquareConnect
13
- class TransactionApi
13
+ class TransactionsApi
14
14
  attr_accessor :api_client
15
15
 
16
16
  def initialize(api_client = ApiClient.default)
@@ -19,33 +19,29 @@ module SquareConnect
19
19
 
20
20
  # CaptureTransaction
21
21
  # Captures a transaction that was created with the [Charge](#endpoint-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/articles/delayed-capture-transactions/) for more information.
22
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format &#x60;Bearer YOUR_ACCESS_TOKEN_HERE&#x60;.
23
22
  # @param location_id
24
23
  # @param transaction_id
25
24
  # @param [Hash] opts the optional parameters
26
25
  # @return [CaptureTransactionResponse]
27
- def capture_transaction(authorization, location_id, transaction_id, opts = {})
28
- data, _status_code, _headers = capture_transaction_with_http_info(authorization, location_id, transaction_id, opts)
26
+ def capture_transaction(location_id, transaction_id, opts = {})
27
+ data, _status_code, _headers = capture_transaction_with_http_info(location_id, transaction_id, opts)
29
28
  return data
30
29
  end
31
30
 
32
31
  # CaptureTransaction
33
32
  # Captures a transaction that was created with the [Charge](#endpoint-charge) endpoint with a &#x60;delay_capture&#x60; value of &#x60;true&#x60;. See [Delayed capture transactions](/articles/delayed-capture-transactions/) for more information.
34
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format &#x60;Bearer YOUR_ACCESS_TOKEN_HERE&#x60;.
35
33
  # @param location_id
36
34
  # @param transaction_id
37
35
  # @param [Hash] opts the optional parameters
38
36
  # @return [Array<(CaptureTransactionResponse, Fixnum, Hash)>] CaptureTransactionResponse data, response status code and response headers
39
- def capture_transaction_with_http_info(authorization, location_id, transaction_id, opts = {})
37
+ def capture_transaction_with_http_info(location_id, transaction_id, opts = {})
40
38
  if @api_client.config.debugging
41
- @api_client.config.logger.debug "Calling API: TransactionApi.capture_transaction ..."
39
+ @api_client.config.logger.debug "Calling API: TransactionsApi.capture_transaction ..."
42
40
  end
43
- # verify the required parameter 'authorization' is set
44
- fail ArgumentError, "Missing the required parameter 'authorization' when calling TransactionApi.capture_transaction" if authorization.nil?
45
41
  # verify the required parameter 'location_id' is set
46
- fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionApi.capture_transaction" if location_id.nil?
42
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionsApi.capture_transaction" if location_id.nil?
47
43
  # verify the required parameter 'transaction_id' is set
48
- fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionApi.capture_transaction" if transaction_id.nil?
44
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionsApi.capture_transaction" if transaction_id.nil?
49
45
  # resource path
50
46
  local_var_path = "/v2/locations/{location_id}/transactions/{transaction_id}/capture".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'transaction_id' + '}', transaction_id.to_s)
51
47
 
@@ -58,14 +54,13 @@ module SquareConnect
58
54
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
55
  # HTTP header 'Content-Type'
60
56
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
61
- header_params[:'Authorization'] = authorization
62
57
 
63
58
  # form parameters
64
59
  form_params = {}
65
60
 
66
61
  # http body (model)
67
62
  post_body = nil
68
- auth_names = []
63
+ auth_names = ['oauth2']
69
64
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
70
65
  :header_params => header_params,
71
66
  :query_params => query_params,
@@ -74,40 +69,36 @@ module SquareConnect
74
69
  :auth_names => auth_names,
75
70
  :return_type => 'CaptureTransactionResponse')
76
71
  if @api_client.config.debugging
77
- @api_client.config.logger.debug "API called: TransactionApi#capture_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
72
+ @api_client.config.logger.debug "API called: TransactionsApi#capture_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
73
  end
79
74
  return data, status_code, headers
80
75
  end
81
76
 
82
77
  # Charge
83
78
  # Charges a card represented by a card nonce or a customer's card on file. Your request to this endpoint must include _either_: - A value for the `card_nonce` parameter (to charge a card nonce generated with the `SqPaymentForm`) - Values for the `customer_card_id` and `customer_id` parameters (to charge a customer's card on file) In order for an e-commerce payment to potentially qualify for [Square chargeback protection](https://squareup.com/help/article/5394), you _must_ provide values for the following parameters in your request: - `buyer_email_address` - At least one of `billing_address` or `shipping_address` When this response is returned, the amount of Square's processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-retrievetransaction). See the `processing_fee_money` field of each [Tender included](#type-tender) in the transaction.
84
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format &#x60;Bearer YOUR_ACCESS_TOKEN_HERE&#x60;.
85
79
  # @param location_id The ID of the location to associate the created transaction with.
86
80
  # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
87
81
  # @param [Hash] opts the optional parameters
88
82
  # @return [ChargeResponse]
89
- def charge(authorization, location_id, body, opts = {})
90
- data, _status_code, _headers = charge_with_http_info(authorization, location_id, body, opts)
83
+ def charge(location_id, body, opts = {})
84
+ data, _status_code, _headers = charge_with_http_info(location_id, body, opts)
91
85
  return data
92
86
  end
93
87
 
94
88
  # Charge
95
89
  # Charges a card represented by a card nonce or a customer&#39;s card on file. Your request to this endpoint must include _either_: - A value for the &#x60;card_nonce&#x60; parameter (to charge a card nonce generated with the &#x60;SqPaymentForm&#x60;) - Values for the &#x60;customer_card_id&#x60; and &#x60;customer_id&#x60; parameters (to charge a customer&#39;s card on file) In order for an e-commerce payment to potentially qualify for [Square chargeback protection](https://squareup.com/help/article/5394), you _must_ provide values for the following parameters in your request: - &#x60;buyer_email_address&#x60; - At least one of &#x60;billing_address&#x60; or &#x60;shipping_address&#x60; When this response is returned, the amount of Square&#39;s processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-retrievetransaction). See the &#x60;processing_fee_money&#x60; field of each [Tender included](#type-tender) in the transaction.
96
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format &#x60;Bearer YOUR_ACCESS_TOKEN_HERE&#x60;.
97
90
  # @param location_id The ID of the location to associate the created transaction with.
98
91
  # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
99
92
  # @param [Hash] opts the optional parameters
100
93
  # @return [Array<(ChargeResponse, Fixnum, Hash)>] ChargeResponse data, response status code and response headers
101
- def charge_with_http_info(authorization, location_id, body, opts = {})
94
+ def charge_with_http_info(location_id, body, opts = {})
102
95
  if @api_client.config.debugging
103
- @api_client.config.logger.debug "Calling API: TransactionApi.charge ..."
96
+ @api_client.config.logger.debug "Calling API: TransactionsApi.charge ..."
104
97
  end
105
- # verify the required parameter 'authorization' is set
106
- fail ArgumentError, "Missing the required parameter 'authorization' when calling TransactionApi.charge" if authorization.nil?
107
98
  # verify the required parameter 'location_id' is set
108
- fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionApi.charge" if location_id.nil?
99
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionsApi.charge" if location_id.nil?
109
100
  # verify the required parameter 'body' is set
110
- fail ArgumentError, "Missing the required parameter 'body' when calling TransactionApi.charge" if body.nil?
101
+ fail ArgumentError, "Missing the required parameter 'body' when calling TransactionsApi.charge" if body.nil?
111
102
  # resource path
112
103
  local_var_path = "/v2/locations/{location_id}/transactions".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
113
104
 
@@ -120,14 +111,13 @@ module SquareConnect
120
111
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
121
112
  # HTTP header 'Content-Type'
122
113
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
123
- header_params[:'Authorization'] = authorization
124
114
 
125
115
  # form parameters
126
116
  form_params = {}
127
117
 
128
118
  # http body (model)
129
119
  post_body = @api_client.object_to_http_body(body)
130
- auth_names = []
120
+ auth_names = ['oauth2']
131
121
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
132
122
  :header_params => header_params,
133
123
  :query_params => query_params,
@@ -136,14 +126,142 @@ module SquareConnect
136
126
  :auth_names => auth_names,
137
127
  :return_type => 'ChargeResponse')
138
128
  if @api_client.config.debugging
139
- @api_client.config.logger.debug "API called: TransactionApi#charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ @api_client.config.logger.debug "API called: TransactionsApi#charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
130
+ end
131
+ return data, status_code, headers
132
+ end
133
+
134
+ # CreateRefund
135
+ # Initiates a refund for a previously charged tender.
136
+ # @param location_id The ID of the original transaction&#39;s associated location.
137
+ # @param transaction_id The ID of the original transaction that includes the tender to refund.
138
+ # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
139
+ # @param [Hash] opts the optional parameters
140
+ # @return [CreateRefundResponse]
141
+ def create_refund(location_id, transaction_id, body, opts = {})
142
+ data, _status_code, _headers = create_refund_with_http_info(location_id, transaction_id, body, opts)
143
+ return data
144
+ end
145
+
146
+ # CreateRefund
147
+ # Initiates a refund for a previously charged tender.
148
+ # @param location_id The ID of the original transaction&#39;s associated location.
149
+ # @param transaction_id The ID of the original transaction that includes the tender to refund.
150
+ # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [Array<(CreateRefundResponse, Fixnum, Hash)>] CreateRefundResponse data, response status code and response headers
153
+ def create_refund_with_http_info(location_id, transaction_id, body, opts = {})
154
+ if @api_client.config.debugging
155
+ @api_client.config.logger.debug "Calling API: TransactionsApi.create_refund ..."
156
+ end
157
+ # verify the required parameter 'location_id' is set
158
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionsApi.create_refund" if location_id.nil?
159
+ # verify the required parameter 'transaction_id' is set
160
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionsApi.create_refund" if transaction_id.nil?
161
+ # verify the required parameter 'body' is set
162
+ fail ArgumentError, "Missing the required parameter 'body' when calling TransactionsApi.create_refund" if body.nil?
163
+ # resource path
164
+ local_var_path = "/v2/locations/{location_id}/transactions/{transaction_id}/refund".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'transaction_id' + '}', transaction_id.to_s)
165
+
166
+ # query parameters
167
+ query_params = {}
168
+
169
+ # header parameters
170
+ header_params = {}
171
+ # HTTP header 'Accept' (if needed)
172
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
173
+ # HTTP header 'Content-Type'
174
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
175
+
176
+ # form parameters
177
+ form_params = {}
178
+
179
+ # http body (model)
180
+ post_body = @api_client.object_to_http_body(body)
181
+ auth_names = ['oauth2']
182
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
183
+ :header_params => header_params,
184
+ :query_params => query_params,
185
+ :form_params => form_params,
186
+ :body => post_body,
187
+ :auth_names => auth_names,
188
+ :return_type => 'CreateRefundResponse')
189
+ if @api_client.config.debugging
190
+ @api_client.config.logger.debug "API called: TransactionsApi#create_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
191
+ end
192
+ return data, status_code, headers
193
+ end
194
+
195
+ # ListRefunds
196
+ # Lists refunds for one of a business's locations. Refunds with a `status` of `PENDING` are not currently included in this endpoint's response. Max results per [page](#paginatingresults): 50
197
+ # @param location_id The ID of the location to list refunds for.
198
+ # @param [Hash] opts the optional parameters
199
+ # @option opts [String] :begin_time The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
200
+ # @option opts [String] :end_time The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.
201
+ # @option opts [String] :sort_order The order in which results are listed in the response (&#x60;ASC&#x60; for oldest first, &#x60;DESC&#x60; for newest first). Default value: &#x60;DESC&#x60;
202
+ # @option opts [String] :cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information.
203
+ # @return [ListRefundsResponse]
204
+ def list_refunds(location_id, opts = {})
205
+ data, _status_code, _headers = list_refunds_with_http_info(location_id, opts)
206
+ return data
207
+ end
208
+
209
+ # ListRefunds
210
+ # Lists refunds for one of a business&#39;s locations. Refunds with a &#x60;status&#x60; of &#x60;PENDING&#x60; are not currently included in this endpoint&#39;s response. Max results per [page](#paginatingresults): 50
211
+ # @param location_id The ID of the location to list refunds for.
212
+ # @param [Hash] opts the optional parameters
213
+ # @option opts [String] :begin_time The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
214
+ # @option opts [String] :end_time The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.
215
+ # @option opts [String] :sort_order The order in which results are listed in the response (&#x60;ASC&#x60; for oldest first, &#x60;DESC&#x60; for newest first). Default value: &#x60;DESC&#x60;
216
+ # @option opts [String] :cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information.
217
+ # @return [Array<(ListRefundsResponse, Fixnum, Hash)>] ListRefundsResponse data, response status code and response headers
218
+ def list_refunds_with_http_info(location_id, opts = {})
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "Calling API: TransactionsApi.list_refunds ..."
221
+ end
222
+ # verify the required parameter 'location_id' is set
223
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionsApi.list_refunds" if location_id.nil?
224
+ if opts[:'sort_order'] && !['DESC', 'ASC'].include?(opts[:'sort_order'])
225
+ fail ArgumentError, 'invalid value for "sort_order", must be one of DESC, ASC'
226
+ end
227
+ # resource path
228
+ local_var_path = "/v2/locations/{location_id}/refunds".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
229
+
230
+ # query parameters
231
+ query_params = {}
232
+ query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil?
233
+ query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
234
+ query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
235
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
236
+
237
+ # header parameters
238
+ header_params = {}
239
+ # HTTP header 'Accept' (if needed)
240
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
241
+ # HTTP header 'Content-Type'
242
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
243
+
244
+ # form parameters
245
+ form_params = {}
246
+
247
+ # http body (model)
248
+ post_body = nil
249
+ auth_names = ['oauth2']
250
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
251
+ :header_params => header_params,
252
+ :query_params => query_params,
253
+ :form_params => form_params,
254
+ :body => post_body,
255
+ :auth_names => auth_names,
256
+ :return_type => 'ListRefundsResponse')
257
+ if @api_client.config.debugging
258
+ @api_client.config.logger.debug "API called: TransactionsApi#list_refunds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
259
  end
141
260
  return data, status_code, headers
142
261
  end
143
262
 
144
263
  # ListTransactions
145
264
  # Lists transactions for a particular location. Max results per [page](#paginatingresults): 50
146
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format &#x60;Bearer YOUR_ACCESS_TOKEN_HERE&#x60;.
147
265
  # @param location_id The ID of the location to list transactions for.
148
266
  # @param [Hash] opts the optional parameters
149
267
  # @option opts [String] :begin_time The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
@@ -151,14 +269,13 @@ module SquareConnect
151
269
  # @option opts [String] :sort_order The order in which results are listed in the response (&#x60;ASC&#x60; for oldest first, &#x60;DESC&#x60; for newest first). Default value: &#x60;DESC&#x60;
152
270
  # @option opts [String] :cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information.
153
271
  # @return [ListTransactionsResponse]
154
- def list_transactions(authorization, location_id, opts = {})
155
- data, _status_code, _headers = list_transactions_with_http_info(authorization, location_id, opts)
272
+ def list_transactions(location_id, opts = {})
273
+ data, _status_code, _headers = list_transactions_with_http_info(location_id, opts)
156
274
  return data
157
275
  end
158
276
 
159
277
  # ListTransactions
160
278
  # Lists transactions for a particular location. Max results per [page](#paginatingresults): 50
161
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format &#x60;Bearer YOUR_ACCESS_TOKEN_HERE&#x60;.
162
279
  # @param location_id The ID of the location to list transactions for.
163
280
  # @param [Hash] opts the optional parameters
164
281
  # @option opts [String] :begin_time The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
@@ -166,14 +283,12 @@ module SquareConnect
166
283
  # @option opts [String] :sort_order The order in which results are listed in the response (&#x60;ASC&#x60; for oldest first, &#x60;DESC&#x60; for newest first). Default value: &#x60;DESC&#x60;
167
284
  # @option opts [String] :cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information.
168
285
  # @return [Array<(ListTransactionsResponse, Fixnum, Hash)>] ListTransactionsResponse data, response status code and response headers
169
- def list_transactions_with_http_info(authorization, location_id, opts = {})
286
+ def list_transactions_with_http_info(location_id, opts = {})
170
287
  if @api_client.config.debugging
171
- @api_client.config.logger.debug "Calling API: TransactionApi.list_transactions ..."
288
+ @api_client.config.logger.debug "Calling API: TransactionsApi.list_transactions ..."
172
289
  end
173
- # verify the required parameter 'authorization' is set
174
- fail ArgumentError, "Missing the required parameter 'authorization' when calling TransactionApi.list_transactions" if authorization.nil?
175
290
  # verify the required parameter 'location_id' is set
176
- fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionApi.list_transactions" if location_id.nil?
291
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionsApi.list_transactions" if location_id.nil?
177
292
  if opts[:'sort_order'] && !['DESC', 'ASC'].include?(opts[:'sort_order'])
178
293
  fail ArgumentError, 'invalid value for "sort_order", must be one of DESC, ASC'
179
294
  end
@@ -193,14 +308,13 @@ module SquareConnect
193
308
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
194
309
  # HTTP header 'Content-Type'
195
310
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
196
- header_params[:'Authorization'] = authorization
197
311
 
198
312
  # form parameters
199
313
  form_params = {}
200
314
 
201
315
  # http body (model)
202
316
  post_body = nil
203
- auth_names = []
317
+ auth_names = ['oauth2']
204
318
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
205
319
  :header_params => header_params,
206
320
  :query_params => query_params,
@@ -209,40 +323,36 @@ module SquareConnect
209
323
  :auth_names => auth_names,
210
324
  :return_type => 'ListTransactionsResponse')
211
325
  if @api_client.config.debugging
212
- @api_client.config.logger.debug "API called: TransactionApi#list_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
326
+ @api_client.config.logger.debug "API called: TransactionsApi#list_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
213
327
  end
214
328
  return data, status_code, headers
215
329
  end
216
330
 
217
331
  # RetrieveTransaction
218
332
  # Retrieves details for a single transaction.
219
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format &#x60;Bearer YOUR_ACCESS_TOKEN_HERE&#x60;.
220
333
  # @param location_id The ID of the transaction&#39;s associated location.
221
334
  # @param transaction_id The ID of the transaction to retrieve.
222
335
  # @param [Hash] opts the optional parameters
223
336
  # @return [RetrieveTransactionResponse]
224
- def retrieve_transaction(authorization, location_id, transaction_id, opts = {})
225
- data, _status_code, _headers = retrieve_transaction_with_http_info(authorization, location_id, transaction_id, opts)
337
+ def retrieve_transaction(location_id, transaction_id, opts = {})
338
+ data, _status_code, _headers = retrieve_transaction_with_http_info(location_id, transaction_id, opts)
226
339
  return data
227
340
  end
228
341
 
229
342
  # RetrieveTransaction
230
343
  # Retrieves details for a single transaction.
231
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format &#x60;Bearer YOUR_ACCESS_TOKEN_HERE&#x60;.
232
344
  # @param location_id The ID of the transaction&#39;s associated location.
233
345
  # @param transaction_id The ID of the transaction to retrieve.
234
346
  # @param [Hash] opts the optional parameters
235
347
  # @return [Array<(RetrieveTransactionResponse, Fixnum, Hash)>] RetrieveTransactionResponse data, response status code and response headers
236
- def retrieve_transaction_with_http_info(authorization, location_id, transaction_id, opts = {})
348
+ def retrieve_transaction_with_http_info(location_id, transaction_id, opts = {})
237
349
  if @api_client.config.debugging
238
- @api_client.config.logger.debug "Calling API: TransactionApi.retrieve_transaction ..."
350
+ @api_client.config.logger.debug "Calling API: TransactionsApi.retrieve_transaction ..."
239
351
  end
240
- # verify the required parameter 'authorization' is set
241
- fail ArgumentError, "Missing the required parameter 'authorization' when calling TransactionApi.retrieve_transaction" if authorization.nil?
242
352
  # verify the required parameter 'location_id' is set
243
- fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionApi.retrieve_transaction" if location_id.nil?
353
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionsApi.retrieve_transaction" if location_id.nil?
244
354
  # verify the required parameter 'transaction_id' is set
245
- fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionApi.retrieve_transaction" if transaction_id.nil?
355
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionsApi.retrieve_transaction" if transaction_id.nil?
246
356
  # resource path
247
357
  local_var_path = "/v2/locations/{location_id}/transactions/{transaction_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'transaction_id' + '}', transaction_id.to_s)
248
358
 
@@ -255,14 +365,13 @@ module SquareConnect
255
365
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
256
366
  # HTTP header 'Content-Type'
257
367
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
258
- header_params[:'Authorization'] = authorization
259
368
 
260
369
  # form parameters
261
370
  form_params = {}
262
371
 
263
372
  # http body (model)
264
373
  post_body = nil
265
- auth_names = []
374
+ auth_names = ['oauth2']
266
375
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
267
376
  :header_params => header_params,
268
377
  :query_params => query_params,
@@ -271,40 +380,36 @@ module SquareConnect
271
380
  :auth_names => auth_names,
272
381
  :return_type => 'RetrieveTransactionResponse')
273
382
  if @api_client.config.debugging
274
- @api_client.config.logger.debug "API called: TransactionApi#retrieve_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
383
+ @api_client.config.logger.debug "API called: TransactionsApi#retrieve_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
275
384
  end
276
385
  return data, status_code, headers
277
386
  end
278
387
 
279
388
  # VoidTransaction
280
389
  # Cancels a transaction that was created with the [Charge](#endpoint-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/articles/delayed-capture-transactions/) for more information.
281
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format &#x60;Bearer YOUR_ACCESS_TOKEN_HERE&#x60;.
282
390
  # @param location_id
283
391
  # @param transaction_id
284
392
  # @param [Hash] opts the optional parameters
285
393
  # @return [VoidTransactionResponse]
286
- def void_transaction(authorization, location_id, transaction_id, opts = {})
287
- data, _status_code, _headers = void_transaction_with_http_info(authorization, location_id, transaction_id, opts)
394
+ def void_transaction(location_id, transaction_id, opts = {})
395
+ data, _status_code, _headers = void_transaction_with_http_info(location_id, transaction_id, opts)
288
396
  return data
289
397
  end
290
398
 
291
399
  # VoidTransaction
292
400
  # Cancels a transaction that was created with the [Charge](#endpoint-charge) endpoint with a &#x60;delay_capture&#x60; value of &#x60;true&#x60;. See [Delayed capture transactions](/articles/delayed-capture-transactions/) for more information.
293
- # @param authorization The value to provide in the Authorization header of your request. This value should follow the format &#x60;Bearer YOUR_ACCESS_TOKEN_HERE&#x60;.
294
401
  # @param location_id
295
402
  # @param transaction_id
296
403
  # @param [Hash] opts the optional parameters
297
404
  # @return [Array<(VoidTransactionResponse, Fixnum, Hash)>] VoidTransactionResponse data, response status code and response headers
298
- def void_transaction_with_http_info(authorization, location_id, transaction_id, opts = {})
405
+ def void_transaction_with_http_info(location_id, transaction_id, opts = {})
299
406
  if @api_client.config.debugging
300
- @api_client.config.logger.debug "Calling API: TransactionApi.void_transaction ..."
407
+ @api_client.config.logger.debug "Calling API: TransactionsApi.void_transaction ..."
301
408
  end
302
- # verify the required parameter 'authorization' is set
303
- fail ArgumentError, "Missing the required parameter 'authorization' when calling TransactionApi.void_transaction" if authorization.nil?
304
409
  # verify the required parameter 'location_id' is set
305
- fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionApi.void_transaction" if location_id.nil?
410
+ fail ArgumentError, "Missing the required parameter 'location_id' when calling TransactionsApi.void_transaction" if location_id.nil?
306
411
  # verify the required parameter 'transaction_id' is set
307
- fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionApi.void_transaction" if transaction_id.nil?
412
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionsApi.void_transaction" if transaction_id.nil?
308
413
  # resource path
309
414
  local_var_path = "/v2/locations/{location_id}/transactions/{transaction_id}/void".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'transaction_id' + '}', transaction_id.to_s)
310
415
 
@@ -317,14 +422,13 @@ module SquareConnect
317
422
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
318
423
  # HTTP header 'Content-Type'
319
424
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
320
- header_params[:'Authorization'] = authorization
321
425
 
322
426
  # form parameters
323
427
  form_params = {}
324
428
 
325
429
  # http body (model)
326
430
  post_body = nil
327
- auth_names = []
431
+ auth_names = ['oauth2']
328
432
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
329
433
  :header_params => header_params,
330
434
  :query_params => query_params,
@@ -333,7 +437,7 @@ module SquareConnect
333
437
  :auth_names => auth_names,
334
438
  :return_type => 'VoidTransactionResponse')
335
439
  if @api_client.config.debugging
336
- @api_client.config.logger.debug "API called: TransactionApi#void_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
440
+ @api_client.config.logger.debug "API called: TransactionsApi#void_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
337
441
  end
338
442
  return data, status_code, headers
339
443
  end