vchain_client 1.0.10 → 1.0.11

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vchain_client.rb +12 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d417b56044799fb656fbe43b67a13389694df44a
4
- data.tar.gz: a698819a9de360ed400cf895f31fbf8739517374
3
+ metadata.gz: e13dad9caf4275a2885df875e8f13edcf5cafcce
4
+ data.tar.gz: 4c39f5d818b4a713d02308ea831ee345eb6a97a5
5
5
  SHA512:
6
- metadata.gz: 11959aaa39c50e677b99084fe7cdd5668bb1148a3539d7a72f382ce5e434672b726983c133471e95496ef0a7ac3e2a894d8c617d70f316f21e6232f13bba932b
7
- data.tar.gz: a476a96e888e458508f082bac4b62465e537c80c39ca1c0d9ef7a9764d259aefcd2acb50f2517a25ae2ab9850c41c30ddbeb553435d280e023975d31a4583d56
6
+ metadata.gz: 377991b55385612681708d9e580016b7fc1b19f5c0ee0f26613f30d62dced178a8134808506d4c85e8cbe9b6b958baea64010056917405e99e3a343b4dbad22f
7
+ data.tar.gz: f33f3594188e7a23722fd5f6d88ce062f7ea6d48215cd91b78e240c0d17be0c236c9b2a57bdb869ea9fb608ead4547525ef93143d35a6676482e1619f3691066
data/lib/vchain_client.rb CHANGED
@@ -1137,13 +1137,24 @@ module VChainClient
1137
1137
  if res["status"] == "ERROR" || res["status"] == "error"
1138
1138
 
1139
1139
  if res["error_reason_code"] == "DOCUMENT_POSSIBLE_MISTAKES"
1140
+
1141
+ possible_mistakes_output = {}
1142
+
1140
1143
  if res.key?("possible_mistakes")
1141
1144
  res["possible_mistakes"].each_with_index { |field,index|
1142
- res["possible_mistakes"][index] = validated_verifications[index]
1145
+
1146
+ possible_mistakes_output[index] = validated_verifications[index]
1143
1147
 
1144
1148
  validated_verifications.delete_at(index)
1145
1149
  }
1146
1150
  end
1151
+
1152
+ return {
1153
+ "status" => "error",
1154
+ "possible_mistakes" => possible_mistakes_output,
1155
+ "validated" => validated_verifications,
1156
+ "reason" => res["error_reason_code"]
1157
+ }
1147
1158
  end
1148
1159
 
1149
1160
  return {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vchain_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksandr Gorelik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-18 00:00:00.000000000 Z
11
+ date: 2017-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: log4r