tosspayments/api/
issue_billing_by_authkey.rs1use reqwest::Method;
2use serde::{Deserialize, Serialize};
3use typed_builder::TypedBuilder;
4
5use crate::data::Billing;
6use crate::endpoint::Endpoint;
7
8#[derive(Clone, Debug, Serialize, Deserialize, TypedBuilder)]
9#[serde(rename_all = "camelCase")]
10pub struct IssueBillingByAuthKey {
11 pub auth_key: String,
12 pub customer_key: String,
13}
14
15impl Endpoint for IssueBillingByAuthKey {
16 type Query = ();
17 type Body = Self;
18 type Response = Billing;
19
20 fn relative_path(&self) -> String {
21 "/v1/billing/authorizations/issue".to_string()
22 }
23
24 fn method(&self) -> Method {
25 Method::POST
26 }
27
28 fn body(&self) -> Option<&Self::Body> {
29 Some(&self)
30 }
31}