Class: ModernTreasury::ExpectedPaymentUpdateRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ModernTreasury::ExpectedPaymentUpdateRequest
- Defined in:
- lib/modern_treasury/models/expected_payment_update_request.rb
Overview
ExpectedPaymentUpdateRequest Model.
Instance Attribute Summary collapse
-
#amount_lower_bound ⇒ Integer
The lowest amount this expected payment may be equal to.
-
#amount_upper_bound ⇒ Integer
The highest amount this expected payment may be equal to.
-
#counterparty_id ⇒ UUID | String
The ID of the counterparty you expect for this payment.
-
#currency ⇒ Currency
Three-letter ISO currency code.
-
#date_lower_bound ⇒ Date
The earliest date the payment may come in.
-
#date_upper_bound ⇒ Date
The latest date the payment may come in.
-
#description ⇒ String
An optional description for internal use.
-
#direction ⇒ Direction1
One of credit or debit.
-
#internal_account_id ⇒ UUID | String
The ID of the Internal Account for the expected payment.
-
#metadata ⇒ Hash[String, String]
Additional data represented as key-value pairs.
-
#reconciliation_filters ⇒ Object
The reconciliation filters you have for this payment.
-
#reconciliation_groups ⇒ Object
The reconciliation groups you have for this payment.
-
#remittance_information ⇒ String
For ‘ach`, this field will be passed through on an addenda record.
-
#statement_descriptor ⇒ String
The statement description you expect to see on the transaction.
-
#type ⇒ Type1
One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen, sepa, signet, wire.
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(amount_upper_bound: SKIP, amount_lower_bound: SKIP, direction: SKIP, internal_account_id: SKIP, type: SKIP, currency: SKIP, date_upper_bound: SKIP, date_lower_bound: SKIP, description: SKIP, statement_descriptor: SKIP, metadata: SKIP, counterparty_id: SKIP, remittance_information: SKIP, reconciliation_groups: SKIP, reconciliation_filters: SKIP, additional_properties: nil) ⇒ ExpectedPaymentUpdateRequest
constructor
A new instance of ExpectedPaymentUpdateRequest.
-
#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(amount_upper_bound: SKIP, amount_lower_bound: SKIP, direction: SKIP, internal_account_id: SKIP, type: SKIP, currency: SKIP, date_upper_bound: SKIP, date_lower_bound: SKIP, description: SKIP, statement_descriptor: SKIP, metadata: SKIP, counterparty_id: SKIP, remittance_information: SKIP, reconciliation_groups: SKIP, reconciliation_filters: SKIP, additional_properties: nil) ⇒ ExpectedPaymentUpdateRequest
Returns a new instance of ExpectedPaymentUpdateRequest.
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/modern_treasury/models/expected_payment_update_request.rb', line 139 def initialize(amount_upper_bound: SKIP, amount_lower_bound: SKIP, direction: SKIP, internal_account_id: SKIP, type: SKIP, currency: SKIP, date_upper_bound: SKIP, date_lower_bound: SKIP, description: SKIP, statement_descriptor: SKIP, metadata: SKIP, counterparty_id: SKIP, remittance_information: SKIP, reconciliation_groups: SKIP, reconciliation_filters: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @amount_upper_bound = amount_upper_bound unless amount_upper_bound == SKIP @amount_lower_bound = amount_lower_bound unless amount_lower_bound == SKIP @direction = direction unless direction == SKIP @internal_account_id = internal_account_id unless internal_account_id == SKIP @type = type unless type == SKIP @currency = currency unless currency == SKIP @date_upper_bound = date_upper_bound unless date_upper_bound == SKIP @date_lower_bound = date_lower_bound unless date_lower_bound == SKIP @description = description unless description == SKIP @statement_descriptor = statement_descriptor unless statement_descriptor == SKIP @metadata = unless == SKIP @counterparty_id = counterparty_id unless counterparty_id == SKIP @remittance_information = remittance_information unless remittance_information == SKIP @reconciliation_groups = reconciliation_groups unless reconciliation_groups == SKIP @reconciliation_filters = reconciliation_filters unless reconciliation_filters == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#amount_lower_bound ⇒ Integer
The lowest amount this expected payment may be equal to. Value in specified currency’s smallest unit. e.g. $10 would be represented as 1000.
20 21 22 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 20 def amount_lower_bound @amount_lower_bound end |
#amount_upper_bound ⇒ Integer
The highest amount this expected payment may be equal to. Value in specified currency’s smallest unit. e.g. $10 would be represented as 1000.
15 16 17 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 15 def amount_upper_bound @amount_upper_bound end |
#counterparty_id ⇒ UUID | String
The ID of the counterparty you expect for this payment.
66 67 68 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 66 def counterparty_id @counterparty_id end |
#currency ⇒ Currency
Three-letter ISO currency code.
38 39 40 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 38 def currency @currency end |
#date_lower_bound ⇒ Date
The earliest date the payment may come in. Format: yyyy-mm-dd
46 47 48 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 46 def date_lower_bound @date_lower_bound end |
#date_upper_bound ⇒ Date
The latest date the payment may come in. Format: yyyy-mm-dd
42 43 44 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 42 def date_upper_bound @date_upper_bound end |
#description ⇒ String
An optional description for internal use.
50 51 52 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 50 def description @description end |
#direction ⇒ Direction1
One of credit or debit. When you are receiving money, use credit. When you are being charged, use debit.
25 26 27 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 25 def direction @direction end |
#internal_account_id ⇒ UUID | String
The ID of the Internal Account for the expected payment.
29 30 31 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 29 def internal_account_id @internal_account_id end |
#metadata ⇒ Hash[String, String]
Additional data represented as key-value pairs. Both the key and value must be strings.
62 63 64 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 62 def @metadata end |
#reconciliation_filters ⇒ Object
The reconciliation filters you have for this payment.
80 81 82 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 80 def reconciliation_filters @reconciliation_filters end |
#reconciliation_groups ⇒ Object
The reconciliation groups you have for this payment.
76 77 78 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 76 def reconciliation_groups @reconciliation_groups end |
#remittance_information ⇒ String
For ‘ach`, this field will be passed through on an addenda record. For `wire` payments the field will be passed through as the “Originator to Beneficiary Information”, also known as OBI or Fedwire tag 6000.
72 73 74 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 72 def remittance_information @remittance_information end |
#statement_descriptor ⇒ String
The statement description you expect to see on the transaction. For ACH payments, this will be the full line item passed from the bank. For wire payments, this will be the OBI field on the wire. For check payments, this will be the memo field.
57 58 59 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 57 def statement_descriptor @statement_descriptor end |
#type ⇒ Type1
One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen, sepa, signet, wire.
34 35 36 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 34 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 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 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 169 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. amount_upper_bound = hash.key?('amount_upper_bound') ? hash['amount_upper_bound'] : SKIP amount_lower_bound = hash.key?('amount_lower_bound') ? hash['amount_lower_bound'] : SKIP direction = hash.key?('direction') ? hash['direction'] : SKIP internal_account_id = hash.key?('internal_account_id') ? hash['internal_account_id'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP currency = hash.key?('currency') ? hash['currency'] : SKIP date_upper_bound = hash.key?('date_upper_bound') ? hash['date_upper_bound'] : SKIP date_lower_bound = hash.key?('date_lower_bound') ? hash['date_lower_bound'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP statement_descriptor = hash.key?('statement_descriptor') ? hash['statement_descriptor'] : SKIP = hash.key?('metadata') ? hash['metadata'] : SKIP counterparty_id = hash.key?('counterparty_id') ? hash['counterparty_id'] : SKIP remittance_information = hash.key?('remittance_information') ? hash['remittance_information'] : SKIP reconciliation_groups = hash.key?('reconciliation_groups') ? hash['reconciliation_groups'] : SKIP reconciliation_filters = hash.key?('reconciliation_filters') ? hash['reconciliation_filters'] : 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. ExpectedPaymentUpdateRequest.new(amount_upper_bound: amount_upper_bound, amount_lower_bound: amount_lower_bound, direction: direction, internal_account_id: internal_account_id, type: type, currency: currency, date_upper_bound: date_upper_bound, date_lower_bound: date_lower_bound, description: description, statement_descriptor: statement_descriptor, metadata: , counterparty_id: counterparty_id, remittance_information: remittance_information, reconciliation_groups: reconciliation_groups, reconciliation_filters: reconciliation_filters, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 83 def self.names @_hash = {} if @_hash.nil? @_hash['amount_upper_bound'] = 'amount_upper_bound' @_hash['amount_lower_bound'] = 'amount_lower_bound' @_hash['direction'] = 'direction' @_hash['internal_account_id'] = 'internal_account_id' @_hash['type'] = 'type' @_hash['currency'] = 'currency' @_hash['date_upper_bound'] = 'date_upper_bound' @_hash['date_lower_bound'] = 'date_lower_bound' @_hash['description'] = 'description' @_hash['statement_descriptor'] = 'statement_descriptor' @_hash['metadata'] = 'metadata' @_hash['counterparty_id'] = 'counterparty_id' @_hash['remittance_information'] = 'remittance_information' @_hash['reconciliation_groups'] = 'reconciliation_groups' @_hash['reconciliation_filters'] = 'reconciliation_filters' @_hash end |
.nullables ⇒ Object
An array for nullable fields
125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 125 def self.nullables %w[ type date_upper_bound date_lower_bound description statement_descriptor counterparty_id remittance_information reconciliation_groups reconciliation_filters ] end |
.optionals ⇒ Object
An array for optional fields
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 104 def self.optionals %w[ amount_upper_bound amount_lower_bound direction internal_account_id type currency date_upper_bound date_lower_bound description statement_descriptor metadata counterparty_id remittance_information reconciliation_groups reconciliation_filters ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 239 def inspect class_name = self.class.name.split('::').last "<#{class_name} amount_upper_bound: #{@amount_upper_bound.inspect}, amount_lower_bound:"\ " #{@amount_lower_bound.inspect}, direction: #{@direction.inspect}, internal_account_id:"\ " #{@internal_account_id.inspect}, type: #{@type.inspect}, currency: #{@currency.inspect},"\ " date_upper_bound: #{@date_upper_bound.inspect}, date_lower_bound:"\ " #{@date_lower_bound.inspect}, description: #{@description.inspect}, statement_descriptor:"\ " #{@statement_descriptor.inspect}, metadata: #{@metadata.inspect}, counterparty_id:"\ " #{@counterparty_id.inspect}, remittance_information: #{@remittance_information.inspect},"\ " reconciliation_groups: #{@reconciliation_groups.inspect}, reconciliation_filters:"\ " #{@reconciliation_filters.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/modern_treasury/models/expected_payment_update_request.rb', line 226 def to_s class_name = self.class.name.split('::').last "<#{class_name} amount_upper_bound: #{@amount_upper_bound}, amount_lower_bound:"\ " #{@amount_lower_bound}, direction: #{@direction}, internal_account_id:"\ " #{@internal_account_id}, type: #{@type}, currency: #{@currency}, date_upper_bound:"\ " #{@date_upper_bound}, date_lower_bound: #{@date_lower_bound}, description:"\ " #{@description}, statement_descriptor: #{@statement_descriptor}, metadata: #{@metadata},"\ " counterparty_id: #{@counterparty_id}, remittance_information: #{@remittance_information},"\ " reconciliation_groups: #{@reconciliation_groups}, reconciliation_filters:"\ " #{@reconciliation_filters}, additional_properties: #{@additional_properties}>" end |