Class: Twilio::REST::Oauth::V1::DeviceCodeList
- Inherits:
- 
      ListResource
      
        - Object
- ListResource
- Twilio::REST::Oauth::V1::DeviceCodeList
 
- Defined in:
- lib/twilio-ruby/rest/oauth/v1/device_code.rb
Instance Method Summary collapse
- 
  
    
      #create(client_sid: nil, scopes: nil, audiences: :unset)  ⇒ DeviceCodeInstance 
    
    
  
  
  
  
  
  
  
  
  
    Create the DeviceCodeInstance. 
- 
  
    
      #initialize(version)  ⇒ DeviceCodeList 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Initialize the DeviceCodeList. 
- 
  
    
      #to_s  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Provide a user friendly representation. 
Constructor Details
#initialize(version) ⇒ DeviceCodeList
Initialize the DeviceCodeList
| 18 19 20 21 22 23 24 | # File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 18 def initialize(version) super(version) # Path Solution @solution = {} @uri = "/device/code" end | 
Instance Method Details
#create(client_sid: nil, scopes: nil, audiences: :unset) ⇒ DeviceCodeInstance
Create the DeviceCodeInstance
| 34 35 36 37 38 39 40 41 42 43 44 | # File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 34 def create(client_sid: nil, scopes: nil, audiences: :unset) data = Twilio::Values.of({ 'ClientSid' => client_sid, 'Scopes' => Twilio.serialize_list(scopes) { |e| e }, 'Audiences' => Twilio.serialize_list(audiences) { |e| e }, }) payload = @version.create('POST', @uri, data: data) DeviceCodeInstance.new(@version, payload, ) end | 
#to_s ⇒ Object
Provide a user friendly representation
| 48 49 50 | # File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 48 def to_s '#<Twilio.Oauth.V1.DeviceCodeList>' end |