class Spaceship::ConnectAPI::AgeRatingDeclaration
Constants
- LEGACY_AGE_RATING_ITC_MAP
- LEGACY_BOOLEAN_VALUE_ITC_MAP
- LEGACY_RATING_VALUE_ITC_MAP
Attributes
alcohol_tobacco_or_drug_use_or_references[RW]
contests[RW]
gambling[RW]
Boolean
gambling_and_contests[RW]
Deprecated as of App
Store Connect API 1.3
gambling_simulated[RW]
horror_or_fear_themes[RW]
kids_age_band[RW]
mature_or_suggestive_themes[RW]
medical_or_treatment_information[RW]
profanity_or_crude_humor[RW]
seventeen_plus[RW]
sexual_content_graphic_and_nudity[RW]
sexual_content_or_nudity[RW]
unrestricted_web_access[RW]
violence_cartoon_or_fantasy[RW]
violence_realistic[RW]
violence_realistic_prolonged_graphic_or_sadistic[RW]
Public Class Methods
map_deprecation_if_possible(attributes)
click to toggle source
# File spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb, line 97 def self.map_deprecation_if_possible(attributes) attributes = attributes.dup messages = [] errors = [] value = attributes.delete('gamblingAndContests') return attributes, messages, errors if value.nil? messages << "Age Rating 'gamblingAndContests' has been deprecated and split into 'gambling' and 'contests'" attributes['gambling'] = value if value == true errors << "'gamblingAndContests' could not be mapped to 'contests' - 'contests' requires a value of 'NONE', 'INFREQUENT_OR_MILD', or 'FREQUENT_OR_INTENSE'" attributes['contests'] = value else attributes['contests'] = 'NONE' end return attributes, messages, errors end
map_key_from_itc(key)
click to toggle source
# File spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb, line 118 def self.map_key_from_itc(key) key = key.gsub("MZGenre.", "") return nil if key.empty? LEGACY_AGE_RATING_ITC_MAP[key] || key end
map_value_from_itc(key, value)
click to toggle source
# File spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb, line 124 def self.map_value_from_itc(key, value) if ["gamblingAndContests", "unrestrictedWebAccess"].include?(key) new_value = LEGACY_BOOLEAN_VALUE_ITC_MAP[value] return value if new_value.nil? return new_value else return LEGACY_RATING_VALUE_ITC_MAP[value] || value end return value end
type()
click to toggle source
# File spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb, line 66 def self.type return "ageRatingDeclarations" end
Public Instance Methods
update(client: nil, attributes: nil)
click to toggle source
API
# File spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb, line 140 def update(client: nil, attributes: nil) client ||= Spaceship::ConnectAPI attributes = reverse_attr_mapping(attributes) client.patch_age_rating_declaration(age_rating_declaration_id: id, attributes: attributes) end