Class: Stripe::V2::Billing::ServiceActionService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::V2::Billing::ServiceActionService
- Defined in:
- lib/stripe/services/v2/billing/service_action_service.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Create a Service Action object.
-
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieve a Service Action object.
-
#update(id, params = {}, opts = {}) ⇒ Object
Update a ServiceAction object.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(params = {}, opts = {}) ⇒ Object
Create a Service Action object.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/stripe/services/v2/billing/service_action_service.rb', line 9 def create(params = {}, opts = {}) unless params.is_a?(Stripe::RequestParams) params = ::Stripe::V2::Billing::ServiceActionCreateParams.coerce_params(params) end request( method: :post, path: "/v2/billing/service_actions", params: params, opts: opts, base_address: :api ) end |
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieve a Service Action object.
24 25 26 27 28 29 30 31 32 |
# File 'lib/stripe/services/v2/billing/service_action_service.rb', line 24 def retrieve(id, params = {}, opts = {}) request( method: :get, path: format("/v2/billing/service_actions/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#update(id, params = {}, opts = {}) ⇒ Object
Update a ServiceAction object.
35 36 37 38 39 40 41 42 43 |
# File 'lib/stripe/services/v2/billing/service_action_service.rb', line 35 def update(id, params = {}, opts = {}) request( method: :post, path: format("/v2/billing/service_actions/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |