Class: OCI::OsubSubscription::Models::SubscribedServiceSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/osub_subscription/models/subscribed_service_summary.rb

Overview

Subscribed Service summary

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SubscribedServiceSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :product (OCI::OsubSubscription::Models::SubscriptionProduct)

    The value to assign to the #product property

  • :quantity (String)

    The value to assign to the #quantity property

  • :status (String)

    The value to assign to the #status property

  • :operation_type (String)

    The value to assign to the #operation_type property

  • :net_unit_price (String)

    The value to assign to the #net_unit_price property

  • :funded_allocation_value (String)

    The value to assign to the #funded_allocation_value property

  • :partner_transaction_type (String)

    The value to assign to the #partner_transaction_type property

  • :term_value (Integer)

    The value to assign to the #term_value property

  • :term_value_uom (String)

    The value to assign to the #term_value_uom property

  • :booking_opty_number (String)

    The value to assign to the #booking_opty_number property

  • :total_value (String)

    The value to assign to the #total_value property

  • :order_number (Integer)

    The value to assign to the #order_number property

  • :data_center_region (String)

    The value to assign to the #data_center_region property

  • :pricing_model (String)

    The value to assign to the #pricing_model property

  • :program_type (String)

    The value to assign to the #program_type property

  • :promo_type (String)

    The value to assign to the #promo_type property

  • :csi (Integer)

    The value to assign to the #csi property

  • :is_intent_to_pay (BOOLEAN)

    The value to assign to the #is_intent_to_pay property

  • :time_start (DateTime)

    The value to assign to the #time_start property

  • :time_end (DateTime)

    The value to assign to the #time_end property

  • :commitment_services (Array<OCI::OsubSubscription::Models::Commitment>)

    The value to assign to the #commitment_services property



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_numberString

Booking Opportunity Number of Subscribed Service

Returns:

  • (String)


63
64
65
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 63

def booking_opty_number
  @booking_opty_number
end

#commitment_servicesArray<OCI::OsubSubscription::Models::Commitment>

List of Commitment services of a line

Returns:

  • (Array<OCI::OsubSubscription::Models::Commitment>)


118
119
120
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 118

def commitment_services
  @commitment_services
end

#csiInteger

Subscribed service CSI number

Returns:

  • (Integer)


98
99
100
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 98

def csi
  @csi
end

#data_center_regionString

Subscribed service data center region

Returns:

  • (String)


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_valueString

Funded Allocation line value example: 12000.00

Returns:

  • (String)


43
44
45
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 43

def funded_allocation_value
  @funded_allocation_value
end

#idString

[Required] SPM internal Subscribed Service ID

Returns:

  • (String)


14
15
16
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 14

def id
  @id
end

#is_intent_to_payBOOLEAN

Subscribed service intent to pay flag

Returns:

  • (BOOLEAN)


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_priceString

Subscribed service net unit price

Returns:

  • (String)


37
38
39
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 37

def net_unit_price
  @net_unit_price
end

#operation_typeString

Subscribed service operation type

Returns:

  • (String)


32
33
34
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 32

def operation_type
  @operation_type
end

#order_numberInteger

Sales Order Number associated to the subscribed service

Returns:

  • (Integer)


73
74
75
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 73

def order_number
  @order_number
end

#partner_transaction_typeString

This field contains the name of the partner to which the subscription belongs - depending on which the invoicing may differ

Returns:

  • (String)


48
49
50
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 48

def partner_transaction_type
  @partner_transaction_type
end

#pricing_modelString

Subscribed service pricing model

Returns:

  • (String)


83
84
85
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 83

def pricing_model
  @pricing_model
end

#productOCI::OsubSubscription::Models::SubscriptionProduct



17
18
19
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 17

def product
  @product
end

#program_typeString

Subscribed service program type

Returns:

  • (String)


88
89
90
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 88

def program_type
  @program_type
end

#promo_typeString

Subscribed service promotion type

Returns:

  • (String)


93
94
95
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 93

def promo_type
  @promo_type
end

#quantityString

Subscribed service quantity

Returns:

  • (String)


22
23
24
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 22

def quantity
  @quantity
end

#statusString

Subscribed service status

Returns:

  • (String)


27
28
29
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 27

def status
  @status
end

#term_valueInteger

Term value in Months

Returns:

  • (Integer)


53
54
55
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 53

def term_value
  @term_value
end

#term_value_uomString

Term value UOM

Returns:

  • (String)


58
59
60
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 58

def term_value_uom
  @term_value_uom
end

#time_endDateTime

Subscribed service end date

Returns:

  • (DateTime)


113
114
115
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 113

def time_end
  @time_end
end

#time_startDateTime

Subscribed service start date

Returns:

  • (DateTime)


108
109
110
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 108

def time_start
  @time_start
end

#total_valueString

Subscribed service total value

Returns:

  • (String)


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_mapObject

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_typesObject

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.

Parameters:

  • other (Object)

    the other object to be compared



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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


365
366
367
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 365

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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_hashHash

Returns the object in the form of hash

Returns:

  • (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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation 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