Class: Stripe::SubscriptionScheduleUpdateParams::DefaultSettings

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

Defined Under Namespace

Classes: AutomaticTax, BillingThresholds, InvoiceSettings, TransferData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(application_fee_percent: nil, automatic_tax: nil, billing_cycle_anchor: nil, billing_thresholds: nil, collection_method: nil, default_payment_method: nil, description: nil, invoice_settings: nil, on_behalf_of: nil, transfer_data: nil) ⇒ DefaultSettings

Returns a new instance of DefaultSettings.



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 100

def initialize(
  application_fee_percent: nil,
  automatic_tax: nil,
  billing_cycle_anchor: nil,
  billing_thresholds: nil,
  collection_method: nil,
  default_payment_method: nil,
  description: nil,
  invoice_settings: nil,
  on_behalf_of: nil,
  transfer_data: nil
)
  @application_fee_percent = application_fee_percent
  @automatic_tax = automatic_tax
  @billing_cycle_anchor = billing_cycle_anchor
  @billing_thresholds = billing_thresholds
  @collection_method = collection_method
  @default_payment_method = default_payment_method
  @description = description
  @invoice_settings = invoice_settings
  @on_behalf_of = on_behalf_of
  @transfer_data = transfer_data
end

Instance Attribute Details

#application_fee_percentObject

A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner’s Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).



80
81
82
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 80

def application_fee_percent
  @application_fee_percent
end

#automatic_taxObject

Default settings for automatic tax computation.



82
83
84
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 82

def automatic_tax
  @automatic_tax
end

#billing_cycle_anchorObject

Can be set to ‘phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](stripe.com/docs/billing/subscriptions/billing-cycle).



84
85
86
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 84

def billing_cycle_anchor
  @billing_cycle_anchor
end

#billing_thresholdsObject

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.



86
87
88
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 86

def billing_thresholds
  @billing_thresholds
end

#collection_methodObject

Either ‘charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.



88
89
90
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 88

def collection_method
  @collection_method
end

#default_payment_methodObject

ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer’s invoice settings.



90
91
92
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 90

def default_payment_method
  @default_payment_method
end

#descriptionObject

Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.



92
93
94
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 92

def description
  @description
end

#invoice_settingsObject

All invoices will be billed using the specified settings.



94
95
96
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 94

def invoice_settings
  @invoice_settings
end

#on_behalf_ofObject

The account on behalf of which to charge, for each of the associated subscription’s invoices.



96
97
98
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 96

def on_behalf_of
  @on_behalf_of
end

#transfer_dataObject

The data with which to automatically create a Transfer for each of the associated subscription’s invoices.



98
99
100
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 98

def transfer_data
  @transfer_data
end