Class: Stripe::Product::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/product.rb

Defined Under Namespace

Classes: DefaultPriceData, MarketingFeature, PackageDimensions, Provisioning

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#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, provisioning: nil, shippable: nil, statement_descriptor: nil, tax_code: nil, type: nil, unit_label: nil, url: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# File 'lib/stripe/resources/product.rb', line 542

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 = 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

#activeObject

Whether the product is currently available for purchase. Defaults to ‘true`.



489
490
491
# File 'lib/stripe/resources/product.rb', line 489

def active
  @active
end

#default_price_dataObject

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.



492
493
494
# File 'lib/stripe/resources/product.rb', line 492

def default_price_data
  @default_price_data
end

#descriptionObject

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.



495
496
497
# File 'lib/stripe/resources/product.rb', line 495

def description
  @description
end

#expandObject

Specifies which fields in the response should be expanded.



498
499
500
# File 'lib/stripe/resources/product.rb', line 498

def expand
  @expand
end

#idObject

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.



501
502
503
# File 'lib/stripe/resources/product.rb', line 501

def id
  @id
end

#imagesObject

A list of up to 8 URLs of images for this product, meant to be displayable to the customer.



504
505
506
# File 'lib/stripe/resources/product.rb', line 504

def images
  @images
end

#marketing_featuresObject

A list of up to 15 marketing features for this product. These are displayed in [pricing tables](stripe.com/docs/payments/checkout/pricing-table).



507
508
509
# File 'lib/stripe/resources/product.rb', line 507

def marketing_features
  @marketing_features
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`.



510
511
512
# File 'lib/stripe/resources/product.rb', line 510

def 
  @metadata
end

#nameObject

The product’s name, meant to be displayable to the customer.



513
514
515
# File 'lib/stripe/resources/product.rb', line 513

def name
  @name
end

#package_dimensionsObject

The dimensions of this product for shipping purposes.



516
517
518
# File 'lib/stripe/resources/product.rb', line 516

def package_dimensions
  @package_dimensions
end

#provisioningObject

Provisioning configuration for this product.



519
520
521
# File 'lib/stripe/resources/product.rb', line 519

def provisioning
  @provisioning
end

#shippableObject

Whether this product is shipped (i.e., physical goods).



522
523
524
# File 'lib/stripe/resources/product.rb', line 522

def shippable
  @shippable
end

#statement_descriptorObject

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.


528
529
530
# File 'lib/stripe/resources/product.rb', line 528

def statement_descriptor
  @statement_descriptor
end

#tax_codeObject



531
532
533
# File 'lib/stripe/resources/product.rb', line 531

def tax_code
  @tax_code
end

#typeObject

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.



534
535
536
# File 'lib/stripe/resources/product.rb', line 534

def type
  @type
end

#unit_labelObject

A label that represents units of this product. When set, this will be included in customers’ receipts, invoices, Checkout, and the customer portal.



537
538
539
# File 'lib/stripe/resources/product.rb', line 537

def unit_label
  @unit_label
end

#urlObject

A URL of a publicly-accessible webpage for this product.



540
541
542
# File 'lib/stripe/resources/product.rb', line 540

def url
  @url
end