Class: ChinaPay::Alipay::Merchant

Inherits:
Object
  • Object
show all
Defined in:
lib/china_pay/alipay.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(partner, key) ⇒ Merchant

Returns a new instance of Merchant.



152
153
154
155
# File 'lib/china_pay/alipay.rb', line 152

def initialize(partner, key)
  @partner = partner
  @key = key
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



150
151
152
# File 'lib/china_pay/alipay.rb', line 150

def key
  @key
end

#partnerObject

Returns the value of attribute partner.



150
151
152
# File 'lib/china_pay/alipay.rb', line 150

def partner
  @partner
end

Instance Method Details

#create_order(order_id, subject, description) ⇒ Object



157
158
159
160
161
# File 'lib/china_pay/alipay.rb', line 157

def create_order(order_id, subject, description)
  order = Order.new(order_id, subject, description)
  order.merchant = self
  order
end