Class: Twilio::REST::Messaging::V1::UsecaseList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/messaging/v1/usecase.rb

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ UsecaseList

Initialize the UsecaseList

Parameters:

  • version (Version)

    Version that contains the resource



26
27
28
29
30
31
32
# File 'lib/twilio-ruby/rest/messaging/v1/usecase.rb', line 26

def initialize(version)
    super(version)
    # Path Solution
    @solution = {  }
    @uri = "/Services/Usecases"
    
end

Instance Method Details

#fetchUsecaseInstance

Fetch the UsecaseInstance

Returns:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/twilio-ruby/rest/messaging/v1/usecase.rb', line 36

def fetch

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, headers: headers)
    UsecaseInstance.new(
        @version,
        payload,
    )
end

#to_sObject

Provide a user friendly representation



55
56
57
# File 'lib/twilio-ruby/rest/messaging/v1/usecase.rb', line 55

def to_s
    '#<Twilio.Messaging.V1.UsecaseList>'
end