<?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 billing_request, providing access to its
 * attributes
 *
 * @property-read mixed $actions
 * @property-read mixed $created_at
 * @property-read mixed $fallback_enabled
 * @property-read mixed $fallback_occurred
 * @property-read mixed $id
 * @property-read mixed $instalment_schedule_request
 * @property-read mixed $links
 * @property-read mixed $mandate_request
 * @property-read mixed $metadata
 * @property-read mixed $payment_request
 * @property-read mixed $purpose_code
 * @property-read mixed $resources
 * @property-read mixed $status
 * @property-read mixed $subscription_request
 */
class BillingRequest extends BaseResource
{
    protected $model_name = "BillingRequest";

    /**
     * List of actions that can be performed before this billing request can be
     * fulfilled.
     */
    protected $actions;

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

    /**
     * (Optional) If true, this billing request can fallback from instant
     * payment to direct debit.
     * Should not be set if GoCardless payment intelligence feature is used.
     * 
     * See [Billing Requests: Retain customers with
     * Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/)
     * for more information.
     */
    protected $fallback_enabled;

    /**
     * True if the billing request was completed with direct debit.
     */
    protected $fallback_occurred;

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

    /**
     * Request for an instalment schedule. Has to contain either
     * `instalments_with_schedule` object or an array of
     * `instalments_with_dates` objects
     */
    protected $instalment_schedule_request;

    /**
     * 
     */
    protected $links;

    /**
     * Request for a mandate
     */
    protected $mandate_request;

    /**
     * Key-value store of custom data. Up to 3 keys are permitted, with key
     * names up to 50 characters and values up to 500 characters.
     */
    protected $metadata;

    /**
     * Request for a one-off strongly authorised payment
     */
    protected $payment_request;

    /**
     * Specifies the high-level purpose of a mandate and/or payment using a set
     * of pre-defined categories. Required for the PayTo scheme, optional for
     * all others. Currently `mortgage`, `utility`, `loan`, `dependant_support`,
     * `gambling`, `retail`, `salary`, `personal`, `government`, `pension`,
     * `tax` and `other` are supported.
     */
    protected $purpose_code;

    /**
     * 
     */
    protected $resources;

    /**
     * One of:
     * <ul>
     * <li>`pending`: the billing request is pending and can be used</li>
     * <li>`ready_to_fulfil`: the billing request is ready to fulfil</li>
     * <li>`fulfilling`: the billing request is currently undergoing
     * fulfilment</li>
     * <li>`fulfilled`: the billing request has been fulfilled and a payment
     * created</li>
     * <li>`cancelled`: the billing request has been cancelled and cannot be
     * used</li>
     * </ul>
     */
    protected $status;

    /**
     * Request for a subscription
     */
    protected $subscription_request;

}
