-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update card and contact addition functionality for mobile phones
This commit integrates mobile phone handling in the card and contact addition process. Both additions of contacts with and without mobile phones are now supported, which are also covered in the new test cases. The mobile phone is also now accounted for in the card verification process. Additionally, HTTP client timeout has been reduced from 60 to 30. Signed-off-by: B24io <[email protected]>
- Loading branch information
Showing
7 changed files
with
132 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace B24io\Loyalty\SDK\Common\Result\Contacts; | ||
|
||
use B24io\Loyalty\SDK\Common\VerificationStatus; | ||
use B24io\Loyalty\SDK\Core\Result\AbstractItem; | ||
use Exception; | ||
use libphonenumber\PhoneNumber; | ||
|
||
|
||
/** | ||
* @property-read VerificationStatus $verificationStatus | ||
* @property-read PhoneNumber $number | ||
*/ | ||
class MobilePhoneItemResult extends AbstractItem | ||
{ | ||
/** | ||
* @param int|string $offset | ||
* @throws Exception | ||
*/ | ||
public function __get($offset) | ||
{ | ||
switch ($offset) { | ||
case 'number': | ||
return $this->phoneNumberUtil->parse($this->data[$offset], null); | ||
case 'verificationStatus': | ||
return new VerificationStatus($this->data['verification_status']); | ||
default: | ||
return parent::__get($offset); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters