Class: UnivapayClientSdk::DirectDebitBankTransfer
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::DirectDebitBankTransfer
- Defined in:
- lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb
Overview
A single scheduled pull of funds from a registered bank account. The bank account details are copied onto the transfer at registration time, so later edits to the account do not change past transfers.
Instance Attribute Summary collapse
-
#amount ⇒ Integer
Transfer amount in JPY.
-
#bank_account_id ⇒ String
Unique identifier of a direct debit bank account (銀行口座ID).
-
#bank_account_name ⇒ String
Account holder name (口座名義), in half-width katakana.
-
#bank_account_number ⇒ String
Seven-digit account number (口座番号).
-
#bank_account_type ⇒ DirectDebitBankAccountType
Deposit account type (預金種類) —
regular(普通),current(当座),savings(貯蓄) orothers(その他). -
#bank_code ⇒ String
Four-digit code identifying the consumer's bank (銀行コード).
-
#bank_name ⇒ String
Bank name in half-width katakana (銀行名).
-
#branch_code ⇒ String
Three-digit code identifying the bank branch (支店コード).
-
#calculated_debit_date ⇒ Date
The actual business day on which funds are pulled (計算された振替日), derived from the debit cycle.
-
#created_on ⇒ DateTime
Timestamp when the resource was created.
-
#debit_date ⇒ DirectDebitDebitDate
Monthly debit cycle — funds are pulled on either the 14th or the 27th.
-
#error ⇒ DirectDebitBankTransferError
Failure reason, or null while the transfer is awaiting a result or has succeeded.
-
#id ⇒ String
Unique identifier of a direct debit bank transfer (振替ID).
-
#legacy_store_id ⇒ String
Identifier of the merchant in the legacy direct debit system.
-
#lock ⇒ DirectDebitBankTransferLock
Whether the transfer can still be edited.
-
#merchant_id ⇒ UUID | String
The merchant that owns this transfer.
-
#status ⇒ DirectDebitBankTransferStatus
Transfer state.
-
#updated_on ⇒ DateTime
Timestamp when the resource was last updated.
-
#user_number ⇒ String
The merchant's own membership number for the consumer (会員番号).
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(id: SKIP, legacy_store_id: SKIP, merchant_id: SKIP, bank_account_id: SKIP, user_number: SKIP, bank_code: SKIP, bank_name: SKIP, branch_code: SKIP, bank_account_type: SKIP, bank_account_name: SKIP, bank_account_number: SKIP, amount: SKIP, debit_date: SKIP, calculated_debit_date: SKIP, lock: SKIP, status: SKIP, error: SKIP, created_on: SKIP, updated_on: SKIP, additional_properties: nil) ⇒ DirectDebitBankTransfer
constructor
A new instance of DirectDebitBankTransfer.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_created_on ⇒ Object
- #to_custom_updated_on ⇒ Object
-
#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(id: SKIP, legacy_store_id: SKIP, merchant_id: SKIP, bank_account_id: SKIP, user_number: SKIP, bank_code: SKIP, bank_name: SKIP, branch_code: SKIP, bank_account_type: SKIP, bank_account_name: SKIP, bank_account_number: SKIP, amount: SKIP, debit_date: SKIP, calculated_debit_date: SKIP, lock: SKIP, status: SKIP, error: SKIP, created_on: SKIP, updated_on: SKIP, additional_properties: nil) ⇒ DirectDebitBankTransfer
Returns a new instance of DirectDebitBankTransfer.
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 157 def initialize(id: SKIP, legacy_store_id: SKIP, merchant_id: SKIP, bank_account_id: SKIP, user_number: SKIP, bank_code: SKIP, bank_name: SKIP, branch_code: SKIP, bank_account_type: SKIP, bank_account_name: SKIP, bank_account_number: SKIP, amount: SKIP, debit_date: SKIP, calculated_debit_date: SKIP, lock: SKIP, status: SKIP, error: SKIP, created_on: SKIP, updated_on: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id unless id == SKIP @legacy_store_id = legacy_store_id unless legacy_store_id == SKIP @merchant_id = merchant_id unless merchant_id == SKIP @bank_account_id = bank_account_id unless bank_account_id == SKIP @user_number = user_number unless user_number == 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 @bank_account_type = bank_account_type unless bank_account_type == SKIP @bank_account_name = bank_account_name unless bank_account_name == SKIP @bank_account_number = bank_account_number unless bank_account_number == SKIP @amount = amount unless amount == SKIP @debit_date = debit_date unless debit_date == SKIP @calculated_debit_date = calculated_debit_date unless calculated_debit_date == SKIP @lock = lock unless lock == SKIP @status = status unless status == SKIP @error = error unless error == SKIP @created_on = created_on unless created_on == SKIP @updated_on = updated_on unless updated_on == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#amount ⇒ Integer
Transfer amount in JPY. Must be a positive, non-zero whole number.
64 65 66 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 64 def amount @amount end |
#bank_account_id ⇒ String
Unique identifier of a direct debit bank account (銀行口座ID).
29 30 31 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 29 def bank_account_id @bank_account_id end |
#bank_account_name ⇒ String
Account holder name (口座名義), in half-width katakana. Full-width characters are rejected by the bank.
56 57 58 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 56 def bank_account_name @bank_account_name end |
#bank_account_number ⇒ String
Seven-digit account number (口座番号).
60 61 62 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 60 def bank_account_number @bank_account_number end |
#bank_account_type ⇒ DirectDebitBankAccountType
Deposit account type (預金種類) — regular (普通), current (当座), savings
(貯蓄) or others (その他).
51 52 53 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 51 def bank_account_type @bank_account_type end |
#bank_code ⇒ String
Four-digit code identifying the consumer's bank (銀行コード).
38 39 40 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 38 def bank_code @bank_code end |
#bank_name ⇒ String
Bank name in half-width katakana (銀行名).
42 43 44 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 42 def bank_name @bank_name end |
#branch_code ⇒ String
Three-digit code identifying the bank branch (支店コード).
46 47 48 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 46 def branch_code @branch_code end |
#calculated_debit_date ⇒ Date
The actual business day on which funds are pulled (計算された振替日), derived from the debit cycle.
73 74 75 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 73 def calculated_debit_date @calculated_debit_date end |
#created_on ⇒ DateTime
Timestamp when the resource was created.
94 95 96 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 94 def created_on @created_on end |
#debit_date ⇒ DirectDebitDebitDate
Monthly debit cycle — funds are pulled on either the 14th or the 27th.
68 69 70 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 68 def debit_date @debit_date end |
#error ⇒ DirectDebitBankTransferError
Failure reason, or null while the transfer is awaiting a result or has succeeded.
90 91 92 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 90 def error @error end |
#id ⇒ String
Unique identifier of a direct debit bank transfer (振替ID).
17 18 19 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 17 def id @id end |
#legacy_store_id ⇒ String
Identifier of the merchant in the legacy direct debit system.
21 22 23 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 21 def legacy_store_id @legacy_store_id end |
#lock ⇒ DirectDebitBankTransferLock
Whether the transfer can still be edited. Transfers are unlocked until
the upload deadline for their debit cycle passes, after which they are
locked and can no longer be changed or deleted.
79 80 81 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 79 def lock @lock end |
#merchant_id ⇒ UUID | String
The merchant that owns this transfer.
25 26 27 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 25 def merchant_id @merchant_id end |
#status ⇒ DirectDebitBankTransferStatus
Transfer state. awaiting until the bank reports back, then successful
or failed. Results are reflected days after the debit date, not
immediately.
85 86 87 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 85 def status @status end |
#updated_on ⇒ DateTime
Timestamp when the resource was last updated.
98 99 100 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 98 def updated_on @updated_on end |
#user_number ⇒ String
The merchant's own membership number for the consumer (会員番号). Alphanumeric.
34 35 36 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 34 def user_number @user_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 190 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP legacy_store_id = hash.key?('legacy_store_id') ? hash['legacy_store_id'] : SKIP merchant_id = hash.key?('merchant_id') ? hash['merchant_id'] : SKIP bank_account_id = hash.key?('bank_account_id') ? hash['bank_account_id'] : SKIP user_number = hash.key?('user_number') ? hash['user_number'] : 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 bank_account_type = hash.key?('bank_account_type') ? hash['bank_account_type'] : SKIP bank_account_name = hash.key?('bank_account_name') ? hash['bank_account_name'] : SKIP bank_account_number = hash.key?('bank_account_number') ? hash['bank_account_number'] : SKIP amount = hash.key?('amount') ? hash['amount'] : SKIP debit_date = hash.key?('debit_date') ? hash['debit_date'] : SKIP calculated_debit_date = hash.key?('calculated_debit_date') ? hash['calculated_debit_date'] : SKIP lock = hash.key?('lock') ? hash['lock'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP error = hash.key?('error') ? hash['error'] : SKIP created_on = if hash.key?('created_on') (DateTimeHelper.from_rfc3339(hash['created_on']) if hash['created_on']) else SKIP end updated_on = if hash.key?('updated_on') (DateTimeHelper.from_rfc3339(hash['updated_on']) if hash['updated_on']) else SKIP end # 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. DirectDebitBankTransfer.new(id: id, legacy_store_id: legacy_store_id, merchant_id: merchant_id, bank_account_id: bank_account_id, user_number: user_number, bank_code: bank_code, bank_name: bank_name, branch_code: branch_code, bank_account_type: bank_account_type, bank_account_name: bank_account_name, bank_account_number: bank_account_number, amount: amount, debit_date: debit_date, calculated_debit_date: calculated_debit_date, lock: lock, status: status, error: error, created_on: created_on, updated_on: updated_on, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 101 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['legacy_store_id'] = 'legacy_store_id' @_hash['merchant_id'] = 'merchant_id' @_hash['bank_account_id'] = 'bank_account_id' @_hash['user_number'] = 'user_number' @_hash['bank_code'] = 'bank_code' @_hash['bank_name'] = 'bank_name' @_hash['branch_code'] = 'branch_code' @_hash['bank_account_type'] = 'bank_account_type' @_hash['bank_account_name'] = 'bank_account_name' @_hash['bank_account_number'] = 'bank_account_number' @_hash['amount'] = 'amount' @_hash['debit_date'] = 'debit_date' @_hash['calculated_debit_date'] = 'calculated_debit_date' @_hash['lock'] = 'lock' @_hash['status'] = 'status' @_hash['error'] = 'error' @_hash['created_on'] = 'created_on' @_hash['updated_on'] = 'updated_on' @_hash end |
.nullables ⇒ Object
An array for nullable fields
151 152 153 154 155 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 151 def self.nullables %w[ error ] end |
.optionals ⇒ Object
An array for optional fields
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/direct_debit_bank_transfer.rb', line 126 def self.optionals %w[ id legacy_store_id merchant_id bank_account_id user_number bank_code bank_name branch_code bank_account_type bank_account_name bank_account_number amount debit_date calculated_debit_date lock status error created_on updated_on ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 280 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, legacy_store_id: #{@legacy_store_id.inspect},"\ " merchant_id: #{@merchant_id.inspect}, bank_account_id: #{@bank_account_id.inspect},"\ " user_number: #{@user_number.inspect}, bank_code: #{@bank_code.inspect}, bank_name:"\ " #{@bank_name.inspect}, branch_code: #{@branch_code.inspect}, bank_account_type:"\ " #{@bank_account_type.inspect}, bank_account_name: #{@bank_account_name.inspect},"\ " bank_account_number: #{@bank_account_number.inspect}, amount: #{@amount.inspect},"\ " debit_date: #{@debit_date.inspect}, calculated_debit_date:"\ " #{@calculated_debit_date.inspect}, lock: #{@lock.inspect}, status: #{@status.inspect},"\ " error: #{@error.inspect}, created_on: #{@created_on.inspect}, updated_on:"\ " #{@updated_on.inspect}, additional_properties: #{@additional_properties}>" end |
#to_custom_created_on ⇒ Object
258 259 260 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 258 def to_custom_created_on DateTimeHelper.to_rfc3339(created_on) end |
#to_custom_updated_on ⇒ Object
262 263 264 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 262 def to_custom_updated_on DateTimeHelper.to_rfc3339(updated_on) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb', line 267 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, legacy_store_id: #{@legacy_store_id}, merchant_id:"\ " #{@merchant_id}, bank_account_id: #{@bank_account_id}, user_number: #{@user_number},"\ " bank_code: #{@bank_code}, bank_name: #{@bank_name}, branch_code: #{@branch_code},"\ " bank_account_type: #{@bank_account_type}, bank_account_name: #{@bank_account_name},"\ " bank_account_number: #{@bank_account_number}, amount: #{@amount}, debit_date:"\ " #{@debit_date}, calculated_debit_date: #{@calculated_debit_date}, lock: #{@lock}, status:"\ " #{@status}, error: #{@error}, created_on: #{@created_on}, updated_on: #{@updated_on},"\ " additional_properties: #{@additional_properties}>" end |