# give/4.16.9/src/PaymentGateways/DataTransferObjects/SubscriptionData.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.9. 42 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/PaymentGateways/DataTransferObjects/SubscriptionData.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/PaymentGateways/DataTransferObjects/SubscriptionData.php
- Modified: 2022-10-31T21:53:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.9/code/src/PaymentGateways/DataTransferObjects/SubscriptionData.php#L10-L20`.

```php
<?php

namespace Give\PaymentGateways\DataTransferObjects;

/**
 * Class SubscriptionData
 * @since 2.18.0
 */
final class SubscriptionData
{
    /**
     * @var string
     */
    public $period;

    /**
     * @var string
     */
    public $times;

    /**
     * @var string
     */
    public $frequency;

    /**
     * Convert data from request into DTO
     *
     * @since 2.18.0
     */
    public static function fromRequest(array $request): SubscriptionData
    {
        $self = new static();

        $self->period = $request['period'];
        $self->times = $request['times'];
        $self->frequency = $request['frequency'];

        return $self;
    }
}

```
