Sha256: 6fac236466be6227e0e8432e3350acf5a64e4f5c2769128ecf1b6b074732296e
Contents?: true
Size: 1.09 KB
Versions: 9
Compression:
Stored size: 1.09 KB
Contents
require "digicert/cli/filter_builder" module Digicert module CLI class Order < Digicert::CLI::Base def list display_orders_in_table(orders) end def find apply_ouput_flag(orders.first) end private def orders @orders ||= order_api.all(filter_options) end def order_api Digicert::Order end def filter_options if options[:filter] { filters: Digicert::CLI::FilterBuilder.build(options[:filter]) } end end def apply_ouput_flag(order) options[:quiet] ? order.id : order end def display_orders_in_table(orders) orders_attribtues = orders.map do |order| [ order.id, order.product_name_id, order.certificate.common_name, order.status, order.certificate.valid_till, ] end Digicert::CLI::Util.make_it_pretty( rows: orders_attribtues, headings: ["Id", "Product Type", "Common Name", "Status", "Expiry"], ) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems