Class: OCI::Onesubscription::Models::InvoiceSummary
- Inherits:
-
Object
- Object
- OCI::Onesubscription::Models::InvoiceSummary
- Defined in:
- lib/oci/onesubscription/models/invoice_summary.rb
Overview
Invoice details
Instance Attribute Summary collapse
-
#ar_invoices ⇒ String
AR Invoice Numbers comma separated under one invoice.
-
#bill_to_address ⇒ OCI::Onesubscription::Models::InvoicingAddress
This attribute is required.
-
#bill_to_contact ⇒ OCI::Onesubscription::Models::InvoicingUser
This attribute is required.
-
#bill_to_customer ⇒ OCI::Onesubscription::Models::InvoicingBusinessPartner
This attribute is required.
-
#created_by ⇒ String
User that executed SPM Invoice process.
-
#currency ⇒ OCI::Onesubscription::Models::InvoicingCurrency
This attribute is required.
-
#invoice_lines ⇒ Array<OCI::Onesubscription::Models::InvoiceLineSummary>
Invoice Lines under particular invoice.
-
#organization ⇒ OCI::Onesubscription::Models::InvoicingOrganization
This attribute is required.
-
#payment_method ⇒ String
**[Required]** Payment Method.
-
#payment_term ⇒ OCI::Onesubscription::Models::InvoicingPaymentTerm
This attribute is required.
-
#receipt_method ⇒ String
Receipt Method of Payment Mode.
-
#spm_invoice_number ⇒ String
**[Required]** SPM Document Number is an functional identifier for invoice in SPM.
-
#status ⇒ String
**[Required]** Document Status in SPM which depicts current state of invoice.
-
#subscription_number ⇒ String
**[Required]** Invoice associated subscription plan number.
-
#time_created ⇒ DateTime
SPM Invocie creation date.
-
#time_invoice_date ⇒ DateTime
**[Required]** Invoice Date.
-
#time_updated ⇒ DateTime
SPM Invoice updated date.
-
#type ⇒ String
**[Required]** Document Type in SPM like SPM Invoice,SPM Credit Memo etc.,.
-
#updated_by ⇒ String
User that updated SPM Invoice.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ InvoiceSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ InvoiceSummary
Initializes the object
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 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 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 180 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.spm_invoice_number = attributes[:'spmInvoiceNumber'] if attributes[:'spmInvoiceNumber'] raise 'You cannot provide both :spmInvoiceNumber and :spm_invoice_number' if attributes.key?(:'spmInvoiceNumber') && attributes.key?(:'spm_invoice_number') self.spm_invoice_number = attributes[:'spm_invoice_number'] if attributes[:'spm_invoice_number'] self.ar_invoices = attributes[:'arInvoices'] if attributes[:'arInvoices'] raise 'You cannot provide both :arInvoices and :ar_invoices' if attributes.key?(:'arInvoices') && attributes.key?(:'ar_invoices') self.ar_invoices = attributes[:'ar_invoices'] if attributes[:'ar_invoices'] self.bill_to_customer = attributes[:'billToCustomer'] if attributes[:'billToCustomer'] raise 'You cannot provide both :billToCustomer and :bill_to_customer' if attributes.key?(:'billToCustomer') && attributes.key?(:'bill_to_customer') self.bill_to_customer = attributes[:'bill_to_customer'] if attributes[:'bill_to_customer'] self.bill_to_contact = attributes[:'billToContact'] if attributes[:'billToContact'] raise 'You cannot provide both :billToContact and :bill_to_contact' if attributes.key?(:'billToContact') && attributes.key?(:'bill_to_contact') self.bill_to_contact = attributes[:'bill_to_contact'] if attributes[:'bill_to_contact'] self.bill_to_address = attributes[:'billToAddress'] if attributes[:'billToAddress'] raise 'You cannot provide both :billToAddress and :bill_to_address' if attributes.key?(:'billToAddress') && attributes.key?(:'bill_to_address') self.bill_to_address = attributes[:'bill_to_address'] if attributes[:'bill_to_address'] self.payment_method = attributes[:'paymentMethod'] if attributes[:'paymentMethod'] raise 'You cannot provide both :paymentMethod and :payment_method' if attributes.key?(:'paymentMethod') && attributes.key?(:'payment_method') self.payment_method = attributes[:'payment_method'] if attributes[:'payment_method'] self.payment_term = attributes[:'paymentTerm'] if attributes[:'paymentTerm'] raise 'You cannot provide both :paymentTerm and :payment_term' if attributes.key?(:'paymentTerm') && attributes.key?(:'payment_term') self.payment_term = attributes[:'payment_term'] if attributes[:'payment_term'] self.receipt_method = attributes[:'receiptMethod'] if attributes[:'receiptMethod'] raise 'You cannot provide both :receiptMethod and :receipt_method' if attributes.key?(:'receiptMethod') && attributes.key?(:'receipt_method') self.receipt_method = attributes[:'receipt_method'] if attributes[:'receipt_method'] self.currency = attributes[:'currency'] if attributes[:'currency'] self.organization = attributes[:'organization'] if attributes[:'organization'] self.type = attributes[:'type'] if attributes[:'type'] self.status = attributes[:'status'] if attributes[:'status'] self.subscription_number = attributes[:'subscriptionNumber'] if attributes[:'subscriptionNumber'] raise 'You cannot provide both :subscriptionNumber and :subscription_number' if attributes.key?(:'subscriptionNumber') && attributes.key?(:'subscription_number') self.subscription_number = attributes[:'subscription_number'] if attributes[:'subscription_number'] self.time_invoice_date = attributes[:'timeInvoiceDate'] if attributes[:'timeInvoiceDate'] raise 'You cannot provide both :timeInvoiceDate and :time_invoice_date' if attributes.key?(:'timeInvoiceDate') && attributes.key?(:'time_invoice_date') self.time_invoice_date = attributes[:'time_invoice_date'] if attributes[:'time_invoice_date'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.created_by = attributes[:'createdBy'] if attributes[:'createdBy'] raise 'You cannot provide both :createdBy and :created_by' if attributes.key?(:'createdBy') && attributes.key?(:'created_by') self.created_by = attributes[:'created_by'] if attributes[:'created_by'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.updated_by = attributes[:'updatedBy'] if attributes[:'updatedBy'] raise 'You cannot provide both :updatedBy and :updated_by' if attributes.key?(:'updatedBy') && attributes.key?(:'updated_by') self.updated_by = attributes[:'updated_by'] if attributes[:'updated_by'] self.invoice_lines = attributes[:'invoiceLines'] if attributes[:'invoiceLines'] raise 'You cannot provide both :invoiceLines and :invoice_lines' if attributes.key?(:'invoiceLines') && attributes.key?(:'invoice_lines') self.invoice_lines = attributes[:'invoice_lines'] if attributes[:'invoice_lines'] end |
Instance Attribute Details
#ar_invoices ⇒ String
AR Invoice Numbers comma separated under one invoice
20 21 22 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 20 def ar_invoices @ar_invoices end |
#bill_to_address ⇒ OCI::Onesubscription::Models::InvoicingAddress
This attribute is required.
32 33 34 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 32 def bill_to_address @bill_to_address end |
#bill_to_contact ⇒ OCI::Onesubscription::Models::InvoicingUser
This attribute is required.
28 29 30 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 28 def bill_to_contact @bill_to_contact end |
#bill_to_customer ⇒ OCI::Onesubscription::Models::InvoicingBusinessPartner
This attribute is required.
24 25 26 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 24 def bill_to_customer @bill_to_customer end |
#created_by ⇒ String
User that executed SPM Invoice process
84 85 86 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 84 def created_by @created_by end |
#currency ⇒ OCI::Onesubscription::Models::InvoicingCurrency
This attribute is required.
50 51 52 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 50 def currency @currency end |
#invoice_lines ⇒ Array<OCI::Onesubscription::Models::InvoiceLineSummary>
Invoice Lines under particular invoice.
99 100 101 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 99 def invoice_lines @invoice_lines end |
#organization ⇒ OCI::Onesubscription::Models::InvoicingOrganization
This attribute is required.
54 55 56 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 54 def organization @organization end |
#payment_method ⇒ String
**[Required]** Payment Method
37 38 39 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 37 def payment_method @payment_method end |
#payment_term ⇒ OCI::Onesubscription::Models::InvoicingPaymentTerm
This attribute is required.
41 42 43 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 41 def payment_term @payment_term end |
#receipt_method ⇒ String
Receipt Method of Payment Mode
46 47 48 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 46 def receipt_method @receipt_method end |
#spm_invoice_number ⇒ String
**[Required]** SPM Document Number is an functional identifier for invoice in SPM
15 16 17 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 15 def spm_invoice_number @spm_invoice_number end |
#status ⇒ String
**[Required]** Document Status in SPM which depicts current state of invoice
64 65 66 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 64 def status @status end |
#subscription_number ⇒ String
**[Required]** Invoice associated subscription plan number.
69 70 71 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 69 def subscription_number @subscription_number end |
#time_created ⇒ DateTime
SPM Invocie creation date
79 80 81 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 79 def time_created @time_created end |
#time_invoice_date ⇒ DateTime
**[Required]** Invoice Date
74 75 76 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 74 def time_invoice_date @time_invoice_date end |
#time_updated ⇒ DateTime
SPM Invoice updated date
89 90 91 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 89 def time_updated @time_updated end |
#type ⇒ String
**[Required]** Document Type in SPM like SPM Invoice,SPM Credit Memo etc.,
59 60 61 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 59 def type @type end |
#updated_by ⇒ String
User that updated SPM Invoice
94 95 96 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 94 def updated_by @updated_by end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 102 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'spm_invoice_number': :'spmInvoiceNumber', 'ar_invoices': :'arInvoices', 'bill_to_customer': :'billToCustomer', 'bill_to_contact': :'billToContact', 'bill_to_address': :'billToAddress', 'payment_method': :'paymentMethod', 'payment_term': :'paymentTerm', 'receipt_method': :'receiptMethod', 'currency': :'currency', 'organization': :'organization', 'type': :'type', 'status': :'status', 'subscription_number': :'subscriptionNumber', 'time_invoice_date': :'timeInvoiceDate', 'time_created': :'timeCreated', 'created_by': :'createdBy', 'time_updated': :'timeUpdated', 'updated_by': :'updatedBy', 'invoice_lines': :'invoiceLines' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 129 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'spm_invoice_number': :'String', 'ar_invoices': :'String', 'bill_to_customer': :'OCI::Onesubscription::Models::InvoicingBusinessPartner', 'bill_to_contact': :'OCI::Onesubscription::Models::InvoicingUser', 'bill_to_address': :'OCI::Onesubscription::Models::InvoicingAddress', 'payment_method': :'String', 'payment_term': :'OCI::Onesubscription::Models::InvoicingPaymentTerm', 'receipt_method': :'String', 'currency': :'OCI::Onesubscription::Models::InvoicingCurrency', 'organization': :'OCI::Onesubscription::Models::InvoicingOrganization', 'type': :'String', 'status': :'String', 'subscription_number': :'String', 'time_invoice_date': :'DateTime', 'time_created': :'DateTime', 'created_by': :'String', 'time_updated': :'DateTime', 'updated_by': :'String', 'invoice_lines': :'Array<OCI::Onesubscription::Models::InvoiceLineSummary>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 292 def ==(other) return true if equal?(other) self.class == other.class && spm_invoice_number == other.spm_invoice_number && ar_invoices == other.ar_invoices && bill_to_customer == other.bill_to_customer && bill_to_contact == other.bill_to_contact && bill_to_address == other.bill_to_address && payment_method == other.payment_method && payment_term == other.payment_term && receipt_method == other.receipt_method && currency == other.currency && organization == other.organization && type == other.type && status == other.status && subscription_number == other.subscription_number && time_invoice_date == other.time_invoice_date && time_created == other.time_created && created_by == other.created_by && time_updated == other.time_updated && updated_by == other.updated_by && invoice_lines == other.invoice_lines end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 340 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
320 321 322 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 320 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
329 330 331 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 329 def hash [spm_invoice_number, ar_invoices, bill_to_customer, bill_to_contact, bill_to_address, payment_method, payment_term, receipt_method, currency, organization, type, status, subscription_number, time_invoice_date, time_created, created_by, time_updated, updated_by, invoice_lines].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
373 374 375 376 377 378 379 380 381 382 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 373 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_s ⇒ String
Returns the string representation of the object
367 368 369 |
# File 'lib/oci/onesubscription/models/invoice_summary.rb', line 367 def to_s to_hash.to_s end |