Class InvoiceError


  • public class InvoiceError
    extends Object
    An error in response to an [`InvoiceRequest`] or an [`Bolt12Invoice`]. [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
    • Method Detail

      • get_erroneous_field

        @Nullable
        public ErroneousField get_erroneous_field()
        The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error. [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
      • set_erroneous_field

        public void set_erroneous_field​(@Nullable
                                        ErroneousField val)
        The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error. [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
      • get_message

        public UntrustedString get_message()
        An explanation of the error.
      • set_message

        public void set_message​(UntrustedString val)
        An explanation of the error.
      • of

        public static InvoiceError of​(@Nullable
                                      ErroneousField erroneous_field_arg,
                                      UntrustedString message_arg)
        Constructs a new InvoiceError given each field Note that erroneous_field_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
      • write

        public byte[] write()
        Serialize the InvoiceError object into a byte array which can be read by InvoiceError_read