Class: Bootpay::Api
- Inherits:
-
Object
- Object
- Bootpay::Api
- Includes:
- Billing, Cancel, Easy, Escrow, Link, Naverpay, PaymentResource, Reseller, Rest, Submit, Token, Verification
- Defined in:
- lib/bootpay.rb
Constant Summary collapse
- API =
{ development: 'https://dev-api.bootpay.co.kr', stage: 'https://stage-api.bootpay.co.kr', production: 'https://api.bootpay.co.kr', ehowlsla: 'https://ehowlsla.bootpay.co.kr/api/v2' }.freeze
Instance Method Summary collapse
-
#initialize(application_id:, private_key:, mode: 'production') ⇒ Api
constructor
A new instance of Api.
Constructor Details
#initialize(application_id:, private_key:, mode: 'production') ⇒ Api
Returns a new instance of Api.
41 42 43 44 45 46 47 48 |
# File 'lib/bootpay.rb', line 41 def initialize(application_id:, private_key:, mode: 'production') @application_id = application_id @private_key = private_key @mode = mode.presence || 'production' @token = nil raise ArgumentError, "개발환경 mode는 development, stage, production 중에서 선택이 가능합니다." if API[@mode.to_sym].blank? end |