Class: Stripe::PriceService::CreateParams::ProductData
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::PriceService::CreateParams::ProductData
- Defined in:
- lib/stripe/services/price_service.rb
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](stripe.com/docs/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](stripe.com/docs/tax/tax-categories) ID.
-
#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, unit_label: nil) ⇒ ProductData
constructor
A new instance of ProductData.
Methods inherited from RequestParams
Constructor Details
#initialize(active: nil, id: nil, metadata: nil, name: nil, statement_descriptor: nil, tax_code: nil, unit_label: nil) ⇒ ProductData
Returns a new instance of ProductData.
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/stripe/services/price_service.rb', line 197 def initialize( active: nil, id: nil, metadata: nil, name: nil, statement_descriptor: nil, tax_code: nil, unit_label: nil ) @active = active @id = id @metadata = @name = name @statement_descriptor = statement_descriptor @tax_code = tax_code @unit_label = unit_label end |
Instance Attribute Details
#active ⇒ Object
Whether the product is currently available for purchase. Defaults to ‘true`.
181 182 183 |
# File 'lib/stripe/services/price_service.rb', line 181 def active @active end |
#id ⇒ Object
The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
183 184 185 |
# File 'lib/stripe/services/price_service.rb', line 183 def id @id end |
#metadata ⇒ Object
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`.
185 186 187 |
# File 'lib/stripe/services/price_service.rb', line 185 def @metadata end |
#name ⇒ Object
The product’s name, meant to be displayable to the customer.
187 188 189 |
# File 'lib/stripe/services/price_service.rb', line 187 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.
191 192 193 |
# File 'lib/stripe/services/price_service.rb', line 191 def statement_descriptor @statement_descriptor end |
#tax_code ⇒ Object
A [tax code](stripe.com/docs/tax/tax-categories) ID.
193 194 195 |
# File 'lib/stripe/services/price_service.rb', line 193 def tax_code @tax_code 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.
195 196 197 |
# File 'lib/stripe/services/price_service.rb', line 195 def unit_label @unit_label end |