original_string: private function customerToTransaction($customer)
      {
          $transaction = [
              'Customer' => $customer->toArray(),
              'TransactionType' => TransactionType::MOTO,
          ];
  
          foreach ($customer->toArray() as $key => $value) {
              if ($key != 'TokenCustomerID') {
                  $transaction[$key] = $value;
              }
          }
  
          /** @var Transaction $transaction */
          return ClassValidator::getInstance('Eway\Rapid\Model\Transaction', $transaction);
      }
code: private function customerToTransaction($customer)
      {
          $transaction = [
              'Customer' => $customer->toArray(),
              'TransactionType' => TransactionType::MOTO,
          ];
  
          foreach ($customer->toArray() as $key => $value) {
              if ($key != 'TokenCustomerID') {
                  $transaction[$key] = $value;
              }
          }
  
          /** @var Transaction $transaction */
          return ClassValidator::getInstance('Eway\Rapid\Model\Transaction', $transaction);
      }
code_tokens: private function customerToTransaction ( $ customer ) { $ transaction = [ 'Customer' => $ customer -> toArray ( ) , 'TransactionType' => TransactionType :: MOTO , ] ; foreach ( $ customer -> toArray ( ) as $ key => $ value ) { if ( $ key != 'TokenCustomerID' ) { $ transaction [ $ key ] = $ value ; } } /** @var Transaction $transaction */ return ClassValidator :: getInstance ( 'Eway\Rapid\Model\Transaction' , $ transaction ) ; }
docstring: Convert a Customer to a Transaction object for a create or update
  token transaction
  
  @param Eway\Rapid\Model\Customer $customer
  @return Eway\Rapid\Model\Transaction
docstring_tokens: Convert a Customer to a Transaction object for a create or update token transaction