setPolicy method

void setPolicy(
  1. FakeAgent a,
  2. String mode,
  3. String? holder
)

Sets the policy of a to mode with holder, raises its version and the permission version and stamps billing_mode_changed_at.

Implementation

void setPolicy(FakeAgent a, String mode, String? holder) {
  a
    ..billingMode = mode
    ..credentialHolderId = holder
    ..version += 1
    ..billingModeChangedAt = world.stamp()
    ..mismatchAtHeartbeat = false;
  world.permissionVersion++;
}