1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.ocho.payment.getStripeIntent
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[derive(
9 serde::Serialize,
10 serde::Deserialize,
11 Debug,
12 Clone,
13 PartialEq,
14 Eq,
15 bon::Builder,
16 jacquard_derive::IntoStatic
17)]
18#[builder(start_fn = new)]
19#[serde(rename_all = "camelCase")]
20pub struct GetStripeIntent<'a> {
21 pub amount: i64,
22 #[serde(borrow)]
23 #[builder(into)]
24 pub id: jacquard_common::CowStr<'a>,
25 #[serde(borrow)]
26 pub iss: jacquard_common::types::string::Did<'a>,
27 #[serde(skip_serializing_if = "std::option::Option::is_none")]
28 #[serde(borrow)]
29 #[builder(into)]
30 pub token: std::option::Option<jacquard_common::CowStr<'a>>,
31}
32
33/// The intent data
34#[jacquard_derive::lexicon]
35#[derive(
36 serde::Serialize,
37 serde::Deserialize,
38 Debug,
39 Clone,
40 PartialEq,
41 Eq,
42 jacquard_derive::IntoStatic,
43 Default
44)]
45#[serde(rename_all = "camelCase")]
46pub struct GetStripeIntentOutput<'a> {
47 /// The customer ID for the payment intent
48 #[serde(borrow)]
49 pub customer: jacquard_common::CowStr<'a>,
50 /// The customer session ID for the payment intent
51 #[serde(borrow)]
52 pub customer_session: jacquard_common::CowStr<'a>,
53 /// The ephemeral key for the payment intent
54 #[serde(borrow)]
55 pub ephemeral_key: jacquard_common::CowStr<'a>,
56 /// The payment intent ID
57 #[serde(borrow)]
58 pub payment_intent: jacquard_common::CowStr<'a>,
59 /// The publishable key for the payment intent
60 #[serde(borrow)]
61 pub publishable_key: jacquard_common::CowStr<'a>,
62}
63
64///Response type for
65///app.ocho.payment.getStripeIntent
66pub struct GetStripeIntentResponse;
67impl jacquard_common::xrpc::XrpcResp for GetStripeIntentResponse {
68 const NSID: &'static str = "app.ocho.payment.getStripeIntent";
69 const ENCODING: &'static str = "application/json";
70 type Output<'de> = GetStripeIntentOutput<'de>;
71 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
72}
73
74impl<'a> jacquard_common::xrpc::XrpcRequest for GetStripeIntent<'a> {
75 const NSID: &'static str = "app.ocho.payment.getStripeIntent";
76 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
77 type Response = GetStripeIntentResponse;
78}
79
80///Endpoint type for
81///app.ocho.payment.getStripeIntent
82pub struct GetStripeIntentRequest;
83impl jacquard_common::xrpc::XrpcEndpoint for GetStripeIntentRequest {
84 const PATH: &'static str = "/xrpc/app.ocho.payment.getStripeIntent";
85 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
86 type Request<'de> = GetStripeIntent<'de>;
87 type Response = GetStripeIntentResponse;
88}