Class: Vk::API::Market::Methods::Add

Inherits:
Schema::Method show all
Defined in:
lib/vk/api/market/methods/add.rb

Overview

Ads a new item to the market.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Market::Methods::Add

Options Hash (arguments):

  • :owner_id (Integer)

    ID of an item owner community.

  • :name (String)

    Item name.

  • :description (String)

    Item description.

  • :category_id (Integer)

    Item category ID.

  • :price (Number)

    Item price.

  • :deleted (Boolean)

    Item status ('1' — deleted, '0' — not deleted).

  • :main_photo_id (Integer)

    Cover photo ID.

  • :photo_ids (Array)

    IDs of additional photos.



# File 'lib/vk/api/market/methods/add.rb', line 15


Instance Method Details

#category_idInteger



36
# File 'lib/vk/api/market/methods/add.rb', line 36

attribute :category_id, API::Types::Coercible::Int

#deletedBoolean



40
# File 'lib/vk/api/market/methods/add.rb', line 40

attribute :deleted, API::Types::Form::Bool.optional.default(nil)

#descriptionString



34
# File 'lib/vk/api/market/methods/add.rb', line 34

attribute :description, API::Types::Coercible::String

#main_photo_idInteger



42
# File 'lib/vk/api/market/methods/add.rb', line 42

attribute :main_photo_id, API::Types::Coercible::Int

#nameString



32
# File 'lib/vk/api/market/methods/add.rb', line 32

attribute :name, API::Types::Coercible::String

#owner_idInteger



30
# File 'lib/vk/api/market/methods/add.rb', line 30

attribute :owner_id, API::Types::Coercible::Int

#photo_idsArray



44
# File 'lib/vk/api/market/methods/add.rb', line 44

attribute :photo_ids, API::Types::Coercible::Array.member(API::Types::Coercible::Int).constrained(max_size: 4).optional.default(nil)

#priceNumber



38
# File 'lib/vk/api/market/methods/add.rb', line 38

attribute :price, API::Types::Coercible::Int