[−][src]Struct aiven_rs::billing::ProjectBillingApi
Methods
impl ProjectBillingApi
[src]
pub async fn claim_credit_code<'_, '_, '_>(
&'_ self,
project: &'_ str,
code: &'_ str
) -> Result<ResCredit, AivenError>
[src]
&'_ self,
project: &'_ str,
code: &'_ str
) -> Result<ResCredit, AivenError>
Claim a credit code
https://api.aiven.io/doc/#api-Project_Billing-ProjectCreditsClaim
Arguments
project
- Project namecode
- Credit code
Examples
Basic usage:
#[tokio::main] async fn main()-> Result<(), Box<dyn std::error::Error>>{ let client = aiven_rs::AivenClient::from_token("https://api.aiven.io", "v1", "aiven-token"); let project_billing = client.project_billing(); let response = project_billing.claim_credit_code("project", "code").await?; Ok(()) }
pub async fn download_pdf_invoice<'_, '_, '_, '_>(
&'_ self,
project: &'_ str,
invoice_number: &'_ str,
download_cookie: &'_ str
) -> Result<Bytes, AivenError>
[src]
&'_ self,
project: &'_ str,
invoice_number: &'_ str,
download_cookie: &'_ str
) -> Result<Bytes, AivenError>
Download PDF invoice
https://api.aiven.io/doc/#api-Project_Billing-ProjectInvoiceGet
Arguments
project
- Project nameinvoice_number
- Credit codedownload_cookie
- Authentication cookie for invoice download
Examples
Basic usage:
use std::{fs::File, io::prelude::*}; #[tokio::main] async fn main()-> Result<(), Box<dyn std::error::Error>>{ let client = aiven_rs::AivenClient::from_token("https://api.aiven.io", "v1", "aiven-token"); let project_billing = client.project_billing(); let response = project_billing .download_pdf_invoice("project", "invoice", "download-cookie") .await?; let mut file = File::create("foo.pdf")?; file.write_all(&response[..])?; Ok(()) }
pub async fn list_project_credits<'_, '_>(
&'_ self,
project: &'_ str
) -> Result<Credits, AivenError>
[src]
&'_ self,
project: &'_ str
) -> Result<Credits, AivenError>
List project credits
https://api.aiven.io/doc/#api-Project_Billing-ProjectCreditsList
Arguments
project
- Project name
Examples
Basic usage:
#[tokio::main] async fn main()-> Result<(), Box<dyn std::error::Error>>{ let client = aiven_rs::AivenClient::from_token("https://api.aiven.io", "v1", "aiven-token"); let project_billing = client.project_billing(); let response = project_billing.list_project_credits("project").await?; Ok(()) }
pub async fn list_project_invoices<'_, '_>(
&'_ self,
project: &'_ str
) -> Result<Invoices, AivenError>
[src]
&'_ self,
project: &'_ str
) -> Result<Invoices, AivenError>
List project invoices
https://api.aiven.io/doc/#api-Project_Billing-ProjectInvoiceList
Arguments
project
- Project name
Examples
Basic usage:
#[tokio::main] async fn main()-> Result<(), Box<dyn std::error::Error>>{ let client = aiven_rs::AivenClient::from_token("https://api.aiven.io", "v1", "aiven-token"); let project_billing = client.project_billing(); let response = project_billing.list_project_invoices("project").await?; Ok(()) }
Auto Trait Implementations
impl !RefUnwindSafe for ProjectBillingApi
impl Send for ProjectBillingApi
impl Sync for ProjectBillingApi
impl Unpin for ProjectBillingApi
impl !UnwindSafe for ProjectBillingApi
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,