Class: Stripe::ProductCatalog::TrialOfferCreateParams

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/product_catalog/trial_offer_create_params.rb

Defined Under Namespace

Classes: Duration, EndBehavior

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, discriminator, discriminator_fields, field_encodings, new, #to_h

Constructor Details

#initialize(active: nil, duration: nil, end_behavior: nil, expand: nil, nickname: nil, price: nil) ⇒ TrialOfferCreateParams

Returns a new instance of TrialOfferCreateParams.



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/stripe/params/product_catalog/trial_offer_create_params.rb', line 56

def initialize(
  active: nil,
  duration: nil,
  end_behavior: nil,
  expand: nil,
  nickname: nil,
  price: nil
)
  @active = active
  @duration = duration
  @end_behavior = end_behavior
  @expand = expand
  @nickname = nickname
  @price = price
end

Instance Attribute Details

#active ⇒ Object

Whether the trial offer can be used for new subscriptions. Defaults to true.



44
45
46
# File 'lib/stripe/params/product_catalog/trial_offer_create_params.rb', line 44

def active
  @active
end

#duration ⇒ Object

Duration of one service period of the trial.



46
47
48
# File 'lib/stripe/params/product_catalog/trial_offer_create_params.rb', line 46

def duration
  @duration
end

#end_behavior ⇒ Object

Define behavior that occurs at the end of the trial.



48
49
50
# File 'lib/stripe/params/product_catalog/trial_offer_create_params.rb', line 48

def end_behavior
  @end_behavior
end

#expand ⇒ Object

Specifies which fields in the response should be expanded.



50
51
52
# File 'lib/stripe/params/product_catalog/trial_offer_create_params.rb', line 50

def expand
  @expand
end

#nickname ⇒ Object

A brief description of the trial offer, hidden from customers.



52
53
54
# File 'lib/stripe/params/product_catalog/trial_offer_create_params.rb', line 52

def nickname
  @nickname
end

#price ⇒ Object

Price configuration during the trial period (amount, billing scheme, etc).



54
55
56
# File 'lib/stripe/params/product_catalog/trial_offer_create_params.rb', line 54

def price
  @price
end