Class: Google::Apis::HealthV4::CreateSubscriptionPayload

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

Overview

Payload for creating a subscription.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CreateSubscriptionPayload

Returns a new instance of CreateSubscriptionPayload.



861
862
863
# File 'lib/google/apis/health_v4/classes.rb', line 861

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

Instance Attribute Details

#data_typesArray<String>

Optional. Data types subscribed to. Corresponds to the JSON property dataTypes

Returns:

  • (Array<String>)


851
852
853
# File 'lib/google/apis/health_v4/classes.rb', line 851

def data_types
  @data_types
end

#userString

Required. Immutable. The resource name of the user for whom this subscription is active. Format: users/userwhereuser`is the publichealthUserId as returned by theGetIdentityaction in the profile PAPI (seegoogle. devicesandservices.health.v4main.HealthProfileService.GetIdentity). Corresponds to the JSON propertyuser`

Returns:

  • (String)


859
860
861
# File 'lib/google/apis/health_v4/classes.rb', line 859

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



866
867
868
869
# File 'lib/google/apis/health_v4/classes.rb', line 866

def update!(**args)
  @data_types = args[:data_types] if args.key?(:data_types)
  @user = args[:user] if args.key?(:user)
end