Class: Google::Apis::CloudcommerceprocurementV1::Entitlement

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudcommerceprocurement_v1/classes.rb,
lib/google/apis/cloudcommerceprocurement_v1/representations.rb,
lib/google/apis/cloudcommerceprocurement_v1/representations.rb

Overview

Represents a procured product of a customer. Next Id: 24

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Entitlement

Returns a new instance of Entitlement.



362
363
364
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 362

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#accountString

Output only. The resource name of the account that this entitlement is based on, if any. Corresponds to the JSON property account

Returns:

  • (String)


244
245
246
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 244

def 
  @account
end

#consumersArray<Google::Apis::CloudcommerceprocurementV1::Consumer>

Output only. The resources using this entitlement, if applicable. Corresponds to the JSON property consumers



249
250
251
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 249

def consumers
  @consumers
end

#create_timeString

Output only. The creation timestamp. Corresponds to the JSON property createTime

Returns:

  • (String)


254
255
256
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 254

def create_time
  @create_time
end

#input_propertiesHash<String,Object>

Output only. The custom properties that were collected from the user to create this entitlement. Corresponds to the JSON property inputProperties

Returns:

  • (Hash<String,Object>)


260
261
262
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 260

def input_properties
  @input_properties
end

#message_to_userString

Provider-supplied message that is displayed to the end user. Currently this is used to communicate progress and ETA for provisioning. This field can be updated only when a user is waiting for an action from the provider, i.e. entitlement state is EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED or EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL. This field is cleared automatically when the entitlement state changes. Corresponds to the JSON property messageToUser

Returns:

  • (String)


270
271
272
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 270

def message_to_user
  @message_to_user
end

#nameString

Output only. The resource name of the entitlement. Entitlement names have the form providers/provider_id/entitlements/entitlement_id`. Corresponds to the JSON propertyname`

Returns:

  • (String)


276
277
278
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 276

def name
  @name
end

#new_pending_offerString

Output only. The name of the offer the entitlement is switching to upon a pending plan change. Only exists if the pending plan change is moving to an offer. Format: 'projects/project/services/service/privateOffers/offer-id' OR 'projects/project/services/service/standardOffers/offer-id', depending on whether the offer is private or public. Corresponds to the JSON property newPendingOffer

Returns:

  • (String)


285
286
287
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 285

def new_pending_offer
  @new_pending_offer
end

#new_pending_planString

Output only. The identifier of the pending new plan. Required if the product has plans and the entitlement has a pending plan change. Corresponds to the JSON property newPendingPlan

Returns:

  • (String)


291
292
293
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 291

def new_pending_plan
  @new_pending_plan
end

#offerString

Output only. The name of the offer that was procured. Field is empty if order was not made using an offer. Format: 'projects/project/services/service/ privateOffers/offer-id' OR 'projects/project/services/service/ standardOffers/offer-id', depending on whether the offer is private or public. Corresponds to the JSON property offer

Returns:

  • (String)


300
301
302
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 300

def offer
  @offer
end

#offer_end_timeString

Output only. End time for the Offer association corresponding to this entitlement. The field is only populated if the entitlement is currently associated with an Offer. Corresponds to the JSON property offerEndTime

Returns:

  • (String)


307
308
309
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 307

def offer_end_time
  @offer_end_time
end

#planString

Output only. The identifier of the plan that was procured. Required if the product has plans. Corresponds to the JSON property plan

Returns:

  • (String)


313
314
315
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 313

def plan
  @plan
end

#productString

Output only. The identifier of the entity that was purchased. This may actually represent a product, quote, or offer. Corresponds to the JSON property product

Returns:

  • (String)


319
320
321
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 319

def product
  @product
end

#product_external_nameString

Output only. The identifier of the product that was procured. Corresponds to the JSON property productExternalName

Returns:

  • (String)


324
325
326
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 324

def product_external_name
  @product_external_name
end

#providerString

Output only. The identifier of the service provider that this entitlement was created against. Each service provider is assigned a unique provider value when they onboard with Cloud Commerce platform. Corresponds to the JSON property provider

Returns:

  • (String)


331
332
333
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 331

def provider
  @provider
end

#quote_external_nameString

Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote. Corresponds to the JSON property quoteExternalName

Returns:

  • (String)


337
338
339
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 337

def quote_external_name
  @quote_external_name
end

#stateString

Output only. The state of the entitlement. Corresponds to the JSON property state

Returns:

  • (String)


342
343
344
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 342

def state
  @state
end

#subscription_end_timeString

Output only. End time for the subscription corresponding to this entitlement. Corresponds to the JSON property subscriptionEndTime

Returns:

  • (String)


347
348
349
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 347

def subscription_end_time
  @subscription_end_time
end

#update_timeString

Output only. The last update timestamp. Corresponds to the JSON property updateTime

Returns:

  • (String)


352
353
354
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 352

def update_time
  @update_time
end

#usage_reporting_idString

Output only. The consumerId to use when reporting usage through the Service Control API. See the consumerId field at Reporting Metrics for more details. This field is present only if the product has usage-based billing configured. Corresponds to the JSON property usageReportingId

Returns:

  • (String)


360
361
362
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 360

def usage_reporting_id
  @usage_reporting_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'lib/google/apis/cloudcommerceprocurement_v1/classes.rb', line 367

def update!(**args)
  @account = args[:account] if args.key?(:account)
  @consumers = args[:consumers] if args.key?(:consumers)
  @create_time = args[:create_time] if args.key?(:create_time)
  @input_properties = args[:input_properties] if args.key?(:input_properties)
  @message_to_user = args[:message_to_user] if args.key?(:message_to_user)
  @name = args[:name] if args.key?(:name)
  @new_pending_offer = args[:new_pending_offer] if args.key?(:new_pending_offer)
  @new_pending_plan = args[:new_pending_plan] if args.key?(:new_pending_plan)
  @offer = args[:offer] if args.key?(:offer)
  @offer_end_time = args[:offer_end_time] if args.key?(:offer_end_time)
  @plan = args[:plan] if args.key?(:plan)
  @product = args[:product] if args.key?(:product)
  @product_external_name = args[:product_external_name] if args.key?(:product_external_name)
  @provider = args[:provider] if args.key?(:provider)
  @quote_external_name = args[:quote_external_name] if args.key?(:quote_external_name)
  @state = args[:state] if args.key?(:state)
  @subscription_end_time = args[:subscription_end_time] if args.key?(:subscription_end_time)
  @update_time = args[:update_time] if args.key?(:update_time)
  @usage_reporting_id = args[:usage_reporting_id] if args.key?(:usage_reporting_id)
end