square.rb 14.1.0.20210915 → 17.0.0.20211215

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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +23 -20
  4. data/lib/square/api/apple_pay_api.rb +1 -1
  5. data/lib/square/api/base_api.rb +8 -4
  6. data/lib/square/api/bookings_api.rb +64 -4
  7. data/lib/square/api/cards_api.rb +1 -1
  8. data/lib/square/api/catalog_api.rb +109 -34
  9. data/lib/square/api/checkout_api.rb +1 -1
  10. data/lib/square/api/customer_groups_api.rb +3 -3
  11. data/lib/square/api/customer_segments_api.rb +1 -1
  12. data/lib/square/api/customers_api.rb +5 -5
  13. data/lib/square/api/devices_api.rb +1 -1
  14. data/lib/square/api/disputes_api.rb +1 -1
  15. data/lib/square/api/gift_card_activities_api.rb +26 -20
  16. data/lib/square/api/gift_cards_api.rb +29 -24
  17. data/lib/square/api/inventory_api.rb +6 -6
  18. data/lib/square/api/invoices_api.rb +5 -5
  19. data/lib/square/api/labor_api.rb +6 -6
  20. data/lib/square/api/locations_api.rb +20 -12
  21. data/lib/square/api/loyalty_api.rb +9 -9
  22. data/lib/square/api/mobile_authorization_api.rb +4 -4
  23. data/lib/square/api/o_auth_api.rb +10 -10
  24. data/lib/square/api/orders_api.rb +7 -7
  25. data/lib/square/api/payments_api.rb +12 -6
  26. data/lib/square/api/refunds_api.rb +1 -1
  27. data/lib/square/api/sites_api.rb +2 -1
  28. data/lib/square/api/snippets_api.rb +1 -1
  29. data/lib/square/api/subscriptions_api.rb +159 -16
  30. data/lib/square/api/team_api.rb +6 -6
  31. data/lib/square/api/terminal_api.rb +4 -4
  32. data/lib/square/api/transactions_api.rb +0 -188
  33. data/lib/square/api/v1_transactions_api.rb +2 -2
  34. data/lib/square/client.rb +12 -6
  35. data/lib/square/configuration.rb +23 -15
  36. data/lib/square/http/api_response.rb +1 -1
  37. data/lib/square/http/faraday_client.rb +20 -1
  38. data/test/api/test_locations_api.rb +2 -5
  39. data/test/test_helper.rb +1 -1
  40. metadata +2 -5
@@ -13,29 +13,35 @@ module Square
13
13
  # for a gift card,
14
14
  # for all gift cards in a specific region, or for activities within a time
15
15
  # window.
16
- # @param [String] gift_card_id Optional parameter: If you provide a gift
17
- # card ID, the endpoint returns activities that belong to the specified
18
- # gift card. Otherwise, the endpoint returns all gift card activities for
19
- # the seller.
20
- # @param [String] type Optional parameter: If you provide a type, the
21
- # endpoint returns gift card activities of this type. Otherwise, the
22
- # endpoint returns all types of gift card activities.
23
- # @param [String] location_id Optional parameter: If you provide a location
24
- # ID, the endpoint returns gift card activities for that location.
25
- # Otherwise, the endpoint returns gift card activities for all locations.
16
+ # @param [String] gift_card_id Optional parameter: If a gift card ID is
17
+ # provided, the endpoint returns activities related to the specified gift
18
+ # card. Otherwise, the endpoint returns all gift card activities for the
19
+ # seller.
20
+ # @param [String] type Optional parameter: If a
21
+ # [type]($m/GiftCardActivityType) is provided, the endpoint returns gift
22
+ # card activities of the specified type. Otherwise, the endpoint returns
23
+ # all types of gift card activities.
24
+ # @param [String] location_id Optional parameter: If a location ID is
25
+ # provided, the endpoint returns gift card activities for the specified
26
+ # location. Otherwise, the endpoint returns gift card activities for all
27
+ # locations.
26
28
  # @param [String] begin_time Optional parameter: The timestamp for the
27
- # beginning of the reporting period, in RFC 3339 format. Inclusive. Default:
28
- # The current time minus one year.
29
+ # beginning of the reporting period, in RFC 3339 format. This start time is
30
+ # inclusive. The default value is the current time minus one year.
29
31
  # @param [String] end_time Optional parameter: The timestamp for the end of
30
- # the reporting period, in RFC 3339 format. Inclusive. Default: The current
31
- # time.
32
- # @param [Integer] limit Optional parameter: If you provide a limit value,
33
- # the endpoint returns the specified number of results (or less) per page.
34
- # A maximum value is 100. The default value is 50.
32
+ # the reporting period, in RFC 3339 format. This end time is inclusive. The
33
+ # default value is the current time.
34
+ # @param [Integer] limit Optional parameter: If a limit is provided, the
35
+ # endpoint returns the specified number of results (or fewer) per page. The
36
+ # maximum value is 100. The default value is 50. For more information, see
37
+ # [Pagination](https://developer.squareup.com/docs/working-with-apis/paginat
38
+ # ion).
35
39
  # @param [String] cursor Optional parameter: A pagination cursor returned by
36
40
  # a previous call to this endpoint. Provide this cursor to retrieve the next
37
- # set of results for the original query. If you do not provide the cursor,
38
- # the call returns the first page of the results.
41
+ # set of results for the original query. If a cursor is not provided, the
42
+ # endpoint returns the first page of the results. For more information, see
43
+ # [Pagination](https://developer.squareup.com/docs/working-with-apis/paginat
44
+ # ion).
39
45
  # @param [String] sort_order Optional parameter: The order in which the
40
46
  # endpoint returns the activities, based on `created_at`. - `ASC` - Oldest
41
47
  # to newest. - `DESC` - Newest to oldest (default).
@@ -104,7 +110,7 @@ module Square
104
110
  # Prepare headers.
105
111
  _headers = {
106
112
  'accept' => 'application/json',
107
- 'content-type' => 'application/json; charset=utf-8'
113
+ 'Content-Type' => 'application/json'
108
114
  }
109
115
 
110
116
  # Prepare and execute HttpRequest.
@@ -7,24 +7,26 @@ module Square
7
7
 
8
8
  # Lists all gift cards. You can specify optional filters to retrieve
9
9
  # a subset of the gift cards.
10
- # @param [String] type Optional parameter: If a type is provided, gift cards
11
- # of this type are returned (see [GiftCardType]($m/GiftCardType)). If no
12
- # type is provided, it returns gift cards of all types.
13
- # @param [String] state Optional parameter: If the state is provided, it
14
- # returns the gift cards in the specified state (see
15
- # [GiftCardStatus]($m/GiftCardStatus)). Otherwise, it returns the gift cards
16
- # of all states.
17
- # @param [Integer] limit Optional parameter: If a value is provided, it
18
- # returns only that number of results per page. The maximum number of
19
- # results allowed per page is 50. The default value is 30.
10
+ # @param [String] type Optional parameter: If a [type]($m/GiftCardType) is
11
+ # provided, the endpoint returns gift cards of the specified type.
12
+ # Otherwise, the endpoint returns gift cards of all types.
13
+ # @param [String] state Optional parameter: If a [state]($m/GiftCardStatus)
14
+ # is provided, the endpoint returns the gift cards in the specified state.
15
+ # Otherwise, the endpoint returns the gift cards of all states.
16
+ # @param [Integer] limit Optional parameter: If a limit is provided, the
17
+ # endpoint returns only the specified number of results per page. The
18
+ # maximum value is 50. The default value is 30. For more information, see
19
+ # [Pagination](https://developer.squareup.com/docs/working-with-apis/paginat
20
+ # ion).
20
21
  # @param [String] cursor Optional parameter: A pagination cursor returned by
21
22
  # a previous call to this endpoint. Provide this cursor to retrieve the next
22
- # set of results for the original query. If a cursor is not provided, it
23
- # returns the first page of the results. For more information, see
23
+ # set of results for the original query. If a cursor is not provided, the
24
+ # endpoint returns the first page of the results. For more information, see
24
25
  # [Pagination](https://developer.squareup.com/docs/working-with-apis/paginat
25
26
  # ion).
