Class: Worldline::Acquiring::SDK::V1::Domain::ApiPaymentErrorResponse

Inherits:
Domain::DataObject
  • Object
show all
Defined in:
lib/worldline/acquiring/sdk/v1/domain/api_payment_error_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#detailString

Returns the current value of detail.

Returns:

  • (String)

    the current value of detail



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/api_payment_error_response.rb', line 16

def detail
  @detail
end

#instanceString

Returns the current value of instance.

Returns:

  • (String)

    the current value of instance



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/api_payment_error_response.rb', line 16

def instance
  @instance
end

#statusInteger

Returns the current value of status.

Returns:

  • (Integer)

    the current value of status



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/api_payment_error_response.rb', line 16

def status
  @status
end

#titleString

Returns the current value of title.

Returns:

  • (String)

    the current value of title



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/api_payment_error_response.rb', line 16

def title
  @title
end

#typeString

Returns the current value of type.

Returns:

  • (String)

    the current value of type



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/api_payment_error_response.rb', line 16

def type
  @type
end

Instance Method Details

#from_hash(hash) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/worldline/acquiring/sdk/v1/domain/api_payment_error_response.rb', line 39

def from_hash(hash)
  super
  if hash.has_key? 'detail'
    @detail = hash['detail']
  end
  if hash.has_key? 'instance'
    @instance = hash['instance']
  end
  if hash.has_key? 'status'
    @status = hash['status']
  end
  if hash.has_key? 'title'
    @title = hash['title']
  end
  if hash.has_key? 'type'
    @type = hash['type']
  end
end

#to_hHash

Returns:

  • (Hash)


29
30
31
32
33
34
35
36
37
# File 'lib/worldline/acquiring/sdk/v1/domain/api_payment_error_response.rb', line 29

def to_h
  hash = super
  hash['detail'] = @detail unless @detail.nil?
  hash['instance'] = @instance unless @instance.nil?
  hash['status'] = @status unless @status.nil?
  hash['title'] = @title unless @title.nil?
  hash['type'] = @type unless @type.nil?
  hash
end