Get phone number

   Jia::User.new.phone # => '18100000000'
487709
def phone
      @phone ||= -> {
        mac = Jia::Utils.load_data('phone_mac').sample
        area_code = rand(9999).to_s.center(4, rand(9).to_s)
        user_identifier = rand(9999).to_s.center(4, rand(9).to_s)
        "#{mac}#{area_code}#{user_identifier}"
      }.call
    end
644774
def _serialize(self, value, attr, obj):
        """"""
        value = super(PhoneNumberField, self)._serialize(value, attr, obj)

        if value:
            value = self._format_phone_number(value, attr)

        return value
411154
def new
      @user = User.new
  
      respond_to do |format|
        format.html # new.html.erb
        format.json { render json: @user }
      end
    end
1287189
def getSenderNumberMgtURL(self, CorpNum, UserID):
        
        result = self._httpget('/FAX/?TG=SENDER', CorpNum, UserID)
        return result.url
49049
function (user) {
  if (user.id)
    return {_id: user.id};
  else if (user.username)
    return {username: user.username};
  else if (user.email)
    return {"emails.address": user.email};
  throw new Error("shouldn't happen (validation missed something)");
}
737423
def get_contact(id, opts = {})
      data, _status_code, _headers = get_contact_with_http_info(id, opts)
      return data
    end
313842
def fetch(self, end=values.unset, start=values.unset):
        
        params = values.of({'End': end, 'Start': start, })

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return UsageInstance(self._version, payload, sim_sid=self._solution['sim_sid'], )
445114
def eth_getBlockByNumber(self, number):
        
        block_hash = self.reader._get_block_hash(number)
        block_number = _format_block_number(number)
        body_key = body_prefix + block_number + block_hash
        block_data = self.db.get(body_key)
        body = rlp.decode(block_data, sedes=Block)
        return body
915164
async def get_record(self, *,
                         chat: typing.Union[str, int, None] = None,
                         user: typing.Union[str, int, None] = None) -> typing.Dict:
        
        chat, user = self.check_address(chat=chat, user=user)
        addr = f"fsm:{chat}:{user}"

        conn = await self.redis()
        data = await conn.execute('GET', addr)
        if data is None:
            return {'state': None, 'data': {}}
        return json.loads(data)
679138
def getContactItems(self, person):
        
        return person.store.query(
            PhoneNumber, PhoneNumber.person == person)
1003036
function datenum(v, date1904) {
        // console.log(v)
        if (date1904) v += 1462;
        let epoch = Date.parse(v);
        return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
    }
800822
def domestic_mobile_phone_number(value):
    

    try:
        parsed = phonenumbers.parse(value, 'GB')
    except NumberParseException:
        pass
    else:
        is_mobile = carrier._is_mobile(number_type(parsed))
        if is_mobile and phonenumbers.is_valid_number(parsed):
            return None
    raise ValidationError(MESSAGE_INVALID_PHONE_NUMBER)
1140362
function(jid_or_user_id) {
        var jid;
        if (typeof jid_or_user_id === 'string') {
            jid = jid_or_user_id;
        } else if (typeof jid_or_user_id === 'number') {
            jid = jid_or_user_id + '-' + config.creds.appId + '@' + config.endpoints.chat;
        } else {
            throw new Error('The method "jidOrUserId" may take jid or id');
        }
        return jid;
    }
1255027
def updated_by(self):
        
        if self.api and self.updated_by_id:
            return self.api._get_user(self.updated_by_id)
1166026
function getCaller(req) {
        var ipAddress = req.headers['x-forwarded-for'] || req.info.remoteAddress || '';
        var user = req.user;

        if (user) {

            // if user admin and there is an onBehalfOf value then use onBehalfOf
            if (user.role === 'admin' && req.query.onBehalfOfId) {
                return {
                    _id:    req.query.onBehalfOfId,
                    name:   req.query.onBehalfOfName,
                    role:   req.query.onBehalfOfRole,
                    type:   req.query.onBehalfOfType,
                    ipAddress: ipAddress
                };
            }

            // else return user data as caller info
            return {
                _id:    user._id,
                name:   user.username,
                role:   user.role,
                type:   'user',
                user:   user,
                ipAddress: ipAddress
            };

        }
        else if (req.deviceId) {
            return {
                _id:    req.deviceId,
                name:   req.deviceId,
                role:   'device',
                type:   'device',
                ipAddress: ipAddress
            };
        }
        // if no other auth, but GET then defer to fakeblock ACL level security
        //else if (req.method === 'get' || req.method === 'options') {
        else {
            return {
                _id:    'unknown',
                name:   'unknown',
                role:   'visitor',
                type:   'visitor',
                ipAddress: ipAddress
            };
        }
    }
549330
def consume_number
      repr = String.new
      type = :integer

      repr << @s.consume if @s.peek =~ RE_NUMBER_SIGN
      repr << (@s.scan(RE_DIGIT) || '')

      if match = @s.scan(RE_NUMBER_DECIMAL)
        repr << match
        type = :number
      end

      if match = @s.scan(RE_NUMBER_EXPONENT)
        repr << match
        type = :number
      end

      [repr, convert_string_to_number(repr), type]
    end
71234
def lastCall(self): #pylint: disable=invalid-name
        
        last_index = len(super(SinonSpy, self)._get_wrapper().call_list) - 1
        return self.getCall(last_index)