Class: Unit::Types::CheckPaymentCounterparty

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, address, counterparty_moved = nil) ⇒ CheckPaymentCounterparty

Returns a new instance of CheckPaymentCounterparty.

Parameters:

  • name (String)
  • address (Address)
  • counterparty_moved (Boolean) (defaults to: nil)


12
13
14
15
16
# File 'lib/unit/types/check_payment_counterparty.rb', line 12

def initialize(name, address, counterparty_moved = nil)
  @name = name
  @address = address
  @counterparty_moved = counterparty_moved
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



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

def address
  @address
end

#counterparty_movedObject (readonly)

Returns the value of attribute counterparty_moved.



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

def counterparty_moved
  @counterparty_moved
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#representObject



18
19
20
21
22
23
24
25
# File 'lib/unit/types/check_payment_counterparty.rb', line 18

def represent
  params = {
    name: name,
    address: address&.represent,
    counterpartyMoved: counterparty_moved
  }
  params.compact
end