Sha256: 24e3dc5b3c0a9ede0b996408373298f50dc62424a7ef8b9afecf3b0dd7369692

Contents?: true

Size: 612 Bytes

Versions: 3

Compression:

Stored size: 612 Bytes

Contents

class Ey::Core::Client::Blueprint < Ey::Core::Model
  extend Ey::Core::Associations

  identity :id

  attribute :data, type: :hash
  attribute :name
  attribute :created_at, type: :time
  attribute :updated_at, type: :time

  has_one :account
  has_one :environment

  def save!
    requires :id

    params = {
      "id"        => self.id,
      "blueprint" => {
        "name" => self.name
      }
    }

    merge_attributes(self.connection.update_blueprint(params).body["blueprint"])
  end

  def destroy
    self.connection.destroy_blueprint("id" => self.identity)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ey-core-3.6.6 lib/ey-core/models/blueprint.rb
ey-core-3.4.5 lib/ey-core/models/blueprint.rb
ey-core-3.6.5 lib/ey-core/models/blueprint.rb