Sha256: 610df2272e1fd382cd769c6962903ed4a51b9c3c0db813d077e8e67ad5bdc8dc

Contents?: true

Size: 380 Bytes

Versions: 20

Compression:

Stored size: 380 Bytes

Contents

module ForestLiana
  class StripePaymentRefunder
    def initialize(params)
      @params = params
      Stripe.api_key = params[:parameters][:stripeSecretKey]
    end

    def perform
      return unless @params[:jsonapis]

      @params[:jsonapis].each do |jsonapi|
        ch = Stripe::Charge.retrieve(jsonapi[:data][:id])
        ch.refunds.create
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
forest_liana-1.1.17 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.16 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.15 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.14 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.13 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.12 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.11 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.10 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.8 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.7 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.6 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.5 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.4 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.3 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.2 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.1 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.1.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.0.11 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.0.10 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-1.0.8 app/services/forest_liana/stripe_payment_refunder.rb