Sha256: 2843f969f3febf6be8ed9095730cbe984d87d37dc6ec17da984e26f859f3725a

Contents?: true

Size: 370 Bytes

Versions: 8

Compression:

Stored size: 370 Bytes

Contents

module CorePro
  class CoreProApiException < StandardError
    def initialize(errors)
      @errors = errors
    end

    attr_accessor :errors

    def firstMessage
      @errors[0].message
    end

    def firstCode
      @errors[0].code
    end

    def to_s
      msg = ''
      @errors.each do |e|
        msg += e.to_s + ' '
      end
      msg

    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
corepro_fvr-1.0.9 lib/corepro/core_pro_api_exception.rb
corepro_eg-1.0.8 lib/corepro/core_pro_api_exception.rb
corepro_eg-1.0.7 lib/corepro/core_pro_api_exception.rb
corepro_eg-1.0.6 lib/corepro/core_pro_api_exception.rb
corepro_eg-1.0.5 lib/corepro/core_pro_api_exception.rb
corepro_eg-1.0.4 lib/corepro/core_pro_api_exception.rb
corepro_eg-1.0.3 lib/corepro/core_pro_api_exception.rb
corepro_eg-1.0.2 lib/corepro/core_pro_api_exception.rb