class Tarpon::Entity::Entitlement

Attributes

id[R]
raw[R]

Public Class Methods

new(id, attributes = {}) click to toggle source
# File lib/tarpon/entity/entitlement.rb, line 8
def initialize(id, attributes = {})
  @id  = id
  @raw = attributes
end

Public Instance Methods

active?() click to toggle source
# File lib/tarpon/entity/entitlement.rb, line 13
def active?
  expires_date > Time.now.utc
end
expires_date() click to toggle source
# File lib/tarpon/entity/entitlement.rb, line 17
def expires_date
  Time.iso8601(@raw[:expires_date])
end