23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/3scale_toolbox/commands/plans_command/create_command.rb', line 23
def self.command
Cri::Command.define do
name 'create'
usage 'create [opts] <remote> <service> <plan-name>'
summary 'create application plan'
description 'Create application plan'
option :t, 'system-name', 'Application plan system name', argument: :required
flag nil, :default, 'Make default application plan'
flag nil, :disabled, 'Disables all methods and metrics in this application plan'
flag :p, :publish, 'Publish application plan'
option nil, 'approval-required', 'Applications require approval. true or false', argument: :required, transform: ThreeScaleToolbox::Helper::BooleanTransformer.new
option nil, 'cost-per-month', 'Cost per month', argument: :required, transform: method(:Float)
option nil, 'setup-fee', 'Setup fee', argument: :required, transform: method(:Float)
option nil, 'trial-period-days', 'Trial period days', argument: :required, transform: method(:Integer)
ThreeScaleToolbox::CLI.output_flag(self)
param :remote
param :service_ref
param :plan_name
runner CreateSubcommand
end
end
|