26
- # @param [String] customer_id Optional parameter: If a value is provided,
27
- # returns only the gift cards linked to the specified customer
27
+ # @param [String] customer_id Optional parameter: If a customer ID is
28
+ # provided, the endpoint returns only the gift cards linked to the specified
29
+ # customer.
28
30
  # @return [ListGiftCardsResponse Hash] response from the API call
29
31
  def list_gift_cards(type: nil,
30
32
  state: nil,
@@ -84,7 +86,7 @@ module Square
84
86
  # Prepare headers.
85
87
  _headers = {
86
88
  'accept' => 'application/json',
87
- 'content-type' => 'application/json; charset=utf-8'
89
+ 'Content-Type' => 'application/json'
88
90
  }
89
91
 
90
92
  # Prepare and execute HttpRequest.
@@ -118,7 +120,7 @@ module Square
118
120
  # Prepare headers.
119
121
  _headers = {
120
122
  'accept' => 'application/json',
121
- 'content-type' => 'application/json; charset=utf-8'
123
+ 'Content-Type' => 'application/json'
122
124
  }
123
125
 
124
126
  # Prepare and execute HttpRequest.
@@ -138,7 +140,7 @@ module Square
138
140
  )
139
141
  end
140
142
 
141
- # Retrieves a gift card using a nonce (a secure token) that represents the
143
+ # Retrieves a gift card using a secure payment token that represents the
142
144
  # gift card.
143
145
  # @param [RetrieveGiftCardFromNonceRequest] body Required parameter: An
144
146
  # object containing the fields to POST for the request. See the
@@ -153,7 +155,7 @@ module Square
153
155
  # Prepare headers.
154
156
  _headers = {
155
157
  'accept' => 'application/json',
156
- 'content-type' => 'application/json; charset=utf-8'
158
+ 'Content-Type' => 'application/json'
157
159
  }
158
160
 
159
161
  # Prepare and execute HttpRequest.
@@ -173,9 +175,10 @@ module Square
173
175
  )
174
176
  end
175
177
 
176
- # Links a customer to a gift card
178
+ # Links a customer to a gift card, which is also referred to as adding a
179
+ # card on file.
177
180
  # @param [String] gift_card_id Required parameter: The ID of the gift card
178
- # to link.
181
+ # to be linked.
179
182
  # @param [LinkCustomerToGiftCardRequest] body Required parameter: An object
180
183
  # containing the fields to POST for the request. See the corresponding
181
184
  # object definition for field details.
@@ -194,7 +197,7 @@ module Square
194
197
  # Prepare headers.
195
198
  _headers = {
196
199
  'accept' => 'application/json',
197
- 'content-type' => 'application/json; charset=utf-8'
200
+ 'Content-Type' => 'application/json'
198
201
  }
199
202
 
200
203
  # Prepare and execute HttpRequest.
@@ -214,8 +217,10 @@ module Square
214
217
  )
215
218
  end
216
219
 
217
- # Unlinks a customer from a gift card
218
- # @param [String] gift_card_id Required parameter: Example:
220
+ # Unlinks a customer from a gift card, which is also referred to as removing
221
+ # a card on file.
222
+ # @param [String] gift_card_id Required parameter: The ID of the gift card
223
+ # to be unlinked.
219
224
  # @param [UnlinkCustomerFromGiftCardRequest] body Required parameter: An
220
225
  # object containing the fields to POST for the request. See the
221
226
  # corresponding object definition for field details.
@@ -234,7 +239,7 @@ module Square
234
239
  # Prepare headers.
235
240
  _headers = {
236
241
  'accept' => 'application/json',
237
- 'content-type' => 'application/json; charset=utf-8'
242
+ 'Content-Type' => 'application/json'
238
243
  }
239
244
 
240
245
  # Prepare and execute HttpRequest.
@@ -100,7 +100,7 @@ module Square
100
100
  # Prepare headers.
101
101
  _headers = {
102
102
  'accept' => 'application/json',
103
- 'content-type' => 'application/json; charset=utf-8'
103
+ 'Content-Type' => 'application/json'
104
104
  }
105
105
 
106
106
  # Prepare and execute HttpRequest.
@@ -139,7 +139,7 @@ module Square
139
139
  # Prepare headers.
