original_string: public function createNewCreditCard(CreditCard $creditCard, $id = null)
      {
          if (! $id) {
              $id = $this->data->id;
          }
  
          $creditCard->setContext(Moip::PAYMENT);
  
          $this->data = new stdClass;
          $this->data->method = 'CREDIT_CARD';
          $this->data->creditCard = $creditCard->getData();
  
          $response = $this->client->post('{id}/fundinginstruments', [$id], $this->data);
  
          $this->populate($response);
  
          return $this;
      }
code: public function createNewCreditCard(CreditCard $creditCard, $id = null)
      {
          if (! $id) {
              $id = $this->data->id;
          }
  
          $creditCard->setContext(Moip::PAYMENT);
  
          $this->data = new stdClass;
          $this->data->method = 'CREDIT_CARD';
          $this->data->creditCard = $creditCard->getData();
  
          $response = $this->client->post('{id}/fundinginstruments', [$id], $this->data);
  
          $this->populate($response);
  
          return $this;
      }
code_tokens: public function createNewCreditCard ( CreditCard $ creditCard , $ id = null ) { if ( ! $ id ) { $ id = $ this -> data -> id ; } $ creditCard -> setContext ( Moip :: PAYMENT ) ; $ this -> data = new stdClass ; $ this -> data -> method = 'CREDIT_CARD' ; $ this -> data -> creditCard = $ creditCard -> getData ( ) ; $ response = $ this -> client -> post ( '{id}/fundinginstruments' , [ $ id ] , $ this -> data ) ; $ this -> populate ( $ response ) ; return $ this ; }
docstring: Create a new credit card for customer
  
  @param  \Softpampa\Moip\Helpers\CreditCard  $creditCard
  @param  int  $id
  @return $this
docstring_tokens: Create a new credit card for customer