class UltracartClient::ItemGoogleProductSearch

Attributes

adwords_grouping[RW]

Adwords grouping

adwords_label1[RW]

Adwords label 1

adwords_label2[RW]

Adwords label 2

adwords_label3[RW]

Adwords label 3

adwords_label4[RW]

Adwords label 4

adwords_label5[RW]

Adwords label 5

age_group[RW]

Age group

available_at_physical_store[RW]

Available at physical store

book_author[RW]

Book - author

book_format[RW]

Book - format

book_isbn[RW]

Bood - ISBN

book_publisher[RW]

Book - publisher

category_description[RW]

Category description

color[RW]

Color

condition[RW]

Condition

custom_label0[RW]

Custom label 0

custom_label1[RW]

Custom label 1

custom_label2[RW]

Custom label 2

custom_label3[RW]

Custom label 3

custom_label4[RW]

Custom label 4

gender[RW]

Gender

google_product_category[RW]

Google product category

music_artist[RW]

Music - artist

music_format[RW]

Music - format

music_release_date[RW]

Music - release date

omit_from_feed[RW]

Omit from feed

product_type[RW]

Product type

promotion_id1[RW]

Promotion ID 1

promotion_id10[RW]

Promotion ID 10

promotion_id2[RW]

Promotion ID 2

promotion_id3[RW]

Promotion ID 3

promotion_id4[RW]

Promotion ID 4

promotion_id5[RW]

Promotion ID 5

promotion_id6[RW]

Promotion ID 6

promotion_id7[RW]

Promotion ID 7

promotion_id8[RW]

Promotion ID 8

promotion_id9[RW]

Promotion ID 9

search_dts[RW]

Search date/time

search_lowest_price[RW]

Search lowest price

search_lowest_url[RW]

Search lowest URL

search_position[RW]

Search position

shipping_label[RW]
size[RW]

Size

video_director[RW]

Video - director

video_format[RW]

Video - format

video_rating[RW]

Video - rating

video_release_date[RW]

Video - release date

video_starring[RW]

Video - starring

Public Class Methods

attribute_map() click to toggle source

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
new(attributes = {}) click to toggle source

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
swagger_types() click to toggle source

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

==(o) click to toggle source

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
_deserialize(type, value) click to toggle source

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
_to_hash(value) click to toggle source

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
adwords_grouping=(adwords_grouping) click to toggle source

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
adwords_label1=(adwords_label1) click to toggle source

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
adwords_label2=(adwords_label2) click to toggle source

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
adwords_label3=(adwords_label3) click to toggle source

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
adwords_label4=(adwords_label4) click to toggle source

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
adwords_label5=(adwords_label5) click to toggle source

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
age_group=(age_group) click to toggle source

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
book_author=(book_author) click to toggle source

Custom attribute writer method with validation @param [Object] book_author Value to be assigned

# File lib/ultracart_api/models/item_google_product_search.rb, line 754
def book_author=(book_author)
  if !book_author.nil? && book_author.to_s.length > 50
    fail ArgumentError, 'invalid value for "book_author", the character length must be smaller than or equal to 50.'
  end

  @book_author = book_author
end
book_format=(book_format) click to toggle source

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
book_isbn=(book_isbn) click to toggle source

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
book_publisher=(book_publisher) click to toggle source

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
build_from_hash(attributes) click to toggle source

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
category_description=(category_description) click to toggle source

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
color=(color) click to toggle source

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
condition=(condition) click to toggle source

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_label0=(custom_label0) click to toggle source

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_label1=(custom_label1) click to toggle source

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_label2=(custom_label2) click to toggle source

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_label3=(custom_label3) click to toggle source

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_label4=(custom_label4) click to toggle source

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
eql?(o) click to toggle source

@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
gender=(gender) click to toggle source

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
google_product_category=(google_product_category) click to toggle source

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
hash() click to toggle source

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
list_invalid_properties() click to toggle source

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
music_artist=(music_artist) click to toggle source

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
music_format=(music_format) click to toggle source

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
product_type=(product_type) click to toggle source

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
promotion_id10=(promotion_id10) click to toggle source

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
promotion_id1=(promotion_id1) click to toggle source

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
promotion_id2=(promotion_id2) click to toggle source

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
promotion_id3=(promotion_id3) click to toggle source

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
promotion_id4=(promotion_id4) click to toggle source

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
promotion_id5=(promotion_id5) click to toggle source

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
promotion_id6=(promotion_id6) click to toggle source

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
promotion_id7=(promotion_id7) click to toggle source

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
promotion_id8=(promotion_id8) click to toggle source

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
promotion_id9=(promotion_id9) click to toggle source

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
search_lowest_url=(search_lowest_url) click to toggle source

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
size=(size) click to toggle source

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
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/ultracart_api/models/item_google_product_search.rb, line 1219
def to_body
  to_hash
end
to_hash() click to toggle source

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
to_s() click to toggle source

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
valid?() click to toggle source

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
video_director=(video_director) click to toggle source

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
video_format=(video_format) click to toggle source

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
video_rating=(video_rating) click to toggle source

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
video_starring=(video_starring) click to toggle source

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