Sha256: 1deab3bd0a00f6195b9a5500cfae4a4ee7e2106a36cdc4667c28a4d417eb76fa
Contents?: true
Size: 1.03 KB
Versions: 6
Compression:
Stored size: 1.03 KB
Contents
require "fog/brightbox/model" module Fog module Compute class Brightbox class ApiClient < Fog::Brightbox::Model identity :id attribute :name attribute :description attribute :secret attribute :revoked_at, :type => :time attribute :permissions_group attribute :account_id def save raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted? options = { :name => name, :description => description, :permissions_group => permissions_group }.delete_if { |k, v| v.nil? || v == "" } data = service.create_api_client(options) merge_attributes(data) true end def destroy requires :identity service.destroy_api_client(identity) true end def reset_secret requires :identity service.reset_secret_api_client(identity) true end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems