public function disputedTransferCreateFromPaymentCard()
 {
     $transfer_state = $this->fillSourceTransfer($this->transfer);
     $transfer = new Transfer($transfer_state);
     $transfer->save();
     $this->assertStringStartsWith('TR', $transfer->id);
     $this->assertEquals($transfer->state, 'PENDING');
     // transfers are async
 }
 /**
  * Initializes resources (i.e. registers them with Resource::_registry). Note
  * that if you add a Resource then you must initialize it here.
  *
  * @internal
  */
 private static function initializeResources()
 {
     if (self::$initialized) {
         return;
     }
     Resource::init();
     Resources\Application::init();
     Resources\Identity::init();
     Resources\Processor::init();
     Resources\Merchant::init();
     Resources\PaymentInstrument::init();
     Resources\Authorization::init();
     Resources\Transfer::init();
     Resources\Reversal::init();
     Resources\Dispute::init();
     Resources\Webhook::init();
     Resources\Settlement::init();
     Resources\Verification::init();
     Resources\Evidence::init();
     self::$initialized = true;
 }
 /**
  * @param \Finix\Resources\Transfer $srcTxfr
  * @return \Finix\Resources\Reversal
  */
 private function reverseTransfer($srcTxfr)
 {
     return $srcTxfr->reverse(100);
 }
 public function test_reversalCreate()
 {
     $transfer_state = $this->fillSourceTransfer($this->transfer);
     $transfer = new Transfer($transfer_state);
     $transfer->save();
     $reversal = $transfer->reverse(100);
     // reversals are transfers in opp. direction, so are also async
     $this->assertEquals($reversal->state, 'PENDING');
     $this->assertStringEndsWith($transfer->id, $reversal->getParentTransferHref());
 }