Class: Twilio::REST::Messaging::V1::ServiceContext::UsAppToPersonUsecaseList

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

Instance Method Summary collapse

Constructor Details

#initialize(version, messaging_service_sid: nil) ⇒ UsAppToPersonUsecaseList

Initialize the UsAppToPersonUsecaseList

Parameters:

  • version (Version)

    Version that contains the resource



28
29
30
31
32
33
34
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb', line 28

def initialize(version, messaging_service_sid: nil)
    super(version)
    # Path Solution
    @solution = { messaging_service_sid: messaging_service_sid }
    @uri = "/Services/#{@solution[:messaging_service_sid]}/Compliance/Usa2p/Usecases"
    
end

Instance Method Details

#fetch(brand_registration_sid: :unset) ⇒ UsAppToPersonUsecaseInstance

Fetch the UsAppToPersonUsecaseInstance

Parameters:

  • brand_registration_sid (String) (defaults to: :unset)

    The unique string to identify the A2P brand.

Returns:



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb', line 39

def fetch(
    brand_registration_sid: :unset
)

    params = Twilio::Values.of({
        'BrandRegistrationSid' => brand_registration_sid,
    })
    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, params: params, headers: headers)
    UsAppToPersonUsecaseInstance.new(
        @version,
        payload,
        messaging_service_sid: @solution[:messaging_service_sid],
    )
end

#to_sObject

Provide a user friendly representation



64
65
66
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb', line 64

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