Method: Megam::Subscriptions#from_hash

Defined in:
lib/megam/core/subscriptions.rb

#from_hash(o) ⇒ Object



151
152
153
154
155
156
157
158
159
# File 'lib/megam/core/subscriptions.rb', line 151

def from_hash(o)
  @id        = o[:id] if o.has_key?(:id)
  @accounts_id = o[:accounts_id] if o.has_key?(:accounts_id)
  @assembly_id   = o[:assembly_id] if o.has_key?(:assembly_id)
  @start_date     = o[:start_date] if o.has_key?(:start_date)
  @end_date     = o[:end_date] if o.has_key?(:end_date)
  @created_at   = o[:created_at] if o.has_key?(:created_at)
  self
end