Class: Stripe::ProductFeatureService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::ProductFeatureService
- Defined in:
- lib/stripe/services/product_feature_service.rb
Defined Under Namespace
Classes: CreateParams, DeleteParams, ListParams, RetrieveParams
Instance Method Summary collapse
-
#create(product, params = {}, opts = {}) ⇒ Object
Creates a product_feature, which represents a feature attachment to a product.
-
#delete(product, id, params = {}, opts = {}) ⇒ Object
Deletes the feature attachment to a product.
-
#list(product, params = {}, opts = {}) ⇒ Object
Retrieve a list of features for a product.
-
#retrieve(product, id, params = {}, opts = {}) ⇒ Object
Retrieves a product_feature, which represents a feature attachment to a product.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(product, params = {}, opts = {}) ⇒ Object
Creates a product_feature, which represents a feature attachment to a product
48 49 50 51 52 53 54 55 56 |
# File 'lib/stripe/services/product_feature_service.rb', line 48 def create(product, params = {}, opts = {}) request( method: :post, path: format("/v1/products/%<product>s/features", { product: CGI.escape(product) }), params: params, opts: opts, base_address: :api ) end |
#delete(product, id, params = {}, opts = {}) ⇒ Object
Deletes the feature attachment to a product
59 60 61 62 63 64 65 66 67 |
# File 'lib/stripe/services/product_feature_service.rb', line 59 def delete(product, id, params = {}, opts = {}) request( method: :delete, path: format("/v1/products/%<product>s/features/%<id>s", { product: CGI.escape(product), id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#list(product, params = {}, opts = {}) ⇒ Object
Retrieve a list of features for a product
70 71 72 73 74 75 76 77 78 |
# File 'lib/stripe/services/product_feature_service.rb', line 70 def list(product, params = {}, opts = {}) request( method: :get, path: format("/v1/products/%<product>s/features", { product: CGI.escape(product) }), params: params, opts: opts, base_address: :api ) end |
#retrieve(product, id, params = {}, opts = {}) ⇒ Object
Retrieves a product_feature, which represents a feature attachment to a product
81 82 83 84 85 86 87 88 89 |
# File 'lib/stripe/services/product_feature_service.rb', line 81 def retrieve(product, id, params = {}, opts = {}) request( method: :get, path: format("/v1/products/%<product>s/features/%<id>s", { product: CGI.escape(product), id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |