Class: ChargeBee::Invoice

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

Defined Under Namespace

Classes: AdjustmentCreditNote, AppliedCredit, BillingAddress, Discount, DunningAttempt, Einvoice, IssuedCreditNote, LineItem, LineItemDiscount, LineItemTax, LineItemTier, 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.



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

def adjustment_credit_notes
  @adjustment_credit_notes
end

#amount_adjustedObject

Returns the value of attribute amount_adjusted.



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

def amount_adjusted
  @amount_adjusted
end

#amount_dueObject

Returns the value of attribute amount_due.



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

def amount_due
  @amount_due
end

#amount_paidObject

Returns the value of attribute amount_paid.



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

def amount_paid
  @amount_paid
end

#amount_to_collectObject

Returns the value of attribute amount_to_collect.



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

def amount_to_collect
  @amount_to_collect
end

#applied_creditsObject

Returns the value of attribute applied_credits.



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

def applied_credits
  @applied_credits
end

#billing_addressObject

Returns the value of attribute billing_address.



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

def billing_address
  @billing_address
end

#business_entity_idObject

Returns the value of attribute business_entity_id.



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

def business_entity_id
  @business_entity_id
end

#channelObject

Returns the value of attribute channel.



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

def channel
  @channel
end

#credits_appliedObject

Returns the value of attribute credits_applied.



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

def credits_applied
  @credits_applied
end

#currency_codeObject

Returns the value of attribute currency_code.



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

def currency_code
  @currency_code
end

#customer_idObject

Returns the value of attribute customer_id.



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

def customer_id
  @customer_id
end

#dateObject

Returns the value of attribute date.



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

def date
  @date
end

#deletedObject

Returns the value of attribute deleted.



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

def deleted
  @deleted
end

#discountsObject

Returns the value of attribute discounts.



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

def discounts
  @discounts
end

#due_dateObject

Returns the value of attribute due_date.



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

def due_date
  @due_date
end

#dunning_attemptsObject

Returns the value of attribute dunning_attempts.



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

def dunning_attempts
  @dunning_attempts
end

#dunning_statusObject

Returns the value of attribute dunning_status.



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

def dunning_status
  @dunning_status
end

#einvoiceObject

Returns the value of attribute einvoice.



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

def einvoice
  @einvoice
end

#exchange_rateObject

Returns the value of attribute exchange_rate.



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

def exchange_rate
  @exchange_rate
end

#expected_payment_dateObject

Returns the value of attribute expected_payment_date.



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

def expected_payment_date
  @expected_payment_date
end

#first_invoiceObject

Returns the value of attribute first_invoice.



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

def first_invoice
  @first_invoice
end

#generated_atObject

Returns the value of attribute generated_at.



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

def generated_at
  @generated_at
end

#has_advance_chargesObject

Returns the value of attribute has_advance_charges.



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

def has_advance_charges
  @has_advance_charges
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#is_giftedObject

Returns the value of attribute is_gifted.



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

def is_gifted
  @is_gifted
end

#issued_credit_notesObject

Returns the value of attribute issued_credit_notes.



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

def issued_credit_notes
  @issued_credit_notes
end

#line_item_discountsObject

Returns the value of attribute line_item_discounts.



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

def line_item_discounts
  @line_item_discounts
end

#line_item_taxesObject

Returns the value of attribute line_item_taxes.



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

def line_item_taxes
  @line_item_taxes
end

#line_item_tiersObject

Returns the value of attribute line_item_tiers.



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

def line_item_tiers
  @line_item_tiers
end

#line_itemsObject

Returns the value of attribute line_items.



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

def line_items
  @line_items
end

#linked_ordersObject

Returns the value of attribute linked_orders.



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

def linked_orders
  @linked_orders
end

#linked_paymentsObject

Returns the value of attribute linked_payments.



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

def linked_payments
  @linked_payments
end

#local_currency_codeObject

Returns the value of attribute local_currency_code.



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

def local_currency_code
  @local_currency_code
end

#net_term_daysObject

Returns the value of attribute net_term_days.



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

def net_term_days
  @net_term_days
end

#new_sales_amountObject

Returns the value of attribute new_sales_amount.



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

def new_sales_amount
  @new_sales_amount
end

#next_retry_atObject

Returns the value of attribute next_retry_at.



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

def next_retry_at
  @next_retry_at
end

#notesObject

Returns the value of attribute notes.



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

def notes
  @notes
end

Returns the value of attribute paid_at.



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

def paid_at
  @paid_at
end

#payment_ownerObject

Returns the value of attribute payment_owner.



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

def payment_owner
  @payment_owner
end

#po_numberObject

Returns the value of attribute po_number.



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

def po_number
  @po_number
end

#price_typeObject

Returns the value of attribute price_type.



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

def price_type
  @price_type
end

#recurringObject

Returns the value of attribute recurring.



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

def recurring
  @recurring
end

#resource_versionObject

Returns the value of attribute resource_version.



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

def resource_version
  @resource_version
end

#round_off_amountObject

Returns the value of attribute round_off_amount.



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

def round_off_amount
  @round_off_amount
end

#shipping_addressObject

Returns the value of attribute shipping_address.



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

def shipping_address
  @shipping_address
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#sub_totalObject

Returns the value of attribute sub_total.



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

def sub_total
  @sub_total
end

#sub_total_in_local_currencyObject

Returns the value of attribute sub_total_in_local_currency.



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

def sub_total_in_local_currency
  @sub_total_in_local_currency
end

#subscription_idObject

Returns the value of attribute subscription_id.



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

def subscription_id
  @subscription_id
end

#taxObject

Returns the value of attribute tax.



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

def tax
  @tax
end

#taxesObject

Returns the value of attribute taxes.



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

def taxes
  @taxes
end

#term_finalizedObject

Returns the value of attribute term_finalized.



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

def term_finalized
  @term_finalized
end

#totalObject

Returns the value of attribute total.



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

def total
  @total
end

#total_in_local_currencyObject

Returns the value of attribute total_in_local_currency.



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

def total_in_local_currency
  @total_in_local_currency
end

#updated_atObject

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#vat_numberObject

Returns the value of attribute vat_number.



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

def vat_number
  @vat_number
end

#vat_number_prefixObject

Returns the value of attribute vat_number_prefix.



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

def vat_number_prefix
  @vat_number_prefix
end

#void_reason_codeObject

Returns the value of attribute void_reason_code.



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

def void_reason_code
  @void_reason_code
end

#voided_atObject

Returns the value of attribute voided_at.



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

def voided_at
  @voided_at
end

#write_off_amountObject

Returns the value of attribute write_off_amount.



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

def write_off_amount
  @write_off_amount
end

Class Method Details

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



150
151
152
# File 'lib/chargebee/models/invoice.rb', line 150

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



146
147
148
# File 'lib/chargebee/models/invoice.rb', line 146

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

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



154
155
156
# File 'lib/chargebee/models/invoice.rb', line 154

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

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



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

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

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



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

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

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



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

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



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

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

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



158
159
160
# File 'lib/chargebee/models/invoice.rb', line 158

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

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



162
163
164
# File 'lib/chargebee/models/invoice.rb', line 162

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




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

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

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



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

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

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



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

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

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



194
195
196
# File 'lib/chargebee/models/invoice.rb', line 194

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

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



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

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

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



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

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



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

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



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

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



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

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

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



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

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

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



166
167
168
# File 'lib/chargebee/models/invoice.rb', line 166

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



174
175
176
# File 'lib/chargebee/models/invoice.rb', line 174

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



170
171
172
# File 'lib/chargebee/models/invoice.rb', line 170

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

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



182
183
184
# File 'lib/chargebee/models/invoice.rb', line 182

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

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



178
179
180
# File 'lib/chargebee/models/invoice.rb', line 178

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

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



202
203
204
# File 'lib/chargebee/models/invoice.rb', line 202

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

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



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

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

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



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

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

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



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

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

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



198
199
200
# File 'lib/chargebee/models/invoice.rb', line 198

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

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



186
187
188
# File 'lib/chargebee/models/invoice.rb', line 186

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



190
191
192
# File 'lib/chargebee/models/invoice.rb', line 190

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