@@ -321,6 +321,40 @@ def create_migration_invoice(account_id, invoices, target_date, user = nil, reas
321
321
} . merge ( options )
322
322
end
323
323
324
+ def trigger_invoice_group_run ( account_id , target_date = nil , plugin_property = nil , user = nil , reason = nil , comment = nil , options = { } )
325
+ query_map = { :accountId => account_id }
326
+ query_map [ :targetDate ] = target_date if !target_date . nil?
327
+ query_map [ :pluginProperty ] = plugin_property if !plugin_property . nil?
328
+
329
+ res = post "#{ KILLBILL_API_INVOICES_PREFIX } /group" ,
330
+ { } ,
331
+ query_map ,
332
+ {
333
+ :user => user ,
334
+ :reason => reason ,
335
+ :comment => comment ,
336
+ } . merge ( options )
337
+ end
338
+
339
+ def retrieve_invoice_group ( account_id , group_id , with_children_items = false , audit = "NONE" , options = { } )
340
+ res = get "#{ KILLBILL_API_INVOICES_PREFIX } /#{ group_id } /group" ,
341
+ {
342
+ :accountId => account_id ,
343
+ :withChildrenItems => with_children_items ,
344
+ :audit => audit
345
+ } ,
346
+ options
347
+ end
348
+
349
+ def retrieve_payments_for_invoice ( invoice_id , with_plugin_info = false , with_attempts = false , audit = "NONE" , options = { } )
350
+ res = get "#{ KILLBILL_API_INVOICES_PREFIX } /#{ invoice_id } /payments" ,
351
+ {
352
+ :withPluginInfo => with_plugin_info ,
353
+ :withAttempts => with_attempts ,
354
+ :audit => audit
355
+ } ,
356
+ options
357
+ end
324
358
end
325
359
326
360
def commit ( user = nil , reason = nil , comment = nil , options = { } )
0 commit comments