|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace MessageBird\Objects; |
| 4 | + |
| 5 | +/** |
| 6 | + * Class Lookup |
| 7 | + * |
| 8 | + * @package MessageBird\Objects |
| 9 | + */ |
| 10 | +class Lookup extends Base |
| 11 | +{ |
| 12 | + const TYPE_FIXED_LINE = "fixed line"; |
| 13 | + const TYPE_MOBILE = "mobile"; |
| 14 | + const TYPE_FIXED_LINE_OR_MOBILE = "fixed line or mobile"; |
| 15 | + const TYPE_TOLL_FREE = "toll free"; |
| 16 | + const TYPE_PREMIUM_RATE = "premium rate"; |
| 17 | + const TYPE_SHARED_COST = "shared cost"; |
| 18 | + const TYPE_VOIP = "voip"; |
| 19 | + const TYPE_PERSONAL_NUMBER = "personal number"; |
| 20 | + const TYPE_PAGER = "pager"; |
| 21 | + const TYPE_UNIVERSAL_ACCESS_NUMBER = "universal access number"; |
| 22 | + const TYPE_VOICE_MAIL = "voice mail"; |
| 23 | + const TYPE_UNKNOWN = "unknown"; |
| 24 | + |
| 25 | + /** |
| 26 | + * The URL of the created object. |
| 27 | + * |
| 28 | + * @var string |
| 29 | + */ |
| 30 | + protected $href; |
| 31 | + /** |
| 32 | + * The country code for this number in ISO 3166-1 alpha-2 format. |
| 33 | + * |
| 34 | + * @var string |
| 35 | + */ |
| 36 | + protected $countryCode; |
| 37 | + |
| 38 | + /** |
| 39 | + * The country calling code for this number. |
| 40 | + * |
| 41 | + * @var integer |
| 42 | + */ |
| 43 | + protected $countryPrefix; |
| 44 | + |
| 45 | + /** |
| 46 | + * The phone number in E.164 format without the prefixed plus-sign. |
| 47 | + * |
| 48 | + * @var integer |
| 49 | + */ |
| 50 | + protected $phoneNumber; |
| 51 | + |
| 52 | + /** |
| 53 | + * The type of number. This can be fixed line, mobile, fixed line or mobile, toll free, premium rate, shared cost, voip, personal number, pager, universal access number, voice mail or unknown* |
| 54 | + * @var string |
| 55 | + */ |
| 56 | + protected $type; |
| 57 | + |
| 58 | + /** |
| 59 | + * An associative array containing references to this phone number in several different formats. |
| 60 | + * |
| 61 | + * @var array |
| 62 | + * |
| 63 | + * e164: The phone number in E.164 format. |
| 64 | + * international: The phone number in international format. |
| 65 | + * national: The phone number in national/local format. |
| 66 | + * rfc3966: The phone number in RFC3966 format. |
| 67 | + */ |
| 68 | + protected $formats; |
| 69 | + |
| 70 | + /** |
| 71 | + * The most recent HLR object. If no such HLR objects exists, this array won't be returned. |
| 72 | + * |
| 73 | + * @var array |
| 74 | + * |
| 75 | + * id(string): An unique random ID which is created on the MessageBird platform. |
| 76 | + * network(int): The MCCMNC code of the network provider. |
| 77 | + * reference(string): A client reference. |
| 78 | + * status(string): The status of the HLR request. Possible values: sent, absent, active, unknown, and failed. |
| 79 | + * createdDatetime(datetime): The date and time of the creation of the message in RFC3339 format (Y-m-d\TH:i:sP). |
| 80 | + * statusDatetime(datetime): The datum time of the last status in RFC3339 format (Y-m-d\TH:i:sP). |
| 81 | + */ |
| 82 | + protected $hlr; |
| 83 | + |
| 84 | + /** |
| 85 | + * Get the href |
| 86 | + * |
| 87 | + * @return mixed |
| 88 | + */ |
| 89 | + public function getHref() |
| 90 | + { |
| 91 | + return $this->href; |
| 92 | + } |
| 93 | + |
| 94 | + /** |
| 95 | + * Get the href |
| 96 | + * |
| 97 | + * @return mixed |
| 98 | + */ |
| 99 | + public function getCountryCode() |
| 100 | + { |
| 101 | + return $this->countryCode; |
| 102 | + } |
| 103 | + |
| 104 | + /** |
| 105 | + * Get the href |
| 106 | + * |
| 107 | + * @return mixed |
| 108 | + */ |
| 109 | + public function getCountryPrefix() |
| 110 | + { |
| 111 | + return $this->countryPrefix; |
| 112 | + } |
| 113 | + |
| 114 | + /** |
| 115 | + * Get the href |
| 116 | + * |
| 117 | + * @return mixed |
| 118 | + */ |
| 119 | + public function getPhoneNumber() |
| 120 | + { |
| 121 | + return $this->phoneNumber; |
| 122 | + } |
| 123 | + |
| 124 | + /** |
| 125 | + * Get the href |
| 126 | + * |
| 127 | + * @return mixed |
| 128 | + */ |
| 129 | + public function getType() |
| 130 | + { |
| 131 | + return $this->type; |
| 132 | + } |
| 133 | + |
| 134 | + /** |
| 135 | + * Get the href |
| 136 | + * |
| 137 | + * @return mixed |
| 138 | + */ |
| 139 | + public function getFormats() |
| 140 | + { |
| 141 | + return $this->formats; |
| 142 | + } |
| 143 | + |
| 144 | + /** |
| 145 | + * Get the href |
| 146 | + * |
| 147 | + * @return mixed |
| 148 | + */ |
| 149 | + public function getHLR() |
| 150 | + { |
| 151 | + return $this->hlr; |
| 152 | + } |
| 153 | +} |
0 commit comments