Class: Printavo::CLI::Orders
- Inherits:
-
Thor
- Object
- Thor
- Printavo::CLI::Orders
- Includes:
- Printavo::CLIHelpers
- Defined in:
- lib/printavo/cli.rb
Overview
orders subcommand
Instance Method Summary collapse
Instance Method Details
#find(id) ⇒ Object
70 71 72 73 74 75 76 |
# File 'lib/printavo/cli.rb', line 70 def find(id) o = build_client.orders.find(id) say "id: #{o.id}" say "nickname: #{o.nickname}" say "total_price: #{o.total_price}" say "status: #{o.status}" end |
#list ⇒ Object
63 64 65 66 67 |
# File 'lib/printavo/cli.rb', line 63 def list build_client.orders.all(first: [:first]).each do |o| say "#{o.id.to_s.ljust(10)} #{o.nickname.to_s.ljust(30)} #{o.total_price}" end end |