square.rb 8.1.0.20210121 → 18.1.0.20220316

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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +59 -213
  4. data/lib/square/api/apple_pay_api.rb +9 -8
  5. data/lib/square/api/bank_accounts_api.rb +5 -5
  6. data/lib/square/api/base_api.rb +20 -9
  7. data/lib/square/api/bookings_api.rb +95 -12
  8. data/lib/square/api/cards_api.rb +170 -0
  9. data/lib/square/api/cash_drawers_api.rb +2 -2
  10. data/lib/square/api/catalog_api.rb +140 -66
  11. data/lib/square/api/checkout_api.rb +3 -3
  12. data/lib/square/api/customer_groups_api.rb +17 -8
  13. data/lib/square/api/customer_segments_api.rb +15 -6
  14. data/lib/square/api/customers_api.rb +61 -31
  15. data/lib/square/api/devices_api.rb +3 -2
  16. data/lib/square/api/disputes_api.rb +101 -92
  17. data/lib/square/api/gift_card_activities_api.rb +133 -0
  18. data/lib/square/api/gift_cards_api.rb +297 -0
  19. data/lib/square/api/inventory_api.rb +263 -24
  20. data/lib/square/api/invoices_api.rb +19 -19
  21. data/lib/square/api/labor_api.rb +70 -68
  22. data/lib/square/api/locations_api.rb +22 -14
  23. data/lib/square/api/loyalty_api.rb +86 -32
  24. data/lib/square/api/merchants_api.rb +11 -9
  25. data/lib/square/api/mobile_authorization_api.rb +4 -4
  26. data/lib/square/api/o_auth_api.rb +31 -25
  27. data/lib/square/api/orders_api.rb +78 -39
  28. data/lib/square/api/payments_api.rb +71 -23
  29. data/lib/square/api/refunds_api.rb +18 -7
  30. data/lib/square/api/sites_api.rb +43 -0
  31. data/lib/square/api/snippets_api.rb +146 -0
  32. data/lib/square/api/subscriptions_api.rb +190 -12
  33. data/lib/square/api/team_api.rb +46 -46
  34. data/lib/square/api/terminal_api.rb +19 -18
  35. data/lib/square/api/transactions_api.rb +15 -191
  36. data/lib/square/api/v1_transactions_api.rb +13 -85
  37. data/lib/square/api/vendors_api.rb +257 -0
  38. data/lib/square/api_helper.rb +45 -57
  39. data/lib/square/client.rb +54 -18
  40. data/lib/square/configuration.rb +59 -20
  41. data/lib/square/http/api_response.rb +1 -1
  42. data/lib/square/http/faraday_client.rb +24 -4
  43. data/lib/square/utilities/date_time_helper.rb +151 -0
  44. data/lib/square/utilities/file_wrapper.rb +1 -2
  45. data/lib/square.rb +49 -44
  46. data/test/api/test_locations_api.rb +2 -5
  47. data/test/test_helper.rb +1 -1
  48. metadata +11 -6
  49. data/lib/square/api/v1_employees_api.rb +0 -749
  50. data/lib/square/api/v1_items_api.rb +0 -1766
@@ -5,7 +5,7 @@ module Square
5
5
  super(config, http_call_back: http_call_back)
6
6
  end
7
7
 
8
- # Creates a subscription for a customer to a subscription plan.
8
+ # Creates a subscription to a subscription plan by a customer.
9
9
  # If you provide a card on file in the request, Square charges the card for
10
10
  # the subscription. Otherwise, Square bills an invoice to the customer's
11
11
  # email
@@ -25,7 +25,7 @@ module Square
25
25
  # Prepare headers.
26
26
  _headers = {
27
27
  'accept' => 'application/json',
28
- 'content-type' => 'application/json; charset=utf-8'
28
+ 'Content-Type' => 'application/json'
29
29
  }
30
30
 
31
31
  # Prepare and execute HttpRequest.
@@ -75,7 +75,7 @@ module Square
75
75
  # Prepare headers.
76
76
  _headers = {
77
77
  'accept' => 'application/json',
78
- 'content-type' => 'application/json; charset=utf-8'
78
+ 'Content-Type' => 'application/json'
79
79
  }
80
80
 
81
81
  # Prepare and execute HttpRequest.
