Class: PaypalServerSdk::TrustlyPaymentObject
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::TrustlyPaymentObject
- Defined in:
- lib/paypal_server_sdk/models/trustly_payment_object.rb
Overview
Information needed to pay using Trustly.
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. -
#iban_last_chars ⇒ String
The last characters of the IBAN used to pay.
-
#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: SKIP, country_code: SKIP, bic: SKIP, iban_last_chars: SKIP) ⇒ TrustlyPaymentObject
constructor
A new instance of TrustlyPaymentObject.
Methods inherited from BaseModel
Constructor Details
#initialize(name: SKIP, country_code: SKIP, bic: SKIP, iban_last_chars: SKIP) ⇒ TrustlyPaymentObject
Returns a new instance of TrustlyPaymentObject.
59 60 61 62 63 64 65 |
# File 'lib/paypal_server_sdk/models/trustly_payment_object.rb', line 59 def initialize(name: SKIP, country_code: SKIP, bic: SKIP, iban_last_chars: SKIP) @name = name unless name == SKIP @country_code = country_code unless country_code == SKIP @bic = bic unless bic == SKIP @iban_last_chars = iban_last_chars unless iban_last_chars == 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/trustly_payment_object.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/trustly_payment_object.rb', line 23 def country_code @country_code end |
#iban_last_chars ⇒ String
The last characters of the IBAN used to pay.
32 33 34 |
# File 'lib/paypal_server_sdk/models/trustly_payment_object.rb', line 32 def iban_last_chars @iban_last_chars end |
#name ⇒ String
The full name representation like Mr J Smith.
14 15 16 |
# File 'lib/paypal_server_sdk/models/trustly_payment_object.rb', line 14 def name @name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/paypal_server_sdk/models/trustly_payment_object.rb', line 68 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP country_code = hash.key?('country_code') ? hash['country_code'] : SKIP bic = hash.key?('bic') ? hash['bic'] : SKIP iban_last_chars = hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP # Create object from extracted values. TrustlyPaymentObject.new(name: name, country_code: country_code, bic: bic, iban_last_chars: iban_last_chars) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 42 |
# File 'lib/paypal_server_sdk/models/trustly_payment_object.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['country_code'] = 'country_code' @_hash['bic'] = 'bic' @_hash['iban_last_chars'] = 'iban_last_chars' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/paypal_server_sdk/models/trustly_payment_object.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 48 49 50 51 52 |
# File 'lib/paypal_server_sdk/models/trustly_payment_object.rb', line 45 def self.optionals %w[ name country_code bic iban_last_chars ] end |