Sha256: 644a31d07120a05d9898bc9f33eb2cbac3817dde495a47e9113217ec27df8a53

Contents?: true

Size: 859 Bytes

Versions: 56

Compression:

Stored size: 859 Bytes

Contents

require "cfoundry/v1/model"

module CFoundry::V1
  class ServiceInstance < Model
    self.base_object_name = :service

    attribute :name,       :string,   :guid => true
    attribute :created,    :integer,  :at => [:meta, :created]
    attribute :updated,    :integer,  :at => [:meta, :updated]
    attribute :tags,       [:string], :at => [:meta, :tags]
    attribute :type,       :string
    attribute :vendor,     :string
    attribute :version,    :string
    attribute :tier,       :string
    attribute :properties, :hash

    define_client_methods

    alias_method :created_unix, :created
    alias_method :updated_unix, :updated

    # Timestamp of when the service was created.
    def created
      Time.at(created_unix)
    end

    # Timestamp of when the service was last updated.
    def updated
      Time.at(updated_unix)
    end
  end
end

Version data entries

56 entries across 56 versions & 3 rubygems

Version Path
cfoundry-0.5.1.rc3 lib/cfoundry/v1/service_instance.rb
cfoundry-0.5.1.rc2 lib/cfoundry/v1/service_instance.rb
cfoundry-0.5.1.rc1 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.21 lib/cfoundry/v1/service_instance.rb
cfoundry-0.5.0 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.19 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.18 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.17 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.16 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.15 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.14 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.13 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.12 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.11 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.10 lib/cfoundry/v1/service_instance.rb
cfoundry-0.4.9 lib/cfoundry/v1/service_instance.rb