Class: PaypalServerSdk::PaypalWalletAttributesResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::PaypalWalletAttributesResponse
- Defined in:
- lib/paypal_server_sdk/models/paypal_wallet_attributes_response.rb
Overview
Additional attributes associated with the use of a PayPal Wallet.
Instance Attribute Summary collapse
-
#cobranded_cards ⇒ Array[CobrandedCard]
An array of merchant cobranded cards used by buyer to complete an order.
-
#vault ⇒ PaypalWalletVaultResponse
The details about a saved PayPal Wallet payment source.
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(vault: SKIP, cobranded_cards: SKIP) ⇒ PaypalWalletAttributesResponse
constructor
A new instance of PaypalWalletAttributesResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(vault: SKIP, cobranded_cards: SKIP) ⇒ PaypalWalletAttributesResponse
Returns a new instance of PaypalWalletAttributesResponse.
43 44 45 46 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_attributes_response.rb', line 43 def initialize(vault: SKIP, cobranded_cards: SKIP) @vault = vault unless vault == SKIP @cobranded_cards = cobranded_cards unless cobranded_cards == SKIP end |
Instance Attribute Details
#cobranded_cards ⇒ Array[CobrandedCard]
An array of merchant cobranded cards used by buyer to complete an order. This array will be present if a merchant has onboarded their cobranded card with PayPal and provided corresponding label(s).
20 21 22 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_attributes_response.rb', line 20 def cobranded_cards @cobranded_cards end |
#vault ⇒ PaypalWalletVaultResponse
The details about a saved PayPal Wallet payment source.
14 15 16 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_attributes_response.rb', line 14 def vault @vault end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_attributes_response.rb', line 49 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. vault = PaypalWalletVaultResponse.from_hash(hash['vault']) if hash['vault'] # Parameter is an array, so we need to iterate through it cobranded_cards = nil unless hash['cobranded_cards'].nil? cobranded_cards = [] hash['cobranded_cards'].each do |structure| cobranded_cards << (CobrandedCard.from_hash(structure) if structure) end end cobranded_cards = SKIP unless hash.key?('cobranded_cards') # Create object from extracted values. PaypalWalletAttributesResponse.new(vault: vault, cobranded_cards: cobranded_cards) end |
.names ⇒ Object
A mapping from model property names to API property names.
23 24 25 26 27 28 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_attributes_response.rb', line 23 def self.names @_hash = {} if @_hash.nil? @_hash['vault'] = 'vault' @_hash['cobranded_cards'] = 'cobranded_cards' @_hash end |
.nullables ⇒ Object
An array for nullable fields
39 40 41 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_attributes_response.rb', line 39 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
31 32 33 34 35 36 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_attributes_response.rb', line 31 def self.optionals %w[ vault cobranded_cards ] end |