Sha256: dbe4d07ee0b611f4348a3286e997c01a5bf53adb088bc5a53c7c81a5546cd56c

Contents?: true

Size: 1.24 KB

Versions: 1

Compression:

Stored size: 1.24 KB

Contents

module ChargeBee
  class Plan < Model

  attr_accessor :id, :name, :invoice_name, :description, :price, :currency_code, :period, :period_unit,
  :trial_period, :trial_period_unit, :charge_model, :free_quantity, :setup_cost, :downgrade_penalty,
  :status, :archived_at, :billing_cycles, :redirect_url, :enabled_in_hosted_pages, :enabled_in_portal,
  :tax_code, :resource_version, :updated_at, :invoice_notes, :taxable, :tax_profile_id, :meta_data

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

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

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

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

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

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

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

  end # ~Plan
end # ~ChargeBee

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chargebee-2.1.9 lib/chargebee/models/plan.rb