Class: AllpayWebService::ErrorMessage
- Inherits:
-
Object
- Object
- AllpayWebService::ErrorMessage
- Defined in:
- lib/allpay/client.rb
Class Method Summary collapse
Class Method Details
.generate(args) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/allpay/client.rb', line 11 def self.generate args case args[:msg] when :missing_parameter "Missing required parameter: #{args[:field]}" when :parameter_should_be "#{args[:field]} should be #{args[:data]}" when :reach_max_length "The maximum length for #{args[:field]} is #{args[:length]}" when :wrong_data_format "The format for #{args[:field]} is wrong" when :cannot_be_empty "#{args[:field]} cannot be empty" end end |