Class: ChargeBee::CouponSet

Inherits:
Model
  • Object
show all
Defined in:
lib/chargebee/models/coupon_set.rb

Instance Attribute Summary collapse

Class Method Summary collapse

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

#archived_countObject

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_idObject

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

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/chargebee/models/coupon_set.rb', line 4

def id
  @id
end

#meta_dataObject

Returns the value of attribute meta_data.



4
5
6
# File 'lib/chargebee/models/coupon_set.rb', line 4

def 
  @meta_data
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/chargebee/models/coupon_set.rb', line 4

def name
  @name
end

#redeemed_countObject

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_countObject

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



13
14
15
# File 'lib/chargebee/models/coupon_set.rb', line 13

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

.create(params, env = nil, headers = {}) ⇒ Object

OPERATIONS




9
10
11
# File 'lib/chargebee/models/coupon_set.rb', line 9

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

.delete(id, env = nil, headers = {}) ⇒ Object



29
30
31
# File 'lib/chargebee/models/coupon_set.rb', line 29

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

.delete_unused_coupon_codes(id, env = nil, headers = {}) ⇒ Object



33
34
35
# File 'lib/chargebee/models/coupon_set.rb', line 33

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

.list(params = {}, env = nil, headers = {}) ⇒ Object



17
18
19
# File 'lib/chargebee/models/coupon_set.rb', line 17

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

.retrieve(id, env = nil, headers = {}) ⇒ Object



21
22
23
# File 'lib/chargebee/models/coupon_set.rb', line 21

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

.update(id, params = {}, env = nil, headers = {}) ⇒ Object



25
26
27
# File 'lib/chargebee/models/coupon_set.rb', line 25

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