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.



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

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

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

Returns:

  • (String)


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

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



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

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)


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

def subscription_id
  @subscription_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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