Gem Version Build Status Test Coverage Code Climate Inline docs

Smsc_ru - Ruby API Client for


Add this line to your application's Gemfile:

gem 'smsc_ru'

And then execute:

$ bundle

Or install it yourself as:

$ gem install smsc_ru


Smsc.configure do |config|
 # Mandatory attributes, creating client fail, if it not specified
 config. = 'your_login'
 config.password = 'your_password' # password or MD5 hash

 # Optional configuration
 # default: = 'custom_endpoint'
 # default: true
 config.ssl = false
 # default
 config.logger =

Or via constructor params:

client = do |client|
    client. = 'custom loging'
    client.password = 'custom password'


Usage example: ```ruby client =

# send one sms client.send_sms("79999999999", "Password: 123")

# send multiple sms client.send_sms("79999999999,78888888888", "Password: 123")

# raise error on problem client.send_sms("79999", "Ваш пароль: 123") # => error'invalid phone')

# add additional parameters client.send_sms("79999999999,78888888888", "Password: 123", translit: 1)

# Check sms status client.status(12345, "79999999999") # => Smsc::Status model with attributes

# Receive balance balance = client.balance ```

Gem wrap response in models and raise errors on problems


After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment. SMSC_LOGIN=your_login SMSC_PASSWORD=your_password bin/console After starting console just type ruby client = client.balance

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


  1. Fork it ( )
  2. Create your feature branch (git checkout -b feature/my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/my-new-feature)
  5. Create a new Pull Request


Copyright 2015 SPB TV AG

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.