dodo_payments 0.1.1

This is Unoffical SDK of dodopayments.com
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::super::common::{make_reqwest, parse_response};
use reqwest::Method;
use std::sync::Arc;

use crate::client::Handle;

pub struct GetSupportedCountries;

impl GetSupportedCountries {
    pub async fn orchestrate(
        handle: Arc<Handle>,
    ) -> Result<Vec<crate::operations::common::structs::CountryCodeAlpha2>, crate::errors::Error> {
        let response = make_reqwest(handle, Method::GET, "/checkout/supported_countries", None).await?;
        let text = response.text().await?;
        parse_response(&text)
    }
}