Class: PaypalServerSdk::CardAttributes
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::CardAttributes
- Defined in:
- lib/paypal_server_sdk/models/card_attributes.rb
Overview
Additional attributes associated with the use of this card.
Instance Attribute Summary collapse
-
#customer ⇒ CardCustomerInformation
The details about a customer in PayPal’s system of record.
-
#vault ⇒ VaultInstructionBase
Basic vault instruction specification that can be extended by specific payment sources that supports vaulting.
-
#verification ⇒ CardVerification
The API caller can opt in to verify the card through PayPal offered verification services (e.g. Smart Dollar Auth, 3DS).
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(customer: SKIP, vault: SKIP, verification: SKIP) ⇒ CardAttributes
constructor
A new instance of CardAttributes.
Methods inherited from BaseModel
Constructor Details
#initialize(customer: SKIP, vault: SKIP, verification: SKIP) ⇒ CardAttributes
Returns a new instance of CardAttributes.
49 50 51 52 53 |
# File 'lib/paypal_server_sdk/models/card_attributes.rb', line 49 def initialize(customer: SKIP, vault: SKIP, verification: SKIP) @customer = customer unless customer == SKIP @vault = vault unless vault == SKIP @verification = verification unless verification == SKIP end |
Instance Attribute Details
#customer ⇒ CardCustomerInformation
The details about a customer in PayPal’s system of record.
14 15 16 |
# File 'lib/paypal_server_sdk/models/card_attributes.rb', line 14 def customer @customer end |
#vault ⇒ VaultInstructionBase
Basic vault instruction specification that can be extended by specific payment sources that supports vaulting.
19 20 21 |
# File 'lib/paypal_server_sdk/models/card_attributes.rb', line 19 def vault @vault end |
#verification ⇒ CardVerification
The API caller can opt in to verify the card through PayPal offered verification services (e.g. Smart Dollar Auth, 3DS).
24 25 26 |
# File 'lib/paypal_server_sdk/models/card_attributes.rb', line 24 def verification @verification end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/paypal_server_sdk/models/card_attributes.rb', line 56 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. customer = CardCustomerInformation.from_hash(hash['customer']) if hash['customer'] vault = VaultInstructionBase.from_hash(hash['vault']) if hash['vault'] verification = CardVerification.from_hash(hash['verification']) if hash['verification'] # Create object from extracted values. CardAttributes.new(customer: customer, vault: vault, verification: verification) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 33 |
# File 'lib/paypal_server_sdk/models/card_attributes.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['customer'] = 'customer' @_hash['vault'] = 'vault' @_hash['verification'] = 'verification' @_hash end |
.nullables ⇒ Object
An array for nullable fields
45 46 47 |
# File 'lib/paypal_server_sdk/models/card_attributes.rb', line 45 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 41 42 |
# File 'lib/paypal_server_sdk/models/card_attributes.rb', line 36 def self.optionals %w[ customer vault verification ] end |