pub struct Payments { /* private fields */ }Implementations§
Source§impl Payments
impl Payments
pub fn into_reference(val: Payments, env: Env) -> Result<Reference<Payments>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Payments>>
Source§impl Payments
impl Payments
pub async fn create(&self, input: CreatePaymentInput) -> Result<PaymentOutput>
pub async fn get(&self, id: String) -> Result<Option<PaymentOutput>>
pub async fn list(&self) -> Result<Vec<PaymentOutput>>
pub async fn mark_completed(&self, id: String) -> Result<PaymentOutput>
pub async fn mark_failed( &self, id: String, reason: String, code: Option<String>, ) -> Result<PaymentOutput>
pub async fn cancel(&self, id: String) -> Result<PaymentOutput>
pub async fn create_refund( &self, input: CreateRefundInput, ) -> Result<RefundOutput>
pub async fn count(&self) -> Result<u32>
Trait Implementations§
Source§impl FromNapiMutRef for Payments
impl FromNapiMutRef for Payments
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for Payments
impl FromNapiRef for Payments
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &Payments
impl FromNapiValue for &Payments
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut Payments
impl FromNapiValue for &mut Payments
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for Payments
impl ToNapiValue for Payments
Source§unsafe fn to_napi_value(env: napi_env, val: Payments) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Payments) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &Payments
impl ValidateNapiValue for &Payments
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut Payments
impl ValidateNapiValue for &mut Payments
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for Payments
impl !RefUnwindSafe for Payments
impl Send for Payments
impl Sync for Payments
impl Unpin for Payments
impl UnsafeUnpin for Payments
impl !UnwindSafe for Payments
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