Class: Fedex::Credentials

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/fedex/credentials.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Credentials

In order to use Fedex rates API you must first apply for a developer(and later production keys), Visit / Fedex Developer Center for more information about how to obtain your keys. return a Fedex::Credentials object

Parameters:

  • key (String)
    • Fedex web service key

  • password (String)
    • Fedex password

  • account_number (String)
    • Fedex account_number

  • meter (String)
    • Fedex meter number

  • mode (String)
    • development/production


17
18
19
20
21
22
23
24
# File 'lib/fedex/credentials.rb', line 17

def initialize(options={})
  requires!(options, :key, :password, :account_number, :meter, :mode)
  @key = options[:key]
  @password = options[:password]
  @account_number = options[:account_number]
  @meter = options[:meter]
  @mode = options[:mode]
end

Instance Attribute Details

#account_numberObject (readonly)

Returns the value of attribute account_number.



6
7
8
# File 'lib/fedex/credentials.rb', line 6

def 
  @account_number
end

#keyObject (readonly)

Returns the value of attribute key.



6
7
8
# File 'lib/fedex/credentials.rb', line 6

def key
  @key
end

#meterObject (readonly)

Returns the value of attribute meter.



6
7
8
# File 'lib/fedex/credentials.rb', line 6

def meter
  @meter
end

#modeObject (readonly)

Returns the value of attribute mode.



6
7
8
# File 'lib/fedex/credentials.rb', line 6

def mode
  @mode
end

#passwordObject (readonly)

Returns the value of attribute password.



6
7
8
# File 'lib/fedex/credentials.rb', line 6

def password
  @password
end