Class: Twilio::REST::Numbers::V2::AuthorizationDocumentContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Numbers::V2::AuthorizationDocumentContext
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/authorization_document.rb,
lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb
Defined Under Namespace
Classes: DependentHostedNumberOrderInstance, DependentHostedNumberOrderList, DependentHostedNumberOrderPage
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the AuthorizationDocumentInstance.
-
#dependent_hosted_number_orders ⇒ DependentHostedNumberOrderList, DependentHostedNumberOrderContext
Access the dependent_hosted_number_orders.
-
#fetch ⇒ AuthorizationDocumentInstance
Fetch the AuthorizationDocumentInstance.
-
#initialize(version, sid) ⇒ AuthorizationDocumentContext
constructor
Initialize the AuthorizationDocumentContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ AuthorizationDocumentContext
Initialize the AuthorizationDocumentContext
188 189 190 191 192 193 194 195 196 197 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 188 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/HostedNumber/AuthorizationDocuments/#{@solution[:sid]}" # Dependents @dependent_hosted_number_orders = nil end |
Instance Method Details
#delete ⇒ Boolean
Delete the AuthorizationDocumentInstance
201 202 203 204 205 206 207 208 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 201 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#dependent_hosted_number_orders ⇒ DependentHostedNumberOrderList, DependentHostedNumberOrderContext
Access the dependent_hosted_number_orders
233 234 235 236 237 238 239 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 233 def dependent_hosted_number_orders unless @dependent_hosted_number_orders @dependent_hosted_number_orders = DependentHostedNumberOrderList.new( @version, signing_document_sid: @solution[:sid], ) end @dependent_hosted_number_orders end |
#fetch ⇒ AuthorizationDocumentInstance
Fetch the AuthorizationDocumentInstance
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 213 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) AuthorizationDocumentInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
250 251 252 253 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 250 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.AuthorizationDocumentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
243 244 245 246 |
# File 'lib/twilio-ruby/rest/numbers/v2/authorization_document.rb', line 243 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.AuthorizationDocumentContext #{context}>" end |