Class: Stripe::V2::Commerce::ProductCatalog::ImportService

Inherits:
StripeService
  • Object
show all
Defined in:
lib/stripe/services/v2/commerce/product_catalog/import_service.rb

Instance Method Summary collapse

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 ProductCatalogImport.



10
11
12
13
14
15
16
17
18
# File 'lib/stripe/services/v2/commerce/product_catalog/import_service.rb', line 10

def create(params = {}, opts = {})
  request(
    method: :post,
    path: "/v2/commerce/product_catalog/imports",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#list(params = {}, opts = {}) ⇒ Object

Returns a list of ProductCatalogImport objects.



21
22
23
24
25
26
27
28
29
# File 'lib/stripe/services/v2/commerce/product_catalog/import_service.rb', line 21

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v2/commerce/product_catalog/imports",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(id, params = {}, opts = {}) ⇒ Object

Retrieves a ProductCatalogImport by ID.



32
33
34
35
36
37
38
39
40
# File 'lib/stripe/services/v2/commerce/product_catalog/import_service.rb', line 32

def retrieve(id, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v2/commerce/product_catalog/imports/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end