Class: PaypalServerSdk::IDEALPaymentRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::IDEALPaymentRequest
- Defined in:
- lib/paypal_server_sdk/models/ideal_payment_request.rb
Overview
Information needed to pay using iDEAL.
Instance Attribute Summary collapse
-
#bic ⇒ String
The business identification code (BIC).
-
#country_code ⇒ String
The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.<blockquote><strong>Note:</strong> The country code for Great Britain is
GB
and notUK
as used in the top-level domain names for that country. -
#experience_context ⇒ ExperienceContext
Customizes the payer experience during the approval process for the payment.
-
#name ⇒ String
The full name representation like Mr J Smith.
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(name:, country_code:, bic: SKIP, experience_context: SKIP) ⇒ IDEALPaymentRequest
constructor
A new instance of IDEALPaymentRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(name:, country_code:, bic: SKIP, experience_context: SKIP) ⇒ IDEALPaymentRequest
Returns a new instance of IDEALPaymentRequest.
58 59 60 61 62 63 |
# File 'lib/paypal_server_sdk/models/ideal_payment_request.rb', line 58 def initialize(name:, country_code:, bic: SKIP, experience_context: SKIP) @name = name @country_code = country_code @bic = bic unless bic == SKIP @experience_context = experience_context unless experience_context == SKIP end |
Instance Attribute Details
#bic ⇒ String
The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
28 29 30 |
# File 'lib/paypal_server_sdk/models/ideal_payment_request.rb', line 28 def bic @bic end |
#country_code ⇒ String
The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.<blockquote><strong>Note:</strong> The country code for Great Britain is GB
and not UK
as used in the top-level domain names for that country. Use the ‘C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.</blockquote>
23 24 25 |
# File 'lib/paypal_server_sdk/models/ideal_payment_request.rb', line 23 def country_code @country_code end |
#experience_context ⇒ ExperienceContext
Customizes the payer experience during the approval process for the payment.
33 34 35 |
# File 'lib/paypal_server_sdk/models/ideal_payment_request.rb', line 33 def experience_context @experience_context end |
#name ⇒ String
The full name representation like Mr J Smith.
14 15 16 |
# File 'lib/paypal_server_sdk/models/ideal_payment_request.rb', line 14 def name @name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/paypal_server_sdk/models/ideal_payment_request.rb', line 66 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : nil country_code = hash.key?('country_code') ? hash['country_code'] : nil bic = hash.key?('bic') ? hash['bic'] : SKIP experience_context = ExperienceContext.from_hash(hash['experience_context']) if hash['experience_context'] # Create object from extracted values. IDEALPaymentRequest.new(name: name, country_code: country_code, bic: bic, experience_context: experience_context) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 43 |
# File 'lib/paypal_server_sdk/models/ideal_payment_request.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['country_code'] = 'country_code' @_hash['bic'] = 'bic' @_hash['experience_context'] = 'experience_context' @_hash end |
.nullables ⇒ Object
An array for nullable fields
54 55 56 |
# File 'lib/paypal_server_sdk/models/ideal_payment_request.rb', line 54 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
46 47 48 49 50 51 |
# File 'lib/paypal_server_sdk/models/ideal_payment_request.rb', line 46 def self.optionals %w[ bic experience_context ] end |