Class: Worldline::Acquiring::SDK::V1::Domain::CardPaymentDataForResource

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#brandString

Returns the current value of brand.

Returns:

  • (String)

    the current value of brand



12
13
14
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_resource.rb', line 12

def brand
  @brand
end

Instance Method Details

#from_hash(hash) ⇒ Object



23
24
25
26
27
28
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_resource.rb', line 23

def from_hash(hash)
  super
  if hash.has_key? 'brand'
    @brand = hash['brand']
  end
end

#to_hHash

Returns:

  • (Hash)


17
18
19
20
21
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_resource.rb', line 17

def to_h
  hash = super
  hash['brand'] = @brand unless @brand.nil?
  hash
end