Class: CTM::ReceivingNumber

Inherits:
Base
  • Object
show all
Defined in:
lib/ctm/receiving_number.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#token

Instance Method Summary collapse

Methods inherited from Base

create, #release!

Constructor Details

#initialize(data, token = nil) ⇒ ReceivingNumber

Returns a new instance of ReceivingNumber.



6
7
8
9
10
11
12
13
14
# File 'lib/ctm/receiving_number.rb', line 6

def initialize(data, token=nil)
  super(data, token)
  @id         = data['id']
  @account_id = data['account_id']
  @name       = data['name']
  @number     = data['number']
  @formatted  = data['formatted']
  @split      = data['split']
end

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id.



3
4
5
# File 'lib/ctm/receiving_number.rb', line 3

def 
  @account_id
end

#formattedObject

Returns the value of attribute formatted.



4
5
6
# File 'lib/ctm/receiving_number.rb', line 4

def formatted
  @formatted
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/ctm/receiving_number.rb', line 3

def id
  @id
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/ctm/receiving_number.rb', line 4

def name
  @name
end

#numberObject

Returns the value of attribute number.



4
5
6
# File 'lib/ctm/receiving_number.rb', line 4

def number
  @number
end

#splitObject

Returns the value of attribute split.



4
5
6
# File 'lib/ctm/receiving_number.rb', line 4

def split
  @split
end

Instance Method Details

#saveObject



16
17
18
19
20
21
22
# File 'lib/ctm/receiving_number.rb', line 16

def save
  options = {
    :name => @name,
    :number => @number
  }
  super(options)
end