Module: BuckarooClient
- Defined in:
- lib/buckaroo_client.rb,
lib/buckaroo_client/gateway.rb,
lib/buckaroo_client/service.rb,
lib/buckaroo_client/version.rb,
lib/buckaroo_client/gateway/nvp.rb,
lib/buckaroo_client/transaction.rb,
lib/buckaroo_client/gateway/batch.rb,
lib/buckaroo_client/gateway/nvp/response.rb,
lib/buckaroo_client/gateway/nvp/signature.rb,
lib/buckaroo_client/service/pay_per_email.rb,
lib/buckaroo_client/service/credit_management.rb,
lib/buckaroo_client/service/invoice_specification.rb,
lib/buckaroo_client/gateway/nvp/invoice_info_response.rb
Defined Under Namespace
Modules: Gateway, Service
Classes: Transaction
Constant Summary
collapse
- DEFAULT_TRANSACTION_ATTRIBUTES =
{
websitekey: ENV['BUCKAROO_CLIENT_WEBSITEKEY']
}
- VERSION =
"0.0.3"
Class Method Summary
collapse
Class Method Details
.batch(attributes = {}) ⇒ Object
15
16
17
|
# File 'lib/buckaroo_client.rb', line 15
def self.batch(attributes = {})
Gateway::Batch.new(attributes)
end
|
.gateway ⇒ Object
11
12
13
|
# File 'lib/buckaroo_client.rb', line 11
def self.gateway
Gateway::NVP
end
|
.service(name, attributes = {}) ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/buckaroo_client.rb', line 23
def self.service(name, attributes = {})
case name.to_s
when 'credit_management'
Service::CreditManagement.new(attributes)
when 'invoice_specification'
Service::InvoiceSpecification.new(attributes)
when 'pay_per_email'
Service::PayPerEmail.new(attributes)
else
raise ArgumentError.new("service '#{name}' does not exist")
end
end
|
.transaction(attributes = {}) ⇒ Object