Sha256: f7c4d34125f607261220a87182a51a20f84845d702f94f9a278f50149c72a838

Contents?: true

Size: 1.12 KB

Versions: 12

Compression:

Stored size: 1.12 KB

Contents

module ChargeBee
  class Item < Model

    class ApplicableItem < Model
      attr_accessor :id
    end

  attr_accessor :id, :name, :description, :status, :resource_version, :updated_at, :item_family_id,
  :type, :is_shippable, :is_giftable, :redirect_url, :enabled_for_checkout, :enabled_in_portal,
  :included_in_mrr, :item_applicability, :gift_claim_redirect_url, :unit, :metered, :usage_calculation,
  :archived_at, :applicable_items, :metadata

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

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

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

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

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

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

  end # ~Item
end # ~ChargeBee

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
chargebee-2.14.1 lib/chargebee/models/item.rb
chargebee-2.14.0 lib/chargebee/models/item.rb
chargebee-2.13.1 lib/chargebee/models/item.rb
chargebee-2.13.0 lib/chargebee/models/item.rb
chargebee-2.12.0 lib/chargebee/models/item.rb
chargebee-2.11.2 lib/chargebee/models/item.rb
chargebee-2.11.1 lib/chargebee/models/item.rb
chargebee-2.11.0 lib/chargebee/models/item.rb
chargebee-2.10.1 lib/chargebee/models/item.rb
chargebee-2.10.0 lib/chargebee/models/item.rb
chargebee-2.9.0 lib/chargebee/models/item.rb
chargebee-2.8.8 lib/chargebee/models/item.rb