Class: Bianchi::USSD::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/bianchi/ussd/session.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params, menu = nil, page_number = nil) ⇒ Session

Returns a new instance of Session.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/bianchi/ussd/session.rb', line 10

def initialize(params, menu = nil, page_number = nil)
  @params = params.with_indifferent_access
  @activity_state = params[:activity_state]
  @mobile_number = params[:mobile_number]
  @id = params[:session_id]
  @input_body = params[:input_body]
  @prompt_data = {}
  @menu = menu
  @page_number = page_number
  @store = Store.new(self)
end

Instance Attribute Details

#activity_stateObject

Returns the value of attribute activity_state.



6
7
8
# File 'lib/bianchi/ussd/session.rb', line 6

def activity_state
  @activity_state
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/bianchi/ussd/session.rb', line 6

def id
  @id
end

#input_bodyObject

Returns the value of attribute input_body.



6
7
8
# File 'lib/bianchi/ussd/session.rb', line 6

def input_body
  @input_body
end

Returns the value of attribute menu.



6
7
8
# File 'lib/bianchi/ussd/session.rb', line 6

def menu
  @menu
end

#mobile_numberObject

Returns the value of attribute mobile_number.



6
7
8
# File 'lib/bianchi/ussd/session.rb', line 6

def mobile_number
  @mobile_number
end

#page_numberObject

Returns the value of attribute page_number.



6
7
8
# File 'lib/bianchi/ussd/session.rb', line 6

def page_number
  @page_number
end

#paramsObject

Returns the value of attribute params.



6
7
8
# File 'lib/bianchi/ussd/session.rb', line 6

def params
  @params
end

#prompt_dataObject

Returns the value of attribute prompt_data.



6
7
8
# File 'lib/bianchi/ussd/session.rb', line 6

def prompt_data
  @prompt_data
end

#storeObject

Returns the value of attribute store.



6
7
8
# File 'lib/bianchi/ussd/session.rb', line 6

def store
  @store
end