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.
133 134 135 136 137 138 139 140 141 |
# File 'lib/stripe/services/billing/alert_service.rb', line 133 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.
144 145 146 147 148 149 150 151 152 |
# File 'lib/stripe/services/billing/alert_service.rb', line 144 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
155 156 157 158 159 160 161 162 163 |
# File 'lib/stripe/services/billing/alert_service.rb', line 155 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.
166 167 168 169 170 171 172 173 174 |
# File 'lib/stripe/services/billing/alert_service.rb', line 166 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
177 178 179 180 181 182 183 184 185 |
# File 'lib/stripe/services/billing/alert_service.rb', line 177 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
188 189 190 191 192 193 194 195 196 |
# File 'lib/stripe/services/billing/alert_service.rb', line 188 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 |