class Garbanzo::AST::Base

Attributes

credentials[R]
nodes[RW]

Public Class Methods

new(credentials) click to toggle source
# File lib/garbanzo/ast/base.rb, line 6
def initialize(credentials)
  @credentials = credentials
  @nodes = {}
end

Private Instance Methods

credentials_hash() click to toggle source
# File lib/garbanzo/ast/base.rb, line 23
def credentials_hash
  {
    merchant_authentication: {
      name: credentials.login,
      transaction_key: credentials.password
    }
  }
end
set_nodes(hash) click to toggle source
# File lib/garbanzo/ast/base.rb, line 15
def set_nodes(hash)
  @nodes = {
    type => credentials_hash.merge(hash),
    :attributes! => { type => { xmlns: 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' }}
  }
  self
end