Module: SfCli::Sf::Org::ListLimits

Included in:
Core
Defined in:
lib/sf_cli/sf/org/list_limits.rb

Defined Under Namespace

Classes: Limits

Constant Summary collapse

Limit =
Data.define(:name, :remaining, :max)

Instance Method Summary collapse

Instance Method Details

#list_limits(target_org: nil, api_version: nil, raw_output: false) ⇒ Limits

List the limits in your org

Examples:

limits = sf.org.list_limits
limits.names                   #=> ["ActiveScratchOrgs","AnalyticsExternalDataSizeMB", ...]
limits.find :ActiveScratchOrgs #=> <Limit: name="ActiveScratchOrgs", remaining=3, max=3>

Parameters:

  • target_org (Symbol, String) (defaults to: nil)

    an alias of paticular org, or username can be used

  • api_version (Numeric) (defaults to: nil)

    override the api version used for api requests made by this command

  • raw_output (Boolian) (defaults to: false)

    return the original command’s output.

Returns:

  • (Limits)

    the list of limit information

See Also:



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/sf_cli/sf/org/list_limits.rb', line 18

def list_limits(target_org: nil, api_version: nil, raw_output: false)
  flags    = {
    :"target-org"    => target_org,
    :"api-version"   => api_version,
  }
  action = __method__.to_s.tr('_', ' ')
  output = org_exec(action, flags: flags, redirection: :null_stderr, raw_output: raw_output)

  return output if raw_output

  Limits.new(output['result'])
end