@@ -2584,9 +2584,25 @@ class Meta:
2584
2584
url = {
2585
2585
InsertQuery .identifier : '/deposit-preauthorizations/card/direct' ,
2586
2586
SelectQuery .identifier : '/deposit-preauthorizations/' ,
2587
- UpdateQuery .identifier : '/deposit-preauthorizations/'
2587
+ UpdateQuery .identifier : '/deposit-preauthorizations/' ,
2588
+ 'GET_ALL_FOR_USER' : '/users/%(user_id)s/deposit-preauthorizations/' ,
2589
+ 'GET_ALL_FOR_CARD' : '/cards/%(card_id)s/deposit-preauthorizations/'
2588
2590
}
2589
2591
2592
+ @classmethod
2593
+ def get_all_for_user (cls , user_id , * args , ** kwargs ):
2594
+ kwargs ['user_id' ] = user_id
2595
+ select = SelectQuery (Deposit , * args , ** kwargs )
2596
+ select .identifier = 'GET_ALL_FOR_USER'
2597
+ return select .all (* args , ** kwargs )
2598
+
2599
+ @classmethod
2600
+ def get_all_for_card (cls , card_id , * args , ** kwargs ):
2601
+ kwargs ['card_id' ] = card_id
2602
+ select = SelectQuery (Deposit , * args , ** kwargs )
2603
+ select .identifier = 'GET_ALL_FOR_CARD'
2604
+ return select .all (* args , ** kwargs )
2605
+
2590
2606
2591
2607
class VirtualAccount (BaseModel ):
2592
2608
wallet_id = CharField (api_name = 'WalletId' , required = True )
@@ -2625,14 +2641,18 @@ class IdentityVerification(BaseModel):
2625
2641
hosted_url = CharField (api_name = 'HostedUrl' )
2626
2642
return_url = CharField (api_name = 'ReturnUrl' , required = True )
2627
2643
status = CharField (api_name = 'Status' )
2644
+ last_update = DateTimeField (api_name = 'UpdateDate' )
2645
+ user_id = CharField (api_name = 'UserId' )
2646
+ checks = ListField (api_name = 'Checks' )
2628
2647
2629
2648
class Meta :
2630
2649
verbose_name = 'identity_verification'
2631
2650
verbose_name_plural = 'identity_verifications'
2632
2651
2633
2652
url = {
2634
2653
InsertQuery .identifier : '/users/%(user_id)s/identity-verifications' ,
2635
- SelectQuery .identifier : '/identity-verifications'
2654
+ SelectQuery .identifier : '/identity-verifications' ,
2655
+ 'GET_ALL' : '/users/%(user_id)s/identity-verifications'
2636
2656
}
2637
2657
2638
2658
def create (self , user_id , idempotency_key = None , ** kwargs ):
@@ -2641,34 +2661,12 @@ def create(self, user_id, idempotency_key=None, **kwargs):
2641
2661
insert .insert_query = self .get_field_dict ()
2642
2662
return insert .execute ()
2643
2663
2644
- def get_checks (self , * args , ** kwargs ):
2645
- kwargs ['id' ] = self .id
2646
- select = SelectQuery (IdentityVerificationCheck , * args , ** kwargs )
2647
- select .identifier = 'GET_CHECKS'
2648
- return select .get ("" , * args , ** kwargs )
2649
-
2650
-
2651
- class IdentityVerificationCheck (BaseModel ):
2652
- session_id = CharField (api_name = 'SessionId' )
2653
- status = CharField (api_name = 'Status' )
2654
- creation_date = DateTimeField (api_name = 'CreationDate' )
2655
- last_update = DateTimeField (api_name = 'LastUpdate' )
2656
- checks = ListField (api_name = 'Checks' )
2657
-
2658
- class Meta :
2659
- verbose_name = 'identity_verification_check'
2660
- verbose_name_plural = 'identity_verifications_checks'
2661
-
2662
- url = {
2663
- 'GET_CHECKS' : '/identity-verifications/%(id)s/checks'
2664
- }
2665
-
2666
2664
@classmethod
2667
- def get (cls , identity_verification_id , * args , ** kwargs ):
2668
- kwargs ['id ' ] = identity_verification_id
2669
- select = SelectQuery (IdentityVerificationCheck , * args , ** kwargs )
2670
- select .identifier = 'GET_CHECKS '
2671
- return select .get ( "" , * args , ** kwargs )
2665
+ def get_all (cls , user_id , * args , ** kwargs ):
2666
+ kwargs ['user_id ' ] = user_id
2667
+ select = SelectQuery (IdentityVerification , * args , ** kwargs )
2668
+ select .identifier = 'GET_ALL '
2669
+ return select .all ( * args , ** kwargs )
2672
2670
2673
2671
2674
2672
class Recipient (BaseModel ):
@@ -2677,6 +2675,7 @@ class Recipient(BaseModel):
2677
2675
payout_method_type = CharField (api_name = 'PayoutMethodType' , required = True )
2678
2676
recipient_type = CharField (api_name = 'RecipientType' , required = True )
2679
2677
currency = CharField (api_name = 'Currency' , required = True )
2678
+ country = CharField (api_name = 'Country' )
2680
2679
recipient_scope = CharField (api_name = 'RecipientScope' )
2681
2680
user_id = CharField (api_name = 'UserId' )
2682
2681
individual_recipient = IndividualRecipientField (api_name = 'IndividualRecipient' )
@@ -2728,6 +2727,7 @@ class RecipientSchema(BaseModel):
2728
2727
payout_method_type = RecipientPropertySchemaField (api_name = 'PayoutMethodType' )
2729
2728
recipient_type = RecipientPropertySchemaField (api_name = 'RecipientType' )
2730
2729
currency = RecipientPropertySchemaField (api_name = 'Currency' )
2730
+ country = RecipientPropertySchemaField (api_name = 'Country' )
2731
2731
recipient_scope = RecipientPropertySchemaField (api_name = 'RecipientScope' )
2732
2732
tag = RecipientPropertySchemaField (api_name = 'Tag' )
2733
2733
individual_recipient = IndividualRecipientPropertySchemaField (api_name = 'IndividualRecipient' )
@@ -2741,14 +2741,15 @@ class Meta:
2741
2741
2742
2742
url = {
2743
2743
SelectQuery .identifier : '/recipients/schema?payoutMethodType=%(payout_method_type)s&recipientType=%('
2744
- 'recipient_type)s¤cy=%(currency)s'
2744
+ 'recipient_type)s¤cy=%(currency)s&country=%(country)s '
2745
2745
}
2746
2746
2747
2747
@classmethod
2748
- def get (cls , payout_method_type , recipient_type , currency , * args , ** kwargs ):
2748
+ def get (cls , payout_method_type , recipient_type , currency , country , * args , ** kwargs ):
2749
2749
kwargs ['payout_method_type' ] = payout_method_type
2750
2750
kwargs ['recipient_type' ] = recipient_type
2751
2751
kwargs ['currency' ] = currency
2752
+ kwargs ['country' ] = country
2752
2753
select = SelectQuery (RecipientSchema , * args , ** kwargs )
2753
2754
return select .get ("" , * args , ** kwargs )
2754
2755
0 commit comments