Class: Stripe::V2::Billing::PricingPlanService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::V2::Billing::PricingPlanService
- Defined in:
- lib/stripe/services/v2/billing/pricing_plan_service.rb
Defined Under Namespace
Classes: CreateParams, ListParams, RetrieveParams, UpdateParams
Instance Attribute Summary collapse
-
#components ⇒ Object
readonly
Returns the value of attribute components.
-
#versions ⇒ Object
readonly
Returns the value of attribute versions.
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Create a Pricing Plan object.
-
#initialize(requestor) ⇒ PricingPlanService
constructor
A new instance of PricingPlanService.
-
#list(params = {}, opts = {}) ⇒ Object
List all Pricing Plan objects.
-
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieve a Pricing Plan object.
-
#update(id, params = {}, opts = {}) ⇒ Object
Update a Pricing Plan object.
Methods inherited from StripeService
Constructor Details
#initialize(requestor) ⇒ PricingPlanService
Returns a new instance of PricingPlanService.
10 11 12 13 14 |
# File 'lib/stripe/services/v2/billing/pricing_plan_service.rb', line 10 def initialize(requestor) super @components = Stripe::V2::Billing::PricingPlans::ComponentService.new(@requestor) @versions = Stripe::V2::Billing::PricingPlans::VersionService.new(@requestor) end |
Instance Attribute Details
#components ⇒ Object (readonly)
Returns the value of attribute components.
8 9 10 |
# File 'lib/stripe/services/v2/billing/pricing_plan_service.rb', line 8 def components @components end |
#versions ⇒ Object (readonly)
Returns the value of attribute versions.
8 9 10 |
# File 'lib/stripe/services/v2/billing/pricing_plan_service.rb', line 8 def versions @versions end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ Object
Create a Pricing Plan object.
97 98 99 100 101 102 103 104 105 |
# File 'lib/stripe/services/v2/billing/pricing_plan_service.rb', line 97 def create(params = {}, opts = {}) request( method: :post, path: "/v2/billing/pricing_plans", params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
List all Pricing Plan objects.
108 109 110 111 112 113 114 115 116 |
# File 'lib/stripe/services/v2/billing/pricing_plan_service.rb', line 108 def list(params = {}, opts = {}) request( method: :get, path: "/v2/billing/pricing_plans", params: params, opts: opts, base_address: :api ) end |
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieve a Pricing Plan object.
119 120 121 122 123 124 125 126 127 |
# File 'lib/stripe/services/v2/billing/pricing_plan_service.rb', line 119 def retrieve(id, params = {}, opts = {}) request( method: :get, path: format("/v2/billing/pricing_plans/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#update(id, params = {}, opts = {}) ⇒ Object
Update a Pricing Plan object.
130 131 132 133 134 135 136 137 138 |
# File 'lib/stripe/services/v2/billing/pricing_plan_service.rb', line 130 def update(id, params = {}, opts = {}) request( method: :post, path: format("/v2/billing/pricing_plans/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |