Module: EasyshipRatesRubyApi::Api::Users

Included in:
Client
Defined in:
lib/easyship/rates/ruby/api/api/users.rb

Overview

Rate API

[(contribute here)](github.com/easyship/easyship-rates-ruby-api)

See Also:

Instance Method Summary collapse

Instance Method Details

#create_with_api_key_and_secret(options = {}) ⇒ Easyship::Rates::Ruby::Mash

Create API key and secret only used by internal service

Returns:

  • (Easyship::Rates::Ruby::Mash)


21
22
23
24
25
# File 'lib/easyship/rates/ruby/api/api/users.rb', line 21

def create_with_api_key_and_secret(options = {})
  path = '/users/create_with_api_key_and_secret'
  defaults = {}
  Mash.from_json(post(path, defaults.merge(options)).body)
end

#delete_api_key_and_secret(options = {}) ⇒ Easyship::Rates::Ruby::Mash

Delete user’s API key and secret only used by internal service

Returns:

  • (Easyship::Rates::Ruby::Mash)


38
39
40
41
42
# File 'lib/easyship/rates/ruby/api/api/users.rb', line 38

def delete_api_key_and_secret(options = {})
  path = '/users/delete_api_key_and_secret'
  defaults = {}
  Mash.from_json(delete(path, defaults.merge(options)).body)
end

#index_api_key_and_secret(options = {}) ⇒ Easyship::Rates::Ruby::Mash

Show user’s all API keys and secrets only used by internal service

Returns:

  • (Easyship::Rates::Ruby::Mash)


30
31
32
33
# File 'lib/easyship/rates/ruby/api/api/users.rb', line 30

def index_api_key_and_secret(options = {})
  path = '/users/index_api_key_and_secret'
  simple_query(path, options)
end

#update_api_key_and_secret(options = {}) ⇒ Easyship::Rates::Ruby::Mash

Update user’s API key and secret only used by internal service

Returns:

  • (Easyship::Rates::Ruby::Mash)


47
48
49
50
51
# File 'lib/easyship/rates/ruby/api/api/users.rb', line 47

def update_api_key_and_secret(options = {})
  path = '/users/update_api_key_and_secret'
  defaults = {}
  Mash.from_json(patch(path, defaults.merge(options)).body)
end

#update_user(options = {}) ⇒ Easyship::Rates::Ruby::Mash

Update Users only used by internal service

Returns:

  • (Easyship::Rates::Ruby::Mash)


12
13
14
15
16
# File 'lib/easyship/rates/ruby/api/api/users.rb', line 12

def update_user(options = {})
  path = '/users/update'
  defaults = {}
  Mash.from_json(post(path, defaults.merge(options)).body)
end