Mangopay / mangopay2-php-sdk

PHP SDK for MANGOPAY
https://packagist.org/packages/mangopay/php-sdk-v2
MIT License
123 stars 134 forks source link

Add userId in MangoPay\UboDeclaration #454

Closed tdumalin closed 3 years ago

tdumalin commented 3 years ago

Hello,

It would be nice to add UserId in MangoPay\UboDeclaration class for convenience, actually i need to create a table on my database to retrieve an user Id from ubo declaration. In my case i want to send an email to notify users when ubo decalration status has changed, when hook is triggered with something like this:

$api = new \MangoPay\MangoPayApi();
$id = $_GET['RessourceId'];
$declaration = $api->UboDeclarations->GetById($id); 
$user = $api->Users->Get($declaration->UserId);
//notify $user->Email;
mangomaxoasis commented 3 years ago

Hi @tdumalin We're looking into it

jns-dev commented 3 years ago

I have already reported this problem in #361, but the "UserId" still not added.