"""Keep configuration information for available countries.""" import datetime import itertools from feed_ingestion.flows.amazon_music import config def only_countries(org_countries): """Extract countries and return as sorted list. Each country appears only once. """ countries_set = set() for countries in org_countries.values(): countries_set.update(countries) return sorted(list(countries_set)) def count_entries(org_countries): """Return number of entries.""" return len(list(itertools.chain(org_countries.values()))) def org_countries_for_date(licensor, report_name, the_date: datetime.date): """ Get countries to ingest for the date. Args: licensor (str): one of config.licensors report_name (str): The name of the report (e.g unlimited, prime). the_date (date): report date Returns: list: of countries codes """ assert isinstance(the_date, datetime.date), 'date should be datetime.date' return _lookup(licensor_report_rules[licensor][report_name], the_date) def _lookup(rules, lookup_date: datetime.date): target_rule = None for rule in rules: period_start_str = rule['since'] period_start = datetime.datetime.strptime( period_start_str, config.DATE_FORMAT).date() if period_start > lookup_date: break target_rule = rule if not target_rule: raise ValueError(f'No data for date {lookup_date}') return { org: countries.split(',') for org, countries in target_rule['config'].items() } sme_adsupported_rules = [ {'since': '2019-04-17', 'config': {'PRU0': 'US'}}, # noqa: E501 {'since': '2019-08-02', 'config': {'PRU0': 'DE,GB,US'}}, # noqa: E501 {'since': '2020-04-02', 'config': {'PRU0': 'DE,ES,FR,GB,IT,US'}}, # noqa: E501 {'since': '2020-04-13', 'config': {'PRU0': 'AT,DE,ES,FR,GB,IT,US'}}, # noqa: E501 {'since': '2020-05-05', 'config': {'PRU0': 'AT,AU,CA,DE,ES,FR,GB,IT,MX,US'}}, # noqa: E501 # prior to 2021-09-18 BR/JP were unstable {'since': '2021-09-18', 'config': {'PRU0': 'AT,AU,BR,CA,DE,ES,FR,GB,IT,MX,US', 'PUL3': 'JP'}}, # noqa: E501 {'since': '2021-11-12', 'config': {'PRU0': 'AR,AT,AU,BR,CA,CL,CO,DE,ES,FR,GB,IT,MX,US', 'PUL3': 'JP'}}, # noqa: E501 ] sme_prime_rules = [ {'since': '2017-06-30', 'config': {'PCO3': 'US', 'Q174': 'AT,DE,GB'}}, # noqa: E501 {'since': '2017-07-01', 'config': {'Q174': 'AT,DE,GB'}}, # noqa: E501 {'since': '2017-07-02', 'config': {'PCO3': 'US', 'Q174': 'AT,DE,GB'}}, # noqa: E501 # broken archive amazon/in/prime/2017/08/07/PCO3_A_US_20170807_20170807_Activity_20190116.txt.zip # noqa:E501 {'since': '2017-08-07', 'config': {'Q174': 'AT,DE,GB'}}, # noqa: E501 {'since': '2017-08-08', 'config': {'PCO3': 'US', 'Q174': 'AT,DE,GB'}}, # noqa: E501 # broken archive amazon/in/prime/2017/10/26/PCO3_A_US_20171026_20171026_Activity_20190116.txt.zip # noqa:E501 {'since': '2017-10-26', 'config': {'Q174': 'AT,DE,GB'}}, # noqa: E501 {'since': '2017-10-27', 'config': {'PCO3': 'US', 'Q174': 'AT,DE,GB'}}, # noqa: E501 {'since': '2017-11-15', 'config': {'PCO3': 'CA,US', 'Q174': 'AT,DE,GB'}}, # noqa: E501 # broken archive amazon/in/prime/2017/11/28/PCO3_A_US_20171128_20171128_Activity_20190116.txt.zip # noqa:E501 # broken archive amazon/in/prime/2017/11/29/PCO3_A_US_20171129_20171129_Activity_20190116.txt.zip # noqa:E501 {'since': '2017-11-28', 'config': {'PCO3': 'CA', 'Q174': 'AT,DE,GB'}}, # noqa: E501 {'since': '2017-11-30', 'config': {'PCO3': 'CA,US', 'Q174': 'AT,DE,GB'}}, # noqa: E501 # broken archive amazon/in/prime/2017/12/03/Q174_A_GB_20171203_20171203_Activity_20190116.txt.zip # noqa:E501 {'since': '2017-12-03', 'config': {'PCO3': 'CA,US', 'Q174': 'AT,DE'}}, # noqa: E501 {'since': '2017-12-04', 'config': {'PCO3': 'CA,US', 'Q174': 'AT,DE,GB'}}, # noqa: E501 # broken archive amazon/in/prime/2017/12/21/Q174_A_GB_20171221_20171221_Activity_20190116.txt.zip # noqa:E501 {'since': '2017-12-21', 'config': {'PCO3': 'CA,US', 'Q174': 'AT,DE'}}, # noqa: E501 # broken archive amazon/in/prime/2017/12/22/PCO3_A_US_20171222_20171222_Activity_20190116.txt.zip # noqa:E501 {'since': '2017-12-22', 'config': {'PCO3': 'CA', 'Q174': 'AT,DE,GB'}}, # noqa: E501 {'since': '2017-12-23', 'config': {'PCO3': 'CA,US', 'Q174': 'AT,DE,GB'}}, # noqa: E501 # not activity file amazon/in/prime/2018/03/05/PCO3_A_US_20180305_20180305_Activity_20190116.txt.zip # noqa:E501 {'since': '2018-03-05', 'config': {'PCO3': 'CA', 'Q174': 'AT,DE,GB'}}, # noqa: E501 {'since': '2018-03-06', 'config': {'PCO3': 'CA,US', 'Q174': 'AT,DE,GB'}}, # noqa: E501 # not activity file amazon/in/prime/2018/03/05/PCO3_A_US_20180305_20180305_Activity_20190116.txt.zip # noqa:E501 {'since': '2018-03-12', 'config': {'PCO3': 'CA', 'Q174': 'AT,DE,GB'}}, # noqa: E501 {'since': '2018-03-13', 'config': {'PCO3': 'CA,US', 'Q174': 'AT,DE,GB'}}, # noqa: E501 {'since': '2018-06-06', 'config': {'PCO3': 'CA,US', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 {'since': '2018-07-26', 'config': {'PCO3': 'CA,US', 'Q174': 'AT,DE,ES,FR,GB,IT,JP'}}, # noqa: E501 # broken archive amazon/in/prime/2018/09/18/PCO3_A_US_20180918_20180918_User_20180919.txt.zip # noqa:E501 {'since': '2018-09-18', 'config': {'PCO3': 'CA', 'Q174': 'AT,DE,ES,FR,GB,IT,JP'}}, # noqa: E501 {'since': '2018-09-19', 'config': {'PCO3': 'CA,US', 'Q174': 'AT,DE,ES,FR,GB,IT,JP'}}, # noqa: E501 {'since': '2018-10-18', 'config': {'PCO3': 'AU,CA,US', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,JP'}}, # noqa: E501 {'since': '2018-10-26', 'config': {'PCO3': 'AU,CA', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,JP'}}, # noqa: E501 {'since': '2018-10-27', 'config': {'PCO3': 'AU,CA,US', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,JP'}}, # noqa: E501 {'since': '2018-11-07', 'config': {'PCO3': 'AU,CA,MX,US', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,JP,MX'}}, # noqa: E501 # not activity file amazon/in/prime/2018/11/11/Q174_A_DE_20181111_20181111_Activity_20181112.txt.zip # noqa:E501 {'since': '2018-11-11', 'config': {'PCO3': 'AU,CA,MX,US', 'Q174': 'AT,AU,ES,FR,GB,IT,JP,MX'}}, # noqa: E501 {'since': '2018-11-12', 'config': {'PCO3': 'AU,CA,MX,US', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,JP,MX'}}, # noqa: E501 {'since': '2018-11-18', 'config': {'PCO3': 'CA,MX,US', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,JP,MX'}}, # noqa: E501 {'since': '2018-11-24', 'config': {'PCO3': 'AU,CA,MX,US', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,JP,MX'}}, # noqa: E501 {'since': '2018-12-01', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,JP,MX'}}, # noqa: E501 # broken archive amazon/in/prime/2018/12/05/PCO3_A_US_20181205_20181205_Activity_20190221.txt.zip # noqa: E501 {'since': '2018-12-05', 'config': {'PCO3': 'AU,CA,MX', 'PNE5': 'JP', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,MX'}}, # noqa: E501 {'since': '2018-12-06', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,JP,MX'}}, # noqa: E501 # missing file amazon/in/prime/2018/12/08/Q174_A_JP_20181208_20181208_User_Report.txt.zip # noqa: E501 {'since': '2018-12-08', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,MX'}}, # noqa: E501 {'since': '2018-12-09', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,AU,DE,ES,FR,GB,IT,JP,MX'}}, # noqa: E501 {'since': '2018-12-10', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT,JP'}}, # noqa: E501 # broke archive amazon/in/prime/2018/12/13/PCO3_A_US_20181213_20181213_Activity_20190221.txt.zip # noqa: E501 {'since': '2018-12-13', 'config': {'PCO3': 'AU,CA,MX', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT,JP'}}, # noqa: E501 {'since': '2018-12-14', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT,JP'}}, # noqa: E501 # missing files for amazon/in/prime/2019/01/13/Q174_A_JP* {'since': '2019-01-13', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 {'since': '2019-01-14', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT,JP'}}, # noqa: E501 {'since': '2019-01-16', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 # broken archive amazon/in/prime/2019/03/10/PCO3_A_CA_20190310_20190310_Activity_20190319.txt.zip # noqa: E501 {'since': '2019-03-10', 'config': {'PCO3': 'AU,MX,US', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 {'since': '2019-03-11', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 {'since': '2019-07-30', 'config': {'PCO3': 'CA,MX'}}, # noqa: E501 {'since': '2019-07-31', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 {'since': '2019-09-07', 'config': {'PCO3': 'AU,CA,MX,US', 'PMN9': 'IN', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 {'since': '2019-09-08', 'config': {'PCO3': 'AU,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 {'since': '2019-09-09', 'config': {'PCO3': 'AU,CA,MX,US', 'PMN9': 'IN', 'PNE5': 'JP', 'Q174': 'AT,BR,DE,ES,FR,GB,IT'}}, # noqa: E501 {'since': '2019-10-18', 'config': {'PCO3': 'AU,BR,CA,MX,US', 'PMN9': 'IN', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 # broken archive amazon/in/prime/2020/02/01/PCO3_A_US_20200201_20200201_Activity_20200214.txt.zip # noqa: E501 {'since': '2020-02-01', 'config': {'PCO3': 'AU,BR,CA,MX', 'PMN9': 'IN', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 {'since': '2020-02-02', 'config': {'PCO3': 'AU,BR,CA,MX,US', 'PMN9': 'IN', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 {'since': '2020-02-06', 'config': {'PCO3': 'AU,BR,CA,MX,US', 'PNE5': 'JP', 'Q174': 'AT,DE,ES,FR,GB,IT'}}, # noqa: E501 ] sme_unlimited_rules = [ {'since': '2017-10-30', 'config': {'PMN9': 'AT,DE,ES,FR,GB,IT,US'}}, # noqa: E501 {'since': '2017-10-31', 'config': {'PMN9': 'AT,DE,ES,FR,GB,IN,IT,US'}}, # noqa: E501 # amazon/in/musicunlimited/2017/11/03/PMN9_A_US_20171103_20171103_Activity_20181126.txt.zip File is not a zip file # noqa:E501 {'since': '2017-11-03', 'config': {'PMN9': 'AT,DE,ES,FR,GB,IN,IT'}}, # noqa: E501 {'since': '2017-11-04', 'config': {'PMN9': 'AT,DE,ES,FR,GB,IN,IT,US'}}, # noqa: E501 {'since': '2017-11-20', 'config': {'PMN9': 'AT,DE,IN'}}, # noqa: E501 {'since': '2017-12-06', 'config': {'PMN9': 'AT,DE,IN,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2018-01-25', 'config': {'PMN9': 'AT,AU,DE,IN,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2018-03-11', 'config': {'PMN9': 'AT,AU,DE,IN,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2018-03-12', 'config': {'PMN9': 'AT,AU,DE,IN,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2018-03-25', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2018-03-26', 'config': {'PMN9': 'AT,AU,DE,IN,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2018-03-31', 'config': {'PMN9': 'AT,AU,IN,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2018-04-01', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 # amazon/in/musicunlimited/2018/04/14/PMN9_A_DE_20180414_20180414_Activity_20190316.txt.zip list index out of range # noqa:E501 {'since': '2018-04-14', 'config': {'PMN9': 'AT,AU,ES,FR,GB,IN,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2018-04-15', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 # amazon/in/musicunlimited/2018/10/11/PMN9_A_US_20181011_20181011_Activity_20190316.txt.zip time data 'Enrique Iglesias [feat. Bad Bunny]' does not match format # noqa:E501 # amazon/in/musicunlimited/2018/10/11/PMN9_A_DE_20181011_20181011_Activity_20190321.txt.zip time data 'Enrique Iglesias [feat. Bad Bunny]' does not match format '%Y-%m-%d %H:%M:%S.%f' # noqa:E501 {'since': '2018-07-16', 'config': {'PMN9': 'AT,AU,ES,FR,GB,IN,IT,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2018-07-17', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 # amazon/in/musicunlimited/2018/08/09/PMN9_A_US_20180809_20180809_Activity_20190316.txt.zip list index out of range # noqa:E501 {'since': '2018-08-09', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2018-08-10', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 # amazon/in/musicunlimited/2018/10/11/PMN9_A_US_20181011_20181011_Activity_20190316.txt.zip time data 'A Pentatonix Christmas' does not match format '%Y-%m-%d %H:%M:%S' # noqa:E501 {'since': '2018-10-11', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2018-10-12', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 # amazon/in/musicunlimited/2018/11/28/PMN9_A_AT_20181128_20181128_Activity_20190316.txt.zip list index out of range # noqa:E501 {'since': '2018-11-28', 'config': {'PMN9': 'AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2018-11-29', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 # amazon/in/musicunlimited/2018/12/03/PMN9_A_US_20181203_20181203_Activity_20190316.txt.zip list index out of range # noqa:E501 {'since': '2018-12-03', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2018-12-04', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 # amazon/in/musicunlimited/2018/12/17/PMN9_A_DE_20181217_20181217_Activity_20190316.txt.zip list index out of range # noqa:E501 {'since': '2018-12-17', 'config': {'PMN9': 'AT,AU,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2018-12-18', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 # amazon/in/musicunlimited/2019/03/14/PMN9_A_US_20190314_20190314_Activity_20190320.txt.zip list index out of range # noqa:E501 {'since': '2019-03-14', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2019-03-15', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 # amazon/in/musicunlimited/2019/03/20/PMN9_A_US_20190320_20190320_Activity_20190321.txt.zip File is not a zip file # noqa:E501 {'since': '2019-03-20', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2019-03-21', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 # amazon/in/musicunlimited/2019/07/27/PMN9_A_US_20190727_20190727_Activity_20190728.txt.zip list index out of range # noqa:E501 {'since': '2019-07-27', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA'}}, # noqa: E501 {'since': '2019-07-28', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2019-11-21', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2019-11-22', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2019-11-26', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2020-02-05', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2020-03-24', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2020-03-25', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2020-05-05', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2020-05-06', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA,US'}}, # noqa: E501 {'since': '2021-09-10', 'config': {'PMN9': 'AT,AU,DE,ES,FR,GB,IN,IT,ROE_EU,ROW_NA,US', 'POQ6': 'JP'}}, # noqa: E501 ] theorchard_adsupported_rules = [ {'since': '2020-03-01', 'config': { 'ORCA': 'AT,AU,CA,DE,ES,FR,GB,IT,JP,MX,US', 'ORED': 'AT,AU,CA,DE,ES,FR,GB,IT,JP,MX,US', }}, {'since': '2021-11-09', 'config': { 'ORCA': 'AT,AU,BR,CA,CL,CO,DE,ES,FR,GB,IT,JP,MX,US', 'ORED': 'AT,AU,BR,CA,CL,CO,DE,ES,FR,GB,IT,JP,MX,US', }}, {'since': '2022-05-10', 'config': { 'ORCA': 'AR,AT,AU,BR,CA,CL,CO,DE,ES,FR,GB,IT,JP,MX,US', 'ORED': 'AT,AU,BR,CA,CL,CO,DE,ES,FR,GB,IT,JP,MX,US', }}, ] theorchard_prime_rules = [ {'since': '2020-03-01', 'config': { 'ORCA': 'AT,AU,BR,DE,ES,FR,GB,IT,US,JP,CA,IN,MX', 'ORED': 'AT,AU,BR,DE,ES,FR,GB,IT,US,JP,CA,IN,MX', }}, ] theorchard_unlimited_rules = [ {'since': '2020-03-01', 'config': { 'ORCA': 'AT,AU,DE,ES,FR,GB,IT,US,ROE_EU,ROW_NA', 'ORED': 'AT,AU,DE,ES,FR,GB,IT,US,ROE_EU,ROW_NA', }}, {'since': '2021-09-09', 'config': { 'ORCA': 'AT,AU,DE,ES,FR,GB,IT,US,ROE_EU,ROW_NA,JP', 'ORED': 'AT,AU,DE,ES,FR,GB,IT,US,ROE_EU,ROW_NA,JP', }}, ] awal_adsupported_rules = [ {'since': '2019-04-17', 'config': {'ZQAWA': 'US'}}, {'since': '2019-07-31', 'config': {'ZQAWA': 'DE,GB,US'}}, {'since': '2020-04-02', 'config': {'ZQAWA': 'DE,ES,FR,GB,IT,US'}}, {'since': '2020-04-13', 'config': {'ZQAWA': 'AT,DE,ES,FR,GB,IT,US'}}, {'since': '2020-05-05', 'config': { 'ZQAWA': 'AT,AU,CA,DE,ES,FR,GB,IT,MX,US'}}, {'since': '2020-05-13', 'config': { 'ZQAWA': 'AT,AU,CA,DE,ES,FR,GB,IT,MX,US,JP' }}, {'since': '2020-09-21', 'config': { 'ZQAWA': 'AT,AU,BR,CA,DE,ES,FR,GB,IT,MX,US,JP' }}, {'since': '2021-11-09', 'config': { 'ZQAWA': 'AT,AU,BR,CA,CL,CO,DE,ES,FR,GB,IT,MX,US,JP' }}, {'since': '2022-05-10', 'config': { 'ZQAWA': 'AR,AT,AU,BR,CA,CL,CO,DE,ES,FR,GB,IT,MX,US,JP' }}, ] awal_prime_rules = [ {'since': '2019-04-13', 'config': { 'ZQAWA': 'AT,AU,CA,DE,ES,FR,GB,IN,IT,JP,MX,US' }}, {'since': '2019-09-09', 'config': { 'ZQAWA': 'AT,AU,BR,CA,DE,ES,FR,GB,IN,IT,JP,MX,US'}}, ] awal_unlimited_rules = [ {'since': '2019-04-13', 'config': { 'ZQAWA': 'AT,AU,DE,ES,FR,GB,IT,JP,ROE_EU,ROW_NA,US', }}, ] altafonte_adsupported_rules = [ {'since': '2022-04-22', 'config': {'ZQALT': 'CL,CO'}}, {'since': '2022-04-23', 'config': {'ZQALT': 'AT,AU,CL,CO'}}, {'since': '2022-04-24', 'config': {'ZQALT': 'AT,AU,BR,CA,CL,CO,MX,US'}}, {'since': '2022-04-25', 'config': { 'ZQALT': 'AT,AU,BR,CA,CL,CO,DE,ES,FR,GB,IT,JP,MX,US'}}, {'since': '2022-05-10', 'config': { 'ZQALT': 'AR,AT,AU,BR,CA,CL,CO,DE,ES,FR,GB,IT,JP,MX,US' }}, ] altafonte_prime_rules = [ {'since': '2022-04-23', 'config': { 'ZQALT': 'AU,BR,CA,ES,FR,GB,IT,JP,MX,US' }}, {'since': '2022-04-25', 'config': { 'ZQALT': 'AT,AU,BR,CA,DE,ES,FR,GB,IN,IT,JP,MX,US'}}, ] altafonte_unlimited_rules = [ {'since': '2022-04-23', 'config': { 'ZQALT': 'AT,AU,DE,ES,FR,GB,IT,JP,ROE_EU,ROW_NA,US', }}, ] licensor_report_rules = { 'theorchard': { 'adsupported': theorchard_adsupported_rules, 'prime': theorchard_prime_rules, 'unlimited': theorchard_unlimited_rules, }, 'sme': { 'adsupported': sme_adsupported_rules, 'prime': sme_prime_rules, 'unlimited': sme_unlimited_rules, }, 'awal': { 'adsupported': awal_adsupported_rules, 'prime': awal_prime_rules, 'unlimited': awal_unlimited_rules, }, 'altafonte': { 'adsupported': altafonte_adsupported_rules, 'prime': altafonte_prime_rules, 'unlimited': altafonte_unlimited_rules, }, }