Sha256: eb8a8f5af94aeb3f3f950dc7691fc01e2d498ca1d302fb20131d3fe9db309de7

Contents?: true

Size: 825 Bytes

Versions: 1

Compression:

Stored size: 825 Bytes

Contents

require_relative 'methods'

module SlackRubyBotServer
  module Stripe
    module Models
      module Mongoid
        extend ActiveSupport::Concern
        include Methods

        included do
          field :stripe_customer_id, type: String
          field :subscribed, type: Boolean, default: false
          field :subscribed_at, type: DateTime
          field :subscription_expired_at, type: DateTime
          field :trial_informed_at, type: DateTime
          field :subscription_past_due_at, type: DateTime
          field :subscription_past_due_informed_at, type: DateTime

          scope :striped, -> { where(subscribed: true, :stripe_customer_id.ne => nil) }
          scope :trials, -> { where(subscribed: false) }
        end
      end
    end
  end
end

Team.include SlackRubyBotServer::Stripe::Models::Mongoid

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slack-ruby-bot-server-stripe-0.1.0 lib/slack-ruby-bot-server-stripe/models/mongoid.rb