class RingCentralSdk::REST::Request::Inflator::ContactInfo
ContactInfo
class will inflate contact info to array
Public Instance Methods
inflate_to_array(any = nil)
click to toggle source
# File lib/ringcentral_sdk/rest/request/inflator/contact_info.rb, line 7 def inflate_to_array(any = nil) contacts = [] if any.is_a?(Array) any.each do |contact| contacts.push inflate_to_object(contact) end elsif any.is_a?(Hash) contacts = [any] elsif any.is_a?(String) || any.is_a?(Integer) contacts = [{ phoneNumber: any }] end contacts end
inflate_to_object(any = nil)
click to toggle source
# File lib/ringcentral_sdk/rest/request/inflator/contact_info.rb, line 21 def inflate_to_object(any = nil) contact = {} if any.is_a?(Hash) contact = any elsif any.is_a?(String) || any.is_a?(Integer) contact = { phoneNumber: any } end contact end