Sha256: 8944b1d988fb0d2dcee5b0d188360df450621feac9661f8920bce5bf38a7c328

Contents?: true

Size: 767 Bytes

Versions: 9

Compression:

Stored size: 767 Bytes

Contents

require "digicert/base"

module Digicert
  class Container < Digicert::Base
    include Digicert::Actions::All
    include Digicert::Actions::Fetch
    include Digicert::Actions::Create

    def self.create(container_id:, **attributes)
      new(attributes.merge(container_id: container_id)).create
    end

    private

    def extract_local_attribute_ids
      @container_id = attributes.delete(:container_id)
    end

    def validate(name:, template_id:, **attributes)
      required_attributes = {
        name: name, template_id: template_id
      }

      required_attributes.merge(attributes)
    end

    def resource_path
      "container"
    end

    def resource_creation_path
      [resource_path, @container_id, "children"].join("/")
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
digicert-1.0.0 lib/digicert/container.rb
digicert-0.5.0 lib/digicert/container.rb
digicert-0.4.1 lib/digicert/container.rb
digicert-0.4.0 lib/digicert/container.rb
digicert-0.3.1 lib/digicert/container.rb
digicert-0.3.0 lib/digicert/container.rb
digicert-0.2.0 lib/digicert/container.rb
digicert-0.1.2 lib/digicert/container.rb
digicert-0.1.1 lib/digicert/container.rb