Class: Io::Flow::V0::Models::InputSpecificationLimitationMax

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

Overview

Represents the maximum number of accepted inputs

Instance Attribute Summary collapse

Attributes inherited from InputSpecificationLimitation

#discriminator

Instance Method Summary collapse

Methods inherited from InputSpecificationLimitation

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ InputSpecificationLimitationMax

Returns a new instance of InputSpecificationLimitationMax.



36219
36220
36221
36222
36223
36224
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36219

def initialize(incoming={})
  super(:discriminator => InputSpecificationLimitation::Types::INPUT_SPECIFICATION_LIMITATION_MAX)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:max], 'InputSpecificationLimitationMax')
  @max = HttpClient::Preconditions.assert_class('max', opts.delete(:max), Integer)
end

Instance Attribute Details

#maxObject (readonly)

Returns the value of attribute max.



36217
36218
36219
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36217

def max
  @max
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



36230
36231
36232
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36230

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

#subtype_to_hashObject



36234
36235
36236
36237
36238
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36234

def subtype_to_hash
  {
    :max => max
  }
end

#to_jsonObject



36226
36227
36228
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36226

def to_json
  JSON.dump(to_hash)
end