1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//! # ITTV SDK
//!
//! A Rust SDK for the ITTV API.

use serde::Deserialize;

pub use crate::customer::create::NewCustomer;

mod customer;

pub struct Client {
    api_key: String,
    api_url: String,
}

impl Client {
    /// Create a new instance of the ITTV SDK.
    #[must_use]
    pub fn new(api_key: &str) -> Self {
        Self {
            api_key: api_key.to_string(),
            api_url: "https://api-resellers.ittv.com.br".to_string(),
        }
    }
}

/// Generic error response from the ITTV API.
#[derive(Deserialize)]
pub struct ErrorResponse {
    pub message: String,
}