@@ -98,8 +98,13 @@ module Square
98
98
  # Retrieves a subscription.
99
99
  # @param [String] subscription_id Required parameter: The ID of the
100
100
  # subscription to retrieve.
101
+ # @param [String] include Optional parameter: A query parameter to specify
102
+ # related information to be included in the response. The supported query
103
+ # parameter values are: - `actions`: to include scheduled actions on the
104
+ # targeted subscription.
101
105
  # @return [RetrieveSubscriptionResponse Hash] response from the API call
102
- def retrieve_subscription(subscription_id:)
106
+ def retrieve_subscription(subscription_id:,
107
+ include: nil)
103
108
  # Prepare query url.
104
109
  _query_builder = config.get_base_uri
105
110
  _query_builder << '/v2/subscriptions/{subscription_id}'
@@ -107,6 +112,10 @@ module Square
107
112
  _query_builder,
108
113
  'subscription_id' => { 'value' => subscription_id, 'encode' => true }
109
114
  )
115
+ _query_builder = APIHelper.append_url_with_query_parameters(
116
+ _query_builder,
117
+ 'include' => include
118
+ )
110
119
  _query_url = APIHelper.clean_url _query_builder
111
120
 
112
121
  # Prepare headers.
@@ -132,7 +141,7 @@ module Square
132
141
 
133
142
  # Updates a subscription. You can set, modify, and clear the
134
143
  # `subscription` field values.
135
- # @param [String] subscription_id Required parameter: The ID for the
144
+ # @param [String] subscription_id Required parameter: The ID of the
136
145
  # subscription to update.
137
146
  # @param [UpdateSubscriptionRequest] body Required parameter: An object
138
147
  # containing the fields to POST for the request. See the corresponding
@@ -152,7 +161,7 @@ module Square
152
161
  # Prepare headers.
153
162
  _headers = {
154
163
  'accept' => 'application/json',
155
- 'content-type' => 'application/json; charset=utf-8'
164
+ 'Content-Type' => 'application/json'
156
165
  }
157
166
 
158
167
  # Prepare and execute HttpRequest.
@@ -172,8 +181,50 @@ module Square
172
181
  )
173
182
  end
174
183
 
175
- # Sets the `canceled_date` field to the end of the active billing period.
176
- # After this date, the status changes from ACTIVE to CANCELED.
184
+ # Deletes a scheduled action for a subscription.
185
+ # @param [String] subscription_id Required parameter: The ID of the
186
+ # subscription the targeted action is to act upon.
187
+ # @param [String] action_id Required parameter: The ID of the targeted
188
+ # action to be deleted.
189
+ # @return [DeleteSubscriptionActionResponse Hash] response from the API call
190
+ def delete_subscription_action(subscription_id:,
191
+ action_id:)
192
+ # Prepare query url.
193
+ _query_builder = config.get_base_uri
194
+ _query_builder << '/v2/subscriptions/{subscription_id}/actions/{action_id}'
195
+ _query_builder = APIHelper.append_url_with_template_parameters(
196
+ _query_builder,
197
+ 'subscription_id' => { 'value' => subscription_id, 'encode' => true },
198
+ 'action_id' => { 'value' => action_id, 'encode' => true }
199
+ )
200
+ _query_url = APIHelper.clean_url _query_builder
201
+
202
+ # Prepare headers.
203
+ _headers = {
204
+ 'accept' => 'application/json'
205
+ }
206
+
207
+ # Prepare and execute HttpRequest.
208
+ _request = config.http_client.delete(
209
+ _query_url,
210
+ headers: _headers
211
+ )
212
+ OAuth2.apply(config, _request)
213
+ _response = execute_request(_request)
214
+
215
+ # Return appropriate response type.
216
+ decoded = APIHelper.json_deserialize(_response.raw_body)
217
+ _errors = APIHelper.map_response(decoded, ['errors'])
218
+ ApiResponse.new(
219
+ _response, data: decoded, errors: _errors
220
+ )
221
+ end
222
+
223
+ # Schedules a `CANCEL` action to cancel an active subscription
224
+ # by setting the `canceled_date` field to the end of the active billing
225
+ # period
226
+ # and changing the subscription status from ACTIVE to CANCELED after this
227
+ # date.
177
228
  # @param [String] subscription_id Required parameter: The ID of the
178
229
  # subscription to cancel.
179
230
  # @return [CancelSubscriptionResponse Hash] response from the API call
@@ -214,13 +265,15 @@ module Square
214
265
  # returned.
215
266
  # @param [String] subscription_id Required parameter: The ID of the
216
267
  # subscription to retrieve the events for.
217
- # @param [String] cursor Optional parameter: A pagination cursor returned by
218
- # a previous call to this endpoint. Provide this to retrieve the next set of
219
- # results for the original query. For more information, see
268
+ # @param [String] cursor Optional parameter: When the total number of
269
+ # resulting subscription events exceeds the limit of a paged response,
270
+ # specify the cursor returned from a preceding response here to fetch the
271
+ # next set of results. If the cursor is unset, the response contains the
272
+ # last page of the results. For more information, see
220
273
  # [Pagination](https://developer.squareup.com/docs/working-with-apis/paginat
221
274
  # ion).
222
275
  # @param [Integer] limit Optional parameter: The upper limit on the number
223
- # of subscription events to return in the response. Default: `200`
276
+ # of subscription events to return in a paged response.
224
277
  # @return [ListSubscriptionEventsResponse Hash] response from the API call
225
278
  def list_subscription_events(subscription_id:,
226
279
  cursor: nil,
@@ -259,5 +312,130 @@ module Square
259
312
  _response, data: decoded, errors: _errors
260
313
  )
261
314
  end
315
+
316
+ # Schedules a `PAUSE` action to pause an active subscription.
317
+ # @param [String] subscription_id Required parameter: The ID of the
318
+ # subscription to pause.
319
+ # @param [PauseSubscriptionRequest] body Required parameter: An object
320
+ # containing the fields to POST for the request. See the corresponding
321
+ # object definition for field details.
322
+ # @return [PauseSubscriptionResponse Hash] response from the API call
323
+ def pause_subscription(subscription_id:,
324
+ body:)
325
+ # Prepare query url.
326
+ _query_builder = config.get_base_uri
327
+ _query_builder << '/v2/subscriptions/{subscription_id}/pause'
328
+ _query_builder = APIHelper.append_url_with_template_parameters(
329
+ _query_builder,
330
+ 'subscription_id' => { 'value' => subscription_id, 'encode' => true }
331
+ )
332
+ _query_url = APIHelper.clean_url _query_builder
333
+
334
+ # Prepare headers.
335
+ _headers = {
336
+ 'accept' => 'application/json',
337
+ 'Content-Type' => 'application/json'
338
+ }
339
+
340
+ # Prepare and execute HttpRequest.
341
+ _request = config.http_client.post(
342
+ _query_url,
343
+ headers: _headers,
344
+ parameters: body.to_json
345
+ )
346
+ OAuth2.apply(config, _request)
347
+ _response = execute_request(_request)
348
+
349
+ # Return appropriate response type.
350
+ decoded = APIHelper.json_deserialize(_response.raw_body)
351
+ _errors = APIHelper.map_response(decoded, ['errors'])
352
+ ApiResponse.new(
353
+ _response, data: decoded, errors: _errors
354
+ )
355
+ end
356
+
357
+ # Schedules a `RESUME` action to resume a paused or a deactivated
358
+ # subscription.
359
+ # @param [String] subscription_id Required parameter: The ID of the
360
+ # subscription to resume.
361
+ # @param [ResumeSubscriptionRequest] body Required parameter: An object
362
+ # containing the fields to POST for the request. See the corresponding
363
+ # object definition for field details.
364
+ # @return [ResumeSubscriptionResponse Hash] response from the API call
365
+ def resume_subscription(subscription_id:,
366
+ body:)
367
+ # Prepare query url.
368
+ _query_builder = config.get_base_uri
369
+ _query_builder << '/v2/subscriptions/{subscription_id}/resume'
370
+ _query_builder = APIHelper.append_url_with_template_parameters(
371
+ _query_builder,
372
+ 'subscription_id' => { 'value' => subscription_id, 'encode' => true }
373
+ )
374
+ _query_url = APIHelper.clean_url _query_builder
375
+
376
+ # Prepare headers.
377
+ _headers = {
378
+ 'accept' => 'application/json',
379
+ 'Content-Type' => 'application/json'
380
+ }
381
+
382
+ # Prepare and execute HttpRequest.
383
+ _request = config.http_client.post(
384
+ _query_url,
385
+ headers: _headers,
386
+ parameters: body.to_json
387
+ )
388
+ OAuth2.apply(config, _request)
389
+ _response = execute_request(_request)
390
+
391
+ # Return appropriate response type.
392
+ decoded = APIHelper.json_deserialize(_response.raw_body)
393
+ _errors = APIHelper.map_response(decoded, ['errors'])
394
+ ApiResponse.new(
395
+ _response, data: decoded, errors: _errors
396
+ )
397
+ end
398
+
399
+ # Schedules a `SWAP_PLAN` action to swap a subscription plan in an existing
400
+ # subscription.
401
+ # @param [String] subscription_id Required parameter: The ID of the
402
+ # subscription to swap the subscription plan for.
403
+ # @param [SwapPlanRequest] body Required parameter: An object containing the
404
+ # fields to POST for the request. See the corresponding object definition
405
+ # for field details.
406
+ # @return [SwapPlanResponse Hash] response from the API call
407
+ def swap_plan(subscription_id:,
408
+ body:)
409
+ # Prepare query url.
410
+ _query_builder = config.get_base_uri
411
+ _query_builder << '/v2/subscriptions/{subscription_id}/swap-plan'
412
+ _query_builder = APIHelper.append_url_with_template_parameters(
413
+ _query_builder,
414
+ 'subscription_id' => { 'value' => subscription_id, 'encode' => true }
415
+ )
416
+ _query_url = APIHelper.clean_url _query_builder
417
+
418
+ # Prepare headers.
419
+ _headers = {
420
+ 'accept' => 'application/json',
421
+ 'Content-Type' => 'application/json'
422
+ }
423
+
424
+ # Prepare and execute HttpRequest.
425
+ _request = config.http_client.post(
426
+ _query_url,
427
+ headers: _headers,
428
+ parameters: body.to_json
429
+ )
430
+ OAuth2.apply(config, _request)
431
+ _response = execute_request(_request)
432
+
433
+ # Return appropriate response type.
434
+ decoded = APIHelper.json_deserialize(_response.raw_body)
435
+ _errors = APIHelper.map_response(decoded, ['errors'])
436
+ ApiResponse.new(
437
+ _response, data: decoded, errors: _errors
438
+ )
439
+ end
262
440
  end
