Sha256: 0ed00796ec04ed3d19773891a716291e5ca49285235e7891eae7b140ac3b48e7

Contents?: true

Size: 895 Bytes

Versions: 4

Compression:

Stored size: 895 Bytes

Contents

module PrintReleaf
  class Feed < Resource
    path "/feeds"

    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

4 entries across 4 versions & 1 rubygems

Version Path
printreleaf-1.5.0 lib/printreleaf/feed.rb
printreleaf-1.3.2 lib/printreleaf/feed.rb
printreleaf-1.3.1 lib/printreleaf/feed.rb
printreleaf-1.3.0 lib/printreleaf/feed.rb