Class: Paygate::Member
- Inherits:
-
Object
- Object
- Paygate::Member
- Defined in:
- lib/paygate/member.rb
Instance Attribute Summary collapse
-
#mid ⇒ Object
readonly
Returns the value of attribute mid.
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
Instance Method Summary collapse
-
#initialize(mid, secret) ⇒ Member
constructor
A new instance of Member.
- #profile_pay(profile_no, currency, amount) ⇒ Object
- #refund_transaction(txn_id, options = {}) ⇒ Object
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
#mid ⇒ Object (readonly)
Returns the value of attribute mid.
5 6 7 |
# File 'lib/paygate/member.rb', line 5 def mid @mid end |
#secret ⇒ Object (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, = {}) txn = Transaction.new(txn_id) txn.member = self txn.refund() end |