Sha256: 944beca23e3f9d5e660a3f410c9213e33acc0c3812b5336aff493a3491ad9262
Contents?: true
Size: 1.52 KB
Versions: 4
Compression:
Stored size: 1.52 KB
Contents
# frozen_string_literal: true # Code generated for API Clients. DO NOT EDIT. require 'uri' module NgrokAPI module Models class FailoverBackend attr_reader :client, :attrs, :id, :uri, :created_at, :description, :metadata, :backends 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'] @backends = @attrs['backends'] end def ==(other) @attrs == other.attrs end def to_s @attrs.to_s end def to_h @attrs.to_h end ## # Delete a Failover backend by ID. # # https://ngrok.com/docs/api#api-failover-backends-delete def delete @client.delete( id: @id ) end ## # Update Failover backend by ID # # https://ngrok.com/docs/api#api-failover-backends-update def update( description: nil, metadata: nil, backends: [] ) @description = description if description @metadata = metadata if metadata @backends = backends if backends @client.update( id: @id, description: description, metadata: metadata, backends: backends ) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems