selly 2.0.5 → 2.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa5ee947681f6d01090fdac2800cc7f38d3ff5278889e6c63052150c6caa62ad
4
- data.tar.gz: d0948916eac91c6722bcc94ce1cfc4079b6712e84bd4b8dca1951134d2bdb750
3
+ metadata.gz: 3ae79d6f69c51647c75b2a468e2407036b0899220d4a8a1c16f7628049b662bb
4
+ data.tar.gz: a9aa1ea63b0c987e3257b17d049e46a5df0f1e58d7dd3b9d61169f9e03007417
5
5
  SHA512:
6
- metadata.gz: 8bfd54b2676d6a6cd771e64293294e537c35bfd5f22d787952c3c7697e27c7eb8773a0fe6863d7b1514e78799ff9dcdbe22fdf00b2e2a601d6daac08437f7136
7
- data.tar.gz: e47e82bbebf4107b2409d5d6a2667f7c7c27bf6cb03e875b8719307bc189c0850c3f3881fedea49662093d108852a9281306ab1e893a6fba370558675f8a7bb8
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/product_groups'
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,
@@ -1,9 +1,9 @@
1
1
  module Selly
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
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
@@ -10,6 +10,8 @@ module Selly
10
10
  if parsed.class == Hash && (response.code < 200 || response.code > 300)
11
11
  raise SellyError.new(parsed['errors']), parsed['message']
12
12
  end
13
+
14
+ parsed
13
15
  end
14
16
  end
15
17
  end
@@ -10,6 +10,8 @@ module Selly
10
10
  if parsed.class == Hash && (response.code < 200 || response.code > 300)
11
11
  raise SellyError.new(parsed['errors']), parsed['message']
12
12
  end
13
+
14
+ parsed
13
15
  end
14
16
  end
15
17
  end
@@ -10,6 +10,8 @@ module Selly
10
10
  if parsed.class == Hash && (response.code < 200 || response.code > 300)
11
11
  raise SellyError.new(parsed['errors']), parsed['message']
12
12
  end
13
+
14
+ parsed
13
15
  end
14
16
  end
15
17
  end
@@ -10,6 +10,8 @@ module Selly
10
10
  if parsed.class == Hash && (response.code < 200 || response.code > 300)
11
11
  raise SellyError.new(parsed['errors']), parsed['message']
12
12
  end
13
+
14
+ parsed
13
15
  end
14
16
  end
15
17
  end
@@ -10,6 +10,8 @@ module Selly
10
10
  if parsed.class == Hash && (response.code < 200 || response.code > 300)
11
11
  raise SellyError.new(parsed['errors']), parsed['message']
12
12
  end
13
+
14
+ parsed
13
15
  end
14
16
  end
15
17
  end
@@ -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.escape(to_snake_case(class_name))}"
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
@@ -1,3 +1,3 @@
1
1
  module Selly
2
- VERSION = '2.0.5'.freeze
2
+ VERSION = '2.0.7'.freeze
3
3
  end
@@ -0,0 +1,9 @@
1
+ module Selly::Webhooks
2
+ class Endpoints < Selly::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
@@ -0,0 +1,9 @@
1
+ module Selly::Webhooks
2
+ class Logs < Selly::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
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.5
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: