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

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) ⇒ Limits

Returns the metadata types that are enabled for 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

Returns:

  • (Limits)

    the list of limit information

See Also:



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

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

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