Sha256: 8480b4cc1a8d39ac66cc55e47de5feaf96f88dc498e8b9b033a88cb17cee6cce
Contents?: true
Size: 1.72 KB
Versions: 4
Compression:
Stored size: 1.72 KB
Contents
# frozen_string_literal: true # Code generated for API Clients. DO NOT EDIT. require 'uri' module NgrokAPI module Models class HTTPResponseBackend attr_reader :client, :attrs, :id, :uri, :created_at, :description, :metadata, :body, :headers, :status_code def initialize(client: nil, attrs: {}) @client = client @attrs = attrs @id = @attrs['id'] unless @attrs['uri'].nil? @uri = URI(@attrs['uri']) end @created_at = @attrs['created_at'] @description = @attrs['description'] @metadata = @attrs['metadata'] @body = @attrs['body'] @headers = @attrs['headers'] @status_code = @attrs['status_code'] end def ==(other) @attrs == other.attrs end def to_s @attrs.to_s end def to_h @attrs.to_h end ## # https://ngrok.com/docs/api#api-http-response-backends-delete def delete @client.delete( id: @id ) end ## # https://ngrok.com/docs/api#api-http-response-backends-update 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 end end end
Version data entries
4 entries across 4 versions & 1 rubygems