Class: ChargeBee::Invoice

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

Defined Under Namespace

Classes: Discount, LineItem, LinkedTransaction, Tax

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

#amountObject

Returns the value of attribute amount.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def amount
  @amount
end

#customer_idObject

Returns the value of attribute customer_id.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def customer_id
  @customer_id
end

#discountsObject

Returns the value of attribute discounts.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def discounts
  @discounts
end

#end_dateObject

Returns the value of attribute end_date.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def end_date
  @end_date
end

#idObject

Returns the value of attribute id.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def id
  @id
end

#line_itemsObject

Returns the value of attribute line_items.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def line_items
  @line_items
end

#linked_transactionsObject

Returns the value of attribute linked_transactions.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def linked_transactions
  @linked_transactions
end

#next_retryObject

Returns the value of attribute next_retry.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def next_retry
  @next_retry
end

Returns the value of attribute paid_on.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def paid_on
  @paid_on
end

#recurringObject

Returns the value of attribute recurring.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def recurring
  @recurring
end

#start_dateObject

Returns the value of attribute start_date.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def start_date
  @start_date
end

#statusObject

Returns the value of attribute status.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def status
  @status
end

#sub_totalObject

Returns the value of attribute sub_total.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def sub_total
  @sub_total
end

#subscription_idObject

Returns the value of attribute subscription_id.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def subscription_id
  @subscription_id
end

#taxObject

Returns the value of attribute tax.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def tax
  @tax
end

#taxesObject

Returns the value of attribute taxes.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def taxes
  @taxes
end

#vat_numberObject

Returns the value of attribute vat_number.



20
21
22
# File 'lib/chargebee/models/invoice.rb', line 20

def vat_number
  @vat_number
end

Class Method Details

.add_addon_charge(id, params, env = nil) ⇒ Object



59
60
61
# File 'lib/chargebee/models/invoice.rb', line 59

def self.add_addon_charge(id, params, env=nil)
  Request.send('post', uri_path("invoices",id.to_s,"add_addon_charge"), params, env)
end

.add_charge(id, params, env = nil) ⇒ Object



55
56
57
# File 'lib/chargebee/models/invoice.rb', line 55

def self.add_charge(id, params, env=nil)
  Request.send('post', uri_path("invoices",id.to_s,"add_charge"), params, env)
end

.charge(params, env = nil) ⇒ Object

OPERATIONS




27
28
29
# File 'lib/chargebee/models/invoice.rb', line 27

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

.charge_addon(params, env = nil) ⇒ Object



31
32
33
# File 'lib/chargebee/models/invoice.rb', line 31

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

.collect(id, env = nil) ⇒ Object



63
64
65
# File 'lib/chargebee/models/invoice.rb', line 63

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

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



39
40
41
# File 'lib/chargebee/models/invoice.rb', line 39

def self.invoices_for_customer(id, params={}, env=nil)
  Request.send('get', uri_path("customers",id.to_s,"invoices"), params, env)
end

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



43
44
45
# File 'lib/chargebee/models/invoice.rb', line 43

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

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



35
36
37
# File 'lib/chargebee/models/invoice.rb', line 35

def self.list(params={}, env=nil)
  Request.send('get', uri_path("invoices"), params, env)
end

.pdf(id, env = nil) ⇒ Object



51
52
53
# File 'lib/chargebee/models/invoice.rb', line 51

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

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



67
68
69
# File 'lib/chargebee/models/invoice.rb', line 67

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

.retrieve(id, env = nil) ⇒ Object



47
48
49
# File 'lib/chargebee/models/invoice.rb', line 47

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