Class: Stripe::Reporting::ReportType

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

Overview

The Report Type resource corresponds to a particular type of report, such as the “Activity summary” or “Itemized payouts” reports. These objects are identified by an ID belonging to a set of enumerated values. See [API Access to Reports documentation](stripe.com/docs/reporting/statements/api) for those Report Type IDs, along with required and optional parameters.

Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a [live-mode API key](stripe.com/docs/keys#test-live-modes).

Constant Summary collapse

OBJECT_NAME =
"reporting.report_type"

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 included from APIOperations::List

list

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

#data_available_endObject (readonly)

Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.



23
24
25
# File 'lib/stripe/resources/reporting/report_type.rb', line 23

def data_available_end
  @data_available_end
end

#data_available_startObject (readonly)

Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.



25
26
27
# File 'lib/stripe/resources/reporting/report_type.rb', line 25

def data_available_start
  @data_available_start
end

#default_columnsObject (readonly)

List of column names that are included by default when this Report Type gets run. (If the Report Type doesn’t support the ‘columns` parameter, this will be null.)



27
28
29
# File 'lib/stripe/resources/reporting/report_type.rb', line 27

def default_columns
  @default_columns
end

#idObject (readonly)

The [ID of the Report Type](stripe.com/docs/reporting/statements/api#available-report-types), such as ‘balance.summary.1`.



29
30
31
# File 'lib/stripe/resources/reporting/report_type.rb', line 29

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.



31
32
33
# File 'lib/stripe/resources/reporting/report_type.rb', line 31

def livemode
  @livemode
end

#nameObject (readonly)

Human-readable name of the Report Type



33
34
35
# File 'lib/stripe/resources/reporting/report_type.rb', line 33

def name
  @name
end

#objectObject (readonly)

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



35
36
37
# File 'lib/stripe/resources/reporting/report_type.rb', line 35

def object
  @object
end

#updatedObject (readonly)

When this Report Type was latest updated. Measured in seconds since the Unix epoch.



37
38
39
# File 'lib/stripe/resources/reporting/report_type.rb', line 37

def updated
  @updated
end

#versionObject (readonly)

Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.



39
40
41
# File 'lib/stripe/resources/reporting/report_type.rb', line 39

def version
  @version
end

Class Method Details

.field_remappingsObject



55
56
57
# File 'lib/stripe/resources/reporting/report_type.rb', line 55

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



51
52
53
# File 'lib/stripe/resources/reporting/report_type.rb', line 51

def self.inner_class_types
  @inner_class_types = {}
end

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

Returns a full list of Report Types.



42
43
44
45
46
47
48
49
# File 'lib/stripe/resources/reporting/report_type.rb', line 42

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

.object_nameObject



18
19
20
# File 'lib/stripe/resources/reporting/report_type.rb', line 18

def self.object_name
  "reporting.report_type"
end