Skip to content

Commit 002136a

Browse files
authored
chore: synced file(s) with sumup/apis (#31)
1 parent dad13e2 commit 002136a

File tree

7 files changed

+225
-202
lines changed

7 files changed

+225
-202
lines changed

openapi.json

Lines changed: 110 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -7286,10 +7286,14 @@
72867286
"$ref": "#/components/schemas/EventStatus"
72877287
},
72887288
"amount": {
7289-
"$ref": "#/components/schemas/AmountEvent"
7289+
"description": "Amount of the event.",
7290+
"type": "number",
7291+
"format": "float"
72907292
},
72917293
"timestamp": {
7292-
"$ref": "#/components/schemas/TimestampEvent"
7294+
"description": "Date and time of the transaction event.",
7295+
"type": "string",
7296+
"format": "date-time"
72937297
},
72947298
"fee_amount": {
72957299
"description": "Amount of the fee related to the event.",
@@ -7874,10 +7878,14 @@
78747878
"$ref": "#/components/schemas/EventStatus"
78757879
},
78767880
"amount": {
7877-
"$ref": "#/components/schemas/AmountEvent"
7881+
"description": "Amount of the event.",
7882+
"type": "string",
7883+
"format": "double"
78787884
},
78797885
"timestamp": {
7880-
"$ref": "#/components/schemas/TimestampEvent"
7886+
"description": "Date and time of the transaction event.",
7887+
"type": "string",
7888+
"format": "date-time"
78817889
},
78827890
"receipt_no": {
78837891
"type": "string"
@@ -8006,26 +8014,57 @@
80068014
"type": "object",
80078015
"properties": {
80088016
"name": {
8009-
"description": "Product name.",
8010-
"type": "string"
8011-
},
8012-
"description": {
8013-
"description": "Product description.",
8014-
"type": "string"
8017+
"description": "Product name",
8018+
"type": "string",
8019+
"example": "Coffee"
80158020
},
80168021
"price": {
8017-
"description": "Product price.",
8018-
"type": "number",
8019-
"format": "float"
8022+
"description": "Product price",
8023+
"type": "string",
8024+
"format": "double",
8025+
"example": "150.0"
8026+
},
8027+
"vat_rate": {
8028+
"description": "VAT rate",
8029+
"type": "string",
8030+
"format": "double",
8031+
"example": "0.0"
8032+
},
8033+
"single_vat_amount": {
8034+
"description": "VAT amount for a single product",
8035+
"type": "string",
8036+
"format": "double",
8037+
"example": "0.0"
8038+
},
8039+
"price_with_vat": {
8040+
"description": "Product price including VAT",
8041+
"type": "string",
8042+
"format": "double",
8043+
"example": "150.0"
8044+
},
8045+
"vat_amount": {
8046+
"description": "VAT amount",
8047+
"type": "string",
8048+
"format": "double",
8049+
"example": "0.0"
80208050
},
80218051
"quantity": {
8022-
"description": "Product quantity.",
8023-
"type": "integer"
8052+
"description": "Product quantity",
8053+
"type": "integer",
8054+
"format": "int64",
8055+
"example": 1
80248056
},
80258057
"total_price": {
8026-
"description": "Quantity x product price.",
8027-
"type": "number",
8028-
"format": "float"
8058+
"description": "Quantity x product price",
8059+
"type": "string",
8060+
"format": "double",
8061+
"example": "150.0"
8062+
},
8063+
"total_with_vat": {
8064+
"description": "Total price including VAT",
8065+
"type": "string",
8066+
"format": "double",
8067+
"example": "150.0"
80298068
}
80308069
}
80318070
}
@@ -8104,7 +8143,9 @@
81048143
"$ref": "#/components/schemas/EventStatus"
81058144
},
81068145
"amount": {
8107-
"$ref": "#/components/schemas/AmountEvent"
8146+
"description": "Amount of the event.",
8147+
"type": "number",
8148+
"format": "float"
81088149
},
81098150
"due_date": {
81108151
"description": "Date when the transaction event is due to occur.",
@@ -8121,7 +8162,9 @@
81218162
"type": "integer"
81228163
},
81238164
"timestamp": {
8124-
"$ref": "#/components/schemas/TimestampEvent"
8165+
"description": "Date and time of the transaction event.",
8166+
"type": "string",
8167+
"format": "date-time"
81258168
}
81268169
}
81278170
},
@@ -8531,11 +8574,6 @@
85318574
}
85328575
}
85338576
},
8534-
"AmountEvent": {
8535-
"description": "Amount of the event.",
8536-
"type": "number",
8537-
"format": "float"
8538-
},
85398577
"Currency": {
85408578
"description": "Three-letter [ISO4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency for the amount. Currently supported currency values are enumerated above.",
85418579
"type": "string",
@@ -8630,11 +8668,6 @@
86308668
"description": "Unique ID of the transaction.",
86318669
"type": "string"
86328670
},
8633-
"TimestampEvent": {
8634-
"description": "Date and time of the transaction event.",
8635-
"type": "string",
8636-
"format": "date-time"
8637-
},
86388671
"Permissions": {
86398672
"description": "Permissions assigned to an operator or user.",
86408673
"type": "object",
@@ -8721,12 +8754,41 @@
87218754
"example": {},
87228755
"additionalProperties": true
87238756
},
8724-
"CountryCode": {
8725-
"description": "An [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)\ncountry code. This definition users `oneOf` with a two-character string\ntype to allow for support of future countries in client code.",
8726-
"type": "string",
8727-
"example": "BR",
8728-
"maxLength": 2,
8729-
"minLength": 2
8757+
"Problem": {
8758+
"description": "A RFC 9457 problem details object.\n\nAdditional properties specific to the problem type may be present.\n",
8759+
"type": "object",
8760+
"properties": {
8761+
"type": {
8762+
"description": "A URI reference that identifies the problem type.",
8763+
"type": "string",
8764+
"format": "uri",
8765+
"example": "https://developer.sumup.com/problem/not-found"
8766+
},
8767+
"title": {
8768+
"description": "A short, human-readable summary of the problem type.",
8769+
"type": "string",
8770+
"example": "Requested resource couldn't be found."
8771+
},
8772+
"status": {
8773+
"description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
8774+
"type": "integer",
8775+
"example": 404
8776+
},
8777+
"detail": {
8778+
"description": "A human-readable explanation specific to this occurrence of the problem.",
8779+
"type": "string",
8780+
"example": "The requested resource doesn't exist or does not belong to you."
8781+
},
8782+
"instance": {
8783+
"description": "A URI reference that identifies the specific occurrence of the problem.",
8784+
"type": "string",
8785+
"format": "uri"
8786+
}
8787+
},
8788+
"additionalProperties": true,
8789+
"required": [
8790+
"type"
8791+
]
87308792
},
87318793
"Address": {
87328794
"description": "An address somewhere in the world. The address fields used depend on the country conventions. For example, in Great Britain, `city` is `post_town`. In the United States, the top-level administrative unit used in addresses is `state`, whereas in Chile it's `region`.\nWhether an address is valid or not depends on whether the locally required fields are present. Fields not supported in a country will be ignored.",
@@ -8856,18 +8918,28 @@
88568918
"country"
88578919
]
88588920
},
8921+
"CountryCode": {
8922+
"description": "An [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)\ncountry code. This definition users `oneOf` with a two-character string\ntype to allow for support of future countries in client code.",
8923+
"type": "string",
8924+
"example": "BR",
8925+
"maxLength": 2,
8926+
"minLength": 2,
8927+
"pattern": "^[A-Z]{2}$"
8928+
},
88598929
"PersonalIdentifier": {
88608930
"type": "object",
88618931
"properties": {
88628932
"ref": {
88638933
"description": "The unique reference for the personal identifier type.",
88648934
"type": "string",
8865-
"example": "br.cpf"
8935+
"example": "br.cpf",
8936+
"maxLength": 32
88668937
},
88678938
"value": {
88688939
"description": "The company identifier value.",
88698940
"type": "string",
8870-
"example": "847.060.136-90"
8941+
"example": "847.060.136-90",
8942+
"maxLength": 128
88718943
}
88728944
},
88738945
"example": {
@@ -8879,42 +8951,6 @@
88798951
"value"
88808952
]
88818953
},
8882-
"Problem": {
8883-
"description": "A RFC 9457 problem details object.\n\nAdditional properties specific to the problem type may be present.\n",
8884-
"type": "object",
8885-
"properties": {
8886-
"type": {
8887-
"description": "A URI reference that identifies the problem type.",
8888-
"type": "string",
8889-
"format": "uri"
8890-
},
8891-
"title": {
8892-
"description": "A short, human-readable summary of the problem type.",
8893-
"type": "string"
8894-
},
8895-
"status": {
8896-
"description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
8897-
"type": "integer",
8898-
"example": 400,
8899-
"exclusiveMaximum": true,
8900-
"maximum": 600,
8901-
"minimum": 400
8902-
},
8903-
"detail": {
8904-
"description": "A human-readable explanation specific to this occurrence of the problem.",
8905-
"type": "string"
8906-
},
8907-
"instance": {
8908-
"description": "A URI reference that identifies the specific occurrence of the problem.",
8909-
"type": "string",
8910-
"format": "uri"
8911-
}
8912-
},
8913-
"additionalProperties": true,
8914-
"required": [
8915-
"type"
8916-
]
8917-
},
89188954
"MembershipStatus": {
89198955
"description": "The status of the membership.",
89208956
"type": "string",

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
}

0 commit comments

Comments
 (0)