Class: Bootpay::Commerce::InvoiceModule
- Inherits:
-
Object
- Object
- Bootpay::Commerce::InvoiceModule
- Defined in:
- lib/bootpay/commerce/invoice.rb
Instance Method Summary collapse
-
#create(invoice) ⇒ Object
청구서 생성.
-
#detail(invoice_id) ⇒ Object
청구서 상세 조회.
-
#initialize(bootpay) ⇒ InvoiceModule
constructor
A new instance of InvoiceModule.
-
#list(params = {}) ⇒ Object
청구서 목록 조회.
-
#notify(invoice_id, send_types) ⇒ Object
청구서 알림 발송.
Constructor Details
#initialize(bootpay) ⇒ InvoiceModule
Returns a new instance of InvoiceModule.
8 9 10 |
# File 'lib/bootpay/commerce/invoice.rb', line 8 def initialize(bootpay) @bootpay = bootpay end |
Instance Method Details
#create(invoice) ⇒ Object
청구서 생성
24 25 26 |
# File 'lib/bootpay/commerce/invoice.rb', line 24 def create(invoice) @bootpay.post('invoices', invoice) end |
#detail(invoice_id) ⇒ Object
청구서 상세 조회
34 35 36 |
# File 'lib/bootpay/commerce/invoice.rb', line 34 def detail(invoice_id) @bootpay.get("invoices/#{invoice_id}") end |
#list(params = {}) ⇒ Object
청구서 목록 조회
13 14 15 16 17 18 19 20 21 |
# File 'lib/bootpay/commerce/invoice.rb', line 13 def list(params = {}) query_params = {} query_params[:page] = params[:page] unless params[:page].nil? query_params[:limit] = params[:limit] unless params[:limit].nil? query_params[:keyword] = params[:keyword] if params[:keyword] query = build_query(query_params) @bootpay.get("invoices#{query}") end |
#notify(invoice_id, send_types) ⇒ Object
청구서 알림 발송
29 30 31 |
# File 'lib/bootpay/commerce/invoice.rb', line 29 def notify(invoice_id, send_types) @bootpay.post("invoices/#{invoice_id}/notify", { send_types: send_types }) end |