263
441
  end
@@ -5,12 +5,12 @@ module Square
5
5
  super(config, http_call_back: http_call_back)
6
6
  end
7
7
 
8
- # Creates a single `TeamMember` object. The `TeamMember` will be returned on
9
- # successful creates.
8
+ # Creates a single `TeamMember` object. The `TeamMember` object is returned
9
+ # on successful creates.
10
10
  # You must provide the following values in your request to this endpoint:
11
11
  # - `given_name`
12
12
  # - `family_name`
13
- # Learn about [Troubleshooting the Teams
13
+ # Learn about [Troubleshooting the Team
14
14
  # API](https://developer.squareup.com/docs/team/troubleshooting#createteamme
15
15
  # mber).
16
16
  # @param [CreateTeamMemberRequest] body Required parameter: An object
@@ -26,7 +26,7 @@ module Square
26
26
  # Prepare headers.
27
27
  _headers = {
28
28
  'accept' => 'application/json',
29
- 'content-type' => 'application/json; charset=utf-8'
29
+ 'Content-Type' => 'application/json'
30
30
  }
31
31
 
32
32
  # Prepare and execute HttpRequest.
@@ -47,15 +47,15 @@ module Square
47
47
  end
48
48
 
49
49
  # Creates multiple `TeamMember` objects. The created `TeamMember` objects
50
- # will be returned on successful creates.
51
- # This process is non-transactional and will process as much of the request
52
- # as is possible. If one of the creates in
53
- # the request cannot be successfully processed, the request will NOT be
54
- # marked as failed, but the body of the response
55
- # will contain explicit error information for this particular create.
56
- # Learn about [Troubleshooting the Teams
57
- # API](https://developer.squareup.com/docs/team/troubleshooting#bulkcreatete
58
- # ammembers).
50
+ # are returned on successful creates.
51
+ # This process is non-transactional and processes as much of the request as
52
+ # possible. If one of the creates in
53
+ # the request cannot be successfully processed, the request is not marked as
54
+ # failed, but the body of the response
55
+ # contains explicit error information for the failed create.
56
+ # Learn about [Troubleshooting the Team
57
+ # API](https://developer.squareup.com/docs/team/troubleshooting#bulk-create-
58
+ # team-members).
59
59
  # @param [BulkCreateTeamMembersRequest] body Required parameter: An object
60
60
  # containing the fields to POST for the request. See the corresponding
61
61
  # object definition for field details.
@@ -69,7 +69,7 @@ module Square
69
69
  # Prepare headers.
70
70
  _headers = {
71
71
  'accept' => 'application/json',
72
- 'content-type' => 'application/json; charset=utf-8'
72
+ 'Content-Type' => 'application/json'
73
73
  }
74
74
 
75
75
  # Prepare and execute HttpRequest.
@@ -90,15 +90,15 @@ module Square
90
90
  end
91
91
 
92
92
  # Updates multiple `TeamMember` objects. The updated `TeamMember` objects
93
- # will be returned on successful updates.
94
- # This process is non-transactional and will process as much of the request
95
- # as is possible. If one of the updates in
96
- # the request cannot be successfully processed, the request will NOT be
97
- # marked as failed, but the body of the response
98
- # will contain explicit error information for this particular update.
99
- # Learn about [Troubleshooting the Teams
100
- # API](https://developer.squareup.com/docs/team/troubleshooting#bulkupdatete
101
- # ammembers).
93
+ # are returned on successful updates.
94
+ # This process is non-transactional and processes as much of the request as
95
+ # possible. If one of the updates in
96
+ # the request cannot be successfully processed, the request is not marked as
97
+ # failed, but the body of the response
98
+ # contains explicit error information for the failed update.
99
+ # Learn about [Troubleshooting the Team
100
+ # API](https://developer.squareup.com/docs/team/troubleshooting#bulk-update-
101
+ # team-members).
102
102
  # @param [BulkUpdateTeamMembersRequest] body Required parameter: An object
103
103
  # containing the fields to POST for the request. See the corresponding
104
104
  # object definition for field details.
@@ -112,7 +112,7 @@ module Square
112
112
  # Prepare headers.
113
113
  _headers = {
114
114
  'accept' => 'application/json',
115
- 'content-type' => 'application/json; charset=utf-8'
115
+ 'Content-Type' => 'application/json'
116
116
  }
117
117
 
118
118
  # Prepare and execute HttpRequest.
@@ -133,8 +133,8 @@ module Square
133
133
  end
134
134
 
135
135
  # Returns a paginated list of `TeamMember` objects for a business.
136
- # The list to be returned can be filtered by:
137
- # - location IDs **and**
136
+ # The list can be filtered by the following:
137
+ # - location IDs
138
138
  # - `status`
139
139
  # @param [SearchTeamMembersRequest] body Required parameter: An object
140
140
  # containing the fields to POST for the request. See the corresponding
@@ -149,7 +149,7 @@ module Square
149
149
  # Prepare headers.
150
150
  _headers = {
151
151
  'accept' => 'application/json',
152
- 'content-type' => 'application/json; charset=utf-8'
152
+ 'Content-Type' => 'application/json'
153
153
  }
154
154
 
155
155
  # Prepare and execute HttpRequest.
@@ -169,10 +169,10 @@ module Square
169
169
  )
170
170
  end
171
171
 
172
- # Retrieve a `TeamMember` object for the given `TeamMember.id`.
173
- # Learn about [Troubleshooting the Teams
174
- # API](https://developer.squareup.com/docs/team/troubleshooting#retrieveteam
175
- # member).
172
+ # Retrieves a `TeamMember` object for the given `TeamMember.id`.
173
+ # Learn about [Troubleshooting the Team
174
+ # API](https://developer.squareup.com/docs/team/troubleshooting#retrieve-a-t
175
+ # eam-member).
176
176
  # @param [String] team_member_id Required parameter: The ID of the team
177
177
  # member to retrieve.
