Module: WechatPayment::Concern::User
- Defined in:
- lib/wechat_payment/concern/user.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/wechat_payment/concern/user.rb', line 6 def self.included(base) base.class_eval do attr_accessor :spbill_create_ip has_many :payment_orders, as: :customer, class_name: "WechatPayment::PaymentOrder" has_many :refund_orders, as: :customer, class_name: "WechatPayment::RefundOrder" alias me itself end end |
Instance Method Details
#buy(goods, with_info = {}) ⇒ Object
17 18 19 |
# File 'lib/wechat_payment/concern/user.rb', line 17 def buy(goods, with_info = {}) goods.sell_to(me, with_info) end |