140
140
  _headers = {
141
141
  'accept' => 'application/json',
142
- 'content-type' => 'application/json; charset=utf-8'
142
+ 'Content-Type' => 'application/json'
143
143
  }
144
144
 
145
145
  # Prepare and execute HttpRequest.
@@ -178,7 +178,7 @@ module Square
178
178
  # Prepare headers.
179
179
  _headers = {
180
180
  'accept' => 'application/json',
181
- 'content-type' => 'application/json; charset=utf-8'
181
+ 'Content-Type' => 'application/json'
182
182
  }
183
183
 
184
184
  # Prepare and execute HttpRequest.
@@ -215,7 +215,7 @@ module Square
215
215
  # Prepare headers.
216
216
  _headers = {
217
217
  'accept' => 'application/json',
218
- 'content-type' => 'application/json; charset=utf-8'
218
+ 'Content-Type' => 'application/json'
219
219
  }
220
220
 
221
221
  # Prepare and execute HttpRequest.
@@ -254,7 +254,7 @@ module Square
254
254
  # Prepare headers.
255
255
  _headers = {
256
256
  'accept' => 'application/json',
257
- 'content-type' => 'application/json; charset=utf-8'
257
+ 'Content-Type' => 'application/json'
258
258
  }
259
259
 
260
260
  # Prepare and execute HttpRequest.
@@ -297,7 +297,7 @@ module Square
297
297
  # Prepare headers.
298
298
  _headers = {
299
299
  'accept' => 'application/json',
300
- 'content-type' => 'application/json; charset=utf-8'
300
+ 'Content-Type' => 'application/json'
301
301
  }
302
302
 
303
303
  # Prepare and execute HttpRequest.
@@ -72,7 +72,7 @@ module Square
72
72
  # Prepare headers.
73
73
  _headers = {
74
74
  'accept' => 'application/json',
75
- 'content-type' => 'application/json; charset=utf-8'
75
+ 'Content-Type' => 'application/json'
76
76
  }
77
77
 
78
78
  # Prepare and execute HttpRequest.
@@ -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.
@@ -242,7 +242,7 @@ module Square
242
242
  # Prepare headers.
243
243
  _headers = {
244
244
  'accept' => 'application/json',
245
- 'content-type' => 'application/json; charset=utf-8'
245
+ 'Content-Type' => 'application/json'
246
246
  }
247
247
 
248
248
  # Prepare and execute HttpRequest.
@@ -286,7 +286,7 @@ module Square
286
286
  # Prepare headers.
287
287
  _headers = {
288
288
  'accept' => 'application/json',
289
- 'content-type' => 'application/json; charset=utf-8'
289
+ 'Content-Type' => 'application/json'
290
290
  }
291
291
 
292
292
  # Prepare and execute HttpRequest.
@@ -339,7 +339,7 @@ module Square
339
339
  # Prepare headers.
340
340
  _headers = {
341
341
  'accept' => 'application/json',
342
- 'content-type' => 'application/json; charset=utf-8'
342
+ 'Content-Type' => 'application/json'
343
343
  }
344
344
 
345
345
  # Prepare and execute HttpRequest.
@@ -76,7 +76,7 @@ module Square
76
76
  # Prepare headers.
77
77
  _headers = {
78
78
  'accept' => 'application/json',
79
- 'content-type' => 'application/json; charset=utf-8'
79
+ 'Content-Type' => 'application/json'
80
80
  }
81
81
 
82
82
  # Prepare and execute HttpRequest.
@@ -188,7 +188,7 @@ module Square
188
188
  # Prepare headers.
189
189
  _headers = {
190
190
  'accept' => 'application/json',
191
- 'content-type' => 'application/json; charset=utf-8'
191
+ 'Content-Type' => 'application/json'
192
192
  }
193
193
 
194
194
  # Prepare and execute HttpRequest.
@@ -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.
@@ -365,7 +365,7 @@ module Square
365
365
  # Prepare headers.
366
366
  _headers = {
367
367
  'accept' => 'application/json',
368
- 'content-type' => 'application/json; charset=utf-8'
368
+ 'Content-Type' => 'application/json'
369
369
  }
370
370
 
371
371
  # Prepare and execute HttpRequest.
