lib/hubspot/codegen/crm/pipelines/models/pipeline.rb in hubspot-api-client-17.2.0 vs lib/hubspot/codegen/crm/pipelines/models/pipeline.rb in hubspot-api-client-18.0.0

- old
+ new

@@ -1,7 +1,7 @@ =begin -#CRM Pipelines +#Pipelines #Pipelines represent distinct stages in a workflow, like closing a deal or servicing a support ticket. These endpoints provide access to read and modify pipelines in HubSpot. Pipelines support `deals` and `tickets` object types. ## Pipeline ID validation When calling endpoints that take pipelineId as a parameter, that ID must correspond to an existing, un-archived pipeline. Otherwise the request will fail with a `404 Not Found` response. The version of the OpenAPI document: v3 @@ -15,45 +15,45 @@ module Hubspot module Crm module Pipelines class Pipeline - # A unique label used to organize pipelines in HubSpot's UI - attr_accessor :label + # The date the pipeline was created. The default pipelines will have createdAt = 0. + attr_accessor :created_at + # The date the pipeline was archived. `archivedAt` will only be present if the pipeline is archived. + attr_accessor :archived_at + + # Whether the pipeline is archived. + attr_accessor :archived + # The order for displaying this pipeline. If two pipelines have a matching `displayOrder`, they will be sorted alphabetically by label. attr_accessor :display_order - # A unique identifier generated by HubSpot that can be used to retrieve and update the pipeline. - attr_accessor :id - # The stages associated with the pipeline. They can be retrieved and updated via the pipeline stages endpoints. attr_accessor :stages - # The date the pipeline was created. The default pipelines will have createdAt = 0. - attr_accessor :created_at + # A unique label used to organize pipelines in HubSpot's UI + attr_accessor :label - # The date the pipeline was archived. `archivedAt` will only be present if the pipeline is archived. - attr_accessor :archived_at + # A unique identifier generated by HubSpot that can be used to retrieve and update the pipeline. + attr_accessor :id # The date the pipeline was last updated. attr_accessor :updated_at - # Whether the pipeline is archived. - attr_accessor :archived - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'label' => :'label', - :'display_order' => :'displayOrder', - :'id' => :'id', - :'stages' => :'stages', :'created_at' => :'createdAt', :'archived_at' => :'archivedAt', - :'updated_at' => :'updatedAt', - :'archived' => :'archived' + :'archived' => :'archived', + :'display_order' => :'displayOrder', + :'stages' => :'stages', + :'label' => :'label', + :'id' => :'id', + :'updated_at' => :'updatedAt' } end # Returns all the JSON keys this model knows about def self.acceptable_attributes @@ -61,18 +61,18 @@ end # Attribute type mapping. def self.openapi_types { - :'label' => :'String', - :'display_order' => :'Integer', - :'id' => :'String', - :'stages' => :'Array<PipelineStage>', :'created_at' => :'Time', :'archived_at' => :'Time', - :'updated_at' => :'Time', - :'archived' => :'Boolean' + :'archived' => :'Boolean', + :'display_order' => :'Integer', + :'stages' => :'Array<PipelineStage>', + :'label' => :'String', + :'id' => :'String', + :'updated_at' => :'Time' } end # List of attributes with nullable: true def self.openapi_nullable @@ -93,106 +93,106 @@ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Pipelines::Pipeline`. 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?(:'label') - self.label = attributes[:'label'] + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] end - if attributes.key?(:'display_order') - self.display_order = attributes[:'display_order'] + if attributes.key?(:'archived_at') + self.archived_at = attributes[:'archived_at'] end - if attributes.key?(:'id') - self.id = attributes[:'id'] + if attributes.key?(:'archived') + self.archived = attributes[:'archived'] end + if attributes.key?(:'display_order') + self.display_order = attributes[:'display_order'] + end + if attributes.key?(:'stages') if (value = attributes[:'stages']).is_a?(Array) self.stages = value end end - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] + if attributes.key?(:'label') + self.label = attributes[:'label'] end - if attributes.key?(:'archived_at') - self.archived_at = attributes[:'archived_at'] + if attributes.key?(:'id') + self.id = attributes[:'id'] end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end - - if attributes.key?(:'archived') - self.archived = attributes[:'archived'] - 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 @label.nil? - invalid_properties.push('invalid value for "label", label cannot be nil.') + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end + if @archived.nil? + invalid_properties.push('invalid value for "archived", archived cannot be nil.') + end + if @display_order.nil? invalid_properties.push('invalid value for "display_order", display_order cannot be nil.') end - if @id.nil? - invalid_properties.push('invalid value for "id", id cannot be nil.') - end - if @stages.nil? invalid_properties.push('invalid value for "stages", stages cannot be nil.') end - if @created_at.nil? - invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + if @label.nil? + invalid_properties.push('invalid value for "label", label cannot be nil.') end + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end - if @archived.nil? - invalid_properties.push('invalid value for "archived", archived 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 @label.nil? + return false if @created_at.nil? + return false if @archived.nil? return false if @display_order.nil? - return false if @id.nil? return false if @stages.nil? - return false if @created_at.nil? + return false if @label.nil? + return false if @id.nil? return false if @updated_at.nil? - return false if @archived.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 && - label == o.label && - display_order == o.display_order && - id == o.id && - stages == o.stages && created_at == o.created_at && archived_at == o.archived_at && - updated_at == o.updated_at && - archived == o.archived + archived == o.archived && + display_order == o.display_order && + stages == o.stages && + label == o.label && + id == o.id && + updated_at == o.updated_at end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -200,10 +200,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [label, display_order, id, stages, created_at, archived_at, updated_at, archived].hash + [created_at, archived_at, archived, display_order, stages, label, id, updated_at].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself