api_six_client 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b824a8fa20eb4c5610e68656f0dc39c1174e4071e86088e2040ea486f9610db6
4
- data.tar.gz: 8dd3e6573539cbbbc1676b7c635535997d27aa8197500641e329bb5a60d67fd9
3
+ metadata.gz: 52c00571c9d3b9758a69a4c174003efdae2a000ad40e4c75f567f1cd7ac262da
4
+ data.tar.gz: 4b81a7b3bdb336611a1c7785892e0882ce44ea5f579b98ea22d3ef8ed9232b63
5
5
  SHA512:
6
- metadata.gz: 97236e98c0dc5deba27445b48da451d469300e2e64c335ef3662b34f7ed298f4761b6cae755ce504c9bf782b8bc87420cbb8e5b0b14e93f63956b85e884adf8a
7
- data.tar.gz: 3d153ef5d0948349b0da9baddcf7d76a7470857fb5ed66179e82f7ee2f8188e63eae4fcbfd3ba59f2e2da4b6b5a565ce2b7cbfce490307ae4d88178f27cc9bc8
6
+ metadata.gz: e381659d0534e32066d1b93aa42557a58f058e2a5fe23b3fcd9e872dc52934bb570c32464f02de31e448709b7627e4a3854ff6ff84c54d82eda467acd61565f1
7
+ data.tar.gz: 25c0f3f3da5e85796e0b95d8242d921f5f76e22abcceb980d222f87cc6ef270ec61022dfd5495b2eef11dfe3dadf41e7da76f4d8ea3b451d663230168f8387f9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- api_six_client (1.1.1)
4
+ api_six_client (1.2.0)
5
5
  faraday (~> 1)
6
6
 
7
7
  GEM
@@ -31,10 +31,14 @@ module ApiSixClient
31
31
  request __method__, path, params, headers
32
32
  end
33
33
 
34
+ def delete(path, params = {}, headers = {})
35
+ request __method__, path, params, headers
36
+ end
37
+
34
38
  private
35
39
 
36
40
  def service_path
37
- self.class.name.split('::').last.downcase
41
+ self.class.name.demodulize.underscore
38
42
  end
39
43
 
40
44
  def request(method, path, params = {}, headers = {})
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApiSixClient
4
+ class BaseInt < Base
5
+ def initialize(endpoint: nil, auth_token: nil)
6
+ @endpoint = ApiSixClient.config.endpoint_int
7
+ @auth_token = ApiSixClient.config.auth_token_int
8
+
9
+ raise Errors::EndpointIsEmpty unless @endpoint
10
+ raise Errors::AuthTokenIsEmpty unless @auth_token
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApiSixClient
4
+ class BaseV2 < Base
5
+ def initialize(endpoint: nil, auth_token: nil)
6
+ @endpoint = ApiSixClient.config.endpoint_v2
7
+ @auth_token = ApiSixClient.config.auth_token_v2
8
+
9
+ raise Errors::EndpointIsEmpty unless @endpoint
10
+ raise Errors::AuthTokenIsEmpty unless @auth_token
11
+ end
12
+ end
13
+ end
@@ -3,10 +3,7 @@
3
3
  module ApiSixClient
4
4
  class Config
5
5
  attr_accessor :endpoint, :auth_token
6
-
7
- def initialize(endpoint: nil, auth_token: nil)
8
- @endpoint = endpoint
9
- @auth_token = auth_token
10
- end
6
+ attr_accessor :endpoint_v2, :auth_token_v2
7
+ attr_accessor :endpoint_int, :auth_token_int
11
8
  end
12
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApiSixClient
4
- VERSION = "1.1.1"
4
+ VERSION = "1.2.0"
5
5
  end
@@ -3,6 +3,8 @@
3
3
  require 'api_six_client/version'
4
4
  require 'api_six_client/config'
5
5
  require 'api_six_client/base'
6
+ require 'api_six_client/base_v2'
7
+ require 'api_six_client/base_int'
6
8
  require 'api_six_client/errors'
7
9
 
8
10
  module ApiSixClient
@@ -24,4 +26,6 @@ module ApiSixClient
24
26
  class Fin < Base; end
25
27
  class Olc < Base; end
26
28
  class Eno < Base; end
29
+
30
+ class AuthInt < BaseInt; end
27
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_six_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Dobrorodnov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-25 00:00:00.000000000 Z
11
+ date: 2023-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -42,6 +42,8 @@ files:
42
42
  - bin/setup
43
43
  - lib/api_six_client.rb
44
44
  - lib/api_six_client/base.rb
45
+ - lib/api_six_client/base_int.rb
46
+ - lib/api_six_client/base_v2.rb
45
47
  - lib/api_six_client/config.rb
46
48
  - lib/api_six_client/errors.rb
47
49
  - lib/api_six_client/version.rb