ministryofjustice/Claim-for-Crown-Court-Defence

View on GitHub
app/services/claims/fee_calculator/null_price.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module Claims
  module FeeCalculator
    class NullPrice
      def initialize(*args); end

      # Returns Json response indicating an error has occurred.
      def call
        Response.new(success?: false,
                     data: nil,
                     errors: ['Incorrect Price Type'],
                     message: I18n.t('fee_calculator.calculate.amount_unavailable'))
      end
    end
  end
end