Class: Txter::Gateway4info::Request

Inherits:
Txter::Gateway::Request show all
Defined in:
lib/gateway_4info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRequest

Returns a new instance of Request.



76
77
78
79
80
81
# File 'lib/gateway_4info.rb', line 76

def initialize
  unless Txter.configured?
    raise "You need to configure Txter before using it!"
  end
  self.config = Txter.configuration
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



74
75
76
# File 'lib/gateway_4info.rb', line 74

def config
  @config
end

#messageObject

Returns the value of attribute message.



73
74
75
# File 'lib/gateway_4info.rb', line 73

def message
  @message
end

#numberObject

Returns the value of attribute number.



72
73
74
# File 'lib/gateway_4info.rb', line 72

def number
  @number
end

Instance Method Details

#confirm(number) ⇒ Object



90
91
92
93
94
# File 'lib/gateway_4info.rb', line 90

def confirm(number)
  self.number  = Txter.internationalize(number)

  template(:confirm).render(self)
end

#deliver_message(message, number) ⇒ Object



83
84
85
86
87
88
# File 'lib/gateway_4info.rb', line 83

def deliver_message(message, number)
  self.number  = Txter.internationalize(number)
  self.message = message

  template(:deliver).render(self)
end

#unblock(number) ⇒ Object



96
97
98
99
100
# File 'lib/gateway_4info.rb', line 96

def unblock(number)
  self.number = Txter.internationalize(number)

  template(:unblock).render(self)
end