Skip to content

Extracts the information from the CFDI (Mexico) and converts it into a hash.

License

Notifications You must be signed in to change notification settings

buhocontable/cfdi_processor

Repository files navigation

CfdiProcessor

Extracts the information from the CFDI (Mexico) and converts it into a hash.

Build Status Coverage Status Gem Version

Installation

Add this line to your application's Gemfile:

gem 'cfdi_processor'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cfdi_processor

Usage

Extract CFDI Data

Create an instance of CfdiProcessor::StampedExtractor and pass to it a xml string.

xml_data = CfdiProcessor::StampedExtractor.new(xml_string)

To access to the data extracted.

# => Execute the instance methods
xml_data.receipt
xml_data.issuer
xml_data.receiver
xml_data.concepts
xml_data.taxes

To access to the XML string and Nokogiri document.

# =>
xml_data.xml

# =>
xml_data.nokogiri_xml

Contributing

Bug report or pull request are welcome. Make a pull request:

  • Clone the repo
  • Create a new feature branch
  • Commit your changes
  • Push the new branch
  • Create new pull-request

Please write tests if necessary.

License

The gem is available as open source under the terms of the MIT License.

About

Extracts the information from the CFDI (Mexico) and converts it into a hash.

Resources

License

Stars

Watchers

Forks

Packages

No packages published