Skip to content

Instantly share code, notes, and snippets.

@arun12209
Created June 9, 2022 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arun12209/f1bdb6b0ee7a1eb6c563543b4779131f to your computer and use it in GitHub Desktop.
Save arun12209/f1bdb6b0ee7a1eb6c563543b4779131f to your computer and use it in GitHub Desktop.
//update account
ExternalService.BankService service = new ExternalService.BankService();
//set request
ExternalService.BankService.updateAccount_Request req = new ExternalService.BankService.updateAccount_Request();
req.accountName ='GreenMotorCorporation';
req.accountType = 'Customer';
try{
//make callout
ExternalService.BankService.updateAccount_Response res = service.updateAccount(req);
system.debug('200 response id => '+ res.Code200.id);
system.debug('200 repsonse: name => '+res.Code200.name);
system.debug('200 repsonse: available balance => '+res.Code200.availableBal);
system.debug('200 repsonse: type => '+res.Code200.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