lib/GoCardless/PreAuthorization.php
public function create_bill($attrs) {

    if ( ! isset($attrs['amount'])) {
      throw new GoCardless_ArgumentsException('Amount required');
    }

    $params = array(
      'bill' => array(
        'amount'                => $attrs['amount'],
        'pre_authorization_id'  => $this->id
      )
    );

    if (isset($attrs['name'])) {
      $params['bill']['name'] = $attrs['name'];
    }

    if (isset($attrs['description'])) {
      $params['bill']['description'] = $attrs['description'];
    }

    if (isset($attrs['charge_customer_at'])) {
      $params['bill']['charge_customer_at'] = $attrs['charge_customer_at'];
    }

    $endpoint = GoCardless_Bill::$endpoint;

    return new GoCardless_Bill($this->client, $this->client->request('post',
      $endpoint, $params));

  }
public function create_bill($attrs) {

    if ( ! isset($attrs['amount'])) {
      throw new GoCardless_ArgumentsException('Amount required');
    }

    $params = array(
      'bill' => array(
        'amount'                => $attrs['amount'],
        'pre_authorization_id'  => $this->id
      )
    );

    if (isset($attrs['name'])) {
      $params['bill']['name'] = $attrs['name'];
    }

    if (isset($attrs['description'])) {
      $params['bill']['description'] = $attrs['description'];
    }

    if (isset($attrs['charge_customer_at'])) {
      $params['bill']['charge_customer_at'] = $attrs['charge_customer_at'];
    }

    $endpoint = GoCardless_Bill::$endpoint;

    return new GoCardless_Bill($this->client, $this->client->request('post',
      $endpoint, $params));

  }
Create a bill under an existing pre-authorization

@param array $attrs The properties of the bill being created

@return object The pre-authorisations object