Skip to content

Commit f924628

Browse files
committed
switched to builder for the sample code
1 parent fbcc591 commit f924628

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,15 @@ Basic.setPassword("password"); // your Datatrans server to server password
5353
V1TransactionsApi transactionsApiInstance = new V1TransactionsApi(defaultClient);
5454

5555
AuthorizeRequest authorizeRequest = new AuthorizeRequest();
56-
authorizeRequest.setCurrency("CHF");
57-
authorizeRequest.setAmount(100L);
58-
authorizeRequest.setRefno(String.valueOf(System.currentTimeMillis()));
56+
authorizeRequest.currency("CHF")
57+
.amount(100L)
58+
.refno(String.valueOf(System.currentTimeMillis()));
5959

6060
CardAuthorizeRequest cardAuthorizeRequest = new CardAuthorizeRequest();
61-
cardAuthorizeRequest.setAlias("AAABcH0Bq92s3kgAESIAAbGj5NIsAHWC");
62-
cardAuthorizeRequest.setExpiryMonth("12");
63-
cardAuthorizeRequest.setExpiryYear("21");
61+
62+
cardAuthorizeRequest.alias("AAABcH0Bq92s3kgAESIAAbGj5NIsAHWC")
63+
.expiryMonth("12")
64+
.expiryYear("21");
6465

6566
authorizeRequest.setCard(cardAuthorizeRequest);
6667

0 commit comments

Comments
 (0)