Class: Stripe::Apps::InstallService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::Apps::InstallService
- Defined in:
- lib/stripe/services/apps/install_service.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Creates an app install.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of app installs.
-
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves an app install.
-
#uninstall(id, params = {}, opts = {}) ⇒ Object
Uninstalls an app from the account that installed it.
-
#update(id, params = {}, opts = {}) ⇒ Object
Reauthorizes an app install.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(params = {}, opts = {}) ⇒ Object
Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer or embedding platform acting on a connected account through Stripe-Account installs or reinstalls its app there. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned.
8 9 10 11 12 13 14 15 16 |
# File 'lib/stripe/services/apps/install_service.rb', line 8 def create(params = {}, opts = {}) request( method: :post, path: "/v1/apps/installs", params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of app installs. An app developer or embedding platform filtering by its own app sees the installs across the accounts that installed it; other callers see the installs on their own account. The key selects the environment: a live key lists live installs, a sandbox API key lists the installs on that sandbox, and the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. For existing accounts that still use legacy test mode, a test mode key lists legacy test mode installs.
19 20 21 22 23 24 25 26 27 |
# File 'lib/stripe/services/apps/install_service.rb', line 19 def list(params = {}, opts = {}) request( method: :get, path: "/v1/apps/installs", params: params, opts: opts, base_address: :api ) end |
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves an app install. The installing account, the app's developer (with the keys of the account that owns the app or of the app's managed sandbox), and the embedding platform that created the install can retrieve it.
30 31 32 33 34 35 36 37 38 |
# File 'lib/stripe/services/apps/install_service.rb', line 30 def retrieve(id, params = {}, opts = {}) request( method: :get, path: format("/v1/apps/installs/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#uninstall(id, params = {}, opts = {}) ⇒ Object
Uninstalls an app from the account that installed it.
41 42 43 44 45 46 47 48 49 |
# File 'lib/stripe/services/apps/install_service.rb', line 41 def uninstall(id, params = {}, opts = {}) request( method: :post, path: format("/v1/apps/installs/%<id>s/uninstall", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#update(id, params = {}, opts = {}) ⇒ Object
Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key; app developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. For private apps, the version being installed is the newest completed upload.
52 53 54 55 56 57 58 59 60 |
# File 'lib/stripe/services/apps/install_service.rb', line 52 def update(id, params = {}, opts = {}) request( method: :post, path: format("/v1/apps/installs/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |