class OpenMarket::CarrierLookupResponse
Attributes
area_code[R]
area_code_length[R]
binary[R]
binary_length[R]
carrier_id[R]
city[R]
country[R]
country_code[R]
country_name[R]
digits_all[R]
digits_local[R]
ems[R]
estimated_latitude[R]
estimated_longitude[R]
intl_notation[R]
local_format[R]
local_notation[R]
na_line[R]
na_nxx[R]
name[R]
national_number[R]
num_max_length[R]
num_min_length[R]
ported[R]
ported_from[R]
region[R]
region_name[R]
smart_messaging[R]
text_length[R]
timezone_max[R]
timezone_min[R]
unicode[R]
unicode_length[R]
wap_push[R]
zone[R]
zone_name[R]
Public Class Methods
new(http_response)
click to toggle source
Calls superclass method
OpenMarket::Response::new
# File lib/open_market/response.rb, line 30 def initialize(http_response) super if destination = xml.elements["destination"] @country_code = destination.attributes["country_code"].to_i @national_number = destination.attributes["national_number"] @intl_notation = destination.attributes["intl_notation"] @area_code = destination.attributes["area_code"] @area_code_length = destination.attributes["area_code_length"].to_i @num_min_length = destination.attributes["num_min_length"].to_i @num_max_length = destination.attributes["num_max_length"].to_i @na_nxx = destination.attributes["na_nxx"] @na_line = destination.attributes["na_line"] @local_notation = destination.attributes["local_notation"] @local_format = destination.attributes["local_format"] @digits_all = destination.attributes["digits_all"].to_i @digits_local = destination.attributes["digits_local"].to_i @ported = destination.attributes["ported"] == "true" @ported_from = destination.attributes["ported_from"] end if location = xml.elements["location"] @city = location.attributes["city"] @country = location.attributes["country"] @country_name = location.attributes["country_name"] @estimated_latitude = location.attributes["estimated_latitude"].to_f @estimated_longitude = location.attributes["estimated_longitude"].to_f @region = location.attributes["region"] @region_name = location.attributes["region_name"] @timezone_min = location.attributes["timezone_min"].to_i @timezone_max= location.attributes["timezone_max"].to_i @zone = location.attributes["zone"].to_i @zone_name = location.attributes["zone_name"] end if operator = xml.elements["operator"] @carrier_id = operator.attributes["id"].to_i @name = operator.attributes["name"] @binary_length = operator.attributes["binary_length"].to_i @text_length = operator.attributes["text_length"].to_i @unicode_length = operator.attributes["unicode_length"].to_i @binary = operator.attributes["binary"] == "true" @ems = operator.attributes["ems"] == "true" @smart_messaging = operator.attributes["smart_messaging"] == "true" @unicode = operator.attributes["unicode"] == "true" @wap_push = operator.attributes["wap_push"] == "true" end end