-
Notifications
You must be signed in to change notification settings - Fork 0
Ref/model #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Ref/model #2
Changes from all commits
9f407c3
3fcca6a
cb14201
bd64c26
14685f3
a64772c
3751aed
d980801
77a9bdc
3a7c1e6
36b3c0e
d19f181
49b44e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,3 +47,7 @@ ExhaustiveVerify.java | |
| *-result.md | ||
| *test-result* | ||
| *.log | ||
|
|
||
| apache-maven-3.9.6 | ||
|
|
||
| src/main/docker | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,16 +10,14 @@ | |
| import java.util.List; | ||
|
|
||
| /** | ||
| * Builder class for creating OrderRequest objects easily. | ||
| * Builder class for creating OrderCreateRequest objects easily. | ||
| */ | ||
| public class OrderRequestBuilder { | ||
|
|
||
| private BigDecimal amount; | ||
| private String currency; | ||
| private String locale; | ||
| private Buyer buyer; | ||
| private String description; | ||
| private String callbackUrl; | ||
| private String conversationId; | ||
| private List<Metadata> metadata = new ArrayList<>(); | ||
| private ShippingAddress shippingAddress; | ||
|
|
@@ -132,29 +130,8 @@ public OrderRequestBuilder buyer(String name, String surname, String email) { | |
| * @return This builder | ||
| */ | ||
| public OrderRequestBuilder buyer(String name, String surname, String email, String phone, String identityNumber) { | ||
| this.buyer = new Buyer(name, surname, email, phone, identityNumber); | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Set the order description. | ||
| * | ||
| * @param description The description | ||
| * @return This builder | ||
| */ | ||
| public OrderRequestBuilder description(String description) { | ||
| this.description = description; | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Set the callback URL. | ||
| * | ||
| * @param callbackUrl The callback URL | ||
| * @return This builder | ||
| */ | ||
| public OrderRequestBuilder callbackUrl(String callbackUrl) { | ||
| this.callbackUrl = callbackUrl; | ||
| this.buyer = new Buyer(name, surname, email, identityNumber); | ||
| this.buyer.setGsmNumber(phone); | ||
| return this; | ||
| } | ||
|
|
||
|
|
@@ -316,7 +293,7 @@ public OrderRequestBuilder paymentOptions(List<String> paymentOptions) { | |
| private CheckoutDesign checkoutDesign; | ||
| private List<Integer> enabledInstallments = new ArrayList<>(); | ||
| private String externalReferenceId; | ||
| private OrderCard orderCards; | ||
| private List<OrderCard> orderCards = new ArrayList<>(); | ||
| private BigDecimal paidAmount; | ||
| private String paymentFailureUrl; | ||
| private String paymentMode; | ||
|
|
@@ -348,8 +325,13 @@ public OrderRequestBuilder externalReferenceId(String externalReferenceId) { | |
| return this; | ||
| } | ||
|
|
||
| public OrderRequestBuilder orderCards(OrderCard orderCards) { | ||
| this.orderCards = orderCards; | ||
| public OrderRequestBuilder orderCards(List<OrderCard> orderCards) { | ||
| this.orderCards = orderCards == null ? new ArrayList<>() : new ArrayList<>(orderCards); | ||
| return this; | ||
| } | ||
|
|
||
| public OrderRequestBuilder addOrderCard(OrderCard orderCard) { | ||
| this.orderCards.add(orderCard); | ||
| return this; | ||
|
Comment on lines
+328
to
335
|
||
| } | ||
|
|
||
|
|
@@ -404,18 +386,16 @@ public OrderRequestBuilder submerchants(List<Submerchant> submerchants) { | |
| } | ||
|
|
||
| /** | ||
| * Build the OrderRequest object. | ||
| * Build the OrderCreateRequest object. | ||
| * | ||
| * @return The constructed OrderRequest | ||
| * @return The constructed OrderCreateRequest | ||
| */ | ||
| public OrderRequest build() { | ||
| OrderRequest orderRequest = new OrderRequest(); | ||
| public OrderCreateRequest build() { | ||
| OrderCreateRequest orderRequest = new OrderCreateRequest(); | ||
| orderRequest.setAmount(amount); | ||
| orderRequest.setCurrency(currency); | ||
| orderRequest.setLocale(locale); | ||
| orderRequest.setBuyer(buyer); | ||
| orderRequest.setDescription(description); | ||
| orderRequest.setCallbackUrl(callbackUrl); | ||
| orderRequest.setConversationId(conversationId); | ||
| orderRequest.setMetadata(metadata.isEmpty() ? null : metadata); | ||
| orderRequest.setShippingAddress(shippingAddress); | ||
|
|
@@ -451,4 +431,4 @@ public OrderRequest build() { | |
| public static OrderRequestBuilder newBuilder() { | ||
| return new OrderRequestBuilder(); | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The surefire is set directly, which will override any future tool/plugin that relies on ${argLine} (e.g., JaCoCo). Prefer prefixing with ${argLine} so additional JVM args can compose cleanly.