class IronBank::Actions::Query

Query Zuora using ZOQL knowledgecenter.zuora.com/DC_Developers/K_Zuora_Object_Query_Language

Constants

DEFAULT_ZUORA_LIMIT

Zuora's default is 2,000 records, but we simply use `0` here to not pass the parameter to Zuora APIs during the query call.

See knowledgecenter.zuora.com/DC_Developers/BC_ZOQL#Limits

Attributes

limit[R]
zoql[R]

Public Class Methods

call(zoql, limit: DEFAULT_ZUORA_LIMIT) click to toggle source
# File lib/iron_bank/actions/query.rb, line 16
def self.call(zoql, limit: DEFAULT_ZUORA_LIMIT)
  new(zoql, limit).call
end
new(zoql, limit) click to toggle source
Calls superclass method IronBank::Action::new
# File lib/iron_bank/actions/query.rb, line 24
def initialize(zoql, limit)
  @zoql  = zoql
  @limit = limit

  super(zoql: zoql, limit: limit)
end

Private Instance Methods

params() click to toggle source
# File lib/iron_bank/actions/query.rb, line 31
def params
  return required_params if limit.zero?

  required_params.merge(conf: { batchSize: limit })
end
required_params() click to toggle source
# File lib/iron_bank/actions/query.rb, line 37
def required_params
  { queryString: zoql }
end