class UltracartClient::ItemGoogleProductSearch
Attributes
Adwords grouping
Adwords label 1
Adwords label 2
Adwords label 3
Adwords label 4
Adwords label 5
Age group
Available at physical store
Book - format
Bood - ISBN
Book - publisher
Category description
Color
Condition
Custom label 0
Custom label 1
Custom label 2
Custom label 3
Custom label 4
Gender
Google product category
Music - artist
Music - format
Music - release date
Omit from feed
Product type
Promotion ID 1
Promotion ID 10
Promotion ID 2
Promotion ID 3
Promotion ID 4
Promotion ID 5
Promotion ID 6
Promotion ID 7
Promotion ID 8
Promotion ID 9
Search date/time
Search lowest price
Search lowest URL
Search position
Size
Video - director
Video - format
Video - rating
Video - release date
Video - starring
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/ultracart_api/models/item_google_product_search.rb, line 161 def self.attribute_map { :'adwords_grouping' => :'adwords_grouping', :'adwords_label1' => :'adwords_label1', :'adwords_label2' => :'adwords_label2', :'adwords_label3' => :'adwords_label3', :'adwords_label4' => :'adwords_label4', :'adwords_label5' => :'adwords_label5', :'age_group' => :'age_group', :'available_at_physical_store' => :'available_at_physical_store', :'book_author' => :'book_author', :'book_format' => :'book_format', :'book_isbn' => :'book_isbn', :'book_publisher' => :'book_publisher', :'category_description' => :'category_description', :'color' => :'color', :'condition' => :'condition', :'custom_label0' => :'custom_label0', :'custom_label1' => :'custom_label1', :'custom_label2' => :'custom_label2', :'custom_label3' => :'custom_label3', :'custom_label4' => :'custom_label4', :'gender' => :'gender', :'google_product_category' => :'google_product_category', :'music_artist' => :'music_artist', :'music_format' => :'music_format', :'music_release_date' => :'music_release_date', :'omit_from_feed' => :'omit_from_feed', :'product_type' => :'product_type', :'promotion_id1' => :'promotion_id1', :'promotion_id10' => :'promotion_id10', :'promotion_id2' => :'promotion_id2', :'promotion_id3' => :'promotion_id3', :'promotion_id4' => :'promotion_id4', :'promotion_id5' => :'promotion_id5', :'promotion_id6' => :'promotion_id6', :'promotion_id7' => :'promotion_id7', :'promotion_id8' => :'promotion_id8', :'promotion_id9' => :'promotion_id9', :'search_dts' => :'search_dts', :'search_lowest_price' => :'search_lowest_price', :'search_lowest_url' => :'search_lowest_url', :'search_position' => :'search_position', :'shipping_label' => :'shippingLabel', :'size' => :'size', :'video_director' => :'video_director', :'video_format' => :'video_format', :'video_rating' => :'video_rating', :'video_release_date' => :'video_release_date', :'video_starring' => :'video_starring' } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/ultracart_api/models/item_google_product_search.rb, line 270 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'adwords_grouping') self.adwords_grouping = attributes[:'adwords_grouping'] end if attributes.has_key?(:'adwords_label1') self.adwords_label1 = attributes[:'adwords_label1'] end if attributes.has_key?(:'adwords_label2') self.adwords_label2 = attributes[:'adwords_label2'] end if attributes.has_key?(:'adwords_label3') self.adwords_label3 = attributes[:'adwords_label3'] end if attributes.has_key?(:'adwords_label4') self.adwords_label4 = attributes[:'adwords_label4'] end if attributes.has_key?(:'adwords_label5') self.adwords_label5 = attributes[:'adwords_label5'] end if attributes.has_key?(:'age_group') self.age_group = attributes[:'age_group'] end if attributes.has_key?(:'available_at_physical_store') self.available_at_physical_store = attributes[:'available_at_physical_store'] end if attributes.has_key?(:'book_author') self.book_author = attributes[:'book_author'] end if attributes.has_key?(:'book_format') self.book_format = attributes[:'book_format'] end if attributes.has_key?(:'book_isbn') self.book_isbn = attributes[:'book_isbn'] end if attributes.has_key?(:'book_publisher') self.book_publisher = attributes[:'book_publisher'] end if attributes.has_key?(:'category_description') self.category_description = attributes[:'category_description'] end if attributes.has_key?(:'color') self.color = attributes[:'color'] end if attributes.has_key?(:'condition') self.condition = attributes[:'condition'] end if attributes.has_key?(:'custom_label0') self.custom_label0 = attributes[:'custom_label0'] end if attributes.has_key?(:'custom_label1') self.custom_label1 = attributes[:'custom_label1'] end if attributes.has_key?(:'custom_label2') self.custom_label2 = attributes[:'custom_label2'] end if attributes.has_key?(:'custom_label3') self.custom_label3 = attributes[:'custom_label3'] end if attributes.has_key?(:'custom_label4') self.custom_label4 = attributes[:'custom_label4'] end if attributes.has_key?(:'gender') self.gender = attributes[:'gender'] end if attributes.has_key?(:'google_product_category') self.google_product_category = attributes[:'google_product_category'] end if attributes.has_key?(:'music_artist') self.music_artist = attributes[:'music_artist'] end if attributes.has_key?(:'music_format') self.music_format = attributes[:'music_format'] end if attributes.has_key?(:'music_release_date') self.music_release_date = attributes[:'music_release_date'] end if attributes.has_key?(:'omit_from_feed') self.omit_from_feed = attributes[:'omit_from_feed'] end if attributes.has_key?(:'product_type') self.product_type = attributes[:'product_type'] end if attributes.has_key?(:'promotion_id1') self.promotion_id1 = attributes[:'promotion_id1'] end if attributes.has_key?(:'promotion_id10') self.promotion_id10 = attributes[:'promotion_id10'] end if attributes.has_key?(:'promotion_id2') self.promotion_id2 = attributes[:'promotion_id2'] end if attributes.has_key?(:'promotion_id3') self.promotion_id3 = attributes[:'promotion_id3'] end if attributes.has_key?(:'promotion_id4') self.promotion_id4 = attributes[:'promotion_id4'] end if attributes.has_key?(:'promotion_id5') self.promotion_id5 = attributes[:'promotion_id5'] end if attributes.has_key?(:'promotion_id6') self.promotion_id6 = attributes[:'promotion_id6'] end if attributes.has_key?(:'promotion_id7') self.promotion_id7 = attributes[:'promotion_id7'] end if attributes.has_key?(:'promotion_id8') self.promotion_id8 = attributes[:'promotion_id8'] end if attributes.has_key?(:'promotion_id9') self.promotion_id9 = attributes[:'promotion_id9'] end if attributes.has_key?(:'search_dts') self.search_dts = attributes[:'search_dts'] end if attributes.has_key?(:'search_lowest_price') self.search_lowest_price = attributes[:'search_lowest_price'] end if attributes.has_key?(:'search_lowest_url') self.search_lowest_url = attributes[:'search_lowest_url'] end if attributes.has_key?(:'search_position') self.search_position = attributes[:'search_position'] end if attributes.has_key?(:'shippingLabel') self.shipping_label = attributes[:'shippingLabel'] end if attributes.has_key?(:'size') self.size = attributes[:'size'] end if attributes.has_key?(:'video_director') self.video_director = attributes[:'video_director'] end if attributes.has_key?(:'video_format') self.video_format = attributes[:'video_format'] end if attributes.has_key?(:'video_rating') self.video_rating = attributes[:'video_rating'] end if attributes.has_key?(:'video_release_date') self.video_release_date = attributes[:'video_release_date'] end if attributes.has_key?(:'video_starring') self.video_starring = attributes[:'video_starring'] end end
Attribute type mapping.
# File lib/ultracart_api/models/item_google_product_search.rb, line 215 def self.swagger_types { :'adwords_grouping' => :'String', :'adwords_label1' => :'String', :'adwords_label2' => :'String', :'adwords_label3' => :'String', :'adwords_label4' => :'String', :'adwords_label5' => :'String', :'age_group' => :'String', :'available_at_physical_store' => :'BOOLEAN', :'book_author' => :'String', :'book_format' => :'String', :'book_isbn' => :'String', :'book_publisher' => :'String', :'category_description' => :'String', :'color' => :'String', :'condition' => :'String', :'custom_label0' => :'String', :'custom_label1' => :'String', :'custom_label2' => :'String', :'custom_label3' => :'String', :'custom_label4' => :'String', :'gender' => :'String', :'google_product_category' => :'String', :'music_artist' => :'String', :'music_format' => :'String', :'music_release_date' => :'String', :'omit_from_feed' => :'BOOLEAN', :'product_type' => :'String', :'promotion_id1' => :'String', :'promotion_id10' => :'String', :'promotion_id2' => :'String', :'promotion_id3' => :'String', :'promotion_id4' => :'String', :'promotion_id5' => :'String', :'promotion_id6' => :'String', :'promotion_id7' => :'String', :'promotion_id8' => :'String', :'promotion_id9' => :'String', :'search_dts' => :'String', :'search_lowest_price' => :'Float', :'search_lowest_url' => :'String', :'search_position' => :'Integer', :'shipping_label' => :'String', :'size' => :'String', :'video_director' => :'String', :'video_format' => :'String', :'video_rating' => :'String', :'video_release_date' => :'String', :'video_starring' => :'String' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/ultracart_api/models/item_google_product_search.rb, line 1084 def ==(o) return true if self.equal?(o) self.class == o.class && adwords_grouping == o.adwords_grouping && adwords_label1 == o.adwords_label1 && adwords_label2 == o.adwords_label2 && adwords_label3 == o.adwords_label3 && adwords_label4 == o.adwords_label4 && adwords_label5 == o.adwords_label5 && age_group == o.age_group && available_at_physical_store == o.available_at_physical_store && book_author == o.book_author && book_format == o.book_format && book_isbn == o.book_isbn && book_publisher == o.book_publisher && category_description == o.category_description && color == o.color && condition == o.condition && custom_label0 == o.custom_label0 && custom_label1 == o.custom_label1 && custom_label2 == o.custom_label2 && custom_label3 == o.custom_label3 && custom_label4 == o.custom_label4 && gender == o.gender && google_product_category == o.google_product_category && music_artist == o.music_artist && music_format == o.music_format && music_release_date == o.music_release_date && omit_from_feed == o.omit_from_feed && product_type == o.product_type && promotion_id1 == o.promotion_id1 && promotion_id10 == o.promotion_id10 && promotion_id2 == o.promotion_id2 && promotion_id3 == o.promotion_id3 && promotion_id4 == o.promotion_id4 && promotion_id5 == o.promotion_id5 && promotion_id6 == o.promotion_id6 && promotion_id7 == o.promotion_id7 && promotion_id8 == o.promotion_id8 && promotion_id9 == o.promotion_id9 && search_dts == o.search_dts && search_lowest_price == o.search_lowest_price && search_lowest_url == o.search_lowest_url && search_position == o.search_position && shipping_label == o.shipping_label && size == o.size && video_director == o.video_director && video_format == o.video_format && video_rating == o.video_rating && video_release_date == o.video_release_date && video_starring == o.video_starring end
Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data
# File lib/ultracart_api/models/item_google_product_search.rb, line 1173 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = UltracartClient.const_get(type).new temp_model.build_from_hash(value) end end
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/ultracart_api/models/item_google_product_search.rb, line 1239 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end
Custom attribute writer method with validation @param [Object] adwords_grouping
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 684 def adwords_grouping=(adwords_grouping) if !adwords_grouping.nil? && adwords_grouping.to_s.length > 50 fail ArgumentError, 'invalid value for "adwords_grouping", the character length must be smaller than or equal to 50.' end @adwords_grouping = adwords_grouping end
Custom attribute writer method with validation @param [Object] adwords_label1
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 694 def adwords_label1=(adwords_label1) if !adwords_label1.nil? && adwords_label1.to_s.length > 50 fail ArgumentError, 'invalid value for "adwords_label1", the character length must be smaller than or equal to 50.' end @adwords_label1 = adwords_label1 end
Custom attribute writer method with validation @param [Object] adwords_label2
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 704 def adwords_label2=(adwords_label2) if !adwords_label2.nil? && adwords_label2.to_s.length > 50 fail ArgumentError, 'invalid value for "adwords_label2", the character length must be smaller than or equal to 50.' end @adwords_label2 = adwords_label2 end
Custom attribute writer method with validation @param [Object] adwords_label3
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 714 def adwords_label3=(adwords_label3) if !adwords_label3.nil? && adwords_label3.to_s.length > 50 fail ArgumentError, 'invalid value for "adwords_label3", the character length must be smaller than or equal to 50.' end @adwords_label3 = adwords_label3 end
Custom attribute writer method with validation @param [Object] adwords_label4
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 724 def adwords_label4=(adwords_label4) if !adwords_label4.nil? && adwords_label4.to_s.length > 50 fail ArgumentError, 'invalid value for "adwords_label4", the character length must be smaller than or equal to 50.' end @adwords_label4 = adwords_label4 end
Custom attribute writer method with validation @param [Object] adwords_label5
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 734 def adwords_label5=(adwords_label5) if !adwords_label5.nil? && adwords_label5.to_s.length > 50 fail ArgumentError, 'invalid value for "adwords_label5", the character length must be smaller than or equal to 50.' end @adwords_label5 = adwords_label5 end
Custom attribute writer method with validation @param [Object] age_group
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 744 def age_group=(age_group) if !age_group.nil? && age_group.to_s.length > 5 fail ArgumentError, 'invalid value for "age_group", the character length must be smaller than or equal to 5.' end @age_group = age_group end
Custom attribute writer method with validation @param [Object] book_format
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 764 def book_format=(book_format) if !book_format.nil? && book_format.to_s.length > 50 fail ArgumentError, 'invalid value for "book_format", the character length must be smaller than or equal to 50.' end @book_format = book_format end
Custom attribute writer method with validation @param [Object] book_isbn
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 774 def book_isbn=(book_isbn) if !book_isbn.nil? && book_isbn.to_s.length > 20 fail ArgumentError, 'invalid value for "book_isbn", the character length must be smaller than or equal to 20.' end @book_isbn = book_isbn end
Custom attribute writer method with validation @param [Object] book_publisher
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 784 def book_publisher=(book_publisher) if !book_publisher.nil? && book_publisher.to_s.length > 50 fail ArgumentError, 'invalid value for "book_publisher", the character length must be smaller than or equal to 50.' end @book_publisher = book_publisher end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/ultracart_api/models/item_google_product_search.rb, line 1152 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end
Custom attribute writer method with validation @param [Object] category_description
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 794 def category_description=(category_description) if !category_description.nil? && category_description.to_s.length > 1000 fail ArgumentError, 'invalid value for "category_description", the character length must be smaller than or equal to 1000.' end @category_description = category_description end
Custom attribute writer method with validation @param [Object] color Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 804 def color=(color) if !color.nil? && color.to_s.length > 20 fail ArgumentError, 'invalid value for "color", the character length must be smaller than or equal to 20.' end @color = color end
Custom attribute writer method with validation @param [Object] condition Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 814 def condition=(condition) if !condition.nil? && condition.to_s.length > 15 fail ArgumentError, 'invalid value for "condition", the character length must be smaller than or equal to 15.' end @condition = condition end
Custom attribute writer method with validation @param [Object] custom_label0
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 824 def custom_label0=(custom_label0) if !custom_label0.nil? && custom_label0.to_s.length > 50 fail ArgumentError, 'invalid value for "custom_label0", the character length must be smaller than or equal to 50.' end @custom_label0 = custom_label0 end
Custom attribute writer method with validation @param [Object] custom_label1
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 834 def custom_label1=(custom_label1) if !custom_label1.nil? && custom_label1.to_s.length > 50 fail ArgumentError, 'invalid value for "custom_label1", the character length must be smaller than or equal to 50.' end @custom_label1 = custom_label1 end
Custom attribute writer method with validation @param [Object] custom_label2
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 844 def custom_label2=(custom_label2) if !custom_label2.nil? && custom_label2.to_s.length > 50 fail ArgumentError, 'invalid value for "custom_label2", the character length must be smaller than or equal to 50.' end @custom_label2 = custom_label2 end
Custom attribute writer method with validation @param [Object] custom_label3
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 854 def custom_label3=(custom_label3) if !custom_label3.nil? && custom_label3.to_s.length > 50 fail ArgumentError, 'invalid value for "custom_label3", the character length must be smaller than or equal to 50.' end @custom_label3 = custom_label3 end
Custom attribute writer method with validation @param [Object] custom_label4
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 864 def custom_label4=(custom_label4) if !custom_label4.nil? && custom_label4.to_s.length > 50 fail ArgumentError, 'invalid value for "custom_label4", the character length must be smaller than or equal to 50.' end @custom_label4 = custom_label4 end
@see the `==` method @param [Object] Object to be compared
# File lib/ultracart_api/models/item_google_product_search.rb, line 1139 def eql?(o) self == o end
Custom attribute writer method with validation @param [Object] gender Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 874 def gender=(gender) if !gender.nil? && gender.to_s.length > 6 fail ArgumentError, 'invalid value for "gender", the character length must be smaller than or equal to 6.' end @gender = gender end
Custom attribute writer method with validation @param [Object] google_product_category
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 884 def google_product_category=(google_product_category) if !google_product_category.nil? && google_product_category.to_s.length > 250 fail ArgumentError, 'invalid value for "google_product_category", the character length must be smaller than or equal to 250.' end @google_product_category = google_product_category end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/ultracart_api/models/item_google_product_search.rb, line 1145 def hash [adwords_grouping, adwords_label1, adwords_label2, adwords_label3, adwords_label4, adwords_label5, age_group, available_at_physical_store, book_author, book_format, book_isbn, book_publisher, category_description, color, condition, custom_label0, custom_label1, custom_label2, custom_label3, custom_label4, gender, google_product_category, music_artist, music_format, music_release_date, omit_from_feed, product_type, promotion_id1, promotion_id10, promotion_id2, promotion_id3, promotion_id4, promotion_id5, promotion_id6, promotion_id7, promotion_id8, promotion_id9, search_dts, search_lowest_price, search_lowest_url, search_position, shipping_label, size, video_director, video_format, video_rating, video_release_date, video_starring].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
# File lib/ultracart_api/models/item_google_product_search.rb, line 471 def list_invalid_properties invalid_properties = Array.new if !@adwords_grouping.nil? && @adwords_grouping.to_s.length > 50 invalid_properties.push('invalid value for "adwords_grouping", the character length must be smaller than or equal to 50.') end if !@adwords_label1.nil? && @adwords_label1.to_s.length > 50 invalid_properties.push('invalid value for "adwords_label1", the character length must be smaller than or equal to 50.') end if !@adwords_label2.nil? && @adwords_label2.to_s.length > 50 invalid_properties.push('invalid value for "adwords_label2", the character length must be smaller than or equal to 50.') end if !@adwords_label3.nil? && @adwords_label3.to_s.length > 50 invalid_properties.push('invalid value for "adwords_label3", the character length must be smaller than or equal to 50.') end if !@adwords_label4.nil? && @adwords_label4.to_s.length > 50 invalid_properties.push('invalid value for "adwords_label4", the character length must be smaller than or equal to 50.') end if !@adwords_label5.nil? && @adwords_label5.to_s.length > 50 invalid_properties.push('invalid value for "adwords_label5", the character length must be smaller than or equal to 50.') end if !@age_group.nil? && @age_group.to_s.length > 5 invalid_properties.push('invalid value for "age_group", the character length must be smaller than or equal to 5.') end if !@book_author.nil? && @book_author.to_s.length > 50 invalid_properties.push('invalid value for "book_author", the character length must be smaller than or equal to 50.') end if !@book_format.nil? && @book_format.to_s.length > 50 invalid_properties.push('invalid value for "book_format", the character length must be smaller than or equal to 50.') end if !@book_isbn.nil? && @book_isbn.to_s.length > 20 invalid_properties.push('invalid value for "book_isbn", the character length must be smaller than or equal to 20.') end if !@book_publisher.nil? && @book_publisher.to_s.length > 50 invalid_properties.push('invalid value for "book_publisher", the character length must be smaller than or equal to 50.') end if !@category_description.nil? && @category_description.to_s.length > 1000 invalid_properties.push('invalid value for "category_description", the character length must be smaller than or equal to 1000.') end if !@color.nil? && @color.to_s.length > 20 invalid_properties.push('invalid value for "color", the character length must be smaller than or equal to 20.') end if !@condition.nil? && @condition.to_s.length > 15 invalid_properties.push('invalid value for "condition", the character length must be smaller than or equal to 15.') end if !@custom_label0.nil? && @custom_label0.to_s.length > 50 invalid_properties.push('invalid value for "custom_label0", the character length must be smaller than or equal to 50.') end if !@custom_label1.nil? && @custom_label1.to_s.length > 50 invalid_properties.push('invalid value for "custom_label1", the character length must be smaller than or equal to 50.') end if !@custom_label2.nil? && @custom_label2.to_s.length > 50 invalid_properties.push('invalid value for "custom_label2", the character length must be smaller than or equal to 50.') end if !@custom_label3.nil? && @custom_label3.to_s.length > 50 invalid_properties.push('invalid value for "custom_label3", the character length must be smaller than or equal to 50.') end if !@custom_label4.nil? && @custom_label4.to_s.length > 50 invalid_properties.push('invalid value for "custom_label4", the character length must be smaller than or equal to 50.') end if !@gender.nil? && @gender.to_s.length > 6 invalid_properties.push('invalid value for "gender", the character length must be smaller than or equal to 6.') end if !@google_product_category.nil? && @google_product_category.to_s.length > 250 invalid_properties.push('invalid value for "google_product_category", the character length must be smaller than or equal to 250.') end if !@music_artist.nil? && @music_artist.to_s.length > 50 invalid_properties.push('invalid value for "music_artist", the character length must be smaller than or equal to 50.') end if !@music_format.nil? && @music_format.to_s.length > 5 invalid_properties.push('invalid value for "music_format", the character length must be smaller than or equal to 5.') end if !@product_type.nil? && @product_type.to_s.length > 10 invalid_properties.push('invalid value for "product_type", the character length must be smaller than or equal to 10.') end if !@promotion_id1.nil? && @promotion_id1.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id1", the character length must be smaller than or equal to 30.') end if !@promotion_id10.nil? && @promotion_id10.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id10", the character length must be smaller than or equal to 30.') end if !@promotion_id2.nil? && @promotion_id2.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id2", the character length must be smaller than or equal to 30.') end if !@promotion_id3.nil? && @promotion_id3.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id3", the character length must be smaller than or equal to 30.') end if !@promotion_id4.nil? && @promotion_id4.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id4", the character length must be smaller than or equal to 30.') end if !@promotion_id5.nil? && @promotion_id5.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id5", the character length must be smaller than or equal to 30.') end if !@promotion_id6.nil? && @promotion_id6.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id6", the character length must be smaller than or equal to 30.') end if !@promotion_id7.nil? && @promotion_id7.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id7", the character length must be smaller than or equal to 30.') end if !@promotion_id8.nil? && @promotion_id8.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id8", the character length must be smaller than or equal to 30.') end if !@promotion_id9.nil? && @promotion_id9.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id9", the character length must be smaller than or equal to 30.') end if !@search_lowest_url.nil? && @search_lowest_url.to_s.length > 250 invalid_properties.push('invalid value for "search_lowest_url", the character length must be smaller than or equal to 250.') end if !@size.nil? && @size.to_s.length > 20 invalid_properties.push('invalid value for "size", the character length must be smaller than or equal to 20.') end if !@video_director.nil? && @video_director.to_s.length > 50 invalid_properties.push('invalid value for "video_director", the character length must be smaller than or equal to 50.') end if !@video_format.nil? && @video_format.to_s.length > 5 invalid_properties.push('invalid value for "video_format", the character length must be smaller than or equal to 5.') end if !@video_rating.nil? && @video_rating.to_s.length > 5 invalid_properties.push('invalid value for "video_rating", the character length must be smaller than or equal to 5.') end if !@video_starring.nil? && @video_starring.to_s.length > 150 invalid_properties.push('invalid value for "video_starring", the character length must be smaller than or equal to 150.') end invalid_properties end
Custom attribute writer method with validation @param [Object] music_artist
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 894 def music_artist=(music_artist) if !music_artist.nil? && music_artist.to_s.length > 50 fail ArgumentError, 'invalid value for "music_artist", the character length must be smaller than or equal to 50.' end @music_artist = music_artist end
Custom attribute writer method with validation @param [Object] music_format
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 904 def music_format=(music_format) if !music_format.nil? && music_format.to_s.length > 5 fail ArgumentError, 'invalid value for "music_format", the character length must be smaller than or equal to 5.' end @music_format = music_format end
Custom attribute writer method with validation @param [Object] product_type
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 914 def product_type=(product_type) if !product_type.nil? && product_type.to_s.length > 10 fail ArgumentError, 'invalid value for "product_type", the character length must be smaller than or equal to 10.' end @product_type = product_type end
Custom attribute writer method with validation @param [Object] promotion_id10
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 934 def promotion_id10=(promotion_id10) if !promotion_id10.nil? && promotion_id10.to_s.length > 30 fail ArgumentError, 'invalid value for "promotion_id10", the character length must be smaller than or equal to 30.' end @promotion_id10 = promotion_id10 end
Custom attribute writer method with validation @param [Object] promotion_id1
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 924 def promotion_id1=(promotion_id1) if !promotion_id1.nil? && promotion_id1.to_s.length > 30 fail ArgumentError, 'invalid value for "promotion_id1", the character length must be smaller than or equal to 30.' end @promotion_id1 = promotion_id1 end
Custom attribute writer method with validation @param [Object] promotion_id2
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 944 def promotion_id2=(promotion_id2) if !promotion_id2.nil? && promotion_id2.to_s.length > 30 fail ArgumentError, 'invalid value for "promotion_id2", the character length must be smaller than or equal to 30.' end @promotion_id2 = promotion_id2 end
Custom attribute writer method with validation @param [Object] promotion_id3
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 954 def promotion_id3=(promotion_id3) if !promotion_id3.nil? && promotion_id3.to_s.length > 30 fail ArgumentError, 'invalid value for "promotion_id3", the character length must be smaller than or equal to 30.' end @promotion_id3 = promotion_id3 end
Custom attribute writer method with validation @param [Object] promotion_id4
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 964 def promotion_id4=(promotion_id4) if !promotion_id4.nil? && promotion_id4.to_s.length > 30 fail ArgumentError, 'invalid value for "promotion_id4", the character length must be smaller than or equal to 30.' end @promotion_id4 = promotion_id4 end
Custom attribute writer method with validation @param [Object] promotion_id5
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 974 def promotion_id5=(promotion_id5) if !promotion_id5.nil? && promotion_id5.to_s.length > 30 fail ArgumentError, 'invalid value for "promotion_id5", the character length must be smaller than or equal to 30.' end @promotion_id5 = promotion_id5 end
Custom attribute writer method with validation @param [Object] promotion_id6
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 984 def promotion_id6=(promotion_id6) if !promotion_id6.nil? && promotion_id6.to_s.length > 30 fail ArgumentError, 'invalid value for "promotion_id6", the character length must be smaller than or equal to 30.' end @promotion_id6 = promotion_id6 end
Custom attribute writer method with validation @param [Object] promotion_id7
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 994 def promotion_id7=(promotion_id7) if !promotion_id7.nil? && promotion_id7.to_s.length > 30 fail ArgumentError, 'invalid value for "promotion_id7", the character length must be smaller than or equal to 30.' end @promotion_id7 = promotion_id7 end
Custom attribute writer method with validation @param [Object] promotion_id8
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 1004 def promotion_id8=(promotion_id8) if !promotion_id8.nil? && promotion_id8.to_s.length > 30 fail ArgumentError, 'invalid value for "promotion_id8", the character length must be smaller than or equal to 30.' end @promotion_id8 = promotion_id8 end
Custom attribute writer method with validation @param [Object] promotion_id9
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 1014 def promotion_id9=(promotion_id9) if !promotion_id9.nil? && promotion_id9.to_s.length > 30 fail ArgumentError, 'invalid value for "promotion_id9", the character length must be smaller than or equal to 30.' end @promotion_id9 = promotion_id9 end
Custom attribute writer method with validation @param [Object] search_lowest_url
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 1024 def search_lowest_url=(search_lowest_url) if !search_lowest_url.nil? && search_lowest_url.to_s.length > 250 fail ArgumentError, 'invalid value for "search_lowest_url", the character length must be smaller than or equal to 250.' end @search_lowest_url = search_lowest_url end
Custom attribute writer method with validation @param [Object] size Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 1034 def size=(size) if !size.nil? && size.to_s.length > 20 fail ArgumentError, 'invalid value for "size", the character length must be smaller than or equal to 20.' end @size = size end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/ultracart_api/models/item_google_product_search.rb, line 1225 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end
Returns the string representation of the object @return [String] String presentation of the object
# File lib/ultracart_api/models/item_google_product_search.rb, line 1213 def to_s to_hash.to_s end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/ultracart_api/models/item_google_product_search.rb, line 638 def valid? return false if !@adwords_grouping.nil? && @adwords_grouping.to_s.length > 50 return false if !@adwords_label1.nil? && @adwords_label1.to_s.length > 50 return false if !@adwords_label2.nil? && @adwords_label2.to_s.length > 50 return false if !@adwords_label3.nil? && @adwords_label3.to_s.length > 50 return false if !@adwords_label4.nil? && @adwords_label4.to_s.length > 50 return false if !@adwords_label5.nil? && @adwords_label5.to_s.length > 50 return false if !@age_group.nil? && @age_group.to_s.length > 5 return false if !@book_author.nil? && @book_author.to_s.length > 50 return false if !@book_format.nil? && @book_format.to_s.length > 50 return false if !@book_isbn.nil? && @book_isbn.to_s.length > 20 return false if !@book_publisher.nil? && @book_publisher.to_s.length > 50 return false if !@category_description.nil? && @category_description.to_s.length > 1000 return false if !@color.nil? && @color.to_s.length > 20 return false if !@condition.nil? && @condition.to_s.length > 15 return false if !@custom_label0.nil? && @custom_label0.to_s.length > 50 return false if !@custom_label1.nil? && @custom_label1.to_s.length > 50 return false if !@custom_label2.nil? && @custom_label2.to_s.length > 50 return false if !@custom_label3.nil? && @custom_label3.to_s.length > 50 return false if !@custom_label4.nil? && @custom_label4.to_s.length > 50 return false if !@gender.nil? && @gender.to_s.length > 6 return false if !@google_product_category.nil? && @google_product_category.to_s.length > 250 return false if !@music_artist.nil? && @music_artist.to_s.length > 50 return false if !@music_format.nil? && @music_format.to_s.length > 5 return false if !@product_type.nil? && @product_type.to_s.length > 10 return false if !@promotion_id1.nil? && @promotion_id1.to_s.length > 30 return false if !@promotion_id10.nil? && @promotion_id10.to_s.length > 30 return false if !@promotion_id2.nil? && @promotion_id2.to_s.length > 30 return false if !@promotion_id3.nil? && @promotion_id3.to_s.length > 30 return false if !@promotion_id4.nil? && @promotion_id4.to_s.length > 30 return false if !@promotion_id5.nil? && @promotion_id5.to_s.length > 30 return false if !@promotion_id6.nil? && @promotion_id6.to_s.length > 30 return false if !@promotion_id7.nil? && @promotion_id7.to_s.length > 30 return false if !@promotion_id8.nil? && @promotion_id8.to_s.length > 30 return false if !@promotion_id9.nil? && @promotion_id9.to_s.length > 30 return false if !@search_lowest_url.nil? && @search_lowest_url.to_s.length > 250 return false if !@size.nil? && @size.to_s.length > 20 return false if !@video_director.nil? && @video_director.to_s.length > 50 return false if !@video_format.nil? && @video_format.to_s.length > 5 return false if !@video_rating.nil? && @video_rating.to_s.length > 5 return false if !@video_starring.nil? && @video_starring.to_s.length > 150 true end
Custom attribute writer method with validation @param [Object] video_director
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 1044 def video_director=(video_director) if !video_director.nil? && video_director.to_s.length > 50 fail ArgumentError, 'invalid value for "video_director", the character length must be smaller than or equal to 50.' end @video_director = video_director end
Custom attribute writer method with validation @param [Object] video_format
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 1054 def video_format=(video_format) if !video_format.nil? && video_format.to_s.length > 5 fail ArgumentError, 'invalid value for "video_format", the character length must be smaller than or equal to 5.' end @video_format = video_format end
Custom attribute writer method with validation @param [Object] video_rating
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 1064 def video_rating=(video_rating) if !video_rating.nil? && video_rating.to_s.length > 5 fail ArgumentError, 'invalid value for "video_rating", the character length must be smaller than or equal to 5.' end @video_rating = video_rating end
Custom attribute writer method with validation @param [Object] video_starring
Value to be assigned
# File lib/ultracart_api/models/item_google_product_search.rb, line 1074 def video_starring=(video_starring) if !video_starring.nil? && video_starring.to_s.length > 150 fail ArgumentError, 'invalid value for "video_starring", the character length must be smaller than or equal to 150.' end @video_starring = video_starring end