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.



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

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



116
117
118
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 116

def cycle_options
  @cycle_options
end

#parentString

Required. The parent resource name, which is the identifier of the partner. Corresponds to the JSON property parent

Returns:

  • (String)


121
122
123
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 121

def parent
  @parent
end

#subscriptionGoogle::Apis::PaymentsresellersubscriptionV1::Subscription

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. Corresponds to the JSON property subscription



134
135
136
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 134

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)


142
143
144
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 142

def subscription_id
  @subscription_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



149
150
151
152
153
154
# File 'lib/google/apis/paymentsresellersubscription_v1/classes.rb', line 149

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