178
178
  # @return [RetrieveTeamMemberResponse Hash] response from the API call
@@ -207,11 +207,11 @@ module Square
207
207
  )
208
208
  end
209
209
 
210
- # Updates a single `TeamMember` object. The `TeamMember` will be returned on
211
- # successful updates.
212
- # Learn about [Troubleshooting the Teams
213
- # API](https://developer.squareup.com/docs/team/troubleshooting#updateteamme
214
- # mber).
210
+ # Updates a single `TeamMember` object. The `TeamMember` object is returned
211
+ # on successful updates.
212
+ # Learn about [Troubleshooting the Team
213
+ # API](https://developer.squareup.com/docs/team/troubleshooting#update-a-tea
214
+ # m-member).
215
215
  # @param [String] team_member_id Required parameter: The ID of the team
216
216
  # member to update.
217
217
  # @param [UpdateTeamMemberRequest] body Required parameter: An object
@@ -232,7 +232,7 @@ module Square
232
232
  # Prepare headers.
233
233
  _headers = {
234
234
  'accept' => 'application/json',
235
- 'content-type' => 'application/json; charset=utf-8'
235
+ 'Content-Type' => 'application/json'
236
236
  }
237
237
 
238
238
  # Prepare and execute HttpRequest.
@@ -252,13 +252,13 @@ module Square
252
252
  )
253
253
  end
254
254
 
255
- # Retrieve a `WageSetting` object for a team member specified
255
+ # Retrieves a `WageSetting` object for a team member specified
256
256
  # by `TeamMember.id`.
257
- # Learn about [Troubleshooting the Teams
257
+ # Learn about [Troubleshooting the Team
258
258
  # API](https://developer.squareup.com/docs/team/troubleshooting#retrievewage
259
259
  # setting).
260
260
  # @param [String] team_member_id Required parameter: The ID of the team
261
- # member to retrieve wage setting for
261
+ # member for which to retrieve the wage setting.
262
262
  # @return [RetrieveWageSettingResponse Hash] response from the API call
263
263
  def retrieve_wage_setting(team_member_id:)
264
264
  # Prepare query url.
@@ -295,12 +295,12 @@ module Square
295
295
  # `WageSetting` with the specified `team_member_id` does not exist.
296
296
  # Otherwise,
297
297
  # it fully replaces the `WageSetting` object for the team member.
298
- # The `WageSetting` will be returned upon successful update.
299
- # Learn about [Troubleshooting the Teams
300
- # API](https://developer.squareup.com/docs/team/troubleshooting#updatewagese
301
- # tting).
298
+ # The `WageSetting` is returned on a successful update.
299
+ # Learn about [Troubleshooting the Team
300
+ # API](https://developer.squareup.com/docs/team/troubleshooting#create-or-up
301
+ # date-a-wage-setting).
302
302
  # @param [String] team_member_id Required parameter: The ID of the team
303
- # member to update the `WageSetting` object for.
303
+ # member for which to update the `WageSetting` object.
304
304
  # @param [UpdateWageSettingRequest] body Required parameter: An object
305
305
  # containing the fields to POST for the request. See the corresponding
306
306
  # object definition for field details.
@@ -319,7 +319,7 @@ module Square
319
319
  # Prepare headers.
320
320
  _headers = {
321
321
  'accept' => 'application/json',
322
- 'content-type' => 'application/json; charset=utf-8'
322
+ 'Content-Type' => 'application/json'
323
323
  }
324
324
 
325
325
  # Prepare and execute HttpRequest.
@@ -5,8 +5,9 @@ module Square
5
5
  super(config, http_call_back: http_call_back)
6
6
  end
7
7
 
8
- # Creates a new Terminal checkout request and sends it to the specified
9
- # device to take a payment for the requested amount.
8
+ # Creates a Terminal checkout request and sends it to the specified device
9
+ # to take a payment
10
+ # for the requested amount.
10
11
  # @param [CreateTerminalCheckoutRequest] body Required parameter: An object
11
12
  # containing the fields to POST for the request. See the corresponding
12
13
  # object definition for field details.
@@ -20,7 +21,7 @@ module Square
20
21
  # Prepare headers.
21
22
  _headers = {
22
23
  'accept' => 'application/json',
23
- 'content-type' => 'application/json; charset=utf-8'
24
+ 'Content-Type' => 'application/json'
24
25
  }
