Class: Stripe::OrderService::UpdateParams::LineItem::ProductData

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/order_service.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.



1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
# File 'lib/stripe/services/order_service.rb', line 1428

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.



1400
1401
1402
# File 'lib/stripe/services/order_service.rb', line 1400

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.



1405
1406
1407
# File 'lib/stripe/services/order_service.rb', line 1405

def id
  @id
end

#imagesObject

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



1408
1409
1410
# File 'lib/stripe/services/order_service.rb', line 1408

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



1411
1412
1413
# File 'lib/stripe/services/order_service.rb', line 1411

def 
  @metadata
end

#nameObject

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



1414
1415
1416
# File 'lib/stripe/services/order_service.rb', line 1414

def name
  @name
end

#package_dimensionsObject

The dimensions of this product for shipping purposes.



1417
1418
1419
# File 'lib/stripe/services/order_service.rb', line 1417

def package_dimensions
  @package_dimensions
end

#shippableObject

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



1420
1421
1422
# File 'lib/stripe/services/order_service.rb', line 1420

def shippable
  @shippable
end

#tax_codeObject



1423
1424
1425
# File 'lib/stripe/services/order_service.rb', line 1423

def tax_code
  @tax_code
end

#urlObject

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



1426
1427
1428
# File 'lib/stripe/services/order_service.rb', line 1426

def url
  @url
end