/** * Set credit card holder. * * @param \Moip\Resource\Customer $holder */ private function setCreditCardHolder(Customer $holder) { $this->data->fundingInstrument->creditCard->holder = new stdClass(); $this->data->fundingInstrument->creditCard->holder->fullname = $holder->getFullname(); $this->data->fundingInstrument->creditCard->holder->birthdate = $holder->getBirthDate(); $this->data->fundingInstrument->creditCard->holder->taxDocument = new stdClass(); $this->data->fundingInstrument->creditCard->holder->taxDocument->type = $holder->getTaxDocumentType(); $this->data->fundingInstrument->creditCard->holder->taxDocument->number = $holder->getTaxDocumentNumber(); $this->data->fundingInstrument->creditCard->holder->phone = new stdClass(); $this->data->fundingInstrument->creditCard->holder->phone->countryCode = $holder->getPhoneCountryCode(); $this->data->fundingInstrument->creditCard->holder->phone->areaCode = $holder->getPhoneAreaCode(); $this->data->fundingInstrument->creditCard->holder->phone->number = $holder->getPhoneNumber(); }