Sha256: 55c1fa6ff46256b9321a8555ae6f998f39052db8674c657e364cef4e0ee66076
Contents?: true
Size: 591 Bytes
Versions: 47
Compression:
Stored size: 591 Bytes
Contents
module ForestLiana class StripeSourceGetter < StripeBaseGetter attr_accessor :record def initialize(params, secret_key, reference) @params = params Stripe.api_key = ForestLiana.integrations[:stripe][:api_key] end def perform resource = collection.find(@params[:recordId]) customer = resource[field] @record = Stripe::Customer .retrieve(customer) .sources.retrieve(@params[:objectId]) query = {} query[field] = @record.customer @record.customer = collection.find_by(query) @record end end end
Version data entries
47 entries across 47 versions & 1 rubygems