module BWAPI::Client::Client::SubClients

Subclients module for client/subclient endpoints

Public Instance Methods

client_sub_clients(client_id, opts = {}) click to toggle source

Get all sub clients

@param client_id [Integer] Id of the client @param opts [Hash] options hash of parameters @option opts [Integer] page Page of projects to retrieve @option opts [Integer] pageSize Results per page of results @return [Hash] All sub clients for client

# File lib/bwapi/client/client/sub_clients.rb, line 13
def client_sub_clients(client_id, opts = {})
  get "/client/#{client_id}/subclients", opts
end
create_client_sub_client(client_id, opts = {}) click to toggle source

Create new subclient

@param client_id [Integer] Id of the client @param opts [Hash] options hash of parameters @option opts [Date] startDate Start date of the client @option opts [String] contactTitle Contact title of the client @option opts [String] address1 Address line one of the client @option opts [String] address2 Address line two of the client @option opts [String] address3 Address line three of the client @option opts [String] pricingModel Pricing model of the client @option opts [Integer] mentionArchiveSize Mention archive size for the client @option opts [Integer] id Id of the sub client @option opts [Integer] parentId Parent id of the sub client @option opts [Integer] maxUsers Maxiumum number of users for the client @option opts [Boolean] isLegacy Legacy status of the client @option opts [String] name Name of the client @option opts [String] contactTelephone Telephone number of the client @option opts [Integer] priceStructureId Id of the price structure for client @option opts [Hash] tags Tags for the client @option opts [String] website The website for the client @option opts [String] contactEmail The contact email for the client @option opts [Date] expiryDate The expiry date for the client @option opts [String] theme The theme of the client @option opts [Integer] priceStructureLineId The level of the price structure for the client @option opts [Integer] mentionBasedPricingMatrixLevel The amount of mentions allowed @option opts [String] postcode The postcode of the client @option opts [String] country The country of the client @option opts [String] contactName The contact name of the client @option opts [Integer] maximumSubscribedBrands The maximum subscribed brands for the client @option opts [String] contactMobile The mobile number for the client @return [Hash] New sub client

# File lib/bwapi/client/client/sub_clients.rb, line 57
def create_client_sub_client(client_id, opts = {})
  post "/client/#{client_id}/subclients", opts
end
delete_client_sub_client(client_id, sub_client_id) click to toggle source

Delete specific sub client of client

@param client_id [Integer] Id of the client @param sub_client_id [Integer] Id of the sub client @return [Hash] Specific sub client for client

# File lib/bwapi/client/client/sub_clients.rb, line 102
def delete_client_sub_client(client_id, sub_client_id)
  delete "/client/#{client_id}/subclients/#{sub_client_id}"
end
get_client_sub_client(client_id, sub_client_id) click to toggle source

Get specific sub client of client

@param client_id [Integer] Id of the client @param sub_client_id [Integer] Id of the sub client @return [Hash] Specific sub client for client

# File lib/bwapi/client/client/sub_clients.rb, line 22
def get_client_sub_client(client_id, sub_client_id)
  get "/client/#{client_id}/subclients/#{sub_client_id}"
end
update_client_sub_client(client_id, sub_client_id, opts = {}) click to toggle source

Update new subclient

@param client_id [Integer] Id of the client @param sub_client_id [Integer] Id of the sub client @param opts [Hash] options hash of parameters @option opts [Date] startDate Start date of the client @option opts [String] contactTitle Contact title of the client @option opts [String] address1 Address line one of the client @option opts [String] address2 Address line two of the client @option opts [String] address3 Address line three of the client @option opts [String] pricingModel Pricing model of the client @option opts [Integer] mentionArchiveSize Mention archive size for the client @option opts [Integer] id Id of the sub client @option opts [Integer] parentId Parent id of the sub client @option opts [Integer] maxUsers Maxiumum number of users for the client @option opts [Boolean] isLegacy Legacy status of the client @option opts [String] name Name of the client @option opts [String] contactTelephone Telephone number of the client @option opts [Integer] priceStructureId Id of the price structure for client @option opts [Hash] tags Tags for the client @option opts [String] website The website for the client @option opts [String] contactEmail The contact email for the client @option opts [Date] expiryDate The expiry date for the client @option opts [String] theme The theme of the client @option opts [Integer] priceStructureLineId The level of the price structure for the client @option opts [Integer] mentionBasedPricingMatrixLevel The amount of mentions allowed @option opts [String] postcode The postcode of the client @option opts [String] country The country of the client @option opts [String] contactName The contact name of the client @option opts [Integer] maximumSubscribedBrands The maximum subscribed brands for the client @option opts [String] contactMobile The mobile number for the client @return [Hash] Edited sub client

# File lib/bwapi/client/client/sub_clients.rb, line 93
def update_client_sub_client(client_id, sub_client_id, opts = {})
  put "/client/#{client_id}/subclients/#{sub_client_id}", opts
end