square.rb 15.0.0.20211020 → 16.0.0.20211117

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
  }
56
56
 
57
57
  # Prepare and execute HttpRequest.
@@ -130,7 +130,7 @@ module Square
130
130
  # Prepare headers.
131
131
  _headers = {
132
132
  'accept' => 'application/json',
133
- 'content-type' => 'application/json; charset=utf-8'
133
+ 'Content-Type' => 'application/json'
134
134
  }
135
135
 
136
136
  # 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.
@@ -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.
@@ -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.
@@ -107,7 +107,7 @@ module Square
107
107
  # Prepare headers.
108
108
  _headers = {
109
109
  'accept' => 'application/json',
110
- 'content-type' => 'application/json; charset=utf-8'
110
+ 'Content-Type' => 'application/json'
111
111
  }
112
112
 
113
113
  # Prepare and execute HttpRequest.
@@ -155,7 +155,7 @@ module Square
155
155
  # Prepare headers.
156
156
  _headers = {
157
157
  'accept' => 'application/json',
158
- 'content-type' => 'application/json; charset=utf-8'
158
+ 'Content-Type' => 'application/json'
159
159
  }
160
160
 
161
161
  # Prepare and execute HttpRequest.
@@ -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.
@@ -314,7 +314,7 @@ module Square
314
314
  # Prepare headers.
315
315
  _headers = {
316
316
  'accept' => 'application/json',
317
- 'content-type' => 'application/json; charset=utf-8'
317
+ 'Content-Type' => 'application/json'
318
318
  }
319
319
 
320
320
  # Prepare and execute HttpRequest.
@@ -105,7 +105,7 @@ module Square
105
105
  # Prepare headers.
106
106
  _headers = {
107
107
  'accept' => 'application/json',
108
- 'content-type' => 'application/json; charset=utf-8'
108
+ 'Content-Type' => 'application/json'
109
109
  }
110
110
 
111
111
  # Prepare and execute HttpRequest.
@@ -5,7 +5,8 @@ module Square
5
5
  super(config, http_call_back: http_call_back)
6
6
  end
7
7
 
8
- # Lists the Square Online sites that belong to a seller.
8
+ # Lists the Square Online sites that belong to a seller. Sites are listed in
9
+ # descending order by the `created_at` date.
9
10
  # __Note:__ Square Online APIs are publicly available as part of an early
10
11
  # access program. For more information, see [Early access program for Square
11
12
  # Online
@@ -123,7 +123,7 @@ module Square
123
123
  # Prepare headers.
124
124
  _headers = {
125
125
  'accept' => 'application/json',
126
- 'content-type' => 'application/json; charset=utf-8'
126
+ 'Content-Type' => 'application/json'
127
127
  }
128
128
 
129
129
  # Prepare and execute HttpRequest.
@@ -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,
@@ -260,11 +313,57 @@ module Square
260
313
  )
261
314
  end
262
315
 
263
- # Resumes a deactivated subscription.
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.
264
359
  # @param [String] subscription_id Required parameter: The ID of the
265
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.
266
364
  # @return [ResumeSubscriptionResponse Hash] response from the API call
267
- def resume_subscription(subscription_id:)
365
+ def resume_subscription(subscription_id:,
366
+ body:)
268
367
  # Prepare query url.
269
368
  _query_builder = config.get_base_uri
270
369
  _query_builder << '/v2/subscriptions/{subscription_id}/resume'
@@ -276,13 +375,57 @@ module Square
276
375
 
277
376
  # Prepare headers.
278
377
  _headers = {
279
- 'accept' => 'application/json'
378
+ 'accept' => 'application/json',
379
+ 'Content-Type' => 'application/json'
280
380
  }
281
381
 
282
382
  # Prepare and execute HttpRequest.
283
383
  _request = config.http_client.post(
284
384
  _query_url,
285
- headers: _headers
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
286
429
  )
287
430
  OAuth2.apply(config, _request)
288
431
  _response = execute_request(_request)
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -21,7 +21,7 @@ module Square
21
21
  # Prepare headers.
22
22
  _headers = {
23
23
  'accept' => 'application/json',
24
- 'content-type' => 'application/json; charset=utf-8'
24
+ 'Content-Type' => 'application/json'
25
25
  }
26
26
 
27
27
  # Prepare and execute HttpRequest.
@@ -56,7 +56,7 @@ module Square
56
56
  # Prepare headers.
57
57
  _headers = {
58
58
  'accept' => 'application/json',
59
- 'content-type' => 'application/json; charset=utf-8'
59
+ 'Content-Type' => 'application/json'
60
60
  }
61
61
 
62
62
  # Prepare and execute HttpRequest.
@@ -162,7 +162,7 @@ module Square
162
162
  # Prepare headers.
163
163
  _headers = {
164
164
  'accept' => 'application/json',
165
- 'content-type' => 'application/json; charset=utf-8'
165
+ 'Content-Type' => 'application/json'
166
166
  }
167
167
 
168
168
  # Prepare and execute HttpRequest.
@@ -197,7 +197,7 @@ module Square
197
197
  # Prepare headers.
198
198
  _headers = {
199
199
  'accept' => 'application/json',
200
- 'content-type' => 'application/json; charset=utf-8'
200
+ 'Content-Type' => 'application/json'
201
201
  }
202
202
 
203
203
  # Prepare and execute HttpRequest.
@@ -127,7 +127,7 @@ module Square
127
127
  # Prepare headers.
128
128
  _headers = {
129
129
  'accept' => 'application/json',
130
- 'content-type' => 'application/json; charset=utf-8'
130
+ 'Content-Type' => 'application/json'
131
131
  }
132
132
 
133
133
  # Prepare and execute HttpRequest.
@@ -369,7 +369,7 @@ module Square
369
369
  # Prepare headers.
370
370
  _headers = {
371
371
  'accept' => 'application/json',
372
- 'content-type' => 'application/json; charset=utf-8'
372
+ 'Content-Type' => 'application/json'
373
373
  }
374
374
 
375
375
  # Prepare and execute HttpRequest.
data/lib/square/client.rb CHANGED
@@ -4,7 +4,7 @@ module Square
4
4
  attr_reader :config
5
5
 
6
6
  def sdk_version
7
- '15.0.0.20211020'
7
+ '16.0.0.20211117'
8
8
  end
9
9
 
10
10
  def square_version
@@ -214,7 +214,7 @@ module Square
214
214
  retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
215
215
  retry_methods: %i[get put], environment: 'production',
216
216
  custom_url: 'https://connect.squareup.com',
217
- square_version: '2021-10-20', access_token: '',
217
+ square_version: '2021-11-17', access_token: '',
218
218
  additional_headers: {}, config: nil)
219
219
  @config = if config.nil?
220
220
  Configuration.new(http_client_instance: http_client_instance,
@@ -20,7 +20,7 @@ module Square
20
20
  retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
21
21
  retry_methods: %i[get put], environment: 'production',
22
22
  custom_url: 'https://connect.squareup.com',
23
- square_version: '2021-10-20', access_token: '',
23
+ square_version: '2021-11-17', access_token: '',
24
24
  additional_headers: {})
25
25
  # The Http Client passed from the sdk user for making requests
26
26
  @http_client_instance = http_client_instance