Class: Stripe::Plan::UpdateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/plan.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.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/stripe/resources/plan.rb', line 60

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.



48
49
50
# File 'lib/stripe/resources/plan.rb', line 48

def active
  @active
end

#expandObject

Specifies which fields in the response should be expanded.



50
51
52
# File 'lib/stripe/resources/plan.rb', line 50

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`.



52
53
54
# File 'lib/stripe/resources/plan.rb', line 52

def 
  @metadata
end

#nicknameObject

A brief description of the plan, hidden from customers.



54
55
56
# File 'lib/stripe/resources/plan.rb', line 54

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.



56
57
58
# File 'lib/stripe/resources/plan.rb', line 56

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).



58
59
60
# File 'lib/stripe/resources/plan.rb', line 58

def trial_period_days
  @trial_period_days
end