Class: ChargeBee::CouponSet
- Defined in:
- lib/chargebee/models/coupon_set.rb
Instance Attribute Summary collapse
-
#archived_count ⇒ Object
Returns the value of attribute archived_count.
-
#coupon_id ⇒ Object
Returns the value of attribute coupon_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#meta_data ⇒ Object
Returns the value of attribute meta_data.
-
#name ⇒ Object
Returns the value of attribute name.
-
#redeemed_count ⇒ Object
Returns the value of attribute redeemed_count.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
Class Method Summary collapse
- .add_coupon_codes(id, params = {}, env = nil, headers = {}) ⇒ Object
-
.create(params, env = nil, headers = {}) ⇒ Object
OPERATIONS ———–.
- .delete(id, env = nil, headers = {}) ⇒ Object
- .delete_unused_coupon_codes(id, env = nil, headers = {}) ⇒ Object
- .list(params = {}, env = nil, headers = {}) ⇒ Object
- .retrieve(id, env = nil, headers = {}) ⇒ Object
- .update(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, #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
#archived_count ⇒ Object
Returns the value of attribute archived_count.
4 5 6 |
# File 'lib/chargebee/models/coupon_set.rb', line 4 def archived_count @archived_count end |
#coupon_id ⇒ Object
Returns the value of attribute coupon_id.
4 5 6 |
# File 'lib/chargebee/models/coupon_set.rb', line 4 def coupon_id @coupon_id end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/chargebee/models/coupon_set.rb', line 4 def id @id end |
#meta_data ⇒ Object
Returns the value of attribute meta_data.
4 5 6 |
# File 'lib/chargebee/models/coupon_set.rb', line 4 def @meta_data end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/chargebee/models/coupon_set.rb', line 4 def name @name end |
#redeemed_count ⇒ Object
Returns the value of attribute redeemed_count.
4 5 6 |
# File 'lib/chargebee/models/coupon_set.rb', line 4 def redeemed_count @redeemed_count end |
#total_count ⇒ Object
Returns the value of attribute total_count.
4 5 6 |
# File 'lib/chargebee/models/coupon_set.rb', line 4 def total_count @total_count end |
Class Method Details
.add_coupon_codes(id, params = {}, env = nil, headers = {}) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/chargebee/models/coupon_set.rb', line 19 def self.add_coupon_codes(id, params={}, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("coupon_sets",id.to_s,"add_coupon_codes"), params, env, headers,nil, false, jsonKeys, ) end |
.create(params, env = nil, headers = {}) ⇒ Object
OPERATIONS
9 10 11 12 13 14 15 16 17 |
# File 'lib/chargebee/models/coupon_set.rb', line 9 def self.create(params, env=nil, headers={}) jsonKeys = { :meta_data => 0, } = { :isIdempotent => true } Request.send('post', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, ) end |
.delete(id, env = nil, headers = {}) ⇒ Object
52 53 54 55 56 57 58 59 |
# File 'lib/chargebee/models/coupon_set.rb', line 52 def self.delete(id, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("coupon_sets",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, ) end |
.delete_unused_coupon_codes(id, env = nil, headers = {}) ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'lib/chargebee/models/coupon_set.rb', line 61 def self.delete_unused_coupon_codes(id, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("coupon_sets",id.to_s,"delete_unused_coupon_codes"), {}, env, headers,nil, false, jsonKeys, ) end |
.list(params = {}, env = nil, headers = {}) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/chargebee/models/coupon_set.rb', line 28 def self.list(params={}, env=nil, headers={}) jsonKeys = { } = {} Request.send_list_request('get', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, ) end |
.retrieve(id, env = nil, headers = {}) ⇒ Object
35 36 37 38 39 40 |
# File 'lib/chargebee/models/coupon_set.rb', line 35 def self.retrieve(id, env=nil, headers={}) jsonKeys = { } = {} Request.send('get', uri_path("coupon_sets",id.to_s), {}, env, headers,nil, false, jsonKeys, ) end |
.update(id, params = {}, env = nil, headers = {}) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/chargebee/models/coupon_set.rb', line 42 def self.update(id, params={}, env=nil, headers={}) jsonKeys = { :meta_data => 0, } = { :isIdempotent => true } Request.send('post', uri_path("coupon_sets",id.to_s,"update"), params, env, headers,nil, false, jsonKeys, ) end |