Class: Moov::Models::Components::Invoice
- Inherits:
-
Object
- Object
- Moov::Models::Components::Invoice
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/moov/models/components/invoice.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(invoice_id:, invoice_number:, customer_account_id:, partner_account_id:, status:, line_items:, subtotal_amount:, tax_amount:, total_amount:, pending_amount:, paid_amount:, refunded_amount:, disputed_amount:, created_on:, description: nil, payment_link_code: nil, invoice_payments: nil, invoice_date: nil, due_date: nil, sent_on: nil, paid_on: nil, canceled_on: nil) ⇒ Invoice
constructor
A new instance of Invoice.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(invoice_id:, invoice_number:, customer_account_id:, partner_account_id:, status:, line_items:, subtotal_amount:, tax_amount:, total_amount:, pending_amount:, paid_amount:, refunded_amount:, disputed_amount:, created_on:, description: nil, payment_link_code: nil, invoice_payments: nil, invoice_date: nil, due_date: nil, sent_on: nil, paid_on: nil, canceled_on: nil) ⇒ Invoice
Returns a new instance of Invoice.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/moov/models/components/invoice.rb', line 61 def initialize(invoice_id:, invoice_number:, customer_account_id:, partner_account_id:, status:, line_items:, subtotal_amount:, tax_amount:, total_amount:, pending_amount:, paid_amount:, refunded_amount:, disputed_amount:, created_on:, description: nil, payment_link_code: nil, invoice_payments: nil, invoice_date: nil, due_date: nil, sent_on: nil, paid_on: nil, canceled_on: nil) @invoice_id = invoice_id @invoice_number = invoice_number @customer_account_id = customer_account_id @partner_account_id = partner_account_id @status = status @line_items = line_items @subtotal_amount = subtotal_amount @tax_amount = tax_amount @total_amount = total_amount @pending_amount = pending_amount @paid_amount = paid_amount @refunded_amount = refunded_amount @disputed_amount = disputed_amount @created_on = created_on @description = description @payment_link_code = payment_link_code @invoice_payments = invoice_payments @invoice_date = invoice_date @due_date = due_date @sent_on = sent_on @paid_on = paid_on @canceled_on = canceled_on end |
Instance Method Details
#==(other) ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/moov/models/components/invoice.rb', line 87 def ==(other) return false unless other.is_a? self.class return false unless @invoice_id == other.invoice_id return false unless @invoice_number == other.invoice_number return false unless @customer_account_id == other.customer_account_id return false unless @partner_account_id == other.partner_account_id return false unless @status == other.status return false unless @line_items == other.line_items return false unless @subtotal_amount == other.subtotal_amount return false unless @tax_amount == other.tax_amount return false unless @total_amount == other.total_amount return false unless @pending_amount == other.pending_amount return false unless @paid_amount == other.paid_amount return false unless @refunded_amount == other.refunded_amount return false unless @disputed_amount == other.disputed_amount return false unless @created_on == other.created_on return false unless @description == other.description return false unless @payment_link_code == other.payment_link_code return false unless @invoice_payments == other.invoice_payments return false unless @invoice_date == other.invoice_date return false unless @due_date == other.due_date return false unless @sent_on == other.sent_on return false unless @paid_on == other.paid_on return false unless @canceled_on == other.canceled_on true end |