Class: OCI::OspGateway::Models::InvoiceSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/osp_gateway/models/invoice_summary.rb

Overview

Invoice list elements

Constant Summary collapse

INVOICE_STATUS_ENUM =
[
  INVOICE_STATUS_OPEN = 'OPEN'.freeze,
  INVOICE_STATUS_PAST_DUE = 'PAST_DUE'.freeze,
  INVOICE_STATUS_PAYMENT_SUBMITTED = 'PAYMENT_SUBMITTED'.freeze,
  INVOICE_STATUS_CLOSED = 'CLOSED'.freeze,
  INVOICE_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
INVOICE_TYPE_ENUM =
[
  INVOICE_TYPE_HARDWARE = 'HARDWARE'.freeze,
  INVOICE_TYPE_SUBSCRIPTION = 'SUBSCRIPTION'.freeze,
  INVOICE_TYPE_SUPPORT = 'SUPPORT'.freeze,
  INVOICE_TYPE_LICENSE = 'LICENSE'.freeze,
  INVOICE_TYPE_EDUCATION = 'EDUCATION'.freeze,
  INVOICE_TYPE_CONSULTING = 'CONSULTING'.freeze,
  INVOICE_TYPE_SERVICE = 'SERVICE'.freeze,
  INVOICE_TYPE_USAGE = 'USAGE'.freeze,
  INVOICE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ InvoiceSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 234

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.invoice_id = attributes[:'invoiceId'] if attributes[:'invoiceId']

  raise 'You cannot provide both :invoiceId and :invoice_id' if attributes.key?(:'invoiceId') && attributes.key?(:'invoice_id')

  self.invoice_id = attributes[:'invoice_id'] if attributes[:'invoice_id']

  self.invoice_number = attributes[:'invoiceNumber'] if attributes[:'invoiceNumber']

  raise 'You cannot provide both :invoiceNumber and :invoice_number' if attributes.key?(:'invoiceNumber') && attributes.key?(:'invoice_number')

  self.invoice_number = attributes[:'invoice_number'] if attributes[:'invoice_number']

  self.internal_invoice_id = attributes[:'internalInvoiceId'] if attributes[:'internalInvoiceId']

  raise 'You cannot provide both :internalInvoiceId and :internal_invoice_id' if attributes.key?(:'internalInvoiceId') && attributes.key?(:'internal_invoice_id')

  self.internal_invoice_id = attributes[:'internal_invoice_id'] if attributes[:'internal_invoice_id']

  self.is_credit_card_payable = attributes[:'isCreditCardPayable'] unless attributes[:'isCreditCardPayable'].nil?

  raise 'You cannot provide both :isCreditCardPayable and :is_credit_card_payable' if attributes.key?(:'isCreditCardPayable') && attributes.key?(:'is_credit_card_payable')

  self.is_credit_card_payable = attributes[:'is_credit_card_payable'] unless attributes[:'is_credit_card_payable'].nil?

  self.invoice_status = attributes[:'invoiceStatus'] if attributes[:'invoiceStatus']

  raise 'You cannot provide both :invoiceStatus and :invoice_status' if attributes.key?(:'invoiceStatus') && attributes.key?(:'invoice_status')

  self.invoice_status = attributes[:'invoice_status'] if attributes[:'invoice_status']

  self.invoice_type = attributes[:'invoiceType'] if attributes[:'invoiceType']

  raise 'You cannot provide both :invoiceType and :invoice_type' if attributes.key?(:'invoiceType') && attributes.key?(:'invoice_type')

  self.invoice_type = attributes[:'invoice_type'] if attributes[:'invoice_type']

  self.is_paid = attributes[:'isPaid'] unless attributes[:'isPaid'].nil?

  raise 'You cannot provide both :isPaid and :is_paid' if attributes.key?(:'isPaid') && attributes.key?(:'is_paid')

  self.is_paid = attributes[:'is_paid'] unless attributes[:'is_paid'].nil?

  self.is_payable = attributes[:'isPayable'] unless attributes[:'isPayable'].nil?

  raise 'You cannot provide both :isPayable and :is_payable' if attributes.key?(:'isPayable') && attributes.key?(:'is_payable')

  self.is_payable = attributes[:'is_payable'] unless attributes[:'is_payable'].nil?

  self.invoice_amount = attributes[:'invoiceAmount'] if attributes[:'invoiceAmount']

  raise 'You cannot provide both :invoiceAmount and :invoice_amount' if attributes.key?(:'invoiceAmount') && attributes.key?(:'invoice_amount')

  self.invoice_amount = attributes[:'invoice_amount'] if attributes[:'invoice_amount']

  self.invoice_amount_due = attributes[:'invoiceAmountDue'] if attributes[:'invoiceAmountDue']

  raise 'You cannot provide both :invoiceAmountDue and :invoice_amount_due' if attributes.key?(:'invoiceAmountDue') && attributes.key?(:'invoice_amount_due')

  self.invoice_amount_due = attributes[:'invoice_amount_due'] if attributes[:'invoice_amount_due']

  self.invoice_amount_credited = attributes[:'invoiceAmountCredited'] if attributes[:'invoiceAmountCredited']

  raise 'You cannot provide both :invoiceAmountCredited and :invoice_amount_credited' if attributes.key?(:'invoiceAmountCredited') && attributes.key?(:'invoice_amount_credited')

  self.invoice_amount_credited = attributes[:'invoice_amount_credited'] if attributes[:'invoice_amount_credited']

  self.invoice_amount_adjusted = attributes[:'invoiceAmountAdjusted'] if attributes[:'invoiceAmountAdjusted']

  raise 'You cannot provide both :invoiceAmountAdjusted and :invoice_amount_adjusted' if attributes.key?(:'invoiceAmountAdjusted') && attributes.key?(:'invoice_amount_adjusted')

  self.invoice_amount_adjusted = attributes[:'invoice_amount_adjusted'] if attributes[:'invoice_amount_adjusted']

  self.invoice_amount_applied = attributes[:'invoiceAmountApplied'] if attributes[:'invoiceAmountApplied']

  raise 'You cannot provide both :invoiceAmountApplied and :invoice_amount_applied' if attributes.key?(:'invoiceAmountApplied') && attributes.key?(:'invoice_amount_applied')

  self.invoice_amount_applied = attributes[:'invoice_amount_applied'] if attributes[:'invoice_amount_applied']

  self.time_invoice_due = attributes[:'timeInvoiceDue'] if attributes[:'timeInvoiceDue']

  raise 'You cannot provide both :timeInvoiceDue and :time_invoice_due' if attributes.key?(:'timeInvoiceDue') && attributes.key?(:'time_invoice_due')

  self.time_invoice_due = attributes[:'time_invoice_due'] if attributes[:'time_invoice_due']

  self.is_payment_failed = attributes[:'isPaymentFailed'] unless attributes[:'isPaymentFailed'].nil?

  raise 'You cannot provide both :isPaymentFailed and :is_payment_failed' if attributes.key?(:'isPaymentFailed') && attributes.key?(:'is_payment_failed')

  self.is_payment_failed = attributes[:'is_payment_failed'] unless attributes[:'is_payment_failed'].nil?

  self.invoice_amount_in_dispute = attributes[:'invoiceAmountInDispute'] if attributes[:'invoiceAmountInDispute']

  raise 'You cannot provide both :invoiceAmountInDispute and :invoice_amount_in_dispute' if attributes.key?(:'invoiceAmountInDispute') && attributes.key?(:'invoice_amount_in_dispute')

  self.invoice_amount_in_dispute = attributes[:'invoice_amount_in_dispute'] if attributes[:'invoice_amount_in_dispute']

  self.invoice_ref_number = attributes[:'invoiceRefNumber'] if attributes[:'invoiceRefNumber']

  raise 'You cannot provide both :invoiceRefNumber and :invoice_ref_number' if attributes.key?(:'invoiceRefNumber') && attributes.key?(:'invoice_ref_number')

  self.invoice_ref_number = attributes[:'invoice_ref_number'] if attributes[:'invoice_ref_number']

  self.invoice_po_number = attributes[:'invoicePoNumber'] if attributes[:'invoicePoNumber']

  raise 'You cannot provide both :invoicePoNumber and :invoice_po_number' if attributes.key?(:'invoicePoNumber') && attributes.key?(:'invoice_po_number')

  self.invoice_po_number = attributes[:'invoice_po_number'] if attributes[:'invoice_po_number']

  self.time_invoice = attributes[:'timeInvoice'] if attributes[:'timeInvoice']

  raise 'You cannot provide both :timeInvoice and :time_invoice' if attributes.key?(:'timeInvoice') && attributes.key?(:'time_invoice')

  self.time_invoice = attributes[:'time_invoice'] if attributes[:'time_invoice']

  self.currency = attributes[:'currency'] if attributes[:'currency']

  self.is_pdf_email_available = attributes[:'isPdfEmailAvailable'] unless attributes[:'isPdfEmailAvailable'].nil?

  raise 'You cannot provide both :isPdfEmailAvailable and :is_pdf_email_available' if attributes.key?(:'isPdfEmailAvailable') && attributes.key?(:'is_pdf_email_available')

  self.is_pdf_email_available = attributes[:'is_pdf_email_available'] unless attributes[:'is_pdf_email_available'].nil?

  self.is_display_view_pdf = attributes[:'isDisplayViewPdf'] unless attributes[:'isDisplayViewPdf'].nil?

  raise 'You cannot provide both :isDisplayViewPdf and :is_display_view_pdf' if attributes.key?(:'isDisplayViewPdf') && attributes.key?(:'is_display_view_pdf')

  self.is_display_view_pdf = attributes[:'is_display_view_pdf'] unless attributes[:'is_display_view_pdf'].nil?

  self.is_display_download_pdf = attributes[:'isDisplayDownloadPdf'] unless attributes[:'isDisplayDownloadPdf'].nil?

  raise 'You cannot provide both :isDisplayDownloadPdf and :is_display_download_pdf' if attributes.key?(:'isDisplayDownloadPdf') && attributes.key?(:'is_display_download_pdf')

  self.is_display_download_pdf = attributes[:'is_display_download_pdf'] unless attributes[:'is_display_download_pdf'].nil?

  self.last_payment_detail = attributes[:'lastPaymentDetail'] if attributes[:'lastPaymentDetail']

  raise 'You cannot provide both :lastPaymentDetail and :last_payment_detail' if attributes.key?(:'lastPaymentDetail') && attributes.key?(:'last_payment_detail')

  self.last_payment_detail = attributes[:'last_payment_detail'] if attributes[:'last_payment_detail']

  self.party_name = attributes[:'partyName'] if attributes[:'partyName']

  raise 'You cannot provide both :partyName and :party_name' if attributes.key?(:'partyName') && attributes.key?(:'party_name')

  self.party_name = attributes[:'party_name'] if attributes[:'party_name']

  self.subscription_ids = attributes[:'subscriptionIds'] if attributes[:'subscriptionIds']

  raise 'You cannot provide both :subscriptionIds and :subscription_ids' if attributes.key?(:'subscriptionIds') && attributes.key?(:'subscription_ids')

  self.subscription_ids = attributes[:'subscription_ids'] if attributes[:'subscription_ids']
end

Instance Attribute Details

#currencyOCI::OspGateway::Models::Currency



109
110
111
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 109

def currency
  @currency
end

#internal_invoice_idString

PC invoice identifier

Returns:

  • (String)


42
43
44
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 42

def internal_invoice_id
  @internal_invoice_id
end

#invoice_amountFloat

Invoice amount

Returns:

  • (Float)


66
67
68
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 66

def invoice_amount
  @invoice_amount
end

#invoice_amount_adjustedFloat

Invoice amount adjust

Returns:

  • (Float)


78
79
80
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 78

def invoice_amount_adjusted
  @invoice_amount_adjusted
end

#invoice_amount_appliedFloat

Invoice amount applied

Returns:

  • (Float)


82
83
84
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 82

def invoice_amount_applied
  @invoice_amount_applied
end

#invoice_amount_creditedFloat

Invoice amount credit

Returns:

  • (Float)


74
75
76
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 74

def invoice_amount_credited
  @invoice_amount_credited
end

#invoice_amount_dueFloat

Invoice amount due

Returns:

  • (Float)


70
71
72
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 70

def invoice_amount_due
  @invoice_amount_due
end

#invoice_amount_in_disputeFloat

Invoice amount in dispute

Returns:

  • (Float)


94
95
96
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 94

def invoice_amount_in_dispute
  @invoice_amount_in_dispute
end

#invoice_idString

[Required] Invoice identifier

Returns:

  • (String)


34
35
36
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 34

def invoice_id
  @invoice_id
end

#invoice_numberString

Invoice external reference

Returns:

  • (String)


38
39
40
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 38

def invoice_number
  @invoice_number
end

#invoice_po_numberString

Invoice PO number

Returns:

  • (String)


102
103
104
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 102

def invoice_po_number
  @invoice_po_number
end

#invoice_ref_numberString

Invoice reference number

Returns:

  • (String)


98
99
100
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 98

def invoice_ref_number
  @invoice_ref_number
end

#invoice_statusString

Invoice status

Returns:

  • (String)


50
51
52
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 50

def invoice_status
  @invoice_status
end

#invoice_typeString

Type of invoice

Returns:

  • (String)


54
55
56
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 54

def invoice_type
  @invoice_type
end

#is_credit_card_payableBOOLEAN

Is credit card payment eligible

Returns:

  • (BOOLEAN)


46
47
48
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 46

def is_credit_card_payable
  @is_credit_card_payable
end

#is_display_download_pdfBOOLEAN

Is pdf download access allowed

Returns:

  • (BOOLEAN)


121
122
123
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 121

def is_display_download_pdf
  @is_display_download_pdf
end

#is_display_view_pdfBOOLEAN

Is view access allowed

Returns:

  • (BOOLEAN)


117
118
119
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 117

def is_display_view_pdf
  @is_display_view_pdf
end

#is_paidBOOLEAN

Is the invoice has been already payed

Returns:

  • (BOOLEAN)


58
59
60
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 58

def is_paid
  @is_paid
end

#is_payableBOOLEAN

Whether invoice can be payed

Returns:

  • (BOOLEAN)


62
63
64
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 62

def is_payable
  @is_payable
end

#is_payment_failedBOOLEAN

Is the last payment failed

Returns:

  • (BOOLEAN)


90
91
92
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 90

def is_payment_failed
  @is_payment_failed
end

#is_pdf_email_availableBOOLEAN

Is emailing pdf allowed

Returns:

  • (BOOLEAN)


113
114
115
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 113

def is_pdf_email_available
  @is_pdf_email_available
end

#last_payment_detailOCI::OspGateway::Models::PaymentDetail



124
125
126
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 124

def last_payment_detail
  @last_payment_detail
end

#party_nameString

Name of the bill to customer

Returns:

  • (String)


128
129
130
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 128

def party_name
  @party_name
end

#subscription_idsArray<String>

List of subscription identifiers

Returns:

  • (Array<String>)


132
133
134
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 132

def subscription_ids
  @subscription_ids
end

#time_invoiceDateTime

Date of invoice

Returns:

  • (DateTime)


106
107
108
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 106

def time_invoice
  @time_invoice
end

#time_invoice_dueDateTime

Due date of invoice amount

Returns:

  • (DateTime)


86
87
88
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 86

def time_invoice_due
  @time_invoice_due
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 135

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'invoice_id': :'invoiceId',
    'invoice_number': :'invoiceNumber',
    'internal_invoice_id': :'internalInvoiceId',
    'is_credit_card_payable': :'isCreditCardPayable',
    'invoice_status': :'invoiceStatus',
    'invoice_type': :'invoiceType',
    'is_paid': :'isPaid',
    'is_payable': :'isPayable',
    'invoice_amount': :'invoiceAmount',
    'invoice_amount_due': :'invoiceAmountDue',
    'invoice_amount_credited': :'invoiceAmountCredited',
    'invoice_amount_adjusted': :'invoiceAmountAdjusted',
    'invoice_amount_applied': :'invoiceAmountApplied',
    'time_invoice_due': :'timeInvoiceDue',
    'is_payment_failed': :'isPaymentFailed',
    'invoice_amount_in_dispute': :'invoiceAmountInDispute',
    'invoice_ref_number': :'invoiceRefNumber',
    'invoice_po_number': :'invoicePoNumber',
    'time_invoice': :'timeInvoice',
    'currency': :'currency',
    'is_pdf_email_available': :'isPdfEmailAvailable',
    'is_display_view_pdf': :'isDisplayViewPdf',
    'is_display_download_pdf': :'isDisplayDownloadPdf',
    'last_payment_detail': :'lastPaymentDetail',
    'party_name': :'partyName',
    'subscription_ids': :'subscriptionIds'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 169

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'invoice_id': :'String',
    'invoice_number': :'String',
    'internal_invoice_id': :'String',
    'is_credit_card_payable': :'BOOLEAN',
    'invoice_status': :'String',
    'invoice_type': :'String',
    'is_paid': :'BOOLEAN',
    'is_payable': :'BOOLEAN',
    'invoice_amount': :'Float',
    'invoice_amount_due': :'Float',
    'invoice_amount_credited': :'Float',
    'invoice_amount_adjusted': :'Float',
    'invoice_amount_applied': :'Float',
    'time_invoice_due': :'DateTime',
    'is_payment_failed': :'BOOLEAN',
    'invoice_amount_in_dispute': :'Float',
    'invoice_ref_number': :'String',
    'invoice_po_number': :'String',
    'time_invoice': :'DateTime',
    'currency': :'OCI::OspGateway::Models::Currency',
    'is_pdf_email_available': :'BOOLEAN',
    'is_display_view_pdf': :'BOOLEAN',
    'is_display_download_pdf': :'BOOLEAN',
    'last_payment_detail': :'OCI::OspGateway::Models::PaymentDetail',
    'party_name': :'String',
    'subscription_ids': :'Array<String>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 426

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    invoice_id == other.invoice_id &&
    invoice_number == other.invoice_number &&
    internal_invoice_id == other.internal_invoice_id &&
    is_credit_card_payable == other.is_credit_card_payable &&
    invoice_status == other.invoice_status &&
    invoice_type == other.invoice_type &&
    is_paid == other.is_paid &&
    is_payable == other.is_payable &&
    invoice_amount == other.invoice_amount &&
    invoice_amount_due == other.invoice_amount_due &&
    invoice_amount_credited == other.invoice_amount_credited &&
    invoice_amount_adjusted == other.invoice_amount_adjusted &&
    invoice_amount_applied == other.invoice_amount_applied &&
    time_invoice_due == other.time_invoice_due &&
    is_payment_failed == other.is_payment_failed &&
    invoice_amount_in_dispute == other.invoice_amount_in_dispute &&
    invoice_ref_number == other.invoice_ref_number &&
    invoice_po_number == other.invoice_po_number &&
    time_invoice == other.time_invoice &&
    currency == other.currency &&
    is_pdf_email_available == other.is_pdf_email_available &&
    is_display_view_pdf == other.is_display_view_pdf &&
    is_display_download_pdf == other.is_display_download_pdf &&
    last_payment_detail == other.last_payment_detail &&
    party_name == other.party_name &&
    subscription_ids == other.subscription_ids
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 481

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


461
462
463
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 461

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



470
471
472
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 470

def hash
  [invoice_id, invoice_number, internal_invoice_id, is_credit_card_payable, invoice_status, invoice_type, is_paid, is_payable, invoice_amount, invoice_amount_due, invoice_amount_credited, invoice_amount_adjusted, invoice_amount_applied, time_invoice_due, is_payment_failed, invoice_amount_in_dispute, invoice_ref_number, invoice_po_number, time_invoice, currency, is_pdf_email_available, is_display_view_pdf, is_display_download_pdf, last_payment_detail, party_name, subscription_ids].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



514
515
516
517
518
519
520
521
522
523
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 514

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



508
509
510
# File 'lib/oci/osp_gateway/models/invoice_summary.rb', line 508

def to_s
  to_hash.to_s
end