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



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

def self.add_coupon_codes(id, params={}, env=nil, headers={})
  jsonKeys = { 
  }
  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
# File 'lib/chargebee/models/coupon_set.rb', line 9

def self.create(params, env=nil, headers={})
  jsonKeys = { 
      :meta_data => 0,
  }
  Request.send('post', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys)
end

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



41
42
43
44
45
# File 'lib/chargebee/models/coupon_set.rb', line 41

def self.delete(id, env=nil, headers={})
  jsonKeys = { 
  }
  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



47
48
49
50
51
# File 'lib/chargebee/models/coupon_set.rb', line 47

def self.delete_unused_coupon_codes(id, env=nil, headers={})
  jsonKeys = { 
  }
  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



22
23
24
25
26
# File 'lib/chargebee/models/coupon_set.rb', line 22

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



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

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



34
35
36
37
38
39
# File 'lib/chargebee/models/coupon_set.rb', line 34

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