<?php
/**
 * WARNING: Do not edit by hand, this file was generated by Crank:
 *
 * https://github.com/gocardless/crank
 */

namespace GoCardlessPro\Resources;

/**
 * A thin wrapper around a payer_authorisation, providing access to its
 * attributes
 *
 * @property-read mixed $bank_account
 * @property-read mixed $created_at
 * @property-read mixed $customer
 * @property-read mixed $id
 * @property-read mixed $incomplete_fields
 * @property-read mixed $links
 * @property-read mixed $mandate
 * @property-read mixed $status
 */
class PayerAuthorisation extends BaseResource
{
    protected $model_name = "PayerAuthorisation";

    /**
     * All details required for the creation of a
     * [Customer Bank Account](#core-endpoints-customer-bank-accounts).
     */
    protected $bank_account;

    /**
     * [Timestamp](#api-usage-dates-and-times), recording when this Payer
     * Authorisation was created.
     */
    protected $created_at;

    /**
     * All details required for the creation of a
     * [Customer](#core-endpoints-customers).
     */
    protected $customer;

    /**
     * Unique identifier, beginning with "PA".
     */
    protected $id;

    /**
     * An array of fields which are missing and is required to set up the
     * mandate.
     */
    protected $incomplete_fields;

    /**
     * IDs of the created resources. Available after the Payer Authorisation is
     * completed.
     */
    protected $links;

    /**
     * All details required for the creation of a
     * [Mandate](#core-endpoints-mandates).
     */
    protected $mandate;

    /**
     * One of:
     * <ul>
     * <li>`created`: The PayerAuthorisation has been created, and not been
     * confirmed yet</li>
     * <li>`submitted`: The payer information has been submitted</li>
     * <li>`confirmed`: PayerAuthorisation is confirmed and resources are ready
     * to be created</li>
     * <li>`completed`: The PayerAuthorisation has been completed and customer,
     * bank_account and mandate has been created</li>
     * <li>`failed`: The PayerAuthorisation has failed and customer,
     * bank_account and mandate is not created</li>
     * </ul>
     */
    protected $status;

}
