BillingPlansGetCommand.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using BO.Console.Commands.Base;
  2. using Quadarax.Foundation.Core.QConsole;
  3. using Quadarax.Foundation.Core.QConsole.Attributes;
  4. using Quadarax.Foundation.Core.Value;
  5. namespace BO.Console.Commands.Catalogues
  6. {
  7. [CommandDefinition]
  8. internal class BillingPlansGetCommand : AbstractListScopedCommand<AppServer.Metadata.Enums.BPlanScopeEnums>
  9. {
  10. #region *** Constants ***
  11. private const string CS_CMD_BPLANGET_NAME = "bplan_list";
  12. private const string CS_CMD_BPLANGET_DESCR = "Get list of billing plans by specification scope.";
  13. #endregion
  14. #region *** Properties ***
  15. public override string Name => CS_CMD_BPLANGET_NAME;
  16. public override string Description => CS_CMD_BPLANGET_DESCR;
  17. #endregion
  18. #region *** Constructor ***
  19. public BillingPlansGetCommand(Engine engine) : base(engine)
  20. {
  21. }
  22. #endregion
  23. #region *** EXECUTE ***
  24. protected override Result OnExecute()
  25. {
  26. var mimes = Client.GetBillingPlansAsync(Scope, Paging).Result;
  27. WriteDtoToConsole(mimes,"Id","Code","Name","PstprocessProfile","PstinitialCredits","Psttest","IsCustom","IsHidden","IsEnabled");
  28. return new Result();
  29. }
  30. #endregion
  31. #region *** Private operations ***
  32. #endregion
  33. }
  34. }