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.

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from CryptomateApi::Base

Instance 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.)



35
36
37
# File 'lib/cryptomate_api/management/configuration.rb', line 35

def delete_payment_destination(blockchain)
  self.class.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.)



16
17
18
# File 'lib/cryptomate_api/management/configuration.rb', line 16

def get_payment_destination(blockchain)
  self.class.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.)



26
27
28
# File 'lib/cryptomate_api/management/configuration.rb', line 26

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