25
26
 
26
27
  # Prepare and execute HttpRequest.
@@ -55,7 +56,7 @@ module Square
55
56
  # Prepare headers.
56
57
  _headers = {
57
58
  'accept' => 'application/json',
58
- 'content-type' => 'application/json; charset=utf-8'
59
+ 'Content-Type' => 'application/json'
59
60
  }
60
61
 
61
62
  # Prepare and execute HttpRequest.
@@ -75,9 +76,9 @@ module Square
75
76
  )
76
77
  end
77
78
 
78
- # Retrieves a Terminal checkout request by checkout_id.
79
- # @param [String] checkout_id Required parameter: Unique ID for the desired
80
- # `TerminalCheckout`
79
+ # Retrieves a Terminal checkout request by `checkout_id`.
80
+ # @param [String] checkout_id Required parameter: The unique ID for the
81
+ # desired `TerminalCheckout`.
81
82
  # @return [GetTerminalCheckoutResponse Hash] response from the API call
82
83
  def get_terminal_checkout(checkout_id:)
83
84
  # Prepare query url.
@@ -112,8 +113,8 @@ module Square
112
113
 
113
114
  # Cancels a Terminal checkout request if the status of the request permits
114
115
  # it.
115
- # @param [String] checkout_id Required parameter: Unique ID for the desired
116
- # `TerminalCheckout`
116
+ # @param [String] checkout_id Required parameter: The unique ID for the
117
+ # desired `TerminalCheckout`.
117
118
  # @return [CancelTerminalCheckoutResponse Hash] response from the API call
118
119
  def cancel_terminal_checkout(checkout_id:)
119
120
  # Prepare query url.
@@ -161,7 +162,7 @@ module Square
161
162
  # Prepare headers.
162
163
  _headers = {
163
164
  'accept' => 'application/json',
164
- 'content-type' => 'application/json; charset=utf-8'
165
+ 'Content-Type' => 'application/json'
165
166
  }
166
167
 
167
168
  # Prepare and execute HttpRequest.
@@ -181,7 +182,7 @@ module Square
181
182
  )
182
183
  end
183
184
 
184
- # Retrieves a filtered list of Terminal Interac refund requests created by
185
+ # Retrieves a filtered list of Interac Terminal refund requests created by
185
186
  # the seller making the request.
186
187
  # @param [SearchTerminalRefundsRequest] body Required parameter: An object
187
188
  # containing the fields to POST for the request. See the corresponding
@@ -196,7 +197,7 @@ module Square
196
197
  # Prepare headers.
197
198
  _headers = {
198
199
  'accept' => 'application/json',
199
- 'content-type' => 'application/json; charset=utf-8'
200
+ 'Content-Type' => 'application/json'
200
201
  }
201
202
 
202
203
  # Prepare and execute HttpRequest.
@@ -216,9 +217,9 @@ module Square
216
217
  )
217
218
  end
218
219
 
219
- # Retrieves an Interac terminal refund object by ID.
220
- # @param [String] terminal_refund_id Required parameter: Unique ID for the
221
- # desired `TerminalRefund`
220
+ # Retrieves an Interac Terminal refund object by ID.
221
+ # @param [String] terminal_refund_id Required parameter: The unique ID for
222
+ # the desired `TerminalRefund`.
222
223
  # @return [GetTerminalRefundResponse Hash] response from the API call
223
224
  def get_terminal_refund(terminal_refund_id:)
224
225
  # Prepare query url.
@@ -251,10 +252,10 @@ module Square
251
252
  )
252
253
  end
253
254
 
254
- # Cancels an Interac terminal refund request by refund request ID if the
255
+ # Cancels an Interac Terminal refund request by refund request ID if the
255
256
  # status of the request permits it.
256
- # @param [String] terminal_refund_id Required parameter: Unique ID for the
257
- # desired `TerminalRefund`
257
+ # @param [String] terminal_refund_id Required parameter: The unique ID for
258
+ # the desired `TerminalRefund`.
258
259
  # @return [CancelTerminalRefundResponse Hash] response from the API call
259
260
  def cancel_terminal_refund(terminal_refund_id:)
260
261
  # Prepare query url.