0.0
No commit activity in last 3 years
No release in over 3 years
Simple ruby wrapper class for http://www.smsmasking.co.id.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 10.0
~> 3.0

Runtime

 Project Readme

SmsMasking

SmsMasking allows you to send SMS messages from your Ruby application using services provided by www.smsmasking.co.id. Please read the documentation.

Disclaimer

This is not official gem of www.smsmasking.co.id.

Index

Installation

Add this line to your application's Gemfile:

gem 'sms_masking'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sms_masking

Usage

Initialize

sms = SmsMasking::Base.new(username: "your_username", password: "your_password")

Parameters :

  • mobile : recipient
  • message : SMS

Send an SMS

Purpose : To Send an SMS

Example :

sms.send_sms({mobile: "085699999999", message: "your_message"})

Parameters :

  • mobile : recipient number
  • message : SMS

Send SMS by Group

Purpose : To Send SMS to a Group

Example :

sms.send_sms_group({group: "My group", msg: "your_message"})

Parameters :

  • group : Group Name
  • message : SMS

Add Phone Book

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 Name
  • mobile : Recipient
  • group : Contact Group Name
  • address (optional) : Contact Address
  • birth (optional) : Contact Birthday (YYYYMMDD)
  • desc (optional) : Contact Description

Edit Phone Book

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 Number
  • name : Contact Name
  • mobile : Recipient
  • group : Contact Group Name
  • address (optional) : Contact Address
  • birth (optional) : Contact Birthday (YYYYMMDD)
  • desc (optional) : Contact Description

Delete Phone Book

Purpose : Delete existing contact

Example :

sms.delete_phone_book({id: 1})

Parameters :

  • id : Contact ID Number

Get Contact List

sms.list_phone_book({
  page: 1, 
  size: 10
})

Parameters :

  • page : Page Number (default=1)
  • size : number of records per page (default=10)

Get Contact List by Group

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

Get Complete Data

Purpose : To retrieve contact detail

sms.contact_detail({id: 1})

Parameters :

  • id : Contact ID Number

Find Name

Purpose : To search contact by name

sms.find_contact({name: "John Doe"})

Parameters :

  • name : Name to search

Find Phone Number

Purpose : To search contact by Phone Number

sms.find_contact({number: "085699999999"})

Parameters :

  • number : Number to search

Add Group

Purpose : Add a new Group Name

sms.add_group({group: "Group 1"})

Parameters :

  • group : Group Name

Edit Group

Purpose : Edit an existing Group

sms.edit_group({id: 1, group: "My Group 1"})

Parameters :

  • group : Group Name

Delete Group

Purpose : Delete an existing Group

sms.delete_group({id: 1})

Parameters :

  • id : Group ID

Get List of Group

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)

Find Group

Purpose : Find a Group

sms.find_group({group: "My Group 1"})

Parameters :

  • group : Name to search

Checking Customer Account Balance

Purpose : Retrieve account balance

sms.balance

Change Password

Purpose : To change password

sms.change_password({newpasw: "myS3crEt"})

Parameters :

  • newpasw : New Password

Development

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.

Contributing

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.

License

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