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
49 50 51 52 53 54 55 56 57 |
# File 'lib/stripe/services/product_feature_service.rb', line 49 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
60 61 62 63 64 65 66 67 68 |
# File 'lib/stripe/services/product_feature_service.rb', line 60 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
71 72 73 74 75 76 77 78 79 |
# File 'lib/stripe/services/product_feature_service.rb', line 71 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
82 83 84 85 86 87 88 89 90 |
# File 'lib/stripe/services/product_feature_service.rb', line 82 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 |