Module: SfCli::Sf::Sobject::List

Defined in:
lib/sf_cli/sf/sobject/list.rb

Instance Method Summary collapse

Instance Method Details

#list(object_type, target_org: nil, api_version: nil) ⇒ Object

Returns a list of Salesforce object name

Parameters:

  • object_type (Symbol, String)

    ‘all’ or ‘custom’

  • 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

See Also:



10
11
12
13
14
15
16
17
18
# File 'lib/sf_cli/sf/sobject/list.rb', line 10

def list(object_type, target_org: nil, api_version: nil)
  flags    = {
    :"sobject"     => (object_type.to_sym == :custom ? :custom : :all),
    :"target-org"  => target_org,
    :"api-version" => api_version,
  }
  json = exec(__method__, flags: flags, redirection: :null_stderr)
  json['result']
end