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



506
507
508
# File 'generated/google/apis/reseller_v1/classes.rb', line 506

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)


383
384
385
# File 'generated/google/apis/reseller_v1/classes.rb', line 383

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)


389
390
391
# File 'generated/google/apis/reseller_v1/classes.rb', line 389

def creation_time
  @creation_time
end

#customer_domainString

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

Returns:

  • (String)


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

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)


401
402
403
# File 'generated/google/apis/reseller_v1/classes.rb', line 401

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)


408
409
410
# File 'generated/google/apis/reseller_v1/classes.rb', line 408

def deal_code
  @deal_code
end

#kindString

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

Returns:

  • (String)


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

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



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

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)


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

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



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

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)


441
442
443
# File 'generated/google/apis/reseller_v1/classes.rb', line 441

def resource_ui_url
  @resource_ui_url
end

#seatsGoogle::Apis::ResellerV1::Seats

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



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

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)


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

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)


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

def sku_name
  @sku_name
end

#statusString

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

Returns:

  • (String)


466
467
468
# File 'generated/google/apis/reseller_v1/classes.rb', line 466

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)


475
476
477
# File 'generated/google/apis/reseller_v1/classes.rb', line 475

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


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

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



498
499
500
# File 'generated/google/apis/reseller_v1/classes.rb', line 498

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



504
505
506
# File 'generated/google/apis/reseller_v1/classes.rb', line 504

def trial_settings
  @trial_settings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
# File 'generated/google/apis/reseller_v1/classes.rb', line 511

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