-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137 from xendit/feat/support-xp-v2-accounts
Feat/support xp v2 accounts
- Loading branch information
Showing
9 changed files
with
363 additions
and
3 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
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
const ACCOUNT_EMAIL = '[email protected]'; | ||
const ID = '61fb6d4d92b2ff75d2b45059'; | ||
const BUSINESS_NAME = 'angies pink panther'; | ||
const UPDATED_EMAIL = '[email protected]'; | ||
const UPDATED_BUSINESS_NAME = 'angies updated pink panther'; | ||
const TYPE = 'MANAGED'; | ||
const URL = 'https://www.xendit.co/callback_catcher'; | ||
const CALLBACK_TYPE = 'invoice'; | ||
|
@@ -15,6 +19,14 @@ const ROUTES = [ | |
}, | ||
]; | ||
|
||
const PUBLIC_PROFILE = { | ||
business_name: BUSINESS_NAME, | ||
}; | ||
|
||
const UPDATED_PUBLIC_PROFILE = { | ||
business_name: UPDATED_BUSINESS_NAME, | ||
}; | ||
|
||
const VALID_CREATE_ACCOUNT_RESPONSE = { | ||
created: '2019-01-01T08:51:44.484Z', | ||
status: 'SUCCESSFUL', | ||
|
@@ -51,9 +63,54 @@ const VALID_CREATE_FEE_RULE_RESPONSE = { | |
metadata: {}, | ||
}; | ||
|
||
const VALID_CREATE_V2_ACCOUNT_RESPONSE = { | ||
id: ID, | ||
created: '2022-02-01T07:00:00.000Z', | ||
updated: '2022-02-01T07:00:00.000Z', | ||
email: ACCOUNT_EMAIL, | ||
type: TYPE, | ||
public_profile: { | ||
business_name: BUSINESS_NAME, | ||
}, | ||
country: 'ID', | ||
status: 'REGISTERED', | ||
}; | ||
|
||
const VALID_GET_ACCOUNT_RESPONSE = { | ||
id: ID, | ||
created: '2022-02-01T07:00:00.000Z', | ||
updated: '2022-02-01T07:00:00.000Z', | ||
email: ACCOUNT_EMAIL, | ||
type: TYPE, | ||
public_profile: { | ||
business_name: BUSINESS_NAME, | ||
}, | ||
country: 'ID', | ||
status: 'REGISTERED', | ||
}; | ||
|
||
const VALID_UPDATE_ACCOUNT_RESPONSE = { | ||
id: ID, | ||
created: '2022-02-01T07:00:00.000Z', | ||
updated: '2022-02-01T07:00:00.000Z', | ||
email: UPDATED_EMAIL, | ||
type: TYPE, | ||
public_profile: { | ||
business_name: UPDATED_BUSINESS_NAME, | ||
}, | ||
country: 'ID', | ||
status: 'REGISTERED', | ||
}; | ||
|
||
module.exports = { | ||
ID, | ||
ACCOUNT_EMAIL, | ||
TYPE, | ||
UPDATED_EMAIL, | ||
BUSINESS_NAME, | ||
UPDATED_BUSINESS_NAME, | ||
PUBLIC_PROFILE, | ||
UPDATED_PUBLIC_PROFILE, | ||
URL, | ||
CALLBACK_TYPE, | ||
REFERENCE, | ||
|
@@ -66,4 +123,7 @@ module.exports = { | |
VALID_SET_CALLBACK_URL_RESPONSE, | ||
VALID_CREATE_TRANSFER_RESPONSE, | ||
VALID_CREATE_FEE_RULE_RESPONSE, | ||
VALID_CREATE_V2_ACCOUNT_RESPONSE, | ||
VALID_GET_ACCOUNT_RESPONSE, | ||
VALID_UPDATE_ACCOUNT_RESPONSE, | ||
}; |
Oops, something went wrong.