Class: ChargeBee::CouponCode
- Defined in:
- lib/chargebee/models/coupon_code.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#coupon_id ⇒ Object
Returns the value of attribute coupon_id.
-
#coupon_set_id ⇒ Object
Returns the value of attribute coupon_set_id.
-
#coupon_set_name ⇒ Object
Returns the value of attribute coupon_set_name.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
- .archive(id, env = nil, headers = {}) ⇒ Object
-
.create(params, env = nil, headers = {}) ⇒ Object
OPERATIONS ———–.
- .list(params = {}, env = nil, headers = {}) ⇒ Object
- .retrieve(id, env = nil, headers = {}) ⇒ Object
Methods inherited from Model
construct, #init_dependant, #init_dependant_list, #initialize, #inspect, #load, #method_missing, #replace_white_space_with_underscore, #respond_to_missing?, #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
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/chargebee/models/coupon_code.rb', line 4 def code @code end |
#coupon_id ⇒ Object
Returns the value of attribute coupon_id.
4 5 6 |
# File 'lib/chargebee/models/coupon_code.rb', line 4 def coupon_id @coupon_id end |
#coupon_set_id ⇒ Object
Returns the value of attribute coupon_set_id.
4 5 6 |
# File 'lib/chargebee/models/coupon_code.rb', line 4 def coupon_set_id @coupon_set_id end |
#coupon_set_name ⇒ Object
Returns the value of attribute coupon_set_name.
4 5 6 |
# File 'lib/chargebee/models/coupon_code.rb', line 4 def coupon_set_name @coupon_set_name end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/chargebee/models/coupon_code.rb', line 4 def status @status end |
Class Method Details
.archive(id, env = nil, headers = {}) ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/chargebee/models/coupon_code.rb', line 32 def self.archive(id, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("coupon_codes",id.to_s,"archive"), {}, env, headers,nil, false, jsonKeys, ) end |
.create(params, env = nil, headers = {}) ⇒ Object
OPERATIONS
9 10 11 12 13 14 15 16 |
# File 'lib/chargebee/models/coupon_code.rb', line 9 def self.create(params, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("coupon_codes"), params, env, headers,nil, false, jsonKeys, ) end |
.list(params = {}, env = nil, headers = {}) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/chargebee/models/coupon_code.rb', line 25 def self.list(params={}, env=nil, headers={}) jsonKeys = { } = {} Request.send_list_request('get', uri_path("coupon_codes"), params, env, headers,nil, false, jsonKeys, ) end |
.retrieve(id, env = nil, headers = {}) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/chargebee/models/coupon_code.rb', line 18 def self.retrieve(id, env=nil, headers={}) jsonKeys = { } = {} Request.send('get', uri_path("coupon_codes",id.to_s), {}, env, headers,nil, false, jsonKeys, ) end |