Class: Google::Apis::ResellerV1::Subscription

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/reseller_v1/classes.rb,
generated/google/apis/reseller_v1/representations.rb,
generated/google/apis/reseller_v1/representations.rb

Overview

JSON template for a subscription.

Defined Under Namespace

Classes: Plan, TransferInfo, TrialSettings

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Subscription

Returns a new instance of Subscription.



492
493
494
# File 'generated/google/apis/reseller_v1/classes.rb', line 492

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

Instance Attribute Details

#billing_methodString

Read-only field that returns the current billing method for a subscription. Corresponds to the JSON property billingMethod

Returns:

  • (String)


369
370
371
# File 'generated/google/apis/reseller_v1/classes.rb', line 369

def billing_method
  @billing_method
end

#creation_timeFixnum

The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter. Corresponds to the JSON property creationTime

Returns:

  • (Fixnum)


375
376
377
# File 'generated/google/apis/reseller_v1/classes.rb', line 375

def creation_time
  @creation_time
end

#customer_domainString

Primary domain name of the customer Corresponds to the JSON property customerDomain

Returns:

  • (String)


380
381
382
# File 'generated/google/apis/reseller_v1/classes.rb', line 380

def customer_domain
  @customer_domain
end

#customer_idString

This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google. Corresponds to the JSON property customerId

Returns:

  • (String)


387
388
389
# File 'generated/google/apis/reseller_v1/classes.rb', line 387

def customer_id
  @customer_id
end

#deal_codeString

Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty. Corresponds to the JSON property dealCode

Returns:

  • (String)


394
395
396
# File 'generated/google/apis/reseller_v1/classes.rb', line 394

def deal_code
  @deal_code
end

#kindString

Identifies the resource as a Subscription. Value: reseller#subscription Corresponds to the JSON property kind

Returns:

  • (String)


399
400
401
# File 'generated/google/apis/reseller_v1/classes.rb', line 399

def kind
  @kind
end

#planGoogle::Apis::ResellerV1::Subscription::Plan

The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API"s payment plans, see the API concepts. Corresponds to the JSON property plan



406
407
408
# File 'generated/google/apis/reseller_v1/classes.rb', line 406

def plan
  @plan
end

#purchase_order_idString

This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters. Corresponds to the JSON property purchaseOrderId

Returns:

  • (String)


414
415
416
# File 'generated/google/apis/reseller_v1/classes.rb', line 414

def purchase_order_id
  @purchase_order_id
end

#renewal_settingsGoogle::Apis::ResellerV1::RenewalSettings

JSON template for a subscription renewal settings. Corresponds to the JSON property renewalSettings



419
420
421
# File 'generated/google/apis/reseller_v1/classes.rb', line 419

def renewal_settings
  @renewal_settings
end

#resource_ui_urlString

URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console. Corresponds to the JSON property resourceUiUrl

Returns:

  • (String)


427
428
429
# File 'generated/google/apis/reseller_v1/classes.rb', line 427

def resource_ui_url
  @resource_ui_url
end

#seatsGoogle::Apis::ResellerV1::Seats

JSON template for subscription seats. Corresponds to the JSON property seats



432
433
434
# File 'generated/google/apis/reseller_v1/classes.rb', line 432

def seats
  @seats
end

#sku_idString

A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs. Corresponds to the JSON property skuId

Returns:

  • (String)


439
440
441
# File 'generated/google/apis/reseller_v1/classes.rb', line 439

def sku_id
  @sku_id
end

#sku_nameString

Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs. Corresponds to the JSON property skuName

Returns:

  • (String)


447
448
449
# File 'generated/google/apis/reseller_v1/classes.rb', line 447

def sku_name
  @sku_name
end

#statusString

This is an optional property. Corresponds to the JSON property status

Returns:

  • (String)


452
453
454
# File 'generated/google/apis/reseller_v1/classes.rb', line 452

def status
  @status
end

#subscription_idString

The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions. Corresponds to the JSON property subscriptionId

Returns:

  • (String)


461
462
463
# File 'generated/google/apis/reseller_v1/classes.rb', line 461

def subscription_id
  @subscription_id
end

#suspension_reasonsArray<String>

Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed. Possible options include:

  • PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services.
  • RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
  • RESELLER_INITIATED - A manual suspension invoked by a Reseller.
  • TRIAL_ENDED - The customer's trial expired without a plan selected.
  • OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise). Corresponds to the JSON property suspensionReasons

Returns:

  • (Array<String>)


478
479
480
# File 'generated/google/apis/reseller_v1/classes.rb', line 478

def suspension_reasons
  @suspension_reasons
end

#transfer_infoGoogle::Apis::ResellerV1::Subscription::TransferInfo

Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer. Corresponds to the JSON property transferInfo



484
485
486
# File 'generated/google/apis/reseller_v1/classes.rb', line 484

def transfer_info
  @transfer_info
end

#trial_settingsGoogle::Apis::ResellerV1::Subscription::TrialSettings

The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts. Corresponds to the JSON property trialSettings



490
491
492
# File 'generated/google/apis/reseller_v1/classes.rb', line 490

def trial_settings
  @trial_settings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
# File 'generated/google/apis/reseller_v1/classes.rb', line 497

def update!(**args)
  @billing_method = args[:billing_method] if args.key?(:billing_method)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @customer_domain = args[:customer_domain] if args.key?(:customer_domain)
  @customer_id = args[:customer_id] if args.key?(:customer_id)
  @deal_code = args[:deal_code] if args.key?(:deal_code)
  @kind = args[:kind] if args.key?(:kind)
  @plan = args[:plan] if args.key?(:plan)
  @purchase_order_id = args[:purchase_order_id] if args.key?(:purchase_order_id)
  @renewal_settings = args[:renewal_settings] if args.key?(:renewal_settings)
  @resource_ui_url = args[:resource_ui_url] if args.key?(:resource_ui_url)
  @seats = args[:seats] if args.key?(:seats)
  @sku_id = args[:sku_id] if args.key?(:sku_id)
  @sku_name = args[:sku_name] if args.key?(:sku_name)
  @status = args[:status] if args.key?(:status)
  @subscription_id = args[:subscription_id] if args.key?(:subscription_id)
  @suspension_reasons = args[:suspension_reasons] if args.key?(:suspension_reasons)
  @transfer_info = args[:transfer_info] if args.key?(:transfer_info)
  @trial_settings = args[:trial_settings] if args.key?(:trial_settings)
end