esignatur 1.2.5 → 1.2.6

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: ebf35630ee3aeeed8e022c97896c332c4712462901211943386878dcca936fd0
4
- data.tar.gz: 3329b1ea036c4bd757d6f8db431c82d45fe45fd1616eaa2d20c479fa80f028e7
3
+ metadata.gz: c7dd1f4618e2aa836b73c01caa30e006dc70225fcac39c50ce1800f8f9774a7f
4
+ data.tar.gz: dc03a0757930cea8d2b911363f6087820e60384655812a29de2a35665afc4694
5
5
  SHA512:
6
- metadata.gz: 3a1a085ab2d68640ad7096f01ef1b467bc0f4a7f047ea2f7d75183532094dd89d407ecc5d59fc5027c23462a7064f1c56e62d82960dd09c3cc896efd1fb34b5b
7
- data.tar.gz: 1ca1dfaff6abf897450b78c177ced086309ae1506e509496432e8a63442758f3fdfa271f359e8316fcbe50e2910b4afcc57aeaa8a5bc2d3f8439007f10652290
6
+ metadata.gz: 2f19152b0734e12e5fc6b96e235402062129555212d8438d51ed5e90d2d8d1d5337336a5ea96dd2321712e565a412983afb1e26f270fd72171bbf4d5a81b4f08
7
+ data.tar.gz: fb8130fa4f5b997f2f4d55c85902fa4d705e747f1f51334972ddca8e5ad825e6f79152701e3ebc1d043a2a50e674fc9a50e5eadabe3be647b67506b5bb131998
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- esignatur (1.2.5)
4
+ esignatur (1.2.6)
5
5
  activesupport (>= 3.0)
6
6
  faraday (>= 0.10)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (5.2.1)
11
+ activesupport (5.2.3)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 0.7, < 2)
14
14
  minitest (~> 5.1)
@@ -22,21 +22,21 @@ GEM
22
22
  simplecov
23
23
  url
24
24
  coderay (1.1.2)
25
- concurrent-ruby (1.0.5)
25
+ concurrent-ruby (1.1.5)
26
26
  crack (0.4.3)
27
27
  safe_yaml (~> 1.0.0)
28
28
  diff-lcs (1.3)
29
29
  docile (1.3.1)
30
- faraday (0.15.2)
30
+ faraday (0.15.4)
31
31
  multipart-post (>= 1.2, < 3)
32
32
  hashdiff (0.3.7)
33
- i18n (1.1.1)
33
+ i18n (1.6.0)
34
34
  concurrent-ruby (~> 1.0)
35
35
  jaro_winkler (1.5.1)
36
36
  json (2.1.0)
37
37
  method_source (0.9.0)
38
38
  minitest (5.11.3)
39
- multipart-post (2.0.0)
39
+ multipart-post (2.1.1)
40
40
  parallel (1.12.1)
41
41
  parser (2.5.1.0)
42
42
  ast (~> 2.4.0)
@@ -106,4 +106,4 @@ DEPENDENCIES
106
106
  webmock (>= 3.4)
107
107
 
108
108
  BUNDLED WITH
109
- 1.16.6
109
+ 1.17.2
data/README.md CHANGED
@@ -49,7 +49,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
49
49
 
50
50
  ## Contributing
51
51
 
52
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/esignatur. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
52
+ Bug reports and pull requests are welcome on GitHub at https://github.com/samesystem/esignatur. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
53
53
 
54
54
  ## License
55
55
 
@@ -57,4 +57,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
57
57
 
58
58
  ## Code of Conduct
59
59
 
60
- Everyone interacting in the Esignatur project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/esignatur/blob/master/CODE_OF_CONDUCT.md).
60
+ Everyone interacting in the Esignatur project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/samesystem/esignatur/blob/master/CODE_OF_CONDUCT.md).
@@ -8,6 +8,7 @@ require 'esignatur/error'
8
8
 
9
9
  require 'esignatur/orders'
10
10
  require 'esignatur/order'
11
+ require 'esignatur/user'
11
12
 
12
13
  # root module
13
14
  module Esignatur
@@ -1,5 +1,4 @@
1
1
  # frozen_string_literal: true
2
-
3
2
  module Esignatur
4
3
  # main API class
5
4
  class Client
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'esignatur/api_resource'
4
+
5
+ module Esignatur
6
+ # esignatur user representation
7
+ # More info: https://api.esignatur.dk/Documentation/User
8
+ class User
9
+ include ApiResource
10
+
11
+ DEFAULT_BASE_URL = 'https://api.esignatur.dk'
12
+
13
+ def initialize(api_key:, base_url: DEFAULT_BASE_URL)
14
+ @api = Esignatur::Api.new(api_key: api_key, base_url: base_url)
15
+ @attributes = {}
16
+ end
17
+
18
+ def find_by(user_id:, creator_id:)
19
+ headers = { 'X-eSignatur-CreatorId': creator_id }
20
+ response = api_get("user/get/#{user_id}", headers: headers)
21
+ @attributes = response.json_body if errors.empty?
22
+ self
23
+ end
24
+
25
+ private
26
+
27
+ attr_reader :api, :attributes
28
+ end
29
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Esignatur
4
- VERSION = '1.2.5'
4
+ VERSION = '1.2.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esignatur
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Povilas Jurcys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-17 00:00:00.000000000 Z
11
+ date: 2019-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -198,6 +198,7 @@ files:
198
198
  - lib/esignatur/pades.rb
199
199
  - lib/esignatur/source_document.rb
200
200
  - lib/esignatur/status.rb
201
+ - lib/esignatur/user.rb
201
202
  - lib/esignatur/version.rb
202
203
  homepage: https://github.com/samesystem/esignatur
203
204
  licenses: