Class: ChargeBee::Gift

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

Defined Under Namespace

Classes: GiftReceiver, GiftTimeline, Gifter

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

construct, #init_dependant, #init_dependant_list, #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

#auto_claimObject

Returns the value of attribute auto_claim.



16
17
18
# File 'lib/chargebee/models/gift.rb', line 16

def auto_claim
  @auto_claim
end

#claim_expiry_dateObject

Returns the value of attribute claim_expiry_date.



16
17
18
# File 'lib/chargebee/models/gift.rb', line 16

def claim_expiry_date
  @claim_expiry_date
end

#gift_receiverObject

Returns the value of attribute gift_receiver.



16
17
18
# File 'lib/chargebee/models/gift.rb', line 16

def gift_receiver
  @gift_receiver
end

#gift_timelinesObject

Returns the value of attribute gift_timelines.



16
17
18
# File 'lib/chargebee/models/gift.rb', line 16

def gift_timelines
  @gift_timelines
end

#gifterObject

Returns the value of attribute gifter.



16
17
18
# File 'lib/chargebee/models/gift.rb', line 16

def gifter
  @gifter
end

#idObject

Returns the value of attribute id.



16
17
18
# File 'lib/chargebee/models/gift.rb', line 16

def id
  @id
end

#no_expiryObject

Returns the value of attribute no_expiry.



16
17
18
# File 'lib/chargebee/models/gift.rb', line 16

def no_expiry
  @no_expiry
end

#resource_versionObject

Returns the value of attribute resource_version.



16
17
18
# File 'lib/chargebee/models/gift.rb', line 16

def resource_version
  @resource_version
end

#scheduled_atObject

Returns the value of attribute scheduled_at.



16
17
18
# File 'lib/chargebee/models/gift.rb', line 16

def scheduled_at
  @scheduled_at
end

#statusObject

Returns the value of attribute status.



16
17
18
# File 'lib/chargebee/models/gift.rb', line 16

def status
  @status
end

#updated_atObject

Returns the value of attribute updated_at.



16
17
18
# File 'lib/chargebee/models/gift.rb', line 16

def updated_at
  @updated_at
end

Class Method Details

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



42
43
44
# File 'lib/chargebee/models/gift.rb', line 42

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

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



38
39
40
# File 'lib/chargebee/models/gift.rb', line 38

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

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

OPERATIONS




22
23
24
# File 'lib/chargebee/models/gift.rb', line 22

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

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



26
27
28
# File 'lib/chargebee/models/gift.rb', line 26

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

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



34
35
36
# File 'lib/chargebee/models/gift.rb', line 34

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

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



30
31
32
# File 'lib/chargebee/models/gift.rb', line 30

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

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



46
47
48
# File 'lib/chargebee/models/gift.rb', line 46

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