-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [reformat][adyen-sdk-automation] automated change * style(fmt): code formatted * Update transferRoute.ts removed faulty import until sustainable fix implemented --------- Co-authored-by: AdyenAutomationBot <Adyen Automation [email protected]> Co-authored-by: Djoyke Reijans <[email protected]>
- Loading branch information
1 parent
a4df4c0
commit 541bde8
Showing
50 changed files
with
1,159 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
/* | ||
* The version of the OpenAPI document: v1 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit this class manually. | ||
*/ | ||
|
||
import Client from "../client"; | ||
import getJsonResponse from "../helpers/getJsonResponse"; | ||
import Service from "../service"; | ||
import { BoardingTokenRequest } from "../typings/paymentsApp/models"; | ||
import { BoardingTokenResponse } from "../typings/paymentsApp/models"; | ||
import { PaymentsAppResponse } from "../typings/paymentsApp/models"; | ||
import { IRequest } from "../typings/requestOptions"; | ||
import Resource from "./resource"; | ||
import { ObjectSerializer } from "../typings/paymentsApp/models"; | ||
|
||
export class PaymentsAppAPI extends Service { | ||
|
||
private readonly API_BASEPATH: string = "https://management-live.adyen.com/v1"; | ||
private baseUrl: string; | ||
|
||
public constructor(client: Client) { | ||
super(client); | ||
this.baseUrl = this.createBaseUrl(this.API_BASEPATH); | ||
} | ||
|
||
/** | ||
* @summary Create a boarding token - merchant level | ||
* @param merchantId {@link string } The unique identifier of the merchant account. | ||
* @param boardingTokenRequest {@link BoardingTokenRequest } | ||
* @param requestOptions {@link IRequest.Options } | ||
* @return {@link BoardingTokenResponse } | ||
*/ | ||
public async generatePaymentsAppBoardingTokenForMerchant(merchantId: string, boardingTokenRequest: BoardingTokenRequest, requestOptions?: IRequest.Options): Promise<BoardingTokenResponse> { | ||
const endpoint = `${this.baseUrl}/merchants/{merchantId}/generatePaymentsAppBoardingToken` | ||
.replace("{" + "merchantId" + "}", encodeURIComponent(String(merchantId))); | ||
const resource = new Resource(this, endpoint); | ||
const request: BoardingTokenRequest = ObjectSerializer.serialize(boardingTokenRequest, "BoardingTokenRequest"); | ||
const response = await getJsonResponse<BoardingTokenRequest, BoardingTokenResponse>( | ||
resource, | ||
request, | ||
{ ...requestOptions, method: "POST" } | ||
); | ||
return ObjectSerializer.deserialize(response, "BoardingTokenResponse"); | ||
} | ||
|
||
/** | ||
* @summary Create a boarding token - store level | ||
* @param merchantId {@link string } The unique identifier of the merchant account. | ||
* @param storeId {@link string } The unique identifier of the store. | ||
* @param boardingTokenRequest {@link BoardingTokenRequest } | ||
* @param requestOptions {@link IRequest.Options } | ||
* @return {@link BoardingTokenResponse } | ||
*/ | ||
public async generatePaymentsAppBoardingTokenForStore(merchantId: string, storeId: string, boardingTokenRequest: BoardingTokenRequest, requestOptions?: IRequest.Options): Promise<BoardingTokenResponse> { | ||
const endpoint = `${this.baseUrl}/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken` | ||
.replace("{" + "merchantId" + "}", encodeURIComponent(String(merchantId))) | ||
.replace("{" + "storeId" + "}", encodeURIComponent(String(storeId))); | ||
const resource = new Resource(this, endpoint); | ||
const request: BoardingTokenRequest = ObjectSerializer.serialize(boardingTokenRequest, "BoardingTokenRequest"); | ||
const response = await getJsonResponse<BoardingTokenRequest, BoardingTokenResponse>( | ||
resource, | ||
request, | ||
{ ...requestOptions, method: "POST" } | ||
); | ||
return ObjectSerializer.deserialize(response, "BoardingTokenResponse"); | ||
} | ||
|
||
/** | ||
* @summary Get a list of Payments Apps - merchant level | ||
* @param merchantId {@link string } The unique identifier of the merchant account. | ||
* @param requestOptions {@link IRequest.Options } | ||
* @param statuses {@link string } The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDING** * **BOARDED** * **REVOKED** | ||
* @param limit {@link number } The number of items to return. | ||
* @param offset {@link number } The number of items to skip. | ||
* @return {@link PaymentsAppResponse } | ||
*/ | ||
public async listPaymentsAppForMerchant(merchantId: string, requestOptions?: IRequest.Options): Promise<PaymentsAppResponse> { | ||
const endpoint = `${this.baseUrl}/merchants/{merchantId}/paymentsApps` | ||
.replace("{" + "merchantId" + "}", encodeURIComponent(String(merchantId))); | ||
const resource = new Resource(this, endpoint); | ||
const response = await getJsonResponse<string, PaymentsAppResponse>( | ||
resource, | ||
"", | ||
{ ...requestOptions, method: "GET" } | ||
); | ||
return ObjectSerializer.deserialize(response, "PaymentsAppResponse"); | ||
} | ||
|
||
/** | ||
* @summary Get a list of Payments Apps - store level | ||
* @param merchantId {@link string } The unique identifier of the merchant account. | ||
* @param storeId {@link string } The unique identifier of the store. | ||
* @param requestOptions {@link IRequest.Options } | ||
* @param statuses {@link string } The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDING** * **BOARDED** * **REVOKED** | ||
* @param limit {@link number } The number of items to return. | ||
* @param offset {@link number } The number of items to skip. | ||
* @return {@link PaymentsAppResponse } | ||
*/ | ||
public async listPaymentsAppForStore(merchantId: string, storeId: string, requestOptions?: IRequest.Options): Promise<PaymentsAppResponse> { | ||
const endpoint = `${this.baseUrl}/merchants/{merchantId}/stores/{storeId}/paymentsApps` | ||
.replace("{" + "merchantId" + "}", encodeURIComponent(String(merchantId))) | ||
.replace("{" + "storeId" + "}", encodeURIComponent(String(storeId))); | ||
const resource = new Resource(this, endpoint); | ||
const response = await getJsonResponse<string, PaymentsAppResponse>( | ||
resource, | ||
"", | ||
{ ...requestOptions, method: "GET" } | ||
); | ||
return ObjectSerializer.deserialize(response, "PaymentsAppResponse"); | ||
} | ||
|
||
/** | ||
* @summary Revoke Payments App instance authentication | ||
* @param merchantId {@link string } The unique identifier of the merchant account. | ||
* @param installationId {@link string } The unique identifier of the Payments App instance on a device. | ||
* @param requestOptions {@link IRequest.Options } | ||
*/ | ||
public async revokePaymentsApp(merchantId: string, installationId: string, requestOptions?: IRequest.Options): Promise<void> { | ||
const endpoint = `${this.baseUrl}/merchants/{merchantId}/paymentsApps/{installationId}/revoke` | ||
.replace("{" + "merchantId" + "}", encodeURIComponent(String(merchantId))) | ||
.replace("{" + "installationId" + "}", encodeURIComponent(String(installationId))); | ||
const resource = new Resource(this, endpoint); | ||
await getJsonResponse<string, void>( | ||
resource, | ||
"", | ||
{ ...requestOptions, method: "POST" } | ||
); | ||
} | ||
} | ||
|
||
export default PaymentsAppAPI; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* The version of the OpenAPI document: v71 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit this class manually. | ||
*/ | ||
|
||
|
||
export class Amounts { | ||
/** | ||
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). | ||
*/ | ||
'currency': string; | ||
/** | ||
* The amounts of the donation (in [minor units](https://docs.adyen.com/development-resources/currency-codes/)). | ||
*/ | ||
'values': Array<number>; | ||
|
||
static discriminator: string | undefined = undefined; | ||
|
||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ | ||
{ | ||
"name": "currency", | ||
"baseName": "currency", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "values", | ||
"baseName": "values", | ||
"type": "Array<number>" | ||
} ]; | ||
|
||
static getAttributeTypeMap() { | ||
return Amounts.attributeTypeMap; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* The version of the OpenAPI document: v71 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit this class manually. | ||
*/ | ||
|
||
|
||
export class Donation { | ||
/** | ||
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). | ||
*/ | ||
'currency': string; | ||
/** | ||
* The [type of donation](https://docs.adyen.com/online-payments/donations/#donation-types).\"Possible values:\\n\\n**roundup**: a donation where the original transaction amount is rounded up as a donation.**fixedAmounts**: a donation where you show fixed donations amounts that the shopper can select from. | ||
*/ | ||
'donationType': string; | ||
/** | ||
* The maximum amount a transaction can be rounded up to make a donation. This field is only present when `donationType` is **roundup**. | ||
*/ | ||
'maxRoundupAmount'?: number; | ||
/** | ||
* The fixed donation amounts in [minor units](https://docs.adyen.com/development-resources/currency-codes//#minor-units). This field is only present when `donationType` is **fixedAmounts**. | ||
*/ | ||
'values'?: Array<number>; | ||
|
||
static discriminator: string | undefined = undefined; | ||
|
||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ | ||
{ | ||
"name": "currency", | ||
"baseName": "currency", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "donationType", | ||
"baseName": "donationType", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "maxRoundupAmount", | ||
"baseName": "maxRoundupAmount", | ||
"type": "number" | ||
}, | ||
{ | ||
"name": "values", | ||
"baseName": "values", | ||
"type": "Array<number>" | ||
} ]; | ||
|
||
static getAttributeTypeMap() { | ||
return Donation.attributeTypeMap; | ||
} | ||
} | ||
|
Oops, something went wrong.