Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing allowed countries. #804

Merged
merged 1 commit into from
Aug 9, 2023
Merged

Conversation

budzanowski
Copy link
Collaborator

Changes proposed in this Pull Request:

As mentioned in #803 the API response has more countries then the list used as fallback. This PR adds the missing countries.

Closes #803 .

Detailed test instructions:

  1. Setup debug trap for get_list_of_ads_supported_countries
  2. Connect the plugin, until the plugin gets connected the get_list_of_ads_supported_countries should use fallback
  3. After the connection that function should return the list from the API
  4. The lists should be the same.

Changelog entry

Update - Add missing countries to the allowed countries list.

@budzanowski budzanowski self-assigned this Aug 7, 2023
@github-actions github-actions bot added changelog: add A new feature, function, or functionality was added. type: enhancement The issue is a request for an enhancement. labels Aug 7, 2023
Copy link
Contributor

@ibndawood ibndawood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @budzanowski, for the PR. I followed the test instructions. I got this response:

{
  "status": "success",
  "code": 0,
  "message": "ok",
  "endpoint_name": "get_advertiser_countries_handler",
  "data": [
    {
      "name": "Argentina",
      "index": 36,
      "code": "AR",
      "currency": "Argentine Peso"
    },
    {
      "name": "Australia",
      "index": 5,
      "code": "AU",
      "currency": "Australian Dollars"
    },
    {
      "name": "Austria",
      "index": 11,
      "code": "AT",
      "currency": "Euros"
    },
    {
      "name": "Belgium",
      "index": 15,
      "code": "BE",
      "currency": "Euros"
    },
    {
      "name": "Brazil",
      "index": 34,
      "code": "BR",
      "currency": "Brazilian Real"
    },
    {
      "name": "Canada",
      "index": 3,
      "code": "CA",
      "currency": "Canadian Dollars"
    },
    {
      "name": "Chile",
      "index": 37,
      "code": "CL",
      "currency": "Chilean Peso"
    },
    {
      "name": "Colombia",
      "index": 38,
      "code": "CO",
      "currency": "Colombian Peso"
    },
    {
      "name": "Cyprus",
      "index": 25,
      "code": "CY",
      "currency": "Euro"
    },
    {
      "name": "Czech Republic",
      "index": 31,
      "code": "CZ",
      "currency": "Czech Koruna"
    },
    {
      "name": "Denmark",
      "index": 23,
      "code": "DK",
      "currency": "Danish Krone"
    },
    {
      "name": "Finland",
      "index": 24,
      "code": "FI",
      "currency": "Euro"
    },
    {
      "name": "France",
      "index": 7,
      "code": "FR",
      "currency": "Euros"
    },
    {
      "name": "Germany",
      "index": 10,
      "code": "DE",
      "currency": "Euros"
    },
    {
      "name": "Greece",
      "index": 32,
      "code": "GR",
      "currency": "Euro"
    },
    {
      "name": "Hong Kong",
      "index": 18,
      "code": "HK",
      "currency": "Hong Kong Dollar"
    },
    {
      "name": "Hungary",
      "index": 30,
      "code": "HU",
      "currency": "Hungarian Forint"
    },
    {
      "name": "Ireland",
      "index": 4,
      "code": "IE",
      "currency": "Euros"
    },
    {
      "name": "Israel",
      "index": 9,
      "code": "IL",
      "currency": "New Shekel"
    },
    {
      "name": "Italy",
      "index": 12,
      "code": "IT",
      "currency": "Euros"
    },
    {
      "name": "Japan",
      "index": 19,
      "code": "JP",
      "currency": "Yen"
    },
    {
      "name": "Luxembourg",
      "index": 26,
      "code": "LU",
      "currency": "Euro"
    },
    {
      "name": "Malta",
      "index": 27,
      "code": "MT",
      "currency": "Euro"
    },
    {
      "name": "Mexico",
      "index": 35,
      "code": "MX",
      "currency": "Mexican Peso"
    },
    {
      "name": "Netherlands",
      "index": 14,
      "code": "NL",
      "currency": "Euros"
    },
    {
      "name": "New Zealand",
      "index": 6,
      "code": "NZ",
      "currency": "New Zealand Dollars"
    },
    {
      "name": "Norway",
      "index": 22,
      "code": "NO",
      "currency": "Norwegian Krone"
    },
    {
      "name": "Poland",
      "index": 28,
      "code": "PL",
      "currency": "Poland Zloty"
    },
    {
      "name": "Portugal",
      "index": 16,
      "code": "PT",
      "currency": "Euros"
    },
    {
      "name": "Romania",
      "index": 29,
      "code": "RO",
      "currency": "Romanian Leu"
    },
    {
      "name": "Singapore",
      "index": 21,
      "code": "SG",
      "currency": "Singapore Dollar"
    },
    {
      "name": "Slovakia",
      "index": 33,
      "code": "SK",
      "currency": "Euro"
    },
    {
      "name": "South Korea",
      "index": 20,
      "code": "KR",
      "currency": "South Korean Won"
    },
    {
      "name": "Spain",
      "index": 13,
      "code": "ES",
      "currency": "Euros"
    },
    {
      "name": "Sweden",
      "index": 8,
      "code": "SE",
      "currency": "Krona"
    },
    {
      "name": "Switzerland",
      "index": 17,
      "code": "CH",
      "currency": "Swiss Franc"
    },
    {
      "name": "United Kingdom",
      "index": 2,
      "code": "GB",
      "currency": "British Pounds"
    },
    {
      "name": "United States",
      "index": 1,
      "code": "US",
      "currency": "Dollars"
    }
  ]
}

I compared the countries in the data with the fallback array in the get_countries method. I can see that the new missing countries have been added.

@budzanowski
Copy link
Collaborator Author

@ibndawood thank you for the review!

@budzanowski budzanowski merged commit 259a97c into develop Aug 9, 2023
8 checks passed
@budzanowski budzanowski deleted the add/add-new-allowed-countries branch August 9, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: add A new feature, function, or functionality was added. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing allowed countries in the fallback value.
2 participants