Sha256: 0748ead1b9d28e56141b9dfb51fcd6701f9e3e8c7d907bbd0eed4d87070ff339

Contents?: true

Size: 1.24 KB

Versions: 3

Compression:

Stored size: 1.24 KB

Contents

module Smartsend

  @@api_key = nil
  @@email = nil
  @@license = nil
  @@cms_system = nil
  @@cms_version = nil
  @@test_mode = false

  def self.configure(args={})
    args.each do |k, v|
      class_variable_set "@@#{k}", v
    end
  end

  def self.account
    Smartsend::Account.new(email: @@email, license: @@license)
  end

  def self.api_key
    @@api_key
  end

  def self.email
    @@email
  end

  def self.license
    @@license
  end

  def self.cms_system
    @@cms_system
  end

  def self.cms_version
    @@cms_version
  end

  def self.app_version
    Smartsend::VERSION
  end

  def self.test_mode
    @@test_mode
  end

  def self.test?
    test_mode
  end


  class TooManyOrdersError < StandardError
  end

  class MissingConfigError < StandardError
  end

  class AuthorizationError < StandardError
  end

end

require_relative 'smartsend/order'
require_relative 'smartsend/orders'
require_relative 'smartsend/address'
require_relative 'smartsend/receiver'
require_relative 'smartsend/sender'
require_relative 'smartsend/agent'
require_relative 'smartsend/service'
require_relative 'smartsend/parcel'
require_relative 'smartsend/parcel_item'
require_relative 'smartsend/client'
require_relative 'smartsend/account'
require_relative 'smartsend/version'

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
smartsend-ruby-0.1.1 lib/smartsend.rb
smartsend-ruby-0.1.0 lib/smartsend.rb
smartsend-ruby-0.0.3 lib/smartsend.rb