lib/hubspot/codegen/crm/owners/models/public_team.rb in hubspot-api-client-17.2.0 vs lib/hubspot/codegen/crm/owners/models/public_team.rb in hubspot-api-client-18.0.0

- old
+ new

@@ -1,7 +1,7 @@ =begin -#CRM Owners +#Crm Owners #HubSpot uses **owners** to assign CRM objects to specific people in your organization. The endpoints described here are used to get a list of the owners that are available for an account. To assign an owner to an object, set the hubspot_owner_id property using the appropriate CRM object update or create a request. If teams are available for your HubSpot tier, these endpoints will also indicate which team(s) an owner can access, as well as which team is the owner's primary team. The version of the OpenAPI document: v3 @@ -15,21 +15,21 @@ module Hubspot module Crm module Owners class PublicTeam - attr_accessor :id - attr_accessor :name + attr_accessor :id + attr_accessor :primary # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'id' => :'id', :'name' => :'name', + :'id' => :'id', :'primary' => :'primary' } end # Returns all the JSON keys this model knows about @@ -38,12 +38,12 @@ end # Attribute type mapping. def self.openapi_types { - :'id' => :'String', :'name' => :'String', + :'id' => :'String', :'primary' => :'Boolean' } end # List of attributes with nullable: true @@ -65,58 +65,58 @@ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Owners::PublicTeam`. 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?(:'id') - self.id = attributes[:'id'] - end - if attributes.key?(:'name') self.name = attributes[:'name'] end + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + if attributes.key?(:'primary') self.primary = attributes[:'primary'] 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 @id.nil? - invalid_properties.push('invalid value for "id", id cannot be nil.') - end - if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + if @primary.nil? invalid_properties.push('invalid value for "primary", primary 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 @id.nil? return false if @name.nil? + return false if @id.nil? return false if @primary.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 && - id == o.id && name == o.name && + id == o.id && primary == o.primary end # @see the `==` method # @param [Object] Object to be compared @@ -125,10 +125,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, name, primary].hash + [name, id, primary].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself