Sha256: 65ea2ea90d87912dfaa1f79e5166bf28cda937451d72d4076b3b99ae8337eb15
Contents?: true
Size: 522 Bytes
Versions: 3
Compression:
Stored size: 522 Bytes
Contents
module Trebbianno class Response attr_accessor :response def initialize(raw_response, type) @raw_response = raw_response @response = parse_response(raw_response) @type = type end def failure? !success? end def success? # @response.parsed["#{@type}_response"]["#{@type}_result"][:status] == '0001' true end def parse_response(xml_response) return nil if xml_response.blank? XmlSimple.xml_in(xml_response) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
trebbianno-ruby-api-0.0.3 | lib/trebbianno/response.rb |
trebbianno-ruby-api-0.0.2 | lib/trebbianno/response.rb |
trebbianno-ruby-api-0.0.1 | lib/trebbianno/response.rb |