Class: Stripe::Checkout::SessionCreateParams::LineItem::PriceData::ProductData

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/checkout/session_create_params.rb

Defined Under Namespace

Classes: TaxDetails

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil, tax_details: nil, unit_label: nil) ⇒ ProductData

Returns a new instance of ProductData.



498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'lib/stripe/params/checkout/session_create_params.rb', line 498

def initialize(
  description: nil,
  images: nil,
  metadata: nil,
  name: nil,
  tax_code: nil,
  tax_details: nil,
  unit_label: nil
)
  @description = description
  @images = images
  @metadata = 
  @name = name
  @tax_code = tax_code
  @tax_details = tax_details
  @unit_label = unit_label
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.



484
485
486
# File 'lib/stripe/params/checkout/session_create_params.rb', line 484

def description
  @description
end

#imagesObject

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



486
487
488
# File 'lib/stripe/params/checkout/session_create_params.rb', line 486

def images
  @images
end

#metadataObject

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



488
489
490
# File 'lib/stripe/params/checkout/session_create_params.rb', line 488

def 
  @metadata
end

#nameObject

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



490
491
492
# File 'lib/stripe/params/checkout/session_create_params.rb', line 490

def name
  @name
end

#tax_codeObject



492
493
494
# File 'lib/stripe/params/checkout/session_create_params.rb', line 492

def tax_code
  @tax_code
end

#tax_detailsObject

Tax details for this product, including the [tax code](/tax/tax-codes) and an optional performance location.



494
495
496
# File 'lib/stripe/params/checkout/session_create_params.rb', line 494

def tax_details
  @tax_details
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.



496
497
498
# File 'lib/stripe/params/checkout/session_create_params.rb', line 496

def unit_label
  @unit_label
end