Build Status Maintainability Test Coverage Gem Version

iTexMo Ruby Plugin

A ruby plugin that uses the iTexMo REST API. You can send SMS using itextmo gem without hassle.

Installation

Add this line to your application's Gemfile:

gem 'itexmo'

And then execute:

$ bundle

Or install it yourself as:

$ gem install itexmo

Finally, generate initializer

$ rails g initializer:itexmo

this will create a file under config/initializer/itexmo.rb Note: api_code should be supplied inside the itextmo.rb.

Usage

I. Sending an SMS

Two ways of sending SMS

message = Itexmo::Message.new(message: 'Your awesome message!', to: '0917XXXXXXX')
message.send

or simply:

Itexmo::Message.send(message: 'Your awesome message!', to: '0917XXXXXXXX')

II. Checking of Service

#Check API Service Status and your SMS Server Status
Itexmo::Service.status

# Check `api_code` Info and Status
Itexmo::Service.apicode_info

III. SMS Reports/Actions

# Show Pending or Outgoing SMS:
Itexmo::Sms.display_outgoing('desc') # default order is 'asc'

# Delete All Pending or Outgoing SMS:
Itexmo::Sms.delete_all_outgoing

# Return All SMS Received (Corporate Premium Apicodes)
Itexmo::Sms.display_messages 

# Return All SMS Received using Originator as Filter (Corporate Premium Apicodes)
Itexmo::Sms.display_messages_via_originator('0917XXXXXXX')

# Delete All SMS Received using Originator as Filter (Corporate Premium Apicodes)
Itexmo::Sms.delete_message_via_originator('0917XXXXXXX')

# Delete an SMS Received using SMS ID as filter (Corporate Premium Apicodes)
Itexmo::Sms.delete_message_via_id('105')

# Delete All SMS Received (Corporate Premium Apicodes)
Itexmo::Sms.delete_messages_all

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/denmarkmeralpis/itexmo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Code of Conduct

Everyone interacting in the Itexmo project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

License

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

paypal