Sha256: 5e2bef672ec1d21a96f7ea8fb09ba1a9faff80d925d7deee6d4cdd5e0084010d

Contents?: true

Size: 596 Bytes

Versions: 7

Compression:

Stored size: 596 Bytes

Contents

module AdaptivePayments
  module FaultMessage
    def self.included(base)
      base.instance_eval do
        attribute :errors, NodeList[ErrorData], :param => "error"

        alias_params :first_error, {
          :error_id         => :id,
          :error_domain     => :domain,
          :error_subdomain  => :subdomain,
          :error_severity   => :severity,
          :error_category   => :category,
          :error_message    => :message,
          :error_parameters => :parameters
        }
      end
    end

    def first_error
      errors.first || ErrorData.new
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
creative-pp-adaptive-1.1.1 lib/pp-adaptive/types/fault_message.rb
pp-adaptive-1.0.0 lib/pp-adaptive/types/fault_message.rb
pp-adaptive-0.0.6 lib/pp-adaptive/types/fault_message.rb
pp-adaptive-0.0.5 lib/pp-adaptive/types/fault_message.rb
pp-adaptive-0.0.4 lib/pp-adaptive/types/fault_message.rb
pp-adaptive-0.0.3 lib/pp-adaptive/types/fault_message.rb
pp-adaptive-0.0.2 lib/pp-adaptive/types/fault_message.rb