Skip to content

Commit

Permalink
PLAT-10320:adding monitorUsageEqual to kalturaPartnerfilter
Browse files Browse the repository at this point in the history
  • Loading branch information
ravitshalem committed Mar 3, 2020
1 parent 5d42423 commit ae5ce73
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function init ()
"_notin_id",
"_partner_permissions_exist",
'_gte_created_at',
'_eq_monitor_usage'
) , NULL );

$this->allowed_order_fields = array ( "created_at" , "updated_at", "id", "name", "website", "admin_name", "admin_email", "status");
Expand Down
11 changes: 10 additions & 1 deletion api_v3/lib/types/partner/KalturaPartner.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,13 @@ class KalturaPartner extends KalturaObject implements IFilterable
*/
public $lastFreeTrialNotificationDay;

/**
* @var int
* @filter eq
* @readonly
*/
public $monitorUsage;

private static $map_between_objects = array
(
'id' , 'name', 'website' => 'url1' , 'notificationUrl' => 'url2' , 'appearInSearch' , 'createdAt' , 'adminName' , 'adminEmail' ,
Expand All @@ -400,7 +407,8 @@ class KalturaPartner extends KalturaObject implements IFilterable
'firstName' , 'lastName' , 'country' , 'state' , 'publishersQuota', 'partnerGroupType', 'defaultEntitlementEnforcement',
'defaultDeliveryType', 'defaultEmbedCodeType', 'deliveryTypes', 'embedCodeTypes', 'templatePartnerId', 'ignoreSeoLinks',
'host', 'cdnHost', 'isFirstLogin', 'logoutUrl', 'partnerParentId','crmId', 'referenceId', 'timeAlignedRenditions','eSearchLanguages',
'publisherEnvironmentType', 'ovpEnvironmentUrl', 'ottEnvironmentUrl', 'authenticationType', 'extendedFreeTrailExpiryReason', 'extendedFreeTrailExpiryDate', 'extendedFreeTrail', 'extendedFreeTrailEndsWarning', 'eightyPercentWarning', 'usageLimitWarning', 'lastFreeTrialNotificationDay'
'publisherEnvironmentType', 'ovpEnvironmentUrl', 'ottEnvironmentUrl', 'authenticationType', 'extendedFreeTrailExpiryReason', 'extendedFreeTrailExpiryDate',
'extendedFreeTrail', 'extendedFreeTrailEndsWarning', 'eightyPercentWarning', 'usageLimitWarning', 'lastFreeTrialNotificationDay','monitorUsage'
);

public function getMapBetweenObjects ( )
Expand Down Expand Up @@ -438,6 +446,7 @@ public function doFromObject($partner, KalturaDetachedResponseProfile $responseP
$this->eightyPercentWarning = null;
$this->usageLimitWarning = null;
$this->lastFreeTrialNotificationDay = null;
$this->monitorUsage = null;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ abstract class KalturaPartnerBaseFilter extends KalturaFilter
"partnerNameDescriptionWebsiteAdminNameAdminEmailLike" => "_like_partner_name-description-website-admin_name-admin_email",
"createdAtGreaterThanOrEqual" => "_gte_created_at",
"idGreaterThan" => "_gt_id",
'monitorUsageEqual' => '_eq_monitor_usage',
);

static private $order_by_map = array
Expand Down Expand Up @@ -139,4 +140,9 @@ public function getOrderByMap()
* @var int
*/
public $idGreaterThan;

/**
* @var int
*/
public $monitorUsageEqual;
}
1 change: 1 addition & 0 deletions batch/batches/StorageUpdate/KAsyncStorageUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public function getSystemPartnerList($lowPartnerWaterMark, $pageIndex, $bulkSize
$filter->partnerPackageIn = KAsyncStorageUpdateUtils::PARTNER_PACKAGE_FREE .','. KAsyncStorageUpdateUtils::PARTNER_PACKAGE_INTERNAL_TRIAL;
$filter->statusIn = KalturaPartnerStatus::ACTIVE .','. KalturaPartnerStatus::BLOCKED .','. KalturaPartnerStatus::FULL_BLOCK;
$filter->idGreaterThan = $lowPartnerWaterMark;
$filter->monitorUsageEqual = 1;
$filter->orderBy = '+id';

$pager = new KalturaFilterPager();
Expand Down

0 comments on commit ae5ce73

Please sign in to comment.