Skip to content

Commit 46bd1d8

Browse files
chore: generate code
1 parent be15036 commit 46bd1d8

6 files changed

Lines changed: 115 additions & 128 deletions

File tree

src/main/java/com/sumup/sdk/models/AmountEvent.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/main/java/com/sumup/sdk/models/Event.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
public record Event(
55
/** Amount of the event. */
6-
com.sumup.sdk.models.AmountEvent amount,
6+
Float amount,
77

88
/** Amount deducted for the event. */
99
Float deductedAmount,
@@ -24,7 +24,7 @@ public record Event(
2424
com.sumup.sdk.models.EventStatus status,
2525

2626
/** Date and time of the transaction event. */
27-
com.sumup.sdk.models.TimestampEvent timestamp,
27+
java.time.OffsetDateTime timestamp,
2828

2929
/** Unique ID of the transaction. */
3030
com.sumup.sdk.models.TransactionId transactionId,
@@ -42,14 +42,14 @@ public static Builder builder() {
4242

4343
/** Builder for Event instances. */
4444
public static final class Builder {
45-
private com.sumup.sdk.models.AmountEvent amount;
45+
private Float amount;
4646
private Float deductedAmount;
4747
private Float deductedFeeAmount;
4848
private Float feeAmount;
4949
private com.sumup.sdk.models.EventId id;
5050
private Long installmentNumber;
5151
private com.sumup.sdk.models.EventStatus status;
52-
private com.sumup.sdk.models.TimestampEvent timestamp;
52+
private java.time.OffsetDateTime timestamp;
5353
private com.sumup.sdk.models.TransactionId transactionId;
5454
private com.sumup.sdk.models.EventType type;
5555

@@ -61,7 +61,7 @@ private Builder() {}
6161
* @param amount Amount of the event.
6262
* @return This builder instance.
6363
*/
64-
public Builder amount(com.sumup.sdk.models.AmountEvent amount) {
64+
public Builder amount(Float amount) {
6565
this.amount = amount;
6666
return this;
6767
}
@@ -138,7 +138,7 @@ public Builder status(com.sumup.sdk.models.EventStatus status) {
138138
* @param timestamp Date and time of the transaction event.
139139
* @return This builder instance.
140140
*/
141-
public Builder timestamp(com.sumup.sdk.models.TimestampEvent timestamp) {
141+
public Builder timestamp(java.time.OffsetDateTime timestamp) {
142142
this.timestamp = timestamp;
143143
return this;
144144
}

src/main/java/com/sumup/sdk/models/ReceiptEvent.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
public record ReceiptEvent(
55
/** Amount of the event. */
6-
com.sumup.sdk.models.AmountEvent amount,
6+
String amount,
77

88
/** Unique ID of the transaction event. */
99
com.sumup.sdk.models.EventId id,
@@ -13,7 +13,7 @@ public record ReceiptEvent(
1313
com.sumup.sdk.models.EventStatus status,
1414

1515
/** Date and time of the transaction event. */
16-
com.sumup.sdk.models.TimestampEvent timestamp,
16+
java.time.OffsetDateTime timestamp,
1717

1818
/** Unique ID of the transaction. */
1919
com.sumup.sdk.models.TransactionId transactionId,
@@ -31,11 +31,11 @@ public static Builder builder() {
3131

3232
/** Builder for ReceiptEvent instances. */
3333
public static final class Builder {
34-
private com.sumup.sdk.models.AmountEvent amount;
34+
private String amount;
3535
private com.sumup.sdk.models.EventId id;
3636
private String receiptNo;
3737
private com.sumup.sdk.models.EventStatus status;
38-
private com.sumup.sdk.models.TimestampEvent timestamp;
38+
private java.time.OffsetDateTime timestamp;
3939
private com.sumup.sdk.models.TransactionId transactionId;
4040
private com.sumup.sdk.models.EventType type;
4141

@@ -47,7 +47,7 @@ private Builder() {}
4747
* @param amount Amount of the event.
4848
* @return This builder instance.
4949
*/
50-
public Builder amount(com.sumup.sdk.models.AmountEvent amount) {
50+
public Builder amount(String amount) {
5151
this.amount = amount;
5252
return this;
5353
}
@@ -91,7 +91,7 @@ public Builder status(com.sumup.sdk.models.EventStatus status) {
9191
* @param timestamp Date and time of the transaction event.
9292
* @return This builder instance.
9393
*/
94-
public Builder timestamp(com.sumup.sdk.models.TimestampEvent timestamp) {
94+
public Builder timestamp(java.time.OffsetDateTime timestamp) {
9595
this.timestamp = timestamp;
9696
return this;
9797
}

src/main/java/com/sumup/sdk/models/ReceiptTransactionProductsItem.java

Lines changed: 97 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,32 @@
22
package com.sumup.sdk.models;
33

44
public record ReceiptTransactionProductsItem(
5-
/** Product description. */
6-
String description,
7-
8-
/** Product name. */
5+
/** Product name */
96
String name,
107

11-
/** Product price. */
12-
Float price,
8+
/** Product price */
9+
String price,
10+
11+
/** Product price including VAT */
12+
String priceWithVat,
1313

14-
/** Product quantity. */
14+
/** Product quantity */
1515
Long quantity,
1616

17-
/** Quantity x product price. */
18-
Float totalPrice) {
17+
/** VAT amount for a single product */
18+
String singleVatAmount,
19+
20+
/** Quantity x product price */
21+
String totalPrice,
22+
23+
/** Total price including VAT */
24+
String totalWithVat,
25+
26+
/** VAT amount */
27+
String vatAmount,
28+
29+
/** VAT rate */
30+
String vatRate) {
1931
/**
2032
* Creates a builder for ReceiptTransactionProductsItem.
2133
*
@@ -27,76 +39,133 @@ public static Builder builder() {
2739

2840
/** Builder for ReceiptTransactionProductsItem instances. */
2941
public static final class Builder {
30-
private String description;
3142
private String name;
32-
private Float price;
43+
private String price;
44+
private String priceWithVat;
3345
private Long quantity;
34-
private Float totalPrice;
46+
private String singleVatAmount;
47+
private String totalPrice;
48+
private String totalWithVat;
49+
private String vatAmount;
50+
private String vatRate;
3551

3652
private Builder() {}
3753

3854
/**
39-
* Sets the value for {@code description}.
55+
* Sets the value for {@code name}.
4056
*
41-
* @param description Product description.
57+
* @param name Product name
4258
* @return This builder instance.
4359
*/
44-
public Builder description(String description) {
45-
this.description = description;
60+
public Builder name(String name) {
61+
this.name = name;
4662
return this;
4763
}
4864

4965
/**
50-
* Sets the value for {@code name}.
66+
* Sets the value for {@code price}.
5167
*
52-
* @param name Product name.
68+
* @param price Product price
5369
* @return This builder instance.
5470
*/
55-
public Builder name(String name) {
56-
this.name = name;
71+
public Builder price(String price) {
72+
this.price = price;
5773
return this;
5874
}
5975

6076
/**
61-
* Sets the value for {@code price}.
77+
* Sets the value for {@code priceWithVat}.
6278
*
63-
* @param price Product price.
79+
* @param priceWithVat Product price including VAT
6480
* @return This builder instance.
6581
*/
66-
public Builder price(Float price) {
67-
this.price = price;
82+
public Builder priceWithVat(String priceWithVat) {
83+
this.priceWithVat = priceWithVat;
6884
return this;
6985
}
7086

7187
/**
7288
* Sets the value for {@code quantity}.
7389
*
74-
* @param quantity Product quantity.
90+
* @param quantity Product quantity
7591
* @return This builder instance.
7692
*/
7793
public Builder quantity(Long quantity) {
7894
this.quantity = quantity;
7995
return this;
8096
}
8197

98+
/**
99+
* Sets the value for {@code singleVatAmount}.
100+
*
101+
* @param singleVatAmount VAT amount for a single product
102+
* @return This builder instance.
103+
*/
104+
public Builder singleVatAmount(String singleVatAmount) {
105+
this.singleVatAmount = singleVatAmount;
106+
return this;
107+
}
108+
82109
/**
83110
* Sets the value for {@code totalPrice}.
84111
*
85-
* @param totalPrice Quantity x product price.
112+
* @param totalPrice Quantity x product price
86113
* @return This builder instance.
87114
*/
88-
public Builder totalPrice(Float totalPrice) {
115+
public Builder totalPrice(String totalPrice) {
89116
this.totalPrice = totalPrice;
90117
return this;
91118
}
92119

120+
/**
121+
* Sets the value for {@code totalWithVat}.
122+
*
123+
* @param totalWithVat Total price including VAT
124+
* @return This builder instance.
125+
*/
126+
public Builder totalWithVat(String totalWithVat) {
127+
this.totalWithVat = totalWithVat;
128+
return this;
129+
}
130+
131+
/**
132+
* Sets the value for {@code vatAmount}.
133+
*
134+
* @param vatAmount VAT amount
135+
* @return This builder instance.
136+
*/
137+
public Builder vatAmount(String vatAmount) {
138+
this.vatAmount = vatAmount;
139+
return this;
140+
}
141+
142+
/**
143+
* Sets the value for {@code vatRate}.
144+
*
145+
* @param vatRate VAT rate
146+
* @return This builder instance.
147+
*/
148+
public Builder vatRate(String vatRate) {
149+
this.vatRate = vatRate;
150+
return this;
151+
}
152+
93153
/**
94154
* Builds an immutable ReceiptTransactionProductsItem instance.
95155
*
96156
* @return Immutable ReceiptTransactionProductsItem.
97157
*/
98158
public ReceiptTransactionProductsItem build() {
99-
return new ReceiptTransactionProductsItem(description, name, price, quantity, totalPrice);
159+
return new ReceiptTransactionProductsItem(
160+
name,
161+
price,
162+
priceWithVat,
163+
quantity,
164+
singleVatAmount,
165+
totalPrice,
166+
totalWithVat,
167+
vatAmount,
168+
vatRate);
100169
}
101170
}
102171
}

src/main/java/com/sumup/sdk/models/TimestampEvent.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)