lib/patch_ruby/models/order.rb in patch_ruby-1.22.0 vs lib/patch_ruby/models/order.rb in patch_ruby-1.23.0

- old
+ new

@@ -22,11 +22,11 @@ attr_accessor :created_at # DEPRECATED, use `amount` and `unit` fields instead. 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. + # A boolean indicating if this order is a production or demo mode order. attr_accessor :production # The current state of the order. attr_accessor :state @@ -64,10 +64,12 @@ attr_accessor :metadata # An array containing the inventory allocated for this order. Inventory is grouped by project, vintage year, and price. attr_accessor :inventory + attr_accessor :issued_to + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values def initialize(datatype, allowable_values) @@ -105,11 +107,12 @@ :'price_cents_usd' => :'price_cents_usd', :'patch_fee_cents_usd' => :'patch_fee_cents_usd', :'allocations' => :'allocations', :'registry_url' => :'registry_url', :'metadata' => :'metadata', - :'inventory' => :'inventory' + :'inventory' => :'inventory', + :'issued_to' => :'issued_to' } end # Returns all the JSON keys this model knows about def self.acceptable_attributes @@ -133,11 +136,12 @@ :'price_cents_usd' => :'Integer', :'patch_fee_cents_usd' => :'Integer', :'allocations' => :'Array<Allocation>', :'registry_url' => :'String', :'metadata' => :'Object', - :'inventory' => :'Array<OrderInventory>' + :'inventory' => :'Array<OrderInventory>', + :'issued_to' => :'IssuedTo' } end # List of attributes with nullable: true def self.openapi_nullable @@ -243,10 +247,14 @@ if attributes.key?(:'inventory') if (value = attributes[:'inventory']).is_a?(Array) self.inventory = value end end + + if attributes.key?(:'issued_to') + self.issued_to = attributes[:'issued_to'] + end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties @@ -414,11 +422,12 @@ price_cents_usd == o.price_cents_usd && patch_fee_cents_usd == o.patch_fee_cents_usd && allocations == o.allocations && registry_url == o.registry_url && metadata == o.metadata && - inventory == o.inventory + inventory == o.inventory && + issued_to == o.issued_to end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -426,10 +435,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created_at, mass_g, production, state, amount, unit, price, patch_fee, currency, allocation_state, price_cents_usd, patch_fee_cents_usd, allocations, registry_url, metadata, inventory].hash + [id, created_at, mass_g, production, state, amount, unit, price, patch_fee, currency, allocation_state, price_cents_usd, patch_fee_cents_usd, allocations, registry_url, metadata, inventory, issued_to].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself