Sha256: 5e3a7dbcfd43323c397ab71a1f266e61e8f5862c204da865976e4872522d619b

Contents?: true

Size: 1.31 KB

Versions: 25

Compression:

Stored size: 1.31 KB

Contents

# frozen_string_literal: true

# Global Methods to interact with Soql Data
module SoqlGlobalData
  attr_accessor :ids_to_delete

  # Return limits of Salesforce org. https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_limits.htm
  # @example See Conga limits
  #   SoqlData.limits["['Conga Composer - EU']"]
  # @return [Exchange] Limits of Salesforce ORG
  def limits
    @limits ||= SoqlData.new("#{self} limits", method: :get, suburl: 'limits/')
  end

  # Describe all salesforce objects (this returns BIG response)
  # See https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_describeGlobal.htm for reference
  # @example Count how many sobjects there are
  #   objects = SoqlData.global_describe['sobjects']
  #   objects.size
  # @example Find description of object with label Organisation
  #   org_desc = SoqlData.global_describe['sobjects'].find { |obj| obj['label'] == 'Organisation' }
  # @example Find names of all objects that include 'File' in their label
  #   SoqlData.global_describe['sobjects'].find_all { |obj| obj['label'].include? 'File' }.collect { |f| f['name'] }
  # @return [Exchange] Global describe of salesforce Objects
  def global_describe
    @global_describe ||= SoqlData.new('Global describe of sobjects', method: :get, suburl: 'sobjects/')
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
leap_salesforce-1.5.0 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.4.4 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.4.3 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.4.2 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.4.1 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.4.0 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.3.1 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.3.0 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.2.2 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.2.1 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.2.0 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.1.2 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.1.1 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.1.0 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.0.5 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.0.4 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.0.3 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.0.2 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.0.1 lib/leap_salesforce/soql_data/soql_global_data.rb
leap_salesforce-1.0.0 lib/leap_salesforce/soql_data/soql_global_data.rb