Sha256: beaf86f2dd479af3d5f111e1be431558e8b152f75ecd7d7ed3e1b199e2ce83dd

Contents?: true

Size: 467 Bytes

Versions: 11

Compression:

Stored size: 467 Bytes

Contents

module Spree
  module Api
    module V1
      class MollieController < BaseController
        def methods
          mollie = Spree::PaymentMethod.find_by_type 'Spree::Gateway::MollieGateway'
          payment_methods = mollie.available_methods(methods_params).map(&:attributes)

          render json: payment_methods
        end

        private

        def methods_params
          params.permit(amount: %i[currency value])
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
spree_mollie_gateway-4.0.1 app/controllers/spree/api/v1/mollie_controller.rb
spree_mollie_gateway-4.0.0 app/controllers/spree/api/v1/mollie_controller.rb
spree_mollie_gateway-3.2.1 app/controllers/spree/api/v1/mollie_controller.rb
spree_mollie_gateway-3.2.0 app/controllers/spree/api/v1/mollie_controller.rb
spree_mollie_gateway-3.1.0 app/controllers/spree/api/v1/mollie_controller.rb
spree_mollie_gateway-3.0.4 app/controllers/spree/api/v1/mollie_controller.rb
spree_mollie_gateway-3.0.3 app/controllers/spree/api/v1/mollie_controller.rb
spree_mollie_gateway-3.0.2 app/controllers/spree/api/v1/mollie_controller.rb
spree_mollie_gateway-3.0.1 app/controllers/spree/api/v1/mollie_controller.rb
spree_mollie_gateway-3.0.0 app/controllers/spree/api/v1/mollie_controller.rb
spree_mollie_gateway-3.0.0.pre.beta app/controllers/spree/api/v1/mollie_controller.rb