lib/patch_ruby/models/order.rb in patch_ruby-2.0.0 vs lib/patch_ruby/models/order.rb in patch_ruby-2.1.1

- old
+ new

@@ -40,11 +40,11 @@ attr_accessor :patch_fee # The currency code for the `price` and `patch_fee`. attr_accessor :currency - # The url of this order in the public registry. + # The URL of this order in the public registry. Use this URL to access the order's accompanying certificate. attr_accessor :registry_url # An optional JSON object containing metadata for this order. attr_accessor :metadata @@ -228,12 +228,12 @@ if @amount.nil? invalid_properties.push('invalid value for "amount", amount cannot be nil.') end - if @amount > 100000000000 - invalid_properties.push('invalid value for "amount", must be smaller than or equal to 100000000000.') + if @amount > 100000000000000 + invalid_properties.push('invalid value for "amount", must be smaller than or equal to 100000000000000.') end if @amount < 0 invalid_properties.push('invalid value for "amount", must be greater than or equal to 0.') end @@ -268,11 +268,11 @@ return false if @production.nil? return false if @state.nil? state_validator = EnumAttributeValidator.new('String', ["draft", "reserved", "placed", "processing", "complete", "cancelled"]) return false unless state_validator.valid?(@state) return false if @amount.nil? - return false if @amount > 100000000000 + return false if @amount > 100000000000000 return false if @amount < 0 return false if @unit.nil? return false if @price.nil? return false if @patch_fee.nil? return false if @currency.nil? @@ -295,11 +295,11 @@ def amount=(amount) if amount.nil? fail ArgumentError, 'amount cannot be nil' end - if amount > 100000000000 - fail ArgumentError, 'invalid value for "amount", must be smaller than or equal to 100000000000.' + if amount > 100000000000000 + fail ArgumentError, 'invalid value for "amount", must be smaller than or equal to 100000000000000.' end if amount < 0 fail ArgumentError, 'invalid value for "amount", must be greater than or equal to 0.' end