Class: Worldline::Acquiring::SDK::V1::Domain::CardPaymentDataForRefund

Inherits:
Domain::DataObject
  • Object
show all
Defined in:
lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund.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



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund.rb', line 21

def brand
  @brand
end

#capture_immediatelytrue/false

Returns the current value of capture_immediately.

Returns:

  • (true/false)

    the current value of capture_immediately



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund.rb', line 21

def capture_immediately
  @capture_immediately
end

#card_dataWorldline::Acquiring::SDK::V1::Domain::PlainCardData

Returns the current value of card_data.

Returns:



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund.rb', line 21

def card_data
  @card_data
end

#card_entry_modeString

Returns the current value of card_entry_mode.

Returns:

  • (String)

    the current value of card_entry_mode



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund.rb', line 21

def card_entry_mode
  @card_entry_mode
end

#network_token_dataWorldline::Acquiring::SDK::V1::Domain::NetworkTokenData

Returns the current value of network_token_data.

Returns:



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund.rb', line 21

def network_token_data
  @network_token_data
end

#point_of_sale_dataWorldline::Acquiring::SDK::V1::Domain::PointOfSaleData

Returns the current value of point_of_sale_data.

Returns:



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund.rb', line 21

def point_of_sale_data
  @point_of_sale_data
end

#wallet_idString

Returns the current value of wallet_id.

Returns:

  • (String)

    the current value of wallet_id



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund.rb', line 21

def wallet_id
  @wallet_id
end

Instance Method Details

#from_hash(hash) ⇒ Object



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund.rb', line 50

def from_hash(hash)
  super
  if hash.has_key? 'brand'
    @brand = hash['brand']
  end
  if hash.has_key? 'captureImmediately'
    @capture_immediately = hash['captureImmediately']
  end
  if hash.has_key? 'cardData'
    raise TypeError, "value '%s' is not a Hash" % [hash['cardData']] unless hash['cardData'].is_a? Hash
    @card_data = Worldline::Acquiring::SDK::V1::Domain::PlainCardData.new_from_hash(hash['cardData'])
  end
  if hash.has_key? 'cardEntryMode'
    @card_entry_mode = hash['cardEntryMode']
  end
  if hash.has_key? 'networkTokenData'
    raise TypeError, "value '%s' is not a Hash" % [hash['networkTokenData']] unless hash['networkTokenData'].is_a? Hash
    @network_token_data = Worldline::Acquiring::SDK::V1::Domain::NetworkTokenData.new_from_hash(hash['networkTokenData'])
  end
  if hash.has_key? 'pointOfSaleData'
    raise TypeError, "value '%s' is not a Hash" % [hash['pointOfSaleData']] unless hash['pointOfSaleData'].is_a? Hash
    @point_of_sale_data = Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData.new_from_hash(hash['pointOfSaleData'])
  end
  if hash.has_key? 'walletId'
    @wallet_id = hash['walletId']
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['brand'] = @brand unless @brand.nil?
  hash['captureImmediately'] = @capture_immediately unless @capture_immediately.nil?
  hash['cardData'] = @card_data.to_h unless @card_data.nil?
  hash['cardEntryMode'] = @card_entry_mode unless @card_entry_mode.nil?
  hash['networkTokenData'] = @network_token_data.to_h unless @network_token_data.nil?
  hash['pointOfSaleData'] = @point_of_sale_data.to_h unless @point_of_sale_data.nil?
  hash['walletId'] = @wallet_id unless @wallet_id.nil?
  hash
end