Class: Coinex::Withdraw

Inherits:
Base
  • Object
show all
Defined in:
lib/coinex/resources/withdraw.rb

Class Method Summary collapse

Methods inherited from Base

build_url

Class Method Details

.create(params:) ⇒ Object

rubocop: disable Metrics/MethodLength, Lint/MissingCopEnableDirective



24
25
26
27
28
29
# File 'lib/coinex/resources/withdraw.rb', line 24

def create(params:)
  data = build_url(params: params, route: '/balance/coin/withdraw', method: 'POST')
  uri = URI(data.first)

  Coinex::Request.request(uri: uri, method: 'POST', signature: data[1], params: params)
end

.delete(params:) ⇒ Object

Params -> p = { coin_withdraw_id: 12345’} Signature for this function -> Coinex::Signature.calculate(params: p)



42
43
44
45
46
47
# File 'lib/coinex/resources/withdraw.rb', line 42

def delete(params:)
  data = build_url(params: params, route: '/balance/coin/withdraw', method: 'DELETE')
  uri = URI(data.first)

  Coinex::Request.request(uri: uri, method: 'DELETE', signature: data[1], params: params)
end

.list(params:) ⇒ Object

Params -> p = { page: 1, limit: 100 } Signature for this function -> Coinex::Signature.calculate(params: p)



63
64
65
66
67
68
# File 'lib/coinex/resources/withdraw.rb', line 63

def list(params:)
  data = build_url(params: params, route: '/balance/coin/withdraw')
  uri = URI(data.first)

  Coinex::Request.request(uri: uri, method: 'GET', signature: data[1])
end