square.rb 36.0.0.20240222 → 37.0.0.20240417
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/square/api/base_api.rb +1 -1
- data/lib/square/api/bookings_api.rb +1 -1
- data/lib/square/api/labor_api.rb +17 -16
- data/lib/square/api/o_auth_api.rb +0 -52
- data/lib/square/client.rb +2 -2
- data/lib/square/configuration.rb +1 -1
- data/lib/square/http/api_response.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 332738b77476d9e63fa4147d91a865c4354d9cc1e52e0e831e94f9156d200906
|
4
|
+
data.tar.gz: e7bc93554771b90aa3aa0fb74fb981940e9965e746b44b09a0edc6539f4cfc0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4dad5587dfe9f86495fee7b7dfd5b5fca51442fe588ec828d5a17cfced950b8fa40336d765eedab462b76c13c1279094844e1b53f2985e952609bd4b077712c
|
7
|
+
data.tar.gz: 251d28b4352a3b7f924bda02212250d5846be3f1df5c67d1a6730ff80f39cc2469bb8856d2abbd81f48765d6ee15ff7e92f8a301758dcba4b5057ff022c9c276
|
data/lib/square/api/base_api.rb
CHANGED
@@ -5,7 +5,7 @@ module Square
|
|
5
5
|
attr_accessor :config, :http_call_back
|
6
6
|
|
7
7
|
def self.user_agent
|
8
|
-
'Square-Ruby-SDK/
|
8
|
+
'Square-Ruby-SDK/37.0.0.20240417 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.user_agent_parameters
|
@@ -58,7 +58,7 @@ module Square
|
|
58
58
|
# The required input must include the following:
|
59
59
|
# - `Booking.location_id`
|
60
60
|
# - `Booking.start_at`
|
61
|
-
# - `Booking.team_member_id`
|
61
|
+
# - `Booking.AppointmentSegment.team_member_id`
|
62
62
|
# - `Booking.AppointmentSegment.service_variation_id`
|
63
63
|
# - `Booking.AppointmentSegment.service_variation_version`
|
64
64
|
# To call this endpoint with buyer-level permissions, set
|
data/lib/square/api/labor_api.rb
CHANGED
@@ -183,19 +183,20 @@ module Square
|
|
183
183
|
end
|
184
184
|
|
185
185
|
# Creates a new `Shift`.
|
186
|
-
# A `Shift` represents a complete workday for a single
|
186
|
+
# A `Shift` represents a complete workday for a single team member.
|
187
187
|
# You must provide the following values in your request to this
|
188
188
|
# endpoint:
|
189
189
|
# - `location_id`
|
190
|
-
# - `
|
190
|
+
# - `team_member_id`
|
191
191
|
# - `start_at`
|
192
192
|
# An attempt to create a new `Shift` can result in a `BAD_REQUEST` error
|
193
193
|
# when:
|
194
|
-
# - The `status` of the new `Shift` is `OPEN` and the
|
194
|
+
# - The `status` of the new `Shift` is `OPEN` and the team member has
|
195
|
+
# another
|
195
196
|
# shift with an `OPEN` status.
|
196
197
|
# - The `start_at` date is in the future.
|
197
|
-
# - The `start_at` or `end_at` date overlaps another shift for the same
|
198
|
-
#
|
198
|
+
# - The `start_at` or `end_at` date overlaps another shift for the same team
|
199
|
+
# member.
|
199
200
|
# - The `Break` instances are set in the request and a break `start_at`
|
200
201
|
# is before the `Shift.start_at`, a break `end_at` is after
|
201
202
|
# the `Shift.end_at`, or both.
|
@@ -222,17 +223,17 @@ module Square
|
|
222
223
|
|
223
224
|
# Returns a paginated list of `Shift` records for a business.
|
224
225
|
# The list to be returned can be filtered by:
|
225
|
-
# - Location IDs
|
226
|
-
# -
|
227
|
-
# - Shift status (`OPEN`
|
228
|
-
# - Shift start
|
229
|
-
# - Shift end
|
230
|
-
# - Workday details
|
226
|
+
# - Location IDs
|
227
|
+
# - Team member IDs
|
228
|
+
# - Shift status (`OPEN` or `CLOSED`)
|
229
|
+
# - Shift start
|
230
|
+
# - Shift end
|
231
|
+
# - Workday details
|
231
232
|
# The list can be sorted by:
|
232
|
-
# - `
|
233
|
-
# - `
|
234
|
-
# - `
|
235
|
-
# - `
|
233
|
+
# - `START_AT`
|
234
|
+
# - `END_AT`
|
235
|
+
# - `CREATED_AT`
|
236
|
+
# - `UPDATED_AT`
|
236
237
|
# @param [SearchShiftsRequest] body Required parameter: An object containing
|
237
238
|
# the fields to POST for the request. See the corresponding object
|
238
239
|
# definition for field details.
|
@@ -355,7 +356,7 @@ module Square
|
|
355
356
|
.execute
|
356
357
|
end
|
357
358
|
|
358
|
-
# Returns a single `TeamMemberWage` specified by `id
|
359
|
+
# Returns a single `TeamMemberWage` specified by `id`.
|
359
360
|
# @param [String] id Required parameter: The UUID for the `TeamMemberWage`
|
360
361
|
# being retrieved.
|
361
362
|
# @return [GetTeamMemberWageResponse Hash] response from the API call
|
@@ -1,58 +1,6 @@
|
|
1
1
|
module Square
|
2
2
|
# OAuthApi
|
3
3
|
class OAuthApi < BaseApi
|
4
|
-
# `RenewToken` is deprecated. For information about refreshing OAuth access
|
5
|
-
# tokens, see
|
6
|
-
# [Migrate from Renew to Refresh OAuth
|
7
|
-
# Tokens](https://developer.squareup.com/docs/oauth-api/migrate-to-refresh-t
|
8
|
-
# okens).
|
9
|
-
# Renews an OAuth access token before it expires.
|
10
|
-
# OAuth access tokens besides your application's personal access token
|
11
|
-
# expire after 30 days.
|
12
|
-
# You can also renew expired tokens within 15 days of their expiration.
|
13
|
-
# You cannot renew an access token that has been expired for more than 15
|
14
|
-
# days.
|
15
|
-
# Instead, the associated user must recomplete the OAuth flow from the
|
16
|
-
# beginning.
|
17
|
-
# __Important:__ The `Authorization` header for this endpoint must have the
|
18
|
-
# following format:
|
19
|
-
# ```
|
20
|
-
# Authorization: Client APPLICATION_SECRET
|
21
|
-
# ```
|
22
|
-
# Replace `APPLICATION_SECRET` with the application secret on the
|
23
|
-
# **Credentials**
|
24
|
-
# page in the [Developer Dashboard](https://developer.squareup.com/apps).
|
25
|
-
# @param [String] client_id Required parameter: Your application ID, which
|
26
|
-
# is available on the **OAuth** page in the [Developer
|
27
|
-
# Dashboard](https://developer.squareup.com/apps).
|
28
|
-
# @param [RenewTokenRequest] body Required parameter: An object containing
|
29
|
-
# the fields to POST for the request. See the corresponding object
|
30
|
-
# definition for field details.
|
31
|
-
# @param [String] authorization Required parameter: Client
|
32
|
-
# APPLICATION_SECRET
|
33
|
-
# @return [RenewTokenResponse Hash] response from the API call
|
34
|
-
def renew_token(client_id:,
|
35
|
-
body:,
|
36
|
-
authorization:)
|
37
|
-
warn 'Endpoint renew_token in OAuthApi is deprecated'
|
38
|
-
new_api_call_builder
|
39
|
-
.request(new_request_builder(HttpMethodEnum::POST,
|
40
|
-
'/oauth2/clients/{client_id}/access-token/renew',
|
41
|
-
'default')
|
42
|
-
.template_param(new_parameter(client_id, key: 'client_id')
|
43
|
-
.should_encode(true))
|
44
|
-
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
45
|
-
.body_param(new_parameter(body))
|
46
|
-
.header_param(new_parameter(authorization, key: 'Authorization'))
|
47
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
48
|
-
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
49
|
-
.response(new_response_handler
|
50
|
-
.deserializer(APIHelper.method(:json_deserialize))
|
51
|
-
.is_api_response(true)
|
52
|
-
.convertor(ApiResponse.method(:create)))
|
53
|
-
.execute
|
54
|
-
end
|
55
|
-
|
56
4
|
# Revokes an access token generated with the OAuth flow.
|
57
5
|
# If an account has more than one OAuth access token for your application,
|
58
6
|
# this
|
data/lib/square/client.rb
CHANGED
@@ -5,7 +5,7 @@ module Square
|
|
5
5
|
attr_reader :config, :auth_managers
|
6
6
|
|
7
7
|
def sdk_version
|
8
|
-
'
|
8
|
+
'37.0.0.20240417'
|
9
9
|
end
|
10
10
|
|
11
11
|
def square_version
|
@@ -268,7 +268,7 @@ module Square
|
|
268
268
|
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
269
269
|
retry_methods: %i[get put], http_callback: nil, environment: 'production',
|
270
270
|
custom_url: 'https://connect.squareup.com', access_token: nil,
|
271
|
-
bearer_auth_credentials: nil, square_version: '2024-
|
271
|
+
bearer_auth_credentials: nil, square_version: '2024-04-17',
|
272
272
|
user_agent_detail: '', additional_headers: {}, config: nil
|
273
273
|
)
|
274
274
|
@config = if config.nil?
|
data/lib/square/configuration.rb
CHANGED
@@ -24,7 +24,7 @@ module Square
|
|
24
24
|
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
25
25
|
retry_methods: %i[get put], http_callback: nil, environment: 'production',
|
26
26
|
custom_url: 'https://connect.squareup.com', access_token: nil,
|
27
|
-
bearer_auth_credentials: nil, square_version: '2024-
|
27
|
+
bearer_auth_credentials: nil, square_version: '2024-04-17',
|
28
28
|
user_agent_detail: '', additional_headers: {}
|
29
29
|
)
|
30
30
|
|
@@ -20,7 +20,7 @@ module Square
|
|
20
20
|
|
21
21
|
@cursor = data.fetch(:cursor, nil)
|
22
22
|
data.reject! { |k| %i[cursor errors].include?(k) }
|
23
|
-
@data = Struct.new(*data.keys).new(*data.values)
|
23
|
+
@data = data.keys.any? ? Struct.new(*data.keys).new(*data.values) : nil
|
24
24
|
else
|
25
25
|
@data = data
|
26
26
|
@body = data
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: square.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 37.0.0.20240417
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Square Developer Platform
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apimatic_core_interfaces
|