mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-27 00:54:54 +00:00
feat: finish create and inquire application api and handle response and errors
This commit is contained in:
@ -1,91 +1,728 @@
|
||||
export const INQUIRE_APPLICATION_MOCK = {
|
||||
ResponseHeader: {
|
||||
Version: '1.0.0',
|
||||
MsgUid: 'stringstringstringstringstringstring',
|
||||
Source: 'string',
|
||||
ServiceId: 'string',
|
||||
ReqDateTime: '2025-05-26T10:23:13.812Z',
|
||||
RspDateTime: '2025-05-26T10:23:13.812Z',
|
||||
ResponseCode: 'string',
|
||||
ResponseType: 'Validation Error',
|
||||
ProcessingTime: 0,
|
||||
EncryptionKey: 'string',
|
||||
ResponseDescription: 'string',
|
||||
LocalizedResponseDescription: {
|
||||
Locale: 'string',
|
||||
LocalizedDescription: 'string',
|
||||
},
|
||||
CustomerSpecificResponseDescriptionList: [
|
||||
{
|
||||
Locale: 'string',
|
||||
ResponseDescription: 'string',
|
||||
},
|
||||
],
|
||||
HeaderUserDataList: [
|
||||
{
|
||||
Tag: 'string',
|
||||
Value: 'string',
|
||||
},
|
||||
],
|
||||
MsgUid: 'adaa1893-9f95-48a8-b7a1-0422bcf629b4',
|
||||
Source: 'ZOD',
|
||||
ServiceId: 'InquireApplication',
|
||||
ReqDateTime: '2023-07-18T10:34:12.553Z',
|
||||
RspDateTime: '2025-06-03T11:14:54.748',
|
||||
ResponseCode: '000',
|
||||
ResponseType: 'Success',
|
||||
ProcessingTime: 476,
|
||||
EncryptionKey: null,
|
||||
ResponseDescription: 'Operation Successful',
|
||||
LocalizedResponseDescription: null,
|
||||
CustomerSpecificResponseDescriptionList: null,
|
||||
HeaderUserDataList: null,
|
||||
},
|
||||
|
||||
InquireApplicationResponseDetails: {
|
||||
InstitutionCode: 'stri',
|
||||
InstitutionCode: '1100',
|
||||
ApplicationTypeDetails: {
|
||||
TypeCode: 'st',
|
||||
Description: 'string',
|
||||
Additional: true,
|
||||
Corporate: true,
|
||||
UserData: 'string',
|
||||
TypeCode: '01',
|
||||
Description: 'Normal Primary',
|
||||
Additional: false,
|
||||
Corporate: false,
|
||||
UserData: null,
|
||||
},
|
||||
ApplicationDetails: {
|
||||
ApplicationNumber: 'string',
|
||||
ExternalApplicationNumber: 'string',
|
||||
ApplicationStatus: 'st',
|
||||
cif: null,
|
||||
ApplicationNumber: '3300000000070',
|
||||
ExternalApplicationNumber: '10000002',
|
||||
ApplicationStatus: '04',
|
||||
Organization: 0,
|
||||
Product: 'stri',
|
||||
ApplicatonDate: '2025-05-26',
|
||||
ApplicationSource: 's',
|
||||
SalesSource: 'string',
|
||||
DeliveryMethod: 's',
|
||||
ProgramCode: 'string',
|
||||
Campaign: 'string',
|
||||
Plastic: 'string',
|
||||
Design: 'string',
|
||||
ProcessStage: 'st',
|
||||
ProcessStageStatus: 's',
|
||||
Score: 'string',
|
||||
ExternalScore: 'string',
|
||||
Product: '1101',
|
||||
ApplicatonDate: '2025-05-29',
|
||||
ApplicationSource: 'O',
|
||||
SalesSource: null,
|
||||
DeliveryMethod: 'V',
|
||||
ProgramCode: null,
|
||||
Campaign: null,
|
||||
Plastic: null,
|
||||
Design: null,
|
||||
ProcessStage: '99',
|
||||
ProcessStageStatus: 'S',
|
||||
Score: null,
|
||||
ExternalScore: null,
|
||||
RequestedLimit: 0,
|
||||
SuggestedLimit: 0,
|
||||
SuggestedLimit: null,
|
||||
AssignedLimit: 0,
|
||||
AllowedLimitList: [
|
||||
AllowedLimitList: null,
|
||||
EligibilityCheckResult: '00',
|
||||
EligibilityCheckDescription: null,
|
||||
Title: 'Mr.',
|
||||
FirstName: 'Abdalhamid',
|
||||
SecondName: null,
|
||||
ThirdName: null,
|
||||
LastName: ' Ahmad',
|
||||
FullName: 'Abdalhamid Ahmad',
|
||||
EmbossName: 'ABDALHAMID AHMAD',
|
||||
PlaceOfBirth: null,
|
||||
DateOfBirth: '1999-01-07',
|
||||
LocalizedDateOfBirth: '1999-01-07',
|
||||
Age: 26,
|
||||
Gender: 'M',
|
||||
Married: 'U',
|
||||
Nationality: '682',
|
||||
IdType: '01',
|
||||
IdNumber: '1089055972',
|
||||
IdExpiryDate: '2031-09-17',
|
||||
EducationLevel: null,
|
||||
ProfessionCode: 0,
|
||||
NumberOfDependents: 0,
|
||||
EmployerName: 'N/A',
|
||||
EmploymentYears: 0,
|
||||
EmploymentMonths: 0,
|
||||
EmployerPhoneArea: null,
|
||||
EmployerPhoneNumber: null,
|
||||
EmployerPhoneExtension: null,
|
||||
EmployerMobile: null,
|
||||
EmployerFaxArea: null,
|
||||
EmployerFax: null,
|
||||
EmployerCity: null,
|
||||
EmployerAddress: null,
|
||||
EmploymentActivity: null,
|
||||
EmploymentStatus: null,
|
||||
CIF: null,
|
||||
BankAccountNumber: ' ',
|
||||
Currency: {
|
||||
CurrCode: '682',
|
||||
AlphaCode: 'SAR',
|
||||
},
|
||||
RequestedCurrencyList: null,
|
||||
CreditAccountNumber: '6823000000000019',
|
||||
AccountType: '30',
|
||||
OpenDate: null,
|
||||
Income: 0,
|
||||
AdditionalIncome: 0,
|
||||
TotalIncome: 0,
|
||||
CurrentBalance: 0,
|
||||
AverageBalance: 0,
|
||||
AssetsBalance: 0,
|
||||
InsuranceBalance: 0,
|
||||
DepositAmount: 0,
|
||||
GuarenteeAccountNumber: null,
|
||||
GuarenteeAmount: 0,
|
||||
InstalmentAmount: 0,
|
||||
AutoDebit: 'N',
|
||||
PaymentMethod: '2',
|
||||
BillingCycle: 'C1',
|
||||
OldIssueDate: null,
|
||||
OtherPaymentsDate: null,
|
||||
MaximumDelinquency: null,
|
||||
CreditBureauDecision: null,
|
||||
CreditBureauUserData: null,
|
||||
ECommerce: 'N',
|
||||
NumberOfCards: 0,
|
||||
OtherBank: null,
|
||||
OtherBankDescription: null,
|
||||
InsuranceProduct: null,
|
||||
SocialCode: '000',
|
||||
JobGrade: 0,
|
||||
Flags: [
|
||||
{
|
||||
CreditLimit: 0,
|
||||
EvaluationCode: 'string',
|
||||
Position: 1,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 2,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 3,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 4,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 5,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 6,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 7,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 8,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 9,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 10,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 11,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 12,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 13,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 14,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 15,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 16,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 17,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 18,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 19,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 20,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 21,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 22,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 23,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 24,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 25,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 26,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 27,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 28,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 29,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 30,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 31,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 32,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 33,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 34,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 35,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 36,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 37,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 38,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 39,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 40,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 41,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 42,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 43,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 44,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 45,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 46,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 47,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 48,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 49,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 50,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 51,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 52,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 53,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 54,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 55,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 56,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 57,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 58,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 59,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 60,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 61,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 62,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 63,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 64,
|
||||
Value: '0',
|
||||
},
|
||||
],
|
||||
EligibilityCheckResult: 'string',
|
||||
EligibilityCheckDescription: 'string',
|
||||
Title: 'string',
|
||||
FirstName: 'string',
|
||||
SecondName: 'string',
|
||||
ThirdName: 'string',
|
||||
LastName: 'string',
|
||||
FullName: 'string',
|
||||
EmbossName: 'string',
|
||||
PlaceOfBirth: 'string',
|
||||
DateOfBirth: '2025-05-26',
|
||||
LocalizedDateOfBirth: '2025-05-26',
|
||||
Age: 20,
|
||||
Gender: 'M',
|
||||
Married: 'S',
|
||||
Nationality: 'str',
|
||||
IdType: 'st',
|
||||
IdNumber: 'string',
|
||||
IdExpiryDate: '2025-05-26',
|
||||
EducationLevel: 'stri',
|
||||
ProfessionCode: 0,
|
||||
CheckFlags: [
|
||||
{
|
||||
Position: 1,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 2,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 3,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 4,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 5,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 6,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 7,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 8,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 9,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 10,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 11,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 12,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 13,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 14,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 15,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 16,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 17,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 18,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 19,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 20,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 21,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 22,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 23,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 24,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 25,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 26,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 27,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 28,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 29,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 30,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 31,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 32,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 33,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 34,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 35,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 36,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 37,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 38,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 39,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 40,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 41,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 42,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 43,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 44,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 45,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 46,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 47,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 48,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 49,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 50,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 51,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 52,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 53,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 54,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 55,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 56,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 57,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 58,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 59,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 60,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 61,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 62,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 63,
|
||||
Value: '0',
|
||||
},
|
||||
{
|
||||
Position: 64,
|
||||
Value: '0',
|
||||
},
|
||||
],
|
||||
Maker: null,
|
||||
Checker: null,
|
||||
ReferredTo: null,
|
||||
ReferralReason: null,
|
||||
UserData1: null,
|
||||
UserData2: null,
|
||||
UserData3: null,
|
||||
UserData4: null,
|
||||
UserData5: null,
|
||||
AdditionalFields: [],
|
||||
},
|
||||
ApplicationStatusDetails: {
|
||||
StatusCode: '04',
|
||||
Description: 'Approved',
|
||||
Canceled: false,
|
||||
},
|
||||
ApplicationHistoryList: null,
|
||||
ApplicationAddressList: [
|
||||
{
|
||||
Id: 43859,
|
||||
AddressLine1: '5536 abdullah Ibn al zubair ',
|
||||
AddressLine2: ' Umm Alarad Dist.',
|
||||
AddressLine3: null,
|
||||
AddressLine4: null,
|
||||
AddressLine5: null,
|
||||
Directions: null,
|
||||
City: 'AT TAIF',
|
||||
PostalCode: null,
|
||||
Province: null,
|
||||
Territory: null,
|
||||
State: null,
|
||||
Region: null,
|
||||
County: null,
|
||||
Country: '682',
|
||||
CountryDetails: {
|
||||
IsoCode: '682',
|
||||
Alpha3: 'SAU',
|
||||
Alpha2: 'SA',
|
||||
DefaultCurrency: {
|
||||
CurrCode: '682',
|
||||
AlphaCode: 'SAR',
|
||||
},
|
||||
Description: [
|
||||
{
|
||||
Language: 'EN',
|
||||
Description: 'SAUDI ARABIA',
|
||||
},
|
||||
{
|
||||
Language: 'GB',
|
||||
Description: 'SAUDI ARABIA',
|
||||
},
|
||||
],
|
||||
},
|
||||
Phone1: '+966541884784',
|
||||
Phone2: null,
|
||||
Extension: null,
|
||||
Email: 'a.ahmad@zod-alkhair.com',
|
||||
Fax: null,
|
||||
District: null,
|
||||
PoBox: null,
|
||||
OwnershipType: 'O',
|
||||
UserData1: null,
|
||||
UserData2: null,
|
||||
AddressRole: 0,
|
||||
AddressCustomValues: null,
|
||||
},
|
||||
],
|
||||
CorporateDetails: null,
|
||||
CustomerDetails: {
|
||||
Id: 115129,
|
||||
CustomerCode: '100000024552',
|
||||
IdNumber: ' ',
|
||||
TypeId: 0,
|
||||
PreferredLanguage: 'EN',
|
||||
ExternalCustomerCode: null,
|
||||
Title: ' ',
|
||||
FirstName: ' ',
|
||||
LastName: ' ',
|
||||
DateOfBirth: null,
|
||||
UserData1: '2031-09-17',
|
||||
UserData2: '01',
|
||||
UserData3: null,
|
||||
UserData4: '682',
|
||||
CustomerSegment: null,
|
||||
Gender: 'U',
|
||||
Married: 'U',
|
||||
},
|
||||
|
||||
BranchDetails: null,
|
||||
CardAccountLinkageList: null,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user