shoptet 0.0.8 → 0.0.9
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/lib/shoptet.rb +11 -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: 8b98a4b88e59f4cd33fcddb5448caae903e5cbeb81b8bda9fcf9c52a7db337aa
|
|
4
|
+
data.tar.gz: d138e3406b01db0f8b4833aeb3ac2b16a1b590341922d9d50e370774ef2de8bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 91e5a23fb8973e97536947176590811e58c216a3b3a7e43cec2b57eadd9bbaafbc7a93e00bd761530853a351dc7fb6328ea8aac47f174cb876d7161de27136d6
|
|
7
|
+
data.tar.gz: a74007a4120bbd10f7be9e9ad1f95cfa474290bf2900eac5fcd0702f01588c2d369775b270848d2b285b03f17f3531e64747539a44841aaba9ee51d7a9b1d105
|
data/lib/shoptet.rb
CHANGED
|
@@ -66,7 +66,7 @@ class Shoptet
|
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
def self.version
|
|
69
|
-
'0.0.
|
|
69
|
+
'0.0.9'
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
def self.ar_on_token_error(model)
|
|
@@ -127,6 +127,16 @@ class Shoptet
|
|
|
127
127
|
@on_token_error = on_token_error || DEFAULT_ON_TOKEN_ERROR
|
|
128
128
|
end
|
|
129
129
|
|
|
130
|
+
def endpoints api_params = {}
|
|
131
|
+
enumerize 'https://api.myshoptet.com/api/system/endpoints', api_params
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def endpoint_approved? endpoint
|
|
135
|
+
@approved_endpoints ||= endpoints
|
|
136
|
+
|
|
137
|
+
@approved_endpoints.any? { _1['endpoint'] == endpoint }
|
|
138
|
+
end
|
|
139
|
+
|
|
130
140
|
def authorize_url redirect_url, state
|
|
131
141
|
query = {
|
|
132
142
|
client_id: @client_id,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shoptet
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Premysl Donat
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-11-
|
|
11
|
+
date: 2020-11-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: irb
|