Class: Dropzone::Invoice

Inherits:
MessageBase show all
Defined in:
lib/dropzone/invoice.rb

Defined Under Namespace

Classes: Validator

Constant Summary

Constants inherited from MessageBase

MessageBase::DEFAULT_TIP

Instance Attribute Summary

Attributes inherited from MessageBase

#block_height, #message_type, #receiver_addr, #sender_addr, #txid

Instance Method Summary collapse

Methods inherited from MessageBase

attr_message, attr_message_int, attr_message_pkey, #data_to_hash, #data_to_hex, find, #initialize, is_attr_int?, is_attr_pkey?, message_attribs, message_type, new_message_from, #save!, #to_transaction, types_include?

Methods inherited from RecordBase

#blockchain, #errors, #valid?

Constructor Details

This class inherits a constructor from Dropzone::MessageBase

Instance Method Details

#paymentsObject



7
8
9
10
# File 'lib/dropzone/invoice.rb', line 7

def payments
  blockchain.messages_by_addr(sender_addr, type: 'INPAID', 
    start_block: block_height).find_all{|p| p.invoice_txid == txid }
end