lib/patch_ruby/models/order.rb in patch_ruby-1.11.1 vs lib/patch_ruby/models/order.rb in patch_ruby-1.12.0

- old
+ new

@@ -16,10 +16,13 @@ module Patch class Order # A unique uid for the record. UIDs will be prepended by ord_prod or ord_test depending on the mode it was created in. attr_accessor :id + # The timestamp at which the order was created + attr_accessor :created_at + # The amount of carbon offsets in grams purchased through this order. attr_accessor :mass_g # A boolean indicating if this order is a production or test mode order. attr_accessor :production @@ -69,10 +72,11 @@ # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'id' => :'id', + :'created_at' => :'created_at', :'mass_g' => :'mass_g', :'production' => :'production', :'state' => :'state', :'allocation_state' => :'allocation_state', :'price_cents_usd' => :'price_cents_usd', @@ -90,10 +94,11 @@ # Attribute type mapping. def self.openapi_types { :'id' => :'String', + :'created_at' => :'Time', :'mass_g' => :'Integer', :'production' => :'Boolean', :'state' => :'String', :'allocation_state' => :'String', :'price_cents_usd' => :'Integer', @@ -141,10 +146,14 @@ if attributes.key?(:'id') self.id = attributes[:'id'] end + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + if attributes.key?(:'mass_g') self.mass_g = attributes[:'mass_g'] end if attributes.key?(:'production') @@ -286,10 +295,11 @@ # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && + created_at == o.created_at && mass_g == o.mass_g && production == o.production && state == o.state && allocation_state == o.allocation_state && price_cents_usd == o.price_cents_usd && @@ -306,10 +316,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, mass_g, production, state, allocation_state, price_cents_usd, patch_fee_cents_usd, allocations, registry_url, metadata].hash + [id, created_at, mass_g, production, state, allocation_state, price_cents_usd, patch_fee_cents_usd, allocations, registry_url, metadata].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself