Class: Stripe::PlanService::UpdateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/services/plan_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(active: nil, expand: nil, metadata: nil, nickname: nil, product: nil, trial_period_days: nil) ⇒ UpdateParams

Returns a new instance of UpdateParams.



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/stripe/services/plan_service.rb', line 32

def initialize(
  active: nil,
  expand: nil,
  metadata: nil,
  nickname: nil,
  product: nil,
  trial_period_days: nil
)
  @active = active
  @expand = expand
  @metadata = 
  @nickname = nickname
  @product = product
  @trial_period_days = trial_period_days
end

Instance Attribute Details

#activeObject

Whether the plan is currently available for new subscriptions.



20
21
22
# File 'lib/stripe/services/plan_service.rb', line 20

def active
  @active
end

#expandObject

Specifies which fields in the response should be expanded.



22
23
24
# File 'lib/stripe/services/plan_service.rb', line 22

def expand
  @expand
end

#metadataObject

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.



24
25
26
# File 'lib/stripe/services/plan_service.rb', line 24

def 
  @metadata
end

#nicknameObject

A brief description of the plan, hidden from customers.



26
27
28
# File 'lib/stripe/services/plan_service.rb', line 26

def nickname
  @nickname
end

#productObject

The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.



28
29
30
# File 'lib/stripe/services/plan_service.rb', line 28

def product
  @product
end

#trial_period_daysObject

Default number of trial days when subscribing a customer to this plan using [‘trial_from_plan=true`](stripe.com/docs/api#create_subscription-trial_from_plan).



30
31
32
# File 'lib/stripe/services/plan_service.rb', line 30

def trial_period_days
  @trial_period_days
end