Class: CzechPostB2bClient::ResponseParsers::GetStatsParser
- Inherits:
-
BaseParser
show all
- Defined in:
- lib/czech_post_b2b_client/response_parsers/get_stats_parser.rb
Instance Attribute Summary
#result
Instance Method Summary
collapse
Methods inherited from BaseParser
#initialize, #steps
call, #call, #errors, #failure?, #finished?, #steps, #success?
Instance Method Details
#build_result ⇒ Object
6
7
8
9
|
# File 'lib/czech_post_b2b_client/response_parsers/get_stats_parser.rb', line 6
def build_result
super
@result[:imports] = imports
end
|
#imports ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/czech_post_b2b_client/response_parsers/get_stats_parser.rb', line 11
def imports
imports_hash = response_root_node
{ requested: imports_hash['importAll'].to_i,
with_errors: imports_hash['importErr'].to_i,
successful: imports_hash['importOk'].to_i,
imported_parcels: imports_hash['parcels'].to_i }
end
|
#response_root_node_name ⇒ Object
19
20
21
|
# File 'lib/czech_post_b2b_client/response_parsers/get_stats_parser.rb', line 19
def response_root_node_name
'getStatsResponse'
end
|