pub async fn create_invoice_from_file<P: AsRef<Path>>(
        &self,
        file_path: P,
    ) -> Result<crate::InvoiceCreateResponse> {
        // Create an owned version of the path to avoid worrying about lifetimes here for the stream
        let path = file_path.as_ref().to_owned();
        debug!("Loading invoice from {}", path.display());
        let inv_stream = load::raw(path).await?;
        debug!("Successfully loaded invoice stream");
        let req = self
            .create_invoice_builder()
            .body(Body::wrap_stream(inv_stream));
        self.create_invoice_request(req).await
    }
/// Same as [`create_invoice`](Client::create_invoice), but takes a path to an invoice file
/// instead. This will load the invoice file directly into the request, skipping serialization
Same as [`create_invoice`](Client::create_invoice), but takes a path to an invoice file
instead. This will load the invoice file directly into the request, skipping serialization
Same as [ ` create_invoice ` ] ( Client :: create_invoice ) but takes a path to an invoice file instead . This will load the invoice file directly into the request skipping serialization
pub async fn create_invoice_from_file<P: AsRef<Path>>(
        &self,
        file_path: P,
    ) -> Result<crate::InvoiceCreateResponse> {
        // Create an owned version of the path to avoid worrying about lifetimes here for the stream
        let path = file_path.as_ref().to_owned();
        debug!("Loading invoice from {}", path.display());
        let inv_stream = load::raw(path).await?;
        debug!("Successfully loaded invoice stream");
        let req = self
            .create_invoice_builder()
            .body(Body::wrap_stream(inv_stream));
        self.create_invoice_request(req).await
    }
pub async fn create_invoice_from_file < P : AsRef < Path > > ( & self , file_path : P , ) -> Result < crate :: InvoiceCreateResponse > { // Create an owned version of the path to avoid worrying about lifetimes here for the stream let path = file_path . as_ref ( ) . to_owned ( ) ; debug ! ( " " path display ( ) ) ; let inv_stream = load :: raw ( path ) . await ? ; debug ! ( " " ) ; let req = self . create_invoice_builder ( ) . body ( Body :: wrap_stream ( inv_stream ) ) ; self . create_invoice_request ( req ) . await }
Same as [`create_invoice`](Client::create_invoice), but takes a path to an invoice file
instead.
Same as [ ` create_invoice ` ] ( Client :: create_invoice ) but takes a path to an invoice file instead .
&self
file_path
P
&self
file_path
P