zuorarestclient

crates.io Documentation MIT licensed

A HTTP Client built on top of the reqwest package for accessing the Zuora Billing REST API

TODOs

This package currently only provides an interface for performing OAuth authenticated GET requests

Example

This example uses serde_json to prepare the data for a GET request. Your Cargo.toml could look like this:

toml [dependencies] zuora_rest_client = "0.1" serde_json = "1"

And then the code:

```rust use std::env; use zuorarestclient::Zuora;

fn main() -> Result<(), Box> { let mut client = Zuora::new( env::var("ZUORACLIENTID").unwrapordefault(), env::var("ZUORACLIENTSECRET").unwrapordefault(), String::from("https://rest.sandbox.eu.zuora.com"), String::from("/v1"), 3, );

let result = client.generate_token();
println!("{:?}", result);

let get = client.get("/catalog/products", serde_json::from_str("{}").unwrap());
println!("{:?}", get);
Ok(())

} ```

License

Licensed under