Class: ChargeBee::Invoice
- Defined in:
- lib/chargebee/models/invoice.rb
Defined Under Namespace
Classes: AdjustmentCreditNote, AppliedCredit, BillingAddress, Discount, IssuedCreditNote, LineItem, LineItemDiscount, LineItemTax, LineItemTier, LinkedOrder, LinkedPayment, Note, ShippingAddress, Tax
Instance Attribute Summary collapse
-
#adjustment_credit_notes ⇒ Object
Returns the value of attribute adjustment_credit_notes.
-
#amount_adjusted ⇒ Object
Returns the value of attribute amount_adjusted.
-
#amount_due ⇒ Object
Returns the value of attribute amount_due.
-
#amount_paid ⇒ Object
Returns the value of attribute amount_paid.
-
#amount_to_collect ⇒ Object
Returns the value of attribute amount_to_collect.
-
#applied_credits ⇒ Object
Returns the value of attribute applied_credits.
-
#billing_address ⇒ Object
Returns the value of attribute billing_address.
-
#credits_applied ⇒ Object
Returns the value of attribute credits_applied.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#date ⇒ Object
Returns the value of attribute date.
-
#deleted ⇒ Object
Returns the value of attribute deleted.
-
#discounts ⇒ Object
Returns the value of attribute discounts.
-
#due_date ⇒ Object
Returns the value of attribute due_date.
-
#dunning_status ⇒ Object
Returns the value of attribute dunning_status.
-
#expected_payment_date ⇒ Object
Returns the value of attribute expected_payment_date.
-
#first_invoice ⇒ Object
Returns the value of attribute first_invoice.
-
#has_advance_charges ⇒ Object
Returns the value of attribute has_advance_charges.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_gifted ⇒ Object
Returns the value of attribute is_gifted.
-
#issued_credit_notes ⇒ Object
Returns the value of attribute issued_credit_notes.
-
#line_item_discounts ⇒ Object
Returns the value of attribute line_item_discounts.
-
#line_item_taxes ⇒ Object
Returns the value of attribute line_item_taxes.
-
#line_item_tiers ⇒ Object
Returns the value of attribute line_item_tiers.
-
#line_items ⇒ Object
Returns the value of attribute line_items.
-
#linked_orders ⇒ Object
Returns the value of attribute linked_orders.
-
#linked_payments ⇒ Object
Returns the value of attribute linked_payments.
-
#net_term_days ⇒ Object
Returns the value of attribute net_term_days.
-
#next_retry_at ⇒ Object
Returns the value of attribute next_retry_at.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#paid_at ⇒ Object
Returns the value of attribute paid_at.
-
#po_number ⇒ Object
Returns the value of attribute po_number.
-
#price_type ⇒ Object
Returns the value of attribute price_type.
-
#recurring ⇒ Object
Returns the value of attribute recurring.
-
#resource_version ⇒ Object
Returns the value of attribute resource_version.
-
#round_off_amount ⇒ Object
Returns the value of attribute round_off_amount.
-
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
-
#status ⇒ Object
Returns the value of attribute status.
-
#sub_total ⇒ Object
Returns the value of attribute sub_total.
-
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
-
#tax ⇒ Object
Returns the value of attribute tax.
-
#taxes ⇒ Object
Returns the value of attribute taxes.
-
#term_finalized ⇒ Object
Returns the value of attribute term_finalized.
-
#total ⇒ Object
Returns the value of attribute total.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#vat_number ⇒ Object
Returns the value of attribute vat_number.
-
#voided_at ⇒ Object
Returns the value of attribute voided_at.
-
#write_off_amount ⇒ Object
Returns the value of attribute write_off_amount.
Class Method Summary collapse
- .add_addon_charge(id, params, env = nil, headers = {}) ⇒ Object
- .add_charge(id, params, env = nil, headers = {}) ⇒ Object
- .apply_credits(id, params = {}, env = nil, headers = {}) ⇒ Object
- .apply_payments(id, params = {}, env = nil, headers = {}) ⇒ Object
- .charge(params, env = nil, headers = {}) ⇒ Object
- .charge_addon(params, env = nil, headers = {}) ⇒ Object
- .close(id, env = nil, headers = {}) ⇒ Object
- .collect_payment(id, params = {}, env = nil, headers = {}) ⇒ Object
-
.create(params, env = nil, headers = {}) ⇒ Object
OPERATIONS -----------.
- .delete(id, params = {}, env = nil, headers = {}) ⇒ Object
- .import_invoice(params, env = nil, headers = {}) ⇒ Object
- .invoices_for_customer(id, params = {}, env = nil, headers = {}) ⇒ Object
- .invoices_for_subscription(id, params = {}, env = nil, headers = {}) ⇒ Object
- .list(params = {}, env = nil, headers = {}) ⇒ Object
- .pdf(id, params = {}, env = nil, headers = {}) ⇒ Object
- .record_payment(id, params, env = nil, headers = {}) ⇒ Object
- .record_refund(id, params, env = nil, headers = {}) ⇒ Object
- .refund(id, params = {}, env = nil, headers = {}) ⇒ Object
- .remove_credit_note(id, params, env = nil, headers = {}) ⇒ Object
- .remove_payment(id, params, env = nil, headers = {}) ⇒ Object
- .retrieve(id, env = nil, headers = {}) ⇒ Object
- .stop_dunning(id, env = nil, headers = {}) ⇒ Object
- .update_details(id, params = {}, env = nil, headers = {}) ⇒ Object
- .void_invoice(id, params = {}, env = nil, headers = {}) ⇒ Object
- .write_off(id, params = {}, env = nil, headers = {}) ⇒ Object
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_notes ⇒ Object
Returns the value of attribute adjustment_credit_notes.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def adjustment_credit_notes @adjustment_credit_notes end |
#amount_adjusted ⇒ Object
Returns the value of attribute amount_adjusted.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def amount_adjusted @amount_adjusted end |
#amount_due ⇒ Object
Returns the value of attribute amount_due.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def amount_due @amount_due end |
#amount_paid ⇒ Object
Returns the value of attribute amount_paid.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def amount_paid @amount_paid end |
#amount_to_collect ⇒ Object
Returns the value of attribute amount_to_collect.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def amount_to_collect @amount_to_collect end |
#applied_credits ⇒ Object
Returns the value of attribute applied_credits.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def applied_credits @applied_credits end |
#billing_address ⇒ Object
Returns the value of attribute billing_address.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def billing_address @billing_address end |
#credits_applied ⇒ Object
Returns the value of attribute credits_applied.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def credits_applied @credits_applied end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def currency_code @currency_code end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def customer_id @customer_id end |
#date ⇒ Object
Returns the value of attribute date.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def date @date end |
#deleted ⇒ Object
Returns the value of attribute deleted.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def deleted @deleted end |
#discounts ⇒ Object
Returns the value of attribute discounts.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def discounts @discounts end |
#due_date ⇒ Object
Returns the value of attribute due_date.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def due_date @due_date end |
#dunning_status ⇒ Object
Returns the value of attribute dunning_status.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def dunning_status @dunning_status end |
#expected_payment_date ⇒ Object
Returns the value of attribute expected_payment_date.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def expected_payment_date @expected_payment_date end |
#first_invoice ⇒ Object
Returns the value of attribute first_invoice.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def first_invoice @first_invoice end |
#has_advance_charges ⇒ Object
Returns the value of attribute has_advance_charges.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def has_advance_charges @has_advance_charges end |
#id ⇒ Object
Returns the value of attribute id.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def id @id end |
#is_gifted ⇒ Object
Returns the value of attribute is_gifted.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def is_gifted @is_gifted end |
#issued_credit_notes ⇒ Object
Returns the value of attribute issued_credit_notes.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def issued_credit_notes @issued_credit_notes end |
#line_item_discounts ⇒ Object
Returns the value of attribute line_item_discounts.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def line_item_discounts @line_item_discounts end |
#line_item_taxes ⇒ Object
Returns the value of attribute line_item_taxes.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def line_item_taxes @line_item_taxes end |
#line_item_tiers ⇒ Object
Returns the value of attribute line_item_tiers.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def line_item_tiers @line_item_tiers end |
#line_items ⇒ Object
Returns the value of attribute line_items.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def line_items @line_items end |
#linked_orders ⇒ Object
Returns the value of attribute linked_orders.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def linked_orders @linked_orders end |
#linked_payments ⇒ Object
Returns the value of attribute linked_payments.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def linked_payments @linked_payments end |
#net_term_days ⇒ Object
Returns the value of attribute net_term_days.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def net_term_days @net_term_days end |
#next_retry_at ⇒ Object
Returns the value of attribute next_retry_at.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def next_retry_at @next_retry_at end |
#notes ⇒ Object
Returns the value of attribute notes.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def notes @notes end |
#paid_at ⇒ Object
Returns the value of attribute paid_at.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def paid_at @paid_at end |
#po_number ⇒ Object
Returns the value of attribute po_number.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def po_number @po_number end |
#price_type ⇒ Object
Returns the value of attribute price_type.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def price_type @price_type end |
#recurring ⇒ Object
Returns the value of attribute recurring.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def recurring @recurring end |
#resource_version ⇒ Object
Returns the value of attribute resource_version.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def resource_version @resource_version end |
#round_off_amount ⇒ Object
Returns the value of attribute round_off_amount.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def round_off_amount @round_off_amount end |
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def shipping_address @shipping_address end |
#status ⇒ Object
Returns the value of attribute status.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def status @status end |
#sub_total ⇒ Object
Returns the value of attribute sub_total.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def sub_total @sub_total end |
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def subscription_id @subscription_id end |
#tax ⇒ Object
Returns the value of attribute tax.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def tax @tax end |
#taxes ⇒ Object
Returns the value of attribute taxes.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def taxes @taxes end |
#term_finalized ⇒ Object
Returns the value of attribute term_finalized.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def term_finalized @term_finalized end |
#total ⇒ Object
Returns the value of attribute total.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def total @total end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def updated_at @updated_at end |
#vat_number ⇒ Object
Returns the value of attribute vat_number.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def vat_number @vat_number end |
#voided_at ⇒ Object
Returns the value of attribute voided_at.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def voided_at @voided_at end |
#write_off_amount ⇒ Object
Returns the value of attribute write_off_amount.
60 61 62 |
# File 'lib/chargebee/models/invoice.rb', line 60 def write_off_amount @write_off_amount end |
Class Method Details
.add_addon_charge(id, params, env = nil, headers = {}) ⇒ Object
124 125 126 |
# File 'lib/chargebee/models/invoice.rb', line 124 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
120 121 122 |
# File 'lib/chargebee/models/invoice.rb', line 120 def self.add_charge(id, params, env=nil, headers={}) Request.send('post', uri_path("invoices",id.to_s,"add_charge"), params, env, headers) end |
.apply_credits(id, params = {}, env = nil, headers = {}) ⇒ Object
96 97 98 |
# File 'lib/chargebee/models/invoice.rb', line 96 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
92 93 94 |
# File 'lib/chargebee/models/invoice.rb', line 92 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
76 77 78 |
# File 'lib/chargebee/models/invoice.rb', line 76 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
80 81 82 |
# File 'lib/chargebee/models/invoice.rb', line 80 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
128 129 130 |
# File 'lib/chargebee/models/invoice.rb', line 128 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
132 133 134 |
# File 'lib/chargebee/models/invoice.rb', line 132 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
72 73 74 |
# File 'lib/chargebee/models/invoice.rb', line 72 def self.create(params, env=nil, headers={}) Request.send('post', uri_path("invoices"), params, env, headers) end |
.delete(id, params = {}, env = nil, headers = {}) ⇒ Object
164 165 166 |
# File 'lib/chargebee/models/invoice.rb', line 164 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
88 89 90 |
# File 'lib/chargebee/models/invoice.rb', line 88 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
104 105 106 |
# File 'lib/chargebee/models/invoice.rb', line 104 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
108 109 110 |
# File 'lib/chargebee/models/invoice.rb', line 108 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
100 101 102 |
# File 'lib/chargebee/models/invoice.rb', line 100 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
116 117 118 |
# File 'lib/chargebee/models/invoice.rb', line 116 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
136 137 138 |
# File 'lib/chargebee/models/invoice.rb', line 136 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
144 145 146 |
# File 'lib/chargebee/models/invoice.rb', line 144 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
140 141 142 |
# File 'lib/chargebee/models/invoice.rb', line 140 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
152 153 154 |
# File 'lib/chargebee/models/invoice.rb', line 152 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
148 149 150 |
# File 'lib/chargebee/models/invoice.rb', line 148 def self.remove_payment(id, params, env=nil, headers={}) Request.send('post', uri_path("invoices",id.to_s,"remove_payment"), params, env, headers) end |
.retrieve(id, env = nil, headers = {}) ⇒ Object
112 113 114 |
# File 'lib/chargebee/models/invoice.rb', line 112 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
84 85 86 |
# File 'lib/chargebee/models/invoice.rb', line 84 def self.stop_dunning(id, env=nil, headers={}) Request.send('post', uri_path("invoices",id.to_s,"stop_dunning"), {}, env, headers) end |
.update_details(id, params = {}, env = nil, headers = {}) ⇒ Object
168 169 170 |
# File 'lib/chargebee/models/invoice.rb', line 168 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
156 157 158 |
# File 'lib/chargebee/models/invoice.rb', line 156 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
160 161 162 |
# File 'lib/chargebee/models/invoice.rb', line 160 def self.write_off(id, params={}, env=nil, headers={}) Request.send('post', uri_path("invoices",id.to_s,"write_off"), params, env, headers) end |