Sha256: 318d51577e4e2704c484c0571f01ccb497345b8cf7102bf79006b6ea958a8f9e

Contents?: true

Size: 394 Bytes

Versions: 173

Compression:

Stored size: 394 Bytes

Contents

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

    def perform
      return unless @params[:data][:attributes][:ids]

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

Version data entries

173 entries across 173 versions & 1 rubygems

Version Path
forest_liana-2.10.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.9.2 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.9.1 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.9.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.8.6 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.8.5 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.8.4 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.8.3 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.8.2 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.8.1 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.8.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.7.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.6.1 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.6.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.5.5 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.5.4 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.5.3 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.5.2 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.5.1 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-2.5.0 app/services/forest_liana/stripe_payment_refunder.rb