Class: OCI::OsubSubscription::Models::SubscribedServiceSummary
- Inherits:
-
Object
- Object
- OCI::OsubSubscription::Models::SubscribedServiceSummary
- Defined in:
- lib/oci/osub_subscription/models/subscribed_service_summary.rb
Overview
Subscribed Service summary
Instance Attribute Summary collapse
-
#booking_opty_number ⇒ String
Booking Opportunity Number of Subscribed Service.
-
#commitment_services ⇒ Array<OCI::OsubSubscription::Models::Commitment>
List of Commitment services of a line.
-
#csi ⇒ Integer
Subscribed service CSI number.
-
#data_center_region ⇒ String
Subscribed service data center region.
-
#funded_allocation_value ⇒ String
Funded Allocation line value example: 12000.00.
-
#id ⇒ String
[Required] SPM internal Subscribed Service ID.
-
#is_intent_to_pay ⇒ BOOLEAN
Subscribed service intent to pay flag.
-
#net_unit_price ⇒ String
Subscribed service net unit price.
-
#operation_type ⇒ String
Subscribed service operation type.
-
#order_number ⇒ Integer
Sales Order Number associated to the subscribed service.
-
#partner_transaction_type ⇒ String
This field contains the name of the partner to which the subscription belongs - depending on which the invoicing may differ.
-
#pricing_model ⇒ String
Subscribed service pricing model.
- #product ⇒ OCI::OsubSubscription::Models::SubscriptionProduct
-
#program_type ⇒ String
Subscribed service program type.
-
#promo_type ⇒ String
Subscribed service promotion type.
-
#quantity ⇒ String
Subscribed service quantity.
-
#status ⇒ String
Subscribed service status.
-
#term_value ⇒ Integer
Term value in Months.
-
#term_value_uom ⇒ String
Term value UOM.
-
#time_end ⇒ DateTime
Subscribed service end date.
-
#time_start ⇒ DateTime
Subscribed service start date.
-
#total_value ⇒ String
Subscribed service total value.
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 = {}) ⇒ SubscribedServiceSummary
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 = {}) ⇒ SubscribedServiceSummary
Initializes the object
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 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 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 208 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.id = attributes[:'id'] if attributes[:'id'] self.product = attributes[:'product'] if attributes[:'product'] self.quantity = attributes[:'quantity'] if attributes[:'quantity'] self.status = attributes[:'status'] if attributes[:'status'] self.operation_type = attributes[:'operationType'] if attributes[:'operationType'] raise 'You cannot provide both :operationType and :operation_type' if attributes.key?(:'operationType') && attributes.key?(:'operation_type') self.operation_type = attributes[:'operation_type'] if attributes[:'operation_type'] 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.funded_allocation_value = attributes[:'fundedAllocationValue'] if attributes[:'fundedAllocationValue'] raise 'You cannot provide both :fundedAllocationValue and :funded_allocation_value' if attributes.key?(:'fundedAllocationValue') && attributes.key?(:'funded_allocation_value') self.funded_allocation_value = attributes[:'funded_allocation_value'] if attributes[:'funded_allocation_value'] self.partner_transaction_type = attributes[:'partnerTransactionType'] if attributes[:'partnerTransactionType'] raise 'You cannot provide both :partnerTransactionType and :partner_transaction_type' if attributes.key?(:'partnerTransactionType') && attributes.key?(:'partner_transaction_type') self.partner_transaction_type = attributes[:'partner_transaction_type'] if attributes[:'partner_transaction_type'] self.term_value = attributes[:'termValue'] if attributes[:'termValue'] raise 'You cannot provide both :termValue and :term_value' if attributes.key?(:'termValue') && attributes.key?(:'term_value') self.term_value = attributes[:'term_value'] if attributes[:'term_value'] self.term_value_uom = attributes[:'termValueUOM'] if attributes[:'termValueUOM'] raise 'You cannot provide both :termValueUOM and :term_value_uom' if attributes.key?(:'termValueUOM') && attributes.key?(:'term_value_uom') self.term_value_uom = attributes[:'term_value_uom'] if attributes[:'term_value_uom'] self.booking_opty_number = attributes[:'bookingOptyNumber'] if attributes[:'bookingOptyNumber'] raise 'You cannot provide both :bookingOptyNumber and :booking_opty_number' if attributes.key?(:'bookingOptyNumber') && attributes.key?(:'booking_opty_number') self.booking_opty_number = attributes[:'booking_opty_number'] if attributes[:'booking_opty_number'] self.total_value = attributes[:'totalValue'] if attributes[:'totalValue'] raise 'You cannot provide both :totalValue and :total_value' if attributes.key?(:'totalValue') && attributes.key?(:'total_value') self.total_value = attributes[:'total_value'] if attributes[:'total_value'] 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.data_center_region = attributes[:'dataCenterRegion'] if attributes[:'dataCenterRegion'] raise 'You cannot provide both :dataCenterRegion and :data_center_region' if attributes.key?(:'dataCenterRegion') && attributes.key?(:'data_center_region') self.data_center_region = attributes[:'data_center_region'] if attributes[:'data_center_region'] self.pricing_model = attributes[:'pricingModel'] if attributes[:'pricingModel'] raise 'You cannot provide both :pricingModel and :pricing_model' if attributes.key?(:'pricingModel') && attributes.key?(:'pricing_model') self.pricing_model = attributes[:'pricing_model'] if attributes[:'pricing_model'] self.program_type = attributes[:'programType'] if attributes[:'programType'] raise 'You cannot provide both :programType and :program_type' if attributes.key?(:'programType') && attributes.key?(:'program_type') self.program_type = attributes[:'program_type'] if attributes[:'program_type'] self.promo_type = attributes[:'promoType'] if attributes[:'promoType'] raise 'You cannot provide both :promoType and :promo_type' if attributes.key?(:'promoType') && attributes.key?(:'promo_type') self.promo_type = attributes[:'promo_type'] if attributes[:'promo_type'] self.csi = attributes[:'csi'] if attributes[:'csi'] self.is_intent_to_pay = attributes[:'isIntentToPay'] unless attributes[:'isIntentToPay'].nil? raise 'You cannot provide both :isIntentToPay and :is_intent_to_pay' if attributes.key?(:'isIntentToPay') && attributes.key?(:'is_intent_to_pay') self.is_intent_to_pay = attributes[:'is_intent_to_pay'] unless attributes[:'is_intent_to_pay'].nil? 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.commitment_services = attributes[:'commitmentServices'] if attributes[:'commitmentServices'] raise 'You cannot provide both :commitmentServices and :commitment_services' if attributes.key?(:'commitmentServices') && attributes.key?(:'commitment_services') self.commitment_services = attributes[:'commitment_services'] if attributes[:'commitment_services'] end |
Instance Attribute Details
#booking_opty_number ⇒ String
Booking Opportunity Number of Subscribed Service
63 64 65 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 63 def booking_opty_number @booking_opty_number end |
#commitment_services ⇒ Array<OCI::OsubSubscription::Models::Commitment>
List of Commitment services of a line
118 119 120 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 118 def commitment_services @commitment_services end |
#csi ⇒ Integer
Subscribed service CSI number
98 99 100 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 98 def csi @csi end |
#data_center_region ⇒ String
Subscribed service data center region
78 79 80 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 78 def data_center_region @data_center_region end |
#funded_allocation_value ⇒ String
Funded Allocation line value example: 12000.00
43 44 45 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 43 def funded_allocation_value @funded_allocation_value end |
#id ⇒ String
[Required] SPM internal Subscribed Service ID
14 15 16 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 14 def id @id end |
#is_intent_to_pay ⇒ BOOLEAN
Subscribed service intent to pay flag
103 104 105 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 103 def is_intent_to_pay @is_intent_to_pay end |
#net_unit_price ⇒ String
Subscribed service net unit price
37 38 39 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 37 def net_unit_price @net_unit_price end |
#operation_type ⇒ String
Subscribed service operation type
32 33 34 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 32 def operation_type @operation_type end |
#order_number ⇒ Integer
Sales Order Number associated to the subscribed service
73 74 75 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 73 def order_number @order_number end |
#partner_transaction_type ⇒ String
This field contains the name of the partner to which the subscription belongs - depending on which the invoicing may differ
48 49 50 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 48 def partner_transaction_type @partner_transaction_type end |
#pricing_model ⇒ String
Subscribed service pricing model
83 84 85 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 83 def pricing_model @pricing_model end |
#product ⇒ OCI::OsubSubscription::Models::SubscriptionProduct
17 18 19 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 17 def product @product end |
#program_type ⇒ String
Subscribed service program type
88 89 90 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 88 def program_type @program_type end |
#promo_type ⇒ String
Subscribed service promotion type
93 94 95 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 93 def promo_type @promo_type end |
#quantity ⇒ String
Subscribed service quantity
22 23 24 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 22 def quantity @quantity end |
#status ⇒ String
Subscribed service status
27 28 29 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 27 def status @status end |
#term_value ⇒ Integer
Term value in Months
53 54 55 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 53 def term_value @term_value end |
#term_value_uom ⇒ String
Term value UOM
58 59 60 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 58 def term_value_uom @term_value_uom end |
#time_end ⇒ DateTime
Subscribed service end date
113 114 115 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 113 def time_end @time_end end |
#time_start ⇒ DateTime
Subscribed service start date
108 109 110 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 108 def time_start @time_start end |
#total_value ⇒ String
Subscribed service total value
68 69 70 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 68 def total_value @total_value end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 121 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'product': :'product', 'quantity': :'quantity', 'status': :'status', 'operation_type': :'operationType', 'net_unit_price': :'netUnitPrice', 'funded_allocation_value': :'fundedAllocationValue', 'partner_transaction_type': :'partnerTransactionType', 'term_value': :'termValue', 'term_value_uom': :'termValueUOM', 'booking_opty_number': :'bookingOptyNumber', 'total_value': :'totalValue', 'order_number': :'orderNumber', 'data_center_region': :'dataCenterRegion', 'pricing_model': :'pricingModel', 'program_type': :'programType', 'promo_type': :'promoType', 'csi': :'csi', 'is_intent_to_pay': :'isIntentToPay', 'time_start': :'timeStart', 'time_end': :'timeEnd', 'commitment_services': :'commitmentServices' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 151 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'product': :'OCI::OsubSubscription::Models::SubscriptionProduct', 'quantity': :'String', 'status': :'String', 'operation_type': :'String', 'net_unit_price': :'String', 'funded_allocation_value': :'String', 'partner_transaction_type': :'String', 'term_value': :'Integer', 'term_value_uom': :'String', 'booking_opty_number': :'String', 'total_value': :'String', 'order_number': :'Integer', 'data_center_region': :'String', 'pricing_model': :'String', 'program_type': :'String', 'promo_type': :'String', 'csi': :'Integer', 'is_intent_to_pay': :'BOOLEAN', 'time_start': :'DateTime', 'time_end': :'DateTime', 'commitment_services': :'Array<OCI::OsubSubscription::Models::Commitment>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 334 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && product == other.product && quantity == other.quantity && status == other.status && operation_type == other.operation_type && net_unit_price == other.net_unit_price && funded_allocation_value == other.funded_allocation_value && partner_transaction_type == other.partner_transaction_type && term_value == other.term_value && term_value_uom == other.term_value_uom && booking_opty_number == other.booking_opty_number && total_value == other.total_value && order_number == other.order_number && data_center_region == other.data_center_region && pricing_model == other.pricing_model && program_type == other.program_type && promo_type == other.promo_type && csi == other.csi && is_intent_to_pay == other.is_intent_to_pay && time_start == other.time_start && time_end == other.time_end && commitment_services == other.commitment_services end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 385 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
365 366 367 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 365 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
374 375 376 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 374 def hash [id, product, quantity, status, operation_type, net_unit_price, funded_allocation_value, partner_transaction_type, term_value, term_value_uom, booking_opty_number, total_value, order_number, data_center_region, pricing_model, program_type, promo_type, csi, is_intent_to_pay, time_start, time_end, commitment_services].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
418 419 420 421 422 423 424 425 426 427 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 418 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
412 413 414 |
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 412 def to_s to_hash.to_s end |