module Revolut::Clients::PaymentDrafts

Revolut Payment Drafts

Public Instance Methods

create_payment_draft(params = {}) click to toggle source

Create payment draft

@see revolutdev.github.io/business-api/#create-payment-draft

@param params [Hash] A customizable set of params.

@return [Hash] Response from API.

# File lib/revolut/clients/payment_drafts.rb, line 34
def create_payment_draft(params = {})
  connection.post('payment-drafts', params)
end
delete_payment_draft(id) click to toggle source

Delete payment draft

@see revolutdev.github.io/business-api/#delete-payment-draft

@param id [UUID] Id of transaction.

@return [Hash] Response from API.

# File lib/revolut/clients/payment_drafts.rb, line 45
def delete_payment_draft(id)
  connection.delete("payment-drafts/#{id}")
end
payment_draft(id) click to toggle source

Get payment draft

@see revolutdev.github.io/business-api/#get-payment-draft-by-id

@param id [UUID] Id of transaction.

@return [Hash] Response from API.

# File lib/revolut/clients/payment_drafts.rb, line 23
def payment_draft(id)
  connection.get("payment-drafts/#{id}")
end
payment_drafts() click to toggle source

Get payment drafts

@see revolutdev.github.io/business-api/#get-payment-drafts

@return [Hash] Response from API.

# File lib/revolut/clients/payment_drafts.rb, line 12
def payment_drafts
  connection.get('payment-drafts')
end