Class: Moneybookers::Signature::Status

Inherits:
Base
  • Object
show all
Defined in:
lib/moneybookers/signature/status.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#merchant_id, #secret_word_md5, #transaction_id

Instance Method Summary collapse

Methods inherited from Base

#match?, #to_s

Constructor Details

#initialize(params = {}) ⇒ Status

Returns a new instance of Status.



5
6
7
8
9
10
# File 'lib/moneybookers/signature/status.rb', line 5

def initialize(params={})
  super
  @mb_amount = params[:mb_amount] || raise(ArgumentError, "No mb_amount given")
  @mb_currency = params[:mb_currency] || raise(ArgumentError, "No mb_currency given")
  @status = params[:status] || raise(ArgumentError, "No status given")
end

Instance Attribute Details

#mb_amountObject

Returns the value of attribute mb_amount.



3
4
5
# File 'lib/moneybookers/signature/status.rb', line 3

def mb_amount
  @mb_amount
end

#mb_currencyObject

Returns the value of attribute mb_currency.



3
4
5
# File 'lib/moneybookers/signature/status.rb', line 3

def mb_currency
  @mb_currency
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/moneybookers/signature/status.rb', line 3

def status
  @status
end

Instance Method Details

#paramsObject



12
13
14
# File 'lib/moneybookers/signature/status.rb', line 12

def params
  [merchant_id.to_s, transaction_id.to_s, secret_word_md5.upcase, mb_amount.to_s, mb_currency.to_s, status.to_s]
end