/** * @param string $fid * @param string $type * * @return static */ public static function create($fid, $type = MessengerFailureType::HARD) { /** @var static $payload */ $payload = parent::create($fid); $payload->type = $type; return $payload; }
public function testCreate() { $instance = FidPayload::create('FID:1234:abcde:fg'); $this->assertEquals('FID:1234:abcde:fg', $instance->fid); $test = MarkDatePayload::create('FID:1234:abcde:fg'); $this->assertInstanceOf('\\Fortifi\\FortifiApi\\Foundation\\Payloads\\MarkDatePayload', $test); }
/** * @param string $fid * * @return BoolResponse */ public function restore($fid) { $payload = FidPayload::create($fid); $ep = PagesEndpoint::bound($this->getApi()); return $ep->restore($payload)->get(); }
/** * @param string $fid * * @return PhoneResponse */ public function retrieve($fid) { $ep = PhoneEndpoint::bound($this->getApi()); return $ep->retrieve(FidPayload::create($fid))->get(); }
public function markPurchased() { if (empty($this->_customerFid)) { throw new \RuntimeException("You cannot mark a customer as purchased before setting a customer fid"); } $ep = $this->_getEndpoint(); $this->_processRequest($ep->markPurchased(FidPayload::create($this->_customerFid))); return $this; }
/** * @param string $contactFid * * @return BoolResponse */ public function restore($contactFid) { $payload = FidPayload::create($contactFid); $ep = MessengerContactEndpoint::bound($this->getApi()); return $ep->restore($payload)->get(); }
/** * @param string $serviceFid * * @return MessengerServiceResponse */ public function retrieve($serviceFid) { $payload = FidPayload::create($serviceFid); $ep = MessengerServiceEndpoint::bound($this->getApi()); return $ep->retrieve($payload)->get(); }
/** * @param string $companyFid * * @return MessengerBrandingResponse */ public function retrieve($companyFid) { $payload = FidPayload::create($companyFid); $ep = MessengerBrandingEndpoint::bound($this->getApi()); return $ep->retrieve($payload)->get(); }
/** * @param string $messageFid * * @return MessengerLogsResponse */ public function getLogs($messageFid) { $payload = FidPayload::create($messageFid); $ep = MessengerMessageEndpoint::bound($this->getApi()); return $ep->getLogs($payload)->get(); }