Skip to content

Commit

Permalink
Merge pull request #64 from Troopers/feature/legal-user
Browse files Browse the repository at this point in the history
Feature/legal user
  • Loading branch information
paulandrieux authored Sep 20, 2018
2 parents 16dfee4 + d968304 commit aa5b713
Show file tree
Hide file tree
Showing 14 changed files with 821 additions and 174 deletions.
50 changes: 48 additions & 2 deletions Entity/BankInformationInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,46 @@
interface BankInformationInterface
{
/**
* Author Mango Id.
* BankInformation address.
*
* @var string
*/
public function getAddress();
public function getBankInformationStreetAddress();

/**
* BankInformation address.
*
* @var string
*/
public function getBankInformationAdditionalStreetAddress();

/**
* BankInformation address.
*
* @var string
*/
public function getBankInformationCity();

/**
* BankInformation address.
*
* @var string
*/
public function getBankInformationPostalCode();

/**
* BankInformation address.
*
* @var string
*/
public function getBankInformationCountry();

/**
* BankInformation name.
*
* @var string
*/
public function getBankInformationFullName();

/**
* It represents the amount debited on the bank account of the Author.In cents so 100€ will be written like « Amount » : 10000
Expand All @@ -22,4 +57,15 @@ public function getAddress();
* @var string
*/
public function getIban();

/**
* The user bank informations belongs to
*
* @var UserInterface
*/
public function getUser();

public function getMangoBankAccountId();

public function setMangoBankAccountId($mangoBankAccountId);
}
195 changes: 195 additions & 0 deletions Entity/LegalUserInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
<?php

namespace Troopers\MangopayBundle\Entity;
use Symfony\Component\HttpFoundation\File\File;

