Class: Iyzi::PkiBuilders::BasketItem

Inherits:
Iyzi::PkiBuilder show all
Defined in:
lib/iyzi/pki_builders/basket_item.rb

Constant Summary collapse

ATTRIBUTES_ORDER =
%w{
  id
  price
  name
  category1
  category2
  itemType
  subMerchantKey
  subMerchantPrice
}.freeze
TYPE_CAST =
{
  price:            'add_price',
  subMerchantPrice: 'add_price'
}.freeze

Constants inherited from Iyzi::PkiBuilder

Iyzi::PkiBuilder::DEFAULT_ADD_METHOD

Instance Attribute Summary

Attributes inherited from Iyzi::PkiBuilder

#ordered_keys, #params

Instance Method Summary collapse

Methods inherited from Iyzi::PkiBuilder

#add, #add_address, #add_array, #add_basket_items, #add_buyer, #add_date, #add_payment_card, #add_price, #add_store_card, #convert_str, #ordered_params, #parse_date, #prepare_request_string, #request_string

Constructor Details

#initialize(values = {}) ⇒ BasketItem

Returns a new instance of BasketItem.



20
21
22
# File 'lib/iyzi/pki_builders/basket_item.rb', line 20

def initialize(values = {})
  super(values, ATTRIBUTES_ORDER, TYPE_CAST)
end