Class: Stripe::PriceCreateParams::ProductData
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::PriceCreateParams::ProductData
- Defined in:
- lib/stripe/params/price_create_params.rb
Defined Under Namespace
Classes: TaxDetails
Instance Attribute Summary collapse
-
#active ⇒ Object
Whether the product is currently available for purchase.
-
#id ⇒ Object
The identifier for the product.
-
#metadata ⇒ Object
Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object.
-
#name ⇒ Object
The product’s name, meant to be displayable to the customer.
-
#statement_descriptor ⇒ Object
An arbitrary string to be displayed on your customer’s credit card or bank statement.
-
#tax_code ⇒ Object
A [tax code](docs.stripe.com/tax/tax-categories) ID.
-
#tax_details ⇒ Object
Tax details for this product, including the [tax code](/tax/tax-codes) and an optional performance location.
-
#unit_label ⇒ Object
A label that represents units of this product.
Instance Method Summary collapse
-
#initialize(active: nil, id: nil, metadata: nil, name: nil, statement_descriptor: nil, tax_code: nil, tax_details: nil, unit_label: nil) ⇒ ProductData
constructor
A new instance of ProductData.
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) ⇒ ProductData
Returns a new instance of ProductData.
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/stripe/params/price_create_params.rb', line 146 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
#active ⇒ Object
Whether the product is currently available for purchase. Defaults to ‘true`.
128 129 130 |
# File 'lib/stripe/params/price_create_params.rb', line 128 def active @active end |
#id ⇒ Object
The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
130 131 132 |
# File 'lib/stripe/params/price_create_params.rb', line 130 def id @id end |
#metadata ⇒ Object
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`.
132 133 134 |
# File 'lib/stripe/params/price_create_params.rb', line 132 def @metadata end |
#name ⇒ Object
The product’s name, meant to be displayable to the customer.
134 135 136 |
# File 'lib/stripe/params/price_create_params.rb', line 134 def name @name end |
#statement_descriptor ⇒ Object
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.
138 139 140 |
# File 'lib/stripe/params/price_create_params.rb', line 138 def statement_descriptor @statement_descriptor end |
#tax_code ⇒ Object
A [tax code](docs.stripe.com/tax/tax-categories) ID.
140 141 142 |
# File 'lib/stripe/params/price_create_params.rb', line 140 def tax_code @tax_code end |
#tax_details ⇒ Object
Tax details for this product, including the [tax code](/tax/tax-codes) and an optional performance location.
142 143 144 |
# File 'lib/stripe/params/price_create_params.rb', line 142 def tax_details @tax_details end |
#unit_label ⇒ Object
A label that represents units of this product. When set, this will be included in customers’ receipts, invoices, Checkout, and the customer portal.
144 145 146 |
# File 'lib/stripe/params/price_create_params.rb', line 144 def unit_label @unit_label end |