createAccountCpmToken method

Future<CpmToken> createAccountCpmToken({
  1. required String accountId,
  2. List<String>? scopes,
  3. int? expiresIn,
  4. String? metadata,
  5. bool? keepAlive,
  6. bool? isShortToken,
  7. String? strategy,
  8. String? couponId,
})

Implementation

Future<CpmToken> createAccountCpmToken({
  required String accountId,
  List<String>? scopes,
  int? expiresIn,
  String? metadata,
  bool? keepAlive,
  bool? isShortToken,
  String? strategy,
  String? couponId,
}) async {
  return await invokeMethod<CpmToken>(
    (j) => CpmToken.fromJson(j),
    'autogen_createAccountCpmToken',
    {
      'env': this.env.index,
      'accessToken': this.accessToken,
      'account_id': accountId,
      'scopes': scopes,
      'expires_in': expiresIn,
      'metadata': metadata,
      'keep_alive': keepAlive,
      'is_short_token': isShortToken,
      'strategy': strategy,
      'coupon_id': couponId,
    },
  );
}