Class: RogIQ::Remote::Billing
- Inherits:
-
CommandBase
- Object
- Thor
- CommandBase
- RogIQ::Remote::Billing
- Defined in:
- lib/rogiq/remote/billing.rb
Instance Method Summary collapse
Instance Method Details
#coins(identifier) ⇒ Object
9 10 11 |
# File 'lib/rogiq/remote/billing.rb', line 9 def coins(identifier) emit(api.get("/api/v1/cli/billing/coins", { identifier: identifier })) end |
#invoices(identifier) ⇒ Object
21 22 23 |
# File 'lib/rogiq/remote/billing.rb', line 21 def invoices(identifier) emit(api.get("/api/v1/cli/billing/invoices", { identifier: identifier, limit: [:limit] })) end |
#overages ⇒ Object
15 16 17 |
# File 'lib/rogiq/remote/billing.rb', line 15 def overages emit(api.get("/api/v1/cli/billing/overages", { limit: [:limit] })) end |
#summary ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/rogiq/remote/billing.rb', line 28 def summary unless [:yes] exit 1 unless yes?("Enqueue Billing::DailyBillingSummaryJob?") end body = { confirm: true } body[:date] = [:date] unless [:date].to_s.strip.empty? emit(api.post("/api/v1/cli/billing/summary", body)) end |