Class: OpenMarket::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/open_market/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(account_id, account_password, options = {}) ⇒ Base

Returns a new instance of Base.



4
5
6
7
8
9
10
# File 'lib/open_market/base.rb', line 4

def initialize(, , options = {})
  @account_id = 
  @account_password = 

  @server = options[:server] || 'smsc-01.openmarket.com'
  @path   = options[:path] || '/wmp'
end

Instance Method Details

#preview(phone_number) ⇒ Object



12
13
14
# File 'lib/open_market/base.rb', line 12

def preview(phone_number)
  request(:type => 'preview', :destination => { :address => phone_number })
end