-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix-services-typo
- Loading branch information
Showing
42 changed files
with
1,248 additions
and
86 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
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,64 @@ | ||
/* | ||
* The version of the OpenAPI document: v2 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit this class manually. | ||
*/ | ||
|
||
import getJsonResponse from "../../helpers/getJsonResponse"; | ||
import Service from "../../service"; | ||
import Client from "../../client"; | ||
import { GetNetworkTokenResponse } from "../../typings/balancePlatform/models"; | ||
import { UpdateNetworkTokenRequest } from "../../typings/balancePlatform/models"; | ||
import { IRequest } from "../../typings/requestOptions"; | ||
import Resource from "../resource"; | ||
import { ObjectSerializer } from "../../typings/balancePlatform/models"; | ||
|
||
export class NetworkTokensApi extends Service { | ||
|
||
private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/bcl/v2"; | ||
private baseUrl: string; | ||
|
||
public constructor(client: Client){ | ||
super(client); | ||
this.baseUrl = this.createBaseUrl(this.API_BASEPATH); | ||
} | ||
|
||
/** | ||
* @summary Get a network token | ||
* @param networkTokenId {@link string } The unique identifier of the network token. | ||
* @param requestOptions {@link IRequest.Options} | ||
* @return {@link GetNetworkTokenResponse } | ||
*/ | ||
public async getNetworkToken(networkTokenId: string, requestOptions?: IRequest.Options): Promise<GetNetworkTokenResponse> { | ||
const endpoint = `${this.baseUrl}/networkTokens/{networkTokenId}` | ||
.replace("{" + "networkTokenId" + "}", encodeURIComponent(String(networkTokenId))); | ||
const resource = new Resource(this, endpoint); | ||
const response = await getJsonResponse<string, GetNetworkTokenResponse>( | ||
resource, | ||
"", | ||
{ ...requestOptions, method: "GET" } | ||
); | ||
return ObjectSerializer.deserialize(response, "GetNetworkTokenResponse"); | ||
} | ||
|
||
/** | ||
* @summary Update a network token | ||
* @param networkTokenId {@link string } The unique identifier of the network token. | ||
* @param updateNetworkTokenRequest {@link UpdateNetworkTokenRequest } | ||
* @param requestOptions {@link IRequest.Options} | ||
*/ | ||
public async updateNetworkToken(networkTokenId: string, updateNetworkTokenRequest: UpdateNetworkTokenRequest, requestOptions?: IRequest.Options): Promise<void> { | ||
const endpoint = `${this.baseUrl}/networkTokens/{networkTokenId}` | ||
.replace("{" + "networkTokenId" + "}", encodeURIComponent(String(networkTokenId))); | ||
const resource = new Resource(this, endpoint); | ||
const request: UpdateNetworkTokenRequest = ObjectSerializer.serialize(updateNetworkTokenRequest, "UpdateNetworkTokenRequest"); | ||
await getJsonResponse<UpdateNetworkTokenRequest, void>( | ||
resource, | ||
request, | ||
{ ...requestOptions, method: "PATCH" } | ||
); | ||
} | ||
} |
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
128 changes: 128 additions & 0 deletions
128
src/typings/balancePlatform/accountHolderUpdateRequest.ts
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,128 @@ | ||
/* | ||
* The version of the OpenAPI document: v2 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit this class manually. | ||
*/ | ||
|
||
import { AccountHolderCapability } from './accountHolderCapability'; | ||
import { ContactDetails } from './contactDetails'; | ||
import { VerificationDeadline } from './verificationDeadline'; | ||
|
||
export class AccountHolderUpdateRequest { | ||
/** | ||
* The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms. | ||
*/ | ||
'balancePlatform'?: string; | ||
/** | ||
* Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. | ||
*/ | ||
'capabilities'?: { [key: string]: AccountHolderCapability; }; | ||
'contactDetails'?: ContactDetails; | ||
/** | ||
* Your description for the account holder, maximum 300 characters. | ||
*/ | ||
'description'?: string; | ||
/** | ||
* A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. | ||
*/ | ||
'metadata'?: { [key: string]: string; }; | ||
/** | ||
* The unique identifier of the migrated account holder in the classic integration. | ||
*/ | ||
'migratedAccountHolderCode'?: string; | ||
/** | ||
* The ID of the account holder\'s primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request. | ||
*/ | ||
'primaryBalanceAccount'?: string; | ||
/** | ||
* Your reference for the account holder, maximum 150 characters. | ||
*/ | ||
'reference'?: string; | ||
/** | ||
* The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. | ||
*/ | ||
'status'?: AccountHolderUpdateRequest.StatusEnum; | ||
/** | ||
* The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). | ||
*/ | ||
'timeZone'?: string; | ||
/** | ||
* List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. | ||
*/ | ||
'verificationDeadlines'?: Array<VerificationDeadline>; | ||
|
||
static discriminator: string | undefined = undefined; | ||
|
||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ | ||
{ | ||
"name": "balancePlatform", | ||
"baseName": "balancePlatform", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "capabilities", | ||
"baseName": "capabilities", | ||
"type": "{ [key: string]: AccountHolderCapability; }" | ||
}, | ||
{ | ||
"name": "contactDetails", | ||
"baseName": "contactDetails", | ||
"type": "ContactDetails" | ||
}, | ||
{ | ||
"name": "description", | ||
"baseName": "description", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "metadata", | ||
"baseName": "metadata", | ||
"type": "{ [key: string]: string; }" | ||
}, | ||
{ | ||
"name": "migratedAccountHolderCode", | ||
"baseName": "migratedAccountHolderCode", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "primaryBalanceAccount", | ||
"baseName": "primaryBalanceAccount", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "reference", | ||
"baseName": "reference", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "status", | ||
"baseName": "status", | ||
"type": "AccountHolderUpdateRequest.StatusEnum" | ||
}, | ||
{ | ||
"name": "timeZone", | ||
"baseName": "timeZone", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "verificationDeadlines", | ||
"baseName": "verificationDeadlines", | ||
"type": "Array<VerificationDeadline>" | ||
} ]; | ||
|
||
static getAttributeTypeMap() { | ||
return AccountHolderUpdateRequest.attributeTypeMap; | ||
} | ||
} | ||
|
||
export namespace AccountHolderUpdateRequest { | ||
export enum StatusEnum { | ||
Active = 'active', | ||
Closed = 'closed', | ||
Inactive = 'inactive', | ||
Suspended = 'suspended' | ||
} | ||
} |
Oops, something went wrong.