Orchestrator

To maintain a standard between the requests and responses of the application, each of the services that are being used are categorized.
For example:
Banking as Services.
Within Banking-as-a-Service, we have Rize, Galileo and Unit.
Then, the parameters that must be sent and those that are expected to be received for each of the services are studied:

For example:
See the format in which it receives and sends the information from the external service API (CamelCase, Snake_case, Pascal).
This are examples of responses from Galileo and Unit, where we can see that Galileo uses snake_case and Unit uses camelCase.
{
"status_code": 0,
"status": "Success",
"processing_time": 0.082,
"response_data": {
"pmt_ref_no": "001104890593",
"status": "N",
"application_date": "2019-04-04",
"balance": 1218.2,
"currency_code": "840",
"profile": {
"first_name": "Automation",
"middle_name": "Jr",
"last_name": "Testing",
"address_1": "33 Maple Street",
"address_2": "#4b",
"city": "Salt Lake City",
"state": "UT",
"postal_code": "84121",
"country_code": "840",
"home_phone": "8013656060",
"mobile_phone": "8012222222",
"email": "[email protected]",
"dob": "1980-01-01",
"ship_to_address": {
"address_1": "33 Business Parkway",
"address_2": "Suite 400",
"city": "Salt Lake City",
"state": "UT",
"postal_code": "84121",
"country_code": "840"
},
"express_mail": "N",
"occupation": "Project Manager",
"income_source": "Kroger Food & Drug"
},
"start_date": "2019-09-30 00:00:00",
"end_date": "2019-10-01 23:59:59",
"transaction_count": 0,
"transactions": [],
"authorization_count": 0,
"authorizations": [],
"pending_fees": [],
"savings_interest": {
"start_date": "2019-09-30 00:00:00",
"end_date": "2019-10-01 23:59:59",
"accrual_interest": 0,
"interest_ytd": 0,
"apy": "0"
}
},
"echo": {
"provider_transaction_id": "",
"provider_timestamp": null,
"transaction_id": "YH9JNYJUBKW0L5NKSVNB"
},
"rtoken": "8cc16de0-5eda-4e2a-968e-3b08fce6f778",
"system_timestamp": "2020-07-13 10:31:50"
}
See the structure of each endpoint to be used for sending information.
This is a request to update a user's account information.
Galileo uses application/x-www-form-urlencoded format for sending information.
curl --request POST \
--url https://sandbox-api.gpsrv.com/intserv/4.0/updateAccount \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data apiLogin=AbC123-9999 \
--data apiTransKey=4sb62fh6w4h7w34g \
--data providerId=9999 \
--data transactionId=9845dk-39fdk3fj3-4483483478 \
--data accountNo=string \
--data idType=0 \
--data id=string \
--data idType2=0 \
--data id2=string \
--data locationType=0 \
--data location=string \
--data locale=en_US \
--data firstName=string \
--data middleName=string \
--data lastName=string \
--data dateOfBirth=2022-10-10T18:10:08.166Z \
--data address1=string \
--data address2=string \
In addition to using different formats to send information, we can see that the structure of the object that is sent is very different for both services.
Galileo is using a simpler structure (key, value) than Unit, since the parent object of Unit has other objects inside of it.
See each of the validations that must be met by each of the services.
Example:
Dates format as established by the service.
Remove hyphens in phone numbers or documents.
For this entire process, Data Transfer Objects (DTOs) were created, that are specific to Linker, and then this DTO is transformed into the DTO used by the service to which the request will be sent. In the same way, to transform the response of an external service, interfaces were created to use Linker.
For the integration of a new service, it must first be verified if the DTOs and interfaces to be used have not been defined.
Otherwise, they should be created in a general way so that if another service of the same category is integrated in the future, it can also use the same interfaces and DTOs.
Last updated
Was this helpful?