Class: OCI::OsubBillingSchedule::Models::BillingScheduleSummary
- Inherits:
-
Object
- Object
- OCI::OsubBillingSchedule::Models::BillingScheduleSummary
- Defined in:
- lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb
Overview
Billing schedule details related to Subscription Id
Constant Summary collapse
- INVOICE_STATUS_ENUM =
[ INVOICE_STATUS_INVOICED = 'INVOICED'.freeze, INVOICE_STATUS_NOT_INVOICED = 'NOT_INVOICED'.freeze, INVOICE_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#amount ⇒ String
Billing schedule line net amount.
-
#ar_customer_transaction_id ⇒ String
Indicates the associated AR Customer transaction id a unique identifier existing on AR.
-
#ar_invoice_number ⇒ String
Indicates the associated AR Invoice Number.
-
#billing_frequency ⇒ String
Billing frequency.
-
#invoice_status ⇒ String
Billing schedule invoice status.
-
#net_unit_price ⇒ String
Billing schedule net unit price.
-
#order_number ⇒ String
Order number associated with the Subscribed Service.
- #product ⇒ OCI::OsubBillingSchedule::Models::Product
-
#quantity ⇒ String
Billing schedule quantity.
-
#time_end ⇒ DateTime
Billing schedule end date.
-
#time_invoicing ⇒ DateTime
Billing schedule invoicing date.
-
#time_start ⇒ DateTime
Billing schedule start date.
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 = {}) ⇒ BillingScheduleSummary
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 = {}) ⇒ BillingScheduleSummary
Initializes the object
134 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 167 168 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 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 134 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.time_start = attributes[:'timeStart'] if attributes[:'timeStart'] raise 'You cannot provide both :timeStart and :time_start' if attributes.key?(:'timeStart') && attributes.key?(:'time_start') self.time_start = attributes[:'time_start'] if attributes[:'time_start'] self.time_end = attributes[:'timeEnd'] if attributes[:'timeEnd'] raise 'You cannot provide both :timeEnd and :time_end' if attributes.key?(:'timeEnd') && attributes.key?(:'time_end') self.time_end = attributes[:'time_end'] if attributes[:'time_end'] self.time_invoicing = attributes[:'timeInvoicing'] if attributes[:'timeInvoicing'] raise 'You cannot provide both :timeInvoicing and :time_invoicing' if attributes.key?(:'timeInvoicing') && attributes.key?(:'time_invoicing') self.time_invoicing = attributes[:'time_invoicing'] if attributes[:'time_invoicing'] 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.quantity = attributes[:'quantity'] if attributes[:'quantity'] self.net_unit_price = attributes[:'netUnitPrice'] if attributes[:'netUnitPrice'] raise 'You cannot provide both :netUnitPrice and :net_unit_price' if attributes.key?(:'netUnitPrice') && attributes.key?(:'net_unit_price') self.net_unit_price = attributes[:'net_unit_price'] if attributes[:'net_unit_price'] self.amount = attributes[:'amount'] if attributes[:'amount'] self.billing_frequency = attributes[:'billingFrequency'] if attributes[:'billingFrequency'] raise 'You cannot provide both :billingFrequency and :billing_frequency' if attributes.key?(:'billingFrequency') && attributes.key?(:'billing_frequency') self.billing_frequency = attributes[:'billing_frequency'] if attributes[:'billing_frequency'] self.ar_invoice_number = attributes[:'arInvoiceNumber'] if attributes[:'arInvoiceNumber'] raise 'You cannot provide both :arInvoiceNumber and :ar_invoice_number' if attributes.key?(:'arInvoiceNumber') && attributes.key?(:'ar_invoice_number') self.ar_invoice_number = attributes[:'ar_invoice_number'] if attributes[:'ar_invoice_number'] self.ar_customer_transaction_id = attributes[:'arCustomerTransactionId'] if attributes[:'arCustomerTransactionId'] raise 'You cannot provide both :arCustomerTransactionId and :ar_customer_transaction_id' if attributes.key?(:'arCustomerTransactionId') && attributes.key?(:'ar_customer_transaction_id') self.ar_customer_transaction_id = attributes[:'ar_customer_transaction_id'] if attributes[:'ar_customer_transaction_id'] self.order_number = attributes[:'orderNumber'] if attributes[:'orderNumber'] raise 'You cannot provide both :orderNumber and :order_number' if attributes.key?(:'orderNumber') && attributes.key?(:'order_number') self.order_number = attributes[:'order_number'] if attributes[:'order_number'] self.product = attributes[:'product'] if attributes[:'product'] end |
Instance Attribute Details
#amount ⇒ String
Billing schedule line net amount
51 52 53 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 51 def amount @amount end |
#ar_customer_transaction_id ⇒ String
Indicates the associated AR Customer transaction id a unique identifier existing on AR.
66 67 68 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 66 def ar_customer_transaction_id @ar_customer_transaction_id end |
#ar_invoice_number ⇒ String
Indicates the associated AR Invoice Number
61 62 63 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 61 def ar_invoice_number @ar_invoice_number end |
#billing_frequency ⇒ String
Billing frequency
56 57 58 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 56 def billing_frequency @billing_frequency end |
#invoice_status ⇒ String
Billing schedule invoice status
36 37 38 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 36 def invoice_status @invoice_status end |
#net_unit_price ⇒ String
Billing schedule net unit price
46 47 48 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 46 def net_unit_price @net_unit_price end |
#order_number ⇒ String
Order number associated with the Subscribed Service
71 72 73 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 71 def order_number @order_number end |
#product ⇒ OCI::OsubBillingSchedule::Models::Product
74 75 76 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 74 def product @product end |
#quantity ⇒ String
Billing schedule quantity
41 42 43 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 41 def quantity @quantity end |
#time_end ⇒ DateTime
Billing schedule end date
26 27 28 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 26 def time_end @time_end end |
#time_invoicing ⇒ DateTime
Billing schedule invoicing date
31 32 33 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 31 def time_invoicing @time_invoicing end |
#time_start ⇒ DateTime
Billing schedule start date
21 22 23 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 21 def time_start @time_start end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 77 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'time_start': :'timeStart', 'time_end': :'timeEnd', 'time_invoicing': :'timeInvoicing', 'invoice_status': :'invoiceStatus', 'quantity': :'quantity', 'net_unit_price': :'netUnitPrice', 'amount': :'amount', 'billing_frequency': :'billingFrequency', 'ar_invoice_number': :'arInvoiceNumber', 'ar_customer_transaction_id': :'arCustomerTransactionId', 'order_number': :'orderNumber', 'product': :'product' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 97 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'time_start': :'DateTime', 'time_end': :'DateTime', 'time_invoicing': :'DateTime', 'invoice_status': :'String', 'quantity': :'String', 'net_unit_price': :'String', 'amount': :'String', 'billing_frequency': :'String', 'ar_invoice_number': :'String', 'ar_customer_transaction_id': :'String', 'order_number': :'String', 'product': :'OCI::OsubBillingSchedule::Models::Product' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 221 def ==(other) return true if equal?(other) self.class == other.class && time_start == other.time_start && time_end == other.time_end && time_invoicing == other.time_invoicing && invoice_status == other.invoice_status && quantity == other.quantity && net_unit_price == other.net_unit_price && amount == other.amount && billing_frequency == other.billing_frequency && ar_invoice_number == other.ar_invoice_number && ar_customer_transaction_id == other.ar_customer_transaction_id && order_number == other.order_number && product == other.product end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 262 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
242 243 244 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 242 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
251 252 253 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 251 def hash [time_start, time_end, time_invoicing, invoice_status, quantity, net_unit_price, amount, billing_frequency, ar_invoice_number, ar_customer_transaction_id, order_number, product].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
295 296 297 298 299 300 301 302 303 304 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 295 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
289 290 291 |
# File 'lib/oci/osub_billing_schedule/models/billing_schedule_summary.rb', line 289 def to_s to_hash.to_s end |