0.0
No commit activity in last 3 years
No release in over 3 years
An API to interact with the Poseidon system
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 0.4.0
= 2.4.0
= 1.9.3

Runtime

= 0.8.3
 Project Readme

Jenkins Build Status Travis Build Status

Poseidon::Api

Cliente para interactuar con la API del sistema Poseidon.

Instalación

Agregar la siguiente linea a su Gemfile:

gem 'poseidon-api'

Y luego ejecutar:

$ bundle

O instalar directamente:

$ gem install poseidon-api

Modo de uso

Factura para clientes

api = Poseidon::API(url: 'http://poseidon-url.com', user: 'user@test.com', password: '12345')
invoice = Poseidon::Invoice.new(date: Date.today, sale_point: 1, number: 189122)
invoice.client = Poseidon::Client.new(name: 'Los alamos', cuit: 20243234221, iva_condition_id: 1)
invoice.details << Poseidon::Detail.new(amount: 10, unit_price: 15.50, description: 'Carpetas oficio', iva_rate: 21.0)
invoice.details << Poseidon::Detail.new(amount: 4, unit_price: 35.0, description: 'Carpetas plastificada', iva_rate: 21.0)
emitted = api.emit_invoice(invoice)

Retorna un booleano que indica si pudo o no emitir la factura.

En caso de no emitir la factura se pueden verificar los errores utilizando el método 'errors'

Factura de proveedores

api = Poseidon::API(url: 'http://poseidon-url.com', user: 'user@test.com', password: '12345')
invoice = Poseidon::Invoice.new(date: Date.today, sale_point: 1, number: 189122)
invoice.supplier = Poseidon::Supplier.new(name: 'Los alamos', cuit: 20243234221, iva_condition_id: 1)
invoice.details << Poseidon::Detail.new(amount: 10, unit_price: 15.50, description: 'Carpetas oficio', iva_rate: 21.0)
invoice.details << Poseidon::Detail.new(amount: 4, unit_price: 35.0, description: 'Carpetas plastificada', iva_rate: 21.0)
emitted = api.emit_invoice(invoice)

Links

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request