avmtrf1-tools 0.27.0 → 0.27.1

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: 10d3b52fd72e610bdf5a2024f9c470515fb80ba2c561ee9c0034de160dbce8ba
4
- data.tar.gz: 1bd4ba694ce3fb8882eef48c67decddf0e3cf3e06047034206af840b95f0fdd5
3
+ metadata.gz: bc1590e048bb7bc9796bdd575bc57e925c636861bd4807e5c48542cb9a03b527
4
+ data.tar.gz: b1319b639563051687d546b1801053ac00bec9b84e9add31be091f74a94ff815
5
5
  SHA512:
6
- metadata.gz: bb87800657023bd8db9b1b2ed1934ad3ba963fa6d8a529ed5ce552667a34563f84096f1e03f903be7ed633affa9a7a4ffdc31eaf75ebd9a693cd3b75f93ba983
7
- data.tar.gz: 199c3a3168c1746edfca9156c5b9550ecb52d6e7502aaa204ab6d1c5a1759521e77f055ff079583449acd4182bbb2012490e97b168f331f3720f2abb57253a7a
6
+ metadata.gz: 52e4d1ae9b2aba368c6225ae65e9b6548a74c02c2f0d142ab98c90fbd8bc9e542e6be33c24edd8ee68705d6832fb0c6072cc83d98c963e957922a7113a1b14e3
7
+ data.tar.gz: e481c6ccc6057b73d84c8ec76837d5c7e34fba19f2090b72f9a9d1ac2afed7ca6b94886e4262a4a7eb18700c123bb94a1c937b45e016f51985bf9b8d91de1347
@@ -7,9 +7,10 @@ module Avmtrf1
7
7
  module Entities
8
8
  class Issue < ::Avmtrf1::RestProvider::Entity
9
9
  class << self
10
- def raw_data_to_data(raw_data)
11
- sanitize_data(raw_data.fetch('QueryMS_RMTICKETResponse').fetch('MS_RMTICKETSet')
12
- .fetch('TICKET'))
10
+ def parse_data(data)
11
+ data.fetch('QueryMS_RMTICKETResponse')['MS_RMTICKETSet'].if_present(nil) do |v|
12
+ sanitize_data(v.fetch('TICKET'))
13
+ end
13
14
  end
14
15
 
15
16
  def sanitize_data(data)
@@ -42,7 +43,7 @@ module Avmtrf1
42
43
  end
43
44
 
44
45
  def initialize(instance, data)
45
- super instance, self.class.raw_data_to_data(data)
46
+ super instance, data
46
47
  end
47
48
  end
48
49
  end
@@ -28,7 +28,9 @@ module Avmtrf1
28
28
  end
29
29
 
30
30
  def issue(provider_issue_id)
31
- issue_class.new(self, request(issue_get_url_suffix(provider_issue_id)))
31
+ data = request(issue_get_url_suffix(provider_issue_id))
32
+ data = issue_class.parse_data(data) if issue_class.respond_to?(:parse_data)
33
+ data.present? ? issue_class.new(self, data) : nil
32
34
  end
33
35
 
34
36
  def request(service_url_suffix)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avmtrf1
4
4
  module Tools
5
- VERSION = '0.27.0'
5
+ VERSION = '0.27.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avmtrf1-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.27.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo H. Bogoni