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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/reseller_v1/classes.rb,
lib/google/apis/reseller_v1/representations.rb,
lib/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

Constructor Details

#initialize(**args) ⇒ Subscription

Returns a new instance of Subscription.



531
532
533
# File 'lib/google/apis/reseller_v1/classes.rb', line 531

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)


409
410
411
# File 'lib/google/apis/reseller_v1/classes.rb', line 409

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)


415
416
417
# File 'lib/google/apis/reseller_v1/classes.rb', line 415

def creation_time
  @creation_time
end

#customer_domainString

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

Returns:

  • (String)


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

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)


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

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)


435
436
437
# File 'lib/google/apis/reseller_v1/classes.rb', line 435

def deal_code
  @deal_code
end

#kindString

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

Returns:

  • (String)


440
441
442
# File 'lib/google/apis/reseller_v1/classes.rb', line 440

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



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

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)


455
456
457
# File 'lib/google/apis/reseller_v1/classes.rb', line 455

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



460
461
462
# File 'lib/google/apis/reseller_v1/classes.rb', line 460

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)


468
469
470
# File 'lib/google/apis/reseller_v1/classes.rb', line 468

def resource_ui_url
  @resource_ui_url
end

#seatsGoogle::Apis::ResellerV1::Seats

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



473
474
475
# File 'lib/google/apis/reseller_v1/classes.rb', line 473

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)


480
481
482
# File 'lib/google/apis/reseller_v1/classes.rb', line 480

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)


488
489
490
# File 'lib/google/apis/reseller_v1/classes.rb', line 488

def sku_name
  @sku_name
end

#statusString

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

Returns:

  • (String)


493
494
495
# File 'lib/google/apis/reseller_v1/classes.rb', line 493

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)


502
503
504
# File 'lib/google/apis/reseller_v1/classes.rb', line 502

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


517
518
519
# File 'lib/google/apis/reseller_v1/classes.rb', line 517

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



523
524
525
# File 'lib/google/apis/reseller_v1/classes.rb', line 523

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



529
530
531
# File 'lib/google/apis/reseller_v1/classes.rb', line 529

def trial_settings
  @trial_settings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
# File 'lib/google/apis/reseller_v1/classes.rb', line 536

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