Class: Dibuk::Request::License

Inherits:
Base
  • Object
show all
Defined in:
lib/dibuk/request/license.rb

Instance Method Summary collapse

Methods inherited from Base

#headers, #method

Constructor Details

#initialize(user, item) ⇒ self

Parameters:



6
7
8
9
# File 'lib/dibuk/request/license.rb', line 6

def initialize(user, item)
  @item = item
  @user = user
end

Instance Method Details

#actionString

Returns:

  • (String)


26
27
28
# File 'lib/dibuk/request/license.rb', line 26

def action
  'buy'
end

#bodyObject



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/dibuk/request/license.rb', line 11

def body
  {
      :book_id => @item.id,
      :user_id => @user.id,
      :user_email => @user.email,
      :user_order => @item.order_id,
      :seller_price => @item.price,
      :payment_channel => @item.payment_id,
      :user_name => @user.name,
      :user_surname => @user.surname,
      :uniq_license_id => @item.unique_id,
  }
end