Sha256: 2b1855e55700eafbdeae6a0f3202b17c43ecc126c7332c738da6f1626293e88c

Contents?: true

Size: 396 Bytes

Versions: 268

Compression:

Stored size: 396 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

268 entries across 268 versions & 1 rubygems

Version Path
forest_liana-9.11.1 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.11.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.10.6 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.10.5 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.10.4 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.10.3 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.10.2 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.10.1 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.10.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.9.1 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.9.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.8.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.7.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.6.4 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.6.3 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.6.0 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.5.7 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.5.6 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.5.5 app/services/forest_liana/stripe_payment_refunder.rb
forest_liana-9.5.4 app/services/forest_liana/stripe_payment_refunder.rb