selly 2.0.5 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/selly.rb +3 -3
- data/lib/selly/categories.rb +8 -8
- data/lib/selly/operations/create.rb +2 -0
- data/lib/selly/operations/destroy.rb +2 -0
- data/lib/selly/operations/list.rb +2 -0
- data/lib/selly/operations/show.rb +2 -0
- data/lib/selly/operations/update.rb +2 -0
- data/lib/selly/resource.rb +2 -2
- data/lib/selly/version.rb +1 -1
- data/lib/selly/webhooks/endpoints.rb +9 -0
- data/lib/selly/webhooks/logs.rb +9 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ae79d6f69c51647c75b2a468e2407036b0899220d4a8a1c16f7628049b662bb
|
4
|
+
data.tar.gz: a9aa1ea63b0c987e3257b17d049e46a5df0f1e58d7dd3b9d61169f9e03007417
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47d7d76d3d08e49a16a3155825642b9cf3f0bedbdbb833d41a0ad27d134b39a9390dd35e721c81eaeab1e96fcef9208faa4eb4b1980ba7435554ca42e5bd816c
|
7
|
+
data.tar.gz: f8829eb4567ba53a3f9fd7a62b17e618593b7ae3cd42b97305c97776769e18988e0974cf1c5826c5f6c20b9780a3b93b2632740f56ab5b979c2ccd91b065d5e4
|
data/lib/selly.rb
CHANGED
@@ -4,13 +4,14 @@ require 'selly/operations/create'
|
|
4
4
|
require 'selly/operations/list'
|
5
5
|
require 'selly/operations/show'
|
6
6
|
require 'selly/operations/update'
|
7
|
+
require 'selly/operations/destroy'
|
7
8
|
require 'selly/resource'
|
8
9
|
require 'selly/blacklist'
|
9
|
-
require 'selly/exchange_rates'
|
10
10
|
require 'selly/orders'
|
11
11
|
require 'selly/pay'
|
12
12
|
require 'selly/products'
|
13
|
-
require 'selly/
|
13
|
+
require 'selly/webhooks/logs'
|
14
|
+
require 'selly/webhooks/endpoints'
|
14
15
|
require 'base64'
|
15
16
|
|
16
17
|
module Selly
|
@@ -21,7 +22,6 @@ module Selly
|
|
21
22
|
class << self
|
22
23
|
attr_accessor :api_key, :api_email
|
23
24
|
|
24
|
-
|
25
25
|
def request_headers
|
26
26
|
{
|
27
27
|
'User-Agent': USER_AGENT.strip,
|
data/lib/selly/categories.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module Selly
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
class Categories < Resource
|
3
|
+
extend Selly::Operations::List
|
4
|
+
extend Selly::Operations::Show
|
5
|
+
extend Selly::Operations::Create
|
6
|
+
extend Selly::Operations::Update
|
7
|
+
extend Selly::Operations::Destroy
|
8
|
+
end
|
9
|
+
end
|
data/lib/selly/resource.rb
CHANGED
@@ -3,11 +3,11 @@ require 'cgi'
|
|
3
3
|
module Selly
|
4
4
|
class Resource
|
5
5
|
def self.class_name
|
6
|
-
self.name.split('::')[-1]
|
6
|
+
self.name.split('::')[1 .. -1].join('::')
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.resource_url
|
10
|
-
"/#{CGI.
|
10
|
+
"/#{CGI.unescape(to_snake_case(class_name))}"
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.to_snake_case(string)
|
data/lib/selly/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Selly
|
@@ -82,6 +82,8 @@ files:
|
|
82
82
|
- lib/selly/resource.rb
|
83
83
|
- lib/selly/selly_error.rb
|
84
84
|
- lib/selly/version.rb
|
85
|
+
- lib/selly/webhooks/endpoints.rb
|
86
|
+
- lib/selly/webhooks/logs.rb
|
85
87
|
- selly.gemspec
|
86
88
|
homepage: https://selly.io
|
87
89
|
licenses:
|