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

Parameters:

  • arguments (Hash)

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

Returns Item category ID.

Returns:

  • (Integer)

    Item category ID.


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

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

#deletedBoolean

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

Returns:

  • (Boolean)

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


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

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

#descriptionString

Returns Item description.

Returns:

  • (String)

    Item description.


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

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

#main_photo_idInteger

Returns Cover photo ID.

Returns:

  • (Integer)

    Cover photo ID.


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

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

#nameString

Returns Item name.

Returns:

  • (String)

    Item name.


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

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

#owner_idInteger

Returns ID of an item owner community.

Returns:

  • (Integer)

    ID of an item owner community.


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

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

#photo_idsArray

Returns IDs of additional photos.

Returns:

  • (Array)

    IDs of additional photos.


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

Returns Item price.

Returns:

  • (Number)

    Item price.


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

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