Class: PaypalServerSdk::CardSupplementaryData
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::CardSupplementaryData
- Defined in:
- lib/paypal_server_sdk/models/card_supplementary_data.rb
Overview
Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see <a href=“developer.paypal.com/docs/checkout/advanced/processing/”>check out</a> or <a href=“developer.paypal.com/docs/multiparty/checkout/advanced/process ing/”>multiparty checkout</a>.
Instance Attribute Summary collapse
-
#level_2 ⇒ Level2CardProcessingData
The level 2 card processing data collections.
-
#level_3 ⇒ Level3CardProcessingData
The level 3 card processing data collections, If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(level_2: SKIP, level_3: SKIP) ⇒ CardSupplementaryData
constructor
A new instance of CardSupplementaryData.
Methods inherited from BaseModel
Constructor Details
#initialize(level_2: SKIP, level_3: SKIP) ⇒ CardSupplementaryData
Returns a new instance of CardSupplementaryData.
53 54 55 56 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 53 def initialize(level_2: SKIP, level_3: SKIP) @level_2 = level_2 unless level_2 == SKIP @level_3 = level_3 unless level_3 == SKIP end |
Instance Attribute Details
#level_2 ⇒ Level2CardProcessingData
The level 2 card processing data collections. If your merchant account has been configured for Level 2 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 2 data for your business.
23 24 25 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 23 def level_2 @level_2 end |
#level_3 ⇒ Level3CardProcessingData
The level 3 card processing data collections, If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 3 data for your business.
30 31 32 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 30 def level_3 @level_3 end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. level_2 = Level2CardProcessingData.from_hash(hash['level_2']) if hash['level_2'] level_3 = Level3CardProcessingData.from_hash(hash['level_3']) if hash['level_3'] # Create object from extracted values. CardSupplementaryData.new(level_2: level_2, level_3: level_3) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['level_2'] = 'level_2' @_hash['level_3'] = 'level_3' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
41 42 43 44 45 46 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 41 def self.optionals %w[ level_2 level_3 ] end |