Class: Signupto::Base
- Inherits:
-
Object
- Object
- Signupto::Base
- Defined in:
- lib/signupto/base.rb
Class Method Summary collapse
-
.balance(options = {}) ⇒ Object
retrives your account balance and returns it as a string.
-
.send!(options = {}) ⇒ Object
Upon a sucsesfull send this will return the message number for tracking purposese on the signupto systems.
Class Method Details
.balance(options = {}) ⇒ Object
retrives your account balance and returns it as a string
6 7 8 9 10 11 |
# File 'lib/signupto/base.rb', line 6 def balance( = {}) if .has_key?(:account_hash) and .has_key?(:customer_number) account = Account.new([:account_hash], [:customer_number]) return Action::Balance.new(account).to_s end end |
.send!(options = {}) ⇒ Object
Upon a sucsesfull send this will return the message number for tracking purposese on the signupto systems.
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/signupto/base.rb', line 15 def send!( = {}) if .has_key?(:account_hash) and .has_key?(:customer_number) account = Account.new([:account_hash], [:customer_number]) if .has_key?(:message) and .has_key?(:to) = Message.new([:to], [:message], [:from]) puts .to return Action::Sender.new(account, ) else raise ArgumentError, "You must supply a message to send and a place to send it" end end end |