@@ -8,27 +8,23 @@ use utoipa::{schema, ToSchema};
8
8
#[ cfg( all( feature = "v2" , feature = "tokenization_v2" ) ) ]
9
9
#[ derive( Debug , Serialize , Deserialize , ToSchema ) ]
10
10
pub struct GenericTokenizationResponse {
11
+ /// Unique identifier returned by the tokenization service
11
12
#[ schema( value_type = String , example = "12345_tok_01926c58bc6e77c09e809964e72af8c8" ) ]
12
13
pub id : GlobalTokenId ,
14
+ /// Created time of the tokenization id
13
15
#[ schema( value_type = PrimitiveDateTime , example = "2024-02-24T11:04:09.922Z" ) ]
14
16
pub created_at : PrimitiveDateTime ,
17
+ /// Status of the tokenization id created
15
18
#[ schema( value_type = String , example = "enabled" ) ]
16
19
pub flag : common_enums:: TokenizationFlag ,
17
20
}
18
21
#[ cfg( all( feature = "v2" , feature = "tokenization_v2" ) ) ]
19
22
#[ derive( Debug , Serialize , Deserialize , ToSchema ) ]
20
23
pub struct GenericTokenizationRequest {
21
- // Customer ID for which the tokenization is requested
24
+ /// Customer ID for which the tokenization is requested
22
25
#[ schema( value_type = String , example = "12345_cus_01926c58bc6e77c09e809964e72af8c8" ) ]
23
26
pub customer_id : GlobalCustomerId ,
24
- // Request for tokenization which contains the data to be tokenized
27
+ /// Request for tokenization which contains the data to be tokenized
25
28
#[ schema( value_type = Object , example = json!( { "city" : "NY" , "unit" : "245" } ) ) ]
26
29
pub token_request : masking:: Secret < serde_json:: Value > ,
27
30
}
28
-
29
- #[ cfg( all( feature = "v2" , feature = "tokenization_v2" ) ) ]
30
- #[ derive( Default , Debug , serde:: Deserialize , serde:: Serialize , Clone ) ]
31
- pub struct TokenizationQueryParameters {
32
- // Parameter to view tokenization data or not
33
- pub reveal : Option < bool > ,
34
- }
0 commit comments