Class: Twilio::REST::Iam::V1::OAuthAppList

Inherits:
ListResource show all
Defined in:
lib/twilio-ruby/rest/iam/v1/o_auth_app.rb

Defined Under Namespace

Classes: IamV1AccountVendorOauthAppCreateRequest, IamV1AccountVendorOauthAppUpdateRequest, IamV1OrganizationVendorOauthAppUpdateRequestPolicy

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ OAuthAppList

Initialize the OAuthAppList

Parameters:

  • version (Version)

    Version that contains the resource



178
179
180
181
182
183
184
185
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 178

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

Parameters:

Returns:



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 190

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: .to_json)
    OAuthAppInstance.new(
        @version,
        payload,
    )
end

#create_with_metadata(iam_v1_account_vendor_oauth_app_create_request: nil) ⇒ OAuthAppInstance

Create the OAuthAppInstanceMetadata

Parameters:

Returns:



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 210

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: .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_sObject

Provide a user friendly representation



236
237
238
# File 'lib/twilio-ruby/rest/iam/v1/o_auth_app.rb', line 236

def to_s
    '#<Twilio.Iam.V1.OAuthAppList>'
end