square_connect 2.0.2.69 → 2.1.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +133 -21
  3. data/docs/ChargeRequest.md +1 -1
  4. data/docs/CheckoutApi.md +8 -6
  5. data/docs/CustomersApi.md +389 -0
  6. data/docs/Device.md +11 -0
  7. data/docs/LocationsApi.md +55 -0
  8. data/docs/TransactionsApi.md +417 -0
  9. data/docs/V1AdjustInventoryRequest.md +12 -0
  10. data/docs/V1BankAccount.md +17 -0
  11. data/docs/V1CashDrawerEvent.md +15 -0
  12. data/docs/V1CashDrawerShift.md +28 -0
  13. data/docs/V1Category.md +11 -0
  14. data/docs/V1CreateRefundRequest.md +14 -0
  15. data/docs/V1Discount.md +16 -0
  16. data/docs/V1Employee.md +21 -0
  17. data/docs/V1EmployeeRole.md +15 -0
  18. data/docs/V1EmployeesApi.md +915 -0
  19. data/docs/V1Fee.md +18 -0
  20. data/docs/V1InventoryEntry.md +11 -0
  21. data/docs/V1Item.md +23 -0
  22. data/docs/V1ItemImage.md +11 -0
  23. data/docs/V1ItemsApi.md +2297 -0
  24. data/docs/V1LocationApi.md +102 -0
  25. data/docs/V1LocationsApi.md +102 -0
  26. data/docs/V1Merchant.md +26 -0
  27. data/docs/V1MerchantLocationDetails.md +12 -0
  28. data/docs/V1ModifierList.md +13 -0
  29. data/docs/V1ModifierOption.md +15 -0
  30. data/docs/V1Money.md +13 -0
  31. data/docs/V1Order.md +34 -0
  32. data/docs/V1OrderHistoryEntry.md +11 -0
  33. data/docs/V1Page.md +13 -0
  34. data/docs/V1PageCell.md +15 -0
  35. data/docs/V1Payment.md +33 -0
  36. data/docs/V1PaymentDiscount.md +12 -0
  37. data/docs/V1PaymentItemDetail.md +13 -0
  38. data/docs/V1PaymentItemization.md +23 -0
  39. data/docs/V1PaymentModifier.md +12 -0
  40. data/docs/V1PaymentTax.md +15 -0
  41. data/docs/V1PhoneNumber.md +13 -0
  42. data/docs/V1Refund.md +16 -0
  43. data/docs/V1Settlement.md +15 -0
  44. data/docs/V1SettlementEntry.md +13 -0
  45. data/docs/V1Tender.md +22 -0
  46. data/docs/V1Timecard.md +20 -0
  47. data/docs/V1TimecardEvent.md +14 -0
  48. data/docs/V1TransactionsApi.md +650 -0
  49. data/docs/V1UpdateModifierListRequest.md +11 -0
  50. data/docs/V1UpdateOrderRequest.md +14 -0
  51. data/docs/V1Variation.md +20 -0
  52. data/lib/.DS_Store +0 -0
  53. data/lib/square_connect.rb +46 -5
  54. data/lib/square_connect/.DS_Store +0 -0
  55. data/lib/square_connect/api/checkout_api.rb +4 -9
  56. data/lib/square_connect/api/{customer_api.rb → customers_api.rb} +150 -61
  57. data/lib/square_connect/api/{location_api.rb → locations_api.rb} +7 -12
  58. data/lib/square_connect/api/{transaction_api.rb → transactions_api.rb} +169 -65
  59. data/lib/square_connect/api/v1_employees_api.rb +974 -0
  60. data/lib/square_connect/api/v1_items_api.rb +2365 -0
  61. data/lib/square_connect/api/v1_locations_api.rb +118 -0
  62. data/lib/square_connect/api/v1_transactions_api.rb +707 -0
  63. data/lib/square_connect/api_client.rb +1 -1
  64. data/lib/square_connect/models/charge_request.rb +1 -1
  65. data/lib/square_connect/models/device.rb +196 -0
  66. data/lib/square_connect/models/v1_adjust_inventory_request.rb +206 -0
  67. data/lib/square_connect/models/v1_bank_account.rb +289 -0
  68. data/lib/square_connect/models/v1_cash_drawer_event.rb +269 -0
  69. data/lib/square_connect/models/v1_cash_drawer_shift.rb +403 -0
  70. data/lib/square_connect/models/v1_category.rb +196 -0
  71. data/lib/square_connect/models/v1_create_refund_request.rb +274 -0
  72. data/lib/square_connect/models/v1_discount.rb +291 -0
  73. data/lib/square_connect/models/v1_employee.rb +323 -0
  74. data/lib/square_connect/models/v1_employee_role.rb +269 -0
  75. data/lib/square_connect/models/v1_fee.rb +335 -0
  76. data/lib/square_connect/models/v1_inventory_entry.rb +196 -0
  77. data/lib/square_connect/models/v1_item.rb +379 -0
  78. data/lib/square_connect/models/v1_item_image.rb +196 -0
  79. data/lib/square_connect/models/v1_merchant.rb +372 -0
  80. data/lib/square_connect/models/v1_merchant_location_details.rb +186 -0
  81. data/lib/square_connect/models/v1_modifier_list.rb +251 -0
  82. data/lib/square_connect/models/v1_modifier_option.rb +236 -0
  83. data/lib/square_connect/models/v1_money.rb +229 -0
  84. data/lib/square_connect/models/v1_order.rb +463 -0
  85. data/lib/square_connect/models/v1_order_history_entry.rb +229 -0
  86. data/lib/square_connect/models/v1_page.rb +218 -0
  87. data/lib/square_connect/models/v1_page_cell.rb +261 -0
  88. data/lib/square_connect/models/v1_payment.rb +423 -0
  89. data/lib/square_connect/models/v1_payment_discount.rb +206 -0
  90. data/lib/square_connect/models/v1_payment_item_detail.rb +216 -0
  91. data/lib/square_connect/models/v1_payment_itemization.rb +355 -0
  92. data/lib/square_connect/models/v1_payment_modifier.rb +206 -0
  93. data/lib/square_connect/models/v1_payment_tax.rb +271 -0
  94. data/lib/square_connect/models/v1_phone_number.rb +206 -0
  95. data/lib/square_connect/models/v1_refund.rb +279 -0
  96. data/lib/square_connect/models/v1_settlement.rb +271 -0
  97. data/lib/square_connect/models/v1_settlement_entry.rb +249 -0
  98. data/lib/square_connect/models/v1_tender.rb +363 -0
  99. data/lib/square_connect/models/v1_timecard.rb +271 -0
  100. data/lib/square_connect/models/v1_timecard_event.rb +259 -0
  101. data/lib/square_connect/models/v1_update_modifier_list_request.rb +229 -0
  102. data/lib/square_connect/models/v1_update_order_request.rb +264 -0
  103. data/lib/square_connect/models/v1_variation.rb +331 -0
  104. data/lib/square_connect/version.rb +1 -1
  105. data/spec/.DS_Store +0 -0
  106. data/spec/api/checkout_api_spec.rb +4 -12
  107. data/spec/api/{customer_api_spec.rb → customers_api_spec.rb} +39 -41
  108. data/spec/api/{location_api_spec.rb → locations_api_spec.rb} +9 -15
  109. data/spec/api/{transaction_api_spec.rb → transactions_api_spec.rb} +43 -41
  110. data/spec/api/v1_employees_api_spec.rb +250 -0
  111. data/spec/api/v1_items_api_spec.rb +568 -0
  112. data/spec/api/v1_locations_api_spec.rb +54 -0
  113. data/spec/api/v1_transactions_api_spec.rb +186 -0
  114. data/spec/models/address_spec.rb +22 -81
  115. data/spec/models/capture_transaction_request_spec.rb +3 -6
  116. data/spec/models/capture_transaction_response_spec.rb +4 -11
  117. data/spec/models/card_brand_spec.rb +3 -6
  118. data/spec/models/card_spec.rb +14 -41
  119. data/spec/models/charge_request_spec.rb +14 -61
  120. data/spec/models/charge_response_spec.rb +5 -16
  121. data/spec/models/checkout_spec.rb +12 -51
  122. data/spec/models/country_spec.rb +3 -6
  123. data/spec/models/create_checkout_request_spec.rb +10 -41
  124. data/spec/models/create_checkout_response_spec.rb +5 -16
  125. data/spec/models/create_customer_card_request_spec.rb +6 -21
  126. data/spec/models/create_customer_card_response_spec.rb +5 -16
  127. data/spec/models/create_customer_request_spec.rb +12 -51
  128. data/spec/models/create_customer_response_spec.rb +5 -16
  129. data/spec/models/create_order_request_line_item_spec.rb +6 -21
  130. data/spec/models/create_order_request_order_spec.rb +5 -16
  131. data/spec/models/create_order_request_spec.rb +5 -16
  132. data/spec/models/create_refund_request_spec.rb +7 -26
  133. data/spec/models/create_refund_response_spec.rb +5 -16
  134. data/spec/models/currency_spec.rb +3 -6
  135. data/spec/models/customer_group_info_spec.rb +5 -16
  136. data/spec/models/customer_preferences_spec.rb +4 -11
  137. data/spec/models/customer_spec.rb +18 -81
  138. data/spec/models/delete_customer_card_request_spec.rb +3 -6
  139. data/spec/models/delete_customer_card_response_spec.rb +4 -11
  140. data/spec/models/delete_customer_request_spec.rb +3 -6
  141. data/spec/models/delete_customer_response_spec.rb +4 -11
  142. data/spec/models/device_spec.rb +45 -0
  143. data/spec/models/error_category_spec.rb +3 -6
  144. data/spec/models/error_code_spec.rb +3 -6
  145. data/spec/models/error_spec.rb +15 -26
  146. data/spec/models/list_customers_request_spec.rb +4 -11
  147. data/spec/models/list_customers_response_spec.rb +6 -21
  148. data/spec/models/list_locations_request_spec.rb +3 -6
  149. data/spec/models/list_locations_response_spec.rb +5 -16
  150. data/spec/models/list_refunds_request_spec.rb +11 -26
  151. data/spec/models/list_refunds_response_spec.rb +6 -21
  152. data/spec/models/list_transactions_request_spec.rb +11 -26
  153. data/spec/models/list_transactions_response_spec.rb +6 -21
  154. data/spec/models/location_capability_spec.rb +3 -6
  155. data/spec/models/location_spec.rb +12 -31
  156. data/spec/models/money_spec.rb +9 -16
  157. data/spec/models/order_line_item_spec.rb +8 -31
  158. data/spec/models/order_spec.rb +8 -31
  159. data/spec/models/refund_spec.rb +16 -51
  160. data/spec/models/refund_status_spec.rb +3 -6
  161. data/spec/models/retrieve_customer_request_spec.rb +3 -6
  162. data/spec/models/retrieve_customer_response_spec.rb +5 -16
  163. data/spec/models/retrieve_transaction_request_spec.rb +3 -6
  164. data/spec/models/retrieve_transaction_response_spec.rb +5 -16
  165. data/spec/models/sort_order_spec.rb +3 -6
  166. data/spec/models/tender_card_details_entry_method_spec.rb +3 -6
  167. data/spec/models/tender_card_details_spec.rb +14 -21
  168. data/spec/models/tender_card_details_status_spec.rb +3 -6
  169. data/spec/models/tender_cash_details_spec.rb +5 -16
  170. data/spec/models/tender_spec.rb +18 -61
  171. data/spec/models/tender_type_spec.rb +3 -6
  172. data/spec/models/transaction_product_spec.rb +3 -6
  173. data/spec/models/transaction_spec.rb +17 -56
  174. data/spec/models/update_customer_request_spec.rb +12 -51
  175. data/spec/models/update_customer_response_spec.rb +5 -16
  176. data/spec/models/v1_adjust_inventory_request_spec.rb +51 -0
  177. data/spec/models/v1_bank_account_spec.rb +85 -0
  178. data/spec/models/v1_cash_drawer_event_spec.rb +73 -0
  179. data/spec/models/v1_cash_drawer_shift_spec.rb +151 -0
  180. data/spec/models/v1_category_spec.rb +45 -0
  181. data/spec/models/v1_create_refund_request_spec.rb +67 -0
  182. data/spec/models/v1_discount_spec.rb +83 -0
  183. data/spec/models/v1_employee_role_spec.rb +73 -0
  184. data/spec/models/v1_employee_spec.rb +97 -0
  185. data/spec/models/v1_fee_spec.rb +103 -0
  186. data/spec/models/v1_inventory_entry_spec.rb +45 -0
  187. data/spec/models/v1_item_image_spec.rb +45 -0
  188. data/spec/models/v1_item_spec.rb +129 -0
  189. data/spec/models/v1_merchant_location_details_spec.rb +39 -0
  190. data/spec/models/v1_merchant_spec.rb +131 -0
  191. data/spec/models/v1_modifier_list_spec.rb +61 -0
  192. data/spec/models/v1_modifier_option_spec.rb +69 -0
  193. data/spec/models/v1_money_spec.rb +49 -0
  194. data/spec/models/v1_order_history_entry_spec.rb +49 -0
  195. data/spec/models/v1_order_spec.rb +187 -0
  196. data/spec/models/v1_page_cell_spec.rb +77 -0
  197. data/spec/models/v1_page_spec.rb +57 -0
  198. data/spec/models/v1_payment_discount_spec.rb +51 -0
  199. data/spec/models/v1_payment_item_detail_spec.rb +57 -0
  200. data/spec/models/v1_payment_itemization_spec.rb +121 -0
  201. data/spec/models/v1_payment_modifier_spec.rb +51 -0
  202. data/spec/models/v1_payment_spec.rb +177 -0
  203. data/spec/models/v1_payment_tax_spec.rb +73 -0
  204. data/spec/models/v1_phone_number_spec.rb +45 -0
  205. data/spec/models/v1_refund_spec.rb +79 -0
  206. data/spec/models/v1_settlement_entry_spec.rb +61 -0
  207. data/spec/models/v1_settlement_spec.rb +73 -0
  208. data/spec/models/v1_tender_spec.rb +123 -0
  209. data/spec/models/v1_timecard_event_spec.rb +67 -0
  210. data/spec/models/v1_timecard_spec.rb +87 -0
  211. data/spec/models/v1_update_modifier_list_request_spec.rb +49 -0
  212. data/spec/models/v1_update_order_request_spec.rb +67 -0
  213. data/spec/models/v1_variation_spec.rb +107 -0
  214. data/spec/models/void_transaction_request_spec.rb +3 -6
  215. data/spec/models/void_transaction_response_spec.rb +4 -11
  216. data/spec/spec_helper.rb +10 -0
  217. data/square_connect-2.0.2.gem +0 -0
  218. data/square_connect-2.1.0.gem +0 -0
  219. data/square_connect-2.1.0beta.gem +0 -0
  220. data/square_connect.gemspec +1 -1
  221. data/travis-ci/accounts.enc +0 -0
  222. metadata +197 -26
  223. data/docs/CustomerApi.md +0 -267
  224. data/docs/CustomerCardApi.md +0 -116
  225. data/docs/LocationApi.md +0 -56
  226. data/docs/RefundApi.md +0 -126
  227. data/docs/TransactionApi.md +0 -285
  228. data/lib/square_connect/api/customer_card_api.rb +0 -144
  229. data/lib/square_connect/api/refund_api.rb +0 -159
  230. data/spec/api/customer_card_api_spec.rb +0 -71
  231. data/spec/api/refund_api_spec.rb +0 -75
