Class: Aspera::Cli::Plugins::Alee
- Inherits:
-
BasicAuthPlugin
- Object
- Aspera::Cli::Plugin
- BasicAuthPlugin
- Aspera::Cli::Plugins::Alee
- Defined in:
- lib/aspera/cli/plugins/alee.rb
Constant Summary collapse
- ACTIONS =
[ :entitlement ]
Constants inherited from Aspera::Cli::Plugin
Aspera::Cli::Plugin::ALL_OPS, Aspera::Cli::Plugin::GLOBAL_OPS, Aspera::Cli::Plugin::INSTANCE_OPS
Instance Method Summary collapse
Methods inherited from BasicAuthPlugin
Methods inherited from Aspera::Cli::Plugin
#config, #entity_action, #entity_command, #format, #initialize, #options, #transfer
Constructor Details
This class inherits a constructor from Aspera::Cli::BasicAuthPlugin
Instance Method Details
#execute_action ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/aspera/cli/plugins/alee.rb', line 11 def execute_action command=self..get_next_command(ACTIONS) case command when :entitlement entitlement_id = self..get_option(:username,:mandatory), customer_id = self..get_option(:password,:mandatory) api_metering=AoC.metering_api(entitlement_id,customer_id) return {:type=>:single_object, :data=>api_metering.read('entitlement')[:data]} end end |