Class: OnlinePayments::SDK::Domain::AccountOnFileAttribute

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#keyString

Returns the current value of key.

Returns:

  • (String)

    the current value of key



13
14
15
# File 'lib/onlinepayments/sdk/domain/account_on_file_attribute.rb', line 13

def key
  @key
end

#must_write_reasonObject

Deprecated.

Deprecated



13
14
15
# File 'lib/onlinepayments/sdk/domain/account_on_file_attribute.rb', line 13

def must_write_reason
  @must_write_reason
end

#statusString

Returns the current value of status.

Returns:

  • (String)

    the current value of status



13
14
15
# File 'lib/onlinepayments/sdk/domain/account_on_file_attribute.rb', line 13

def status
  @status
end

#valueString

Returns the current value of value.

Returns:

  • (String)

    the current value of value



13
14
15
# File 'lib/onlinepayments/sdk/domain/account_on_file_attribute.rb', line 13

def value
  @value
end

Instance Method Details

#from_hash(hash) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/onlinepayments/sdk/domain/account_on_file_attribute.rb', line 34

def from_hash(hash)
  super
  if hash.has_key? 'key'
    @key = hash['key']
  end
  if hash.has_key? 'mustWriteReason'
    @must_write_reason = hash['mustWriteReason']
  end
  if hash.has_key? 'status'
    @status = hash['status']
  end
  if hash.has_key? 'value'
    @value = hash['value']
  end
end

#to_hHash

Returns:

  • (Hash)


25
26
27
28
29
30
31
32
# File 'lib/onlinepayments/sdk/domain/account_on_file_attribute.rb', line 25

def to_h
  hash = super
  hash['key'] = @key unless @key.nil?
  hash['mustWriteReason'] = @must_write_reason unless @must_write_reason.nil?
  hash['status'] = @status unless @status.nil?
  hash['value'] = @value unless @value.nil?
  hash
end