pub struct ProcessStripeWebhook {
pub event_type: String,
pub raw_body: String,
pub connect_account_id: Option<String>,
pub dispatcher: Option<Arc<SyncDispatcher>>,
}Expand description
Background job that dispatches a verified Stripe webhook event through
a shared SyncDispatcher.
Fields§
§event_type: StringThe Stripe event type string (e.g. "checkout.session.completed").
raw_body: StringThe raw JSON body of the already-verified Stripe event.
connect_account_id: Option<String>Connect account id for Connect webhooks; None for platform events.
dispatcher: Option<Arc<SyncDispatcher>>Runtime-only: not persisted by the queue. Injected via
ProcessStripeWebhook::new at enqueue time.
Implementations§
Source§impl ProcessStripeWebhook
impl ProcessStripeWebhook
Sourcepub fn new(
event_type: String,
raw_body: String,
connect_account_id: Option<String>,
dispatcher: Arc<SyncDispatcher>,
) -> Self
pub fn new( event_type: String, raw_body: String, connect_account_id: Option<String>, dispatcher: Arc<SyncDispatcher>, ) -> Self
Constructs a new queue job with the dispatcher attached.
Use this constructor at enqueue time — the dispatcher is not persisted, so jobs deserialized from storage without re-injection cannot execute.
Trait Implementations§
Source§impl Clone for ProcessStripeWebhook
impl Clone for ProcessStripeWebhook
Source§fn clone(&self) -> ProcessStripeWebhook
fn clone(&self) -> ProcessStripeWebhook
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProcessStripeWebhook
impl Debug for ProcessStripeWebhook
Source§impl<'de> Deserialize<'de> for ProcessStripeWebhook
impl<'de> Deserialize<'de> for ProcessStripeWebhook
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Job for ProcessStripeWebhook
impl Job for ProcessStripeWebhook
Source§fn handle<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the job logic.
Source§fn max_retries(&self) -> u32
fn max_retries(&self) -> u32
Maximum number of times to retry the job on failure.
Source§fn retry_delay(&self, attempt: u32) -> Duration
fn retry_delay(&self, attempt: u32) -> Duration
Delay before retrying after a failure. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ProcessStripeWebhook
impl !UnwindSafe for ProcessStripeWebhook
impl Freeze for ProcessStripeWebhook
impl Send for ProcessStripeWebhook
impl Sync for ProcessStripeWebhook
impl Unpin for ProcessStripeWebhook
impl UnsafeUnpin for ProcessStripeWebhook
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more