Sha256: a5d8373687e70a3efa88aca423478011872d3ab566265289fa4af6a06ad87d69

Contents?: true

Size: 1.27 KB

Versions: 2

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true

module RubyLokaliseApi
  module Rest
    module Orders
      # Returns all orders for the given team
      #
      # @see https://lokalise.co/api2docs/curl/#transition-list-all-orders-get
      # @return [RubyLokaliseApi::Collection::Order<RubyLokaliseApi::Resources::Order>]
      # @param team_id [String]
      # @param params [Hash]
      def orders(team_id, params = {})
        c_r RubyLokaliseApi::Collections::Order, :all, team_id, params
      end

      # Returns a single order for the given team
      #
      # @see https://lokalise.co/api2docs/curl/#transition-retrieve-an-order-get
      # @return [RubyLokaliseApi::Resources::Order]
      # @param team_id [String]
      # @param order_id [String, Integer]
      def order(team_id, order_id)
        c_r RubyLokaliseApi::Resources::Order, :find, [team_id, order_id]
      end

      # Creates an order for the given team
      #
      # @see https://lokalise.co/api2docs/curl/#transition-create-an-order-post
      # @return [RubyLokaliseApi::Resources::Order]
      # @param team_id [String]
      # @param params [Hash]
      def create_order(team_id, params)
        c_r RubyLokaliseApi::Resources::Order, :create, team_id, params
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-lokalise-api-6.1.0 lib/ruby_lokalise_api/rest/orders.rb
ruby-lokalise-api-6.0.0 lib/ruby_lokalise_api/rest/orders.rb