Skip to content

Commit 905c63a

Browse files
committed
adding current_subscription_reset to quota info
1 parent 3cadd13 commit 905c63a

File tree

3 files changed

+54
-49
lines changed

3 files changed

+54
-49
lines changed

composer.lock

+50-49
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Client/SharpApiClient.php

+1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ public function quota(): ?SubscriptionInfo
168168
subscribed: $info['subscribed'],
169169
current_subscription_start: new Carbon($info['current_subscription_start']),
170170
current_subscription_end: new Carbon($info['current_subscription_end']),
171+
current_subscription_reset: new Carbon($info['current_subscription_reset']),
171172
subscription_words_quota: $info['subscription_words_quota'],
172173
subscription_words_used: $info['subscription_words_used'],
173174
subscription_words_used_percentage: $info['subscription_words_used_percentage']

src/DTO/SubscriptionInfo.php

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class SubscriptionInfo
1818
* @param bool $subscribed Indicates if the user is currently subscribed.
1919
* @param Carbon $current_subscription_start Start timestamp of the current subscription period.
2020
* @param Carbon $current_subscription_end End timestamp of the current subscription period.
21+
* @param Carbon $current_subscription_reset Quota reset timestamp of the current subscription period.
2122
* @param int $subscription_words_quota Total word quota for the current subscription period.
2223
* @param int $subscription_words_used Number of words used in the current subscription period.
2324
* @param float $subscription_words_used_percentage Percentage of the word quota used
@@ -30,6 +31,7 @@ public function __construct(
3031
public bool $subscribed,
3132
public Carbon $current_subscription_start,
3233
public Carbon $current_subscription_end,
34+
public Carbon $current_subscription_reset,
3335
public int $subscription_words_quota,
3436
public int $subscription_words_used,
3537
public float $subscription_words_used_percentage
@@ -51,6 +53,7 @@ public function toArray(): array
5153
'subscribed' => $this->subscribed,
5254
'current_subscription_start' => $this->current_subscription_start->toDateTimeString(),
5355
'current_subscription_end' => $this->current_subscription_end->toDateTimeString(),
56+
'current_subscription_reset' => $this->current_subscription_reset->toDateTimeString(),
5457
'subscription_words_quota' => $this->subscription_words_quota,
5558
'subscription_words_used' => $this->subscription_words_used,
5659
'subscription_words_used_percentage' => $this->subscription_words_used_percentage,

0 commit comments

Comments
 (0)