File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -63,3 +63,12 @@ pub struct SyncUnpaidInvoicesArgs {}
6363pub fn sync_unpaid_invoices ( _args : & SyncUnpaidInvoicesArgs ) -> Result < ( ) > {
6464 rpc:: call ( "sync_unpaid_invoices" , json ! ( { } ) ) ?. print ( )
6565}
66+
67+ #[ derive( Args ) ]
68+ pub struct GetInvoiceArgs {
69+ pub id : i64 ,
70+ }
71+
72+ pub fn get_invoice ( args : & GetInvoiceArgs ) -> Result < ( ) > {
73+ rpc:: call ( "get_invoice" , json ! ( { "id" : args. id } ) ) ?. print ( )
74+ }
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ enum Commands {
3838 GenerateInvoice ( command:: admin:: GenerateInvoiceArgs ) ,
3939 /// Sync unpaid invoices
4040 SyncUnpaidInvoices ( command:: admin:: SyncUnpaidInvoicesArgs ) ,
41+ /// Get invoice details, you only need to pass invoice ID (integer)
42+ GetInvoice ( command:: admin:: GetInvoiceArgs ) ,
4143 /// Return all entities matching provided search query. Currently, only areas are returned
4244 Search ( command:: common:: SearchArgs ) ,
4345 /// Fetch element by a numeric or OSM (node:12345) id. You can also use node=12345 format
@@ -131,6 +133,7 @@ fn main() -> Result<()> {
131133 Commands :: RemoveAdminAction ( args) => command:: admin:: remove_admin_action ( args) ,
132134 Commands :: GenerateInvoice ( args) => command:: admin:: generate_invoice ( args) ,
133135 Commands :: SyncUnpaidInvoices ( args) => command:: admin:: sync_unpaid_invoices ( args) ,
136+ Commands :: GetInvoice ( args) => command:: admin:: get_invoice ( args) ,
134137 // Common
135138 Commands :: Search ( args) => command:: common:: search ( args) ,
136139 // Element
You can’t perform that action at this time.
0 commit comments