Sha256: 12f2d239e6c050e54856966fc3ccbf2edc73b5a324c8d181bde016d796527d95

Contents?: true

Size: 610 Bytes

Versions: 32

Compression:

Stored size: 610 Bytes

Contents

module XeroGateway
  class PrivateApp < Gateway
    #
    # The consumer key and secret here correspond to those provided
    # to you by Xero inside the API Previewer. 
    def initialize(consumer_key, consumer_secret, path_to_private_key, options = {})
      options.merge!(
        :signature_method => 'RSA-SHA1',
        :private_key_file => path_to_private_key
      )
      
      @xero_url = options[:xero_url] || "https://api.xero.com/api.xro/2.0"
      @client   = OAuth.new(consumer_key, consumer_secret, options)
      @client.authorize_from_access(consumer_key, consumer_secret)
    end
  end
end

Version data entries

32 entries across 32 versions & 3 rubygems

Version Path
xero_gateway-2.5.0 lib/xero_gateway/private_app.rb
xero_gateway-2.4.0 lib/xero_gateway/private_app.rb
xero_gateway-2.3.0 lib/xero_gateway/private_app.rb
xero_gateway-float-2.1.7 lib/xero_gateway/private_app.rb
xero_gateway-float-2.1.6 lib/xero_gateway/private_app.rb
xero_gateway-float-2.1.4 lib/xero_gateway/private_app.rb
xero_gateway-float-2.1.3 lib/xero_gateway/private_app.rb
xero_gateway-float-2.1.1 lib/xero_gateway/private_app.rb
xero_gateway-float-2.0.18 lib/xero_gateway/private_app.rb
xero_gateway-float-2.0.17 lib/xero_gateway/private_app.rb
xero_gateway-float-2.0.16 lib/xero_gateway/private_app.rb
xero_gateway-float-2.0.15 lib/xero_gateway/private_app.rb
xero_gateway-2.1.0 lib/xero_gateway/private_app.rb
xero_gateway-n8vision-2.0.20 lib/xero_gateway/private_app.rb
xero_gateway-2.0.19 lib/xero_gateway/private_app.rb
xero_gateway-2.0.18 lib/xero_gateway/private_app.rb
xero_gateway-2.0.17 lib/xero_gateway/private_app.rb
xero_gateway-2.0.16 lib/xero_gateway/private_app.rb
xero_gateway-2.0.15 lib/xero_gateway/private_app.rb
xero_gateway-2.0.14 lib/xero_gateway/private_app.rb