Class: Google::Apis::PaymentsresellersubscriptionV1::CreateSubscriptionIntent

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

Intent message for creating a Subscription resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CreateSubscriptionIntent

Returns a new instance of CreateSubscriptionIntent.



139
140
141
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 139

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

Instance Attribute Details

#cycle_optionsGoogle::Apis::PaymentsresellersubscriptionV1::CycleOptions

The cycle options when starting and resuming a subscription. Corresponds to the JSON property cycleOptions



113
114
115
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 113

def cycle_options
  @cycle_options
end

#parentString

Optional. Deprecated: Use the parent field in GenerateUserSessionRequest instead. The parent resource name, which is the identifier of the partner. Corresponds to the JSON property parent

Returns:

  • (String)


119
120
121
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 119

def parent
  @parent
end

#subscriptionGoogle::Apis::PaymentsresellersubscriptionV1::Subscription

Acts as a central billing entity between an external partner and Google. Google services use the subscription state to grant or revoke the user's service entitlement. Note: The subscription state might not perfectly align with the user's service entitlement. Some services might continue providing access until the current cycle ends, even if the subscription is immediately canceled. Consult the relevant contract or product policy for specific details. Corresponds to the JSON property subscription



129
130
131
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 129

def subscription
  @subscription
end

#subscription_idString

Required. Identifies the subscription resource on the Partner side. The value is restricted to 63 ASCII characters at the maximum. If a subscription was previously created with the same subscription_id, we will directly return that one. Corresponds to the JSON property subscriptionId

Returns:

  • (String)


137
138
139
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 137

def subscription_id
  @subscription_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



144
145
146
147
148
149
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 144

def update!(**args)
  @cycle_options = args[:cycle_options] if args.key?(:cycle_options)
  @parent = args[:parent] if args.key?(:parent)
  @subscription = args[:subscription] if args.key?(:subscription)
  @subscription_id = args[:subscription_id] if args.key?(:subscription_id)
end