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):



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
326
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 209

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)


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

def booking_opty_number
  @booking_opty_number
end

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

List of Commitment services of a line



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

def commitment_services
  @commitment_services
end

#csiInteger

Subscribed service CSI number

Returns:

  • (Integer)


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

def csi
  @csi
end

#data_center_regionString

Subscribed service data center region

Returns:

  • (String)


79
80
81
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 79

def data_center_region
  @data_center_region
end

#funded_allocation_valueString

Funded Allocation line value example: 12000.00

Returns:

  • (String)


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

def funded_allocation_value
  @funded_allocation_value
end

#idString

[Required] SPM internal Subscribed Service ID

Returns:

  • (String)


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

def id
  @id
end

#is_intent_to_payBOOLEAN

Subscribed service intent to pay flag

Returns:

  • (BOOLEAN)


104
105
106
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 104

def is_intent_to_pay
  @is_intent_to_pay
end

#net_unit_priceString

Subscribed service net unit price

Returns:

  • (String)


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

def net_unit_price
  @net_unit_price
end

#operation_typeString

Subscribed service operation type

Returns:

  • (String)


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

def operation_type
  @operation_type
end

#order_numberInteger

Sales Order Number associated to the subscribed service

Returns:

  • (Integer)


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

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)


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

def partner_transaction_type
  @partner_transaction_type
end

#pricing_modelString

Subscribed service pricing model

Returns:

  • (String)


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

def pricing_model
  @pricing_model
end

#productOCI::OsubSubscription::Models::SubscriptionProduct



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

def product
  @product
end

#program_typeString

Subscribed service program type

Returns:

  • (String)


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

def program_type
  @program_type
end

#promo_typeString

Subscribed service promotion type

Returns:

  • (String)


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

def promo_type
  @promo_type
end

#quantityString

Subscribed service quantity

Returns:

  • (String)


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

def quantity
  @quantity
end

#statusString

Subscribed service status

Returns:

  • (String)


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

def status
  @status
end

#term_valueInteger

Term value in Months

Returns:

  • (Integer)


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

def term_value
  @term_value
end

#term_value_uomString

Term value UOM

Returns:

  • (String)


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

def term_value_uom
  @term_value_uom
end

#time_endDateTime

Subscribed service end date

Returns:

  • (DateTime)


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

def time_end
  @time_end
end

#time_startDateTime

Subscribed service start date

Returns:

  • (DateTime)


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

def time_start
  @time_start
end

#total_valueString

Subscribed service total value

Returns:

  • (String)


69
70
71
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 69

def total_value
  @total_value
end

Class Method Details

.attribute_mapObject

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



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
149
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 122

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.



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
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 152

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



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
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 335

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



386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 386

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


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

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



375
376
377
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 375

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



419
420
421
422
423
424
425
426
427
428
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 419

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



413
414
415
# File 'lib/oci/osub_subscription/models/subscribed_service_summary.rb', line 413

def to_s
  to_hash.to_s
end