lib/hubspot/codegen/crm/tickets/models/public_merge_input.rb in hubspot-api-client-17.2.0 vs lib/hubspot/codegen/crm/tickets/models/public_merge_input.rb in hubspot-api-client-18.0.0

- old
+ new

@@ -15,19 +15,19 @@ module Hubspot module Crm module Tickets class PublicMergeInput - attr_accessor :primary_object_id - attr_accessor :object_id_to_merge + attr_accessor :primary_object_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'primary_object_id' => :'primaryObjectId', - :'object_id_to_merge' => :'objectIdToMerge' + :'object_id_to_merge' => :'objectIdToMerge', + :'primary_object_id' => :'primaryObjectId' } end # Returns all the JSON keys this model knows about def self.acceptable_attributes @@ -35,12 +35,12 @@ end # Attribute type mapping. def self.openapi_types { - :'primary_object_id' => :'String', - :'object_id_to_merge' => :'String' + :'object_id_to_merge' => :'String', + :'primary_object_id' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable @@ -61,49 +61,49 @@ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Tickets::PublicMergeInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'primary_object_id') - self.primary_object_id = attributes[:'primary_object_id'] - end - if attributes.key?(:'object_id_to_merge') self.object_id_to_merge = attributes[:'object_id_to_merge'] end + + if attributes.key?(:'primary_object_id') + self.primary_object_id = attributes[:'primary_object_id'] + 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 invalid_properties = Array.new - if @primary_object_id.nil? - invalid_properties.push('invalid value for "primary_object_id", primary_object_id cannot be nil.') - end - if @object_id_to_merge.nil? invalid_properties.push('invalid value for "object_id_to_merge", object_id_to_merge cannot be nil.') end + if @primary_object_id.nil? + invalid_properties.push('invalid value for "primary_object_id", primary_object_id cannot be nil.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @primary_object_id.nil? return false if @object_id_to_merge.nil? + return false if @primary_object_id.nil? true end # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && - primary_object_id == o.primary_object_id && - object_id_to_merge == o.object_id_to_merge + object_id_to_merge == o.object_id_to_merge && + primary_object_id == o.primary_object_id end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -111,10 +111,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [primary_object_id, object_id_to_merge].hash + [object_id_to_merge, primary_object_id].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself