lib/patch_ruby/models/estimate.rb in patch_ruby-1.2.4 vs lib/patch_ruby/models/estimate.rb in patch_ruby-1.2.5
- old
+ new
@@ -12,16 +12,20 @@
require 'date'
module Patch
class Estimate
+ # A unique uid for the record. UIDs will be prepended by est_prod or est_test depending on the mode it was created in.
attr_accessor :id
+ # A boolean indicating if this estimate is a production or test mode estimate.
attr_accessor :production
+ # The type of estimate. Currently mass is the only supported value.
attr_accessor :type
+ # An object returning the order associated with this estimate. See the [Order section](/?id=orders) for the full schema.
attr_accessor :order
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
@@ -40,10 +44,19 @@
:'type' => :'String',
:'order' => :'Order'
}
end
+ # Set with nullable attributes.
+ def self.openapi_nullable
+ nullable_properties = Set.new
+
+ nullable_properties.add("order")
+
+ nullable_properties
+ end
+
# Allows models with corresponding API classes to delegate API operations to those API classes
# Exposes Model.operation_id which delegates to ModelsApi.new.operation_id
# Eg. Order.create_order delegates to OrdersApi.new.create_order
def self.method_missing(message, *args, &block)
if Object.const_defined?('Patch::EstimatesApi::OPERATIONS') && Patch::EstimatesApi::OPERATIONS.include?(message)
@@ -224,10 +237,10 @@
value = self.send(attr)
if value.nil?
is_nullable = self.class.openapi_nullable.include?(attr)
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
end
-
+
hash[param] = _to_hash(value)
end
hash
end