esignatur 1.1.1 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/esignatur/api_resource.rb +2 -2
- data/lib/esignatur/order.rb +8 -2
- data/lib/esignatur/version.rb +1 -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: 0ec5608fc8c46c4b6204d2318483a34685b3bd42e266ba7f650f809ae2a8ecae
|
4
|
+
data.tar.gz: df22ce9c51117cb6ed043067b72c7eb9afaae6daaa33b972aff18a5fe97d130b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32812bb4fc28a496f70a888989e2e6c63bd4a44b24f55e02a8cbdc5f50b3c345a6962d88d4dddb2579f366440a8ca22d885d91236c2643aa9ae79a8a2ac3eef5
|
7
|
+
data.tar.gz: fef6921c00bbbae2f4c528fe4f4aa1c03e16baab87c397389160b684a1dc59a1a547453b8e3c6de62045b084c852b137d42862ea2274f5065a1fe017feef3005
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -35,7 +35,7 @@ order = esignatur.orders.find(esignatur_order_id)
|
|
35
35
|
order = esignatur.orders.build
|
36
36
|
order.create(some_order_params) # creates order on esignatur side
|
37
37
|
order.status # returns Status object
|
38
|
-
order.cancel # => true/false
|
38
|
+
order.cancel(creator_id: '123') # => true/false
|
39
39
|
|
40
40
|
pades = order.pades
|
41
41
|
pades.document_data # decoded body of the document
|
@@ -13,8 +13,8 @@ module Esignatur
|
|
13
13
|
|
14
14
|
protected
|
15
15
|
|
16
|
-
def api_post(relative_url, data)
|
17
|
-
make_api_request(:post, relative_url, data: data)
|
16
|
+
def api_post(relative_url, data, **options)
|
17
|
+
make_api_request(:post, relative_url, data: data, **options)
|
18
18
|
end
|
19
19
|
|
20
20
|
def api_get(relative_url, **options)
|
data/lib/esignatur/order.rb
CHANGED
@@ -35,8 +35,14 @@ module Esignatur
|
|
35
35
|
@status ||= Esignatur::Status.new(order: self, api: api).tap(&:fetch)
|
36
36
|
end
|
37
37
|
|
38
|
-
def cancel
|
39
|
-
|
38
|
+
def cancel(attributes)
|
39
|
+
camelized_attributes = attributes.transform_keys(&:to_s).transform_keys(&:camelize)
|
40
|
+
creator_id = camelized_attributes.delete('CreatorId')
|
41
|
+
|
42
|
+
data = { 'OrderId' => id }.merge(camelized_attributes.compact)
|
43
|
+
headers = { 'X-eSignatur-CreatorId': creator_id }
|
44
|
+
|
45
|
+
api_post('Cancel/CancelOrder', data, headers: headers).success?
|
40
46
|
end
|
41
47
|
|
42
48
|
def pades
|
data/lib/esignatur/version.rb
CHANGED
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.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Povilas Jurcys
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|