Class: ZenSend::SmsResponse

Inherits:
Struct
  • Object
show all
Defined in:
lib/zensend/sms_response.rb,
lib/zensend/sms_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/sms_response.rb', line 2

def cost_in_pence
  @cost_in_pence
end

#encodingObject

Returns the value of attribute encoding

Returns:

  • (Object)

    the current value of encoding



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

def encoding
  @encoding
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/sms_response.rb', line 2

def new_balance_in_pence
  @new_balance_in_pence
end

#numbersObject

Returns the value of attribute numbers

Returns:

  • (Object)

    the current value of numbers



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

def numbers
  @numbers
end

#sms_partsObject

Returns the value of attribute sms_parts

Returns:

  • (Object)

    the current value of sms_parts



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

def sms_parts
  @sms_parts
end

#tx_guidObject

Returns the value of attribute tx_guid

Returns:

  • (Object)

    the current value of tx_guid



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

def tx_guid
  @tx_guid
end

Instance Method Details

#set_from_response(response_hash) ⇒ Object



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

def set_from_response(response_hash)
  self.tx_guid = response_hash["txguid"]
  self.numbers = response_hash["numbers"]
  self.sms_parts = response_hash["smsparts"]
  self.encoding = response_hash["encoding"]
  self.cost_in_pence = response_hash["cost_in_pence"]
  self.new_balance_in_pence = response_hash["new_balance_in_pence"]
end