Class: Twilio::REST::Numbers::V2::BulkHostedNumberOrderInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Numbers::V2::BulkHostedNumberOrderInstance
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb
Instance Method Summary collapse
-
#bulk_hosting_sid ⇒ String
A 34 character string that uniquely identifies this BulkHostedNumberOrder.
-
#context ⇒ BulkHostedNumberOrderContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_completed ⇒ Time
The date that this resource was completed, given as [GMT RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_created ⇒ Time
The date this resource was created, given as [GMT RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#fetch(order_status: :unset) ⇒ BulkHostedNumberOrderInstance
Fetch the BulkHostedNumberOrderInstance.
-
#friendly_name ⇒ String
A 128 character string that is a human-readable text that describes this resource.
-
#initialize(version, payload, bulk_hosting_sid: nil) ⇒ BulkHostedNumberOrderInstance
constructor
Initialize the BulkHostedNumberOrderInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#notification_email ⇒ String
Email address used for send notifications about this Bulk hosted number request.
- #request_status ⇒ RequestStatus
-
#results ⇒ Array<Hash>
Contains a list of all the individual hosting orders and their information, for this Bulk request.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#total_count ⇒ String
The total count of phone numbers in this Bulk hosting request.
-
#url ⇒ String
The URL of this BulkHostedNumberOrder resource.
Constructor Details
#initialize(version, payload, bulk_hosting_sid: nil) ⇒ BulkHostedNumberOrderInstance
Initialize the BulkHostedNumberOrderInstance
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 132 def initialize(version, payload , bulk_hosting_sid: nil) super(version) # Marshaled Properties @properties = { 'bulk_hosting_sid' => payload['bulk_hosting_sid'], 'request_status' => payload['request_status'], 'friendly_name' => payload['friendly_name'], 'notification_email' => payload['notification_email'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_completed' => Twilio.deserialize_iso8601_datetime(payload['date_completed']), 'url' => payload['url'], 'total_count' => payload['total_count'] == nil ? payload['total_count'] : payload['total_count'].to_i, 'results' => payload['results'], } # Context @instance_context = nil @params = { 'bulk_hosting_sid' => bulk_hosting_sid || @properties['bulk_hosting_sid'] , } end |
Instance Method Details
#bulk_hosting_sid ⇒ String
Returns A 34 character string that uniquely identifies this BulkHostedNumberOrder.
166 167 168 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 166 def bulk_hosting_sid @properties['bulk_hosting_sid'] end |
#context ⇒ BulkHostedNumberOrderContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
157 158 159 160 161 162 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 157 def context unless @instance_context @instance_context = BulkHostedNumberOrderContext.new(@version , @params['bulk_hosting_sid']) end @instance_context end |
#date_completed ⇒ Time
Returns The date that this resource was completed, given as [GMT RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
196 197 198 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 196 def date_completed @properties['date_completed'] end |
#date_created ⇒ Time
Returns The date this resource was created, given as [GMT RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
190 191 192 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 190 def date_created @properties['date_created'] end |
#fetch(order_status: :unset) ⇒ BulkHostedNumberOrderInstance
Fetch the BulkHostedNumberOrderInstance
222 223 224 225 226 227 228 229 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 222 def fetch( order_status: :unset ) context.fetch( order_status: order_status, ) end |
#friendly_name ⇒ String
Returns A 128 character string that is a human-readable text that describes this resource.
178 179 180 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 178 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
240 241 242 243 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 240 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V2.BulkHostedNumberOrderInstance #{values}>" end |
#notification_email ⇒ String
Returns Email address used for send notifications about this Bulk hosted number request.
184 185 186 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 184 def notification_email @properties['notification_email'] end |
#request_status ⇒ RequestStatus
172 173 174 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 172 def request_status @properties['request_status'] end |
#results ⇒ Array<Hash>
Returns Contains a list of all the individual hosting orders and their information, for this Bulk request. Each result object is grouped by its order status. To see a complete list of order status, please check ‘www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/hosted-number-order-resource#status-values’.
214 215 216 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 214 def results @properties['results'] end |
#to_s ⇒ Object
Provide a user friendly representation
233 234 235 236 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 233 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V2.BulkHostedNumberOrderInstance #{values}>" end |
#total_count ⇒ String
Returns The total count of phone numbers in this Bulk hosting request.
208 209 210 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 208 def total_count @properties['total_count'] end |
#url ⇒ String
Returns The URL of this BulkHostedNumberOrder resource.
202 203 204 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 202 def url @properties['url'] end |