Class: Bootpay::Commerce::PointModule
- Inherits:
-
Object
- Object
- Bootpay::Commerce::PointModule
- Defined in:
- lib/bootpay/commerce/point.rb
Instance Method Summary collapse
-
#balance ⇒ Object
적립금 잔액 조회.
-
#initialize(bootpay) ⇒ PointModule
constructor
A new instance of PointModule.
-
#transactions(params = {}) ⇒ Object
적립금 내역 조회.
Constructor Details
#initialize(bootpay) ⇒ PointModule
Returns a new instance of PointModule.
8 9 10 |
# File 'lib/bootpay/commerce/point.rb', line 8 def initialize(bootpay) @bootpay = bootpay end |
Instance Method Details
#balance ⇒ Object
적립금 잔액 조회
13 14 15 |
# File 'lib/bootpay/commerce/point.rb', line 13 def balance @bootpay.get('point/balance') end |
#transactions(params = {}) ⇒ Object
적립금 내역 조회
18 19 20 21 22 23 24 25 26 |
# File 'lib/bootpay/commerce/point.rb', line 18 def transactions(params = {}) query_params = {} query_params[:page] = params[:page] unless params[:page].nil? query_params[:limit] = params[:limit] unless params[:limit].nil? query_params[:transaction_type] = params[:transaction_type] unless params[:transaction_type].nil? query = build_query(query_params) @bootpay.get("point/transactions#{query}") end |