-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from julestex/add_legal_person_class
Add constants for LegalPersonType
- Loading branch information
Showing
5 changed files
with
16 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
namespace MangoPay; | ||
|
||
/** | ||
* Legal Person types | ||
*/ | ||
class LegalPersonType | ||
{ | ||
const Business = 'BUSINESS'; | ||
const Organization = 'ORGANIZATION'; | ||
} |
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
// CREATE LEGAL USER | ||
$legalUser = new MangoPay\UserLegal(); | ||
$legalUser->Name = 'Name Legal Test'; | ||
$legalUser->LegalPersonType = 'BUSINESS'; | ||
$legalUser->LegalPersonType = \MangoPay\LegalPersonType::Business; | ||
$legalUser->Email = '[email protected]'; | ||
$legalUser->LegalRepresentativeFirstName = "Bob"; | ||
$legalUser->LegalRepresentativeLastName = "Briant"; | ||
|
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
$User = new MangoPay\UserLegal(); | ||
$User->Name = "Name Legal Test"; | ||
$User->LegalPersonType = "BUSINESS"; | ||
$User->LegalPersonType = \MangoPay\LegalPersonType::Business; | ||
$User->Email = "[email protected]"; | ||
$User->LegalRepresentativeFirstName = "Bob"; | ||
$User->LegalRepresentativeLastName = "Briant"; | ||
|
@@ -12,4 +12,4 @@ | |
|
||
//Display result | ||
pre_dump($result); | ||
$_SESSION["MangoPayDemo"]["UserLegal"] = $result->Id; | ||
$_SESSION["MangoPayDemo"]["UserLegal"] = $result->Id; |
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 |
---|---|---|
|
@@ -165,7 +165,7 @@ protected function getMatrix() { | |
$user = new \MangoPay\UserLegal(); | ||
$user->Name = "MartixSampleOrg"; | ||
$user->Email = "[email protected]"; | ||
$user->LegalPersonType = "BUSINESS"; | ||
$user->LegalPersonType = \MangoPay\LegalPersonType::Business; | ||
$user->HeadquartersAddress = $this->getNewAddress(); | ||
$user->LegalRepresentativeFirstName = $john->FirstName; | ||
$user->LegalRepresentativeLastName = $john->LastName; | ||
|
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 |
---|---|---|
|
@@ -39,7 +39,7 @@ function test_Users_CreateLegal_PassesIfRequiredPropsProvided() { | |
$user->HeadquartersAddress->Region = 'Region'; | ||
$user->Name = "SomeOtherSampleOrg"; | ||
$user->Email = "[email protected]"; | ||
$user->LegalPersonType = "BUSINESS"; | ||
$user->LegalPersonType = \MangoPay\LegalPersonType::Business; | ||
$user->LegalRepresentativeFirstName = "FirstName"; | ||
$user->LegalRepresentativeLastName = "LastName"; | ||
$user->LegalRepresentativeAddress = new \MangoPay\Address(); | ||
|