Class: Kaltura::KalturaPartnerUsage

Inherits:
KalturaObjectBase show all
Defined in:
lib/kaltura_types.rb

Instance Attribute Summary collapse

Attributes inherited from KalturaObjectBase

#object_type, #related_objects

Instance Method Summary collapse

Methods inherited from KalturaObjectBase

#camelcase, #to_b, #to_params

Instance Attribute Details

#hosting_gbObject

Partner total hosting in GB on the disk



7928
7929
7930
# File 'lib/kaltura_types.rb', line 7928

def hosting_gb
  @hosting_gb
end

#package_bwObject

package total BW - actually this is usage, which represents BW+storage



7932
7933
7934
# File 'lib/kaltura_types.rb', line 7932

def package_bw
  @package_bw
end

#percentObject

percent of usage out of partner’s package. if usageGB is 5 and package is 10GB, this value will be 50



7930
7931
7932
# File 'lib/kaltura_types.rb', line 7930

def percent
  @percent
end

#reached_limit_dateObject

date when partner reached the limit of his package (timestamp)



7936
7937
7938
# File 'lib/kaltura_types.rb', line 7936

def reached_limit_date
  @reached_limit_date
end

#usage_gbObject

total usage in GB - including bandwidth and storage



7934
7935
7936
# File 'lib/kaltura_types.rb', line 7934

def usage_gb
  @usage_gb
end

#usage_graphObject

a semi-colon separated list of comma-separated key-values to represent a usage graph. keys could be 1-12 for a year view (1,1.2;2,1.1;3,0.9;…;12,1.4;) keys could be 1- depending on the requested month, for a daily view in a given month (1,0.4;2,0.2;…;31,0.1;)



7940
7941
7942
# File 'lib/kaltura_types.rb', line 7940

def usage_graph
  @usage_graph
end

Instance Method Details

#from_xml(xml_element) ⇒ Object



7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
# File 'lib/kaltura_types.rb', line 7958

def from_xml(xml_element)
	super
	if xml_element.elements['hostingGB'] != nil
		self.hosting_gb = xml_element.elements['hostingGB'].text
	end
	if xml_element.elements['Percent'] != nil
		self.percent = xml_element.elements['Percent'].text
	end
	if xml_element.elements['packageBW'] != nil
		self.package_bw = xml_element.elements['packageBW'].text
	end
	if xml_element.elements['usageGB'] != nil
		self.usage_gb = xml_element.elements['usageGB'].text
	end
	if xml_element.elements['reachedLimitDate'] != nil
		self.reached_limit_date = xml_element.elements['reachedLimitDate'].text
	end
	if xml_element.elements['usageGraph'] != nil
		self.usage_graph = xml_element.elements['usageGraph'].text
	end
end