SmsMasking allows you to send SMS messages from your Ruby application using services provided by www.smsmasking.co.id. Please read the documentation.
This is not official gem of www.smsmasking.co.id.
- Installation
- Initialize
- Send an SMS
- Send SMS by Group
- Add Phone Book
- Edit Phone Book
- Delete Phone Book
- Get Contact List
- Get Contact List by Group
- Get Complete Data
- Find Name
- Find Phone Number
- Add Group
- Edit Group
- Delete Group
- Get List of Group
- Find Group
- Checking Customer Account Balance
- Change Password
Add this line to your application's Gemfile:
gem 'sms_masking'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sms_masking
sms = SmsMasking::Base.new(username: "your_username", password: "your_password")
Parameters :
mobile
: recipientmessage
: SMS
Purpose : To Send an SMS
Example :
sms.send_sms({mobile: "085699999999", message: "your_message"})
Parameters :
mobile
: recipient numbermessage
: SMS
Purpose : To Send SMS to a Group
Example :
sms.send_sms_group({group: "My group", msg: "your_message"})
Parameters :
group
: Group Namemessage
: SMS
Purpose : Add new contact to phone book
Example :
sms.add_phone_book({
name: "John Doe",
mobile: "085699999999",
group: "My Group",
address: "My Address",
birth: "19900101",
desc: "My Description"
})
Parameters :
name
: Contact Namemobile
: Recipientgroup
: Contact Group Nameaddress
(optional) : Contact Addressbirth
(optional) : Contact Birthday (YYYYMMDD)desc
(optional) : Contact Description
Purpose : Edit existing Contact
Example :
sms.edit_phone_book({
id: 1,
name: "John Doe",
mobile: "085699999999",
group: "My Group",
address: "My Address",
birth: "19900101",
desc: "My Description"
})
Parameters :
id
: Contact ID Numbername
: Contact Namemobile
: Recipientgroup
: Contact Group Nameaddress
(optional) : Contact Addressbirth
(optional) : Contact Birthday (YYYYMMDD)desc
(optional) : Contact Description
Purpose : Delete existing contact
Example :
sms.delete_phone_book({id: 1})
Parameters :
id
: Contact ID Number
sms.list_phone_book({
page: 1,
size: 10
})
Parameters :
page
: Page Number (default=1)size
: number of records per page (default=10)
Purpose : To get Contact list by Group Name
sms.list_phone_book_by_group({
page: 1,
size: 10,
group: "My Group"
})
Parameters :
page
: Page Number (default=1)size
: number of records per page (default=10)group
: Group Name
Purpose : To retrieve contact detail
sms.contact_detail({id: 1})
Parameters :
id
: Contact ID Number
Purpose : To search contact by name
sms.find_contact({name: "John Doe"})
Parameters :
name
: Name to search
Purpose : To search contact by Phone Number
sms.find_contact({number: "085699999999"})
Parameters :
number
: Number to search
Purpose : Add a new Group Name
sms.add_group({group: "Group 1"})
Parameters :
group
: Group Name
Purpose : Edit an existing Group
sms.edit_group({id: 1, group: "My Group 1"})
Parameters :
group
: Group Name
Purpose : Delete an existing Group
sms.delete_group({id: 1})
Parameters :
id
: Group ID
Purpose : Retrieve list of existing Group
sms.list_group({
page: 1,
size: 10
})
Parameters :
page
: Page Number (default=1)size
: number of records per page (default=10)
Purpose : Find a Group
sms.find_group({group: "My Group 1"})
Parameters :
group
: Name to search
Purpose : Retrieve account balance
sms.balance
Purpose : To change password
sms.change_password({newpasw: "myS3crEt"})
Parameters :
newpasw
: New Password
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/yunanhelmy/sms_masking. 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.
The gem is available as open source under the terms of the MIT License.