Class: Unit::Types::WireCounterparty

Inherits:
Object
  • Object
show all
Defined in:
lib/unit/types/wire_counterparty.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, account_number, routing_number, address) ⇒ WireCounterparty

Returns a new instance of WireCounterparty.

Parameters:

  • name (String)
  • account_number (String)
  • routing_number (String)
  • address (Address)


13
14
15
16
17
18
# File 'lib/unit/types/wire_counterparty.rb', line 13

def initialize(name, , routing_number, address)
  @name = name
  @account_number = 
  @routing_number = routing_number
  @address = address
end

Instance Attribute Details

#account_numberObject (readonly)

Returns the value of attribute account_number.



7
8
9
# File 'lib/unit/types/wire_counterparty.rb', line 7

def 
  @account_number
end

#addressObject (readonly)

Returns the value of attribute address.



7
8
9
# File 'lib/unit/types/wire_counterparty.rb', line 7

def address
  @address
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/unit/types/wire_counterparty.rb', line 7

def name
  @name
end

#routing_numberObject (readonly)

Returns the value of attribute routing_number.



7
8
9
# File 'lib/unit/types/wire_counterparty.rb', line 7

def routing_number
  @routing_number
end

Instance Method Details

#representObject



20
21
22
23
24
25
26
27
28
# File 'lib/unit/types/wire_counterparty.rb', line 20

def represent
  params = {
    name: name,
    accountNumber: ,
    routingNumber: routing_number,
    address: address&.represent
  }
  params.compact
end