Class: Stripe::V2::Data::Reporting::QueryRun

Inherits:
APIResource show all
Defined in:
lib/stripe/resources/v2/data/reporting/query_run.rb

Overview

The ‘QueryRun` object represents an ad-hoc SQL execution. Once created, Stripe processes the query. When the query has finished running, the object provides a reference to the results.

Defined Under Namespace

Classes: Result, ResultOptions, StatusDetails

Constant Summary collapse

OBJECT_NAME =
"v2.data.reporting.query_run"

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)

Time at which the object was created.



99
100
101
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 99

def created
  @created
end

#idObject (readonly)

The unique identifier of the ‘QueryRun` object.



101
102
103
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 101

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



103
104
105
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 103

def livemode
  @livemode
end

#objectObject (readonly)

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



105
106
107
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 105

def object
  @object
end

#resultObject (readonly)

Details how to retrieve the results of a successfully completed ‘QueryRun`.



107
108
109
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 107

def result
  @result
end

#result_optionsObject (readonly)

The options specified for customizing the output of the ‘QueryRun`.



109
110
111
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 109

def result_options
  @result_options
end

#sqlObject (readonly)

The SQL that was executed.



111
112
113
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 111

def sql
  @sql
end

#statusObject (readonly)

The current status of the ‘QueryRun`.



113
114
115
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 113

def status
  @status
end

#status_detailsObject (readonly)

Additional details about the current state of the ‘QueryRun`. Populated when the `QueryRun` is in the `failed` state, providing more information about why the query failed.



116
117
118
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 116

def status_details
  @status_details
end

Class Method Details

.field_encodingsObject



130
131
132
133
134
135
136
137
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 130

def self.field_encodings
  @field_encodings = {
    result: {
      kind: :object,
      fields: { file: { kind: :object, fields: { size: :int64_string } } },
    },
  }
end

.field_remappingsObject



126
127
128
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 126

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



118
119
120
121
122
123
124
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 118

def self.inner_class_types
  @inner_class_types = {
    result: Result,
    result_options: ResultOptions,
    status_details: StatusDetails,
  }
end

.object_nameObject



12
13
14
# File 'lib/stripe/resources/v2/data/reporting/query_run.rb', line 12

def self.object_name
  "v2.data.reporting.query_run"
end