@@ -482,7 +482,7 @@ module Square
482
482
  # Prepare headers.
483
483
  _headers = {
484
484
  'accept' => 'application/json',
485
- 'content-type' => 'application/json; charset=utf-8'
485
+ 'Content-Type' => 'application/json'
486
486
  }
487
487
 
488
488
  # Prepare and execute HttpRequest.
@@ -641,7 +641,7 @@ module Square
641
641
  # Prepare headers.
642
642
  _headers = {
643
643
  'accept' => 'application/json',
644
- 'content-type' => 'application/json; charset=utf-8'
644
+ 'Content-Type' => 'application/json'
645
645
  }
646
646
 
647
647
  # Prepare and execute HttpRequest.
@@ -5,10 +5,8 @@ module Square
5
5
  super(config, http_call_back: http_call_back)
6
6
  end
7
7
 
8
- # Provides information of all locations of a business.
9
- # Many Square API endpoints require a `location_id` parameter.
10
- # The `id` field of the [`Location`]($m/Location) objects returned by this
11
- # endpoint correspond to that `location_id` parameter.
8
+ # Provides details about all of the seller's locations,
9
+ # including those with an inactive status.
12
10
  # @return [ListLocationsResponse Hash] response from the API call
13
11
  def list_locations
14
12
  # Prepare query url.
@@ -37,7 +35,17 @@ module Square
37
35
  )
38
36
  end
39
37
 
40
- # Creates a location.
38
+ # Creates a [location](https://developer.squareup.com/docs/locations-api).
39
+ # Creating new locations allows for separate configuration of receipt
40
+ # layouts, item prices,
41
+ # and sales reports. Developers can use locations to separate sales activity
42
+ # via applications
43
+ # that integrate with Square from sales activity elsewhere in a seller's
44
+ # account.
45
+ # Locations created programmatically with the Locations API will last
46
+ # forever and
47
+ # are visible to the seller for their own management, so ensure that
48
+ # each location has a sensible and unique name.
41
49
  # @param [CreateLocationRequest] body Required parameter: An object
42
50
  # containing the fields to POST for the request. See the corresponding
43
51
  # object definition for field details.
@@ -51,7 +59,7 @@ module Square
51
59
  # Prepare headers.
52
60
  _headers = {
53
61
  'accept' => 'application/json',
54
- 'content-type' => 'application/json; charset=utf-8'
62
+ 'Content-Type' => 'application/json'
55
63
  }
56
64
 
57
65
  # Prepare and execute HttpRequest.
@@ -71,12 +79,12 @@ module Square
71
79
  )
72
80
  end
73
81
 
74
- # Retrieves details of a location. You can specify "main"
75
- # as the location ID to retrieve details of the
76
- # main location.
82
+ # Retrieves details of a single location. Specify "main"
83
+ # as the location ID to retrieve details of the [main
84
+ # location](https://developer.squareup.com/docs/locations-api#about-the-main
85
+ # -location).
77
86
  # @param [String] location_id Required parameter: The ID of the location to
78
- # retrieve. If you specify the string "main", then the endpoint returns the
79
- # main location.
87
+ # retrieve. Specify the string "main" to return the main location.
80
88
  # @return [RetrieveLocationResponse Hash] response from the API call
81
89
  def retrieve_location(location_id:)
82
90
  # Prepare query url.
@@ -130,7 +138,7 @@ module Square
130
138
  # Prepare headers.
131
139
  _headers = {
132
140
  'accept' => 'application/json',
133
- 'content-type' => 'application/json; charset=utf-8'
141
+ 'Content-Type' => 'application/json'
134
142
  }
135
143
 
136
144
  # Prepare and execute HttpRequest.
@@ -20,7 +20,7 @@ module Square
20
20
  # Prepare headers.
21
21
  _headers = {
22
22
  'accept' => 'application/json',
23
- 'content-type' => 'application/json; charset=utf-8'
23
+ 'Content-Type' => 'application/json'
24
24
  }
25
25
 
26
26
  # Prepare and execute HttpRequest.
@@ -58,7 +58,7 @@ module Square
58
58
  # Prepare headers.
