Class: Stripe::Sigma::ScheduledQueryRun

Inherits:
APIResource show all
Extended by:
APIOperations::List
Defined in:
lib/stripe/resources/sigma/scheduled_query_run.rb

Overview

If you have [scheduled a Sigma query](stripe.com/docs/sigma/scheduled-queries), you’ll receive a ‘sigma.scheduled_query_run.created` webhook each time the query runs. The webhook contains a `ScheduledQueryRun` object, which you can use to retrieve the query results.

Defined Under Namespace

Classes: Error

Constant Summary collapse

OBJECT_NAME =
"scheduled_query_run"

Constants inherited from Stripe::StripeObject

Stripe::StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from Stripe::StripeObject

#last_response

Class Method Summary collapse

Methods included from APIOperations::List

list

Methods inherited from APIResource

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

Methods included from APIOperations::Request

included

Methods inherited from Stripe::StripeObject

#==, #[], #[]=, 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. Measured in seconds since the Unix epoch.



22
23
24
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 22

def created
  @created
end

#data_load_timeObject (readonly)

When the query was run, Sigma contained a snapshot of your Stripe data at this time.



24
25
26
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 24

def data_load_time
  @data_load_time
end

#errorObject (readonly)

Attribute for field error



26
27
28
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 26

def error
  @error
end

#fileObject (readonly)

The file object representing the results of the query.



28
29
30
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 28

def file
  @file
end

#idObject (readonly)

Unique identifier for the object.



30
31
32
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 30

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.



32
33
34
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 32

def livemode
  @livemode
end

#objectObject (readonly)

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



34
35
36
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 34

def object
  @object
end

#result_available_untilObject (readonly)

Time at which the result expires and is no longer available for download.



36
37
38
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 36

def result_available_until
  @result_available_until
end

#sqlObject (readonly)

SQL for the query.



38
39
40
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 38

def sql
  @sql
end

#statusObject (readonly)

The query’s execution status, which will be ‘completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.



40
41
42
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 40

def status
  @status
end

#titleObject (readonly)

Title of the query.



42
43
44
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 42

def title
  @title
end

Class Method Details

.list(filters = {}, opts = {}) ⇒ Object

Returns a list of scheduled query runs.



45
46
47
48
49
50
51
52
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 45

def self.list(filters = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/sigma/scheduled_query_runs",
    params: filters,
    opts: opts
  )
end

.object_nameObject



14
15
16
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 14

def self.object_name
  "scheduled_query_run"
end

.resource_urlObject



54
55
56
# File 'lib/stripe/resources/sigma/scheduled_query_run.rb', line 54

def self.resource_url
  "/v1/sigma/scheduled_query_runs"
end