Sha256: b8d760043bda38ad2da8bdd56fb22d9d0712234c927487e95735b1134ba05e82

Contents?: true

Size: 551 Bytes

Versions: 256

Compression:

Stored size: 551 Bytes

Contents

module ForestLiana
  class StripeSubscriptionGetter < StripeBaseGetter
    attr_accessor :record

    def initialize(params, secret_key, reference)
      @params = params
      Stripe.api_key = ForestLiana.integrations[:stripe][:api_key]
    end

    def perform
      query = {}
      @record = ::Stripe::Subscription.retrieve(@params[:subscription_id])

      query[field] = @record.customer
      if collection
        @record.customer = collection.find_by(query)
      else
        @record.customer = nil
      end
      @record
    end
  end
end

Version data entries

256 entries across 256 versions & 1 rubygems

Version Path
forest_liana-3.3.0 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-4.0.0.pre.beta.0 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.2.0 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.1.1 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.1.0 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.7 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.6 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.5 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.4 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.3 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.2 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.1 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.0 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.0.pre.beta.18 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.0.pre.beta.17 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.0.pre.beta.16 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.0.pre.beta.15 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.0.pre.beta.14 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-2.15.8 app/services/forest_liana/stripe_subscription_getter.rb
forest_liana-3.0.0.pre.beta.13 app/services/forest_liana/stripe_subscription_getter.rb