Class: Stripe::Order::UpdateParams::LineItem::ProductData

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/order.rb

Defined Under Namespace

Classes: PackageDimensions

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(description: nil, id: nil, images: nil, metadata: nil, name: nil, package_dimensions: nil, shippable: nil, tax_code: nil, url: nil) ⇒ ProductData

Returns a new instance of ProductData.



1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
# File 'lib/stripe/resources/order.rb', line 1714

def initialize(
  description: nil,
  id: nil,
  images: nil,
  metadata: nil,
  name: nil,
  package_dimensions: nil,
  shippable: nil,
  tax_code: nil,
  url: nil
)
  @description = description
  @id = id
  @images = images
  @metadata = 
  @name = name
  @package_dimensions = package_dimensions
  @shippable = shippable
  @tax_code = tax_code
  @url = url
end

Instance Attribute Details

#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.



1694
1695
1696
# File 'lib/stripe/resources/order.rb', line 1694

def description
  @description
end

#idObject

A unique identifier for this product.

‘product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data` to the same string every time you sell the same product, but don’t re-use the same string for different products.



1698
1699
1700
# File 'lib/stripe/resources/order.rb', line 1698

def id
  @id
end

#imagesObject

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



1700
1701
1702
# File 'lib/stripe/resources/order.rb', line 1700

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



1702
1703
1704
# File 'lib/stripe/resources/order.rb', line 1702

def 
  @metadata
end

#nameObject

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



1704
1705
1706
# File 'lib/stripe/resources/order.rb', line 1704

def name
  @name
end

#package_dimensionsObject

The dimensions of this product for shipping purposes.



1706
1707
1708
# File 'lib/stripe/resources/order.rb', line 1706

def package_dimensions
  @package_dimensions
end

#shippableObject

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



1708
1709
1710
# File 'lib/stripe/resources/order.rb', line 1708

def shippable
  @shippable
end

#tax_codeObject



1710
1711
1712
# File 'lib/stripe/resources/order.rb', line 1710

def tax_code
  @tax_code
end

#urlObject

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



1712
1713
1714
# File 'lib/stripe/resources/order.rb', line 1712

def url
  @url
end