Commit 375b33e3 authored by Tyler Amos's avatar Tyler Amos

Adds block_changes_at to LicenseType in GraphQL

Includes block_changes_at in LicenseType to provide frontend with
info regarding subscription grace period.
parent ab2c7b79
......@@ -7777,6 +7777,7 @@ Represents the current license.
| ---- | ---- | ----------- |
| <a id="currentlicenseactivatedat"></a>`activatedAt` | [`Date`](#date) | Date when the license was activated. |
| <a id="currentlicensebillableuserscount"></a>`billableUsersCount` | [`Int`](#int) | Number of billable users on the system. |
| <a id="currentlicenseblockchangesat"></a>`blockChangesAt` | [`Date`](#date) | Date, including grace period, when licensed features will be blocked. |
| <a id="currentlicensecompany"></a>`company` | [`String`](#string) | Company of the licensee. |
| <a id="currentlicenseemail"></a>`email` | [`String`](#string) | Email of the licensee. |
| <a id="currentlicenseexpiresat"></a>`expiresAt` | [`Date`](#date) | Date when the license expires. |
......@@ -9822,6 +9823,7 @@ Represents an entry from the Cloud License history.
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="licensehistoryentryactivatedat"></a>`activatedAt` | [`Date`](#date) | Date when the license was activated. |
| <a id="licensehistoryentryblockchangesat"></a>`blockChangesAt` | [`Date`](#date) | Date, including grace period, when licensed features will be blocked. |
| <a id="licensehistoryentrycompany"></a>`company` | [`String`](#string) | Company of the licensee. |
| <a id="licensehistoryentryemail"></a>`email` | [`String`](#string) | Email of the licensee. |
| <a id="licensehistoryentryexpiresat"></a>`expiresAt` | [`Date`](#date) | Date when the license expires. |
......
......@@ -36,6 +36,9 @@ module Types
field :expires_at, ::Types::DateType, null: true,
description: 'Date when the license expires.'
field :block_changes_at, ::Types::DateType, null: true,
description: 'Date, including grace period, when licensed features will be blocked.'
field :activated_at, ::Types::DateType, null: true,
description: 'Date when the license was activated.'
......
......@@ -60,6 +60,7 @@ RSpec.describe 'Activate a subscription' do
'company' => created_license.licensee_company,
'startsAt' => created_license.starts_at.to_s,
'expiresAt' => created_license.expires_at.to_s,
'blockChangesAt' => created_license.block_changes_at.to_s,
'activatedAt' => created_license.created_at.to_date.to_s,
'lastSync' => nil,
'usersInLicenseCount' => nil,
......
......@@ -3,7 +3,7 @@
RSpec.shared_examples_for 'license type fields' do |keys|
context 'with license type fields' do
let(:license_fields) do
%w[id type plan name email company starts_at expires_at activated_at users_in_license_count]
%w[id type plan name email company starts_at expires_at block_changes_at activated_at users_in_license_count]
end
it { expect(described_class).to include_graphql_fields(*license_fields) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment