Class: ShippingScale::Configuration

Inherits:
Struct
  • Object
show all
Defined in:
lib/shipping_scale/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



3
4
5
6
7
# File 'lib/shipping_scale/configuration.rb', line 3

def initialize
  self.timeout = 5
  self.testing = false
  self.user_id = (ENV.fetch("USPS_USER_ID")) ? ENV.fetch("USPS_USER_ID") : nil
end

Instance Attribute Details

#testingObject Also known as: testing?

Returns the value of attribute testing

Returns:

  • (Object)

    the current value of testing



2
3
4
# File 'lib/shipping_scale/configuration.rb', line 2

def testing
  @testing
end

#timeoutObject

Returns the value of attribute timeout

Returns:

  • (Object)

    the current value of timeout



2
3
4
# File 'lib/shipping_scale/configuration.rb', line 2

def timeout
  @timeout
end

#user_idObject

Returns the value of attribute user_id

Returns:

  • (Object)

    the current value of user_id



2
3
4
# File 'lib/shipping_scale/configuration.rb', line 2

def user_id
  @user_id
end

#zip_destinationObject

Returns the value of attribute zip_destination

Returns:

  • (Object)

    the current value of zip_destination



2
3
4
# File 'lib/shipping_scale/configuration.rb', line 2

def zip_destination
  @zip_destination
end

#zip_originationObject

Returns the value of attribute zip_origination

Returns:

  • (Object)

    the current value of zip_origination



2
3
4
# File 'lib/shipping_scale/configuration.rb', line 2

def zip_origination
  @zip_origination
end