Method: AmznSpApi::AplusContentApiModel::PostContentDocumentAsinRelationsResponse#initialize

Defined in:
lib/aplus_content_api_model/models/post_content_document_asin_relations_response.rb

#initialize(attributes = {}) ⇒ PostContentDocumentAsinRelationsResponse

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Raises:

  • (ArgumentError)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/aplus_content_api_model/models/post_content_document_asin_relations_response.rb', line 37

def initialize(attributes = {})
  raise ArgumentError, 'The input argument (attributes) must be a hash in `AmznSpApi::AplusContentApiModel::PostContentDocumentAsinRelationsResponse` initialize method' unless attributes.is_a?(Hash)

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) do |(k, v), h|
    raise ArgumentError, "`#{k}` is not a valid attribute in `AmznSpApi::AplusContentApiModel::PostContentDocumentAsinRelationsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym)

    h[k.to_sym] = v
  end

  # call parent's initialize
  super(attributes)

  return unless attributes.key?(:warnings)

  self.warnings = attributes[:warnings]
end