@@ -0,0 +1,11 @@
1
+ # SquareConnect::V1UpdateModifierListRequest
2
+
3
+ ### Description
4
+
5
+ ## Properties
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **name** | **String** | The modifier list's name. | [optional]
9
+ **selection_type** | **String** | Indicates whether multiple options from the modifier list can be applied to a single item. | [optional]
10
+
11
+
@@ -0,0 +1,14 @@
1
+ # SquareConnect::V1UpdateOrderRequest
2
+
3
+ ### Description
4
+
5
+ ## Properties
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **action** | **String** | The action to perform on the order (COMPLETE, CANCEL, or REFUND). |
9
+ **shipped_tracking_number** | **String** | The tracking number of the shipment associated with the order. Only valid if action is COMPLETE. | [optional]
10
+ **completed_note** | **String** | A merchant-specified note about the completion of the order. Only valid if action is COMPLETE. | [optional]
11
+ **refunded_note** | **String** | A merchant-specified note about the refunding of the order. Only valid if action is REFUND. | [optional]
12
+ **canceled_note** | **String** | A merchant-specified note about the canceling of the order. Only valid if action is CANCEL. | [optional]
13
+
14
+
@@ -0,0 +1,20 @@
1
+ # SquareConnect::V1Variation
2
+
3
+ ### Description
4
+
5
+ ## Properties
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **String** | The item variation's unique ID. | [optional]
9
+ **name** | **String** | The item variation's name. | [optional]
10
+ **item_id** | **String** | The ID of the variation's associated item. | [optional]
11
+ **ordinal** | **String** | ndicates the variation's list position when displayed in Square Register and the merchant dashboard. If more than one variation for the same item has the same ordinal value, those variations are displayed in alphabetical order | [optional]
12
+ **pricing_type** | **String** | Indicates whether the item variation's price is fixed or determined at the time of sale. | [optional]
13
+ **price_money** | [**V1Money**](V1Money.md) | The item variation's price, if any. | [optional]
14
+ **sku** | **String** | The item variation's SKU, if any. | [optional]
15
+ **track_inventory** | **BOOLEAN** | If true, inventory tracking is active for the variation. | [optional]
16
+ **inventory_alert_type** | **String** | Indicates whether the item variation displays an alert when its inventory quantity is less than or equal to its inventory_alert_threshold. | [optional]
17
+ **inventory_alert_threshold** | **Integer** | If the inventory quantity for the variation is less than or equal to this value and inventory_alert_type is LOW_QUANTITY, the variation displays an alert in the merchant dashboard. | [optional]
18
+ **user_data** | **String** | Arbitrary metadata associated with the variation. Cannot exceed 255 characters. | [optional]
19
+
20
+
data/lib/.DS_Store ADDED
Binary file
@@ -42,6 +42,7 @@ require 'square_connect/models/delete_customer_card_request'
42
42
  require 'square_connect/models/delete_customer_card_response'
43
43
  require 'square_connect/models/delete_customer_request'
44
44
  require 'square_connect/models/delete_customer_response'
45
+ require 'square_connect/models/device'
45
46
  require 'square_connect/models/error'
46
47
  require 'square_connect/models/error_category'
47
48
  require 'square_connect/models/error_code'
@@ -75,16 +76,56 @@ require 'square_connect/models/transaction'
75
76
  require 'square_connect/models/transaction_product'
76
77
  require 'square_connect/models/update_customer_request'
77
78
  require 'square_connect/models/update_customer_response'
79
+ require 'square_connect/models/v1_adjust_inventory_request'
80
+ require 'square_connect/models/v1_bank_account'
81
+ require 'square_connect/models/v1_cash_drawer_event'
82
+ require 'square_connect/models/v1_cash_drawer_shift'
83
+ require 'square_connect/models/v1_category'
84
+ require 'square_connect/models/v1_create_refund_request'
85
+ require 'square_connect/models/v1_discount'
86
+ require 'square_connect/models/v1_employee'
87
+ require 'square_connect/models/v1_employee_role'
88
+ require 'square_connect/models/v1_fee'
89
+ require 'square_connect/models/v1_inventory_entry'
90
+ require 'square_connect/models/v1_item'
91
+ require 'square_connect/models/v1_item_image'
92
+ require 'square_connect/models/v1_merchant'
93
+ require 'square_connect/models/v1_merchant_location_details'
94
+ require 'square_connect/models/v1_modifier_list'
95
+ require 'square_connect/models/v1_modifier_option'
96
+ require 'square_connect/models/v1_money'
97
+ require 'square_connect/models/v1_order'
98
+ require 'square_connect/models/v1_order_history_entry'
99
+ require 'square_connect/models/v1_page'
100
+ require 'square_connect/models/v1_page_cell'
101
+ require 'square_connect/models/v1_payment'
102
+ require 'square_connect/models/v1_payment_discount'
103
+ require 'square_connect/models/v1_payment_item_detail'
104
+ require 'square_connect/models/v1_payment_itemization'
105
+ require 'square_connect/models/v1_payment_modifier'
106
+ require 'square_connect/models/v1_payment_tax'
107
+ require 'square_connect/models/v1_phone_number'
108
+ require 'square_connect/models/v1_refund'
109
+ require 'square_connect/models/v1_settlement'
110
+ require 'square_connect/models/v1_settlement_entry'
111
+ require 'square_connect/models/v1_tender'
112
+ require 'square_connect/models/v1_timecard'
113
+ require 'square_connect/models/v1_timecard_event'
114
+ require 'square_connect/models/v1_update_modifier_list_request'
115
+ require 'square_connect/models/v1_update_order_request'
116
+ require 'square_connect/models/v1_variation'
78
117
  require 'square_connect/models/void_transaction_request'
79
118
  require 'square_connect/models/void_transaction_response'
80
119
 
81
120
  # APIs
82
121
  require 'square_connect/api/checkout_api'
83
- require 'square_connect/api/customer_api'
84
- require 'square_connect/api/customer_card_api'
85
- require 'square_connect/api/location_api'
86
- require 'square_connect/api/refund_api'
87
- require 'square_connect/api/transaction_api'
122
+ require 'square_connect/api/customers_api'
123
+ require 'square_connect/api/locations_api'
124
+ require 'square_connect/api/transactions_api'
125
+ require 'square_connect/api/v1_employees_api'
126
+ require 'square_connect/api/v1_items_api'
127
+ require 'square_connect/api/v1_locations_api'
128
+ require 'square_connect/api/v1_transactions_api'
88
129
 
89
130
  module SquareConnect
90
131
  class << self
Binary file
@@ -19,29 +19,25 @@ module SquareConnect
19
19
 
20
20
  # CreateCheckout
21
21
  # Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `checkout_page_url` that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com.
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 The ID of the business location to associate the checkout with.
24
23
  # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
25
24
  # @param [Hash] opts the optional parameters
26
25
  # @return [CreateCheckoutResponse]
27
- def create_checkout(authorization, location_id, body, opts = {})
28
- data, _status_code, _headers = create_checkout_with_http_info(authorization, location_id, body, opts)
26
+ def create_checkout(location_id, body, opts = {})
27
+ data, _status_code, _headers = create_checkout_with_http_info(location_id, body, opts)
29
28
  return data
30
29
  end
31
30
 
32
31
  # CreateCheckout
33
32
  # Creates a [Checkout](#type-checkout) response that links a &#x60;checkoutId&#x60; and &#x60;checkout_page_url&#x60; that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com.
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 The ID of the business location to associate the checkout with.
36
34
  # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
37
35
  # @param [Hash] opts the optional parameters
38
36
  # @return [Array<(CreateCheckoutResponse, Fixnum, Hash)>] CreateCheckoutResponse data, response status code and response headers
39
- def create_checkout_with_http_info(authorization, location_id, body, opts = {})
37
+ def create_checkout_with_http_info(location_id, body, opts = {})
40
38
  if @api_client.config.debugging
41
39
  @api_client.config.logger.debug "Calling API: CheckoutApi.create_checkout ..."
42
40
  end
43
- # verify the required parameter 'authorization' is set
44
- fail ArgumentError, "Missing the required parameter 'authorization' when calling CheckoutApi.create_checkout" if authorization.nil?
45
41
  # verify the required parameter 'location_id' is set
46
42
  fail ArgumentError, "Missing the required parameter 'location_id' when calling CheckoutApi.create_checkout" if location_id.nil?
47
43
  # verify the required parameter 'body' is set
@@ -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 = @api_client.object_to_http_body(body)
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,
@@ -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 CustomerApi
13
+ class CustomersApi
14
14
  attr_accessor :api_client
15
15
 
16
16
  def initialize(api_client = ApiClient.default)
@@ -19,29 +19,25 @@ module SquareConnect
19
19
 
20
20
  # CreateCustomer
21
21
  # Creates a new customer for a business, which can have associated cards on file. You must provide __at least one__ of the following values in your request to this endpoint: - `given_name` - `family_name` - `company_name` - `email_address` - `phone_number` This endpoint does not accept an idempotency key. If you accidentally create a duplicate customer, you can delete it with the [DeleteCustomer](#endpoint-deletecustomer) endpoint.
22
- # @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 body An object containing the fields to POST for the request. See the corresponding object definition for field details.
24
23
  # @param [Hash] opts the optional parameters
25
24
  # @return [CreateCustomerResponse]
26
- def create_customer(authorization, body, opts = {})
27
- data, _status_code, _headers = create_customer_with_http_info(authorization, body, opts)
25
+ def create_customer(body, opts = {})
26
+ data, _status_code, _headers = create_customer_with_http_info(body, opts)
28
27
  return data
29
28
  end
30
29
 
31
30
  # CreateCustomer
32
31
  # Creates a new customer for a business, which can have associated cards on file. You must provide __at least one__ of the following values in your request to this endpoint: - &#x60;given_name&#x60; - &#x60;family_name&#x60; - &#x60;company_name&#x60; - &#x60;email_address&#x60; - &#x60;phone_number&#x60; This endpoint does not accept an idempotency key. If you accidentally create a duplicate customer, you can delete it with the [DeleteCustomer](#endpoint-deletecustomer) endpoint.
33
- # @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;.
34
32
  # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
35
33
  # @param [Hash] opts the optional parameters
36
34
  # @return [Array<(CreateCustomerResponse, Fixnum, Hash)>] CreateCustomerResponse data, response status code and response headers
37
- def create_customer_with_http_info(authorization, body, opts = {})
35
+ def create_customer_with_http_info(body, opts = {})
38
36
  if @api_client.config.debugging
39
- @api_client.config.logger.debug "Calling API: CustomerApi.create_customer ..."
37
+ @api_client.config.logger.debug "Calling API: CustomersApi.create_customer ..."
40
38
  end
41
- # verify the required parameter 'authorization' is set
42
- fail ArgumentError, "Missing the required parameter 'authorization' when calling CustomerApi.create_customer" if authorization.nil?
43
39
  # verify the required parameter 'body' is set
44
- fail ArgumentError, "Missing the required parameter 'body' when calling CustomerApi.create_customer" if body.nil?
40
+ fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.create_customer" if body.nil?
45
41
  # resource path
46
42
  local_var_path = "/v2/customers".sub('{format}','json')
47
43
 
@@ -54,14 +50,13 @@ module SquareConnect
54
50
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
51
  # HTTP header 'Content-Type'
56
52
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
- header_params[:'Authorization'] = authorization
58
53
 
59
54
  # form parameters
60
55
  form_params = {}
61
56
 
62
57
  # http body (model)
63
58
  post_body = @api_client.object_to_http_body(body)
