Class: Stripe::V2::Billing::PricingPlanSubscriptionService

Inherits:
StripeService
  • Object
show all
Defined in:
lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from StripeService

#request, #request_stream

Constructor Details

#initialize(requestor) ⇒ PricingPlanSubscriptionService

Returns a new instance of PricingPlanSubscriptionService.



10
11
12
13
14
# File 'lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb', line 10

def initialize(requestor)
  super
  @components = Stripe::V2::Billing::PricingPlanSubscriptions::ComponentService
                .new(@requestor)
end

Instance Attribute Details

#componentsObject (readonly)

Returns the value of attribute components.



8
9
10
# File 'lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb', line 8

def components
  @components
end

Instance Method Details

#list(params = {}, opts = {}) ⇒ Object

List all Pricing Plan Subscription objects.



17
18
19
20
21
22
23
24
25
# File 'lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb', line 17

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v2/billing/pricing_plan_subscriptions",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(id, params = {}, opts = {}) ⇒ Object

Retrieve a Pricing Plan Subscription object.



28
29
30
31
32
33
34
35
36
# File 'lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb', line 28

def retrieve(id, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v2/billing/pricing_plan_subscriptions/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#update(id, params = {}, opts = {}) ⇒ Object

Update a Pricing Plan Subscription object.



39
40
41
42
43
44
45
46
47
# File 'lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb', line 39

def update(id, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v2/billing/pricing_plan_subscriptions/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end