Sha256: 5d36064081d8161a4b3cff621fef9040fc911e3bdc73174e62f2afbf54bb5a06

Contents?: true

Size: 414 Bytes

Versions: 4

Compression:

Stored size: 414 Bytes

Contents

module Moip2

  class CustomerApi
    attr_reader :client

    def initialize(client)
      @client = client
    end

    def base_path
      "/v2/customers"
    end

    def show(customer_external_id)
      Resource::Customer.new client, client.get("#{base_path}/#{customer_external_id}")
    end

    def create(customer)
      Resource::Customer.new client, client.post(base_path, customer)
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
moip2-0.1.4 lib/moip2/customer_api.rb
moip2-0.1.3 lib/moip2/customer_api.rb
moip2-0.1.1 lib/moip2/customer_api.rb
moip2-0.1.0 lib/moip2/customer_api.rb