Exception: Bambora::BatchUpload::BatchUploadError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/bambora/batch_upload/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ BatchUploadError

Returns a new instance of BatchUploadError.



4
5
6
7
8
9
# File 'lib/bambora/batch_upload/exceptions.rb', line 4

def initialize args
  @code      = args[:code]
  @category  = args[:category] 
  @message   = args[:message]
  @http_code = args[:http_code]
end

Instance Attribute Details

#categoryObject (readonly)

Returns the value of attribute category.



3
4
5
# File 'lib/bambora/batch_upload/exceptions.rb', line 3

def category
  @category
end

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/bambora/batch_upload/exceptions.rb', line 3

def code
  @code
end

#http_codeObject (readonly)

Returns the value of attribute http_code.



3
4
5
# File 'lib/bambora/batch_upload/exceptions.rb', line 3

def http_code
  @http_code
end

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/bambora/batch_upload/exceptions.rb', line 3

def message
  @message
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/bambora/batch_upload/exceptions.rb', line 10

def to_s
  "Code: #{code}, Error Category: #{category}, Message: #{message}, HTTP response: #{http_code}"
end