Class: Twilio::REST::Messaging::V1::DomainConfigMessagingServiceContext

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

Instance Method Summary collapse

Constructor Details

#initialize(version, messaging_service_sid) ⇒ DomainConfigMessagingServiceContext

Initialize the DomainConfigMessagingServiceContext

Parameters:

  • version (Version)

    Version that contains the resource

  • messaging_service_sid (String)

    Unique string used to identify the Messaging service that this domain should be associated with.



49
50
51
52
53
54
55
56
57
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 49

def initialize(version, messaging_service_sid)
    super(version)

    # Path Solution
    @solution = { messaging_service_sid: messaging_service_sid,  }
    @uri = "/LinkShortening/MessagingService/#{@solution[:messaging_service_sid]}/DomainConfig"

    
end

Instance Method Details

#fetchDomainConfigMessagingServiceInstance

Fetch the DomainConfigMessagingServiceInstance

Returns:



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 61

def fetch

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

#inspectObject

Provide a detailed, user friendly representation



87
88
89
90
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 87

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Messaging.V1.DomainConfigMessagingServiceContext #{context}>"
end

#to_sObject

Provide a user friendly representation



80
81
82
83
# File 'lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb', line 80

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Messaging.V1.DomainConfigMessagingServiceContext #{context}>"
end