Sha256: 2fbdf503d372ea7f599e159c0b9647de0d63f1859e060299667a82ab55df90de

Contents?: true

Size: 546 Bytes

Versions: 3

Compression:

Stored size: 546 Bytes

Contents

module StellarClient
  class Client

    include APIClientBase::Client.module(default_opts: :default_opts)
    api_action :send_payment
    api_action :get_toml

    def withdraw(opts = {})
      transfer_host = get_toml.toml["TRANSFER_SERVER"]
      request = WithdrawRequest.new(opts.merge(host: transfer_host))
      raw_response = request.()
      WithdrawResponse.new(raw_response: raw_response)
    end

    attribute :bridge_host, String

    private

    def default_opts
      { host: host, bridge_host: bridge_host }
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stellar_client-0.5.2 lib/stellar_client/client.rb
stellar_client-0.5.1 lib/stellar_client/client.rb
stellar_client-0.5.0 lib/stellar_client/client.rb