Coverage for benefits/enrollment_switchio/migrations/0002_switchioconfig_enrollment_api.py: 100%
6 statements
« prev ^ index » next coverage.py v7.9.2, created at 2025-07-15 17:49 +0000
« prev ^ index » next coverage.py v7.9.2, created at 2025-07-15 17:49 +0000
1# Generated by Django 5.1.7 on 2025-07-03 22:10
3import benefits.core.models.common
4import benefits.secrets
5from django.db import migrations, models
8class Migration(migrations.Migration):
10 dependencies = [
11 ("enrollment_switchio", "0001_initial"),
12 ]
14 operations = [
15 migrations.RemoveField(
16 model_name="switchioconfig",
17 name="api_key",
18 ),
19 migrations.RemoveField(
20 model_name="switchioconfig",
21 name="api_secret_name",
22 ),
23 migrations.AddField(
24 model_name="switchioconfig",
25 name="tokenization_api_key",
26 field=models.TextField(
27 blank=True, default="", help_text="The API key used to access the Switchio API for tokenization."
28 ),
29 ),
30 migrations.AddField(
31 model_name="switchioconfig",
32 name="tokenization_api_secret_name",
33 field=benefits.core.models.common.SecretNameField(
34 blank=True,
35 default="",
36 help_text="The name of the secret containing the api_secret value used to access the Switchio API for tokenization.", # noqa
37 max_length=127,
38 validators=[benefits.secrets.SecretNameValidator()],
39 ),
40 ),
41 migrations.AddField(
42 model_name="switchioconfig",
43 name="enrollment_api_authorization_header",
44 field=models.TextField(
45 blank=True,
46 default="",
47 help_text="The value to use for the 'Authorization' header when accessing the Switchio API for enrollment.",
48 ),
49 ),
50 migrations.AddField(
51 model_name="switchioconfig",
52 name="pto_id",
53 field=models.PositiveIntegerField(
54 blank=True,
55 default=0,
56 help_text="The Public Transport Operator ID to use with the Switchio API for enrollment.",
57 ),
58 ),
59 ]