Class: ChargeBee::CreditUnit

Inherits:
Model
  • Object
show all
Defined in:
lib/chargebee/models/credit_unit.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

#created_atObject

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#created_byObject

Returns the value of attribute created_by.



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

def created_by
  @created_by
end

#external_nameObject

Returns the value of attribute external_name.



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

def external_name
  @external_name
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#is_unlimitedObject

Returns the value of attribute is_unlimited.



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

def is_unlimited
  @is_unlimited
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#overdraft_amountObject

Returns the value of attribute overdraft_amount.



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

def overdraft_amount
  @overdraft_amount
end

#resource_versionObject

Returns the value of attribute resource_version.



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

def resource_version
  @resource_version
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#updated_atObject

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#updated_byObject

Returns the value of attribute updated_by.



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

def updated_by
  @updated_by
end

Class Method Details

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



35
36
37
38
39
40
41
42
# File 'lib/chargebee/models/credit_unit.rb', line 35

def self.archive(id, env=nil, headers={})
  jsonKeys = { 
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("credit_units",id.to_s,"archive_command"), {}, env, headers,nil, false, jsonKeys, options, "creditUnit", "archive")
end

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



17
18
19
20
21
22
23
24
# File 'lib/chargebee/models/credit_unit.rb', line 17

def self.create(params, env=nil, headers={})
  jsonKeys = { 
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("credit_units"), params, env, headers,nil, false, jsonKeys, options, "creditUnit", "create")
end

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

OPERATIONS



10
11
12
13
14
15
# File 'lib/chargebee/models/credit_unit.rb', line 10

def self.list(params={}, env=nil, headers={})
  jsonKeys = { 
  }
  options = {}
  Request.send_list_request('get', uri_path("credit_units"), params, env, headers,nil, false, jsonKeys, options, "creditUnit", "list")
end

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



44
45
46
47
48
49
50
51
# File 'lib/chargebee/models/credit_unit.rb', line 44

def self.reactivate(id, env=nil, headers={})
  jsonKeys = { 
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("credit_units",id.to_s,"reactivate_command"), {}, env, headers,nil, false, jsonKeys, options, "creditUnit", "reactivate")
end

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



26
27
28
29
30
31
32
33
# File 'lib/chargebee/models/credit_unit.rb', line 26

def self.update(id, params={}, env=nil, headers={})
  jsonKeys = { 
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("credit_units",id.to_s), params, env, headers,nil, false, jsonKeys, options, "creditUnit", "update")
end