Class: Stripe::ProductCreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::ProductCreateParams
- Defined in:
- lib/stripe/params/product_create_params.rb
Defined Under Namespace
Classes: DefaultPriceData, MarketingFeature, PackageDimensions, TaxDetails
Instance Attribute Summary collapse
-
#active ⇒ Object
Whether the product is currently available for purchase.
-
#default_price_data ⇒ Object
Data used to generate a new [Price](docs.stripe.com/api/prices) object.
-
#description ⇒ Object
The product’s description, meant to be displayable to the customer.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#id ⇒ Object
An identifier will be randomly generated by Stripe.
-
#images ⇒ Object
A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
-
#marketing_features ⇒ Object
A list of up to 15 marketing features for this product.
-
#metadata ⇒ Object
Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object.
-
#name ⇒ Object
The product’s name, meant to be displayable to the customer.
-
#package_dimensions ⇒ Object
The dimensions of this product for shipping purposes.
-
#shippable ⇒ Object
Whether this product is shipped (i.e., physical goods).
-
#statement_descriptor ⇒ Object
An arbitrary string to be displayed on your customer’s credit card or bank statement.
-
#tax_code ⇒ Object
A [tax code](docs.stripe.com/tax/tax-categories) ID.
-
#tax_details ⇒ Object
Tax details for this product, including the [tax code](/tax/tax-codes) and an optional performance location.
-
#type ⇒ Object
The type of the product.
-
#unit_label ⇒ Object
A label that represents units of this product.
-
#url ⇒ Object
A URL of a publicly-accessible webpage for this product.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(active: nil, default_price_data: nil, description: nil, expand: nil, id: nil, images: nil, marketing_features: nil, metadata: nil, name: nil, package_dimensions: nil, shippable: nil, statement_descriptor: nil, tax_code: nil, tax_details: nil, type: nil, unit_label: nil, url: nil) ⇒ ProductCreateParams
constructor
A new instance of ProductCreateParams.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(active: nil, default_price_data: nil, description: nil, expand: nil, id: nil, images: nil, marketing_features: nil, metadata: nil, name: nil, package_dimensions: nil, shippable: nil, statement_descriptor: nil, tax_code: nil, tax_details: nil, type: nil, unit_label: nil, url: nil) ⇒ ProductCreateParams
Returns a new instance of ProductCreateParams.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/stripe/params/product_create_params.rb', line 248 def initialize( active: nil, default_price_data: nil, description: nil, expand: nil, id: nil, images: nil, marketing_features: nil, metadata: nil, name: nil, package_dimensions: nil, shippable: nil, statement_descriptor: nil, tax_code: nil, tax_details: nil, type: nil, unit_label: nil, url: nil ) @active = active @default_price_data = default_price_data @description = description @expand = @id = id @images = images @marketing_features = marketing_features @metadata = @name = name @package_dimensions = package_dimensions @shippable = shippable @statement_descriptor = statement_descriptor @tax_code = tax_code @tax_details = tax_details @type = type @unit_label = unit_label @url = url end |
Instance Attribute Details
#active ⇒ Object
Whether the product is currently available for purchase. Defaults to ‘true`.
211 212 213 |
# File 'lib/stripe/params/product_create_params.rb', line 211 def active @active end |
#default_price_data ⇒ Object
Data used to generate a new [Price](docs.stripe.com/api/prices) object. This Price will be set as the default price for this product.
213 214 215 |
# File 'lib/stripe/params/product_create_params.rb', line 213 def default_price_data @default_price_data end |
#description ⇒ Object
The product’s description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
215 216 217 |
# File 'lib/stripe/params/product_create_params.rb', line 215 def description @description end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
217 218 219 |
# File 'lib/stripe/params/product_create_params.rb', line 217 def @expand end |
#id ⇒ Object
An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.
219 220 221 |
# File 'lib/stripe/params/product_create_params.rb', line 219 def id @id end |
#images ⇒ Object
A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
221 222 223 |
# File 'lib/stripe/params/product_create_params.rb', line 221 def images @images end |
#marketing_features ⇒ Object
A list of up to 15 marketing features for this product. These are displayed in [pricing tables](docs.stripe.com/payments/checkout/pricing-table).
223 224 225 |
# File 'lib/stripe/params/product_create_params.rb', line 223 def marketing_features @marketing_features end |
#metadata ⇒ Object
Set of [key-value pairs](docs.stripe.com/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`.
225 226 227 |
# File 'lib/stripe/params/product_create_params.rb', line 225 def @metadata end |
#name ⇒ Object
The product’s name, meant to be displayable to the customer.
227 228 229 |
# File 'lib/stripe/params/product_create_params.rb', line 227 def name @name end |
#package_dimensions ⇒ Object
The dimensions of this product for shipping purposes.
229 230 231 |
# File 'lib/stripe/params/product_create_params.rb', line 229 def package_dimensions @package_dimensions end |
#shippable ⇒ Object
Whether this product is shipped (i.e., physical goods).
231 232 233 |
# File 'lib/stripe/params/product_create_params.rb', line 231 def shippable @shippable end |
#statement_descriptor ⇒ Object
An arbitrary string to be displayed on your customer’s credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
This may be up to 22 characters. The statement description may not include ‘<`, `>`, ``, `“`, `’‘ characters, and will appear on your customer’s statement in capital letters. Non-ASCII characters are automatically stripped.
It must contain at least one letter. Only used for subscription payments.
236 237 238 |
# File 'lib/stripe/params/product_create_params.rb', line 236 def statement_descriptor @statement_descriptor end |
#tax_code ⇒ Object
A [tax code](docs.stripe.com/tax/tax-categories) ID.
238 239 240 |
# File 'lib/stripe/params/product_create_params.rb', line 238 def tax_code @tax_code end |
#tax_details ⇒ Object
Tax details for this product, including the [tax code](/tax/tax-codes) and an optional performance location.
240 241 242 |
# File 'lib/stripe/params/product_create_params.rb', line 240 def tax_details @tax_details end |
#type ⇒ Object
The type of the product. Defaults to ‘service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons.
242 243 244 |
# File 'lib/stripe/params/product_create_params.rb', line 242 def type @type end |
#unit_label ⇒ Object
A label that represents units of this product. When set, this will be included in customers’ receipts, invoices, Checkout, and the customer portal.
244 245 246 |
# File 'lib/stripe/params/product_create_params.rb', line 244 def unit_label @unit_label end |
#url ⇒ Object
A URL of a publicly-accessible webpage for this product.
246 247 248 |
# File 'lib/stripe/params/product_create_params.rb', line 246 def url @url end |
Class Method Details
.field_encodings ⇒ Object
286 287 288 289 290 |
# File 'lib/stripe/params/product_create_params.rb', line 286 def self.field_encodings @field_encodings = { default_price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, } end |