Class: CryptomateApi::Management::Configuration

Inherits:
Base
  • Object
show all
Defined in:
lib/cryptomate_api/management/configuration.rb

Overview

Manage the company configurations from here, like changing the payment destination address for each blockchain.

Class Method Summary collapse

Class Method Details

.delete_payment_destination(blockchain) ⇒ Object

Delete payment destination Deletes the treasury wallet that all the payments will sent after being completed. cryptomate.me/docs/management#delete-payment-destination Response: None

Parameters:

  • blockchain (String)

    (Id of the blockchain.)



37
38
39
# File 'lib/cryptomate_api/management/configuration.rb', line 37

def delete_payment_destination(blockchain)
  delete("/management/configurations/payments/#{blockchain}")
end

.get_payment_destination(blockchain) ⇒ Object

Get payment destination Gets the treasury wallet address for holding the payments received on the selected blockchain. cryptomate.me/docs/management#get-payment-destination Response:

"address": "string",
"blockchain": "string"

Parameters:

  • blockchain (String)

    (Id of the blockchain.)



18
19
20
# File 'lib/cryptomate_api/management/configuration.rb', line 18

def get_payment_destination(blockchain)
  get("/management/configurations/payments/#{blockchain}")
end

.set_payment_destination(address, blockchain) ⇒ Object

Set payment destination Sets the treasury wallet that all the payments will sent after being completed. cryptomate.me/docs/management#set-payment-destination Response: None

Parameters:

  • address (String)

    (Address of the treasury wallet)

  • blockchain (String)

    (Id of the blockchain.)



28
29
30
# File 'lib/cryptomate_api/management/configuration.rb', line 28

def set_payment_destination(address, blockchain)
  post('/management/configurations/payments', body: { address:, blockchain: }.to_json)
end