Module: PaypalAPI::CatalogProducts::APIs
- Included in:
- PaypalAPI::CatalogProducts, PaypalAPI::CatalogProducts
- Defined in:
- lib/paypal-api/api_collections/catalog_products.rb
Overview
Common methods for PaypalAPI::CatalogProducts class and client.catalog_products instance
Instance Method Summary collapse
-
#create(query: nil, body: nil, headers: nil) ⇒ Response
Create product.
-
#list(query: nil, body: nil, headers: nil) ⇒ Response
List products.
-
#show(product_id, query: nil, body: nil, headers: nil) ⇒ Response
Show product details.
-
#update(product_id, query: nil, body: nil, headers: nil) ⇒ Response
Update product.
Instance Method Details
#create(query: nil, body: nil, headers: nil) ⇒ Response
Create product
27 28 29 |
# File 'lib/paypal-api/api_collections/catalog_products.rb', line 27 def create(query: nil, body: nil, headers: nil) client.post("/v1/catalogs/products", query: query, body: body, headers: headers) end |
#list(query: nil, body: nil, headers: nil) ⇒ Response
List products
38 39 40 |
# File 'lib/paypal-api/api_collections/catalog_products.rb', line 38 def list(query: nil, body: nil, headers: nil) client.get("/v1/catalogs/products", query: query, body: body, headers: headers) end |
#show(product_id, query: nil, body: nil, headers: nil) ⇒ Response
Show product details
50 51 52 |
# File 'lib/paypal-api/api_collections/catalog_products.rb', line 50 def show(product_id, query: nil, body: nil, headers: nil) client.get("/v1/catalogs/products/#{encode(product_id)}", query: query, body: body, headers: headers) end |
#update(product_id, query: nil, body: nil, headers: nil) ⇒ Response
Update product
62 63 64 |
# File 'lib/paypal-api/api_collections/catalog_products.rb', line 62 def update(product_id, query: nil, body: nil, headers: nil) client.patch("/v1/catalogs/products/#{encode(product_id)}", query: query, body: body, headers: headers) end |