class NexosisApi::ImportListQuery

class to hold the query options for list imports @since 3.0.0 @see developers.nexosis.com/docs/services/98847a3fbbe64f73aa959d3cededb3af/operations/imports-list-imports? @note sort by properties include id, dataSetName, requestedDate, and currentStatusDate

Attributes

dataset_name[RW]

Limits imports to those for a particular dataset @return [String]

requested_after_date[RW]

Format - date-time (as date-time in ISO8601). Limits imports to those requested on or after the specified date @return [String]

requested_before_date[RW]

Format - date-time (as date-time in ISO8601). Limits imports to those requested on or before the specified date @return [String]

Public Class Methods

new(options = {}) click to toggle source
Calls superclass method NexosisApi::ListQuery::new
# File lib/nexosis_api/list_queries.rb, line 169
def initialize(options = {})
  @dataset_name = options[:dataset_name] if options.key? :dataset_name
  @requested_after_date = options[:requested_after_date] if options.key? :requested_after_date
  @requested_before_date = options[:requested_before_date] if options.key? :requested_before_date
  super(options, :dataset_name, :requested_after_date, :requested_before_date)
end

Public Instance Methods

query_parameters() click to toggle source

A hash suitable for using as the query portion of an HTTP request to the API @return [Hash]

# File lib/nexosis_api/list_queries.rb, line 178
def query_parameters
  parm_hash = {}
  parm_hash.store(:dataSourceName, @dataset_name) unless @dataset_name.nil?
  parm_hash.store(:requestedAfterDate, date_string(@requested_after_date)) unless @requested_after_date.nil?
  parm_hash.store(:requestedBeforeDate, date_string(@requested_before_date)) unless @requested_before_date.nil?
  self.to_hash.merge(parm_hash)
end