From e6eab6912269ea95f193008a327b56627707eb31 Mon Sep 17 00:00:00 2001 From: appscisumup Date: Mon, 30 Mar 2026 09:33:37 +0000 Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 156 ++++++++++++++++++++++++++++----------------------- 1 file changed, 85 insertions(+), 71 deletions(-) diff --git a/openapi.json b/openapi.json index 4153d4a..7279c33 100755 --- a/openapi.json +++ b/openapi.json @@ -2148,7 +2148,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntryModeFilter" + "$ref": "#/components/schemas/EntryMode" } } }, @@ -5959,7 +5959,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntryModeFilter" + "$ref": "#/components/schemas/EntryMode" } } }, @@ -7202,6 +7202,21 @@ }, "title": "Receipt Card" }, + "ReceiptReader": { + "description": "Card reader details displayed on the receipt.", + "type": "object", + "properties": { + "code": { + "description": "Reader serial number.", + "type": "string" + }, + "type": { + "description": "Reader type.", + "type": "string" + } + }, + "title": "Receipt Reader" + }, "ReceiptMerchantData": { "description": "Receipt merchant data", "type": "object", @@ -7217,15 +7232,30 @@ "business_name": { "type": "string" }, + "company_registration_number": { + "type": "string" + }, + "vat_id": { + "type": "string" + }, + "website": { + "type": "string" + }, "email": { "type": "string" }, + "language": { + "type": "string" + }, "address": { "type": "object", "properties": { "address_line1": { "type": "string" }, + "address_line2": { + "type": "string" + }, "city": { "type": "string" }, @@ -7238,6 +7268,9 @@ "country_native_name": { "type": "string" }, + "region_name": { + "type": "string" + }, "post_code": { "type": "string" }, @@ -7263,6 +7296,13 @@ "description": "Transaction code.", "type": "string" }, + "transaction_id": { + "$ref": "#/components/schemas/TransactionID" + }, + "merchant_code": { + "description": "Merchant code.", + "type": "string" + }, "amount": { "description": "Transaction amount.", "type": "string" @@ -7300,6 +7340,9 @@ "description": "Cardholder verification method.", "type": "string" }, + "card_reader": { + "$ref": "#/components/schemas/ReceiptReader" + }, "card": { "$ref": "#/components/schemas/ReceiptCard" }, @@ -7307,6 +7350,15 @@ "description": "Number of installments.", "type": "integer" }, + "process_as": { + "description": "Debit/Credit.", + "type": "string", + "example": "CREDIT", + "enum": [ + "CREDIT", + "DEBIT" + ] + }, "products": { "description": "Products", "type": "array", @@ -7318,6 +7370,10 @@ "type": "string", "example": "Coffee" }, + "description": { + "description": "Product description", + "type": "string" + }, "price": { "description": "Product price", "type": "string", @@ -7657,33 +7713,33 @@ "description": "Entry mode of the payment details.", "type": "string", "enum": [ - "none", - "magstripe", - "chip", - "manual entry", - "customer entry", - "magstripe fallback", - "contactless", - "moto", - "contactless magstripe", - "boleto", - "direct debit", - "sofort", - "ideal", - "bancontact", - "eps", - "mybank", - "satispay", - "blik", - "p24", - "giropay", - "pix", - "qr code pix", - "apple pay", - "google pay", - "paypal", - "twint", - "na" + "BOLETO", + "SOFORT", + "IDEAL", + "BANCONTACT", + "EPS", + "MYBANK", + "SATISPAY", + "BLIK", + "P24", + "GIROPAY", + "PIX", + "QR_CODE_PIX", + "APPLE_PAY", + "GOOGLE_PAY", + "PAYPAL", + "TWINT", + "NONE", + "CHIP", + "MANUAL_ENTRY", + "CUSTOMER_ENTRY", + "MAGSTRIPE_FALLBACK", + "MAGSTRIPE", + "DIRECT_DEBIT", + "CONTACTLESS", + "MOTO", + "CONTACTLESS_MAGSTRIPE", + "N/A" ], "title": "Entry Mode" }, @@ -9932,10 +9988,6 @@ "description": "Country ISO 3166-1 code", "type": "string" }, - "region_id": { - "description": "Country region id", - "type": "number" - }, "region_name": { "description": "Country region name", "type": "string" @@ -10023,10 +10075,6 @@ "description": "Country ISO 3166-1 code", "type": "string" }, - "region_id": { - "description": "Country region id", - "type": "number" - }, "region_name": { "description": "Region name", "type": "string" @@ -10439,40 +10487,6 @@ } }, "title": "Personal Profile Legacy" - }, - "EntryModeFilter": { - "description": "Entry mode value accepted by the `entry_modes[]` filter.", - "type": "string", - "enum": [ - "BOLETO", - "SOFORT", - "IDEAL", - "BANCONTACT", - "EPS", - "MYBANK", - "SATISPAY", - "BLIK", - "P24", - "GIROPAY", - "PIX", - "QR_CODE_PIX", - "APPLE_PAY", - "GOOGLE_PAY", - "PAYPAL", - "TWINT", - "NONE", - "CHIP", - "MANUAL_ENTRY", - "CUSTOMER_ENTRY", - "MAGSTRIPE_FALLBACK", - "MAGSTRIPE", - "DIRECT_DEBIT", - "CONTACTLESS", - "MOTO", - "CONTACTLESS_MAGSTRIPE", - "N/A" - ], - "title": "Entry Mode Filter" } }, "examples": { From abb15bb34fd460ab71107619c9c0c8f02cd6f68c Mon Sep 17 00:00:00 2001 From: "sumup-bot[bot]" <241716704+sumup-bot[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 09:34:32 +0000 Subject: [PATCH 2/2] chore: generate code --- sdk/src/resources/transactions/index.ts | 4 +- sdk/src/types/address-payload-legacy.ts | 4 -- sdk/src/types/address-with-details.ts | 4 -- sdk/src/types/entry-mode-filter.ts | 35 ---------------- sdk/src/types/entry-mode.ts | 54 ++++++++++++------------- sdk/src/types/index.ts | 2 +- sdk/src/types/receipt-merchant-data.ts | 6 +++ sdk/src/types/receipt-reader.ts | 17 ++++++++ sdk/src/types/receipt-transaction.ts | 16 ++++++++ 9 files changed, 69 insertions(+), 73 deletions(-) delete mode 100644 sdk/src/types/entry-mode-filter.ts create mode 100644 sdk/src/types/receipt-reader.ts diff --git a/sdk/src/resources/transactions/index.ts b/sdk/src/resources/transactions/index.ts index 48c5f0a..68ce191 100644 --- a/sdk/src/resources/transactions/index.ts +++ b/sdk/src/resources/transactions/index.ts @@ -2,7 +2,7 @@ import { type APIPromise, APIResource, type RequestOptions } from "../../core"; import type { - EntryModeFilter, + EntryMode, ErrorBody, PaymentType, Problem, @@ -44,7 +44,7 @@ export type ListTransactionsV2_1QueryParams = { | "CHARGE_BACK" )[]; payment_types?: PaymentType[]; - "entry_modes[]"?: EntryModeFilter[]; + "entry_modes[]"?: EntryMode[]; types?: ("PAYMENT" | "REFUND" | "CHARGE_BACK")[]; changes_since?: string; newest_time?: string; diff --git a/sdk/src/types/address-payload-legacy.ts b/sdk/src/types/address-payload-legacy.ts index 35d0483..4d80c07 100644 --- a/sdk/src/types/address-payload-legacy.ts +++ b/sdk/src/types/address-payload-legacy.ts @@ -22,10 +22,6 @@ export type AddressPayloadLegacy = { * Country ISO 3166-1 code */ country: string; - /** - * Country region id - */ - region_id?: number; /** * Country region name */ diff --git a/sdk/src/types/address-with-details.ts b/sdk/src/types/address-with-details.ts index 083a4bc..e04c50f 100644 --- a/sdk/src/types/address-with-details.ts +++ b/sdk/src/types/address-with-details.ts @@ -25,10 +25,6 @@ export type AddressWithDetails = { * Country ISO 3166-1 code */ country?: string; - /** - * Country region id - */ - region_id?: number; /** * Region name */ diff --git a/sdk/src/types/entry-mode-filter.ts b/sdk/src/types/entry-mode-filter.ts deleted file mode 100644 index fc6ee02..0000000 --- a/sdk/src/types/entry-mode-filter.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by @sumup/sumup-ts-codegen. DO NOT EDIT. - -/** - * Entry Mode Filter - * - * Entry mode value accepted by the `entry_modes[]` filter. - */ -export type EntryModeFilter = - | "BOLETO" - | "SOFORT" - | "IDEAL" - | "BANCONTACT" - | "EPS" - | "MYBANK" - | "SATISPAY" - | "BLIK" - | "P24" - | "GIROPAY" - | "PIX" - | "QR_CODE_PIX" - | "APPLE_PAY" - | "GOOGLE_PAY" - | "PAYPAL" - | "TWINT" - | "NONE" - | "CHIP" - | "MANUAL_ENTRY" - | "CUSTOMER_ENTRY" - | "MAGSTRIPE_FALLBACK" - | "MAGSTRIPE" - | "DIRECT_DEBIT" - | "CONTACTLESS" - | "MOTO" - | "CONTACTLESS_MAGSTRIPE" - | "N/A"; diff --git a/sdk/src/types/entry-mode.ts b/sdk/src/types/entry-mode.ts index 99d2c81..a21eae7 100644 --- a/sdk/src/types/entry-mode.ts +++ b/sdk/src/types/entry-mode.ts @@ -6,30 +6,30 @@ * Entry mode of the payment details. */ export type EntryMode = - | "none" - | "magstripe" - | "chip" - | "manual entry" - | "customer entry" - | "magstripe fallback" - | "contactless" - | "moto" - | "contactless magstripe" - | "boleto" - | "direct debit" - | "sofort" - | "ideal" - | "bancontact" - | "eps" - | "mybank" - | "satispay" - | "blik" - | "p24" - | "giropay" - | "pix" - | "qr code pix" - | "apple pay" - | "google pay" - | "paypal" - | "twint" - | "na"; + | "BOLETO" + | "SOFORT" + | "IDEAL" + | "BANCONTACT" + | "EPS" + | "MYBANK" + | "SATISPAY" + | "BLIK" + | "P24" + | "GIROPAY" + | "PIX" + | "QR_CODE_PIX" + | "APPLE_PAY" + | "GOOGLE_PAY" + | "PAYPAL" + | "TWINT" + | "NONE" + | "CHIP" + | "MANUAL_ENTRY" + | "CUSTOMER_ENTRY" + | "MAGSTRIPE_FALLBACK" + | "MAGSTRIPE" + | "DIRECT_DEBIT" + | "CONTACTLESS" + | "MOTO" + | "CONTACTLESS_MAGSTRIPE" + | "N/A"; diff --git a/sdk/src/types/index.ts b/sdk/src/types/index.ts index c6db2cb..30fd828 100644 --- a/sdk/src/types/index.ts +++ b/sdk/src/types/index.ts @@ -39,7 +39,6 @@ export type { Device } from "./device"; export type { DoingBusinessAsPayloadLegacy } from "./doing-business-as-payload-legacy"; export type { ElvCardAccount } from "./elv-card-account"; export type { EntryMode } from "./entry-mode"; -export type { EntryModeFilter } from "./entry-mode-filter"; export type { ErrorBody } from "./error-body"; export type { ErrorExtended } from "./error-extended"; export type { ErrorForbidden } from "./error-forbidden"; @@ -95,6 +94,7 @@ export type { Receipt } from "./receipt"; export type { ReceiptCard } from "./receipt-card"; export type { ReceiptEvent } from "./receipt-event"; export type { ReceiptMerchantData } from "./receipt-merchant-data"; +export type { ReceiptReader } from "./receipt-reader"; export type { ReceiptTransaction } from "./receipt-transaction"; export type { ResourceType } from "./resource-type"; export type { Role } from "./role"; diff --git a/sdk/src/types/receipt-merchant-data.ts b/sdk/src/types/receipt-merchant-data.ts index af5c2f0..8c43456 100644 --- a/sdk/src/types/receipt-merchant-data.ts +++ b/sdk/src/types/receipt-merchant-data.ts @@ -12,13 +12,19 @@ export type ReceiptMerchantData = { merchant_profile?: { merchant_code?: string; business_name?: string; + company_registration_number?: string; + vat_id?: string; + website?: string; email?: string; + language?: string; address?: { address_line1?: string; + address_line2?: string; city?: string; country?: string; country_en_name?: string; country_native_name?: string; + region_name?: string; post_code?: string; landline?: string; }; diff --git a/sdk/src/types/receipt-reader.ts b/sdk/src/types/receipt-reader.ts new file mode 100644 index 0000000..fc7597a --- /dev/null +++ b/sdk/src/types/receipt-reader.ts @@ -0,0 +1,17 @@ +// Code generated by @sumup/sumup-ts-codegen. DO NOT EDIT. + +/** + * Receipt Reader + * + * Card reader details displayed on the receipt. + */ +export type ReceiptReader = { + /** + * Reader serial number. + */ + code?: string; + /** + * Reader type. + */ + type?: string; +}; diff --git a/sdk/src/types/receipt-transaction.ts b/sdk/src/types/receipt-transaction.ts index 3b7b78a..ff6ec84 100644 --- a/sdk/src/types/receipt-transaction.ts +++ b/sdk/src/types/receipt-transaction.ts @@ -2,6 +2,8 @@ import type { ReceiptCard } from "./receipt-card"; import type { ReceiptEvent } from "./receipt-event"; +import type { ReceiptReader } from "./receipt-reader"; +import type { TransactionID } from "./transaction-id"; /** * Receipt Transaction @@ -13,6 +15,11 @@ export type ReceiptTransaction = { * Transaction code. */ transaction_code?: string; + transaction_id?: TransactionID; + /** + * Merchant code. + */ + merchant_code?: string; /** * Transaction amount. */ @@ -49,11 +56,16 @@ export type ReceiptTransaction = { * Cardholder verification method. */ verification_method?: string; + card_reader?: ReceiptReader; card?: ReceiptCard; /** * Number of installments. */ installments_count?: number; + /** + * Debit/Credit. + */ + process_as?: "CREDIT" | "DEBIT"; /** * Products */ @@ -62,6 +74,10 @@ export type ReceiptTransaction = { * Product name */ name?: string; + /** + * Product description + */ + description?: string; /** * Product price */