Skip to content

Commit ab2bdd0

Browse files
authored
chore: synced file(s) with sumup/apis (#188)
1 parent 1d8ef2c commit ab2bdd0

5 files changed

Lines changed: 35 additions & 44 deletions

File tree

openapi.json

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -543,10 +543,10 @@
543543
]
544544
}
545545
},
546-
"/v0.1/checkouts/{id}": {
546+
"/v0.1/checkouts/{checkout_id}": {
547547
"parameters": [
548548
{
549-
"name": "id",
549+
"name": "checkout_id",
550550
"in": "path",
551551
"description": "Unique ID of the checkout resource.",
552552
"required": true,
@@ -1150,14 +1150,14 @@
11501150
]
11511151
}
11521152
},
1153-
"/v0.2/checkouts/{id}/apple-pay-session": {
1153+
"/v0.2/checkouts/{checkout_id}/apple-pay-session": {
11541154
"put": {
11551155
"operationId": "CreateApplePaySession",
11561156
"summary": "Create an Apple Pay session",
11571157
"description": "Creates an Apple Pay merchant session for the specified checkout.\n\nUse this endpoint after the customer selects Apple Pay and before calling\n`ApplePaySession.completeMerchantValidation(...)` in the browser.\nSumUp validates the merchant session request and returns the Apple Pay\nsession object that your frontend should pass to Apple's JavaScript API.\n",
11581158
"parameters": [
11591159
{
1160-
"name": "id",
1160+
"name": "checkout_id",
11611161
"in": "path",
11621162
"description": "Unique ID of the checkout resource.",
11631163
"required": true,
@@ -1900,7 +1900,7 @@
19001900
]
19011901
}
19021902
},
1903-
"/v1.0/merchants/{merchant_code}/payments/{id}/refunds": {
1903+
"/v1.0/merchants/{merchant_code}/payments/{transaction_id}/refunds": {
19041904
"parameters": [
19051905
{
19061906
"name": "merchant_code",
@@ -1913,7 +1913,7 @@
19131913
}
19141914
},
19151915
{
1916-
"name": "id",
1916+
"name": "transaction_id",
19171917
"in": "path",
19181918
"description": "Unique ID of the transaction.",
19191919
"required": true,
@@ -2658,14 +2658,14 @@
26582658
]
26592659
}
26602660
},
2661-
"/v1.1/receipts/{id}": {
2661+
"/v1.1/receipts/{transaction_id}": {
26622662
"get": {
26632663
"operationId": "GetReceipt",
26642664
"summary": "Retrieve receipt details",
26652665
"description": "Retrieves receipt specific data for a transaction.",
26662666
"parameters": [
26672667
{
2668-
"name": "id",
2668+
"name": "transaction_id",
26692669
"in": "path",
26702670
"description": "SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD.",
26712671
"required": true,
@@ -4549,14 +4549,14 @@
45494549
"UpdateReaderByID": {
45504550
"operationId": "UpdateReader",
45514551
"parameters": {
4552-
"id": "$response.body#/id"
4552+
"reader_id": "$response.body#/id"
45534553
},
45544554
"description": "Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code."
45554555
},
45564556
"DeleteReaderByID": {
45574557
"operationId": "DeleteReader",
45584558
"parameters": {
4559-
"id": "$response.body#/id"
4559+
"reader_id": "$response.body#/id"
45604560
},
45614561
"description": "Delete the reader."
45624562
}
@@ -4639,7 +4639,7 @@
46394639
]
46404640
}
46414641
},
4642-
"/v0.1/merchants/{merchant_code}/readers/{id}": {
4642+
"/v0.1/merchants/{merchant_code}/readers/{reader_id}": {
46434643
"get": {
46444644
"operationId": "GetReader",
46454645
"summary": "Retrieve a Reader",
@@ -4677,7 +4677,7 @@
46774677
}
46784678
},
46794679
{
4680-
"name": "id",
4680+
"name": "reader_id",
46814681
"in": "path",
46824682
"description": "The unique identifier of the reader.",
46834683
"required": true,
@@ -4757,7 +4757,7 @@
47574757
}
47584758
},
47594759
{
4760-
"name": "id",
4760+
"name": "reader_id",
47614761
"in": "path",
47624762
"description": "The unique identifier of the reader.",
47634763
"required": true,
@@ -4830,7 +4830,7 @@
48304830
}
48314831
},
48324832
{
4833-
"name": "id",
4833+
"name": "reader_id",
48344834
"in": "path",
48354835
"description": "The unique identifier of the reader.",
48364836
"required": true,
@@ -5403,7 +5403,7 @@
54035403
}
54045404
},
54055405
"CheckoutID": {
5406-
"name": "id",
5406+
"name": "checkout_id",
54075407
"in": "path",
54085408
"required": true,
54095409
"description": "Unique ID of the checkout resource.",
@@ -5539,15 +5539,6 @@
55395539
"type": "string"
55405540
}
55415541
},
5542-
"TxnID": {
5543-
"in": "path",
5544-
"name": "txn_id",
5545-
"required": true,
5546-
"description": "Unique ID of the transaction.",
5547-
"schema": {
5548-
"type": "string"
5549-
}
5550-
},
55515542
"TypesFilter": {
55525543
"name": "types",
55535544
"in": "query",
@@ -9595,14 +9586,14 @@
95959586
"UpdateReaderByID": {
95969587
"operationId": "UpdateReader",
95979588
"parameters": {
9598-
"id": "$response.body#/id"
9589+
"reader_id": "$response.body#/id"
95999590
},
96009591
"description": "Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code."
96019592
},
96029593
"DeleteReaderByID": {
96039594
"operationId": "DeleteReader",
96049595
"parameters": {
9605-
"id": "$response.body#/id"
9596+
"reader_id": "$response.body#/id"
96069597
},
96079598
"description": "Delete the reader."
96089599
}

sdk/src/resources/checkouts.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -956,9 +956,9 @@ impl<'a> CheckoutsClient<'a> {
956956
/// - 409: The request conflicts with the current state of the resource.
957957
pub async fn deactivate(
958958
&self,
959-
id: impl Into<String>,
959+
checkout_id: impl Into<String>,
960960
) -> crate::error::SdkResult<Checkout, DeactivateErrorBody> {
961-
let path = format!("/v0.1/checkouts/{}", id.into());
961+
let path = format!("/v0.1/checkouts/{}", checkout_id.into());
962962
let url = format!("{}{}", self.client.base_url(), path);
963963
let mut request = self
964964
.client
@@ -1014,9 +1014,9 @@ impl<'a> CheckoutsClient<'a> {
10141014
/// - 404: The requested resource does not exist.
10151015
pub async fn get(
10161016
&self,
1017-
id: impl Into<String>,
1017+
checkout_id: impl Into<String>,
10181018
) -> crate::error::SdkResult<CheckoutSuccess, GetErrorBody> {
1019-
let path = format!("/v0.1/checkouts/{}", id.into());
1019+
let path = format!("/v0.1/checkouts/{}", checkout_id.into());
10201020
let url = format!("{}{}", self.client.base_url(), path);
10211021
let mut request = self
10221022
.client
@@ -1069,10 +1069,10 @@ impl<'a> CheckoutsClient<'a> {
10691069
/// - 409: The request conflicts with the current state of the resource.
10701070
pub async fn process(
10711071
&self,
1072-
id: impl Into<String>,
1072+
checkout_id: impl Into<String>,
10731073
body: ProcessCheckout,
10741074
) -> crate::error::SdkResult<ProcessResponse, ProcessErrorBody> {
1075-
let path = format!("/v0.1/checkouts/{}", id.into());
1075+
let path = format!("/v0.1/checkouts/{}", checkout_id.into());
10761076
let url = format!("{}{}", self.client.base_url(), path);
10771077
let mut request = self
10781078
.client
@@ -1202,11 +1202,11 @@ impl<'a> CheckoutsClient<'a> {
12021202
/// - 404: The requested resource does not exist.
12031203
pub async fn create_apple_pay_session(
12041204
&self,
1205-
id: impl Into<String>,
1205+
checkout_id: impl Into<String>,
12061206
body: Option<CreateApplePaySessionBody>,
12071207
) -> crate::error::SdkResult<CreateApplePaySessionResponse, CreateApplePaySessionErrorBody>
12081208
{
1209-
let path = format!("/v0.2/checkouts/{}/apple-pay-session", id.into());
1209+
let path = format!("/v0.2/checkouts/{}/apple-pay-session", checkout_id.into());
12101210
let url = format!("{}{}", self.client.base_url(), path);
12111211
let mut request = self
12121212
.client

sdk/src/resources/readers.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -548,12 +548,12 @@ impl<'a> ReadersClient<'a> {
548548
pub async fn delete(
549549
&self,
550550
merchant_code: impl Into<String>,
551-
id: impl Into<String>,
551+
reader_id: impl Into<String>,
552552
) -> crate::error::SdkResult<(), DeleteErrorBody> {
553553
let path = format!(
554554
"/v0.1/merchants/{}/readers/{}",
555555
merchant_code.into(),
556-
id.into()
556+
reader_id.into()
557557
);
558558
let url = format!("{}{}", self.client.base_url(), path);
559559
let mut request = self
@@ -593,12 +593,12 @@ impl<'a> ReadersClient<'a> {
593593
pub async fn get(
594594
&self,
595595
merchant_code: impl Into<String>,
596-
id: impl Into<String>,
596+
reader_id: impl Into<String>,
597597
) -> crate::error::SdkResult<Reader, GetErrorBody> {
598598
let path = format!(
599599
"/v0.1/merchants/{}/readers/{}",
600600
merchant_code.into(),
601-
id.into()
601+
reader_id.into()
602602
);
603603
let url = format!("{}{}", self.client.base_url(), path);
604604
let mut request = self
@@ -642,13 +642,13 @@ impl<'a> ReadersClient<'a> {
642642
pub async fn update(
643643
&self,
644644
merchant_code: impl Into<String>,
645-
id: impl Into<String>,
645+
reader_id: impl Into<String>,
646646
body: UpdateBody,
647647
) -> crate::error::SdkResult<Reader, UpdateErrorBody> {
648648
let path = format!(
649649
"/v0.1/merchants/{}/readers/{}",
650650
merchant_code.into(),
651-
id.into()
651+
reader_id.into()
652652
);
653653
let url = format!("{}{}", self.client.base_url(), path);
654654
let mut request = self

sdk/src/resources/receipts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,10 @@ impl<'a> ReceiptsClient<'a> {
359359
/// - 404: The requested transaction event does not exist for the provided transaction.
360360
pub async fn get(
361361
&self,
362-
id: impl Into<String>,
362+
transaction_id: impl Into<String>,
363363
params: GetParams,
364364
) -> crate::error::SdkResult<Receipt, GetErrorBody> {
365-
let path = format!("/v1.1/receipts/{}", id.into());
365+
let path = format!("/v1.1/receipts/{}", transaction_id.into());
366366
let url = format!("{}{}", self.client.base_url(), path);
367367
let mut request = self
368368
.client

sdk/src/resources/transactions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,13 +865,13 @@ impl<'a> TransactionsClient<'a> {
865865
pub async fn refund(
866866
&self,
867867
merchant_code: impl Into<String>,
868-
id: impl Into<String>,
868+
transaction_id: impl Into<String>,
869869
body: Option<RefundBody>,
870870
) -> crate::error::SdkResult<(), RefundErrorBody> {
871871
let path = format!(
872872
"/v1.0/merchants/{}/payments/{}/refunds",
873873
merchant_code.into(),
874-
id.into()
874+
transaction_id.into()
875875
);
876876
let url = format!("{}{}", self.client.base_url(), path);
877877
let mut request = self

0 commit comments

Comments
 (0)