Class: Payments::Transaction

Inherits:
Object
  • Object
show all
Defined in:
lib/payments_pl/transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Transaction

Returns a new instance of Transaction.



8
9
10
11
12
13
14
# File 'lib/payments_pl/transaction.rb', line 8

def initialize(options)
  options.stringify_keys!

  options.each do |k, v|
    send("#{k}=", v)
  end
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def amount
  @amount
end

#cityObject

Returns the value of attribute city.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def city
  @city
end

#client_ipObject

Returns the value of attribute client_ip.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def client_ip
  @client_ip
end

#countryObject

Returns the value of attribute country.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def country
  @country
end

#descObject

Returns the value of attribute desc.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def desc
  @desc
end

#desc2Object

Returns the value of attribute desc2.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def desc2
  @desc2
end

#emailObject

Returns the value of attribute email.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def email
  @email
end

#first_nameObject

Returns the value of attribute first_name.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def first_name
  @first_name
end

#jsObject

Returns the value of attribute js.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def js
  @js
end

#languageObject

Returns the value of attribute language.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def language
  @language
end

#last_nameObject

Returns the value of attribute last_name.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def last_name
  @last_name
end

#order_idObject

Returns the value of attribute order_id.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def order_id
  @order_id
end

#pay_typeObject

Returns the value of attribute pay_type.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def pay_type
  @pay_type
end

#payback_loginObject

Returns the value of attribute payback_login.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def 
  @payback_login
end

#phoneObject

Returns the value of attribute phone.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def phone
  @phone
end

#pos_auth_keyObject

Returns the value of attribute pos_auth_key.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def pos_auth_key
  @pos_auth_key
end

#pos_idObject

Returns the value of attribute pos_id.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def pos_id
  @pos_id
end

#post_codeObject

Returns the value of attribute post_code.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def post_code
  @post_code
end

#session_idObject

Returns the value of attribute session_id.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def session_id
  @session_id
end

#sigObject

Returns the value of attribute sig.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def sig
  @sig
end

#streetObject

Returns the value of attribute street.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def street
  @street
end

#street_anObject

Returns the value of attribute street_an.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def street_an
  @street_an
end

#street_hnObject

Returns the value of attribute street_hn.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def street_hn
  @street_hn
end

#trs_descObject

Returns the value of attribute trs_desc.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def trs_desc
  @trs_desc
end

#tsObject

Returns the value of attribute ts.



3
4
5
# File 'lib/payments_pl/transaction.rb', line 3

def ts
  @ts
end

Instance Method Details

#new_urlString

Returns url for new payment, used in payment form

Returns:

  • (String)

    new payment url



24
25
26
# File 'lib/payments_pl/transaction.rb', line 24

def new_url
  pos.new_transaction_url
end

#posObject

Returns Pos object for current transaction

Returns:

  • (Object)

    Pos object



18
19
20
# File 'lib/payments_pl/transaction.rb', line 18

def pos
  Payments[pos_id]
end