npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

auth-net-types

v1.2.2

Published

A collection of Authorize.net's types/data types/xml objects.

Downloads

101

Readme

Authorize.net Types

Build Status Dependency Status devDependency Status

Authorize.net data types for Node.JS

Installation

npm install auth-net-types

Usage

var Types = require('auth-net-types');
Types<Type>([options]);

Tests

make test

Types

Customer

var Customer = new Types.Customer({
  merchantCustomerId: 123,
  description: 'A customer with a lot of cash.',
  email: '[email protected]',
  customerProfileId: 1234
});

CustomerBasic

var Customer = new Types.CustomerBasic({
  merchantCustomerId: 123,
  description: 'A customer with a lot of cash.',
  email: '[email protected]',
  customerProfileId: 1234
});

BillingAddress

var BillingAddress = new Types.BillingAddress({
  firstName: 'Dan',
  lastName: 'Smith',
  company: 'Company LLC',
  address: '123 Sesame St',
  city: 'Johnesville',
  state: 'fl',
  zip: 123,
  country: 'us',
  phoneNumber: 5551231234,
  faxNumber: 5551231235,
  customerAddressId: 1
});

ShippingAddress

var ShippingAddress = new Types.ShippingAddress({
  firstName: 'Dan',
  lastName: 'Smith',
  company: 'Company LLC',
  address: '123 Sesame St',
  city: 'Johnesville',
  state: 'fl',
  zip: 123,
  country: 'us',
  phoneNumber: 5551231234,
  faxNumber: 5551231235,
  customerAddressId: 1
});

Address

var Address = new Types.Address({
  firstName: 'Dan',
  lastName: 'Smith',
  company: 'Company LLC',
  address: '123 Sesame St',
  city: 'Johnesville',
  state: 'fl',
  zip: 123,
  country: 'us',
  phoneNumber: 5551231234,
  faxNumber: 5551231235,
  customerAddressId: 1
});

PaymentProfiles

var billingAddress = {
  firstName: 'Dan',
  lastName: 'Smith',
  company: 'Company LLC',
  address: '123 Sesame St',
  city: 'Johnesville',
  state: 'fl',
  zip: 123,
  country: 'us',
  phoneNumber: 5551231234,
  faxNumber: 5551231235,
  customerAddressId: 1
}

var creditCard = {
  cardNumber: 41111111111111111,
  expirationDate: '2012-01',
  cardCode: 111
}

var profile = new Types.PaymentProfiles({
  customerType: 'individual',
  billTo: new Types.BillingAddress(billingAddress),
  payment: new Types.Payment({
    creditCard: new Types.CreditCard(creditCard)
  }),
  customerPaymentProfileId: 123
});

PaymentProfile

var billingAddress = {
  firstName: 'Dan',
  lastName: 'Smith',
  company: 'Company LLC',
  address: '123 Sesame St',
  city: 'Johnesville',
  state: 'fl',
  zip: 123,
  country: 'us',
  phoneNumber: 5551231234,
  faxNumber: 5551231235,
  customerAddressId: 1
}

var creditCard = {
  cardNumber: 41111111111111111,
  expirationDate: '2012-01',
  cardCode: 111
}

var profile = new Types.PaymentProfile({
  customerType: 'individual',
  billTo: new Types.BillingAddress(billingAddress),
  payment: new Types.Payment({
    creditCard: new Types.CreditCard(creditCard)
  }),
  customerPaymentProfileId: 123
});

Payment

var creditCard = {
  cardNumber: 41111111111111111,
  expirationDate: '2012-01',
  cardCode: 111
}

var bankAccount = {
  accountType: 'individual',
  routingNumber: '123456',
  accountNumber: '1234567890',
  nameOnAccount: 'Bob Smith',
  echeckType: 'WEB',
  bankName: 'Steal Yo Money, LLC.'
}

var payment = new Types.Payment({
  creditCard: new Types.CreditCard(creditCard),
  bankAccount: new Types.BankAccount(bankAccount)
});

PaymentSimple

var creditCard = {
  cardNumber: 41111111111111111,
  expirationDate: '2012-01',
  cardCode: 111
}

var bankAccount = {
  accountType: 'individual',
  routingNumber: '123456',
  accountNumber: '1234567890',
  nameOnAccount: 'Bob Smith',
  echeckType: 'WEB',
  bankName: 'Steal Yo Money, LLC.'
}

var payment = new Types.PaymentSimple({
  creditCard: new Types.CreditCard(creditCard),
  bankAccount: new Types.BankAccount(bankAccount)
});

Transaction

