Coverage for benefits / enrollment_switchio / migrations / 0002_switchioconfig_enrollment_api.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-02-13 19:35 +0000

1# Generated by Django 5.1.7 on 2025-07-03 22:10 

2 

3from django.db import migrations, models 

4 

5import benefits.core.models.common 

6import benefits.secrets 

7 

8 

9class Migration(migrations.Migration): 

10 

11 dependencies = [ 

12 ("enrollment_switchio", "0001_initial"), 

13 ] 

14 

15 operations = [ 

16 migrations.RemoveField( 

17 model_name="switchioconfig", 

18 name="api_key", 

19 ), 

20 migrations.RemoveField( 

21 model_name="switchioconfig", 

22 name="api_secret_name", 

23 ), 

24 migrations.AddField( 

25 model_name="switchioconfig", 

26 name="tokenization_api_key", 

27 field=models.TextField( 

28 blank=True, default="", help_text="The API key used to access the Switchio API for tokenization." 

29 ), 

30 ), 

31 migrations.AddField( 

32 model_name="switchioconfig", 

33 name="tokenization_api_secret_name", 

34 field=benefits.core.models.common.SecretNameField( 

35 blank=True, 

36 default="", 

37 help_text="The name of the secret containing the api_secret value used to access the Switchio API for tokenization.", # noqa 

38 max_length=127, 

39 validators=[benefits.secrets.SecretNameValidator()], 

40 ), 

41 ), 

42 migrations.AddField( 

43 model_name="switchioconfig", 

44 name="enrollment_api_authorization_header", 

45 field=models.TextField( 

46 blank=True, 

47 default="", 

48 help_text="The value to use for the 'Authorization' header when accessing the Switchio API for enrollment.", 

49 ), 

50 ), 

51 migrations.AddField( 

52 model_name="switchioconfig", 

53 name="pto_id", 

54 field=models.PositiveIntegerField( 

55 blank=True, 

56 default=0, 

57 help_text="The Public Transport Operator ID to use with the Switchio API for enrollment.", 

58 ), 

59 ), 

60 ]