Class: ModernTreasury::VirtualAccountUpdateRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/modern_treasury/models/virtual_account_update_request.rb

Overview

VirtualAccountUpdateRequest Model.

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(name = SKIP, counterparty_id = SKIP, metadata = SKIP) ⇒ VirtualAccountUpdateRequest

Returns a new instance of VirtualAccountUpdateRequest.



49
50
51
52
53
# File 'lib/modern_treasury/models/virtual_account_update_request.rb', line 49

def initialize(name = SKIP, counterparty_id = SKIP,  = SKIP)
  @name = name unless name == SKIP
  @counterparty_id = counterparty_id unless counterparty_id == SKIP
  @metadata =  unless  == SKIP
end

Instance Attribute Details

#counterparty_idUUID | String

TODO: Write general description for this method

Returns:

  • (UUID | String)


18
19
20
# File 'lib/modern_treasury/models/virtual_account_update_request.rb', line 18

def counterparty_id
  @counterparty_id
end

#metadataHash[String, String]

TODO: Write general description for this method

Returns:

  • (Hash[String, String])


22
23
24
# File 'lib/modern_treasury/models/virtual_account_update_request.rb', line 22

def 
  @metadata
end

#nameString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/modern_treasury/models/virtual_account_update_request.rb', line 14

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/modern_treasury/models/virtual_account_update_request.rb', line 56

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  name = hash.key?('name') ? hash['name'] : SKIP
  counterparty_id =
    hash.key?('counterparty_id') ? hash['counterparty_id'] : SKIP
   = hash.key?('metadata') ? hash['metadata'] : SKIP

  # Create object from extracted values.
  VirtualAccountUpdateRequest.new(name,
                                  counterparty_id,
                                  )
end

.namesObject

A mapping from model property names to API property names.



25
26
27
28
29
30
31
# File 'lib/modern_treasury/models/virtual_account_update_request.rb', line 25

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['name'] = 'name'
  @_hash['counterparty_id'] = 'counterparty_id'
  @_hash['metadata'] = 'metadata'
  @_hash
end

.nullablesObject

An array for nullable fields



43
44
45
46
47
# File 'lib/modern_treasury/models/virtual_account_update_request.rb', line 43

def self.nullables
  %w[
    name
  ]
end

.optionalsObject

An array for optional fields



34
35
36
37
38
39
40
# File 'lib/modern_treasury/models/virtual_account_update_request.rb', line 34

def self.optionals
  %w[
    name
    counterparty_id
    metadata
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



79
80
81
82
83
# File 'lib/modern_treasury/models/virtual_account_update_request.rb', line 79

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} name: #{@name.inspect}, counterparty_id: #{@counterparty_id.inspect},"\
  " metadata: #{@metadata.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



72
73
74
75
76
# File 'lib/modern_treasury/models/virtual_account_update_request.rb', line 72

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} name: #{@name}, counterparty_id: #{@counterparty_id}, metadata:"\
  " #{@metadata}>"
end