PayPal\Auth\Openid\PPOpenIdUserinfo::setAccountType PHP Method

setAccountType() public method

Account type.
public setAccountType ( string $account_type )
$account_type string
    public function setAccountType($account_type)
    {
        $this->account_type = $account_type;
        return $this;
    }

Usage Example

 /**
  * @test
  */
 public function testSerializationDeserialization()
 {
     $user = new PPOpenIdUserinfo();
     $user->setAccountType("PERSONAL")->setAgeRange("20-30")->setBirthday("1970-01-01")->setEmail("*****@*****.**")->setEmailVerified(true)->setFamilyName("Doe")->setMiddleName("A")->setGivenName("John")->setLocale("en-US")->setGender("male")->setName("John A Doe")->setPayerId("A-XZASASA")->setPhoneNumber("1-408-111-1111")->setPicture("http://gravatar.com/me.jpg")->setSub("*****@*****.**")->setUserId("userId")->setVerified(true)->setVerifiedAccount(true)->setZoneinfo("America/PST")->setLanguage('en_US')->setAddress(PPOpenIdAddressTest::getTestData());
     $userCopy = new PPOpenIdUserinfo();
     $userCopy->fromJson($user->toJSON());
     $this->assertEquals($user, $userCopy);
 }