Class: Worldline::Acquiring::SDK::V1::Domain::CardDataForDcc

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#binString

Returns the current value of bin.

Returns:

  • (String)

    the current value of bin



14
15
16
# File 'lib/worldline/acquiring/sdk/v1/domain/card_data_for_dcc.rb', line 14

def bin
  @bin
end

#brandString

Returns the current value of brand.

Returns:

  • (String)

    the current value of brand



14
15
16
# File 'lib/worldline/acquiring/sdk/v1/domain/card_data_for_dcc.rb', line 14

def brand
  @brand
end

#card_country_codeString

Returns the current value of card_country_code.

Returns:

  • (String)

    the current value of card_country_code



14
15
16
# File 'lib/worldline/acquiring/sdk/v1/domain/card_data_for_dcc.rb', line 14

def card_country_code
  @card_country_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/worldline/acquiring/sdk/v1/domain/card_data_for_dcc.rb', line 31

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

#to_hHash

Returns:

  • (Hash)


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

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