Directlog
Installation
Add this line to your application's Gemfile:
gem 'directlog'
And then execute:
$ bundle
Or install it yourself as:
$ gem install directlog
Usage
Calculete Freight
Directlog::Freight.calculate(weight: '', zip_code_destination: '', amount: '')
=> {:consultafrete=>
{:sucesso=>"False",
:mensagem=>"A consulta retornou vazio, porem sem erros. Verifique as informações enviadas>",
:valorfrete=>"0.00",
:prazoentrega=>nil}}
Orders
Directlog::Order.create!(xml)
Directlog::Order.find_by_number(xml)
Contributing
- Fork it ( https://github.com/[my-github-username]/directlog/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request