Module: BrInvoicesPdf::Cfe::Parser::Payment
- Extended by:
- Util::XmlLocate
- Defined in:
- lib/br_invoices_pdf/cfe/parser/payment.rb
Class Method Summary collapse
Methods included from Util::XmlLocate
locate_element, node_locate, root_path
Class Method Details
.execute(xml) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/br_invoices_pdf/cfe/parser/payment.rb', line 11 def execute(xml) { approximate_value_of_taxes: locate_element(xml, 'infCFe/total/vCFeLei12741'), total: locate_element(xml, 'infCFe/total/vCFe'), discount: locate_element(xml, 'infCFe/total/ICMSTot/vDesc'), total_price: locate_element(xml, 'infCFe/total/ICMSTot/vProd'), cashback: locate_element(xml, 'infCFe/pgto/vTroco'), paid: locate_element(xml, 'infCFe/pgto/MP/vMP') } end |