podemos-info/census

View on GitHub
app/queries/payment_methods_orders.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class PaymentMethodsOrders < Rectify::Query
  def self.for(payment_methods:)
    new(payment_methods: payment_methods).query
  end

  def initialize(payment_methods:)
    @payment_methods = payment_methods
  end

  def query
    Order.where(payment_method: @payment_methods)
  end
end