0.0
No release in over 3 years
Extracts the information from the cfdi and converts it into a hash
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.1.4
~> 1.8, >= 1.8.3
~> 1.6, >= 1.6.8
~> 0.13.0
>= 12.3.3
~> 3.0
 Project Readme

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.