class MxHero::API::Domain

Public Class Methods

new(data = {}) click to toggle source
Calls superclass method MxHero::API::MetadataLoader::new
# File lib/resources/domain.rb, line 35
def initialize(data = {})
  super(data)
  load_features(features)
  load_cos(cos)
  # load_metadata
end

Public Instance Methods

change_to_trial() click to toggle source
# File lib/resources/domain.rb, line 42
def change_to_trial
  if cos.type == 'free'
    cos.type = 'trial'
  end
end

Private Instance Methods

load_cos(cos) click to toggle source
# File lib/resources/domain.rb, line 50
def load_cos(cos)
  @cos = Cos.new cos
end
load_features(features) click to toggle source
# File lib/resources/domain.rb, line 54
def load_features(features)
  @features = features.map { |feature| Feature.new feature }
end