Module: Revolut::Clients::PaymentDrafts

Included in:
Revolut::Client
Defined in:
lib/revolut/clients/payment_drafts.rb

Overview

Revolut Payment Drafts

Instance Method Summary collapse

Instance Method Details

#create_payment_draft(params = {}) ⇒ Hash

Create payment draft

Parameters:

  • params (Hash) (defaults to: {})

    A customizable set of params.

Returns:

  • (Hash)

    Response from API.

See Also:



34
35
36
# File 'lib/revolut/clients/payment_drafts.rb', line 34

def create_payment_draft(params = {})
  connection.post('payment-drafts', params)
end

#delete_payment_draft(id) ⇒ Hash

Delete payment draft

Parameters:

  • id (UUID)

    Id of transaction.

Returns:

  • (Hash)

    Response from API.

See Also:



45
46
47
# File 'lib/revolut/clients/payment_drafts.rb', line 45

def delete_payment_draft(id)
  connection.delete("payment-drafts/#{id}")
end

#payment_draft(id) ⇒ Hash

Get payment draft

Parameters:

  • id (UUID)

    Id of transaction.

Returns:

  • (Hash)

    Response from API.

See Also:



23
24
25
# File 'lib/revolut/clients/payment_drafts.rb', line 23

def payment_draft(id)
  connection.get("payment-drafts/#{id}")
end

#payment_draftsHash

Get payment drafts

Returns:

  • (Hash)

    Response from API.

See Also:



12
13
14
# File 'lib/revolut/clients/payment_drafts.rb', line 12

def payment_drafts
  connection.get('payment-drafts')
end