createAgent method

Future<CreateAgentResponse> createAgent(
  1. String pacAgentId,
  2. String ipAddressExpected
)

Implementation

Future<CreateAgentResponse> createAgent(String pacAgentId, String ipAddressExpected) async {
  try {
    final request = CreateAgentRequest()
      ..pacAgentId = pacAgentId
      ..ipAddressExpected = ipAddressExpected;

    return await _client.createAgent(request);
  } catch (e) {
    print('Caught error in createAgent: $e');
    rethrow;
  }
}