class

Invoice

Inherits Reference < Object

Constructors

new(invoice_number : String, amount : Float64, issue_date : String, due_date : String, client_name : String, user_id : Int64, status : String = "pending", description : String | Nil = nil, id : Int64 | Nil = nil, created_at : Time | Nil = nil)
Source

Class methods

all(limit : Int32 = 20, offset : Int32 = 0, user_id : Int64 | Nil = nil, status : String | Nil = nil) : Array(Invoice)
Source
count(user_id : Int64 | Nil = nil, status : String | Nil = nil) : Int64
Source
csv_header
Source
find(id : Int64) : Invoice | Nil
Source
find_by_invoice_number(invoice_number : String) : Invoice | Nil
Source

Instance methods

amount
Source
amount=(amount : Float64)
Source
client_name
Source
client_name=(client_name : String)
Source
created_at
Source
created_at=(created_at : Time | Nil)
Source
delete
Source
description
Source
description=(description : String | Nil)
Source
due_date
Source
due_date=(due_date : String)
Source
id=(id : Int64 | Nil)
Source
invoice_number
Source
invoice_number=(invoice_number : String)
Source
issue_date
Source
issue_date=(issue_date : String)
Source
save
Source
status
Source
status=(status : String)
Source
to_csv
Source
to_json(json : JSON::Builder)
Source
user_id
Source
user_id=(user_id : Int64)
Source