createFiatOnRampCredential method
Future<TCreateFiatOnRampCredentialResponse>
createFiatOnRampCredential({
- required TCreateFiatOnRampCredentialBody input,
Create a fiat on ramp provider credential
Sign the provided TCreateFiatOnRampCredentialBody with the client's stamp function and submit the request (POST /public/v1/submit/create_fiat_on_ramp_credential).
See also: stampCreateFiatOnRampCredential.
Implementation
Future<TCreateFiatOnRampCredentialResponse> createFiatOnRampCredential({
required TCreateFiatOnRampCredentialBody input,
}) async {
final body = packActivityBody(
bodyJson: input.toJson(),
fallbackOrganizationId: input.organizationId ??
config.organizationId ??
(throw Exception(
"Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
activityType: 'ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL',
);
return await request<Map<String, dynamic>,
TCreateFiatOnRampCredentialResponse>(
"/public/v1/submit/create_fiat_on_ramp_credential",
body,
(json) => TCreateFiatOnRampCredentialResponse.fromJson(
transformActivityResponse(json, 'CreateFiatOnRampCredential')));
}