64
- auth_names = []
59
+ auth_names = ['oauth2']
65
60
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
61
  :header_params => header_params,
67
62
  :query_params => query_params,
@@ -70,36 +65,89 @@ module SquareConnect
70
65
  :auth_names => auth_names,
71
66
  :return_type => 'CreateCustomerResponse')
72
67
  if @api_client.config.debugging
73
- @api_client.config.logger.debug "API called: CustomerApi#create_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
68
+ @api_client.config.logger.debug "API called: CustomersApi#create_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
69
+ end
70
+ return data, status_code, headers
71
+ end
72
+
73
+ # CreateCustomerCard
74
+ # Adds a card on file to an existing customer.
75
+ # @param customer_id The ID of the customer to link the card on file to.
76
+ # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
77
+ # @param [Hash] opts the optional parameters
78
+ # @return [CreateCustomerCardResponse]
79
+ def create_customer_card(customer_id, body, opts = {})
80
+ data, _status_code, _headers = create_customer_card_with_http_info(customer_id, body, opts)
81
+ return data
82
+ end
83
+
84
+ # CreateCustomerCard
85
+ # Adds a card on file to an existing customer.
86
+ # @param customer_id The ID of the customer to link the card on file to.
87
+ # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [Array<(CreateCustomerCardResponse, Fixnum, Hash)>] CreateCustomerCardResponse data, response status code and response headers
90
+ def create_customer_card_with_http_info(customer_id, body, opts = {})
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "Calling API: CustomersApi.create_customer_card ..."
93
+ end
94
+ # verify the required parameter 'customer_id' is set
95
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.create_customer_card" if customer_id.nil?
96
+ # verify the required parameter 'body' is set
97
+ fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.create_customer_card" if body.nil?
98
+ # resource path
99
+ local_var_path = "/v2/customers/{customer_id}/cards".sub('{format}','json').sub('{' + 'customer_id' + '}', customer_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 = @api_client.object_to_http_body(body)
116
+ auth_names = ['oauth2']
117
+ data, status_code, headers = @api_client.call_api(:POST, 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 => 'CreateCustomerCardResponse')
124
+ if @api_client.config.debugging
125
+ @api_client.config.logger.debug "API called: CustomersApi#create_customer_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
126
  end
75
127
  return data, status_code, headers
76
128
  end
77
129
 
78
130
  # DeleteCustomer
79
131
  # Deletes a customer from a business, along with any linked cards on file.
80
- # @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;.
81
132
  # @param customer_id The ID of the customer to delete.
82
133
  # @param [Hash] opts the optional parameters
83
134
  # @return [DeleteCustomerResponse]
84
- def delete_customer(authorization, customer_id, opts = {})
85
- data, _status_code, _headers = delete_customer_with_http_info(authorization, customer_id, opts)
135
+ def delete_customer(customer_id, opts = {})
136
+ data, _status_code, _headers = delete_customer_with_http_info(customer_id, opts)
86
137
  return data
87
138
  end
88
139
 
89
140
  # DeleteCustomer
90
141
  # Deletes a customer from a business, along with any linked cards on file.
91
- # @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;.
92
142
  # @param customer_id The ID of the customer to delete.
93
143
  # @param [Hash] opts the optional parameters
94
144
  # @return [Array<(DeleteCustomerResponse, Fixnum, Hash)>] DeleteCustomerResponse data, response status code and response headers
95
- def delete_customer_with_http_info(authorization, customer_id, opts = {})
145
+ def delete_customer_with_http_info(customer_id, opts = {})
96
146
  if @api_client.config.debugging
97
- @api_client.config.logger.debug "Calling API: CustomerApi.delete_customer ..."
147
+ @api_client.config.logger.debug "Calling API: CustomersApi.delete_customer ..."
98
148
  end
99
- # verify the required parameter 'authorization' is set
100
- fail ArgumentError, "Missing the required parameter 'authorization' when calling CustomerApi.delete_customer" if authorization.nil?
101
149
  # verify the required parameter 'customer_id' is set
102
- fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomerApi.delete_customer" if customer_id.nil?
150
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.delete_customer" if customer_id.nil?
103
151
  # resource path
104
152
  local_var_path = "/v2/customers/{customer_id}".sub('{format}','json').sub('{' + 'customer_id' + '}', customer_id.to_s)
105
153
 
@@ -112,14 +160,13 @@ module SquareConnect
112
160
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
113
161
  # HTTP header 'Content-Type'
114
162
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
115
- header_params[:'Authorization'] = authorization
116
163
 
117
164
  # form parameters
118
165
  form_params = {}
119
166
 
120
167
  # http body (model)
121
168
  post_body = nil
122
- auth_names = []
169
+ auth_names = ['oauth2']
123
170
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
124
171
  :header_params => header_params,
125
172
  :query_params => query_params,
@@ -128,34 +175,87 @@ module SquareConnect
128
175
  :auth_names => auth_names,
129
176
  :return_type => 'DeleteCustomerResponse')
130
177
  if @api_client.config.debugging
