class Beaver::AssociatedPhone
AssociatedPhone
Model.
Attributes
country_code[RW]
TODO: Write general description for this method @return [String]
phone_number[RW]
TODO: Write general description for this method @return [String]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/associated_phone.rb, line 32 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. country_code = hash['country_code'] phone_number = hash['phone_number'] # Create object from extracted values. AssociatedPhone.new(country_code, phone_number) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/associated_phone.rb, line 18 def self.names @_hash = {} if @_hash.nil? @_hash['country_code'] = 'country_code' @_hash['phone_number'] = 'phone_number' @_hash end
new(country_code = nil, phone_number = nil)
click to toggle source
# File lib/beaver/models/associated_phone.rb, line 25 def initialize(country_code = nil, phone_number = nil) @country_code = country_code @phone_number = phone_number end