Sha256: 3b2130e61b134c9b0ba228cc022798df3f93a427482e1e7bd665656b80b8400e
Contents?: true
Size: 1.45 KB
Versions: 4
Compression:
Stored size: 1.45 KB
Contents
# frozen_string_literal: true # Code generated for API Clients. DO NOT EDIT. require 'uri' module NgrokAPI module Models class APIKey attr_reader :client, :attrs, :id, :uri, :description, :metadata, :created_at, :token, :owner_id def initialize(client: nil, attrs: {}) @client = client @attrs = attrs @id = @attrs['id'] unless @attrs['uri'].nil? @uri = URI(@attrs['uri']) end @description = @attrs['description'] @metadata = @attrs['metadata'] @created_at = @attrs['created_at'] @token = @attrs['token'] @owner_id = @attrs['owner_id'] end def ==(other) @attrs == other.attrs end def to_s @attrs.to_s end def to_h @attrs.to_h end ## # Delete an API key by ID # # https://ngrok.com/docs/api#api-api-keys-delete def delete @client.delete( id: @id ) end ## # Update attributes of an API key by ID. # # https://ngrok.com/docs/api#api-api-keys-update def update( description: nil, metadata: nil ) @description = description if description @metadata = metadata if metadata @client.update( id: @id, description: description, metadata: metadata ) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems