Class: PaypalServerSdk::EpsPaymentObject
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::EpsPaymentObject
- Defined in:
- lib/paypal_server_sdk/models/eps_payment_object.rb
Overview
Information used to pay using eps.
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.
-
#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) ⇒ EpsPaymentObject
constructor
A new instance of EpsPaymentObject.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(name: SKIP, country_code: SKIP, bic: SKIP) ⇒ EpsPaymentObject
Returns a new instance of EpsPaymentObject.
52 53 54 55 56 |
# File 'lib/paypal_server_sdk/models/eps_payment_object.rb', line 52 def initialize(name: SKIP, country_code: SKIP, bic: SKIP) @name = name unless name == SKIP @country_code = country_code unless country_code == SKIP @bic = bic unless bic == 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.
27 28 29 |
# File 'lib/paypal_server_sdk/models/eps_payment_object.rb', line 27 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. Note: 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.
22 23 24 |
# File 'lib/paypal_server_sdk/models/eps_payment_object.rb', line 22 def country_code @country_code end |
#name ⇒ String
The full name representation like Mr J Smith.
14 15 16 |
# File 'lib/paypal_server_sdk/models/eps_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.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/paypal_server_sdk/models/eps_payment_object.rb', line 59 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 # Create object from extracted values. EpsPaymentObject.new(name: name, country_code: country_code, bic: bic) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 |
# File 'lib/paypal_server_sdk/models/eps_payment_object.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['country_code'] = 'country_code' @_hash['bic'] = 'bic' @_hash end |
.nullables ⇒ Object
An array for nullable fields
48 49 50 |
# File 'lib/paypal_server_sdk/models/eps_payment_object.rb', line 48 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 |
# File 'lib/paypal_server_sdk/models/eps_payment_object.rb', line 39 def self.optionals %w[ name country_code bic ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
80 81 82 83 84 |
# File 'lib/paypal_server_sdk/models/eps_payment_object.rb', line 80 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, country_code: #{@country_code.inspect}, bic:"\ " #{@bic.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
74 75 76 77 |
# File 'lib/paypal_server_sdk/models/eps_payment_object.rb', line 74 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, country_code: #{@country_code}, bic: #{@bic}>" end |