Class: CTM::Number
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#formatted ⇒ Object
Returns the value of attribute formatted.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#routing ⇒ Object
Returns the value of attribute routing.
-
#split ⇒ Object
Returns the value of attribute split.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(data, token = nil) ⇒ Number
constructor
A new instance of Number.
- #receiving_numbers(options = {}) ⇒ Object
- #source ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(data, token = nil) ⇒ Number
Returns a new instance of Number.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/ctm/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'] @routing = data['routing'] end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
3 4 5 |
# File 'lib/ctm/number.rb', line 3 def account_id @account_id end |
#formatted ⇒ Object
Returns the value of attribute formatted.
4 5 6 |
# File 'lib/ctm/number.rb', line 4 def formatted @formatted end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/ctm/number.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/ctm/number.rb', line 4 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
4 5 6 |
# File 'lib/ctm/number.rb', line 4 def number @number end |
#routing ⇒ Object
Returns the value of attribute routing.
4 5 6 |
# File 'lib/ctm/number.rb', line 4 def routing @routing end |
#split ⇒ Object
Returns the value of attribute split.
4 5 6 |
# File 'lib/ctm/number.rb', line 4 def split @split end |
Instance Method Details
#receiving_numbers(options = {}) ⇒ Object
17 18 19 |
# File 'lib/ctm/number.rb', line 17 def receiving_numbers(={}) CTM::ReceivingNumberList.new(.merge(:account_id => @account_id, :number_id => @id), @token) end |
#source ⇒ Object
21 22 |
# File 'lib/ctm/number.rb', line 21 def source end |