Sha256: 37a784f204a1a9629a087b8b09705a69e2b06785d40cc74f3e3e07d34bee2682
Contents?: true
Size: 1021 Bytes
Versions: 2
Compression:
Stored size: 1021 Bytes
Contents
module ChargeBee class Coupon < Model attr_accessor :id, :name, :invoice_name, :discount_type, :discount_percentage, :discount_amount, :discount_quantity, :currency_code, :duration_type, :duration_month, :valid_till, :max_redemptions, :status, :apply_discount_on, :apply_on, :plan_constraint, :addon_constraint, :created_at, :archived_at, :resource_version, :updated_at, :plan_ids, :addon_ids, :redemptions, :invoice_notes, :meta_data # OPERATIONS #----------- def self.create(params, env=nil, headers={}) Request.send('post', uri_path("coupons"), params, env, headers) end def self.list(params={}, env=nil, headers={}) Request.send_list_request('get', uri_path("coupons"), params, env, headers) end def self.retrieve(id, env=nil, headers={}) Request.send('get', uri_path("coupons",id.to_s), {}, env, headers) end def self.delete(id, env=nil, headers={}) Request.send('post', uri_path("coupons",id.to_s,"delete"), {}, env, headers) end end # ~Coupon end # ~ChargeBee
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chargebee-2.1.8 | lib/chargebee/models/coupon.rb |
chargebee-2.1.7 | lib/chargebee/models/coupon.rb |