Class: Stripe::PlanCreateParams::Product

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/plan_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(active: nil, id: nil, metadata: nil, name: nil, statement_descriptor: nil, tax_code: nil, tax_details: nil, unit_label: nil) ⇒ Product

Returns a new instance of Product.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/stripe/params/plan_create_params.rb', line 37

def initialize(
  active: nil,
  id: nil,
  metadata: nil,
  name: nil,
  statement_descriptor: nil,
  tax_code: nil,
  tax_details: nil,
  unit_label: nil
)
  @active = active
  @id = id
  @metadata = 
  @name = name
  @statement_descriptor = statement_descriptor
  @tax_code = tax_code
  @tax_details = tax_details
  @unit_label = unit_label
end

Instance Attribute Details

#activeObject

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



19
20
21
# File 'lib/stripe/params/plan_create_params.rb', line 19

def active
  @active
end

#idObject

The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.



21
22
23
# File 'lib/stripe/params/plan_create_params.rb', line 21

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



23
24
25
# File 'lib/stripe/params/plan_create_params.rb', line 23

def 
  @metadata
end

#nameObject

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



25
26
27
# File 'lib/stripe/params/plan_create_params.rb', line 25

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



29
30
31
# File 'lib/stripe/params/plan_create_params.rb', line 29

def statement_descriptor
  @statement_descriptor
end

#tax_codeObject



31
32
33
# File 'lib/stripe/params/plan_create_params.rb', line 31

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.



33
34
35
# File 'lib/stripe/params/plan_create_params.rb', line 33

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.



35
36
37
# File 'lib/stripe/params/plan_create_params.rb', line 35

def unit_label
  @unit_label
end