class Io::Flow::V0::Models::ExclusionRulesExportType

Defines the filters that can be applied when requesting an exclusion rule data export

Attributes

sort[R]
states[R]

Public Class Methods

new(incoming={}) click to toggle source
Calls superclass method Io::Flow::V0::Models::ExportType::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 41370
def initialize(incoming={})
  super(:discriminator => ExportType::Types::EXCLUSION_RULES_EXPORT_TYPE)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @states = (x = opts.delete(:states); x.nil? ? nil : HttpClient::Preconditions.assert_class('states', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExclusionRuleState) ? x : ::Io::Flow::V0::Models::ExclusionRuleState.apply(x)) })
  @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 41381
def copy(incoming={})
  ExclusionRulesExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
subtype_to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 41385
def subtype_to_hash
  {
    :states => states.nil? ? nil : states.map { |o| o.value },
    :sort => sort
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 41377
def to_json
  JSON.dump(to_hash)
end