Class: Twilio::REST::Trusthub::V1::ComplianceInquiriesContext

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

Instance Method Summary collapse

Constructor Details

#initialize(version, customer_id) ⇒ ComplianceInquiriesContext

Initialize the ComplianceInquiriesContext

Parameters:

  • version (Version)

    Version that contains the resource

  • customer_id (String)

    The unique CustomerId matching the Customer Profile/Compliance Inquiry that should be resumed or resubmitted. This value will have been returned by the initial Compliance Inquiry creation call.



80
81
82
83
84
85
86
87
88
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 80

def initialize(version, customer_id)
    super(version)

    # Path Solution
    @solution = { customer_id: customer_id,  }
    @uri = "/ComplianceInquiries/Customers/#{@solution[:customer_id]}/Initialize"

    
end

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



128
129
130
131
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 128

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

#to_sObject

Provide a user friendly representation



121
122
123
124
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 121

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

#update(primary_profile_sid: nil, theme_set_id: :unset) ⇒ ComplianceInquiriesInstance

Update the ComplianceInquiriesInstance

Parameters:

  • primary_profile_sid (String) (defaults to: nil)

    The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile.

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

    Theme id for styling the inquiry form.

Returns:



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb', line 94

def update(
    primary_profile_sid: nil, 
    theme_set_id: :unset
)

    data = Twilio::Values.of({
        'PrimaryProfileSid' => primary_profile_sid,
        'ThemeSetId' => theme_set_id,
    })

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.update('POST', @uri, data: data, headers: headers)
    ComplianceInquiriesInstance.new(
        @version,
        payload,
        customer_id: @solution[:customer_id],
    )
end