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

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Instance Method Summary collapse

Constructor Details

#initialize(version, messaging_service_sid: nil) ⇒ UsAppToPersonUsecaseList

Initialize the UsAppToPersonUsecaseList

Parameters:

  • version (Version)

    Version that contains the resource

  • messaging_service_sid (String) (defaults to: nil)

    The unique string that we created to identify the Service resource.


23
24
25
26
27
28
29
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb', line 23

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:


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

def fetch(brand_registration_sid: :unset)
  params = Twilio::Values.of({'BrandRegistrationSid' => brand_registration_sid, })

  payload = @version.fetch('GET', @uri, params: params)

  UsAppToPersonUsecaseInstance.new(
      @version,
      payload,
      messaging_service_sid: @solution[:messaging_service_sid],
  )
end

#to_sObject

Provide a user friendly representation


50
51
52
# File 'lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb', line 50

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