Class: Worldline::Acquiring::SDK::V1::Domain::CardPaymentData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::CardPaymentData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb
Instance Attribute Summary collapse
-
#allow_partial_approval ⇒ true/false
The current value of allow_partial_approval.
-
#brand ⇒ String
The current value of brand.
-
#brand_selector ⇒ String
The current value of brand_selector.
-
#capture_immediately ⇒ true/false
The current value of capture_immediately.
-
#card_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PlainCardData
The current value of card_data.
-
#card_entry_mode ⇒ String
The current value of card_entry_mode.
-
#card_on_file_data ⇒ Worldline::Acquiring::SDK::V1::Domain::CardOnFileData
The current value of card_on_file_data.
-
#cardholder_verification_method ⇒ String
The current value of cardholder_verification_method.
-
#ecommerce_data ⇒ Worldline::Acquiring::SDK::V1::Domain::ECommerceData
The current value of ecommerce_data.
-
#network_token_data ⇒ Worldline::Acquiring::SDK::V1::Domain::NetworkTokenData
The current value of network_token_data.
-
#point_of_sale_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData
The current value of point_of_sale_data.
-
#wallet_id ⇒ String
The current value of wallet_id.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#allow_partial_approval ⇒ true/false
Returns the current value of allow_partial_approval.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def allow_partial_approval @allow_partial_approval end |
#brand ⇒ String
Returns the current value of brand.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def brand @brand end |
#brand_selector ⇒ String
Returns the current value of brand_selector.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def brand_selector @brand_selector end |
#capture_immediately ⇒ true/false
Returns the current value of capture_immediately.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def capture_immediately @capture_immediately end |
#card_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PlainCardData
Returns the current value of card_data.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def card_data @card_data end |
#card_entry_mode ⇒ String
Returns the current value of card_entry_mode.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def card_entry_mode @card_entry_mode end |
#card_on_file_data ⇒ Worldline::Acquiring::SDK::V1::Domain::CardOnFileData
Returns the current value of card_on_file_data.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def card_on_file_data @card_on_file_data end |
#cardholder_verification_method ⇒ String
Returns the current value of cardholder_verification_method.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def cardholder_verification_method @cardholder_verification_method end |
#ecommerce_data ⇒ Worldline::Acquiring::SDK::V1::Domain::ECommerceData
Returns the current value of ecommerce_data.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def ecommerce_data @ecommerce_data end |
#network_token_data ⇒ Worldline::Acquiring::SDK::V1::Domain::NetworkTokenData
Returns the current value of network_token_data.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def network_token_data @network_token_data end |
#point_of_sale_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData
Returns the current value of point_of_sale_data.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def point_of_sale_data @point_of_sale_data end |
#wallet_id ⇒ String
Returns the current value of wallet_id.
28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 28 def wallet_id @wallet_id end |
Instance Method Details
#from_hash(hash) ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 72 def from_hash(hash) super if hash.has_key? 'allowPartialApproval' @allow_partial_approval = hash['allowPartialApproval'] end if hash.has_key? 'brand' @brand = hash['brand'] end if hash.has_key? 'brandSelector' @brand_selector = hash['brandSelector'] 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? 'cardOnFileData' raise TypeError, "value '%s' is not a Hash" % [hash['cardOnFileData']] unless hash['cardOnFileData'].is_a? Hash @card_on_file_data = Worldline::Acquiring::SDK::V1::Domain::CardOnFileData.new_from_hash(hash['cardOnFileData']) end if hash.has_key? 'cardholderVerificationMethod' @cardholder_verification_method = hash['cardholderVerificationMethod'] end if hash.has_key? 'ecommerceData' raise TypeError, "value '%s' is not a Hash" % [hash['ecommerceData']] unless hash['ecommerceData'].is_a? Hash @ecommerce_data = Worldline::Acquiring::SDK::V1::Domain::ECommerceData.new_from_hash(hash['ecommerceData']) 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_h ⇒ Hash
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb', line 55 def to_h hash = super hash['allowPartialApproval'] = @allow_partial_approval unless @allow_partial_approval.nil? hash['brand'] = @brand unless @brand.nil? hash['brandSelector'] = @brand_selector unless @brand_selector.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['cardOnFileData'] = @card_on_file_data.to_h unless @card_on_file_data.nil? hash['cardholderVerificationMethod'] = @cardholder_verification_method unless @cardholder_verification_method.nil? hash['ecommerceData'] = @ecommerce_data.to_h unless @ecommerce_data.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 |