Sha256: e58621f5985cf62aa9fa2fefcd7be959aa73eeedabea739048db42e54ca10cc6

Contents?: true

Size: 707 Bytes

Versions: 22

Compression:

Stored size: 707 Bytes

Contents

module ChargeBee
  class CouponCode < Model

  attr_accessor :code, :status, :coupon_id, :coupon_set_name

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

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

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

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

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

  end # ~CouponCode
end # ~ChargeBee

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
chargebee-2.4.0 lib/chargebee/models/coupon_code.rb
chargebee-2.3.9 lib/chargebee/models/coupon_code.rb
chargebee-2.3.8 lib/chargebee/models/coupon_code.rb
chargebee-2.3.7 lib/chargebee/models/coupon_code.rb
chargebee-2.3.6 lib/chargebee/models/coupon_code.rb
chargebee-2.3.5 lib/chargebee/models/coupon_code.rb
chargebee-2.3.4 lib/chargebee/models/coupon_code.rb
chargebee-2.3.3 lib/chargebee/models/coupon_code.rb
chargebee-2.3.2 lib/chargebee/models/coupon_code.rb
chargebee-2.3.1 lib/chargebee/models/coupon_code.rb
chargebee-2.3.0 lib/chargebee/models/coupon_code.rb
chargebee-2.2.9 lib/chargebee/models/coupon_code.rb
chargebee-2.2.8 lib/chargebee/models/coupon_code.rb
chargebee-2.2.7 lib/chargebee/models/coupon_code.rb
chargebee-2.2.6 lib/chargebee/models/coupon_code.rb
chargebee-2.2.5 lib/chargebee/models/coupon_code.rb
chargebee-2.2.4 lib/chargebee/models/coupon_code.rb
chargebee-2.2.3 lib/chargebee/models/coupon_code.rb
chargebee-2.2.2 lib/chargebee/models/coupon_code.rb
chargebee-2.2.1 lib/chargebee/models/coupon_code.rb