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.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +23 -20
- data/lib/square/api/apple_pay_api.rb +1 -1
- data/lib/square/api/base_api.rb +8 -4
- data/lib/square/api/bookings_api.rb +64 -4
- data/lib/square/api/cards_api.rb +1 -1
- data/lib/square/api/catalog_api.rb +109 -34
- data/lib/square/api/checkout_api.rb +1 -1
- data/lib/square/api/customer_groups_api.rb +3 -3
- data/lib/square/api/customer_segments_api.rb +1 -1
- data/lib/square/api/customers_api.rb +5 -5
- data/lib/square/api/devices_api.rb +1 -1
- data/lib/square/api/disputes_api.rb +1 -1
- data/lib/square/api/gift_card_activities_api.rb +26 -20
- data/lib/square/api/gift_cards_api.rb +29 -24
- data/lib/square/api/inventory_api.rb +6 -6
- data/lib/square/api/invoices_api.rb +5 -5
- data/lib/square/api/labor_api.rb +6 -6
- data/lib/square/api/locations_api.rb +20 -12
- data/lib/square/api/loyalty_api.rb +9 -9
- data/lib/square/api/mobile_authorization_api.rb +4 -4
- data/lib/square/api/o_auth_api.rb +10 -10
- data/lib/square/api/orders_api.rb +7 -7
- data/lib/square/api/payments_api.rb +12 -6
- data/lib/square/api/refunds_api.rb +1 -1
- data/lib/square/api/sites_api.rb +2 -1
- data/lib/square/api/snippets_api.rb +1 -1
- data/lib/square/api/subscriptions_api.rb +159 -16
- data/lib/square/api/team_api.rb +6 -6
- data/lib/square/api/terminal_api.rb +4 -4
- data/lib/square/api/transactions_api.rb +0 -188
- data/lib/square/api/v1_transactions_api.rb +2 -2
- data/lib/square/client.rb +12 -6
- data/lib/square/configuration.rb +23 -15
- data/lib/square/http/api_response.rb +1 -1
- data/lib/square/http/faraday_client.rb +20 -1
- data/test/api/test_locations_api.rb +2 -5
- data/test/test_helper.rb +1 -1
- 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
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
# @param [String] type Optional parameter: If
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
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.
|
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.
|
31
|
-
# time.
|
32
|
-
# @param [Integer] limit Optional parameter: If
|
33
|
-
#
|
34
|
-
#
|
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
|
38
|
-
#
|
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
|
-
'
|
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
|
11
|
-
#
|
12
|
-
#
|
13
|
-
# @param [String] state Optional parameter: If
|
14
|
-
# returns the gift cards in the specified state
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
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,
|
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
|
27
|
-
# returns only the gift cards linked to the specified
|
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
|
-
'
|
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
|
-
'
|
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
|
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
|
-
'
|
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
|
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
|
-
'
|
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
|
-
#
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
342
|
+
'Content-Type' => 'application/json'
|
343
343
|
}
|
344
344
|
|
345
345
|
# Prepare and execute HttpRequest.
|
data/lib/square/api/labor_api.rb
CHANGED
@@ -76,7 +76,7 @@ module Square
|
|
76
76
|
# Prepare headers.
|
77
77
|
_headers = {
|
78
78
|
'accept' => 'application/json',
|
79
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
9
|
-
#
|
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
|
-
'
|
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.
|
75
|
-
# as the location ID to retrieve details of the
|
76
|
-
#
|
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.
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
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
|
-
'
|
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
|
16
|
-
# You can also renew expired tokens within
|
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
|
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 [
|
29
|
-
# @param [String] client_id Required parameter: Your application ID,
|
30
|
-
# available
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
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
|
-
'
|
338
|
+
'Content-Type' => 'application/json'
|
339
339
|
}
|
340
340
|
|
341
341
|
# Prepare and execute HttpRequest.
|