Bindings para api Zenvia
Add this line to your application's Gemfile:
gem 'zenvia-ruby'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install zenvia-ruby
Add this to an intitializer
Zenvia.configure do |c|
c.token = 'xxxxxx'
c.whatsapp_from = 'dent-sparrow'
end
Send text messages:
Zenvia::WhatsApp.send_text(to: 'xxxx', message: 'primeira via api')
Send template messages:
Zenvia::WhatsApp.send_template(to: 'xxxxx'
template_id: '7020afb0-0bf7-4c25-96a5-dc47383b7f7c',
fields: {"name": "aaaa",
"productName": "bbbb",
"deliveryDate": "ccc"})
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/alextakitani/zenvia-ruby.
The gem is available as open source under the terms of the MIT License.