59
59
  _headers = {
60
60
  'accept' => 'application/json',
61
- 'content-type' => 'application/json; charset=utf-8'
61
+ 'Content-Type' => 'application/json'
62
62
  }
63
63
 
64
64
  # Prepare and execute HttpRequest.
@@ -150,7 +150,7 @@ module Square
150
150
  # Prepare headers.
151
151
  _headers = {
152
152
  'accept' => 'application/json',
153
- 'content-type' => 'application/json; charset=utf-8'
153
+ 'Content-Type' => 'application/json'
154
154
  }
155
155
 
156
156
  # Prepare and execute HttpRequest.
@@ -195,7 +195,7 @@ module Square
195
195
  # Prepare headers.
196
196
  _headers = {
197
197
  'accept' => 'application/json',
198
- 'content-type' => 'application/json; charset=utf-8'
198
+ 'Content-Type' => 'application/json'
199
199
  }
200
200
 
201
201
  # Prepare and execute HttpRequest.
@@ -236,7 +236,7 @@ module Square
236
236
  # Prepare headers.
237
237
  _headers = {
238
238
  'accept' => 'application/json',
239
- 'content-type' => 'application/json; charset=utf-8'
239
+ 'Content-Type' => 'application/json'
240
240
  }
241
241
 
242
242
  # Prepare and execute HttpRequest.
@@ -372,7 +372,7 @@ module Square
372
372
  # Prepare headers.
373
373
  _headers = {
374
374
  'accept' => 'application/json',
375
- 'content-type' => 'application/json; charset=utf-8'
375
+ 'Content-Type' => 'application/json'
376
376
  }
377
377
 
378
378
  # Prepare and execute HttpRequest.
@@ -413,7 +413,7 @@ module Square
413
413
  # Prepare headers.
414
414
  _headers = {
415
415
  'accept' => 'application/json',
416
- 'content-type' => 'application/json; charset=utf-8'
416
+ 'Content-Type' => 'application/json'
417
417
  }
418
418
 
419
419
  # Prepare and execute HttpRequest.
@@ -452,7 +452,7 @@ module Square
452
452
  # Prepare headers.
453
453
  _headers = {
454
454
  'accept' => 'application/json',
455
- 'content-type' => 'application/json; charset=utf-8'
455
+ 'Content-Type' => 'application/json'
456
456
  }
457
457
 
458
458
  # Prepare and execute HttpRequest.
@@ -576,7 +576,7 @@ module Square
576
576
  # Prepare headers.
577
577
  _headers = {
578
578
  'accept' => 'application/json',
579
- 'content-type' => 'application/json; charset=utf-8'
579
+ 'Content-Type' => 'application/json'
580
580
  }
581
581
 
582
582
  # Prepare and execute HttpRequest.
@@ -6,9 +6,9 @@ module Square
6
6
  end
7
7
 
8
8
  # Generates code to authorize a mobile application to connect to a Square
9
- # card reader
10
- # Authorization codes are one-time-use and expire __60 minutes__ after being
11
- # issued.
9
+ # card reader.
10
+ # Authorization codes are one-time-use codes and expire 60 minutes after
11
+ # being issued.
12
12
  # __Important:__ The `Authorization` header you provide to this endpoint
13
13
  # must have the following format:
14
14
  # ```
@@ -31,7 +31,7 @@ module Square
31
31
  # Prepare headers.
32
32
  _headers = {
33
33
  'accept' => 'application/json',
34
- 'content-type' => 'application/json; charset=utf-8'
34
+ 'Content-Type' => 'application/json'
35
35
  }
36
36
 
37
37
  # Prepare and execute HttpRequest.
@@ -12,11 +12,11 @@ module Square
12
12
  # okens).
13
13
  # Renews an OAuth access token before it expires.
14
14
  # OAuth access tokens besides your application's personal access token
15
- # expire after __30 days__.
16
- # You can also renew expired tokens within __15 days__ of their expiration.
15
+ # expire after 30 days.
16
+ # You can also renew expired tokens within 15 days of their expiration.
17
17
  # You cannot renew an access token that has been expired for more than 15
18
18
  # days.
19
- # Instead, the associated user must re-complete the OAuth flow from the
19
+ # Instead, the associated user must recomplete the OAuth flow from the
20
20
  # beginning.
21
21
  # __Important:__ The `Authorization` header for this endpoint must have the
22
22
  # following format:
@@ -25,10 +25,10 @@ module Square
25
25
  # ```
26
26
  # Replace `APPLICATION_SECRET` with the application secret on the
27
27
  # Credentials
28
- # page in the [developer dashboard](https://developer.squareup.com/apps).
29
- # @param [String] client_id Required parameter: Your application ID,
30
- # available from the OAuth page for your application on the Developer
31
- # Dashboard.
28
+ # page in the [Developer Dashboard](https://developer.squareup.com/apps).
29
+ # @param [String] client_id Required parameter: Your application ID, which
30
+ # is available in the OAuth page in the [Developer
31
+ # Dashboard](https://developer.squareup.com/apps).
32
32
  # @param [RenewTokenRequest] body Required parameter: An object containing
33
33
  # the fields to POST for the request. See the corresponding object
34
34
  # definition for field details.
@@ -51,7 +51,7 @@ module Square
51
51
  # Prepare headers.
52
52
  _headers = {
53
53
  'accept' => 'application/json',
54
- 'content-type' => 'application/json; charset=utf-8',
54
+ 'Content-Type' => 'application/json',
55
55
  'Authorization' => authorization
56
56
  }
57
57
 
@@ -101,7 +101,7 @@ module Square
101
101
  # Prepare headers.
102
102
  _headers = {
103
103
  'accept' => 'application/json',
104
- 'content-type' => 'application/json; charset=utf-8',
104
+ 'Content-Type' => 'application/json',
105
105
  'Authorization' => authorization
106
106
  }
107
107
 
@@ -150,7 +150,7 @@ module Square
150
150
  # Prepare headers.
151
151
  _headers = {
152
152
  'accept' => 'application/json',
153
- 'content-type' => 'application/json; charset=utf-8'
153
+ 'Content-Type' => 'application/json'
154
154
  }
155
155
 
156
156
  # Prepare and execute HttpRequest.
@@ -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.
@@ -62,7 +62,7 @@ module Square
62
62
  # Prepare headers.
63
63
  _headers = {
64
64
  'accept' => 'application/json',
65
- 'content-type' => 'application/json; charset=utf-8'
65
+ 'Content-Type' => 'application/json'
66
66
  }
67
67
 
68
68
  # Prepare and execute HttpRequest.
@@ -96,7 +96,7 @@ module Square
96
96
  # Prepare headers.
97
97
  _headers = {
98
98
  'accept' => 'application/json',
99
- 'content-type' => 'application/json; charset=utf-8'
99
+ 'Content-Type' => 'application/json'
100
100
  }
101
101
 
102
102
  # Prepare and execute HttpRequest.
@@ -133,7 +133,7 @@ module Square
133
133
  # Prepare headers.
134
134
  _headers = {
135
135
  'accept' => 'application/json',
136
- 'content-type' => 'application/json; charset=utf-8'
136
+ 'Content-Type' => 'application/json'
137
137
  }
138
138
 
139
139
  # Prepare and execute HttpRequest.
@@ -183,7 +183,7 @@ module Square
183
183
  # Prepare headers.
184
184
  _headers = {
185
185
  'accept' => 'application/json',
186
- 'content-type' => 'application/json; charset=utf-8'
186
+ 'Content-Type' => 'application/json'
187
187
  }
188
188
 
189
189
  # Prepare and execute HttpRequest.
@@ -276,7 +276,7 @@ module Square
276
276
  # Prepare headers.
277
277
  _headers = {
278
278
  'accept' => 'application/json',
279
- 'content-type' => 'application/json; charset=utf-8'
279
+ 'Content-Type' => 'application/json'
280
280
  }
281
281
 
282
282
  # Prepare and execute HttpRequest.
@@ -335,7 +335,7 @@ module Square
335
335
  # Prepare headers.
336
336
  _headers = {
337
337
  'accept' => 'application/json',
338
- 'content-type' => 'application/json; charset=utf-8'
338
+ 'Content-Type' => 'application/json'
339
339
  }
340
340
 
341
341
  # Prepare and execute HttpRequest.