Class: Bootpay::Api
- Inherits:
-
Object
- Object
- Bootpay::Api
- Includes:
- Billing, Cancel, Easy, Escrow, Link, Naverpay, PaymentResource, Reseller, Rest, Submit, Token, Verification
- Defined in:
- lib/api.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/' }.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.
40 41 42 43 44 45 46 47 |
# File 'lib/api.rb', line 40 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 |