22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/mock/twilio/schemas/trust_products_v1.rb', line 22
def for(body, request)
url = request.url.split(request.host).last
case url
when %r{/v1/TrustProducts$}
RESOURCES[:trust_products].decorate(body, request)
when %r{/v1/TrustProducts/\w{34}$}
RESOURCES[:update].decorate(body, request)
when %r{/v1/TrustProducts/\w{34}/Evaluations$}
RESOURCES[:evaluations].decorate(body, request)
when %r{/v1/TrustProducts/\w{34}/EntityAssignments$}
RESOURCES[:entity_assignments].decorate(body, request)
when %r{/v1/TrustProducts/[A-Za-z0-9]+/ChannelEndpointAssignments}
if request.method.downcase == 'get'
RESOURCES[:channel_endpoint_assignments].decorate(body, request)
else
body
end
end
end
|