Skip to content

Commit d6fb021

Browse files
committed
docs: fix readme example
1 parent 5b86587 commit d6fb021

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,19 @@ Invoice::new(
3535
dec!(10.20),
3636
TaxItem::new(dec!(20), TaxCategory::S),
3737
)
38-
.with_description("Schraubenzieher")
38+
.with_description("Schraubenzieher"),
3939
)
4040
.with_document_title("An invoice")
4141
.with_language("de")
4242
.with_payment_method(
4343
PaymentMethod::payment_card(
44-
PaymentMethodPaymentCard::new("123456*4321").with_card_holder_name("Name"),
44+
PaymentMethodPaymentCard::new("123456*4321")
45+
.unwrap()
46+
.with_card_holder_name("Name"),
4547
)
4648
.with_comment("Comment"),
4749
)
48-
.to_xml_string()
49-
.unwrap(); // returns "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Invoice>...</Invoice>"
50+
.to_xml(); // returns "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Invoice>...</Invoice>"
5051
```
5152

5253
## Development

0 commit comments

Comments
 (0)