Class: Stripe::Price
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Price
- Extended by:
- APIOperations::Create, APIOperations::List, APIOperations::Search
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/price.rb
Overview
Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. [Products](stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single “gold” product that has prices for $10/month, $100/year, and €9 once.
Related guides: [Set up a subscription](stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](stripe.com/docs/billing/invoices/create), and more about [products and prices](stripe.com/docs/products-prices/overview).
Constant Summary collapse
- OBJECT_NAME =
"price"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary
Attributes inherited from APIResource
Class Method Summary collapse
- .search(params = {}, opts = {}) ⇒ Object
- .search_auto_paging_each(params = {}, opts = {}, &blk) ⇒ Object
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Search
Methods included from APIOperations::Save
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Class Method Details
.search(params = {}, opts = {}) ⇒ Object
19 20 21 |
# File 'lib/stripe/resources/price.rb', line 19 def self.search(params = {}, opts = {}) _search("/v1/prices/search", params, opts) end |
.search_auto_paging_each(params = {}, opts = {}, &blk) ⇒ Object
23 24 25 |
# File 'lib/stripe/resources/price.rb', line 23 def self.search_auto_paging_each(params = {}, opts = {}, &blk) search(params, opts).auto_paging_each(&blk) end |