module StripeLocal class Subscription < ActiveRecord::Base include ObjectAdapter belongs_to :customer, inverse_of: :subscription belongs_to :plan, inverse_of: :subscription time_writer :start, :canceled_at, :current_period_start, :current_period_end, :trial_start, :trial_end, :ended_at class<(x){attribute_method? x} then k.to_sym else next end if v.is_a?(Numeric) && v > 1000000000 h[key] = Time.at( v ) else h[key] = v end end end end #=!=#>>> # string :customer_id # string :plan_id # string :status # datetime :start # datetime :canceled_at # datetime :ended_at # datetime :current_period_start # datetime :current_period_end # datetime :trial_start # datetime :trial_end #=ยก=#>>> end end