Module: BWAPI::Client::Admin::Clients::SubClients

Included in:
BWAPI::Client::Admin
Defined in:
lib/bwapi/client/admin/sub_clients.rb

Instance Method Summary collapse

Instance Method Details

#client_sub_clients(id) ⇒ Hashie::Mash Also known as: sub_clients

Get all sub clients

Parameters:

  • id (Integer)

    Id of the client

  • opts (Hash)

    options hash of parameters

Returns:

  • (Hashie::Mash)

    All sub clients for client



15
16
17
# File 'lib/bwapi/client/admin/sub_clients.rb', line 15

def client_sub_clients id
  get "admin/clients/#{id}/subclient"
end

#create_client_sub_client(id, opts) ⇒ Hashie::Mash Also known as: create_sub_client

Create new subclient

Parameters:

  • id (Integer)

    Id of the client

  • opts (Hash)

    options hash of parameters

Options Hash (opts):

  • clientId (Integer)

    Current client id

  • startDate (Date)

    Start date of the client

  • contactTitle (String)

    Contact title of the client

  • address1 (String)

    Address line one of the client

  • address2 (String)

    Address line two of the client

  • address3 (String)

    Address line three of the client

  • pricingModel (String)

    Pricing model of the client

  • mentionArchiveSize (Integer)

    Mention archive size for the client

  • id (Integer)

    Id of the sub client

  • parentId (Integer)

    Parent id of the sub client

  • maxUsers (Integer)

    Maxiumum number of users for the client

  • isLegacy (Boolean)

    Legacy status of the client

  • name (String)

    Name of the client

  • contactTelephone (String)

    Telephone number of the client

  • priceStructureId (Integer)

    Id of the price structure for client

  • tags (Hash)

    Tags for the client

  • website (String)

    The website for the client

  • contactEmail (String)

    The contact email for the client

  • expiryDate (Date)

    The expiry date for the client

  • theme (String)

    The theme of the client

  • priceStructureLineId (Integer)

    The level of the price structure for the client

  • mentionBasedPricingMatrixLevel (Integer)

    The amount of mentions allowed

  • postcode (String)

    The postcode of the client

  • country (String)

    The country of the client

  • contactName (String)

    The contact name of the client

  • maximumSubscribedBrands (Integer)

    The maximum subscribed brands for the client

  • contactMobile (String)

    The mobile number for the client

Returns:

  • (Hashie::Mash)

    New sub client



62
63
64
# File 'lib/bwapi/client/admin/sub_clients.rb', line 62

def create_client_sub_client id, opts
  post "admin/clients/#{id}/subclient", opts
end

#get_client_sub_client(client_id, sub_client_id) ⇒ Hashie::Mash Also known as: sub_client

Get specific sub client of client

Parameters:

  • client_id (Integer)

    Id of the client

  • sub_client_id (Integer)

    Id of the sub client

Returns:

  • (Hashie::Mash)

    Specific sub clients for client



25
26
27
# File 'lib/bwapi/client/admin/sub_clients.rb', line 25

def get_client_sub_client client_id, sub_client_id
  get "admin/clients/#{client_id}/subclient/#{sub_client_id}"
end

#update_client_sub_client(client_id, sub_client_id, opts) ⇒ Hashie::Mash Also known as: update_sub_client

Update new subclient

Parameters:

  • client_id (Integer)

    Id of the client

  • sub_client_id (Integer)

    Id of the sub client

  • opts (Hash)

    options hash of parameters

Options Hash (opts):

  • clientId (Integer)

    Current client id

  • startDate (Date)

    Start date of the client

  • contactTitle (String)

    Contact title of the client

  • address1 (String)

    Address line one of the client

  • address2 (String)

    Address line two of the client

  • address3 (String)

    Address line three of the client

  • pricingModel (String)

    Pricing model of the client

  • mentionArchiveSize (Integer)

    Mention archive size for the client

  • id (Integer)

    Id of the sub client

  • parentId (Integer)

    Parent id of the sub client

  • maxUsers (Integer)

    Maxiumum number of users for the client

  • isLegacy (Boolean)

    Legacy status of the client

  • name (String)

    Name of the client

  • contactTelephone (String)

    Telephone number of the client

  • priceStructureId (Integer)

    Id of the price structure for client

  • tags (Hash)

    Tags for the client

  • website (String)

    The website for the client

  • contactEmail (String)

    The contact email for the client

  • expiryDate (Date)

    The expiry date for the client

  • theme (String)

    The theme of the client

  • priceStructureLineId (Integer)

    The level of the price structure for the client

  • mentionBasedPricingMatrixLevel (Integer)

    The amount of mentions allowed

  • postcode (String)

    The postcode of the client

  • country (String)

    The country of the client

  • contactName (String)

    The contact name of the client

  • maximumSubscribedBrands (Integer)

    The maximum subscribed brands for the client

  • contactMobile (String)

    The mobile number for the client

Returns:

  • (Hashie::Mash)

    New sub client



100
101
102
# File 'lib/bwapi/client/admin/sub_clients.rb', line 100

def update_client_sub_client client_id, sub_client_id, opts
  put "admin/clients/#{client_id}/subclient/#{sub_client_id}", opts
end