Class: AnalyticsOps::Connection::Verification

Inherits:
Object
  • Object
show all
Defined in:
lib/analytics_ops/connection.rb,
sig/analytics_ops.rbs

Overview

Immutable proof that both APIs can read the selected property.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(property:) ⇒ Verification

Returns a new instance of Verification.

Parameters:



12
13
14
15
16
17
18
19
# File 'lib/analytics_ops/connection.rb', line 12

def initialize(property:)
  unless property.is_a?(Resources::Property)
    raise ArgumentError, "property must be an AnalyticsOps::Resources::Property"
  end

  @property = property
  freeze
end

Instance Attribute Details

#propertyResources::Property (readonly)

Returns the value of attribute property.

Returns:



10
11
12
# File 'lib/analytics_ops/connection.rb', line 10

def property
  @property
end

Instance Method Details

#to_hrecord

Returns:

  • (record)


21
22
23
# File 'lib/analytics_ops/connection.rb', line 21

def to_h
  { "property" => property.to_h, "admin_api" => true, "data_api" => true }
end