Class: Io::Flow::V0::Models::InputSpecificationLimitations

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ InputSpecificationLimitations

Returns a new instance of InputSpecificationLimitations.



25317
25318
25319
25320
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25317

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @limitations = (x = opts.delete(:limitations); x.nil? ? nil : HttpClient::Preconditions.assert_class('limitations', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::InputSpecificationLimitation) ? x : ::Io::Flow::V0::Models::InputSpecificationLimitation.from_json(x)) })
end

Instance Attribute Details

#limitationsObject (readonly)

Returns the value of attribute limitations.



25315
25316
25317
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25315

def limitations
  @limitations
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



25326
25327
25328
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25326

def copy(incoming={})
  InputSpecificationLimitations.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



25330
25331
25332
25333
25334
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25330

def to_hash
  {
    :limitations => limitations.nil? ? nil : limitations.map { |o| o.to_hash }
  }
end

#to_jsonObject



25322
25323
25324
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25322

def to_json
  JSON.dump(to_hash)
end