Class: ChargeBee::CouponCode

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

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

construct, #initialize, #inspect, #load, #method_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

#codeObject

Returns the value of attribute code.



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

def code
  @code
end

#coupon_idObject

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_nameObject

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

Class Method Details

.create(params, env = nil) ⇒ Object

OPERATIONS




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

def self.create(params, env=nil)
  Request.send('post', uri_path("coupon_codes"), params, env)
end

.retrieve(id, env = nil) ⇒ Object



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

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