Class: CfdiProcessor::StampedExtractor

Inherits:
DataExtractorBase show all
Defined in:
lib/cfdi_processor/stamped_extractor.rb

Instance Attribute Summary collapse

Attributes inherited from DataExtractorBase

#nokogiri_xml, #xml

Instance Method Summary collapse

Methods inherited from DataExtractorBase

#initialize, #method_missing

Constructor Details

This class inherits a constructor from CfdiProcessor::DataExtractorBase

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class CfdiProcessor::DataExtractorBase

Instance Attribute Details

#conceptsObject

Returns the value of attribute concepts.



3
4
5
# File 'lib/cfdi_processor/stamped_extractor.rb', line 3

def concepts
  @concepts
end

#issuerObject

Returns the value of attribute issuer.



3
4
5
# File 'lib/cfdi_processor/stamped_extractor.rb', line 3

def issuer
  @issuer
end

#receiptObject

Returns the value of attribute receipt.



3
4
5
# File 'lib/cfdi_processor/stamped_extractor.rb', line 3

def receipt
  @receipt
end

#receiverObject

Returns the value of attribute receiver.



3
4
5
# File 'lib/cfdi_processor/stamped_extractor.rb', line 3

def receiver
  @receiver
end

#taxesObject

Returns the value of attribute taxes.



3
4
5
# File 'lib/cfdi_processor/stamped_extractor.rb', line 3

def taxes
  @taxes
end

Instance Method Details

#extract_data_from_xmlObject



5
6
7
8
9
10
11
12
13
# File 'lib/cfdi_processor/stamped_extractor.rb', line 5

def extract_data_from_xml
  receipt_data_from_xml
  issuer_data_from_xml
  receiver_data_from_xml
  concepts_data_from_xml
  taxes_data_from_xml

  self
end

#translate_dataObject



15
16
17
18
19
20
21
22
23
# File 'lib/cfdi_processor/stamped_extractor.rb', line 15

def translate_data
  _translate_receipt(:cfdi)
  _translate_issuer(:cfdi)
  _translate_receiver(:cfdi)
  _translate_concepts(:cfdi)
  _translate_taxes(:cfdi)

  self
end