Sha256: d9b0a44639806f8c0c8f68f91b41045d1020fca79a04412c6c5640def86dce4b

Contents?: true

Size: 936 Bytes

Versions: 6

Compression:

Stored size: 936 Bytes

Contents

module SynapsePay
  class WireEndpoint < APIEndpoint
    
    def all_incoming(params={}, headers={})
      method = APIMethod.new(:post, "/wirein/show", params, headers, self)
      json = @client.execute(method)
      APIList.new(:Wire, json[:wires], method, @client)
    end

    def all_outgoing(params={}, headers={})
      method = APIMethod.new(:post, "/wireout/show", params, headers, self)
      json = @client.execute(method)
      APIList.new(:Wire, json[:wires], method, @client)
    end

    def create_incoming(params={}, headers={})
      method = APIMethod.new(:post, "/wirein/add", params, headers, self)
      json = @client.execute(method)
      Wire.new(json[:wire], method, @client)
    end

    def create_outgoing(params={}, headers={})
      method = APIMethod.new(:post, "/wireout/add", params, headers, self)
      json = @client.execute(method)
      Wire.new(json[:wire], method, @client)
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
synapse_pay-0.0.8 lib/synapse_pay/endpoints/wire_endpoint.rb
synapse_pay-0.0.7 lib/synapse_pay/endpoints/wire_endpoint.rb
synapse_pay-0.0.6 lib/synapse_pay/endpoints/wire_endpoint.rb
synapse_pay-0.0.4 lib/synapse_pay/endpoints/wire_endpoint.rb
synapse_pay-0.0.3 lib/synapse_pay/endpoints/wire_endpoint.rb
synapse_pay-0.0.1 lib/synapse_pay/endpoints/wire_endpoint.rb