Skip to content

Latest commit

 

History

History
606 lines (374 loc) · 13.7 KB

File metadata and controls

606 lines (374 loc) · 13.7 KB

UltracartClient::UserApi

All URIs are relative to https://secure.ultracart.com/rest/v2

Method HTTP request Description
delete_group DELETE /user/groups/{group_oid} Delete a group
delete_user DELETE /user/users/{user_id} Delete a user
get_group GET /user/groups/{group_oid} Retrieve a group
get_groups GET /user/groups Get groups
get_user GET /user/users/{user_id} Retrieve a user
get_user_logins GET /user/users/{user_id}/logins Retrieve a user's login history
get_users GET /user/users Get users
insert_group POST /user/groups Insert a group
insert_user POST /user/users Insert a user
update_group PUT /user/groups/{group_oid} Update a group
update_user PUT /user/users/{user_id} Update a user

delete_group

delete_group(group_oid)

Delete a group

Delete a group on the UltraCart account.

Examples

# Internal API.  No samples are provided as merchants will never need this api method

Using the delete_group_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

<Array(nil, Integer, Hash)> delete_group_with_http_info(group_oid)

begin
  # Delete a group
  data, status_code, headers = api_instance.delete_group_with_http_info(group_oid)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue UltracartClient::ApiError => e
  puts "Error when calling UserApi->delete_group_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
group_oid Integer The group_oid to delete.

Return type

nil (empty response body)

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

delete_user

delete_user(user_id)

Delete a user

Delete a user on the UltraCart account.

Examples

# Internal API.  No samples are provided as merchants will never need this api method

Using the delete_user_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

<Array(nil, Integer, Hash)> delete_user_with_http_info(user_id)

begin
  # Delete a user
  data, status_code, headers = api_instance.delete_user_with_http_info(user_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue UltracartClient::ApiError => e
  puts "Error when calling UserApi->delete_user_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
user_id Integer The user_id to delete.

Return type

nil (empty response body)

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_group

get_group(group_oid)

Retrieve a group

Retrieves a single group using the specified group id.

Examples

# Internal API.  No samples are provided as merchants will never need this api method

Using the get_group_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

<Array(nil, Integer, Hash)> get_group_with_http_info(group_oid)

begin
  # Retrieve a group
  data, status_code, headers = api_instance.get_group_with_http_info(group_oid)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue UltracartClient::ApiError => e
  puts "Error when calling UserApi->get_group_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
group_oid Integer The group id to retrieve.

Return type

nil (empty response body)

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_groups

get_groups

Get groups

Examples

# Internal API.  No samples are provided as merchants will never need this api method

Using the get_groups_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_groups_with_http_info

begin
  # Get groups
  data, status_code, headers = api_instance.get_groups_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <GroupsResponse>
rescue UltracartClient::ApiError => e
  puts "Error when calling UserApi->get_groups_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

GroupsResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_user

get_user(user_id)

Retrieve a user

Retrieves a single user using the specified user id.

Examples

# Internal API.  No samples are provided as merchants will never need this api method

Using the get_user_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_user_with_http_info(user_id)

begin
  # Retrieve a user
  data, status_code, headers = api_instance.get_user_with_http_info(user_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <UserResponse>
rescue UltracartClient::ApiError => e
  puts "Error when calling UserApi->get_user_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
user_id Integer The user id to retrieve.

Return type

UserResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_user_logins

get_user_logins(user_id)

Retrieve a user's login history

Retrieves logins for a single user using the specified user id.

Examples

# Internal API.  No samples are provided as merchants will never need this api method

Using the get_user_logins_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_user_logins_with_http_info(user_id)

begin
  # Retrieve a user's login history
  data, status_code, headers = api_instance.get_user_logins_with_http_info(user_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <UserLoginsResponse>
rescue UltracartClient::ApiError => e
  puts "Error when calling UserApi->get_user_logins_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
user_id Integer The user id to retrieve.

Return type

UserLoginsResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_users

get_users

Get users

Examples

# Internal API.  No samples are provided as merchants will never need this api method

Using the get_users_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_users_with_http_info

begin
  # Get users
  data, status_code, headers = api_instance.get_users_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <UsersResponse>
rescue UltracartClient::ApiError => e
  puts "Error when calling UserApi->get_users_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

UsersResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

insert_group

insert_group(group)

Insert a group

Insert a group on the UltraCart account.

Examples

# Internal API.  No samples are provided as merchants will never need this api method

Using the insert_group_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> insert_group_with_http_info(group)

begin
  # Insert a group
  data, status_code, headers = api_instance.insert_group_with_http_info(group)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <GroupResponse>
rescue UltracartClient::ApiError => e
  puts "Error when calling UserApi->insert_group_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
group Group Group to insert

Return type

GroupResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

insert_user

insert_user(user)

Insert a user

Insert a user on the UltraCart account.

Examples

# Internal API.  No samples are provided as merchants will never need this api method

Using the insert_user_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> insert_user_with_http_info(user)

begin
  # Insert a user
  data, status_code, headers = api_instance.insert_user_with_http_info(user)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <UserResponse>
rescue UltracartClient::ApiError => e
  puts "Error when calling UserApi->insert_user_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
user User User to insert

Return type

UserResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

update_group

update_group(group_oid, group)

Update a group

Update a group on the UltraCart account.

Examples

# Internal API.  No samples are provided as merchants will never need this api method

Using the update_group_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> update_group_with_http_info(group_oid, group)

begin
  # Update a group
  data, status_code, headers = api_instance.update_group_with_http_info(group_oid, group)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <GroupResponse>
rescue UltracartClient::ApiError => e
  puts "Error when calling UserApi->update_group_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
group_oid Integer The group_oid to update.
group Group Group to update

Return type

GroupResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

update_user

update_user(user_id, user)

Update a user

Update a user on the UltraCart account.

Examples

# Internal API.  No samples are provided as merchants will never need this api method

Using the update_user_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> update_user_with_http_info(user_id, user)

begin
  # Update a user
  data, status_code, headers = api_instance.update_user_with_http_info(user_id, user)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <UserResponse>
rescue UltracartClient::ApiError => e
  puts "Error when calling UserApi->update_user_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
user_id Integer The user_id to update.
user User User to update

Return type

UserResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json