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, #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_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



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 = { 
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("coupon_sets",id.to_s,"add_coupon_codes"), params, env, headers,nil, false, jsonKeys, options)
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,
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, options)
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 = { 
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("coupon_sets",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options)
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 = { 
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("coupon_sets",id.to_s,"delete_unused_coupon_codes"), {}, env, headers,nil, false, jsonKeys, options)
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 = { 
  }
  options = {}
  Request.send_list_request('get', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, options)
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 = { 
  }
  options = {}
  Request.send('get', uri_path("coupon_sets",id.to_s), {}, env, headers,nil, false, jsonKeys, options)
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,
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("coupon_sets",id.to_s,"update"), params, env, headers,nil, false, jsonKeys, options)
end