Class: Stripe::FileLinkService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::FileLinkService
- Defined in:
- lib/stripe/services/file_link_service.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Creates a new file link object.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of file links.
-
#retrieve(link, params = {}, opts = {}) ⇒ Object
Retrieves the file link with the given ID.
-
#update(link, params = {}, opts = {}) ⇒ Object
Updates an existing file link object.
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 a new file link object.
7 8 9 |
# File 'lib/stripe/services/file_link_service.rb', line 7 def create(params = {}, opts = {}) request(method: :post, path: "/v1/file_links", params: params, opts: opts, base_address: :api) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of file links.
12 13 14 |
# File 'lib/stripe/services/file_link_service.rb', line 12 def list(params = {}, opts = {}) request(method: :get, path: "/v1/file_links", params: params, opts: opts, base_address: :api) end |
#retrieve(link, params = {}, opts = {}) ⇒ Object
Retrieves the file link with the given ID.
17 18 19 20 21 22 23 24 25 |
# File 'lib/stripe/services/file_link_service.rb', line 17 def retrieve(link, params = {}, opts = {}) request( method: :get, path: format("/v1/file_links/%<link>s", { link: CGI.escape(link) }), params: params, opts: opts, base_address: :api ) end |
#update(link, params = {}, opts = {}) ⇒ Object
Updates an existing file link object. Expired links can no longer be updated.
28 29 30 31 32 33 34 35 36 |
# File 'lib/stripe/services/file_link_service.rb', line 28 def update(link, params = {}, opts = {}) request( method: :post, path: format("/v1/file_links/%<link>s", { link: CGI.escape(link) }), params: params, opts: opts, base_address: :api ) end |