Sha256: c26ef860acab719415fe264d1edb25c3873f656b1dddc466ba98b7ffc810235c

Contents?: true

Size: 643 Bytes

Versions: 3

Compression:

Stored size: 643 Bytes

Contents

module Paymill
  class Subscription < Base
    include Paymill::Operations::Delete
    include Paymill::Operations::Update

    attr_accessor :id, :offer, :livemode, :cancel_at_period_end, :canceled_at, :client,
                  :trial_start, :trial_end, :next_capture_at, :payment

    # Parses UNIX timestamps and creates Time objects
    def parse_timestamps
      super
      @next_capture_at = Time.at(next_capture_at) if next_capture_at
      @canceled_at     = Time.at(canceled_at) if canceled_at
      @trial_start     = Time.at(trial_start) if trial_start
      @trial_end       = Time.at(trial_end)   if trial_end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
paymill-0.5.1 lib/paymill/subscription.rb
paymill-0.5.0 lib/paymill/subscription.rb
paymill-0.4.0 lib/paymill/subscription.rb