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
32
33
34
35
36
37
38
39
40
// Generated by wuapi-codegen from the OpenAPI spec. Do not edit: run `bun run codegen`.
use crate::http::{HttpClient, Method, Request, RequestParts};
use crate::types;
/// What the invitation page and email show: your name, logo, accent color, support link, and whether the wuapi footer appears (hiding it needs the White label add-on).
#[derive(Clone, Debug)]
pub struct BrandingResource {
http: HttpClient,
}
impl BrandingResource {
pub(crate) fn new(http: HttpClient) -> Self {
Self { http }
}
/// Get branding
///
/// What the invitation page and email show. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.
///
/// `GET /v1/branding`
///
/// Safe to repeat: retried on timeouts, network errors, `429` and `5xx`.
pub fn get(&self) -> Request<types::Branding> {
let parts = RequestParts::new(Method::Get, "/v1/branding").retryable();
self.http.request(parts)
}
/// Update branding
///
/// `displayName` is required the first time. Without an accent color the page uses wuapi's own. `hideWuapiBranding: true` needs the White label add-on ($100/month): without it the call answers `402 addon_required` and changes nothing. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.
///
/// `PATCH /v1/branding`
///
/// Not idempotent: retried only when the request never reached the API or was refused with `429`.
pub fn update(&self, params: types::BrandingUpdateParams) -> Request<types::Branding> {
let parts = RequestParts::new(Method::Patch, "/v1/branding").body(¶ms);
self.http.request(parts)
}
}