square.rb 5.2.2.20200422 → 6.3.0.20200826
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 +317 -285
- data/lib/square.rb +5 -2
- data/lib/square/api/base_api.rb +2 -2
- data/lib/square/api/catalog_api.rb +76 -57
- data/lib/square/api/customers_api.rb +16 -3
- data/lib/square/api/disputes_api.rb +1 -11
- data/lib/square/api/employees_api.rb +3 -2
- data/lib/square/api/inventory_api.rb +5 -4
- data/lib/square/api/invoices_api.rb +358 -0
- data/lib/square/api/labor_api.rb +77 -0
- data/lib/square/api/locations_api.rb +7 -2
- data/lib/square/api/loyalty_api.rb +543 -0
- data/lib/square/api/merchants_api.rb +2 -1
- data/lib/square/api/orders_api.rb +70 -56
- data/lib/square/api/payments_api.rb +3 -9
- data/lib/square/api/refunds_api.rb +3 -2
- data/lib/square/api/subscriptions_api.rb +251 -0
- data/lib/square/api/team_api.rb +326 -0
- data/lib/square/api/transactions_api.rb +0 -71
- data/lib/square/api/v1_employees_api.rb +3 -76
- data/lib/square/api/v1_items_api.rb +0 -360
- data/lib/square/api/v1_locations_api.rb +0 -18
- data/lib/square/api/v1_transactions_api.rb +1 -19
- data/lib/square/client.rb +35 -16
- data/lib/square/configuration.rb +12 -4
- metadata +7 -4
- data/lib/square/api/reporting_api.rb +0 -138
@@ -0,0 +1,326 @@
|
|
1
|
+
module Square
|
2
|
+
# TeamApi
|
3
|
+
class TeamApi < BaseApi
|
4
|
+
def initialize(config, http_call_back: nil)
|
5
|
+
super(config, http_call_back: http_call_back)
|
6
|
+
end
|
7
|
+
|
8
|
+
# Creates a single `TeamMember` object. The `TeamMember` will be returned on
|
9
|
+
# successful creates.
|
10
|
+
# You must provide the following values in your request to this endpoint:
|
11
|
+
# - `first_name`
|
12
|
+
# - `last_name`
|
13
|
+
# Learn about [Troubleshooting the Teams
|
14
|
+
# API](https://developer.squareup.com/docs/docs/team/troubleshooting#createt
|
15
|
+
# eammember).
|
16
|
+
# @param [CreateTeamMemberRequest] body Required parameter: An object
|
17
|
+
# containing the fields to POST for the request. See the corresponding
|
18
|
+
# object definition for field details.
|
19
|
+
# @return [CreateTeamMemberResponse Hash] response from the API call
|
20
|
+
def create_team_member(body:)
|
21
|
+
# Prepare query url.
|
22
|
+
_query_builder = config.get_base_uri
|
23
|
+
_query_builder << '/v2/team-members'
|
24
|
+
_query_url = APIHelper.clean_url _query_builder
|
25
|
+
|
26
|
+
# Prepare headers.
|
27
|
+
_headers = {
|
28
|
+
'accept' => 'application/json',
|
29
|
+
'content-type' => 'application/json; charset=utf-8'
|
30
|
+
}
|
31
|
+
|
32
|
+
# Prepare and execute HttpRequest.
|
33
|
+
_request = config.http_client.post(
|
34
|
+
_query_url,
|
35
|
+
headers: _headers,
|
36
|
+
parameters: body.to_json
|
37
|
+
)
|
38
|
+
OAuth2.apply(config, _request)
|
39
|
+
_response = execute_request(_request)
|
40
|
+
|
41
|
+
# Return appropriate response type.
|
42
|
+
decoded = APIHelper.json_deserialize(_response.raw_body)
|
43
|
+
_errors = APIHelper.map_response(decoded, ['errors'])
|
44
|
+
ApiResponse.new(_response, data: decoded, errors: _errors)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Creates multiple `TeamMember` objects. The created `TeamMember` objects
|
48
|
+
# will be returned on successful creates.
|
49
|
+
# This process is non-transactional and will process as much of the request
|
50
|
+
# as is possible. If one of the creates in
|
51
|
+
# the request cannot be successfully processed, the request will NOT be
|
52
|
+
# marked as failed, but the body of the response
|
53
|
+
# will contain explicit error information for this particular create.
|
54
|
+
# Learn about [Troubleshooting the Teams
|
55
|
+
# API](https://developer.squareup.com/docs/docs/team/troubleshooting#bulkcre
|
56
|
+
# ateteammembers).
|
57
|
+
# @param [BulkCreateTeamMembersRequest] body Required parameter: An object
|
58
|
+
# containing the fields to POST for the request. See the corresponding
|
59
|
+
# object definition for field details.
|
60
|
+
# @return [BulkCreateTeamMembersResponse Hash] response from the API call
|
61
|
+
def bulk_create_team_members(body:)
|
62
|
+
# Prepare query url.
|
63
|
+
_query_builder = config.get_base_uri
|
64
|
+
_query_builder << '/v2/team-members/bulk-create'
|
65
|
+
_query_url = APIHelper.clean_url _query_builder
|
66
|
+
|
67
|
+
# Prepare headers.
|
68
|
+
_headers = {
|
69
|
+
'accept' => 'application/json',
|
70
|
+
'content-type' => 'application/json; charset=utf-8'
|
71
|
+
}
|
72
|
+
|
73
|
+
# Prepare and execute HttpRequest.
|
74
|
+
_request = config.http_client.post(
|
75
|
+
_query_url,
|
76
|
+
headers: _headers,
|
77
|
+
parameters: body.to_json
|
78
|
+
)
|
79
|
+
OAuth2.apply(config, _request)
|
80
|
+
_response = execute_request(_request)
|
81
|
+
|
82
|
+
# Return appropriate response type.
|
83
|
+
decoded = APIHelper.json_deserialize(_response.raw_body)
|
84
|
+
_errors = APIHelper.map_response(decoded, ['errors'])
|
85
|
+
ApiResponse.new(_response, data: decoded, errors: _errors)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Updates multiple `TeamMember` objects. The updated `TeamMember` objects
|
89
|
+
# will be returned on successful updates.
|
90
|
+
# This process is non-transactional and will process as much of the request
|
91
|
+
# as is possible. If one of the updates in
|
92
|
+
# the request cannot be successfully processed, the request will NOT be
|
93
|
+
# marked as failed, but the body of the response
|
94
|
+
# will contain explicit error information for this particular update.
|
95
|
+
# Learn about [Troubleshooting the Teams
|
96
|
+
# API](https://developer.squareup.com/docs/docs/team/troubleshooting#bulkupd
|
97
|
+
# ateteammembers).
|
98
|
+
# @param [BulkUpdateTeamMembersRequest] body Required parameter: An object
|
99
|
+
# containing the fields to POST for the request. See the corresponding
|
100
|
+
# object definition for field details.
|
101
|
+
# @return [BulkUpdateTeamMembersResponse Hash] response from the API call
|
102
|
+
def bulk_update_team_members(body:)
|
103
|
+
# Prepare query url.
|
104
|
+
_query_builder = config.get_base_uri
|
105
|
+
_query_builder << '/v2/team-members/bulk-update'
|
106
|
+
_query_url = APIHelper.clean_url _query_builder
|
107
|
+
|
108
|
+
# Prepare headers.
|
109
|
+
_headers = {
|
110
|
+
'accept' => 'application/json',
|
111
|
+
'content-type' => 'application/json; charset=utf-8'
|
112
|
+
}
|
113
|
+
|
114
|
+
# Prepare and execute HttpRequest.
|
115
|
+
_request = config.http_client.post(
|
116
|
+
_query_url,
|
117
|
+
headers: _headers,
|
118
|
+
parameters: body.to_json
|
119
|
+
)
|
120
|
+
OAuth2.apply(config, _request)
|
121
|
+
_response = execute_request(_request)
|
122
|
+
|
123
|
+
# Return appropriate response type.
|
124
|
+
decoded = APIHelper.json_deserialize(_response.raw_body)
|
125
|
+
_errors = APIHelper.map_response(decoded, ['errors'])
|
126
|
+
ApiResponse.new(_response, data: decoded, errors: _errors)
|
127
|
+
end
|
128
|
+
|
129
|
+
# Returns a paginated list of `TeamMember` objects for a business.
|
130
|
+
# The list to be returned can be filtered by:
|
131
|
+
# - location IDs **and**
|
132
|
+
# - `is_active`
|
133
|
+
# @param [SearchTeamMembersRequest] body Required parameter: An object
|
134
|
+
# containing the fields to POST for the request. See the corresponding
|
135
|
+
# object definition for field details.
|
136
|
+
# @return [SearchTeamMembersResponse Hash] response from the API call
|
137
|
+
def search_team_members(body:)
|
138
|
+
# Prepare query url.
|
139
|
+
_query_builder = config.get_base_uri
|
140
|
+
_query_builder << '/v2/team-members/search'
|
141
|
+
_query_url = APIHelper.clean_url _query_builder
|
142
|
+
|
143
|
+
# Prepare headers.
|
144
|
+
_headers = {
|
145
|
+
'accept' => 'application/json',
|
146
|
+
'content-type' => 'application/json; charset=utf-8'
|
147
|
+
}
|
148
|
+
|
149
|
+
# Prepare and execute HttpRequest.
|
150
|
+
_request = config.http_client.post(
|
151
|
+
_query_url,
|
152
|
+
headers: _headers,
|
153
|
+
parameters: body.to_json
|
154
|
+
)
|
155
|
+
OAuth2.apply(config, _request)
|
156
|
+
_response = execute_request(_request)
|
157
|
+
|
158
|
+
# Return appropriate response type.
|
159
|
+
decoded = APIHelper.json_deserialize(_response.raw_body)
|
160
|
+
_errors = APIHelper.map_response(decoded, ['errors'])
|
161
|
+
ApiResponse.new(_response, data: decoded, errors: _errors)
|
162
|
+
end
|
163
|
+
|
164
|
+
# Retrieve a `TeamMember` object for the given `TeamMember.id`
|
165
|
+
# Learn about [Troubleshooting the Teams
|
166
|
+
# API](https://developer.squareup.com/docs/docs/team/troubleshooting#retriev
|
167
|
+
# eteammember).
|
168
|
+
# @param [String] team_member_id Required parameter: The ID of the team
|
169
|
+
# member to retrieve.
|
170
|
+
# @return [RetrieveTeamMemberResponse Hash] response from the API call
|
171
|
+
def retrieve_team_member(team_member_id:)
|
172
|
+
# Prepare query url.
|
173
|
+
_query_builder = config.get_base_uri
|
174
|
+
_query_builder << '/v2/team-members/{team_member_id}'
|
175
|
+
_query_builder = APIHelper.append_url_with_template_parameters(
|
176
|
+
_query_builder,
|
177
|
+
'team_member_id' => team_member_id
|
178
|
+
)
|
179
|
+
_query_url = APIHelper.clean_url _query_builder
|
180
|
+
|
181
|
+
# Prepare headers.
|
182
|
+
_headers = {
|
183
|
+
'accept' => 'application/json'
|
184
|
+
}
|
185
|
+
|
186
|
+
# Prepare and execute HttpRequest.
|
187
|
+
_request = config.http_client.get(
|
188
|
+
_query_url,
|
189
|
+
headers: _headers
|
190
|
+
)
|
191
|
+
OAuth2.apply(config, _request)
|
192
|
+
_response = execute_request(_request)
|
193
|
+
|
194
|
+
# Return appropriate response type.
|
195
|
+
decoded = APIHelper.json_deserialize(_response.raw_body)
|
196
|
+
_errors = APIHelper.map_response(decoded, ['errors'])
|
197
|
+
ApiResponse.new(_response, data: decoded, errors: _errors)
|
198
|
+
end
|
199
|
+
|
200
|
+
# Updates a single `TeamMember` object. The `TeamMember` will be returned on
|
201
|
+
# successful updates.
|
202
|
+
# Learn about [Troubleshooting the Teams
|
203
|
+
# API](https://developer.squareup.com/docs/docs/team/troubleshooting#updatet
|
204
|
+
# eammember).
|
205
|
+
# @param [String] team_member_id Required parameter: The ID of the team
|
206
|
+
# member to update.
|
207
|
+
# @param [UpdateTeamMemberRequest] body Required parameter: An object
|
208
|
+
# containing the fields to POST for the request. See the corresponding
|
209
|
+
# object definition for field details.
|
210
|
+
# @return [UpdateTeamMemberResponse Hash] response from the API call
|
211
|
+
def update_team_member(team_member_id:,
|
212
|
+
body:)
|
213
|
+
# Prepare query url.
|
214
|
+
_query_builder = config.get_base_uri
|
215
|
+
_query_builder << '/v2/team-members/{team_member_id}'
|
216
|
+
_query_builder = APIHelper.append_url_with_template_parameters(
|
217
|
+
_query_builder,
|
218
|
+
'team_member_id' => team_member_id
|
219
|
+
)
|
220
|
+
_query_url = APIHelper.clean_url _query_builder
|
221
|
+
|
222
|
+
# Prepare headers.
|
223
|
+
_headers = {
|
224
|
+
'accept' => 'application/json',
|
225
|
+
'content-type' => 'application/json; charset=utf-8'
|
226
|
+
}
|
227
|
+
|
228
|
+
# Prepare and execute HttpRequest.
|
229
|
+
_request = config.http_client.put(
|
230
|
+
_query_url,
|
231
|
+
headers: _headers,
|
232
|
+
parameters: body.to_json
|
233
|
+
)
|
234
|
+
OAuth2.apply(config, _request)
|
235
|
+
_response = execute_request(_request)
|
236
|
+
|
237
|
+
# Return appropriate response type.
|
238
|
+
decoded = APIHelper.json_deserialize(_response.raw_body)
|
239
|
+
_errors = APIHelper.map_response(decoded, ['errors'])
|
240
|
+
ApiResponse.new(_response, data: decoded, errors: _errors)
|
241
|
+
end
|
242
|
+
|
243
|
+
# Retrieve a `WageSetting` object for a team member specified
|
244
|
+
# by `TeamMember.id`.
|
245
|
+
# Learn about [Troubleshooting the Teams
|
246
|
+
# API](https://developer.squareup.com/docs/docs/team/troubleshooting#retriev
|
247
|
+
# ewagesetting).
|
248
|
+
# @param [String] team_member_id Required parameter: The ID of the team
|
249
|
+
# member to retrieve wage setting for
|
250
|
+
# @return [RetrieveWageSettingResponse Hash] response from the API call
|
251
|
+
def retrieve_wage_setting(team_member_id:)
|
252
|
+
# Prepare query url.
|
253
|
+
_query_builder = config.get_base_uri
|
254
|
+
_query_builder << '/v2/team-members/{team_member_id}/wage-setting'
|
255
|
+
_query_builder = APIHelper.append_url_with_template_parameters(
|
256
|
+
_query_builder,
|
257
|
+
'team_member_id' => team_member_id
|
258
|
+
)
|
259
|
+
_query_url = APIHelper.clean_url _query_builder
|
260
|
+
|
261
|
+
# Prepare headers.
|
262
|
+
_headers = {
|
263
|
+
'accept' => 'application/json'
|
264
|
+
}
|
265
|
+
|
266
|
+
# Prepare and execute HttpRequest.
|
267
|
+
_request = config.http_client.get(
|
268
|
+
_query_url,
|
269
|
+
headers: _headers
|
270
|
+
)
|
271
|
+
OAuth2.apply(config, _request)
|
272
|
+
_response = execute_request(_request)
|
273
|
+
|
274
|
+
# Return appropriate response type.
|
275
|
+
decoded = APIHelper.json_deserialize(_response.raw_body)
|
276
|
+
_errors = APIHelper.map_response(decoded, ['errors'])
|
277
|
+
ApiResponse.new(_response, data: decoded, errors: _errors)
|
278
|
+
end
|
279
|
+
|
280
|
+
# Creates or updates a `WageSetting` object. The object is created if a
|
281
|
+
# `WageSetting` with the specified `team_member_id` does not exist.
|
282
|
+
# Otherwise,
|
283
|
+
# it fully replaces the `WageSetting` object for the team member.
|
284
|
+
# The `WageSetting` will be returned upon successful update.
|
285
|
+
# Learn about [Troubleshooting the Teams
|
286
|
+
# API](https://developer.squareup.com/docs/docs/team/troubleshooting#updatew
|
287
|
+
# agesetting).
|
288
|
+
# @param [String] team_member_id Required parameter: The ID of the team
|
289
|
+
# member to update the `WageSetting` object for.
|
290
|
+
# @param [UpdateWageSettingRequest] body Required parameter: An object
|
291
|
+
# containing the fields to POST for the request. See the corresponding
|
292
|
+
# object definition for field details.
|
293
|
+
# @return [UpdateWageSettingResponse Hash] response from the API call
|
294
|
+
def update_wage_setting(team_member_id:,
|
295
|
+
body:)
|
296
|
+
# Prepare query url.
|
297
|
+
_query_builder = config.get_base_uri
|
298
|
+
_query_builder << '/v2/team-members/{team_member_id}/wage-setting'
|
299
|
+
_query_builder = APIHelper.append_url_with_template_parameters(
|
300
|
+
_query_builder,
|
301
|
+
'team_member_id' => team_member_id
|
302
|
+
)
|
303
|
+
_query_url = APIHelper.clean_url _query_builder
|
304
|
+
|
305
|
+
# Prepare headers.
|
306
|
+
_headers = {
|
307
|
+
'accept' => 'application/json',
|
308
|
+
'content-type' => 'application/json; charset=utf-8'
|
309
|
+
}
|
310
|
+
|
311
|
+
# Prepare and execute HttpRequest.
|
312
|
+
_request = config.http_client.put(
|
313
|
+
_query_url,
|
314
|
+
headers: _headers,
|
315
|
+
parameters: body.to_json
|
316
|
+
)
|
317
|
+
OAuth2.apply(config, _request)
|
318
|
+
_response = execute_request(_request)
|
319
|
+
|
320
|
+
# Return appropriate response type.
|
321
|
+
decoded = APIHelper.json_deserialize(_response.raw_body)
|
322
|
+
_errors = APIHelper.map_response(decoded, ['errors'])
|
323
|
+
ApiResponse.new(_response, data: decoded, errors: _errors)
|
324
|
+
end
|
325
|
+
end
|
326
|
+
end
|
@@ -6,16 +6,6 @@ module Square
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# Lists refunds for one of a business's locations.
|
9
|
-
# Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders)
|
10
|
-
# ---
|
11
|
-
# - __Deprecation date__: 2019-08-15
|
12
|
-
# - [__Retirement
|
13
|
-
# date__](https://developer.squareup.com/docs/build-basics/api-lifecycle#dep
|
14
|
-
# recated): 2021-09-01
|
15
|
-
# - [Migration
|
16
|
-
# guide](https://developer.squareup.com/docs/payments-api/migrate-from-trans
|
17
|
-
# actions-api)
|
18
|
-
# ---
|
19
9
|
# In addition to full or partial tender refunds processed through Square
|
20
10
|
# APIs,
|
21
11
|
# refunds may result from itemized returns or exchanges through Square's
|
@@ -83,16 +73,6 @@ module Square
|
|
83
73
|
end
|
84
74
|
|
85
75
|
# Lists transactions for a particular location.
|
86
|
-
# Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders)
|
87
|
-
# ---
|
88
|
-
# - __Deprecation date__: 2019-08-15
|
89
|
-
# - [__Retirement
|
90
|
-
# date__](https://developer.squareup.com/docs/build-basics/api-lifecycle#dep
|
91
|
-
# recated): 2021-09-01
|
92
|
-
# - [Migration
|
93
|
-
# guide](https://developer.squareup.com/docs/payments-api/migrate-from-trans
|
94
|
-
# actions-api)
|
95
|
-
# ---
|
96
76
|
# Transactions include payment information from sales and exchanges and
|
97
77
|
# refund
|
98
78
|
# information from returns and exchanges.
|
@@ -157,17 +137,6 @@ module Square
|
|
157
137
|
end
|
158
138
|
|
159
139
|
# Charges a card represented by a card nonce or a customer's card on file.
|
160
|
-
# Deprecated - recommend using
|
161
|
-
# [CreatePayment](#endpoint-payments-createpayment)
|
162
|
-
# ---
|
163
|
-
# - __Deprecation date__: 2019-08-15
|
164
|
-
# - [__Retirement
|
165
|
-
# date__](https://developer.squareup.com/docs/build-basics/api-lifecycle#dep
|
166
|
-
# recated): 2021-09-01
|
167
|
-
# - [Migration
|
168
|
-
# guide](https://developer.squareup.com/docs/payments-api/migrate-from-trans
|
169
|
-
# actions-api)
|
170
|
-
# ---
|
171
140
|
# Your request to this endpoint must include _either_:
|
172
141
|
# - A value for the `card_nonce` parameter (to charge a card nonce generated
|
173
142
|
# with the `SqPaymentForm`)
|
@@ -226,17 +195,6 @@ module Square
|
|
226
195
|
end
|
227
196
|
|
228
197
|
# Retrieves details for a single transaction.
|
229
|
-
# Deprecated - recommend using
|
230
|
-
# [BatchRetrieveOrders](#endpoint-batchretrieveorders)
|
231
|
-
# ---
|
232
|
-
# - __Deprecation date__: 2019-08-15
|
233
|
-
# - [__Retirement
|
234
|
-
# date__](https://developer.squareup.com/docs/build-basics/api-lifecycle#dep
|
235
|
-
# recated): 2021-09-01
|
236
|
-
# - [Migration
|
237
|
-
# guide](https://developer.squareup.com/docs/payments-api/migrate-from-trans
|
238
|
-
# actions-api)
|
239
|
-
# ---
|
240
198
|
# @param [String] location_id Required parameter: The ID of the
|
241
199
|
# transaction's associated location.
|
242
200
|
# @param [String] transaction_id Required parameter: The ID of the
|
@@ -277,15 +235,6 @@ module Square
|
|
277
235
|
# Captures a transaction that was created with the
|
278
236
|
# [Charge](#endpoint-charge)
|
279
237
|
# endpoint with a `delay_capture` value of `true`.
|
280
|
-
# ---
|
281
|
-
# - __Deprecation date__: 2019-08-15
|
282
|
-
# - [__Retirement
|
283
|
-
# date__](https://developer.squareup.com/docs/build-basics/api-lifecycle#dep
|
284
|
-
# recated): 2021-09-01
|
285
|
-
# - [Migration
|
286
|
-
# guide](https://developer.squareup.com/docs/payments-api/migrate-from-trans
|
287
|
-
# actions-api)
|
288
|
-
# ---
|
289
238
|
# See [Delayed capture
|
290
239
|
# transactions](https://developer.squareup.com/docs/payments/transactions/ov
|
291
240
|
# erview#delayed-capture)
|
@@ -326,17 +275,6 @@ module Square
|
|
326
275
|
end
|
327
276
|
|
328
277
|
# Initiates a refund for a previously charged tender.
|
329
|
-
# Deprecated - recommend using
|
330
|
-
# [RefundPayment](#endpoint-refunds-refundpayment)
|
331
|
-
# ---
|
332
|
-
# - __Deprecation date__: 2019-08-15
|
333
|
-
# - [__Retirement
|
334
|
-
# date__](https://developer.squareup.com/docs/build-basics/api-lifecycle#dep
|
335
|
-
# recated): 2021-09-01
|
336
|
-
# - [Migration
|
337
|
-
# guide](https://developer.squareup.com/docs/payments-api/migrate-from-trans
|
338
|
-
# actions-api)
|
339
|
-
# ---
|
340
278
|
# You must issue a refund within 120 days of the associated payment. See
|
341
279
|
# [this article](https://squareup.com/help/us/en/article/5060) for more
|
342
280
|
# information
|
@@ -389,15 +327,6 @@ module Square
|
|
389
327
|
|
390
328
|
# Cancels a transaction that was created with the [Charge](#endpoint-charge)
|
391
329
|
# endpoint with a `delay_capture` value of `true`.
|
392
|
-
# ---
|
393
|
-
# - __Deprecation date__: 2019-08-15
|
394
|
-
# - [__Retirement
|
395
|
-
# date__](https://developer.squareup.com/docs/build-basics/api-lifecycle#dep
|
396
|
-
# recated): 2021-09-01
|
397
|
-
# - [Migration
|
398
|
-
# guide](https://developer.squareup.com/docs/payments-api/migrate-from-trans
|
399
|
-
# actions-api)
|
400
|
-
# ---
|
401
330
|
# See [Delayed capture
|
402
331
|
# transactions](https://developer.squareup.com/docs/payments/transactions/ov
|
403
332
|
# erview#delayed-capture)
|
@@ -345,15 +345,6 @@ module Square
|
|
345
345
|
end
|
346
346
|
|
347
347
|
# Provides summary information for all of a business's employee timecards.
|
348
|
-
# ---
|
349
|
-
# - __Deprecation date__: 2020-02-26
|
350
|
-
# - [__Retirement
|
351
|
-
# date__](https://developer.squareup.com/docs/docs/build-basics/api-lifecycl
|
352
|
-
# e#deprecated): 2021-02-26
|
353
|
-
# - [Migration
|
354
|
-
# guide](https://developer.squareup.com/docs/docs/migrate-from-v1/guides/v1-
|
355
|
-
# timecards)
|
356
|
-
# ---
|
357
348
|
# @param [SortOrder] order Optional parameter: The order in which timecards
|
358
349
|
# are listed in the response, based on their created_at field.
|
359
350
|
# @param [String] employee_id Optional parameter: If provided, the endpoint
|
@@ -395,7 +386,7 @@ module Square
|
|
395
386
|
end_clockout_time: nil,
|
396
387
|
begin_updated_at: nil,
|
397
388
|
end_updated_at: nil,
|
398
|
-
deleted:
|
389
|
+
deleted: false,
|
399
390
|
limit: nil,
|
400
391
|
batch_token: nil)
|
401
392
|
warn 'Endpoint list_timecards in V1EmployeesApi is deprecated'
|
@@ -440,15 +431,6 @@ module Square
|
|
440
431
|
# Creates a timecard for an employee and clocks them in with an
|
441
432
|
# `API_CREATE` event and a `clockin_time` set to the current time unless
|
442
433
|
# the request provides a different value.
|
443
|
-
# ---
|
444
|
-
# - __Deprecation date__: 2020-02-26
|
445
|
-
# - [__Retirement
|
446
|
-
# date__](https://developer.squareup.com/docs/docs/build-basics/api-lifecycl
|
447
|
-
# e#deprecated): 2021-02-26
|
448
|
-
# - [Migration
|
449
|
-
# guide](https://developer.squareup.com/docs/docs/migrate-from-v1/guides/v1-
|
450
|
-
# timecards)
|
451
|
-
# ---
|
452
434
|
# To import timecards from another
|
453
435
|
# system (rather than clocking someone in). Specify the `clockin_time`
|
454
436
|
# and* `clockout_time` in the request.
|
@@ -493,25 +475,15 @@ module Square
|
|
493
475
|
# Square Dashboard. Deleted timecards are still accessible through
|
494
476
|
# Connect API endpoints, but cannot be modified. The `deleted` field of
|
495
477
|
# the `Timecard` object indicates whether the timecard has been deleted.
|
496
|
-
#
|
497
|
-
#
|
498
|
-
# - [__Retirement
|
499
|
-
# date__](https://developer.squareup.com/docs/docs/build-basics/api-lifecycl
|
500
|
-
# e#deprecated): 2021-02-26
|
501
|
-
# - [Migration
|
502
|
-
# guide](https://developer.squareup.com/docs/docs/migrate-from-v1/guides/v1-
|
503
|
-
# timecards)
|
504
|
-
# ---
|
505
|
-
# *Note**: By default, deleted timecards appear alongside valid timecards in
|
478
|
+
# __Note__: By default, deleted timecards appear alongside valid timecards
|
479
|
+
# in
|
506
480
|
# results returned by the
|
507
481
|
# [ListTimecards](#endpoint-v1employees-listtimecards)
|
508
482
|
# endpoint. To filter deleted timecards, include the `deleted` query
|
509
483
|
# parameter in the list request.
|
510
|
-
# <aside>
|
511
484
|
# Only approved accounts can manage their employees with Square.
|
512
485
|
# Unapproved accounts cannot use employee management features with the
|
513
486
|
# API.
|
514
|
-
# </aside>
|
515
487
|
# @param [String] timecard_id Required parameter: The ID of the timecard to
|
516
488
|
# delete.
|
517
489
|
# @return [Object] response from the API call
|
@@ -538,15 +510,6 @@ module Square
|
|
538
510
|
end
|
539
511
|
|
540
512
|
# Provides the details for a single timecard.
|
541
|
-
# ---
|
542
|
-
# - __Deprecation date__: 2020-02-26
|
543
|
-
# - [__Retirement
|
544
|
-
# date__](https://developer.squareup.com/docs/docs/build-basics/api-lifecycl
|
545
|
-
# e#deprecated): 2021-02-26
|
546
|
-
# - [Migration
|
547
|
-
# guide](https://developer.squareup.com/docs/docs/migrate-from-v1/guides/v1-
|
548
|
-
# timecards)
|
549
|
-
# ---
|
550
513
|
# <aside>
|
551
514
|
# Only approved accounts can manage their employees with Square.
|
552
515
|
# Unapproved accounts cannot use employee management features with the
|
@@ -587,15 +550,6 @@ module Square
|
|
587
550
|
# Modifies the details of a timecard with an `API_EDIT` event for
|
588
551
|
# the timecard. Updating an active timecard with a `clockout_time`
|
589
552
|
# clocks the employee out.
|
590
|
-
# ---
|
591
|
-
# - __Deprecation date__: 2020-02-26
|
592
|
-
# - [__Retirement
|
593
|
-
# date__](https://developer.squareup.com/docs/docs/build-basics/api-lifecycl
|
594
|
-
# e#deprecated): 2021-02-26
|
595
|
-
# - [Migration
|
596
|
-
# guide](https://developer.squareup.com/docs/docs/migrate-from-v1/guides/v1-
|
597
|
-
# timecards)
|
598
|
-
# ---
|
599
553
|
# @param [String] timecard_id Required parameter: TThe ID of the timecard to
|
600
554
|
# modify.
|
601
555
|
# @param [V1Timecard] body Required parameter: An object containing the
|
@@ -637,15 +591,6 @@ module Square
|
|
637
591
|
|
638
592
|
# Provides summary information for all events associated with a
|
639
593
|
# particular timecard.
|
640
|
-
# ---
|
641
|
-
# - __Deprecation date__: 2020-02-26
|
642
|
-
# - [__Retirement
|
643
|
-
# date__](https://developer.squareup.com/docs/docs/build-basics/api-lifecycl
|
644
|
-
# e#deprecated): 2021-02-26
|
645
|
-
# - [Migration
|
646
|
-
# guide](https://developer.squareup.com/docs/docs/migrate-from-v1/guides/v1-
|
647
|
-
# timecards)
|
648
|
-
# ---
|
649
594
|
# <aside>
|
650
595
|
# Only approved accounts can manage their employees with Square.
|
651
596
|
# Unapproved accounts cannot use employee management features with the
|
@@ -686,15 +631,6 @@ module Square
|
|
686
631
|
|
687
632
|
# Provides the details for all of a location's cash drawer shifts during a
|
688
633
|
# date range. The date range you specify cannot exceed 90 days.
|
689
|
-
# ---
|
690
|
-
# - __Deprecation date__: 2020-02-26
|
691
|
-
# - [__Retirement
|
692
|
-
# date__](https://developer.squareup.com/docs/docs/build-basics/api-lifecycl
|
693
|
-
# e#deprecated): 2021-02-26
|
694
|
-
# - [Migration
|
695
|
-
# guide](https://developer.squareup.com/docs/docs/migrate-from-v1/guides/v1-
|
696
|
-
# cashdrawershifts)
|
697
|
-
# ---
|
698
634
|
# @param [String] location_id Required parameter: The ID of the location to
|
699
635
|
# list cash drawer shifts for.
|
700
636
|
# @param [SortOrder] order Optional parameter: The order in which cash
|
@@ -748,15 +684,6 @@ module Square
|
|
748
684
|
|
749
685
|
# Provides the details for a single cash drawer shift, including all events
|
750
686
|
# that occurred during the shift.
|
751
|
-
# ---
|
752
|
-
# - __Deprecation date__: 2020-02-26
|
753
|
-
# - [__Retirement
|
754
|
-
# date__](https://developer.squareup.com/docs/docs/build-basics/api-lifecycl
|
755
|
-
# e#deprecated): 2021-02-26
|
756
|
-
# - [Migration
|
757
|
-
# guide](https://developer.squareup.com/docs/docs/migrate-from-v1/guides/v1-
|
758
|
-
# cashdrawershifts)
|
759
|
-
# ---
|
760
687
|
# @param [String] location_id Required parameter: The ID of the location to
|
761
688
|
# list cash drawer shifts for.
|
762
689
|
# @param [String] shift_id Required parameter: The shift's ID.
|