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
25 26 27 28 29 30 31 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 25 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
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 38 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
61 62 63 |
# File 'lib/twilio-ruby/rest/oauth/v1/device_code.rb', line 61 def to_s '#<Twilio.Oauth.V1.DeviceCodeList>' end |