1
1
use common_utils:: fallback_reverse_lookup_not_found;
2
2
use diesel_models:: { kv, payment_method:: PaymentMethodUpdateInternal } ;
3
- use error_stack:: { report, IntoReport , ResultExt } ;
3
+ use error_stack:: { report, ResultExt } ;
4
4
use redis_interface:: HsetnxReply ;
5
5
use router_env:: { instrument, tracing} ;
6
6
use storage_impl:: redis:: kv_store:: { kv_wrapper, KvOperation , PartitionKey } ;
@@ -283,13 +283,12 @@ impl PaymentMethodInterface for Store {
283
283
let key_str = key. to_string ( ) ;
284
284
let field = format ! ( "payment_method_id_{}" , payment_method. payment_method_id) ;
285
285
286
- let p_update: diesel_models :: PaymentMethodUpdateInternal =
286
+ let p_update: PaymentMethodUpdateInternal =
287
287
payment_method_update. into ( ) ;
288
288
let updated_payment_method =
289
289
p_update. clone ( ) . apply_changeset ( payment_method. clone ( ) ) ;
290
290
291
291
let redis_value = serde_json:: to_string ( & updated_payment_method)
292
- . into_report ( )
293
292
. change_context ( errors:: StorageError :: SerializationFailed ) ?;
294
293
295
294
let redis_entry = kv:: TypedSql {
@@ -382,6 +381,7 @@ impl PaymentMethodInterface for Store {
382
381
async fn find_payment_method (
383
382
& self ,
384
383
payment_method_id : & str ,
384
+ _storage_scheme : MerchantStorageScheme
385
385
) -> CustomResult < storage:: PaymentMethod , errors:: StorageError > {
386
386
let conn = connection:: pg_connection_read ( self ) . await ?;
387
387
storage:: PaymentMethod :: find_by_payment_method_id ( & conn, payment_method_id)
@@ -393,6 +393,7 @@ impl PaymentMethodInterface for Store {
393
393
async fn find_payment_method_by_locker_id (
394
394
& self ,
395
395
locker_id : & str ,
396
+ _storage_scheme : MerchantStorageScheme ,
396
397
) -> CustomResult < storage:: PaymentMethod , errors:: StorageError > {
397
398
let conn = connection:: pg_connection_read ( self ) . await ?;
398
399
storage:: PaymentMethod :: find_by_locker_id ( & conn, locker_id)
@@ -422,6 +423,7 @@ impl PaymentMethodInterface for Store {
422
423
async fn insert_payment_method (
423
424
& self ,
424
425
payment_method_new : storage:: PaymentMethodNew ,
426
+ _storage_scheme : MerchantStorageScheme
425
427
) -> CustomResult < storage:: PaymentMethod , errors:: StorageError > {
426
428
let conn = connection:: pg_connection_write ( self ) . await ?;
427
429
payment_method_new
@@ -435,6 +437,7 @@ impl PaymentMethodInterface for Store {
435
437
& self ,
436
438
payment_method : storage:: PaymentMethod ,
437
439
payment_method_update : storage:: PaymentMethodUpdate ,
440
+ _storage_scheme : MerchantStorageScheme
438
441
) -> CustomResult < storage:: PaymentMethod , errors:: StorageError > {
439
442
let conn = connection:: pg_connection_write ( self ) . await ?;
440
443
payment_method
@@ -502,7 +505,7 @@ impl PaymentMethodInterface for MockDb {
502
505
async fn find_payment_method (
503
506
& self ,
504
507
payment_method_id : & str ,
505
- storage_scheme : MerchantStorageScheme ,
508
+ _storage_scheme : MerchantStorageScheme ,
506
509
) -> CustomResult < storage:: PaymentMethod , errors:: StorageError > {
507
510
let payment_methods = self . payment_methods . lock ( ) . await ;
508
511
let payment_method = payment_methods
@@ -522,7 +525,7 @@ impl PaymentMethodInterface for MockDb {
522
525
async fn find_payment_method_by_locker_id (
523
526
& self ,
524
527
locker_id : & str ,
525
- storage_scheme : MerchantStorageScheme ,
528
+ _storage_scheme : MerchantStorageScheme ,
526
529
) -> CustomResult < storage:: PaymentMethod , errors:: StorageError > {
527
530
let payment_methods = self . payment_methods . lock ( ) . await ;
528
531
let payment_method = payment_methods
@@ -560,7 +563,7 @@ impl PaymentMethodInterface for MockDb {
560
563
async fn insert_payment_method (
561
564
& self ,
562
565
payment_method_new : storage:: PaymentMethodNew ,
563
- storage_scheme : MerchantStorageScheme ,
566
+ _storage_scheme : MerchantStorageScheme ,
564
567
) -> CustomResult < storage:: PaymentMethod , errors:: StorageError > {
565
568
let mut payment_methods = self . payment_methods . lock ( ) . await ;
566
569
@@ -674,7 +677,7 @@ impl PaymentMethodInterface for MockDb {
674
677
& self ,
675
678
payment_method : storage:: PaymentMethod ,
676
679
payment_method_update : storage:: PaymentMethodUpdate ,
677
- storage_scheme : MerchantStorageScheme ,
680
+ _storage_scheme : MerchantStorageScheme ,
678
681
) -> CustomResult < storage:: PaymentMethod , errors:: StorageError > {
679
682
let pm_update_res = self
680
683
. payment_methods
0 commit comments