lib/egp_rates/edbe.rb
def raw_exchange_rates
      table_rows = Oga.parse_xml(response.body).xpath('Details/rates')
      # EDBE porvide 5 as 20 XML attributes
      fail ResponseError, 'Unknown HTML' unless table_rows&.size == 1
      table_rows.flat_map(&:attributes).take(20)
    end
def raw_exchange_rates
      table_rows = Oga.parse_xml(response.body).xpath('Details/rates')
      # EDBE porvide 5 as 20 XML attributes
      fail ResponseError, 'Unknown HTML' unless table_rows&.size == 1
      table_rows.flat_map(&:attributes).take(20)
    end
def raw_exchange_rates table_rows = Oga . parse_xml ( response . body ) . xpath ( 'Details/rates' ) # EDBE porvide 5 as 20 XML attributes fail ResponseError , 'Unknown HTML' unless table_rows &. size == 1 table_rows . flat_map ( :attributes ) . take ( 20 ) end
Send the request to the URL and retrun raw data of the response
 @return [Array<Oga::XML::Attribute>]
   [
     Attribute(name: "USDBbuy" value: "17.2500"),
     Attribute(name: "USDBsell" value: "17.7000"),
     Attribute(name: "USDTbuy" value: "17.2500"),
     Attribute(name: "USDTsell" value: "17.6000"),
     ...
   ]
Send the request to the URL and retrun raw data of the response