Sha256: 877af1dc5fdc488cd8a13848457a67c95d8f084d01c42b86cefa5c7ee268d78e

Contents?: true

Size: 1.67 KB

Versions: 2

Compression:

Stored size: 1.67 KB

Contents

require 'her'
require 'faraday_middleware'
require 'faraday-http-cache'
require 'boletosimples/version'

module BoletoSimples
  autoload :Configuration, 'boletosimples/configuration'
  autoload :Extra, 'boletosimples/extra'
  autoload :ResponseError, 'boletosimples/response_error'
  autoload :LastRequest, 'boletosimples/last_request'

  autoload :BankBillet, 'boletosimples/resources/bank_billet'
  autoload :BankBilletAccount, 'boletosimples/resources/bank_billet_account'
  autoload :Event, 'boletosimples/resources/event'
  autoload :Customer, 'boletosimples/resources/customer'
  autoload :CustomerSubscription, 'boletosimples/resources/customer_subscription'
  autoload :Installment, 'boletosimples/resources/installment'
  autoload :Transaction, 'boletosimples/resources/transaction'
  autoload :Remittance, 'boletosimples/resources/remittance'
  autoload :Discharge, 'boletosimples/resources/discharge'
  autoload :BaseModel, 'boletosimples/resources/base_model'
  autoload :Webhook, 'boletosimples/resources/webhook'
  autoload :WebhookDelivery, 'boletosimples/resources/webhook_delivery'

  module Partner
    autoload :User, 'boletosimples/resources/partner/user'
  end

  module Middleware
    autoload :UserAgent, 'boletosimples/middlewares/user_agent'
    autoload :RaiseError, 'boletosimples/middlewares/raise_error'
    autoload :LastRequest, 'boletosimples/middlewares/last_request'
  end

  class << self
    attr_accessor :configuration, :last_request

    def configure
      @configuration = Configuration.new
      yield(configuration) if block_given?
      configuration.setup_her # after changing configuration gem her should be configured
    end
  end

end

BoletoSimples.configure

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
boletosimples-0.4.1 lib/boletosimples.rb
boletosimples-0.4.0 lib/boletosimples.rb