lib/algolia/models/ingestion/source_commercetools.rb in algolia-3.0.0.alpha.7 vs lib/algolia/models/ingestion/source_commercetools.rb in algolia-3.0.0.alpha.8

- old
+ new

@@ -16,18 +16,21 @@ attr_accessor :project_key # Determines the value that will be stored in the Algolia record if there's no inventory information on the product. attr_accessor :fallback_is_in_stock_value + attr_accessor :custom_fields + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :store_keys => :storeKeys, :locales => :locales, :url => :url, :project_key => :projectKey, - :fallback_is_in_stock_value => :fallbackIsInStockValue + :fallback_is_in_stock_value => :fallbackIsInStockValue, + :custom_fields => :customFields } end # Returns all the JSON keys this model knows about def self.acceptable_attributes @@ -39,11 +42,12 @@ { :store_keys => :'Array<String>', :locales => :'Array<String>', :url => :String, :project_key => :String, - :fallback_is_in_stock_value => :Boolean + :fallback_is_in_stock_value => :Boolean, + :custom_fields => :CommercetoolsCustomFields } end # List of attributes with nullable: true def self.openapi_nullable @@ -92,10 +96,14 @@ end if attributes.key?(:fallback_is_in_stock_value) self.fallback_is_in_stock_value = attributes[:fallback_is_in_stock_value] end + + if attributes.key?(:custom_fields) + self.custom_fields = attributes[:custom_fields] + end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(other) @@ -104,11 +112,12 @@ self.class == other.class && store_keys == other.store_keys && locales == other.locales && url == other.url && project_key == other.project_key && - fallback_is_in_stock_value == other.fallback_is_in_stock_value + fallback_is_in_stock_value == other.fallback_is_in_stock_value && + custom_fields == other.custom_fields end # @see the `==` method # @param [Object] Object to be compared def eql?(other) @@ -116,10 +125,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [store_keys, locales, url, project_key, fallback_is_in_stock_value].hash + [store_keys, locales, url, project_key, fallback_is_in_stock_value, custom_fields].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself