Class: Stripe::Billing::AlertService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::Billing::AlertService
- Defined in:
- lib/stripe/services/billing/alert_service.rb
Defined Under Namespace
Classes: ActivateParams, ArchiveParams, CreateParams, DeactivateParams, ListParams, RetrieveParams
Instance Method Summary collapse
-
#activate(id, params = {}, opts = {}) ⇒ Object
Reactivates this alert, allowing it to trigger again.
-
#archive(id, params = {}, opts = {}) ⇒ Object
Archives this alert, removing it from the list view and APIs.
-
#create(params = {}, opts = {}) ⇒ Object
Creates a billing alert.
-
#deactivate(id, params = {}, opts = {}) ⇒ Object
Deactivates this alert, preventing it from triggering.
-
#list(params = {}, opts = {}) ⇒ Object
Lists billing active and inactive alerts.
-
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves a billing alert given an ID.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#activate(id, params = {}, opts = {}) ⇒ Object
Reactivates this alert, allowing it to trigger again.
195 196 197 198 199 200 201 202 203 |
# File 'lib/stripe/services/billing/alert_service.rb', line 195 def activate(id, params = {}, opts = {}) request( method: :post, path: format("/v1/billing/alerts/%<id>s/activate", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#archive(id, params = {}, opts = {}) ⇒ Object
Archives this alert, removing it from the list view and APIs. This is non-reversible.
206 207 208 209 210 211 212 213 214 |
# File 'lib/stripe/services/billing/alert_service.rb', line 206 def archive(id, params = {}, opts = {}) request( method: :post, path: format("/v1/billing/alerts/%<id>s/archive", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#create(params = {}, opts = {}) ⇒ Object
Creates a billing alert
217 218 219 220 221 222 223 224 225 |
# File 'lib/stripe/services/billing/alert_service.rb', line 217 def create(params = {}, opts = {}) request( method: :post, path: "/v1/billing/alerts", params: params, opts: opts, base_address: :api ) end |
#deactivate(id, params = {}, opts = {}) ⇒ Object
Deactivates this alert, preventing it from triggering.
228 229 230 231 232 233 234 235 236 |
# File 'lib/stripe/services/billing/alert_service.rb', line 228 def deactivate(id, params = {}, opts = {}) request( method: :post, path: format("/v1/billing/alerts/%<id>s/deactivate", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Lists billing active and inactive alerts
239 240 241 242 243 244 245 246 247 |
# File 'lib/stripe/services/billing/alert_service.rb', line 239 def list(params = {}, opts = {}) request( method: :get, path: "/v1/billing/alerts", params: params, opts: opts, base_address: :api ) end |
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves a billing alert given an ID
250 251 252 253 254 255 256 257 258 |
# File 'lib/stripe/services/billing/alert_service.rb', line 250 def retrieve(id, params = {}, opts = {}) request( method: :get, path: format("/v1/billing/alerts/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |