Class: Stripe::PaymentLinkService::UpdateParams

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

Defined Under Namespace

Classes: AfterCompletion, AutomaticTax, CustomField, CustomText, InvoiceCreation, LineItem, PaymentIntentData, PhoneNumberCollection, Restrictions, ShippingAddressCollection, SubscriptionData, TaxIdCollection

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(active: nil, after_completion: nil, allow_promotion_codes: nil, automatic_tax: nil, billing_address_collection: nil, custom_fields: nil, custom_text: nil, customer_creation: nil, expand: nil, inactive_message: nil, invoice_creation: nil, line_items: nil, metadata: nil, payment_intent_data: nil, payment_method_collection: nil, payment_method_types: nil, phone_number_collection: nil, restrictions: nil, shipping_address_collection: nil, submit_type: nil, subscription_data: nil, tax_id_collection: nil) ⇒ UpdateParams

Returns a new instance of UpdateParams.



1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
# File 'lib/stripe/services/payment_link_service.rb', line 1187

def initialize(
  active: nil,
  after_completion: nil,
  allow_promotion_codes: nil,
  automatic_tax: nil,
  billing_address_collection: nil,
  custom_fields: nil,
  custom_text: nil,
  customer_creation: nil,
  expand: nil,
  inactive_message: nil,
  invoice_creation: nil,
  line_items: nil,
  metadata: nil,
  payment_intent_data: nil,
  payment_method_collection: nil,
  payment_method_types: nil,
  phone_number_collection: nil,
  restrictions: nil,
  shipping_address_collection: nil,
  submit_type: nil,
  subscription_data: nil,
  tax_id_collection: nil
)
  @active = active
  @after_completion = after_completion
  @allow_promotion_codes = allow_promotion_codes
  @automatic_tax = automatic_tax
  @billing_address_collection = billing_address_collection
  @custom_fields = custom_fields
  @custom_text = custom_text
  @customer_creation = customer_creation
  @expand = expand
  @inactive_message = inactive_message
  @invoice_creation = invoice_creation
  @line_items = line_items
  @metadata = 
  @payment_intent_data = payment_intent_data
  @payment_method_collection = payment_method_collection
  @payment_method_types = payment_method_types
  @phone_number_collection = phone_number_collection
  @restrictions = restrictions
  @shipping_address_collection = shipping_address_collection
  @submit_type = submit_type
  @subscription_data = subscription_data
  @tax_id_collection = tax_id_collection
end

Instance Attribute Details

#activeObject

Whether the payment link’s ‘url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.



1137
1138
1139
# File 'lib/stripe/services/payment_link_service.rb', line 1137

def active
  @active
end

#after_completionObject

Behavior after the purchase is complete.



1139
1140
1141
# File 'lib/stripe/services/payment_link_service.rb', line 1139

def after_completion
  @after_completion
end

#allow_promotion_codesObject

Enables user redeemable promotion codes.



1141
1142
1143
# File 'lib/stripe/services/payment_link_service.rb', line 1141

def allow_promotion_codes
  @allow_promotion_codes
end

#automatic_taxObject

Configuration for automatic tax collection.



1143
1144
1145
# File 'lib/stripe/services/payment_link_service.rb', line 1143

def automatic_tax
  @automatic_tax
end

#billing_address_collectionObject

Configuration for collecting the customer’s billing address. Defaults to ‘auto`.



1145
1146
1147
# File 'lib/stripe/services/payment_link_service.rb', line 1145

def billing_address_collection
  @billing_address_collection
end

#custom_fieldsObject

Collect additional information from your customer using custom fields. Up to 3 fields are supported.



1147
1148
1149
# File 'lib/stripe/services/payment_link_service.rb', line 1147

def custom_fields
  @custom_fields
end

#custom_textObject

Display additional text for your customers using custom text.



1149
1150
1151
# File 'lib/stripe/services/payment_link_service.rb', line 1149

def custom_text
  @custom_text
end

#customer_creationObject

Configures whether [checkout sessions](stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](stripe.com/docs/api/customers).



1151
1152
1153
# File 'lib/stripe/services/payment_link_service.rb', line 1151

def customer_creation
  @customer_creation
end

#expandObject

Specifies which fields in the response should be expanded.



1153
1154
1155
# File 'lib/stripe/services/payment_link_service.rb', line 1153

def expand
  @expand
end

#inactive_messageObject

The custom message to be displayed to a customer when a payment link is no longer active.



1155
1156
1157
# File 'lib/stripe/services/payment_link_service.rb', line 1155

def inactive_message
  @inactive_message
end

#invoice_creationObject

Generate a post-purchase Invoice for one-time payments.



1157
1158
1159
# File 'lib/stripe/services/payment_link_service.rb', line 1157

def invoice_creation
  @invoice_creation
end

#line_itemsObject

The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.



1159
1160
1161
# File 'lib/stripe/services/payment_link_service.rb', line 1159

def line_items
  @line_items
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`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](stripe.com/docs/api/checkout/sessions) created by this payment link.



1161
1162
1163
# File 'lib/stripe/services/payment_link_service.rb', line 1161

def 
  @metadata
end

#payment_intent_dataObject

A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in ‘payment` mode.



1163
1164
1165
# File 'lib/stripe/services/payment_link_service.rb', line 1163

def payment_intent_data
  @payment_intent_data
end

#payment_method_collectionObject

Specify whether Checkout should collect a payment method. When set to ‘if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.

Can only be set in ‘subscription` mode. Defaults to `always`.

If you’d like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](stripe.com/docs/payments/checkout/free-trials).



1169
1170
1171
# File 'lib/stripe/services/payment_link_service.rb', line 1169

def payment_method_collection
  @payment_method_collection
end

#payment_method_typesObject

The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](dashboard.stripe.com/settings/payment_methods).



1171
1172
1173
# File 'lib/stripe/services/payment_link_service.rb', line 1171

def payment_method_types
  @payment_method_types
end

#phone_number_collectionObject

Controls phone number collection settings during checkout.

We recommend that you review your privacy policy and check with your legal contacts.



1175
1176
1177
# File 'lib/stripe/services/payment_link_service.rb', line 1175

def phone_number_collection
  @phone_number_collection
end

#restrictionsObject

Settings that restrict the usage of a payment link.



1177
1178
1179
# File 'lib/stripe/services/payment_link_service.rb', line 1177

def restrictions
  @restrictions
end

#shipping_address_collectionObject

Configuration for collecting the customer’s shipping address.



1179
1180
1181
# File 'lib/stripe/services/payment_link_service.rb', line 1179

def shipping_address_collection
  @shipping_address_collection
end

#submit_typeObject

Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](stripe.com/docs/api/payment_links/payment_links/object#url) property (example: ‘donate.stripe.com`).



1181
1182
1183
# File 'lib/stripe/services/payment_link_service.rb', line 1181

def submit_type
  @submit_type
end

#subscription_dataObject

When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use ‘subscription_data`.



1183
1184
1185
# File 'lib/stripe/services/payment_link_service.rb', line 1183

def subscription_data
  @subscription_data
end

#tax_id_collectionObject

Controls tax ID collection during checkout.



1185
1186
1187
# File 'lib/stripe/services/payment_link_service.rb', line 1185

def tax_id_collection
  @tax_id_collection
end