Class: WebPay::ErrorBody

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 = {}) ⇒ ErrorBody

Returns a new instance of ErrorBody.



2338
2339
2340
2341
# File 'lib/webpay/data_types.rb', line 2338

def initialize(hash = {})
  hash = normalize_hash(hash)
  @attributes = hash
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



2331
2332
2333
# File 'lib/webpay/data_types.rb', line 2331

def attributes
  @attributes
end

Class Method Details

.fieldsObject



2333
2334
2335
# File 'lib/webpay/data_types.rb', line 2333

def self.fields
  ['message', 'type', 'caused_by', 'code', 'param', 'charge']
end

Instance Method Details

#caused_byObject



2354
2355
2356
# File 'lib/webpay/data_types.rb', line 2354

def caused_by
  attributes['caused_by']
end

#chargeObject



2366
2367
2368
# File 'lib/webpay/data_types.rb', line 2366

def charge
  attributes['charge']
end

#codeObject



2358
2359
2360
# File 'lib/webpay/data_types.rb', line 2358

def code
  attributes['code']
end

#messageObject

attributes accessors



2346
2347
2348
# File 'lib/webpay/data_types.rb', line 2346

def message
  attributes['message']
end

#paramObject



2362
2363
2364
# File 'lib/webpay/data_types.rb', line 2362

def param
  attributes['param']
end

#typeObject



2350
2351
2352
# File 'lib/webpay/data_types.rb', line 2350

def type
  attributes['type']
end