Class: ChargeBee::Invoice

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

Defined Under Namespace

Classes: BillingAddress, Discount, LineItem, LinkedOrder, LinkedTransaction, Note, ShippingAddress, 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.



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

def amount
  @amount
end

#amount_dueObject

Returns the value of attribute amount_due.



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

def amount_due
  @amount_due
end

#billing_addressObject

Returns the value of attribute billing_address.



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

def billing_address
  @billing_address
end

#currency_codeObject

Returns the value of attribute currency_code.



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

def currency_code
  @currency_code
end

#customer_idObject

Returns the value of attribute customer_id.



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

def customer_id
  @customer_id
end

#discountsObject

Returns the value of attribute discounts.



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

def discounts
  @discounts
end

#dunning_statusObject

Returns the value of attribute dunning_status.



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

def dunning_status
  @dunning_status
end

#end_dateObject

Returns the value of attribute end_date.



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

def end_date
  @end_date
end

#first_invoiceObject

Returns the value of attribute first_invoice.



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

def first_invoice
  @first_invoice
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#line_itemsObject

Returns the value of attribute line_items.



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

def line_items
  @line_items
end

#linked_ordersObject

Returns the value of attribute linked_orders.



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

def linked_orders
  @linked_orders
end

#linked_transactionsObject

Returns the value of attribute linked_transactions.



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

def linked_transactions
  @linked_transactions
end

#next_retryObject

Returns the value of attribute next_retry.



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

def next_retry
  @next_retry
end

#notesObject

Returns the value of attribute notes.



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

def notes
  @notes
end

Returns the value of attribute paid_on.



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

def paid_on
  @paid_on
end

#po_numberObject

Returns the value of attribute po_number.



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

def po_number
  @po_number
end

#price_typeObject

Returns the value of attribute price_type.



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

def price_type
  @price_type
end

#recurringObject

Returns the value of attribute recurring.



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

def recurring
  @recurring
end

#shipping_addressObject

Returns the value of attribute shipping_address.



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

def shipping_address
  @shipping_address
end

#start_dateObject

Returns the value of attribute start_date.



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

def start_date
  @start_date
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#sub_totalObject

Returns the value of attribute sub_total.



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

def sub_total
  @sub_total
end

#subscription_idObject

Returns the value of attribute subscription_id.



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

def subscription_id
  @subscription_id
end

#taxObject

Returns the value of attribute tax.



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

def tax
  @tax
end

#taxesObject

Returns the value of attribute taxes.



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

def taxes
  @taxes
end

#vat_numberObject

Returns the value of attribute vat_number.



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

def vat_number
  @vat_number
end

Class Method Details

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



84
85
86
# File 'lib/chargebee/models/invoice.rb', line 84

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

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



80
81
82
# File 'lib/chargebee/models/invoice.rb', line 80

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

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



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

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

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



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

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

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



88
89
90
# File 'lib/chargebee/models/invoice.rb', line 88

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

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



92
93
94
# File 'lib/chargebee/models/invoice.rb', line 92

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

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

OPERATIONS




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

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

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



108
109
110
# File 'lib/chargebee/models/invoice.rb', line 108

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

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



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

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

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



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

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

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



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

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

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



76
77
78
# File 'lib/chargebee/models/invoice.rb', line 76

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

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



100
101
102
# File 'lib/chargebee/models/invoice.rb', line 100

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

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



96
97
98
# File 'lib/chargebee/models/invoice.rb', line 96

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

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



72
73
74
# File 'lib/chargebee/models/invoice.rb', line 72

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

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



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

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

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



104
105
106
# File 'lib/chargebee/models/invoice.rb', line 104

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