Class: Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Subscription

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

Overview

A subscription serves as a central billing entity between an external partner and Google. The underlying Google services rely on the subscription state to grant or revoke the user's service entitlement. It's important to note that the subscription state may not always perfectly align with the user's service entitlement. For example, some Google services may continue providing access to the user until the current billing cycle ends, even if the subscription has been immediately canceled. However, other services may not do the same. To fully understand the specific details, please consult the relevant contract or product policy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudPaymentsResellerSubscriptionV1Subscription

Returns a new instance of GoogleCloudPaymentsResellerSubscriptionV1Subscription.



936
937
938
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 936

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

Instance Attribute Details

#cancellation_detailsGoogle::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionCancellationDetails

Describes the details of a cancelled or cancelling subscription. Corresponds to the JSON property cancellationDetails



813
814
815
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 813

def cancellation_details
  @cancellation_details
end

#create_timeString

Output only. System generated timestamp when the subscription is created. UTC timezone. Corresponds to the JSON property createTime

Returns:

  • (String)


819
820
821
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 819

def create_time
  @create_time
end

#cycle_end_timeString

Output only. The time at which the subscription is expected to be extended, in ISO 8061 format. UTC timezone. For example: "2019-08-31T17:28:54.564Z" Corresponds to the JSON property cycleEndTime

Returns:

  • (String)


825
826
827
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 825

def cycle_end_time
  @cycle_end_time
end

#end_user_entitledBoolean Also known as: end_user_entitled?

Output only. Indicates if the subscription is entitled to the end user. Corresponds to the JSON property endUserEntitled

Returns:

  • (Boolean)


830
831
832
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 830

def end_user_entitled
  @end_user_entitled
end

#free_trial_end_timeString

Output only. End of the free trial period, in ISO 8061 format. For example, " 2019-08-31T17:28:54.564Z". It will be set the same as createTime if no free trial promotion is specified. Corresponds to the JSON property freeTrialEndTime

Returns:

  • (String)


838
839
840
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 838

def free_trial_end_time
  @free_trial_end_time
end

#line_itemsArray<Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItem>

Required. The line items of the subscription. Corresponds to the JSON property lineItems



843
844
845
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 843

def line_items
  @line_items
end

#nameString

Identifier. Resource name of the subscription. It will have the format of " partners/partner_id/subscriptions/subscription_id". This is available for authorizeAddon, but otherwise is response only. Corresponds to the JSON property name

Returns:

  • (String)


850
851
852
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 850

def name
  @name
end

#partner_user_tokenString

Required. Identifier of the end-user in partner’s system. The value is restricted to 63 ASCII characters at the maximum. Corresponds to the JSON property partnerUserToken

Returns:

  • (String)


856
857
858
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 856

def partner_user_token
  @partner_user_token
end

#processing_stateString

Output only. Describes the processing state of the subscription. See more details at the lifecycle of a subscription. Corresponds to the JSON property processingState

Returns:

  • (String)


863
864
865
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 863

def processing_state
  @processing_state
end

#productsArray<String>

Optional. Deprecated: consider using line_items as the input. Required. Resource name that identifies the purchased products. The format will be ' partners/partner_id/products/product_id'. Corresponds to the JSON property products

Returns:

  • (Array<String>)


870
871
872
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 870

def products
  @products
end

#promotion_specsArray<Google::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec>

Optional. Subscription-level promotions. Only free trial is supported on this level. It determines the first renewal time of the subscription to be the end of the free trial period. Specify the promotion resource name only when used as input. Corresponds to the JSON property promotionSpecs



878
879
880
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 878

def promotion_specs
  @promotion_specs
end

#promotionsArray<String>

Optional. Deprecated: consider using the top-level promotion_specs as the input. Optional. Resource name that identifies one or more promotions that can be applied on the product. A typical promotion for a subscription is Free trial. The format will be 'partners/partner_id/promotions/promotion_id'. Corresponds to the JSON property promotions

Returns:

  • (Array<String>)


886
887
888
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 886

def promotions
  @promotions
end

#purchase_timeString

Optional. The timestamp when the user transaction was made with the Partner. Specify for the case of "bundle with choice", and it must be before the provision_time (when the user makes a selection). Corresponds to the JSON property purchaseTime

Returns:

  • (String)


893
894
895
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 893

def purchase_time
  @purchase_time
end

#redirect_uriString

Output only. The place where partners should redirect the end-user to after creation. This field might also be populated when creation failed. However, Partners should always prepare a default URL to redirect the user in case this field is empty. Corresponds to the JSON property redirectUri

Returns:

  • (String)


901
902
903
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 901

def redirect_uri
  @redirect_uri
end

#renewal_timeString

Output only. The time at which the subscription is expected to be renewed by Google - a new charge will be incurred and the service entitlement will be renewed. A non-immediate cancellation will take place at this time too, before which, the service entitlement for the end user will remain valid. UTC timezone in ISO 8061 format. For example: "2019-08-31T17:28:54.564Z" Corresponds to the JSON property renewalTime

Returns:

  • (String)


910
911
912
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 910

def renewal_time
  @renewal_time
end

#service_locationGoogle::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1Location

Describes a location of an end user. Corresponds to the JSON property serviceLocation



915
916
917
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 915

def service_location
  @service_location
end

#stateString

Output only. Describes the state of the subscription. See more details at the lifecycle of a subscription. Corresponds to the JSON property state

Returns:

  • (String)


922
923
924
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 922

def state
  @state
end

#update_timeString

Output only. System generated timestamp when the subscription is most recently updated. UTC timezone. Corresponds to the JSON property updateTime

Returns:

  • (String)


928
929
930
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 928

def update_time
  @update_time
end

#upgrade_downgrade_detailsGoogle::Apis::PaymentsresellersubscriptionV1::GoogleCloudPaymentsResellerSubscriptionV1SubscriptionUpgradeDowngradeDetails

Details about the previous subscription that this new subscription upgrades/ downgrades from. Corresponds to the JSON property upgradeDowngradeDetails



934
935
936
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 934

def upgrade_downgrade_details
  @upgrade_downgrade_details
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 941

def update!(**args)
  @cancellation_details = args[:cancellation_details] if args.key?(:cancellation_details)
  @create_time = args[:create_time] if args.key?(:create_time)
  @cycle_end_time = args[:cycle_end_time] if args.key?(:cycle_end_time)
  @end_user_entitled = args[:end_user_entitled] if args.key?(:end_user_entitled)
  @free_trial_end_time = args[:free_trial_end_time] if args.key?(:free_trial_end_time)
  @line_items = args[:line_items] if args.key?(:line_items)
  @name = args[:name] if args.key?(:name)
  @partner_user_token = args[:partner_user_token] if args.key?(:partner_user_token)
  @processing_state = args[:processing_state] if args.key?(:processing_state)
  @products = args[:products] if args.key?(:products)
  @promotion_specs = args[:promotion_specs] if args.key?(:promotion_specs)
  @promotions = args[:promotions] if args.key?(:promotions)
  @purchase_time = args[:purchase_time] if args.key?(:purchase_time)
  @redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
  @renewal_time = args[:renewal_time] if args.key?(:renewal_time)
  @service_location = args[:service_location] if args.key?(:service_location)
  @state = args[:state] if args.key?(:state)
  @update_time = args[:update_time] if args.key?(:update_time)
  @upgrade_downgrade_details = args[:upgrade_downgrade_details] if args.key?(:upgrade_downgrade_details)
end