Class: WebPay::ErrorData

Inherits:
Entity
  • Object
show all
Defined in:
lib/webpay/data_types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#normalize_hash, #to_h, #to_s

Constructor Details

#initialize(hash = {}) ⇒ ErrorData

Returns a new instance of ErrorData.



2379
2380
2381
2382
2383
# File 'lib/webpay/data_types.rb', line 2379

def initialize(hash = {})
  hash = normalize_hash(hash)
  hash['error'] = WebPay::ErrorBody.new(hash['error']) if hash['error'].is_a?(Hash)
  @attributes = hash
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



2372
2373
2374
# File 'lib/webpay/data_types.rb', line 2372

def attributes
  @attributes
end

Class Method Details

.fieldsObject



2374
2375
2376
# File 'lib/webpay/data_types.rb', line 2374

def self.fields
  ['error']
end

Instance Method Details

#errorObject

attributes accessors



2388
2389
2390
# File 'lib/webpay/data_types.rb', line 2388

def error
  attributes['error']
end