Module: YandexKassa
- Extended by:
- YandexKassa
- Included in:
- YandexKassa
- Defined in:
- lib/yandex_kassa.rb,
lib/yandex_kassa/api.rb,
lib/yandex_kassa/version.rb,
lib/yandex_kassa/requests.rb,
lib/yandex_kassa/store_card.rb,
lib/yandex_kassa/configuration.rb,
lib/yandex_kassa/request_signer.rb,
lib/yandex_kassa/signed_response_parser.rb
Defined Under Namespace
Modules: Requests
Classes: Api, Configuration, RequestSigner, SignedResponseParser, StoreCard
Constant Summary
collapse
- VERSION =
"0.3.5"
Instance Method Summary
collapse
Instance Method Details
#configuration ⇒ Object
25
26
27
|
# File 'lib/yandex_kassa.rb', line 25
def configuration
@configuration ||= Configuration.new
end
|
21
22
23
|
# File 'lib/yandex_kassa.rb', line 21
def configure(&block)
block.call(configuration)
end
|
#create ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/yandex_kassa.rb', line 13
def create
Api.new(url: configuration.url,
cert_file: configuration.cert_file,
key_file: configuration.key_file,
response_parser: pkcs7_response_parser,
request_signer: request_signer)
end
|
#pkcs7_response_parser ⇒ Object
29
30
31
32
33
|
# File 'lib/yandex_kassa.rb', line 29
def pkcs7_response_parser
@pkcs7_response_parser ||= SignedResponseParser.new(
deposit_cert_file: configuration.deposit_cert_file,
cert_file: configuration.cert_file)
end
|
#request_signer ⇒ Object
35
36
37
|
# File 'lib/yandex_kassa.rb', line 35
def request_signer
@request_signer ||= RequestSigner.new(cert_file: configuration.cert_file, key_file: configuration.key_file)
end
|