Sha256: 9a1e184b31f3dbcc7b5e27ec4ed4b60ff56993d008b70ea81d0cbc16a6ef069b

Contents?: true

Size: 899 Bytes

Versions: 3

Compression:

Stored size: 899 Bytes

Contents

module PrintReleaf
  class Source < Resource
    path "/sources"

    action :find
    action :list
    action :create
    action :update
    action :delete
    action :activate
    action :deactivate

    property :id
    property :account_id
    property :type
    property :server_id
    property :external_id
    property :collection_scope
    property :created_at, transform_with: Transforms::Date
    property :status
    property :activated_at, transform_with: Transforms::Date
    property :deactivated_at, transform_with: Transforms::Date
    property :health_check
    property :health_check_checked_at, transform_with: Transforms::Date
    property :health_check_changed_at, transform_with: Transforms::Date

    def account
      @account ||= Account.find(account_id)
    end

    def server
      return nil if server_id.nil?
      @server ||= Server.find(server_id)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
printreleaf-1.0.3 lib/printreleaf/source.rb
printreleaf-1.0.2 lib/printreleaf/source.rb
printreleaf-1.0.1 lib/printreleaf/source.rb