square.rb 36.1.0.20240320 → 38.0.0.20240515
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/o_auth_api.rb +0 -52
- data/lib/square/client.rb +2 -2
- data/lib/square/configuration.rb +1 -1
- data/lib/square.rb +3 -0
- 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: 6495ce763a5a125e487f6c89dc548204e3b09ea93cc8a07b1a9014ff3654478d
|
4
|
+
data.tar.gz: 67b51c072fa51dacd86c5f4ee9ecb8bad36132fe1ee464eed149034569d8626a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 901ff8752e5de5167d3cb7544d68f0591b916440da61ff2c53fac4abe6296c70007fb26946eef41952fc83c85ad05735ba464fcf511f4ae1e7e3e4e5f51645ea
|
7
|
+
data.tar.gz: b89fffe2fca17d46e05c94a0745f2e8dda7d97b757fb8332701902d0c011c5240fa8b39e29feaced02d3788b4bfb319b65037d3bb24106f04083d225def83a08
|
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/38.0.0.20240515 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.user_agent_parameters
|
@@ -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
|
+
'38.0.0.20240515'
|
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-05-15',
|
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-05-15',
|
28
28
|
user_agent_detail: '', additional_headers: {}
|
29
29
|
)
|
30
30
|
|
data/lib/square.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'date'
|
2
2
|
require 'json'
|
3
|
+
|
3
4
|
require 'apimatic_core_interfaces'
|
4
5
|
require 'apimatic_core'
|
5
6
|
require 'apimatic_faraday_client_adapter'
|
@@ -17,6 +18,8 @@ require_relative 'square/http/http_call_back'
|
|
17
18
|
require_relative 'square/http/http_method_enum'
|
18
19
|
require_relative 'square/http/http_request'
|
19
20
|
require_relative 'square/http/http_response'
|
21
|
+
|
22
|
+
# Logger
|
20
23
|
require_relative 'square/http/auth/o_auth2'
|
21
24
|
|
22
25
|
# Models
|
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: 38.0.0.20240515
|
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-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apimatic_core_interfaces
|