Sha256: 85cd138681004fa2c0629cbd051ae48dcc884a6f4fbdb110f531a08ee3fce887
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
# encoding: utf-8 # frozen_string_literal: true module Nimbu module Endpoints class Collections < Endpoint def list(*args, &block) arguments(args) response = get_request("/collections", arguments.params) return response unless block_given? response.each(&block) end alias_method :all, :list def get(*args) arguments(args, required: [:collection_id]) get_request("/collections/#{collection_id}", arguments.params) end alias_method :find, :get def create(*args) arguments(args) post_request("/collections", arguments.params) end def update(*args) arguments(args, required: [:collection_id]) patch_request("/collections/#{collection_id}", arguments.params) end alias_method :edit, :update def delete(*args) arguments(args, required: [:collection_id]) delete_request("/collections/#{collection_id}", arguments.params) end alias_method :remove, :delete end # Products end # Endpoints end # Nimbu
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nimbu-api-0.5.0 | lib/nimbu-api/endpoints/collections.rb |