Class: Twilio::REST::Iam::V1::OAuthAppList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Iam::V1::OAuthAppList
- Defined in:
- lib/twilio-ruby/rest/iam/v1/o_auth_app.rb
Defined Under Namespace
Classes: IamV1AccountVendorOauthAppCreateRequest, IamV1AccountVendorOauthAppUpdateRequest, IamV1OrganizationVendorOauthAppUpdateRequestPolicy
Instance Method Summary collapse
-
#create(iam_v1_account_vendor_oauth_app_create_request: nil) ⇒ OAuthAppInstance
Create the OAuthAppInstance.
-
#create_with_metadata(iam_v1_account_vendor_oauth_app_create_request: nil) ⇒ OAuthAppInstance
Create the OAuthAppInstanceMetadata.
-
#initialize(version) ⇒ OAuthAppList
constructor
Initialize the OAuthAppList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ OAuthAppList
Initialize the OAuthAppList
172 173 174 175 176 177 178 179 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 172 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/Account/OAuthApps" end |
Instance Method Details
#create(iam_v1_account_vendor_oauth_app_create_request: nil) ⇒ OAuthAppInstance
Create the OAuthAppInstance
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 184 def create(iam_v1_account_vendor_oauth_app_create_request: nil ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' payload = @version.create('POST', @uri, headers: headers, data: iam_v1_account_vendor_oauth_app_create_request.to_json) OAuthAppInstance.new( @version, payload, ) end |
#create_with_metadata(iam_v1_account_vendor_oauth_app_create_request: nil) ⇒ OAuthAppInstance
Create the OAuthAppInstanceMetadata
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 204 def (iam_v1_account_vendor_oauth_app_create_request: nil ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' response = @version.('POST', @uri, headers: headers, data: iam_v1_account_vendor_oauth_app_create_request.to_json) o_auth_app_instance = OAuthAppInstance.new( @version, response.body, ) OAuthAppInstanceMetadata.new( @version, o_auth_app_instance, response.headers, response.status_code ) end |
#to_s ⇒ Object
Provide a user friendly representation
230 231 232 |
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 230 def to_s '#<Twilio.Iam.V1.OAuthAppList>' end |