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 checkout or multiparty checkout.
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.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(level_2: SKIP, level_3: SKIP) ⇒ CardSupplementaryData
Returns a new instance of CardSupplementaryData.
49 50 51 52 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 49 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.
19 20 21 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 19 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.
26 27 28 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 26 def level_3 @level_3 end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 55 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.
29 30 31 32 33 34 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 29 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
45 46 47 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 45 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
37 38 39 40 41 42 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 37 def self.optionals %w[ level_2 level_3 ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
74 75 76 77 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 74 def inspect class_name = self.class.name.split('::').last "<#{class_name} level_2: #{@level_2.inspect}, level_3: #{@level_3.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
68 69 70 71 |
# File 'lib/paypal_server_sdk/models/card_supplementary_data.rb', line 68 def to_s class_name = self.class.name.split('::').last "<#{class_name} level_2: #{@level_2}, level_3: #{@level_3}>" end |