Module: StrawberryAPI::Client::StatusFlags

Included in:
StrawberryAPI::Client
Defined in:
lib/strawberry_api/client/status_flags.rb

Instance Method Summary collapse

Instance Method Details

#status_flag(id:) ⇒ StrawberryAPI::StatusFlag

Fetches a status flag

Parameters:

  • id (Integer)

    Id of the status flag to retrieve

Returns:



20
21
22
23
# File 'lib/strawberry_api/client/status_flags.rb', line 20

def status_flag(id:)
  data = get("/status_flags/#{id}").parse['status_flag']
  data.nil? ? nil : StatusFlag.new(data)
end

#status_flagsArray<StrawberryAPI::StatusFlag>

Fetches all status flags

Returns:



10
11
12
# File 'lib/strawberry_api/client/status_flags.rb', line 10

def status_flags
  get("/status_flags").parse['array']
end