131
- @api_client.config.logger.debug "API called: CustomerApi#delete_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
+ @api_client.config.logger.debug "API called: CustomersApi#delete_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
179
+ end
180
+ return data, status_code, headers
181
+ end
182
+
183
+ # DeleteCustomerCard
184
+ # Removes a card on file from a customer.
185
+ # @param customer_id The ID of the customer that the card on file belongs to.
186
+ # @param card_id The ID of the card on file to delete.
187
+ # @param [Hash] opts the optional parameters
188
+ # @return [DeleteCustomerCardResponse]
189
+ def delete_customer_card(customer_id, card_id, opts = {})
190
+ data, _status_code, _headers = delete_customer_card_with_http_info(customer_id, card_id, opts)
191
+ return data
192
+ end
193
+
194
+ # DeleteCustomerCard
195
+ # Removes a card on file from a customer.
196
+ # @param customer_id The ID of the customer that the card on file belongs to.
197
+ # @param card_id The ID of the card on file to delete.
198
+ # @param [Hash] opts the optional parameters
199
+ # @return [Array<(DeleteCustomerCardResponse, Fixnum, Hash)>] DeleteCustomerCardResponse data, response status code and response headers
200
+ def delete_customer_card_with_http_info(customer_id, card_id, opts = {})
201
+ if @api_client.config.debugging
202
+ @api_client.config.logger.debug "Calling API: CustomersApi.delete_customer_card ..."
203
+ end
204
+ # verify the required parameter 'customer_id' is set
205
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.delete_customer_card" if customer_id.nil?
206
+ # verify the required parameter 'card_id' is set
207
+ fail ArgumentError, "Missing the required parameter 'card_id' when calling CustomersApi.delete_customer_card" if card_id.nil?
208
+ # resource path
209
+ local_var_path = "/v2/customers/{customer_id}/cards/{card_id}".sub('{format}','json').sub('{' + 'customer_id' + '}', customer_id.to_s).sub('{' + 'card_id' + '}', card_id.to_s)
210
+
211
+ # query parameters
212
+ query_params = {}
213
+
214
+ # header parameters
215
+ header_params = {}
216
+ # HTTP header 'Accept' (if needed)
217
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
218
+ # HTTP header 'Content-Type'
219
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
220
+
221
+ # form parameters
222
+ form_params = {}
223
+
224
+ # http body (model)
225
+ post_body = nil
226
+ auth_names = ['oauth2']
227
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
228
+ :header_params => header_params,
229
+ :query_params => query_params,
230
+ :form_params => form_params,
231
+ :body => post_body,
232
+ :auth_names => auth_names,
233
+ :return_type => 'DeleteCustomerCardResponse')
234
+ if @api_client.config.debugging
235
+ @api_client.config.logger.debug "API called: CustomersApi#delete_customer_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
132
236
  end
133
237
  return data, status_code, headers
134
238
  end
135
239
 
136
240
  # ListCustomers
137
241
  # Lists a business's customers.
138
- # @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;.
139
242
  # @param [Hash] opts the optional parameters
140
243
  # @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.
141
244
  # @return [ListCustomersResponse]
142
- def list_customers(authorization, opts = {})
143
- data, _status_code, _headers = list_customers_with_http_info(authorization, opts)
245
+ def list_customers(opts = {})
246
+ data, _status_code, _headers = list_customers_with_http_info(opts)
144
247
  return data
145
248
  end
146
249
 
147
250
  # ListCustomers
148
251
  # Lists a business&#39;s customers.
149
- # @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;.
150
252
  # @param [Hash] opts the optional parameters
151
253
  # @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.
152
254
  # @return [Array<(ListCustomersResponse, Fixnum, Hash)>] ListCustomersResponse data, response status code and response headers
153
- def list_customers_with_http_info(authorization, opts = {})
255
+ def list_customers_with_http_info(opts = {})
154
256
  if @api_client.config.debugging
155
- @api_client.config.logger.debug "Calling API: CustomerApi.list_customers ..."
257
+ @api_client.config.logger.debug "Calling API: CustomersApi.list_customers ..."
156
258
  end
157
- # verify the required parameter 'authorization' is set
158
- fail ArgumentError, "Missing the required parameter 'authorization' when calling CustomerApi.list_customers" if authorization.nil?
159
259
  # resource path
160
260
  local_var_path = "/v2/customers".sub('{format}','json')
161
261
 
@@ -169,14 +269,13 @@ module SquareConnect
169
269
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
170
270
  # HTTP header 'Content-Type'
171
271
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
172
- header_params[:'Authorization'] = authorization
173
272
 
174
273
  # form parameters
175
274
  form_params = {}
176
275
 
177
276
  # http body (model)
178
277
  post_body = nil
179
- auth_names = []
278
+ auth_names = ['oauth2']
180
279
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
181
280
  :header_params => header_params,
182
281
  :query_params => query_params,
@@ -185,36 +284,32 @@ module SquareConnect
185
284
  :auth_names => auth_names,
186
285
  :return_type => 'ListCustomersResponse')
187
286
  if @api_client.config.debugging
188
- @api_client.config.logger.debug "API called: CustomerApi#list_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
287
+ @api_client.config.logger.debug "API called: CustomersApi#list_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
189
288
  end
190
289
  return data, status_code, headers
191
290
  end
192
291
 
193
292
  # RetrieveCustomer
194
293
  # Returns details for a single customer.
195
- # @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;.
196
294
  # @param customer_id The ID of the customer to retrieve.
197
295
  # @param [Hash] opts the optional parameters
198
296
  # @return [RetrieveCustomerResponse]
199
- def retrieve_customer(authorization, customer_id, opts = {})
200
- data, _status_code, _headers = retrieve_customer_with_http_info(authorization, customer_id, opts)
297
+ def retrieve_customer(customer_id, opts = {})
298
+ data, _status_code, _headers = retrieve_customer_with_http_info(customer_id, opts)
201
299
  return data
202
300
  end
203
301
 
204
302
  # RetrieveCustomer
205
303
  # Returns details for a single customer.
