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
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 146 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
167 168 169 170 171 172 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 167 def context unless @instance_context @instance_context = PortingBulkPortabilityContext.new(@version , @params['sid']) end @instance_context end |
#datetime_created ⇒ Time
188 189 190 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 188 def datetime_created @properties['datetime_created'] end |
#fetch ⇒ PortingBulkPortabilityInstance
Fetch the PortingBulkPortabilityInstance
207 208 209 210 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 207 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
221 222 223 224 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 221 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.PortingBulkPortabilityInstance #{values}>" end |
#phone_numbers ⇒ Array<Hash>
194 195 196 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 194 def phone_numbers @properties['phone_numbers'] end |
#sid ⇒ String
176 177 178 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 176 def sid @properties['sid'] end |
#status ⇒ Status
182 183 184 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 182 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
214 215 216 217 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 214 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.PortingBulkPortabilityInstance #{values}>" end |
#url ⇒ String
200 201 202 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb', line 200 def url @properties['url'] end |