/**
* Defines mandatory methods a Mango user should have
* https://docs.mangopay.com/api-references/users/legal-users/.
*/
interface LegalUserInterface extends UserInterface
{
/**
* @var string
* Business name. (<100 chars)
*/
public function getName();

/**
* @var string
* The type of legal user
*/
public function getLegalPersonType();

/**
* @var string
* The address of the company’s Legal representative person
*/
public function getHeadquartersStreetAddress();

/**
* @var string
* The address of the company’s Legal representative person
*/
public function getHeadquartersAdditionalStreetAddress();

/**
* @var string
* The address of the company’s Legal representative person
*/
public function getHeadquartersCity();

/**
* @var string
* The address of the company’s Legal representative person
*/
public function getHeadquartersCountry();

/**
* @var string
* The address of the company’s Legal representative person
*/
public function getHeadquartersPostalCode();

/**
* @var string
* The firstname of the company’s Legal representative person (<100 chars)
*/
public function getLegalRepresentativeFirstName();

/**
* @var string
* The lastname of the company’s Legal representative person (<100 chars)
*/
public function getLegalRepresentativeLastName();

/**
* @var string
* The address of the company’s Legal representative person
*/
public function getLegalRepresentativeAddress();

/**
* @var string
* The address of the company’s Legal representative person
*/
public function getLegalRepresentativeStreetAddress();

/**
* @var string
* The address of the company’s Legal representative person
*/
public function getLegalRepresentativeAdditionalStreetAddress();

/**
* @var string
* The address of the company’s Legal representative person
*/
public function getLegalRepresentativeCity();

/**
* @var string
* The address of the company’s Legal representative person
*/
public function getLegalRepresentativeCountry();

/**
* @var string
* The address of the company’s Legal representative person
*/
public function getLegalRepresentativePostalCode();

/**
* @var string
* The email of the company’s Legal representative person - must be a valid
*/
public function getLegalRepresentativeEmail();

/**
* @var date
* The date of birth of the company’s Legal representative person - be careful to set the right timezone
* (should be UTC) to avoid 00h becoming 23h (and hence interpreted as the day before)
*/
public function getLegalRepresentativeBirthday();

/**
* @var string
* The nationality of the company’s Legal representative person.
* ISO 3166-1 alpha-2 format is expected
*/
public function getLegalRepresentativeNationality();

/**
* @var string
* The country of residence of the company’s Legal representative person.
* ISO 3166-1 alpha-2 format is expected
*/
public function getLegalRepresentativeCountryOfResidence();

/**
* @var string
* The official registered number of the business
*/
public function getCompanyNumber();

/**
* @var string
* ID Card, Passport or driving licence for SEPA area. Passeport or driving licence for the UK, USA and
* Canada. For other nationalities a passport is required.
* In the case of a legal user, this document should refer to the individual duly empowered to act on
* behalf of the legal entity
*/
public function getLegalRepresentativeProofOfIdentityId();

/**
* @var string
* Certified articles of association (Statute) - formal memorandum stated by the entrepreneurs, in which
* the following information is mentioned: business name, activity, registered address, shareholding…
*/
public function getStatuteId();

/**
* @var string
* Extract from the Company Register issued within the last three months
* In the case of an organization or soletrader, this can be a proof of registration from the official
* authority
*/
public function getProofOfRegistrationId();

/**
* @var string
* Shareholder declaration (as https://www.mangopay.com/terms/shareholder-declaration/Shareholder_Declaration-EN.pdf)
*/
public function getShareholderDeclarationId();

/**
* @var File
* ID Card, Passport or driving licence for SEPA area. Passeport or driving licence for the UK, USA and
* Canada. For other nationalities a passport is required.
* In the case of a legal user, this document should refer to the individual duly empowered to act on
* behalf of the legal entity
*/
public function getLegalRepresentativeProofOfIdentity();

/**
* @var File
* Certified articles of association (Statute) - formal memorandum stated by the entrepreneurs, in which
* the following information is mentioned: business name, activity, registered address, shareholding…
*/
public function getStatute();

/**
* @var File
* Extract from the Company Register issued within the last three months
* In the case of an organization or soletrader, this can be a proof of registration from the official
* authority
*/
public function getProofOfRegistration();

/**
* @var File
* Shareholder declaration (as https://www.mangopay.com/terms/shareholder-declaration/Shareholder_Declaration-EN.pdf)
*/
public function getShareholderDeclaration();

}
108 changes: 108 additions & 0 deletions Entity/NaturalUserInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?php

namespace Troopers\MangopayBundle\Entity;

/**
* Defines mandatory methods a Mango user should have
* https://docs.mangopay.com/api-references/users/natural-users/.
*/
interface NaturalUserInterface extends UserInterface
{
/**
* @var string
* User’s firstname (<100 chars)
*/
public function getFirstName();

/**
* @var string
* User’s lastname (<100 chars)
*/
public function getLastName();

/**
* @var string
* Contatenation of firstname and lastname
*/
public function getFullName();

/**
* @var string
* User’s address
*/
public function getStreetAddress();

/**
* @var string
* User’s address
*/
public function getAdditionalStreetAddress();

/**
* @var string
* User’s address
*/
public function getCity();

/**
* @var string
* User’s address
*/
public function getCountry();

/**
* @var string
* User’s address
*/
public function getPostalCode();

/**
* @var \DateTime
* User’s birthdate.
*/
public function getBirthday() :?\DateTime;

/**
* @var string
* User’s Nationality. ISO 3166-1 alpha-2 format is expected
*/
public function getNationality();

/**
* @var string
* User’s country of residence. ISO 3166-1 alpha-2 format is expected
*/
public function getCountryOfResidence();

/**
* @var string
* User’s occupation, optional.
*/
public function getOccupation();

/**
* @var string
* User’s income range, optional.
*/
public function getIncomeRange();

/**
* @var string
* User’s proof of identity
*/
public function getProofOfIdentityId();

/**
* @var string
* User’s proof of address
*/
public function getProofOfAddressId();

/**
* @var string
* User’s capacity, optional.
*/
public function getCapacity();


}
Loading

0 comments on commit aa5b713

Please sign in to comment.