Class: Stripe::V2::Billing::PricingPlans::ComponentService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::V2::Billing::PricingPlans::ComponentService
- Defined in:
- lib/stripe/services/v2/billing/pricing_plans/component_service.rb
Instance Method Summary collapse
-
#create(pricing_plan_id, params = {}, opts = {}) ⇒ Object
Create a Pricing Plan Component object.
-
#delete(pricing_plan_id, id, params = {}, opts = {}) ⇒ Object
Remove a Pricing Plan Component from the latest version of a Pricing Plan.
-
#list(pricing_plan_id, params = {}, opts = {}) ⇒ Object
List all Pricing Plan Component objects for a Pricing Plan.
-
#retrieve(pricing_plan_id, id, params = {}, opts = {}) ⇒ Object
Retrieve a Pricing Plan Component object.
-
#update(pricing_plan_id, id, params = {}, opts = {}) ⇒ Object
Update a Pricing Plan Component object.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(pricing_plan_id, params = {}, opts = {}) ⇒ Object
Create a Pricing Plan Component object.
10 11 12 13 14 15 16 17 18 |
# File 'lib/stripe/services/v2/billing/pricing_plans/component_service.rb', line 10 def create(pricing_plan_id, params = {}, opts = {}) request( method: :post, path: format("/v2/billing/pricing_plans/%<pricing_plan_id>s/components", { pricing_plan_id: CGI.escape(pricing_plan_id) }), params: params, opts: opts, base_address: :api ) end |
#delete(pricing_plan_id, id, params = {}, opts = {}) ⇒ Object
Remove a Pricing Plan Component from the latest version of a Pricing Plan.
21 22 23 24 25 26 27 28 29 |
# File 'lib/stripe/services/v2/billing/pricing_plans/component_service.rb', line 21 def delete(pricing_plan_id, id, params = {}, opts = {}) request( method: :delete, path: format("/v2/billing/pricing_plans/%<pricing_plan_id>s/components/%<id>s", { pricing_plan_id: CGI.escape(pricing_plan_id), id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#list(pricing_plan_id, params = {}, opts = {}) ⇒ Object
List all Pricing Plan Component objects for a Pricing Plan.
32 33 34 35 36 37 38 39 40 |
# File 'lib/stripe/services/v2/billing/pricing_plans/component_service.rb', line 32 def list(pricing_plan_id, params = {}, opts = {}) request( method: :get, path: format("/v2/billing/pricing_plans/%<pricing_plan_id>s/components", { pricing_plan_id: CGI.escape(pricing_plan_id) }), params: params, opts: opts, base_address: :api ) end |
#retrieve(pricing_plan_id, id, params = {}, opts = {}) ⇒ Object
Retrieve a Pricing Plan Component object.
43 44 45 46 47 48 49 50 51 |
# File 'lib/stripe/services/v2/billing/pricing_plans/component_service.rb', line 43 def retrieve(pricing_plan_id, id, params = {}, opts = {}) request( method: :get, path: format("/v2/billing/pricing_plans/%<pricing_plan_id>s/components/%<id>s", { pricing_plan_id: CGI.escape(pricing_plan_id), id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#update(pricing_plan_id, id, params = {}, opts = {}) ⇒ Object
Update a Pricing Plan Component object.
54 55 56 57 58 59 60 61 62 |
# File 'lib/stripe/services/v2/billing/pricing_plans/component_service.rb', line 54 def update(pricing_plan_id, id, params = {}, opts = {}) request( method: :post, path: format("/v2/billing/pricing_plans/%<pricing_plan_id>s/components/%<id>s", { pricing_plan_id: CGI.escape(pricing_plan_id), id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |