Class: ChargeBee::Usage

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

#created_atObject

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#invoice_idObject

Returns the value of attribute invoice_id.



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

def invoice_id
  @invoice_id
end

#item_price_idObject

Returns the value of attribute item_price_id.



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

def item_price_id
  @item_price_id
end

#line_item_idObject

Returns the value of attribute line_item_id.



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

def line_item_id
  @line_item_id
end

#noteObject

Returns the value of attribute note.



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

def note
  @note
end

#quantityObject

Returns the value of attribute quantity.



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

def quantity
  @quantity
end

#resource_versionObject

Returns the value of attribute resource_version.



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

def resource_version
  @resource_version
end

#sourceObject

Returns the value of attribute source.



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

def source
  @source
end

#subscription_idObject

Returns the value of attribute subscription_id.



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

def subscription_id
  @subscription_id
end

#updated_atObject

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#usage_dateObject

Returns the value of attribute usage_date.



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

def usage_date
  @usage_date
end

Class Method Details

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

OPERATIONS




10
11
12
# File 'lib/chargebee/models/usage.rb', line 10

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

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



18
19
20
# File 'lib/chargebee/models/usage.rb', line 18

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

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



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

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

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



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

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

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



14
15
16
# File 'lib/chargebee/models/usage.rb', line 14

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