Module: Justifi::Checkout

Defined in:
lib/justifi/checkout.rb

Class Method Summary collapse

Class Method Details

.complete(checkout_id:, params: {}, headers: {}, idempotency_key: nil, sub_account_id: nil) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/justifi/checkout.rb', line 28

def complete(checkout_id:, params: {}, headers: {}, idempotency_key: nil, sub_account_id: nil)
  headers[:sub_account] =  if 

  JustifiOperations.idempotently_request("/v1/checkouts/#{checkout_id}/complete",
    method: :post,
    params: params,
    headers: headers,
    idempotency_key: idempotency_key)
end

.create(params: {}, headers: {}, sub_account_id: nil) ⇒ Object



22
23
24
25
26
# File 'lib/justifi/checkout.rb', line 22

def create(params: {}, headers: {}, sub_account_id: nil)
  headers[:sub_account] =  if 

  JustifiOperations.execute_post_request("/v1/checkouts", params, headers)
end

.get(checkout_id:, headers: {}) ⇒ Object



12
13
14
15
16
# File 'lib/justifi/checkout.rb', line 12

def get(checkout_id:, headers: {})
  JustifiOperations.execute_get_request("/v1/checkouts/#{checkout_id}",
    {},
    headers)
end

.list(params: {}, headers: {}, sub_account_id: nil) ⇒ Object



6
7
8
9
10
# File 'lib/justifi/checkout.rb', line 6

def list(params: {}, headers: {}, sub_account_id: nil)
  headers[:sub_account] =  if 

  JustifiOperations.execute_get_request("/v1/checkouts", params, headers)
end

.update(checkout_id:, params: {}, headers: {}, idempotency_key: nil) ⇒ Object



18
19
20
# File 'lib/justifi/checkout.rb', line 18

def update(checkout_id:, params: {}, headers: {}, idempotency_key: nil)
  JustifiOperations.execute_patch_request("/v1/checkouts/#{checkout_id}", params, headers)
end