/** * Creates a customer. * * @return Customer */ public function createCustomer() { if ($this->sandbox_mock == self::SANDBOX) { $this->last_cus_id = uniqid('CUS-'); } else { $this->last_cus_id = 'meu_id_sandbox'; } $customer = $this->moip->customers()->setOwnId($this->last_cus_id)->setBirthDate(\DateTime::createFromFormat($this->date_format, $this->date_string))->setFullname('Jose Silva')->setEmail('*****@*****.**')->setTaxDocument('22222222222', 'CPF')->setPhone(11, 66778899, 55)->addAddress(Customer::ADDRESS_SHIPPING, 'Avenida Faria Lima', '2927', 'Itaim', 'Sao Paulo', 'SP', '01234000', '8'); return $customer; }
/** * Create a new Customer instance. * * @return \Moip\Resource\Customer */ public function customers() { return $this->moip->customers(); }