@@ -460,29 +460,28 @@ impl InvoiceRequest {
460
460
///
461
461
/// [`chain`]: Self::chain
462
462
pub fn amount_msats ( & self ) -> Option < u64 > {
463
- self . contents . inner . amount_msats
463
+ self . contents . amount_msats ( )
464
464
}
465
465
466
466
/// Features pertaining to requesting an invoice.
467
467
pub fn features ( & self ) -> & InvoiceRequestFeatures {
468
- & self . contents . inner . features
468
+ & self . contents . features ( )
469
469
}
470
470
471
471
/// The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
472
472
pub fn quantity ( & self ) -> Option < u64 > {
473
- self . contents . inner . quantity
473
+ self . contents . quantity ( )
474
474
}
475
475
476
476
/// A possibly transient pubkey used to sign the invoice request.
477
477
pub fn payer_id ( & self ) -> PublicKey {
478
- self . contents . payer_id
478
+ self . contents . payer_id ( )
479
479
}
480
480
481
481
/// A payer-provided note which will be seen by the recipient and reflected back in the invoice
482
482
/// response.
483
483
pub fn payer_note ( & self ) -> Option < PrintableString > {
484
- self . contents . inner . payer_note . as_ref ( )
485
- . map ( |payer_note| PrintableString ( payer_note. as_str ( ) ) )
484
+ self . contents . payer_note ( )
486
485
}
487
486
488
487
/// Signature of the invoice request using [`payer_id`].
@@ -626,10 +625,27 @@ impl InvoiceRequestContents {
626
625
self . inner . chain ( )
627
626
}
628
627
628
+ fn amount_msats ( & self ) -> Option < u64 > {
629
+ self . inner . amount_msats
630
+ }
631
+
632
+ fn features ( & self ) -> & InvoiceRequestFeatures {
633
+ & self . inner . features
634
+ }
635
+
636
+ fn quantity ( & self ) -> Option < u64 > {
637
+ self . inner . quantity
638
+ }
639
+
629
640
pub ( super ) fn payer_id ( & self ) -> PublicKey {
630
641
self . payer_id
631
642
}
632
643
644
+ fn payer_note ( & self ) -> Option < PrintableString > {
645
+ self . inner . payer_note . as_ref ( )
646
+ . map ( |payer_note| PrintableString ( payer_note. as_str ( ) ) )
647
+ }
648
+
633
649
pub ( super ) fn as_tlv_stream ( & self ) -> PartialInvoiceRequestTlvStreamRef {
634
650
let ( payer, offer, mut invoice_request) = self . inner . as_tlv_stream ( ) ;
635
651
invoice_request. payer_id = Some ( & self . payer_id ) ;
0 commit comments