Class: ZenSend::OperatorLookupResponse

Inherits:
Struct
  • Object
show all
Defined in:
lib/zensend/operator_lookup_response.rb,
lib/zensend/operator_lookup_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cost_in_penceObject

Returns the value of attribute cost_in_pence

Returns:

  • (Object)

    the current value of cost_in_pence



2
3
4
# File 'lib/zensend/operator_lookup_response.rb', line 2

def cost_in_pence
  @cost_in_pence
end

#mccObject

Returns the value of attribute mcc

Returns:

  • (Object)

    the current value of mcc



2
3
4
# File 'lib/zensend/operator_lookup_response.rb', line 2

def mcc
  @mcc
end

#mncObject

Returns the value of attribute mnc

Returns:

  • (Object)

    the current value of mnc



2
3
4
# File 'lib/zensend/operator_lookup_response.rb', line 2

def mnc
  @mnc
end

#new_balance_in_penceObject

Returns the value of attribute new_balance_in_pence

Returns:

  • (Object)

    the current value of new_balance_in_pence



2
3
4
# File 'lib/zensend/operator_lookup_response.rb', line 2

def new_balance_in_pence
  @new_balance_in_pence
end

#operatorObject

Returns the value of attribute operator

Returns:

  • (Object)

    the current value of operator



2
3
4
# File 'lib/zensend/operator_lookup_response.rb', line 2

def operator
  @operator
end

Instance Method Details

#set_from_response(response_hash) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/zensend/operator_lookup_response.rb', line 6

def set_from_response(response_hash)
  self.mnc = response_hash["mnc"]
  self.mcc = response_hash["mcc"]
  self.operator = response_hash["operator"]
  self.new_balance_in_pence = response_hash["new_balance_in_pence"]
  self.cost_in_pence = response_hash["cost_in_pence"]
end