Class: Twilio::REST::Numbers::V1::PortingBulkPortabilityInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Numbers::V1::PortingBulkPortabilityInstance
- Defined in:
- lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb
Instance Method Summary collapse
-
#context ⇒ PortingBulkPortabilityContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#datetime_created ⇒ Time
The date that the Portability check was created, given in ISO 8601 format.
-
#fetch ⇒ PortingBulkPortabilityInstance
Fetch the PortingBulkPortabilityInstance.
-
#initialize(version, payload, sid: nil) ⇒ PortingBulkPortabilityInstance
constructor
Initialize the PortingBulkPortabilityInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#phone_numbers ⇒ Array<Hash>
Contains a list with all the information of the requested phone numbers.
-
#sid ⇒ String
A 34 character string that uniquely identifies this Portability check.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
This is the url of the request that you’re trying to reach out to locate the resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ PortingBulkPortabilityInstance
Initialize the PortingBulkPortabilityInstance
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 145 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'status' => payload['status'], 'datetime_created' => Twilio.deserialize_iso8601_datetime(payload['datetime_created']), 'phone_numbers' => payload['phone_numbers'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#context ⇒ PortingBulkPortabilityContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
166 167 168 169 170 171 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 166 def context unless @instance_context @instance_context = PortingBulkPortabilityContext.new(@version , @params['sid']) end @instance_context end |
#datetime_created ⇒ Time
Returns The date that the Portability check was created, given in ISO 8601 format.
187 188 189 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 187 def datetime_created @properties['datetime_created'] end |
#fetch ⇒ PortingBulkPortabilityInstance
Fetch the PortingBulkPortabilityInstance
206 207 208 209 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 206 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
220 221 222 223 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 220 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.PortingBulkPortabilityInstance #{values}>" end |
#phone_numbers ⇒ Array<Hash>
Returns Contains a list with all the information of the requested phone numbers. Each phone number contains the following properties: ‘phone_number`: The phone number which portability is to be checked. `portable`: Boolean flag specifying if phone number is portable or not. `not_portable_reason`: Reason why the phone number cannot be ported into Twilio, `null` otherwise. `not_portable_reason_code`: The Portability Reason Code for the phone number if it cannot be ported in Twilio, `null` otherwise. `pin_and_account_number_required`: Boolean flag specifying if PIN and account number is required for the phone number. `number_type`: The type of the requested phone number. `country` Country the phone number belongs to. `messaging_carrier` Current messaging carrier of the phone number. `voice_carrier` Current voice carrier of the phone number.
193 194 195 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 193 def phone_numbers @properties['phone_numbers'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this Portability check.
175 176 177 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 175 def sid @properties['sid'] end |
#status ⇒ Status
181 182 183 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 181 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
213 214 215 216 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 213 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.PortingBulkPortabilityInstance #{values}>" end |
#url ⇒ String
Returns This is the url of the request that you’re trying to reach out to locate the resource.
199 200 201 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 199 def url @properties['url'] end |