Method: OpenapiClient::ShipmentItem#list_invalid_properties

Defined in:
lib/openapi_client/models/shipment_item.rb

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/openapi_client/models/shipment_item.rb', line 140

def list_invalid_properties
  invalid_properties = Array.new
  if !@name.nil? && @name.to_s.length < 0
    invalid_properties.push('invalid value for "name", the character length must be great than or equal to 0.')
  end

  if !@quantity.nil? && @quantity < 0
    invalid_properties.push('invalid value for "quantity", must be greater than or equal to 0.')
  end

  if !@asin.nil? && @asin.to_s.length > 10
    invalid_properties.push('invalid value for "asin", the character length must be smaller than or equal to 10.')
  end

  if !@asin.nil? && @asin.to_s.length < 10
    invalid_properties.push('invalid value for "asin", the character length must be great than or equal to 10.')
  end

  invalid_properties
end