Class: Stripe::SubscriptionScheduleService::AmendParams::Amendment

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/subscription_schedule_service.rb

Defined Under Namespace

Classes: AmendmentEnd, AmendmentStart, DiscountAction, ItemAction, MetadataAction, SetPauseCollection, TrialSettings

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amendment_end: nil, amendment_start: nil, billing_cycle_anchor: nil, discount_actions: nil, item_actions: nil, metadata_actions: nil, proration_behavior: nil, set_pause_collection: nil, set_schedule_end: nil, trial_settings: nil) ⇒ Amendment

Returns a new instance of Amendment.



2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
# File 'lib/stripe/services/subscription_schedule_service.rb', line 2157

def initialize(
  amendment_end: nil,
  amendment_start: nil,
  billing_cycle_anchor: nil,
  discount_actions: nil,
  item_actions: nil,
  metadata_actions: nil,
  proration_behavior: nil,
  set_pause_collection: nil,
  set_schedule_end: nil,
  trial_settings: nil
)
  @amendment_end = amendment_end
  @amendment_start = amendment_start
  @billing_cycle_anchor = billing_cycle_anchor
  @discount_actions = discount_actions
  @item_actions = item_actions
  @metadata_actions = 
  @proration_behavior = proration_behavior
  @set_pause_collection = set_pause_collection
  @set_schedule_end = set_schedule_end
  @trial_settings = trial_settings
end

Instance Attribute Details

#amendment_endObject

Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at ‘amendment_start`, and a restricted set of attributes is supported on the amendment.



2128
2129
2130
# File 'lib/stripe/services/subscription_schedule_service.rb', line 2128

def amendment_end
  @amendment_end
end

#amendment_startObject

Details to identify the earliest timestamp where the proposed change should take effect.



2131
2132
2133
# File 'lib/stripe/services/subscription_schedule_service.rb', line 2131

def amendment_start
  @amendment_start
end

#billing_cycle_anchorObject

For point-in-time amendments (having no ‘amendment_end`), this attribute lets you set or remove whether the subscription’s billing cycle anchor is reset at the ‘amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.



2134
2135
2136
# File 'lib/stripe/services/subscription_schedule_service.rb', line 2134

def billing_cycle_anchor
  @billing_cycle_anchor
end

#discount_actionsObject

Changes to the coupons being redeemed or discounts being applied during the amendment time span.



2137
2138
2139
# File 'lib/stripe/services/subscription_schedule_service.rb', line 2137

def discount_actions
  @discount_actions
end

#item_actionsObject

Changes to the subscription items during the amendment time span.



2140
2141
2142
# File 'lib/stripe/services/subscription_schedule_service.rb', line 2140

def item_actions
  @item_actions
end

#metadata_actionsObject

Instructions for how to modify phase metadata



2143
2144
2145
# File 'lib/stripe/services/subscription_schedule_service.rb', line 2143

def 
  @metadata_actions
end

#proration_behaviorObject

Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when ‘amendment_end` is `null`.



2146
2147
2148
# File 'lib/stripe/services/subscription_schedule_service.rb', line 2146

def proration_behavior
  @proration_behavior
end

#set_pause_collectionObject

Defines how to pause collection for the underlying subscription throughout the duration of the amendment.



2149
2150
2151
# File 'lib/stripe/services/subscription_schedule_service.rb', line 2149

def set_pause_collection
  @set_pause_collection
end

#set_schedule_endObject

Ends the subscription schedule early as dictated by either the accompanying amendment’s start or end.



2152
2153
2154
# File 'lib/stripe/services/subscription_schedule_service.rb', line 2152

def set_schedule_end
  @set_schedule_end
end

#trial_settingsObject

Settings related to subscription trials.



2155
2156
2157
# File 'lib/stripe/services/subscription_schedule_service.rb', line 2155

def trial_settings
  @trial_settings
end