Class: Stripe::V2::Data::Analytics::MetricQueryResult

Inherits:
APIResource show all
Defined in:
lib/stripe/resources/v2/data/analytics/metric_query_result.rb

Overview

The result of a metric query.

Defined Under Namespace

Classes: Data

Constant Summary collapse

OBJECT_NAME =
"v2.data.analytics.metric_query_result"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#createdObject (readonly)

The timestamp at which this metric query result was created.



62
63
64
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 62

def created
  @created
end

#dataObject (readonly)

An array of timeseries data rows.



64
65
66
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 64

def data
  @data
end

#idObject (readonly)

The unique identifier of this metric query result.



66
67
68
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 66

def id
  @id
end

#livemodeObject (readonly)

Whether this query was run in live mode.



68
69
70
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 68

def livemode
  @livemode
end

#next_page_urlObject (readonly)

Pagination future-proofing: URL to fetch the next page; always null for now.



70
71
72
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 70

def next_page_url
  @next_page_url
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value of the object field.



72
73
74
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 72

def object
  @object
end

#previous_page_urlObject (readonly)

Pagination future-proofing: URL to fetch the previous page; always null for now.



74
75
76
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 74

def previous_page_url
  @previous_page_url
end

#refreshed_atObject (readonly)

A timestamp representing the freshness of the data this metric is aggregated from.



76
77
78
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 76

def refreshed_at
  @refreshed_at
end

Class Method Details

.field_encodingsObject



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 86

def self.field_encodings
  @field_encodings = {
    data: {
      kind: :array,
      element: {
        kind: :object,
        fields: {
          results: {
            kind: :array,
            element: { kind: :object, fields: { value: :int64_string } },
          },
        },
      },
    },
  }
end

.field_remappingsObject



82
83
84
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 82

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



78
79
80
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 78

def self.inner_class_types
  @inner_class_types = { data: Data }
end

.object_nameObject



11
12
13
# File 'lib/stripe/resources/v2/data/analytics/metric_query_result.rb', line 11

def self.object_name
  "v2.data.analytics.metric_query_result"
end