class RakutenRms::Configuration

Attributes

auth_key[R]
license_key[R]
service_secret[R]
shop_url[R]
user_name[R]

Public Class Methods

new(options = {}) click to toggle source
# File lib/rakuten_rms/configuration.rb, line 5
def initialize(options = {})
  @service_secret = options[:service_secret]
  @license_key    = options[:license_key]

  # Old style authentication
  @user_name = options[:user_name]
  @shop_url  = options[:shop_url]
  @auth_key  = options[:auth_key] || authorization()
end

Public Instance Methods

authorization() click to toggle source
# File lib/rakuten_rms/configuration.rb, line 15
def authorization
  "ESA " + Base64.strict_encode64(@service_secret + ":" + @license_key) if @service_secret and @license_key
end