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



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

def bin
  @bin
end

#brandString

Returns the current value of brand.

Returns:

  • (String)

    the current value of brand



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

def brand
  @brand
end

#card_country_codeString

Returns the current value of card_country_code.

Returns:

  • (String)

    the current value of card_country_code



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

def card_country_code
  @card_country_code
end

#card_entry_modeString

Returns the current value of card_entry_mode.

Returns:

  • (String)

    the current value of card_entry_mode



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

def card_entry_mode
  @card_entry_mode
end

Instance Method Details

#from_hash(hash) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/worldline/acquiring/sdk/v1/domain/card_data_for_dcc.rb', line 35

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
  if hash.has_key? 'cardEntryMode'
    @card_entry_mode = hash['cardEntryMode']
  end
end

#to_hHash

Returns:

  • (Hash)


26
27
28
29
30
31
32
33
# File 'lib/worldline/acquiring/sdk/v1/domain/card_data_for_dcc.rb', line 26

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['cardEntryMode'] = @card_entry_mode unless @card_entry_mode.nil?
  hash
end