Class: Stripe::ProductService::CreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::ProductService::CreateParams
- Defined in:
- lib/stripe/services/product_service.rb
Defined Under Namespace
Classes: DefaultPriceData, MarketingFeature, PackageDimensions, Provisioning
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](stripe.com/docs/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](stripe.com/docs/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.
-
#provisioning ⇒ Object
Provisioning configuration for this product.
-
#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](stripe.com/docs/tax/tax-categories) ID.
-
#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.
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, provisioning: nil, shippable: nil, statement_descriptor: nil, tax_code: nil, type: nil, unit_label: nil, url: nil) ⇒ CreateParams
constructor
A new instance of CreateParams.
Methods inherited from RequestParams
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, provisioning: nil, shippable: nil, statement_descriptor: nil, tax_code: nil, type: nil, unit_label: nil, url: nil) ⇒ CreateParams
Returns a new instance of CreateParams.
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 |
# File 'lib/stripe/services/product_service.rb', line 415 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, provisioning: nil, shippable: nil, statement_descriptor: nil, tax_code: 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 @provisioning = provisioning @shippable = shippable @statement_descriptor = statement_descriptor @tax_code = tax_code @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`.
378 379 380 |
# File 'lib/stripe/services/product_service.rb', line 378 def active @active end |
#default_price_data ⇒ Object
Data used to generate a new [Price](stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.
380 381 382 |
# File 'lib/stripe/services/product_service.rb', line 380 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.
382 383 384 |
# File 'lib/stripe/services/product_service.rb', line 382 def description @description end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
384 385 386 |
# File 'lib/stripe/services/product_service.rb', line 384 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.
386 387 388 |
# File 'lib/stripe/services/product_service.rb', line 386 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.
388 389 390 |
# File 'lib/stripe/services/product_service.rb', line 388 def images @images end |
#marketing_features ⇒ Object
A list of up to 15 marketing features for this product. These are displayed in [pricing tables](stripe.com/docs/payments/checkout/pricing-table).
390 391 392 |
# File 'lib/stripe/services/product_service.rb', line 390 def marketing_features @marketing_features end |
#metadata ⇒ Object
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`.
392 393 394 |
# File 'lib/stripe/services/product_service.rb', line 392 def @metadata end |
#name ⇒ Object
The product’s name, meant to be displayable to the customer.
394 395 396 |
# File 'lib/stripe/services/product_service.rb', line 394 def name @name end |
#package_dimensions ⇒ Object
The dimensions of this product for shipping purposes.
396 397 398 |
# File 'lib/stripe/services/product_service.rb', line 396 def package_dimensions @package_dimensions end |
#provisioning ⇒ Object
Provisioning configuration for this product.
398 399 400 |
# File 'lib/stripe/services/product_service.rb', line 398 def provisioning @provisioning end |
#shippable ⇒ Object
Whether this product is shipped (i.e., physical goods).
400 401 402 |
# File 'lib/stripe/services/product_service.rb', line 400 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.
405 406 407 |
# File 'lib/stripe/services/product_service.rb', line 405 def statement_descriptor @statement_descriptor end |
#tax_code ⇒ Object
A [tax code](stripe.com/docs/tax/tax-categories) ID.
407 408 409 |
# File 'lib/stripe/services/product_service.rb', line 407 def tax_code @tax_code 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.
409 410 411 |
# File 'lib/stripe/services/product_service.rb', line 409 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.
411 412 413 |
# File 'lib/stripe/services/product_service.rb', line 411 def unit_label @unit_label end |
#url ⇒ Object
A URL of a publicly-accessible webpage for this product.
413 414 415 |
# File 'lib/stripe/services/product_service.rb', line 413 def url @url end |