Class: Sorenson::ThreeSixty::RatePlan
- Defined in:
- lib/sorenson/threesixty/rate_plan.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#allowedOutputMediaTypes ⇒ Object
Returns the value of attribute allowedOutputMediaTypes.
-
#allowedSourceMediaTypes ⇒ Object
Returns the value of attribute allowedSourceMediaTypes.
-
#allowedStorageMBytes ⇒ Object
Returns the value of attribute allowedStorageMBytes.
-
#allowedStreamingMBytes ⇒ Object
Returns the value of attribute allowedStreamingMBytes.
-
#allowedStreams ⇒ Object
Returns the value of attribute allowedStreams.
-
#annualCost ⇒ Object
Returns the value of attribute annualCost.
-
#basePlan ⇒ Object
Returns the value of attribute basePlan.
-
#dateLastModified ⇒ Object
Returns the value of attribute dateLastModified.
-
#dateRetrieved ⇒ Object
Returns the value of attribute dateRetrieved.
-
#displayName ⇒ Object
Returns the value of attribute displayName.
-
#formatConstraints ⇒ Object
Returns the value of attribute formatConstraints.
-
#id ⇒ Object
Returns the value of attribute id.
-
#maxThumbnailsPerVideo ⇒ Object
Returns the value of attribute maxThumbnailsPerVideo.
-
#monthlyCost ⇒ Object
Returns the value of attribute monthlyCost.
-
#ratePlanType ⇒ Object
Returns the value of attribute ratePlanType.
-
#setupCost ⇒ Object
Returns the value of attribute setupCost.
-
#sorensonSku ⇒ Object
Returns the value of attribute sorensonSku.
-
#storageOverageAllowed ⇒ Object
Returns the value of attribute storageOverageAllowed.
-
#streamingOverageAllowed ⇒ Object
Returns the value of attribute streamingOverageAllowed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ RatePlan
constructor
Instance Methods.
Methods inherited from Base
debug=, debug?, host, #post_to, post_to, protocol, token_for, use_ssl=, use_ssl?
Constructor Details
#initialize(data) ⇒ RatePlan
Instance Methods
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 32 def initialize(data) self.id = data['id'] self.displayName = data['displayName'] self.ratePlanType = data['ratePlanType'] self.maxThumbnailsPerVideo = data['maxThumbnailsPerVideo'] self.setupCost = data['setupCost'] self.monthlyCost = data['monthlyCost'] self.annualCost = data['annualCost'] self.allowedStreams = data['allowedStreams'] self.basePlan = data['basePlan'] self.dateLastModified = data['dateLastModified'] self.dateRetrieved = data['dateRetrieved'] self.streamingOverageAllowed = data['streamingOverageAllowed'] self.storageOverageAllowed = data['storageOverageAllowed'] self.allowedStreamingMBytes = data['allowedStreamingMBytes'] self.allowedStorageMBytes = data['allowedStorageMBytes'] self.allowedSourceMediaTypes = data['allowedSourceMediaTypes'] # multi param self.allowedOutputMediaTypes = data['allowedOutputMediaTypes'] # multi param self.sorensonSku = data['sorensonSku'] self.formatConstraints = [] if data['formatConstraints'] data['formatConstraints'].each do |f| self.formatConstraints << FormatConstraint.new(self, f) end end end |
Instance Attribute Details
#allowedOutputMediaTypes ⇒ Object
Returns the value of attribute allowedOutputMediaTypes.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def allowedOutputMediaTypes @allowedOutputMediaTypes end |
#allowedSourceMediaTypes ⇒ Object
Returns the value of attribute allowedSourceMediaTypes.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def allowedSourceMediaTypes @allowedSourceMediaTypes end |
#allowedStorageMBytes ⇒ Object
Returns the value of attribute allowedStorageMBytes.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def allowedStorageMBytes @allowedStorageMBytes end |
#allowedStreamingMBytes ⇒ Object
Returns the value of attribute allowedStreamingMBytes.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def allowedStreamingMBytes @allowedStreamingMBytes end |
#allowedStreams ⇒ Object
Returns the value of attribute allowedStreams.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def allowedStreams @allowedStreams end |
#annualCost ⇒ Object
Returns the value of attribute annualCost.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def annualCost @annualCost end |
#basePlan ⇒ Object
Returns the value of attribute basePlan.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def basePlan @basePlan end |
#dateLastModified ⇒ Object
Returns the value of attribute dateLastModified.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def dateLastModified @dateLastModified end |
#dateRetrieved ⇒ Object
Returns the value of attribute dateRetrieved.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def dateRetrieved @dateRetrieved end |
#displayName ⇒ Object
Returns the value of attribute displayName.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def displayName @displayName end |
#formatConstraints ⇒ Object
Returns the value of attribute formatConstraints.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def formatConstraints @formatConstraints end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def id @id end |
#maxThumbnailsPerVideo ⇒ Object
Returns the value of attribute maxThumbnailsPerVideo.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def maxThumbnailsPerVideo @maxThumbnailsPerVideo end |
#monthlyCost ⇒ Object
Returns the value of attribute monthlyCost.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def monthlyCost @monthlyCost end |
#ratePlanType ⇒ Object
Returns the value of attribute ratePlanType.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def ratePlanType @ratePlanType end |
#setupCost ⇒ Object
Returns the value of attribute setupCost.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def setupCost @setupCost end |
#sorensonSku ⇒ Object
Returns the value of attribute sorensonSku.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def sorensonSku @sorensonSku end |
#storageOverageAllowed ⇒ Object
Returns the value of attribute storageOverageAllowed.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def storageOverageAllowed @storageOverageAllowed end |
#streamingOverageAllowed ⇒ Object
Returns the value of attribute streamingOverageAllowed.
5 6 7 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 5 def streamingOverageAllowed @streamingOverageAllowed end |
Class Method Details
.getAllRatePlans ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/sorenson/threesixty/rate_plan.rb', line 17 def self.getAllRatePlans data = post_to("/api/getAllRatePlans") rate_plans = [] data['ratePlans'].each do |rate_plan| rate_plans << RatePlan.new(rate_plan) end rate_plans end |