Class: ChargeBee::Invoice

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

Defined Under Namespace

Classes: AdjustmentCreditNote, AppliedCredit, BillingAddress, Discount, IssuedCreditNote, LineItem, LineItemDiscount, LineItemTax, LinkedOrder, LinkedPayment, Note, ShippingAddress, Tax

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

#adjustment_credit_notesObject

Returns the value of attribute adjustment_credit_notes.



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

def adjustment_credit_notes
  @adjustment_credit_notes
end

#amount_adjustedObject

Returns the value of attribute amount_adjusted.



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

def amount_adjusted
  @amount_adjusted
end

#amount_dueObject

Returns the value of attribute amount_due.



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

def amount_due
  @amount_due
end

#amount_paidObject

Returns the value of attribute amount_paid.



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

def amount_paid
  @amount_paid
end

#applied_creditsObject

Returns the value of attribute applied_credits.



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

def applied_credits
  @applied_credits
end

#billing_addressObject

Returns the value of attribute billing_address.



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

def billing_address
  @billing_address
end

#credits_appliedObject

Returns the value of attribute credits_applied.



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

def credits_applied
  @credits_applied
end

#currency_codeObject

Returns the value of attribute currency_code.



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

def currency_code
  @currency_code
end

#customer_idObject

Returns the value of attribute customer_id.



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

def customer_id
  @customer_id
end

#dateObject

Returns the value of attribute date.



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

def date
  @date
end

#deletedObject

Returns the value of attribute deleted.



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

def deleted
  @deleted
end

#discountsObject

Returns the value of attribute discounts.



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

def discounts
  @discounts
end

#due_dateObject

Returns the value of attribute due_date.



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

def due_date
  @due_date
end

#dunning_statusObject

Returns the value of attribute dunning_status.



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

def dunning_status
  @dunning_status
end

#first_invoiceObject

Returns the value of attribute first_invoice.



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

def first_invoice
  @first_invoice
end

#has_advance_chargesObject

Returns the value of attribute has_advance_charges.



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

def has_advance_charges
  @has_advance_charges
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#issued_credit_notesObject

Returns the value of attribute issued_credit_notes.



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

def issued_credit_notes
  @issued_credit_notes
end

#line_item_discountsObject

Returns the value of attribute line_item_discounts.



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

def line_item_discounts
  @line_item_discounts
end

#line_item_taxesObject

Returns the value of attribute line_item_taxes.



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

def line_item_taxes
  @line_item_taxes
end

#line_itemsObject

Returns the value of attribute line_items.



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

def line_items
  @line_items
end

#linked_ordersObject

Returns the value of attribute linked_orders.



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

def linked_orders
  @linked_orders
end

#linked_paymentsObject

Returns the value of attribute linked_payments.



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

def linked_payments
  @linked_payments
end

#net_term_daysObject

Returns the value of attribute net_term_days.



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

def net_term_days
  @net_term_days
end

#next_retry_atObject

Returns the value of attribute next_retry_at.



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

def next_retry_at
  @next_retry_at
end

#notesObject

Returns the value of attribute notes.



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

def notes
  @notes
end

Returns the value of attribute paid_at.



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

def paid_at
  @paid_at
end

#po_numberObject

Returns the value of attribute po_number.



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

def po_number
  @po_number
end

#price_typeObject

Returns the value of attribute price_type.



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

def price_type
  @price_type
end

#recurringObject

Returns the value of attribute recurring.



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

def recurring
  @recurring
end

#resource_versionObject

Returns the value of attribute resource_version.



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

def resource_version
  @resource_version
end

#shipping_addressObject

Returns the value of attribute shipping_address.



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

def shipping_address
  @shipping_address
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#sub_totalObject

Returns the value of attribute sub_total.



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

def sub_total
  @sub_total
end

#subscription_idObject

Returns the value of attribute subscription_id.



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

def subscription_id
  @subscription_id
end

#taxObject

Returns the value of attribute tax.



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

def tax
  @tax
end

#taxesObject

Returns the value of attribute taxes.



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

def taxes
  @taxes
end

#totalObject

Returns the value of attribute total.



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

def total
  @total
end

#updated_atObject

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#vat_numberObject

Returns the value of attribute vat_number.



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

def vat_number
  @vat_number
end

#voided_atObject

Returns the value of attribute voided_at.



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

def voided_at
  @voided_at
end

#write_off_amountObject

Returns the value of attribute write_off_amount.



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

def write_off_amount
  @write_off_amount
end

Class Method Details

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



111
112
113
# File 'lib/chargebee/models/invoice.rb', line 111

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



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

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



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

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



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

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

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



115
116
117
# File 'lib/chargebee/models/invoice.rb', line 115

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

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



119
120
121
# File 'lib/chargebee/models/invoice.rb', line 119

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

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

OPERATIONS




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

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

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



143
144
145
# File 'lib/chargebee/models/invoice.rb', line 143

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

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



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

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

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



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

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



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

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



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

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

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



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

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

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



123
124
125
# File 'lib/chargebee/models/invoice.rb', line 123

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

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



131
132
133
# File 'lib/chargebee/models/invoice.rb', line 131

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



127
128
129
# File 'lib/chargebee/models/invoice.rb', line 127

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



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

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



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

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



135
136
137
# File 'lib/chargebee/models/invoice.rb', line 135

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

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



139
140
141
# File 'lib/chargebee/models/invoice.rb', line 139

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