Sha256: 8300f891966f562eee54474cf1e82f7f37b0477a355c5f3d52decc6b450b3d26

Contents?: true

Size: 1.37 KB

Versions: 40

Compression:

Stored size: 1.37 KB

Contents

module ChargeBee
  class Feature < Model

    class Level < Model
      attr_accessor :name, :value, :level, :is_unlimited
    end

  attr_accessor :id, :name, :description, :status, :type, :unit, :resource_version, :updated_at,
  :created_at, :levels

  # OPERATIONS
  #-----------

  def self.list(params={}, env=nil, headers={})
    Request.send_list_request('get', uri_path("features"), params, env, headers)
  end

  def self.create(params, env=nil, headers={})
    Request.send('post', uri_path("features"), params, env, headers)
  end

  def self.update(id, params={}, env=nil, headers={})
    Request.send('post', uri_path("features",id.to_s), params, env, headers)
  end

  def self.retrieve(id, env=nil, headers={})
    Request.send('get', uri_path("features",id.to_s), {}, env, headers)
  end

  def self.delete(id, env=nil, headers={})
    Request.send('post', uri_path("features",id.to_s,"delete"), {}, env, headers)
  end

  def self.activate(id, env=nil, headers={})
    Request.send('post', uri_path("features",id.to_s,"activate_command"), {}, env, headers)
  end

  def self.archive(id, env=nil, headers={})
    Request.send('post', uri_path("features",id.to_s,"archive_command"), {}, env, headers)
  end

  def self.reactivate(id, env=nil, headers={})
    Request.send('post', uri_path("features",id.to_s,"reactivate_command"), {}, env, headers)
  end

  end # ~Feature
end # ~ChargeBee

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
chargebee-2.47.0.beta.1 lib/chargebee/models/feature.rb
chargebee-2.46.0 lib/chargebee/models/feature.rb
chargebee-2.45.0 lib/chargebee/models/feature.rb
chargebee-2.44.1 lib/chargebee/models/feature.rb
chargebee-2.44.0 lib/chargebee/models/feature.rb
chargebee-2.43.0 lib/chargebee/models/feature.rb
chargebee-2.42.0 lib/chargebee/models/feature.rb
chargebee-2.41.0 lib/chargebee/models/feature.rb
chargebee-2.40.0 lib/chargebee/models/feature.rb
chargebee-2.38.1 lib/chargebee/models/feature.rb
chargebee-2.38.0 lib/chargebee/models/feature.rb
chargebee-2.37.1 lib/chargebee/models/feature.rb
chargebee-2.37.0 lib/chargebee/models/feature.rb
chargebee-2.36.2 lib/chargebee/models/feature.rb
chargebee-2.36.1 lib/chargebee/models/feature.rb
chargebee-2.36.0 lib/chargebee/models/feature.rb
chargebee-2.35.0 lib/chargebee/models/feature.rb
chargebee-2.34.0 lib/chargebee/models/feature.rb
chargebee-2.33.0 lib/chargebee/models/feature.rb
chargebee-2.32.0 lib/chargebee/models/feature.rb