Class: OnlinePayments::SDK::Domain::ProblemDetailsResponse

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/problem_details_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#detailString

Returns the current value of detail.

Returns:

  • (String)

    the current value of detail



14
15
16
# File 'lib/onlinepayments/sdk/domain/problem_details_response.rb', line 14

def detail
  @detail
end

#instanceString

Returns the current value of instance.

Returns:

  • (String)

    the current value of instance



14
15
16
# File 'lib/onlinepayments/sdk/domain/problem_details_response.rb', line 14

def instance
  @instance
end

#statusInteger

Returns the current value of status.

Returns:

  • (Integer)

    the current value of status



14
15
16
# File 'lib/onlinepayments/sdk/domain/problem_details_response.rb', line 14

def status
  @status
end

#titleString

Returns the current value of title.

Returns:

  • (String)

    the current value of title



14
15
16
# File 'lib/onlinepayments/sdk/domain/problem_details_response.rb', line 14

def title
  @title
end

#typeString

Returns the current value of type.

Returns:

  • (String)

    the current value of type



14
15
16
# File 'lib/onlinepayments/sdk/domain/problem_details_response.rb', line 14

def type
  @type
end

Instance Method Details

#from_hash(hash) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/onlinepayments/sdk/domain/problem_details_response.rb', line 37

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)


27
28
29
30
31
32
33
34
35
# File 'lib/onlinepayments/sdk/domain/problem_details_response.rb', line 27

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