b0VIM 8.1C`l?joshJoshs-Mac-mini.local~josh/Projects/fastlane/fastlane/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rbutf-8 3210#"! Utp`2aad`vuf' _( U - ,  c 8 7 # ] 7   m K  [ N^)qJ@?:T WqH@? def self.map_deprecation_if_possible(attributes) } 1 => true 0 => false, LEGACY_BOOLEAN_VALUE_ITC_MAP = { } 2 => Rating::FREQUENT_OR_INTENSE 1 => Rating::INFREQUENT_OR_MILD, 0 => Rating::NONE, LEGACY_RATING_VALUE_ITC_MAP = { } "GAMBLING_CONTESTS" => "gamblingAndContests" "UNRESTRICTED_WEB_ACCESS" => "unrestrictedWebAccess", "GRAPHIC_SEXUAL_CONTENT_NUDITY" => "sexualContentGraphicAndNudity", "SEXUAL_CONTENT_NUDITY" => "sexualContentOrNudity", "GAMBLING" => "gamblingSimulated", "ALCOHOL_TOBACCO_DRUGS" => "alcoholTobaccoOrDrugUseOrReferences", "MEDICAL_TREATMENT_INFO" => "medicalOrTreatmentInformation", "HORROR" => "horrorOrFearThemes", "MATURE_SUGGESTIVE" => "matureOrSuggestiveThemes", "PROFANITY_CRUDE_HUMOR" => "profanityOrCrudeHumor", "PROLONGED_GRAPHIC_SADISTIC_REALISTIC_VIOLENCE" => "violenceRealisticProlongedGraphicOrSadistic", "REALISTIC_VIOLENCE" => "violenceRealistic", "CARTOON_FANTASY_VIOLENCE" => "violenceCartoonOrFantasy", LEGACY_AGE_RATING_ITC_MAP = { end return "ageRatingDeclarations" def self.type }) "gamblingAndContests" => "gambling_and_contests", # Deprecated as of App Store Connect API 1.3 "kidsAgeBand" => "kids_age_band", "violenceRealistic" => "violence_realistic", "violenceRealisticProlongedGraphicOrSadistic" => "violence_realistic_prolonged_graphic_or_sadistic", "violenceCartoonOrFantasy" => "violence_cartoon_or_fantasy", "unrestrictedWebAccess" => "unrestricted_web_access", "matureOrSuggestiveThemes" => "mature_or_suggestive_themes", "horrorOrFearThemes" => "horror_or_fear_themes", "sexualContentOrNudity" => "sexual_content_or_nudity", "sexualContentGraphicAndNudity" => "sexual_content_graphic_and_nudity", "seventeenPlus" => "seventeen_plus", "profanityOrCrudeHumor" => "profanity_or_crude_humor", "medicalOrTreatmentInformation" => "medical_or_treatment_information", "gamblingSimulated" => "gambling_simulated", "gambling" => "gambling", "contests" => "contests", "alcoholTobaccoOrDrugUseOrReferences" => "alcohol_tobacco_or_drug_use_or_references", attr_mapping({ end NINE_TO_ELEVEN = "NINE_TO_ELEVEN" SIX_TO_EIGHT = "SIX_TO_EIGHT" FIVE_AND_UNDER = "FIVE_AND_UNDER" module KidsAge end FREQUENT_OR_INTENSE = "FREQUENT_OR_INTENSE" INFREQUENT_OR_MILD = "INFREQUENT_OR_MILD" NONE = "NONE" module Rating attr_accessor :gambling_and_contests # Deprecated as of App Store Connect API 1.3 attr_accessor :kids_age_band # KidsAge attr_accessor :unrestricted_web_access attr_accessor :seventeen_plus # Boolean attr_accessor :violence_realistic attr_accessor :violence_realistic_prolonged_graphic_or_sadistic attr_accessor :violence_cartoon_or_fantasy attr_accessor :mature_or_suggestive_themes attr_accessor :horror_or_fear_themes attr_accessor :sexual_content_graphic_and_nudity attr_accessor :profanity_or_crude_humor attr_accessor :medical_or_treatment_information attr_accessor :gambling_simulated attr_accessor :gambling attr_accessor :contests attr_accessor :alcohol_tobacco_or_drug_use_or_references # Rating include Spaceship::ConnectAPI::Model class AgeRatingDeclaration class ConnectAPImodule Spaceshiprequire_relative '../model'ad  2x>= v u I ? >  j X L K 6 , + #        eend end end end client.patch_age_rating_declaration(age_rating_declaration_id: id, attributes: attributes) attributes = reverse_attr_mapping(attributes) client ||= Spaceship::ConnectAPI def update(client: nil, attributes: nil) # # API # end return value end return LEGACY_RATING_VALUE_ITC_MAP[value] || value else return new_value return value if new_value.nil? new_value = LEGACY_BOOLEAN_VALUE_ITC_MAP[value] if ["gamblingAndContests", "unrestrictedWebAccess"].include?(key) def self.map_value_from_itc(key, value) end LEGACY_AGE_RATING_ITC_MAP[key] || key return nil if key.empty? key = key.gsub("MZGenre.", "") def self.map_key_from_itc(key) end return attributes, messages, errors end attributes['contests'] = 'NONE' else attributes['contests'] = value errors << "'gamblingAndContests' could not be mapped to 'contests' - 'contests' requires a value of 'NONE', 'INFREQUENT_OR_MILD', or 'FREQUENT_OR_INTENSE'" if value == true attributes['gambling'] = value messages << "Age Rating 'gamblingAndContests' has been deprecated and split into 'gambling' and 'contests'" return attributes, messages, errors if value.nil? value = attributes.delete('gamblingAndContests') errors = [] messages = [] attributes = attributes.dup