Class: Greeve::Corporation::Contracts

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/corporation/contracts.rb

Overview

Availabile contracts for a corporation.

Instance Method Summary collapse

Methods inherited from BaseItem

attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s

Methods included from Helpers::AttributeToHash

#to_h

Constructor Details

#initialize(opts = {}) ⇒ Contracts

Returns a new instance of Contracts.

Parameters:

  • opts (Hash) (defaults to: {})

    a customizable set of options

Options Hash (opts):

  • :contract_id (Integer) — default: nil

    ID of a specific contract



37
38
39
40
41
42
43
# File 'lib/greeve/corporation/contracts.rb', line 37

def initialize(opts = {})
  contract_id = opts.delete(:contract_id)

  opts[:query_params] = { "contractID" => contract_id } if contract_id

  super(opts)
end