class WellsFargo::Endpoints::Wires

Constants

SCOPE

Public Instance Methods

check_status(payment_id) click to toggle source
# File lib/wells_fargo/endpoints/wires.rb, line 16
def check_status(payment_id)
  client.execute(
    :get, "wires/v1/payments/#{payment_id}",
    headers: headers,
    query: { detail: :no }
  )
end
create_payment(payload) click to toggle source
# File lib/wells_fargo/endpoints/wires.rb, line 8
def create_payment(payload)
  client.execute(
    :post, 'wires/v1/payments',
    headers: headers.merge('Content-Type' => 'application/json'),
    body: payload
  )
end

Private Instance Methods

headers() click to toggle source
# File lib/wells_fargo/endpoints/wires.rb, line 26
def headers
  {
    'Authorization' => "Bearer #{client.token.generate(SCOPE)}",
    'client-request-id' => SecureRandom.uuid,
    'gateway-entity-id' => client.credentials[:gateway_entity_id]
  }
end