206
- # @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;.
207
304
  # @param customer_id The ID of the customer to retrieve.
208
305
  # @param [Hash] opts the optional parameters
209
306
  # @return [Array<(RetrieveCustomerResponse, Fixnum, Hash)>] RetrieveCustomerResponse data, response status code and response headers
210
- def retrieve_customer_with_http_info(authorization, customer_id, opts = {})
307
+ def retrieve_customer_with_http_info(customer_id, opts = {})
211
308
  if @api_client.config.debugging
212
- @api_client.config.logger.debug "Calling API: CustomerApi.retrieve_customer ..."
309
+ @api_client.config.logger.debug "Calling API: CustomersApi.retrieve_customer ..."
213
310
  end
214
- # verify the required parameter 'authorization' is set
215
- fail ArgumentError, "Missing the required parameter 'authorization' when calling CustomerApi.retrieve_customer" if authorization.nil?
216
311
  # verify the required parameter 'customer_id' is set
217
- fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomerApi.retrieve_customer" if customer_id.nil?
312
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.retrieve_customer" if customer_id.nil?
218
313
  # resource path
219
314
  local_var_path = "/v2/customers/{customer_id}".sub('{format}','json').sub('{' + 'customer_id' + '}', customer_id.to_s)
220
315
 
@@ -227,14 +322,13 @@ module SquareConnect
227
322
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
228
323
  # HTTP header 'Content-Type'
229
324
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
230
- header_params[:'Authorization'] = authorization
231
325
 
232
326
  # form parameters
233
327
  form_params = {}
234
328
 
235
329
  # http body (model)
236
330
  post_body = nil
237
- auth_names = []
331
+ auth_names = ['oauth2']
238
332
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
239
333
  :header_params => header_params,
240
334
  :query_params => query_params,
@@ -243,40 +337,36 @@ module SquareConnect
243
337
  :auth_names => auth_names,
244
338
  :return_type => 'RetrieveCustomerResponse')
245
339
  if @api_client.config.debugging
246
- @api_client.config.logger.debug "API called: CustomerApi#retrieve_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
340
+ @api_client.config.logger.debug "API called: CustomersApi#retrieve_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
247
341
  end
248
342
  return data, status_code, headers
249
343
  end
250
344
 
251
345
  # UpdateCustomer
252
346
  # Updates the details of an existing customer. You cannot edit a customer's cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-createcustomercard) endpoint.
253
- # @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;.
254
347
  # @param customer_id The ID of the customer to update.
255
348
  # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
256
349
  # @param [Hash] opts the optional parameters
257
350
  # @return [UpdateCustomerResponse]
258
- def update_customer(authorization, customer_id, body, opts = {})
259
- data, _status_code, _headers = update_customer_with_http_info(authorization, customer_id, body, opts)
351
+ def update_customer(customer_id, body, opts = {})
352
+ data, _status_code, _headers = update_customer_with_http_info(customer_id, body, opts)
260
353
  return data
261
354
  end
262
355
 
263
356
  # UpdateCustomer
264
357
  # Updates the details of an existing customer. You cannot edit a customer&#39;s cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-createcustomercard) endpoint.
265
- # @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;.
266
358
  # @param customer_id The ID of the customer to update.
267
359
  # @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
268
360
  # @param [Hash] opts the optional parameters
269
361
  # @return [Array<(UpdateCustomerResponse, Fixnum, Hash)>] UpdateCustomerResponse data, response status code and response headers
270
- def update_customer_with_http_info(authorization, customer_id, body, opts = {})
362
+ def update_customer_with_http_info(customer_id, body, opts = {})
271
363
  if @api_client.config.debugging
272
- @api_client.config.logger.debug "Calling API: CustomerApi.update_customer ..."
364
+ @api_client.config.logger.debug "Calling API: CustomersApi.update_customer ..."
273
365
  end
274
- # verify the required parameter 'authorization' is set
275
- fail ArgumentError, "Missing the required parameter 'authorization' when calling CustomerApi.update_customer" if authorization.nil?
276
366
  # verify the required parameter 'customer_id' is set
277
- fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomerApi.update_customer" if customer_id.nil?
367
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.update_customer" if customer_id.nil?
278
368
  # verify the required parameter 'body' is set
279
- fail ArgumentError, "Missing the required parameter 'body' when calling CustomerApi.update_customer" if body.nil?
369
+ fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.update_customer" if body.nil?
280
370
  # resource path
281
371
  local_var_path = "/v2/customers/{customer_id}".sub('{format}','json').sub('{' + 'customer_id' + '}', customer_id.to_s)
282
372
 
@@ -289,14 +379,13 @@ module SquareConnect
289
379
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
290
380
  # HTTP header 'Content-Type'
291
381
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
292
- header_params[:'Authorization'] = authorization
293
382
 
294
383
  # form parameters
295
384
  form_params = {}
296
385
 
297
386
  # http body (model)
298
387
  post_body = @api_client.object_to_http_body(body)
299
- auth_names = []
388
+ auth_names = ['oauth2']
300
389
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
301
390
  :header_params => header_params,
302
391
  :query_params => query_params,
@@ -305,7 +394,7 @@ module SquareConnect
305
394
  :auth_names => auth_names,
306
395
  :return_type => 'UpdateCustomerResponse')
307
396
  if @api_client.config.debugging
308
- @api_client.config.logger.debug "API called: CustomerApi#update_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
397
+ @api_client.config.logger.debug "API called: CustomersApi#update_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
309
398
  end
310
399
  return data, status_code, headers
311
400
  end