lib/hubspot/codegen/marketing/transactional/models/error.rb in hubspot-api-client-17.2.0 vs lib/hubspot/codegen/marketing/transactional/models/error.rb in hubspot-api-client-18.0.0

- old
+ new

@@ -1,7 +1,7 @@ =begin -#Transactional Email +#Transactional Single Send #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v3 @@ -15,41 +15,41 @@ module Hubspot module Marketing module Transactional class Error - # A human readable message describing the error along with remediation steps where appropriate - attr_accessor :message + # A specific category that contains more specific detail about the error + attr_accessor :sub_category + # Context about the error condition + attr_accessor :context + # A unique identifier for the request. Include this value with any error reports or support tickets attr_accessor :correlation_id + # A map of link names to associated URIs containing documentation about the error or recommended remediation steps + attr_accessor :links + + # A human readable message describing the error along with remediation steps where appropriate + attr_accessor :message + # The error category attr_accessor :category - # A specific category that contains more specific detail about the error - attr_accessor :sub_category - # further information about the error attr_accessor :errors - # Context about the error condition - attr_accessor :context - - # A map of link names to associated URIs containing documentation about the error or recommended remediation steps - attr_accessor :links - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'message' => :'message', - :'correlation_id' => :'correlationId', - :'category' => :'category', :'sub_category' => :'subCategory', - :'errors' => :'errors', :'context' => :'context', - :'links' => :'links' + :'correlation_id' => :'correlationId', + :'links' => :'links', + :'message' => :'message', + :'category' => :'category', + :'errors' => :'errors' } end # Returns all the JSON keys this model knows about def self.acceptable_attributes @@ -57,17 +57,17 @@ end # Attribute type mapping. def self.openapi_types { - :'message' => :'String', - :'correlation_id' => :'String', - :'category' => :'String', :'sub_category' => :'String', - :'errors' => :'Array<ErrorDetail>', :'context' => :'Hash<String, Array<String>>', - :'links' => :'Hash<String, String>' + :'correlation_id' => :'String', + :'links' => :'Hash<String, String>', + :'message' => :'String', + :'category' => :'String', + :'errors' => :'Array<ErrorDetail>' } end # List of attributes with nullable: true def self.openapi_nullable @@ -88,85 +88,85 @@ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Marketing::Transactional::Error`. 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?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'correlation_id') - self.correlation_id = attributes[:'correlation_id'] - end - - if attributes.key?(:'category') - self.category = attributes[:'category'] - end - if attributes.key?(:'sub_category') self.sub_category = attributes[:'sub_category'] end - if attributes.key?(:'errors') - if (value = attributes[:'errors']).is_a?(Array) - self.errors = value - end - end - if attributes.key?(:'context') if (value = attributes[:'context']).is_a?(Hash) self.context = value end end + if attributes.key?(:'correlation_id') + self.correlation_id = attributes[:'correlation_id'] + end + if attributes.key?(:'links') if (value = attributes[:'links']).is_a?(Hash) self.links = value end end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'category') + self.category = attributes[:'category'] + end + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + 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 @message.nil? - invalid_properties.push('invalid value for "message", message cannot be nil.') - end - if @correlation_id.nil? invalid_properties.push('invalid value for "correlation_id", correlation_id cannot be nil.') end + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + if @category.nil? invalid_properties.push('invalid value for "category", category 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 @message.nil? return false if @correlation_id.nil? + return false if @message.nil? return false if @category.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 && - message == o.message && - correlation_id == o.correlation_id && - category == o.category && sub_category == o.sub_category && - errors == o.errors && context == o.context && - links == o.links + correlation_id == o.correlation_id && + links == o.links && + message == o.message && + category == o.category && + errors == o.errors end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -174,10 +174,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [message, correlation_id, category, sub_category, errors, context, links].hash + [sub_category, context, correlation_id, links, message, category, errors].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself