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:, customer_display_name:, customer_email:, 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, disabled_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:, customer_display_name:, customer_email:, 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, disabled_on: nil) ⇒ Invoice
Returns a new instance of Invoice.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/moov/models/components/invoice.rb', line 67 def initialize(invoice_id:, invoice_number:, customer_account_id:, customer_display_name:, customer_email:, 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, disabled_on: nil) @invoice_id = invoice_id @invoice_number = invoice_number @customer_account_id = customer_account_id @customer_display_name = customer_display_name @customer_email = customer_email @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 @disabled_on = disabled_on end |
Instance Method Details
#==(other) ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/moov/models/components/invoice.rb', line 96 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 @customer_display_name == other.customer_display_name return false unless @customer_email == other.customer_email 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 return false unless @disabled_on == other.disabled_on true end |