Created
June 9, 2022 16:18
-
-
Save arun12209/16bbb9d552444d547bd372f6f97e0d25 to your computer and use it in GitHub Desktop.
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
ExternalService.BankService service = new ExternalService.BankService(); | |
//set request | |
ExternalService.BankService.addAccount_Request req = new ExternalService.BankService.addAccount_Request(); | |
req.accountName = 'GreenMotorCorporation'; | |
req.accountType = 'Customer'; | |
try{ | |
//make callout | |
ExternalService.BankService.addAccount_Response res = service.addAccount(req); | |
system.debug('200 response id => '+ res.Code201.id); | |
system.debug('200 repsonse: name => '+res.Code201.name); | |
system.debug('200 repsonse: available balance => '+res.Code201.availableBal); | |
system.debug('200 repsonse: type => '+res.Code201.z0type); | |
}catch(ExternalService.BankService.getAccount_ResponseException exc){ | |
system.debug('404 response: error message => '+ exc.code404.errorMessage); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment