Sha256: 956543b1acc4371bcb356d921932368672c7c244ba5f1106dfd59cc33260ace8
Contents?: true
Size: 549 Bytes
Versions: 47
Compression:
Stored size: 549 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
47 entries across 47 versions & 1 rubygems