class NgrokAPI::Models::HTTPResponseBackend
Attributes
attrs[R]
body[R]
client[R]
created_at[R]
description[R]
headers[R]
id[R]
metadata[R]
status_code[R]
uri[R]
Public Class Methods
new(client: nil, attrs: {})
click to toggle source
# File lib/ngrokapi/models/http_response_backend.rb, line 17 def initialize(client: nil, attrs: {}) @client = client @attrs = attrs @id = @attrs['id'] @uri = @attrs['uri'] @created_at = @attrs['created_at'] @description = @attrs['description'] @metadata = @attrs['metadata'] @body = @attrs['body'] @headers = @attrs['headers'] @status_code = @attrs['status_code'] end
Public Instance Methods
==(other)
click to toggle source
# File lib/ngrokapi/models/http_response_backend.rb, line 30 def ==(other) @attrs == other.attrs end
delete()
click to toggle source
ngrok.com/docs/api#api-http-response-backends-delete
# File lib/ngrokapi/models/http_response_backend.rb, line 44 def delete @client.delete( id: @id ) end
to_h()
click to toggle source
# File lib/ngrokapi/models/http_response_backend.rb, line 38 def to_h @attrs.to_h end
to_s()
click to toggle source
# File lib/ngrokapi/models/http_response_backend.rb, line 34 def to_s @attrs.to_s end
update( description: nil, metadata: nil, body: nil, headers: nil, status_code: nil )
click to toggle source
ngrok.com/docs/api#api-http-response-backends-update
# File lib/ngrokapi/models/http_response_backend.rb, line 52 def update( description: nil, metadata: nil, body: nil, headers: nil, status_code: nil ) @description = description if description @metadata = metadata if metadata @body = body if body @headers = headers if headers @status_code = status_code if status_code @client.update( id: @id, description: description, metadata: metadata, body: body, headers: headers, status_code: status_code ) end