Module: Bckbn::Transaction

Defined in:
lib/bckbn/resources/transactions/api.rb,
lib/bckbn/resources/transactions/models/card.rb,
lib/bckbn/resources/transactions/models/echeck.rb,
lib/bckbn/resources/transactions/models/payment.rb,
lib/bckbn/resources/transactions/models/requests.rb,
lib/bckbn/resources/transactions/models/responses.rb,
lib/bckbn/resources/transactions/models/billing_address.rb,
lib/bckbn/resources/transactions/models/cardholder_authentication.rb

Defined Under Namespace

Modules: RequestShared, ResponseShared Classes: AuthorizationRequest, AuthorizationResponse, BillingAddress, CaptureRequest, Card, CardholderAuthentication, CreditRequest, Echeck, EcheckCreditRequest, EcheckSaleRequest, EcheckVoidRequest, FraudResult, Payment, SaleRequest, SaleResponse, VoidRequest

Constant Summary collapse

MEMBERS =
%i[
  account_number
  receiver
  sec_code
  description
  transaction_type
  amount
  service_type
  purpose
  client_identifier
].freeze
REQUEST_BASE =
%i[
  id
  report_group
].freeze
AUTHORIZATION_REQUEST_MEMBERS =
[
  *REQUEST_BASE,
  :amount,
  :bill_to_address,
  :cardholder_authentication,
  :card,
  :order_id,
  :order_source,
  :partial
].freeze
ECHECK_SALE_REQUEST_MEMBERS =
[
  *REQUEST_BASE,
  :amount,
  :bill_to_address,
  :echeck,
  :order_id,
  :order_source
].freeze
CAPTURE_REQUEST_MEMBERS =
[*REQUEST_BASE, :litle_txn_id, :partial].freeze
VOID_REQUEST_MEMBERS =
[*REQUEST_BASE, :litle_txn_id].freeze
CREDIT_REQUEST_MEMBERS =
[*REQUEST_BASE, :litle_txn_id, :amount].freeze

Class Method Summary collapse

Class Method Details

.authorization(body, config = {}) ⇒ Object



18
19
20
# File 'lib/bckbn/resources/transactions/api.rb', line 18

def authorization(body, config = {})
  process_transaction(__method__, body, config, AuthorizationRequest, AuthorizationResponse)
end

.capture(body, config = {}) ⇒ Object



22
23
24
# File 'lib/bckbn/resources/transactions/api.rb', line 22

def capture(body, config = {})
  process_transaction(__method__, body, config, CaptureRequest, CaptureResponse)
end

.credit(body, config = {}) ⇒ Object



26
27
28
# File 'lib/bckbn/resources/transactions/api.rb', line 26

def credit(body, config = {})
  process_transaction(__method__, body, config, CreditRequest, CreditResponse)
end

.echeck_credit(body, config = {}) ⇒ Object



38
39
40
# File 'lib/bckbn/resources/transactions/api.rb', line 38

def echeck_credit(body, config = {})
  process_transaction(__method__, body, config, EcheckCreditRequest, EcheckCreditResponse)
end

.echeck_sale(body, config = {}) ⇒ Object



42
43
44
# File 'lib/bckbn/resources/transactions/api.rb', line 42

def echeck_sale(body, config = {})
  process_transaction(__method__, body, config, EcheckSaleRequest, EcheckSaleResponse)
end

.echeck_void(body, config = {}) ⇒ Object



46
47
48
# File 'lib/bckbn/resources/transactions/api.rb', line 46

def echeck_void(body, config = {})
  process_transaction(__method__, body, config, EcheckVoidRequest, EcheckVoidResponse)
end

.sale(body, config = {}) ⇒ Object



30
31
32
# File 'lib/bckbn/resources/transactions/api.rb', line 30

def sale(body, config = {})
  process_transaction(__method__, body, config, SaleRequest, SaleResponse)
end

.void(body, config = {}) ⇒ Object



34
35
36
# File 'lib/bckbn/resources/transactions/api.rb', line 34

def void(body, config = {})
  process_transaction(__method__, body, config, VoidRequest, VoidResponse)
end