Stripe::BillingApi
Constants
Constructors
Instance methods
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
Retrieve a list of billing meters.
@optional @param ending_before [String?] A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param status [String?] Filter results to only include meters with the given status. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::BillingMeterResourceBillingMeterList]<p>Retrieve a list of billing meters.</p>
@optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.
@optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.
@optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
@optional @param status [String?] Filter results to only include meters with the given status.
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return nil
Retrieves a billing meter given an ID
@required @param id [String?] Unique identifier for the object. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::BillingMeter]<p>Retrieves a billing meter given an ID</p> @required @param id [String?] Unique identifier for the object. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil
Retrieve a list of billing meter event summaries.
@required @param customer [String?] The customer for which to fetch event summaries. @required @param start_time [Int32?] The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. @required @param end_time [Int32?] The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. @required @param id [String?] Unique identifier for the object. @optional @param ending_before [String?] A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param value_grouping_window [String?] Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::BillingMeterResourceBillingMeterEventSummaryList]<p>Retrieve a list of billing meter event summaries.</p>
@required @param customer [String?] The customer for which to fetch event summaries.
@required @param start_time [Int32?] The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.
@required @param end_time [Int32?] The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.
@required @param id [String?] Unique identifier for the object.
@optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.
@optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.
@optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
@optional @param value_grouping_window [String?] Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC).
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return nil
<p>Retrieve a list of billing meter event summaries.</p>
@required @param customer [String?] The customer for which to fetch event summaries.
@required @param start_time [Int32?] The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.
@required @param end_time [Int32?] The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.
@required @param id [String?] Unique identifier for the object.
@optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.
@optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.
@optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
@optional @param value_grouping_window [String?] Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC).
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return [Tuple(Stripe::BillingMeterResourceBillingMeterEventSummaryList, Integer, Hash)] Stripe::BillingMeterResourceBillingMeterEventSummaryList, response status code and response headers
<p>Retrieves a billing meter given an ID</p> @required @param id [String?] Unique identifier for the object. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::BillingMeter, Integer, Hash)] Stripe::BillingMeter, response status code and response headers
<p>Retrieve a list of billing meters.</p>
@optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.
@optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.
@optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
@optional @param status [String?] Filter results to only include meters with the given status.
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return [Tuple(Stripe::BillingMeterResourceBillingMeterList, Integer, Hash)] Stripe::BillingMeterResourceBillingMeterList, response status code and response headers
Creates a billing meter event adjustment
@required @param event_name [String?] The name of the meter event. Corresponds with the `event_name` field on a meter. @required @param _type [String?] Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. @optional @param cancel [Stripe::EventAdjustmentCancelSettingsParam?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return [Stripe::BillingMeterEventAdjustment]<p>Creates a billing meter event adjustment</p>
@required @param event_name [String?] The name of the meter event. Corresponds with the event_name field on a meter.
@required @param _type [String?] Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
@optional @param cancel [Stripe::EventAdjustmentCancelSettingsParam?]
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@return nil
<p>Creates a billing meter event adjustment</p>
@required @param event_name [String?] The name of the meter event. Corresponds with the event_name field on a meter.
@required @param _type [String?] Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
@optional @param cancel [Stripe::EventAdjustmentCancelSettingsParam?]
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@return [Tuple(Stripe::BillingMeterEventAdjustment, Integer, Hash)] Stripe::BillingMeterEventAdjustment, response status code and response headers
Creates a billing meter event
@required @param event_name [String?] The name of the meter event. Corresponds with the `event_name` field on a meter. @required @param payload [Hash(String, String)?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param identifier [String?] A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period. @optional @param timestamp [Int32?] The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified. @return [Stripe::BillingMeterEvent]<p>Creates a billing meter event</p>
@required @param event_name [String?] The name of the meter event. Corresponds with the event_name field on a meter.
@required @param payload [Hash(String, String)?]
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param identifier [String?] A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period.
@optional @param timestamp [Int32?] The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
@return nil
<p>Creates a billing meter event</p>
@required @param event_name [String?] The name of the meter event. Corresponds with the event_name field on a meter.
@required @param payload [Hash(String, String)?]
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param identifier [String?] A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period.
@optional @param timestamp [Int32?] The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
@return [Tuple(Stripe::BillingMeterEvent, Integer, Hash)] Stripe::BillingMeterEvent, response status code and response headers
Creates a billing meter
@required @param default_aggregation [Stripe::AggregationSettingsParam?] @required @param display_name [String?] The meter's name. @required @param event_name [String?] The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. @optional @param customer_mapping [Stripe::CustomerMappingParam?] @optional @param event_time_window [String?] The time window to pre-aggregate meter events for, if any. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param value_settings [Stripe::MeterValueSettingsParam?] @return [Stripe::BillingMeter]<p>Creates a billing meter</p>
@required @param default_aggregation [Stripe::AggregationSettingsParam?]
@required @param display_name [String?] The meter's name.
@required @param event_name [String?] The name of the meter event to record usage for. Corresponds with the event_name field on meter events.
@optional @param customer_mapping [Stripe::CustomerMappingParam?]
@optional @param event_time_window [String?] The time window to pre-aggregate meter events for, if any.
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param value_settings [Stripe::MeterValueSettingsParam?]
@return nil
Updates a billing meter
@required @param id [String?] Unique identifier for the object. @optional @param display_name [String?] The meter's name. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return [Stripe::BillingMeter]<p>Updates a billing meter</p> @required @param id [String?] Unique identifier for the object. @optional @param display_name [String?] The meter's name. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return nil
Deactivates a billing meter
@required @param id [String?] Unique identifier for the object. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return [Stripe::BillingMeter]<p>Deactivates a billing meter</p> @required @param id [String?] Unique identifier for the object. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return nil
<p>Deactivates a billing meter</p> @required @param id [String?] Unique identifier for the object. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::BillingMeter, Integer, Hash)] Stripe::BillingMeter, response status code and response headers
Reactivates a billing meter
@required @param id [String?] Unique identifier for the object. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return [Stripe::BillingMeter]<p>Reactivates a billing meter</p> @required @param id [String?] Unique identifier for the object. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return nil
<p>Reactivates a billing meter</p> @required @param id [String?] Unique identifier for the object. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::BillingMeter, Integer, Hash)] Stripe::BillingMeter, response status code and response headers
<p>Updates a billing meter</p> @required @param id [String?] Unique identifier for the object. @optional @param display_name [String?] The meter's name. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::BillingMeter, Integer, Hash)] Stripe::BillingMeter, response status code and response headers
<p>Creates a billing meter</p>
@required @param default_aggregation [Stripe::AggregationSettingsParam?]
@required @param display_name [String?] The meter's name.
@required @param event_name [String?] The name of the meter event to record usage for. Corresponds with the event_name field on meter events.
@optional @param customer_mapping [Stripe::CustomerMappingParam?]
@optional @param event_time_window [String?] The time window to pre-aggregate meter events for, if any.
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param value_settings [Stripe::MeterValueSettingsParam?]
@return [Tuple(Stripe::BillingMeter, Integer, Hash)] Stripe::BillingMeter, response status code and response headers