Class: SunatInvoice::DailySummary
- Inherits:
-
XmlDocument
- Object
- Model
- XmlDocument
- SunatInvoice::DailySummary
- Defined in:
- lib/sunat_invoice/daily_summary.rb
Direct Known Subclasses
Constant Summary
Constants inherited from XmlDocument
XmlDocument::CUSTOMIZATION, XmlDocument::UBL_VERSION
Constants included from Utils
Utils::COMMON_NAMESPACES, Utils::CREDIT_NOTE_NAMESPACES, Utils::DAILY_SUMMARY_NAMESPACES, Utils::DEBIT_NOTE_NAMESPACES, Utils::INVOICE_NAMESPACES, Utils::SUMMARY_NAMESPACES, Utils::TRADE_NAMESPACES, Utils::VOIDED_NAMESPACES
Instance Attribute Summary collapse
-
#reference_date ⇒ Object
Returns the value of attribute reference_date.
Attributes inherited from XmlDocument
#currency, #date, #lines, #provider, #signature
Instance Method Summary collapse
Methods inherited from XmlDocument
#build_ext, #build_lines_xml, #build_number, #build_xml, #formatted_date, #initialize
Methods included from Utils
Methods inherited from Model
Constructor Details
This class inherits a constructor from SunatInvoice::XmlDocument
Instance Attribute Details
#reference_date ⇒ Object
Returns the value of attribute reference_date.
5 6 7 |
# File 'lib/sunat_invoice/daily_summary.rb', line 5 def reference_date @reference_date end |
Instance Method Details
#document_name ⇒ Object
26 27 28 |
# File 'lib/sunat_invoice/daily_summary.rb', line 26 def document_name "#{@provider.ruc}-#{document_number}" end |
#namespaces ⇒ Object
7 8 9 |
# File 'lib/sunat_invoice/daily_summary.rb', line 7 def namespaces DAILY_SUMMARY_NAMESPACES.merge(SUMMARY_NAMESPACES) end |
#operation ⇒ Object
22 23 24 |
# File 'lib/sunat_invoice/daily_summary.rb', line 22 def operation :send_summary end |
#xml ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/sunat_invoice/daily_summary.rb', line 11 def xml build = build_xml do |xml| build_number(xml) build_summary_info(xml) @signature.signer_data(xml) @provider.info(xml, false) build_lines_xml(xml) end @signature.sign(build.to_xml) end |