Method: Unit::Payment.create_wire_payment

Defined in:
lib/unit/models/payment/payment.rb

.create_wire_payment(account_id:, amount:, description:, counterparty:, idempotency_key: nil, tags: nil) ⇒ Object

Create a wire payment by calling Unit’s API

Parameters:

  • account_id (String)
  • amount (Integer)
  • description (String)
  • counterparty (WireCounterparty)
  • idempotency_key (String) (defaults to: nil)
    • optional

  • tags (Hash) (defaults to: nil)
    • optional

See Also:



136
137
138
139
# File 'lib/unit/models/payment/payment.rb', line 136

def create_wire_payment(account_id:, amount:, description:, counterparty:, idempotency_key: nil, tags: nil)
  request = Unit::Payment::CreateWirePaymentRequest.new(account_id: , amount: amount, description: description, counterparty: counterparty, idempotency_key: idempotency_key, tags: tags)
  Unit::Resource::PaymentResource.create_payment(request)
end