Class: ModernTreasury::LedgerAccountPayoutUpdateRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ModernTreasury::LedgerAccountPayoutUpdateRequest
- Defined in:
- lib/modern_treasury/models/ledger_account_payout_update_request.rb
Overview
LedgerAccountPayoutUpdateRequest Model.
Instance Attribute Summary collapse
-
#description ⇒ String
The description of the ledger account payout.
-
#metadata ⇒ Hash[String, String]
Additional data represented as key-value pairs.
-
#status ⇒ Status8Enum
To post a pending ledger account payout, use ‘posted`.
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(description = SKIP, status = SKIP, metadata = SKIP) ⇒ LedgerAccountPayoutUpdateRequest
constructor
A new instance of LedgerAccountPayoutUpdateRequest.
-
#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(description = SKIP, status = SKIP, metadata = SKIP) ⇒ LedgerAccountPayoutUpdateRequest
Returns a new instance of LedgerAccountPayoutUpdateRequest.
51 52 53 54 55 |
# File 'lib/modern_treasury/models/ledger_account_payout_update_request.rb', line 51 def initialize(description = SKIP, status = SKIP, = SKIP) @description = description unless description == SKIP @status = status unless status == SKIP @metadata = unless == SKIP end |
Instance Attribute Details
#description ⇒ String
The description of the ledger account payout.
14 15 16 |
# File 'lib/modern_treasury/models/ledger_account_payout_update_request.rb', line 14 def description @description end |
#metadata ⇒ Hash[String, String]
Additional data represented as key-value pairs. Both the key and value must be strings.
24 25 26 |
# File 'lib/modern_treasury/models/ledger_account_payout_update_request.rb', line 24 def @metadata end |
#status ⇒ Status8Enum
To post a pending ledger account payout, use ‘posted`. To archive a pending ledger transaction, use `archived`.
19 20 21 |
# File 'lib/modern_treasury/models/ledger_account_payout_update_request.rb', line 19 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/modern_treasury/models/ledger_account_payout_update_request.rb', line 58 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. description = hash.key?('description') ? hash['description'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP = hash.key?('metadata') ? hash['metadata'] : SKIP # Create object from extracted values. LedgerAccountPayoutUpdateRequest.new(description, status, ) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 33 |
# File 'lib/modern_treasury/models/ledger_account_payout_update_request.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['description'] = 'description' @_hash['status'] = 'status' @_hash['metadata'] = 'metadata' @_hash end |
.nullables ⇒ Object
An array for nullable fields
45 46 47 48 49 |
# File 'lib/modern_treasury/models/ledger_account_payout_update_request.rb', line 45 def self.nullables %w[ description ] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 41 42 |
# File 'lib/modern_treasury/models/ledger_account_payout_update_request.rb', line 36 def self.optionals %w[ description status metadata ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
79 80 81 82 83 |
# File 'lib/modern_treasury/models/ledger_account_payout_update_request.rb', line 79 def inspect class_name = self.class.name.split('::').last "<#{class_name} description: #{@description.inspect}, status: #{@status.inspect}, metadata:"\ " #{@metadata.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
73 74 75 76 |
# File 'lib/modern_treasury/models/ledger_account_payout_update_request.rb', line 73 def to_s class_name = self.class.name.split('::').last "<#{class_name} description: #{@description}, status: #{@status}, metadata: #{@metadata}>" end |