Class: Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentContext
- Defined in:
- lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb,
lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb
Defined Under Namespace
Classes: DependentHostedNumberOrderInstance, DependentHostedNumberOrderList, DependentHostedNumberOrderPage
Instance Method Summary collapse
-
#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.
-
#update(hosted_number_order_sids: :unset, address_sid: :unset, email: :unset, cc_emails: :unset, status: :unset, contact_title: :unset, contact_phone_number: :unset) ⇒ AuthorizationDocumentInstance
Update the AuthorizationDocumentInstance.
Constructor Details
#initialize(version, sid) ⇒ AuthorizationDocumentContext
Initialize the AuthorizationDocumentContext
188 189 190 191 192 193 194 195 196 197 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 188 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/AuthorizationDocuments/#{@solution[:sid]}" # Dependents @dependent_hosted_number_orders = nil end |
Instance Method Details
#dependent_hosted_number_orders ⇒ DependentHostedNumberOrderList, DependentHostedNumberOrderContext
Access the dependent_hosted_number_orders
265 266 267 268 269 270 271 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 265 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
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 201 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
282 283 284 285 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 282 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.HostedNumbers.AuthorizationDocumentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
275 276 277 278 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 275 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.HostedNumbers.AuthorizationDocumentContext #{context}>" end |
#update(hosted_number_order_sids: :unset, address_sid: :unset, email: :unset, cc_emails: :unset, status: :unset, contact_title: :unset, contact_phone_number: :unset) ⇒ AuthorizationDocumentInstance
Update the AuthorizationDocumentInstance
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 227 def update( hosted_number_order_sids: :unset, address_sid: :unset, email: :unset, cc_emails: :unset, status: :unset, contact_title: :unset, contact_phone_number: :unset ) data = Twilio::Values.of({ 'HostedNumberOrderSids' => Twilio.serialize_list(hosted_number_order_sids) { |e| e }, 'AddressSid' => address_sid, 'Email' => email, 'CcEmails' => Twilio.serialize_list(cc_emails) { |e| e }, 'Status' => status, 'ContactTitle' => contact_title, 'ContactPhoneNumber' => contact_phone_number, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) AuthorizationDocumentInstance.new( @version, payload, sid: @solution[:sid], ) end |