This method retrieves all supported countries on OneKhusa. For payload explanations for both request and response, click here
using OneKhusa.SDK; 
using OneKhusa.SDK.Models.StaticMaintenance.Countries; 

//code omitted for brevity   
 
OneKhusaResponse<List<GetCountriesResponse>> response = await client 
     .StaticMaintenance 
     .Countries 
     .GetCountriesAsync(); 
if (response is { IsSuccess: true, Data: not null }) 
{ 
     foreach (var countries in response.Data) 
     { 
         Console.WriteLine($""" 
             CountryCode: {countries.CountryCode}; 
             CountryName: {countries.CountryName} 
         """); 
     } 
 
    Console.ReadLine(); 
     return; 
} 
 
// it means an error has occurred: RFC7807 compliant error object 
Console.WriteLine($""" 
Type: {response.Error?.Type}; 
Title: {response.Error?.Title}; 
Detail: {response.Error?.Detail}; 
ErrorCode: {response.Error?.ErrorCode}; 
Status: {response.Error?.Status}; 
Instance: {response.Error?.Instance}; 
Errors: {string.Join(";", response.Error?.Errors ?? [])} """); 
Console.ReadLine();