Sha256: 831701f666bb8499e9fa1f963e84fe2fd62212282e7f95c3d4b098cc4cbe6e2e

Contents?: true

Size: 947 Bytes

Versions: 2

Compression:

Stored size: 947 Bytes

Contents

module Smartsend

  @@api_token = nil

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

  def self.account
    Smartsend::Account.new(api_token: @@api_token)
  end

  def self.api_token
    @@api_token
  end

  class MissingConfigError < StandardError
  end

  class AuthorizationError < StandardError
  end

  class UnknownError < StandardError
  end

  class NotFoundError < StandardError
  end

end

require_relative 'smartsend/shipment'
require_relative 'smartsend/address'
require_relative 'smartsend/receiver'
require_relative 'smartsend/sender'
require_relative 'smartsend/agent'
require_relative 'smartsend/services'
require_relative 'smartsend/parcel'
require_relative 'smartsend/parcel_item'
require_relative 'smartsend/client'
require_relative 'smartsend/label'
require_relative 'smartsend/account'
require_relative 'smartsend/version'
require_relative 'smartsend/request_error'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
smartsend-ruby-0.5.1 lib/smartsend.rb
smartsend-ruby-0.5.0 lib/smartsend.rb