Class: ChargeBee::Coupon
Defined Under Namespace
Classes: CouponConstraint, ItemConstraint, ItemConstraintCriteria
Instance Attribute Summary collapse
-
#addon_constraint ⇒ Object
Returns the value of attribute addon_constraint.
-
#addon_ids ⇒ Object
Returns the value of attribute addon_ids.
-
#apply_discount_on ⇒ Object
Returns the value of attribute apply_discount_on.
-
#apply_on ⇒ Object
Returns the value of attribute apply_on.
-
#archived_at ⇒ Object
Returns the value of attribute archived_at.
-
#coupon_constraints ⇒ Object
Returns the value of attribute coupon_constraints.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#discount_amount ⇒ Object
Returns the value of attribute discount_amount.
-
#discount_percentage ⇒ Object
Returns the value of attribute discount_percentage.
-
#discount_quantity ⇒ Object
Returns the value of attribute discount_quantity.
-
#discount_type ⇒ Object
Returns the value of attribute discount_type.
-
#duration_month ⇒ Object
Returns the value of attribute duration_month.
-
#duration_type ⇒ Object
Returns the value of attribute duration_type.
-
#id ⇒ Object
Returns the value of attribute id.
-
#included_in_mrr ⇒ Object
Returns the value of attribute included_in_mrr.
-
#invoice_name ⇒ Object
Returns the value of attribute invoice_name.
-
#invoice_notes ⇒ Object
Returns the value of attribute invoice_notes.
-
#item_constraint_criteria ⇒ Object
Returns the value of attribute item_constraint_criteria.
-
#item_constraints ⇒ Object
Returns the value of attribute item_constraints.
-
#max_redemptions ⇒ Object
Returns the value of attribute max_redemptions.
-
#meta_data ⇒ Object
Returns the value of attribute meta_data.
-
#name ⇒ Object
Returns the value of attribute name.
-
#period ⇒ Object
Returns the value of attribute period.
-
#period_unit ⇒ Object
Returns the value of attribute period_unit.
-
#plan_constraint ⇒ Object
Returns the value of attribute plan_constraint.
-
#plan_ids ⇒ Object
Returns the value of attribute plan_ids.
-
#redemptions ⇒ Object
Returns the value of attribute redemptions.
-
#resource_version ⇒ Object
Returns the value of attribute resource_version.
-
#status ⇒ Object
Returns the value of attribute status.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#valid_from ⇒ Object
Returns the value of attribute valid_from.
-
#valid_till ⇒ Object
Returns the value of attribute valid_till.
Class Method Summary collapse
- .copy(params, env = nil, headers = {}) ⇒ Object
-
.create(params, env = nil, headers = {}) ⇒ Object
OPERATIONS ———–.
- .create_for_items(params, env = nil, headers = {}) ⇒ Object
- .delete(id, env = nil, headers = {}) ⇒ Object
- .list(params = {}, env = nil, headers = {}) ⇒ Object
- .retrieve(id, env = nil, headers = {}) ⇒ Object
- .unarchive(id, env = nil, headers = {}) ⇒ Object
- .update(id, params = {}, env = nil, headers = {}) ⇒ Object
- .update_for_items(id, params, env = nil, headers = {}) ⇒ Object
Methods inherited from Model
construct, #init_dependant, #init_dependant_list, #initialize, #inspect, #load, #method_missing, #replace_white_space_with_underscore, #to_s, uri_path
Constructor Details
This class inherits a constructor from ChargeBee::Model
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ChargeBee::Model
Instance Attribute Details
#addon_constraint ⇒ Object
Returns the value of attribute addon_constraint.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def addon_constraint @addon_constraint end |
#addon_ids ⇒ Object
Returns the value of attribute addon_ids.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def addon_ids @addon_ids end |
#apply_discount_on ⇒ Object
Returns the value of attribute apply_discount_on.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def apply_discount_on @apply_discount_on end |
#apply_on ⇒ Object
Returns the value of attribute apply_on.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def apply_on @apply_on end |
#archived_at ⇒ Object
Returns the value of attribute archived_at.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def archived_at @archived_at end |
#coupon_constraints ⇒ Object
Returns the value of attribute coupon_constraints.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def coupon_constraints @coupon_constraints end |
#created_at ⇒ Object
Returns the value of attribute created_at.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def created_at @created_at end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def currency_code @currency_code end |
#discount_amount ⇒ Object
Returns the value of attribute discount_amount.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def discount_amount @discount_amount end |
#discount_percentage ⇒ Object
Returns the value of attribute discount_percentage.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def discount_percentage @discount_percentage end |
#discount_quantity ⇒ Object
Returns the value of attribute discount_quantity.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def discount_quantity @discount_quantity end |
#discount_type ⇒ Object
Returns the value of attribute discount_type.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def discount_type @discount_type end |
#duration_month ⇒ Object
Returns the value of attribute duration_month.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def duration_month @duration_month end |
#duration_type ⇒ Object
Returns the value of attribute duration_type.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def duration_type @duration_type end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def id @id end |
#included_in_mrr ⇒ Object
Returns the value of attribute included_in_mrr.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def included_in_mrr @included_in_mrr end |
#invoice_name ⇒ Object
Returns the value of attribute invoice_name.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def invoice_name @invoice_name end |
#invoice_notes ⇒ Object
Returns the value of attribute invoice_notes.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def invoice_notes @invoice_notes end |
#item_constraint_criteria ⇒ Object
Returns the value of attribute item_constraint_criteria.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def item_constraint_criteria @item_constraint_criteria end |
#item_constraints ⇒ Object
Returns the value of attribute item_constraints.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def item_constraints @item_constraints end |
#max_redemptions ⇒ Object
Returns the value of attribute max_redemptions.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def max_redemptions @max_redemptions end |
#meta_data ⇒ Object
Returns the value of attribute meta_data.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def @meta_data end |
#name ⇒ Object
Returns the value of attribute name.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def name @name end |
#period ⇒ Object
Returns the value of attribute period.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def period @period end |
#period_unit ⇒ Object
Returns the value of attribute period_unit.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def period_unit @period_unit end |
#plan_constraint ⇒ Object
Returns the value of attribute plan_constraint.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def plan_constraint @plan_constraint end |
#plan_ids ⇒ Object
Returns the value of attribute plan_ids.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def plan_ids @plan_ids end |
#redemptions ⇒ Object
Returns the value of attribute redemptions.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def redemptions @redemptions end |
#resource_version ⇒ Object
Returns the value of attribute resource_version.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def resource_version @resource_version end |
#status ⇒ Object
Returns the value of attribute status.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def updated_at @updated_at end |
#valid_from ⇒ Object
Returns the value of attribute valid_from.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def valid_from @valid_from end |
#valid_till ⇒ Object
Returns the value of attribute valid_till.
16 17 18 |
# File 'lib/chargebee/models/coupon.rb', line 16 def valid_till @valid_till end |
Class Method Details
.copy(params, env = nil, headers = {}) ⇒ Object
54 55 56 |
# File 'lib/chargebee/models/coupon.rb', line 54 def self.copy(params, env=nil, headers={}) Request.send('post', uri_path("coupons","copy"), params, env, headers) end |
.create(params, env = nil, headers = {}) ⇒ Object
OPERATIONS
26 27 28 |
# File 'lib/chargebee/models/coupon.rb', line 26 def self.create(params, env=nil, headers={}) Request.send('post', uri_path("coupons"), params, env, headers) end |
.create_for_items(params, env = nil, headers = {}) ⇒ Object
30 31 32 |
# File 'lib/chargebee/models/coupon.rb', line 30 def self.create_for_items(params, env=nil, headers={}) Request.send('post', uri_path("coupons","create_for_items"), params, env, headers) end |
.delete(id, env = nil, headers = {}) ⇒ Object
50 51 52 |
# File 'lib/chargebee/models/coupon.rb', line 50 def self.delete(id, env=nil, headers={}) Request.send('post', uri_path("coupons",id.to_s,"delete"), {}, env, headers) end |
.list(params = {}, env = nil, headers = {}) ⇒ Object
38 39 40 |
# File 'lib/chargebee/models/coupon.rb', line 38 def self.list(params={}, env=nil, headers={}) Request.send_list_request('get', uri_path("coupons"), params, env, headers) end |
.retrieve(id, env = nil, headers = {}) ⇒ Object
42 43 44 |
# File 'lib/chargebee/models/coupon.rb', line 42 def self.retrieve(id, env=nil, headers={}) Request.send('get', uri_path("coupons",id.to_s), {}, env, headers) end |
.unarchive(id, env = nil, headers = {}) ⇒ Object
58 59 60 |
# File 'lib/chargebee/models/coupon.rb', line 58 def self.unarchive(id, env=nil, headers={}) Request.send('post', uri_path("coupons",id.to_s,"unarchive"), {}, env, headers) end |