/**
  * @param array $details
  * @return IdealPaymentMethodDetails
  */
 public static function fromArray(array $details)
 {
     Guard::keyExists($details, 'issuer_id');
     return new static(SwiftBic::fromString($details['issuer_id']), array_key_exists('status', $details) ? Status::fromString($details['status']) : null, array_key_exists('transaction_id', $details) ? TransactionId::fromString($details['transaction_id']) : null, array_key_exists('consumer_name', $details) ? ConsumerName::fromString($details['consumer_name']) : null, array_key_exists('consumer_city', $details) ? ConsumerCity::fromString($details['consumer_city']) : null, array_key_exists('consumer_iban', $details) ? Iban::fromString($details['consumer_iban']) : null, array_key_exists('consumer_bic', $details) ? SwiftBic::fromString($details['consumer_bic']) : null);
 }
Пример #2
0
 /**
  * @test
  */
 public function itShouldGuardAgainstEmptyValue()
 {
     $this->setExpectedException('Assert\\InvalidArgumentException');
     ConsumerName::fromString('');
 }