Class: Suzuri::Material
- Inherits:
-
Object
- Object
- Suzuri::Material
- Defined in:
- lib/suzuri_client.rb
Overview
is a material for create Product. Material is generated from image file uploaded by User”, “ja”=>“Material(素材)は、Userがアップロードした画像によって生成される、Product(商品)を作るための素材です。ひとつのMaterialからは、Item一種類につき一つずつのProductを作ることができます。Materialから作ることのできる商品の種類は、**Item List API** を使って取得することができます。”
Instance Method Summary collapse
-
#create(body) ⇒ Object
Material & Products by from image”, “ja”=>“画像からMaterialとProductを作ります。**レートリミットが設けてあります。**”.
-
#delete(material_id) ⇒ Object
Material”, “ja”=>“Materialを削除します。紐付いたProductsもすべて削除されます。成功した時は204を返します。”.
-
#initialize(client) ⇒ Material
constructor
A new instance of Material.
-
#update(material_id, body) ⇒ Object
Material information”, “ja”=>“Material及びProductの情報を更新します。Productsパラメータを指定した場合、このMaterialと指定したitemIdから成るProductがすでに存在する場合はProductの更新操作となり、存在しない場合はProductの作成操作となります。**レートリミットが設けてあります**”.
Constructor Details
#initialize(client) ⇒ Material
Returns a new instance of Material.
289 290 291 |
# File 'lib/suzuri_client.rb', line 289 def initialize(client) @client = client end |
Instance Method Details
#create(body) ⇒ Object
Material & Products by from image”, “ja”=>“画像からMaterialとProductを作ります。**レートリミットが設けてあります。**”
296 297 298 |
# File 'lib/suzuri_client.rb', line 296 def create(body) @client.material.create(body) end |
#delete(material_id) ⇒ Object
Material”, “ja”=>“Materialを削除します。紐付いたProductsもすべて削除されます。成功した時は204を返します。”
311 312 313 |
# File 'lib/suzuri_client.rb', line 311 def delete(material_id) @client.material.delete(material_id) end |
#update(material_id, body) ⇒ Object
Material information”, “ja”=>“Material及びProductの情報を更新します。Productsパラメータを指定した場合、このMaterialと指定したitemIdから成るProductがすでに存在する場合はProductの更新操作となり、存在しない場合はProductの作成操作となります。**レートリミットが設けてあります**”
304 305 306 |
# File 'lib/suzuri_client.rb', line 304 def update(material_id, body) @client.material.update(material_id, body) end |