Class: UnivapayClientSdk::BankTransferLedger
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::BankTransferLedger
- Defined in:
- lib/univapay_client_sdk/models/bank_transfer_ledger.rb
Overview
Single bank transfer ledger entry associated with a charge.
Instance Attribute Summary collapse
-
#amount ⇒ Integer
Amount in the smallest currency unit.
-
#balance ⇒ Integer
Current balance in the smallest currency unit.
-
#bank_ledger_type ⇒ BankTransferLedgerBankLedgerType
Bank Transfer Ledger Bank Ledger Type schema.
-
#created_on ⇒ DateTime
Timestamp when the resource was created.
-
#mode ⇒ BankTransferLedgerMode
Bank Transfer Ledger Mode schema.
-
#transaction_date ⇒ Date
Transaction date.
-
#transaction_timestamp ⇒ DateTime
Transaction timestamp.
-
#virtual_account_id ⇒ String
Virtual account id value.
-
#virtual_bank_account_holder_name ⇒ String
Virtual bank account holder name.
-
#virtual_bank_account_number ⇒ String
Virtual bank account number.
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(bank_ledger_type: SKIP, amount: SKIP, balance: SKIP, virtual_bank_account_holder_name: SKIP, virtual_bank_account_number: SKIP, virtual_account_id: SKIP, transaction_date: SKIP, transaction_timestamp: SKIP, mode: SKIP, created_on: SKIP, additional_properties: nil) ⇒ BankTransferLedger
constructor
A new instance of BankTransferLedger.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_created_on ⇒ Object
- #to_custom_transaction_timestamp ⇒ 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(bank_ledger_type: SKIP, amount: SKIP, balance: SKIP, virtual_bank_account_holder_name: SKIP, virtual_bank_account_number: SKIP, virtual_account_id: SKIP, transaction_date: SKIP, transaction_timestamp: SKIP, mode: SKIP, created_on: SKIP, additional_properties: nil) ⇒ BankTransferLedger
Returns a new instance of BankTransferLedger.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 91 def initialize(bank_ledger_type: SKIP, amount: SKIP, balance: SKIP, virtual_bank_account_holder_name: SKIP, virtual_bank_account_number: SKIP, virtual_account_id: SKIP, transaction_date: SKIP, transaction_timestamp: SKIP, mode: SKIP, created_on: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @bank_ledger_type = bank_ledger_type unless bank_ledger_type == SKIP @amount = amount unless amount == SKIP @balance = balance unless balance == SKIP unless virtual_bank_account_holder_name == SKIP @virtual_bank_account_holder_name = virtual_bank_account_holder_name end unless virtual_bank_account_number == SKIP @virtual_bank_account_number = virtual_bank_account_number end @virtual_account_id = virtual_account_id unless virtual_account_id == SKIP @transaction_date = transaction_date unless transaction_date == SKIP @transaction_timestamp = unless == SKIP @mode = mode unless mode == SKIP @created_on = created_on unless created_on == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#amount ⇒ Integer
Amount in the smallest currency unit.
19 20 21 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 19 def amount @amount end |
#balance ⇒ Integer
Current balance in the smallest currency unit.
23 24 25 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 23 def balance @balance end |
#bank_ledger_type ⇒ BankTransferLedgerBankLedgerType
Bank Transfer Ledger Bank Ledger Type schema.
15 16 17 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 15 def bank_ledger_type @bank_ledger_type end |
#created_on ⇒ DateTime
Timestamp when the resource was created.
51 52 53 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 51 def created_on @created_on end |
#mode ⇒ BankTransferLedgerMode
Bank Transfer Ledger Mode schema.
47 48 49 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 47 def mode @mode end |
#transaction_date ⇒ Date
Transaction date.
39 40 41 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 39 def transaction_date @transaction_date end |
#transaction_timestamp ⇒ DateTime
Transaction timestamp.
43 44 45 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 43 def @transaction_timestamp end |
#virtual_account_id ⇒ String
Virtual account id value.
35 36 37 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 35 def virtual_account_id @virtual_account_id end |
#virtual_bank_account_holder_name ⇒ String
Virtual bank account holder name.
27 28 29 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 27 def virtual_bank_account_holder_name @virtual_bank_account_holder_name end |
#virtual_bank_account_number ⇒ String
Virtual bank account number.
31 32 33 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 31 def virtual_bank_account_number @virtual_bank_account_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 119 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. bank_ledger_type = hash.key?('bank_ledger_type') ? hash['bank_ledger_type'] : SKIP amount = hash.key?('amount') ? hash['amount'] : SKIP balance = hash.key?('balance') ? hash['balance'] : SKIP virtual_bank_account_holder_name = hash.key?('virtual_bank_account_holder_name') ? hash['virtual_bank_account_holder_name'] : SKIP virtual_bank_account_number = hash.key?('virtual_bank_account_number') ? hash['virtual_bank_account_number'] : SKIP virtual_account_id = hash.key?('virtual_account_id') ? hash['virtual_account_id'] : SKIP transaction_date = hash.key?('transaction_date') ? hash['transaction_date'] : SKIP = if hash.key?('transaction_timestamp') (DateTimeHelper.from_rfc3339(hash['transaction_timestamp']) if hash['transaction_timestamp']) else SKIP end mode = hash.key?('mode') ? hash['mode'] : SKIP created_on = if hash.key?('created_on') (DateTimeHelper.from_rfc3339(hash['created_on']) if hash['created_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. BankTransferLedger.new(bank_ledger_type: bank_ledger_type, amount: amount, balance: balance, virtual_bank_account_holder_name: virtual_bank_account_holder_name, virtual_bank_account_number: virtual_bank_account_number, virtual_account_id: virtual_account_id, transaction_date: transaction_date, transaction_timestamp: , mode: mode, created_on: created_on, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 54 def self.names @_hash = {} if @_hash.nil? @_hash['bank_ledger_type'] = 'bank_ledger_type' @_hash['amount'] = 'amount' @_hash['balance'] = 'balance' @_hash['virtual_bank_account_holder_name'] = 'virtual_bank_account_holder_name' @_hash['virtual_bank_account_number'] = 'virtual_bank_account_number' @_hash['virtual_account_id'] = 'virtual_account_id' @_hash['transaction_date'] = 'transaction_date' @_hash['transaction_timestamp'] = 'transaction_timestamp' @_hash['mode'] = 'mode' @_hash['created_on'] = 'created_on' @_hash end |
.nullables ⇒ Object
An array for nullable fields
87 88 89 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 87 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 71 def self.optionals %w[ bank_ledger_type amount balance virtual_bank_account_holder_name virtual_bank_account_number virtual_account_id transaction_date transaction_timestamp mode created_on ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
188 189 190 191 192 193 194 195 196 197 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 188 def inspect class_name = self.class.name.split('::').last "<#{class_name} bank_ledger_type: #{@bank_ledger_type.inspect}, amount: #{@amount.inspect},"\ " balance: #{@balance.inspect}, virtual_bank_account_holder_name:"\ " #{@virtual_bank_account_holder_name.inspect}, virtual_bank_account_number:"\ " #{@virtual_bank_account_number.inspect}, virtual_account_id:"\ " #{@virtual_account_id.inspect}, transaction_date: #{@transaction_date.inspect},"\ " transaction_timestamp: #{@transaction_timestamp.inspect}, mode: #{@mode.inspect},"\ " created_on: #{@created_on.inspect}, additional_properties: #{@additional_properties}>" end |
#to_custom_created_on ⇒ Object
172 173 174 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 172 def to_custom_created_on DateTimeHelper.to_rfc3339(created_on) end |
#to_custom_transaction_timestamp ⇒ Object
168 169 170 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 168 def DateTimeHelper.to_rfc3339() end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
177 178 179 180 181 182 183 184 185 |
# File 'lib/univapay_client_sdk/models/bank_transfer_ledger.rb', line 177 def to_s class_name = self.class.name.split('::').last "<#{class_name} bank_ledger_type: #{@bank_ledger_type}, amount: #{@amount}, balance:"\ " #{@balance}, virtual_bank_account_holder_name: #{@virtual_bank_account_holder_name},"\ " virtual_bank_account_number: #{@virtual_bank_account_number}, virtual_account_id:"\ " #{@virtual_account_id}, transaction_date: #{@transaction_date}, transaction_timestamp:"\ " #{@transaction_timestamp}, mode: #{@mode}, created_on: #{@created_on},"\ " additional_properties: #{@additional_properties}>" end |