Class: Io::Flow::V0::Clients::FlowRoles

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ FlowRoles

Returns a new instance of FlowRoles.



6922
6923
6924
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6922

def initialize(client)
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
end

Instance Method Details

#get_organization_and_roles_by_organization(organization) ⇒ Object

List roles in use by this organization.



6927
6928
6929
6930
6931
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6927

def get_organization_and_roles_by_organization(organization)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  r = @client.request("/permission/organization/#{CGI.escape(organization)}/roles").get
  r.map { |x| ::Io::Flow::V0::Models::FlowRole.new(x) }
end