lib/patch_ruby/models/order.rb in patch_ruby-1.16.1 vs lib/patch_ruby/models/order.rb in patch_ruby-1.17.0
- old
+ new
@@ -37,11 +37,11 @@
attr_accessor :price_cents_usd
# The Patch Fee in cents USD for this order.
attr_accessor :patch_fee_cents_usd
- # An array containing the inventory allocations for this order.
+ # DEPRECATED. An array containing the inventory allocations for this order.
attr_accessor :allocations
# The url of this order in the public registry.
attr_accessor :registry_url
@@ -221,14 +221,10 @@
if @allocation_state.nil?
invalid_properties.push('invalid value for "allocation_state", allocation_state cannot be nil.')
end
- if @allocations.nil?
- invalid_properties.push('invalid value for "allocations", allocations cannot be nil.')
- end
-
if @metadata.nil?
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
end
invalid_properties
@@ -246,10 +242,9 @@
state_validator = EnumAttributeValidator.new('String', ["draft", "placed", "processing", "complete", "cancelled"])
return false unless state_validator.valid?(@state)
return false if @allocation_state.nil?
allocation_state_validator = EnumAttributeValidator.new('String', ["pending", "allocated"])
return false unless allocation_state_validator.valid?(@allocation_state)
- return false if @allocations.nil?
return false if @metadata.nil?
true
end
# Custom attribute writer method with validation