Class: UnivapayClientSdk::TokenResponseBankTransferData

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb

Overview

Token Response Bank Transfer Data schema.

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(brand: SKIP, expiration_period: SKIP, expiration_time_shift: SKIP, bank_code: SKIP, bank_name: SKIP, branch_code: SKIP, branch_name: SKIP, account_number: SKIP, account_holder_name: SKIP, additional_properties: nil) ⇒ TokenResponseBankTransferData

Returns a new instance of TokenResponseBankTransferData.



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 91

def initialize(brand: SKIP, expiration_period: SKIP,
               expiration_time_shift: SKIP, bank_code: SKIP,
               bank_name: SKIP, branch_code: SKIP, branch_name: SKIP,
               account_number: SKIP, account_holder_name: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @brand = brand unless brand == SKIP
  @expiration_period = expiration_period unless expiration_period == SKIP
  @expiration_time_shift = expiration_time_shift unless expiration_time_shift == SKIP
  @bank_code = bank_code unless bank_code == SKIP
  @bank_name = bank_name unless bank_name == SKIP
  @branch_code = branch_code unless branch_code == SKIP
  @branch_name = branch_name unless branch_name == SKIP
  @account_number =  unless  == SKIP
  @account_holder_name =  unless  == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#account_holder_nameString

Bank account holder name.

Returns:

  • (String)


47
48
49
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 47

def 
  @account_holder_name
end

#account_numberString

Bank account number.

Returns:

  • (String)


43
44
45
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 43

def 
  @account_number
end

#bank_codeString

Bank code value.

Returns:

  • (String)


27
28
29
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 27

def bank_code
  @bank_code
end

#bank_nameString

Bank name value.

Returns:

  • (String)


31
32
33
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 31

def bank_name
  @bank_name
end

#branch_codeString

Bank branch code.

Returns:

  • (String)


35
36
37
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 35

def branch_code
  @branch_code
end

#branch_nameString

Bank branch name.

Returns:

  • (String)


39
40
41
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 39

def branch_name
  @branch_name
end

#brandString

The bank brand identifier (e.g., 'aozora_bank').

Returns:

  • (String)


14
15
16
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 14

def brand
  @brand
end

#expiration_periodString

ISO 8601 duration format (e.g., 'PT168H').

Returns:

  • (String)


18
19
20
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 18

def expiration_period
  @expiration_period
end

#expiration_time_shiftString

Time shift applied to the expiration, typically pushing it to the end of the day in a specific timezone (e.g., '23:59:59+09:00').

Returns:

  • (String)


23
24
25
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 23

def expiration_time_shift
  @expiration_time_shift
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 112

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  brand = hash.key?('brand') ? hash['brand'] : SKIP
  expiration_period =
    hash.key?('expiration_period') ? hash['expiration_period'] : SKIP
  expiration_time_shift =
    hash.key?('expiration_time_shift') ? hash['expiration_time_shift'] : SKIP
  bank_code = hash.key?('bank_code') ? hash['bank_code'] : SKIP
  bank_name = hash.key?('bank_name') ? hash['bank_name'] : SKIP
  branch_code = hash.key?('branch_code') ? hash['branch_code'] : SKIP
  branch_name = hash.key?('branch_name') ? hash['branch_name'] : SKIP
   =
    hash.key?('account_number') ? hash['account_number'] : SKIP
   =
    hash.key?('account_holder_name') ? hash['account_holder_name'] : SKIP

  # 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.
  TokenResponseBankTransferData.new(brand: brand,
                                    expiration_period: expiration_period,
                                    expiration_time_shift: expiration_time_shift,
                                    bank_code: bank_code,
                                    bank_name: bank_name,
                                    branch_code: branch_code,
                                    branch_name: branch_name,
                                    account_number: ,
                                    account_holder_name: ,
                                    additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 50

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['brand'] = 'brand'
  @_hash['expiration_period'] = 'expiration_period'
  @_hash['expiration_time_shift'] = 'expiration_time_shift'
  @_hash['bank_code'] = 'bank_code'
  @_hash['bank_name'] = 'bank_name'
  @_hash['branch_code'] = 'branch_code'
  @_hash['branch_name'] = 'branch_name'
  @_hash['account_number'] = 'account_number'
  @_hash['account_holder_name'] = 'account_holder_name'
  @_hash
end

.nullablesObject

An array for nullable fields



80
81
82
83
84
85
86
87
88
89
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 80

def self.nullables
  %w[
    bank_code
    bank_name
    branch_code
    branch_name
    account_number
    account_holder_name
  ]
end

.optionalsObject

An array for optional fields



65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 65

def self.optionals
  %w[
    brand
    expiration_period
    expiration_time_shift
    bank_code
    bank_name
    branch_code
    branch_name
    account_number
    account_holder_name
  ]
end

.validate(value) ⇒ Object

Validates an instance of the object from a given value.

Parameters:



152
153
154
155
156
157
158
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 152

def self.validate(value)
  return true if value.instance_of? self

  return false unless value.instance_of? Hash

  true
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



171
172
173
174
175
176
177
178
179
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 171

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} brand: #{@brand.inspect}, expiration_period: #{@expiration_period.inspect},"\
  " expiration_time_shift: #{@expiration_time_shift.inspect}, bank_code:"\
  " #{@bank_code.inspect}, bank_name: #{@bank_name.inspect}, branch_code:"\
  " #{@branch_code.inspect}, branch_name: #{@branch_name.inspect}, account_number:"\
  " #{@account_number.inspect}, account_holder_name: #{@account_holder_name.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



161
162
163
164
165
166
167
168
# File 'lib/univapay_client_sdk/models/token_response_bank_transfer_data.rb', line 161

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} brand: #{@brand}, expiration_period: #{@expiration_period},"\
  " expiration_time_shift: #{@expiration_time_shift}, bank_code: #{@bank_code}, bank_name:"\
  " #{@bank_name}, branch_code: #{@branch_code}, branch_name: #{@branch_name}, account_number:"\
  " #{@account_number}, account_holder_name: #{@account_holder_name}, additional_properties:"\
  " #{@additional_properties}>"
end