class NexosisApi::ModelListQuery

class to hold the query options for list models @since 3.0.0 @see developers.nexosis.com/docs/services/98847a3fbbe64f73aa959d3cededb3af/operations/models-list-all? @note sort by properties include id, modelName, dataSourceName, type, createdDate, and lastUsedDate

Attributes

created_after_date[RW]

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

created_before_date[RW]

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

datasource_name[RW]

Limits models to those for a particular data source @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 134
def initialize(options = {})
  @datasource_name = options[:datasource_name] if options.key? :datasource_name
  @created_after_date = options[:created_after_date] if options.key? :created_after_date
  @created_before_date = options[:created_before_date] if options.key? :created_before_date
  super(options, :datasource_name, :created_after_date, :created_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 143
def query_parameters
  parm_hash = {}
  parm_hash.store(:dataSourceName, @datasource_name) unless @datasource_name.nil?
  parm_hash.store(:createdAfterDate, date_string(@created_after_date)) unless @created_after_date.nil?
  parm_hash.store(:createdBeforeDate, date_string(@created_before_date)) unless @created_before_date.nil?
  self.to_hash.merge(parm_hash)
end