Project

wsaa-ruby

0.0
The project is in a healthy, maintained state
Ruby implementation of AFIP WSAA (Web Service de Autenticación y Autorización) for authenticating with Argentine tax authority web services
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 2.0
~> 13.0
~> 3.0
~> 6.0
~> 3.0

Runtime

~> 2.0
 Project Readme

WSAA Ruby

Ruby client for AFIP's WSAA (Web Service de Autenticación y Autorización).

WSAA is the authentication service required to access AFIP's web services in Argentina. This gem handles the login process to obtain TOKEN and SIGN credentials needed to call other AFIP services like WSFE (electronic invoicing).

Installation

Add this line to your application's Gemfile:

gem 'wsaa-ruby'

And then execute:

bundle install

Or install it yourself as:

gem install wsaa-ruby

Usage

require 'wsaa'

# Configure the client
Wsaa.configure do |config|
  config.pkey = '/path/to/private_key.pem'
  config.cert = '/path/to/certificate.crt'
  config.environment = :production  # or :testing for homologation
  config.service = 'wsfe'           # the service you want to access
end

# Get authentication credentials
credentials = Wsaa.authenticate

credentials.token  # => "PD94bWwg..."
credentials.sign   # => "dGhpcyBp..."

Documentation

Development

After checking out the repo, run bundle install to install dependencies. Then, run rake spec to run the tests.

Contributing

Bug reports and pull requests are welcome on GitHub.

License

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