Class: Paygate::Member

Inherits:
Object
  • Object
show all
Defined in:
lib/paygate/member.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mid, secret) ⇒ Member

Returns a new instance of Member.



7
8
9
10
# File 'lib/paygate/member.rb', line 7

def initialize(mid, secret)
  @mid = mid
  @secret = secret
end

Instance Attribute Details

#midObject (readonly)

Returns the value of attribute mid.



5
6
7
# File 'lib/paygate/member.rb', line 5

def mid
  @mid
end

#secretObject (readonly)

Returns the value of attribute secret.



5
6
7
# File 'lib/paygate/member.rb', line 5

def secret
  @secret
end

Instance Method Details

#profile_pay(profile_no, currency, amount) ⇒ Object



18
19
20
21
22
# File 'lib/paygate/member.rb', line 18

def profile_pay(profile_no, currency, amount)
  profile = Profile.new(profile_no)
  profile.member = self
  profile.purchase(currency, amount)
end

#refund_transaction(txn_id, options = {}) ⇒ Object



12
13
14
15
16
# File 'lib/paygate/member.rb', line 12

def refund_transaction(txn_id, options = {})
  txn = Transaction.new(txn_id)
  txn.member = self
  txn.refund(options)
end