Fetch approval Summary
Parameters
ApprovalAPIInfo | A Struct that has Creator app info and approval type. |
---|---|
ApprovalTask | An Individual Approval record/task in the Approval list. |
completionHandler | Approval summary detail will be returned in completion Handler. |
Example
let approvalAPIInfo = ApprovalAPIInfo.init(appOwner: "<appOwner>", appLinkName: "<appLinkName>", listType: ApprovalAPIInfo.ApprovalListType.pending) ZCApprovalAPIService.fetchRecentApprovalList(for: approvalAPIInfo) { (result) in switch result { case .success(let approval): if let firstTask = approval.tasks.first { ZCApprovalAPIService.fetchApprovalSummary(for: firstTask, with: approvalAPIInfo) { (result) in switch result { case .success(let summary): print(summary) case .failure(let error): print(error) } } } case .failure(let error): print(error) } }