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).

Defined Under Namespace

Classes: ListParams

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

#==, #[], #[]=, 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.



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

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.



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

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.)



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

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`.



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

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.



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

def livemode
  @livemode
end

#nameObject (readonly)

Human-readable name of the Report Type



41
42
43
# File 'lib/stripe/resources/reporting/report_type.rb', line 41

def name
  @name
end

#objectObject (readonly)

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



43
44
45
# File 'lib/stripe/resources/reporting/report_type.rb', line 43

def object
  @object
end

#updatedObject (readonly)

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



45
46
47
# File 'lib/stripe/resources/reporting/report_type.rb', line 45

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.



47
48
49
# File 'lib/stripe/resources/reporting/report_type.rb', line 47

def version
  @version
end

Class Method Details

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

Returns a full list of Report Types.



50
51
52
53
54
55
56
57
# File 'lib/stripe/resources/reporting/report_type.rb', line 50

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