var tax = {
  amount: 5.42,
  name: 'Tax Item',
  description: 'Tax Desc'
}

var shipping = {
  amount: 5.99,
  name: 'Ship Item',
  description: 'Ship Desc'
}

var duty = {
  amount: 5.42,
  name: 'Duty Item',
  description: 'Duty Desc'
}

var order = {
  invoiceNumber: 542,
  description: 'Order Desc',
  orderNumber: 123
}

var lineItems = [
  {itemId: 123, name: 'Name 1', description: 'Desc 1', quantity: 1, unitPrice: 1.2, taxable: false},
  {itemId: 124, name: 'Name 2', description: 'Desc 2', quantity: 2, unitPrice: 5.63, taxable: true}
];

var transaction = {
  amount: 5.41,
  tax: new Types.Tax(tax),
  shipping: new Types.Shipping(shipping),
  duty: new Types.Duty(duty),
  lineItems: new Types.LineItems(lineItems),
  creditCardNumberMasked: '****',
  bankAccountNumberMasked: '****',
  customerProfileId: 5,
  customerPaymentProfileId: 8,
  customerShippingAddressId: 3,
  order: new Types.Order(order),
  transId: 111,
  taxExempt: true,
  recurringBilling: false,
  cardCode: 444,
  splitTenderId: 8934,
  approvalCode: 21931
}

var Transaction = new Types.Transaction(transaction);

Duty

var Duty = new Types.Duty({
  amount: 5.67,
  name: 'Duty Taxes',
  description: 'My Description'
});

Order

var Order = new Types.Order({
  invoiceNumber: 124,
  description: 'My Description',
  purchaseOrderNumber: 12345
});

Shipping

var Shipping = new Types.Shipping({
  amount: 5.67,
  name: 'Shipping Name',
  description: 'My Description'
});

Tax

var Tax = new Types.Tax({
  amount: 5.67,
  name: 'Taxes',
  description: 'My Description'
});

LineItems

var lineItems = [
  {itemId: 123, name: 'Name 1', description: 'Desc 1', quantity: 1, unitPrice: 1.2, taxable: false},
  {itemId: 124, name: 'Name 2', description: 'Desc 2', quantity: 2, unitPrice: 5.63, taxable: true}
];

var LineItems = new Types.LineItems(lineItems);

CreditCard

var CreditCard = new Types.CreditCard({
  cardNumber: 41111111111111111,
  expirationDate: '2012-01',
  cardCode: 111
});

BankAccount

var BankAccount = new Types.BankAccount({
  accountType: 'individual',
  routingNumber: '123456',
  accountNumber: '1234567890',
  nameOnAccount: 'Bob Smith',
  echeckType: 'WEB',
  bankName: 'Steal Yo Money, LLC.'
});

PaymentSchedule

var PaymentSchedule = new Types.PaymentSchedule({
  interval: {
    length: 30,
    unit: 'days'
  },
  startDate: '2012-01',
  totalOccurences: 10,
  trialOccurences: 5
});

Subscription

var paymentSchedule = {
  interval: {
    length: 30,
    unit: 'days'
  },
  startDate: '2012-01',
  totalOccurences: 10,
  trialOccurences: 5
}

var creditCard = {
  cardNumber: 41111111111111111,
  expirationDate: '2012-01',
  cardCode: 111
}

var order = {
  invoiceNumber: 124,
  description: 'My Description'
}

var billingAddress = {
  firstName: 'Dan',
  lastName: 'Smith',
  company: 'Company LLC',
  address: '123 Sesame St',
  city: 'Johnesville',
  state: 'fl',
  zip: 123,
  country: 'us',
  phoneNumber: 5551231234,
  faxNumber: 5551231235
}

var shippingAddress = {
  firstName: 'Dan',
  lastName: 'Smith',
  company: 'Company LLC',
  address: '123 Sesame St',
  city: 'Johnesville',
  state: 'fl',
  zip: 123,
  country: 'us',
  phoneNumber: 5551231234,
  faxNumber: 5551231235
}

var subscription = {
  name: 'Hello',
  paymentSchedule: new Types.PaymentSchedule(paymentSchedule),
  amount: 5.62,
  trialAmount: 2.30,
  payment: new Types.Payment({
    creditCard: new Types.CreditCard(creditCard)
  }),
  order: new Types.Order(order),
  customer: {
    id: 124,
    email: '[email protected]',
    phoneNumber: 5551231234,
    faxNumber: 5551231235
  },
  billTo: new Types.BillingAddress(billingAddress),
  shipTo: new Types.ShippingAddress(shippingAddress)
}

var Subscription = new Types.Subscription(subscription);