Class: PaysecureApiDocumentationLive::BeneficiaryDetail4

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb

Overview

BeneficiaryDetail4 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(bank_name:, bank_account_name:, bank_account_currency:, bank_account_number:, bank_country_code:, swift_code:, routing_param:, additional_properties: nil) ⇒ BeneficiaryDetail4

Returns a new instance of BeneficiaryDetail4.



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 63

def initialize(bank_name:, bank_account_name:, bank_account_currency:,
               bank_account_number:, bank_country_code:, swift_code:,
               routing_param:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @bank_name = bank_name
  @bank_account_name = 
  @bank_account_currency = 
  @bank_account_number = 
  @bank_country_code = bank_country_code
  @swift_code = swift_code
  @routing_param = routing_param
  @additional_properties = additional_properties
end

Instance Attribute Details

#bank_account_currencyString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 22

def 
  @bank_account_currency
end

#bank_account_nameString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 18

def 
  @bank_account_name
end

#bank_account_numberString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 26

def 
  @bank_account_number
end

#bank_country_codeString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 30

def bank_country_code
  @bank_country_code
end

#bank_nameString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 14

def bank_name
  @bank_name
end

#routing_paramRoutingParam

TODO: Write general description for this method

Returns:



38
39
40
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 38

def routing_param
  @routing_param
end

#swift_codeString

TODO: Write general description for this method

Returns:

  • (String)


34
35
36
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 34

def swift_code
  @swift_code
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 80

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  bank_name = hash.key?('bankName') ? hash['bankName'] : nil
   =
    hash.key?('bankAccountName') ? hash['bankAccountName'] : nil
   =
    hash.key?('bankAccountCurrency') ? hash['bankAccountCurrency'] : nil
   =
    hash.key?('bankAccountNumber') ? hash['bankAccountNumber'] : nil
  bank_country_code =
    hash.key?('bankCountryCode') ? hash['bankCountryCode'] : nil
  swift_code = hash.key?('swiftCode') ? hash['swiftCode'] : nil
  routing_param = RoutingParam.from_hash(hash['routing_param']) if hash['routing_param']

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  BeneficiaryDetail4.new(bank_name: bank_name,
                         bank_account_name: ,
                         bank_account_currency: ,
                         bank_account_number: ,
                         bank_country_code: bank_country_code,
                         swift_code: swift_code,
                         routing_param: routing_param,
                         additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 41

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['bank_name'] = 'bankName'
  @_hash['bank_account_name'] = 'bankAccountName'
  @_hash['bank_account_currency'] = 'bankAccountCurrency'
  @_hash['bank_account_number'] = 'bankAccountNumber'
  @_hash['bank_country_code'] = 'bankCountryCode'
  @_hash['swift_code'] = 'swiftCode'
  @_hash['routing_param'] = 'routing_param'
  @_hash
end

.nullablesObject

An array for nullable fields



59
60
61
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 59

def self.nullables
  []
end

.optionalsObject

An array for optional fields



54
55
56
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 54

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



125
126
127
128
129
130
131
132
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 125

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} bank_name: #{@bank_name.inspect}, bank_account_name:"\
  " #{@bank_account_name.inspect}, bank_account_currency: #{@bank_account_currency.inspect},"\
  " bank_account_number: #{@bank_account_number.inspect}, bank_country_code:"\
  " #{@bank_country_code.inspect}, swift_code: #{@swift_code.inspect}, routing_param:"\
  " #{@routing_param.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



115
116
117
118
119
120
121
122
# File 'lib/paysecure_api_documentation_live/models/beneficiary_detail4.rb', line 115

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} bank_name: #{@bank_name}, bank_account_name: #{@bank_account_name},"\
  " bank_account_currency: #{@bank_account_currency}, bank_account_number:"\
  " #{@bank_account_number}, bank_country_code: #{@bank_country_code}, swift_code:"\
  " #{@swift_code}, routing_param: #{@routing_param}, additional_properties:"\
  " #{@additional_properties}>"
end