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.



42756
42757
42758
42759
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42756

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.



42754
42755
42756
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42754

def limitations
  @limitations
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



42765
42766
42767
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42765

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

#to_hashObject



42769
42770
42771
42772
42773
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42769

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

#to_jsonObject



42761
42762
42763
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42761

def to_json
  JSON.dump(to_hash)
end