Method: CTM::Call#initialize
- Defined in:
- lib/ctm/call.rb
#initialize(data, token = nil) ⇒ Call
Ca”,“search”:null,“referrer”:null,“location”:null,“source”:“Facebook”,“source_id”:36,“likelihood”:null,“duration”:25, “talk_time”:10,“ring_time”:15,“email”:“[email protected]”,“street”:“1600 Amphitheatre”,“city”:“Escondido”,“state”:“CA”,“country”:“US”,“postal_code”:“94043”, “called_at”:“2013-05-01 11:48 PM -04:00”,“tracking_number_id”:41,“tracking_number”:“+17203584118”,“tracking_label”:null,“business_number”:“+14109759000”,“business_label”:“Main Office”, “receiving_number_id“:9,”dial_status“:”completed“,”caller_number_split“:,”excluded“:false,”tracking_number_format“:”(720) 358-4118“, ”business_number_format“:”(410) 975-9000“,”caller_number_format“:”(760) 705-8888“,”alternative_number“:”(760) 705-8888“,”caller_number_complete“:”+17607058888“, ”caller_number“:”+17607058888“,”visitor“:false,”audio“:”calltrackingmetrics.com/accounts/ACe2a2cc9e29744544bfa706ba45ad9baf/recordings/RE18e40e5aad04e7a35da0b54ba47895da“, ”tag_list“:[”follow up“],”notes“:”“,”latitude“:33.0879,”longitude“:-117.116,”extended_lookup_on“:false,”extended_lookup“:{”first_name“:”“,”last_name“:”“,”name_type“:”“,”phone_type“:”0“,”business_name“:null,”street_number“:”1600“,”street_name“:”Amphitheatre“,”city“:”Mountain View“,”state“:”CA“,”zipcode“:”94043“}
22 23 24 25 26 27 28 29 30 |
# File 'lib/ctm/call.rb', line 22 def initialize(data, token=nil) super(data, token) ReadOnlyFields.each do|field| instance_variable_set("@#{field}", data[field.to_s]) end ReadWriteFields.each do|field| instance_variable_set("@#{field}", data[field.to_s]) end end |