Class: PaypalServerSdk::PaymentSourceResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::PaymentSourceResponse
- Defined in:
- lib/paypal_server_sdk/models/payment_source_response.rb
Overview
The payment source used to fund the payment.
Instance Attribute Summary collapse
-
#apple_pay ⇒ ApplePayPaymentObject
Information needed to pay using ApplePay.
-
#bancontact ⇒ BancontactPaymentObject
Information used to pay Bancontact.
-
#blik ⇒ BLIKPaymentObject
Information used to pay using BLIK.
-
#card ⇒ CardResponse
The payment card to use to fund a payment.
-
#eps ⇒ EPSPaymentObject
Information used to pay using eps.
-
#giropay ⇒ GiropayPaymentObject
Information needed to pay using giropay.
-
#google_pay ⇒ GooglePayWalletResponse
Google Pay Wallet payment data.
-
#ideal ⇒ IDEALPaymentObject
Information used to pay using iDEAL.
-
#mybank ⇒ MyBankPaymentObject
Information used to pay using MyBank.
-
#p24 ⇒ P24PaymentObject
Information used to pay using P24(Przelewy24).
-
#paypal ⇒ PayPalWalletResponse
The PayPal Wallet response.
-
#sofort ⇒ SofortPaymentObject
Information used to pay using Sofort.
-
#trustly ⇒ TrustlyPaymentObject
Information needed to pay using Trustly.
-
#venmo ⇒ VenmoWalletResponse
Venmo wallet response.
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(card: SKIP, paypal: SKIP, bancontact: SKIP, blik: SKIP, eps: SKIP, giropay: SKIP, ideal: SKIP, mybank: SKIP, p24: SKIP, sofort: SKIP, trustly: SKIP, apple_pay: SKIP, google_pay: SKIP, venmo: SKIP) ⇒ PaymentSourceResponse
constructor
A new instance of PaymentSourceResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(card: SKIP, paypal: SKIP, bancontact: SKIP, blik: SKIP, eps: SKIP, giropay: SKIP, ideal: SKIP, mybank: SKIP, p24: SKIP, sofort: SKIP, trustly: SKIP, apple_pay: SKIP, google_pay: SKIP, venmo: SKIP) ⇒ PaymentSourceResponse
Returns a new instance of PaymentSourceResponse.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 114 def initialize(card: SKIP, paypal: SKIP, bancontact: SKIP, blik: SKIP, eps: SKIP, giropay: SKIP, ideal: SKIP, mybank: SKIP, p24: SKIP, sofort: SKIP, trustly: SKIP, apple_pay: SKIP, google_pay: SKIP, venmo: SKIP) @card = card unless card == SKIP @paypal = paypal unless paypal == SKIP @bancontact = bancontact unless bancontact == SKIP @blik = blik unless blik == SKIP @eps = eps unless eps == SKIP @giropay = giropay unless giropay == SKIP @ideal = ideal unless ideal == SKIP @mybank = mybank unless mybank == SKIP @p24 = p24 unless p24 == SKIP @sofort = sofort unless sofort == SKIP @trustly = trustly unless trustly == SKIP @apple_pay = apple_pay unless apple_pay == SKIP @google_pay = google_pay unless google_pay == SKIP @venmo = venmo unless venmo == SKIP end |
Instance Attribute Details
#apple_pay ⇒ ApplePayPaymentObject
Information needed to pay using ApplePay.
59 60 61 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 59 def apple_pay @apple_pay end |
#bancontact ⇒ BancontactPaymentObject
Information used to pay Bancontact.
23 24 25 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 23 def bancontact @bancontact end |
#blik ⇒ BLIKPaymentObject
Information used to pay using BLIK.
27 28 29 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 27 def blik @blik end |
#card ⇒ CardResponse
The payment card to use to fund a payment. Card can be a credit or debit card.
15 16 17 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 15 def card @card end |
#eps ⇒ EPSPaymentObject
Information used to pay using eps.
31 32 33 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 31 def eps @eps end |
#giropay ⇒ GiropayPaymentObject
Information needed to pay using giropay.
35 36 37 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 35 def giropay @giropay end |
#google_pay ⇒ GooglePayWalletResponse
Google Pay Wallet payment data.
63 64 65 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 63 def google_pay @google_pay end |
#ideal ⇒ IDEALPaymentObject
Information used to pay using iDEAL.
39 40 41 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 39 def ideal @ideal end |
#mybank ⇒ MyBankPaymentObject
Information used to pay using MyBank.
43 44 45 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 43 def mybank @mybank end |
#p24 ⇒ P24PaymentObject
Information used to pay using P24(Przelewy24).
47 48 49 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 47 def p24 @p24 end |
#paypal ⇒ PayPalWalletResponse
The PayPal Wallet response.
19 20 21 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 19 def paypal @paypal end |
#sofort ⇒ SofortPaymentObject
Information used to pay using Sofort.
51 52 53 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 51 def sofort @sofort end |
#trustly ⇒ TrustlyPaymentObject
Information needed to pay using Trustly.
55 56 57 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 55 def trustly @trustly end |
#venmo ⇒ VenmoWalletResponse
Venmo wallet response.
67 68 69 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 67 def venmo @venmo end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 135 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. card = CardResponse.from_hash(hash['card']) if hash['card'] paypal = PayPalWalletResponse.from_hash(hash['paypal']) if hash['paypal'] bancontact = BancontactPaymentObject.from_hash(hash['bancontact']) if hash['bancontact'] blik = BLIKPaymentObject.from_hash(hash['blik']) if hash['blik'] eps = EPSPaymentObject.from_hash(hash['eps']) if hash['eps'] giropay = GiropayPaymentObject.from_hash(hash['giropay']) if hash['giropay'] ideal = IDEALPaymentObject.from_hash(hash['ideal']) if hash['ideal'] mybank = MyBankPaymentObject.from_hash(hash['mybank']) if hash['mybank'] p24 = P24PaymentObject.from_hash(hash['p24']) if hash['p24'] sofort = SofortPaymentObject.from_hash(hash['sofort']) if hash['sofort'] trustly = TrustlyPaymentObject.from_hash(hash['trustly']) if hash['trustly'] apple_pay = ApplePayPaymentObject.from_hash(hash['apple_pay']) if hash['apple_pay'] google_pay = GooglePayWalletResponse.from_hash(hash['google_pay']) if hash['google_pay'] venmo = VenmoWalletResponse.from_hash(hash['venmo']) if hash['venmo'] # Create object from extracted values. PaymentSourceResponse.new(card: card, paypal: paypal, bancontact: bancontact, blik: blik, eps: eps, giropay: giropay, ideal: ideal, mybank: mybank, p24: p24, sofort: sofort, trustly: trustly, apple_pay: apple_pay, google_pay: google_pay, venmo: venmo) end |
.names ⇒ Object
A mapping from model property names to API property names.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 70 def self.names @_hash = {} if @_hash.nil? @_hash['card'] = 'card' @_hash['paypal'] = 'paypal' @_hash['bancontact'] = 'bancontact' @_hash['blik'] = 'blik' @_hash['eps'] = 'eps' @_hash['giropay'] = 'giropay' @_hash['ideal'] = 'ideal' @_hash['mybank'] = 'mybank' @_hash['p24'] = 'p24' @_hash['sofort'] = 'sofort' @_hash['trustly'] = 'trustly' @_hash['apple_pay'] = 'apple_pay' @_hash['google_pay'] = 'google_pay' @_hash['venmo'] = 'venmo' @_hash end |
.nullables ⇒ Object
An array for nullable fields
110 111 112 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 110 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/paypal_server_sdk/models/payment_source_response.rb', line 90 def self.optionals %w[ card paypal bancontact blik eps giropay ideal mybank p24 sofort trustly apple_pay google_pay venmo ] end |