Skip to content

Commit

Permalink
Merge pull request #77 from AuthorizeNet/mandate
Browse files Browse the repository at this point in the history
Changes for March 2021
  • Loading branch information
gnongsie authored Mar 31, 2021
2 parents aab2dac + d02bf09 commit bd15ff9
Show file tree
Hide file tree
Showing 7 changed files with 2,595 additions and 2,468 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ node_js:
- "4"
- "6"
- "8"
- "10"
- "12"

matrix:
allow_failures:
- node_js: "4"
- node_js: "6"
- node_js: "8"

before_install:
# execute all of the commands which need to be executed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


## Requirements
* Node.js version 4.8.4 or higher
* Node.js version 10.0.0 or higher
* An Authorize.Net account (see _Registration & Configuration_ section below)

### Contribution
Expand Down
83 changes: 77 additions & 6 deletions lib/apicontracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ class ANetApiRequest {
logger.debug('Enter ANetApiRequest constructor');
if(arguments.length == 1) {
if(('merchantAuthentication' in obj) && (obj.merchantAuthentication != null)) { this.setMerchantAuthentication(new MerchantAuthenticationType(obj.merchantAuthentication)); }
else { this.setMerchantAuthentication(null); }
if(('clientId' in obj) && (obj.clientId != null)) { this.setClientId(obj.clientId); }
else { this.setClientId(null); }
if(('refId' in obj) && (obj.refId != null)) { this.setRefId(obj.refId); }
else { this.setRefId(null); }
}
else {
this.setMerchantAuthentication(null);
Expand Down Expand Up @@ -797,6 +794,24 @@ class AuResponseType {

module.exports.AuResponseType = AuResponseType;

class AuthorizationIndicatorType {
constructor(obj) {
logger.debug('Enter AuthorizationIndicatorType constructor');
if(arguments.length == 1) {
if(('authorizationIndicator' in obj) && (obj.authorizationIndicator != null)) { this.setAuthorizationIndicator(obj.authorizationIndicator); }
}
else {
this.setAuthorizationIndicator(null);
}
logger.debug('Exit AuthorizationIndicatorType constructor');
}

setAuthorizationIndicator(p_authorizationIndicator) { this.authorizationIndicator = p_authorizationIndicator; }
getAuthorizationIndicator() { if('authorizationIndicator' in this) {return this.authorizationIndicator;} }
}

module.exports.AuthorizationIndicatorType = AuthorizationIndicatorType;

class BankAccountMaskedType {
constructor(obj) {
logger.debug('Enter BankAccountMaskedType constructor');
Expand Down Expand Up @@ -1280,13 +1295,17 @@ class CustomerPaymentProfileListItemType {
if(('customerProfileId' in obj) && (obj.customerProfileId != null)) { this.setCustomerProfileId(obj.customerProfileId); }
if(('billTo' in obj) && (obj.billTo != null)) { this.setBillTo(new CustomerAddressType(obj.billTo)); }
if(('payment' in obj) && (obj.payment != null)) { this.setPayment(new PaymentMaskedType(obj.payment)); }
if(('originalNetworkTransId' in obj) && (obj.originalNetworkTransId != null)) { this.setOriginalNetworkTransId(obj.originalNetworkTransId); }
if(('originalAuthAmount' in obj) && (obj.originalAuthAmount != null)) { this.setOriginalAuthAmount(obj.originalAuthAmount); }
}
else {
this.setDefaultPaymentProfile(null);
this.setCustomerPaymentProfileId(null);
this.setCustomerProfileId(null);
this.setBillTo(null);
this.setPayment(null);
this.setOriginalNetworkTransId(null);
this.setOriginalAuthAmount(null);
}
logger.debug('Exit CustomerPaymentProfileListItemType constructor');
}
Expand All @@ -1301,6 +1320,10 @@ class CustomerPaymentProfileListItemType {
getBillTo() { if('billTo' in this) {return this.billTo;} }
setPayment(p_payment) { this.payment = p_payment; }
getPayment() { if('payment' in this) {return this.payment;} }
setOriginalNetworkTransId(p_originalNetworkTransId) { this.originalNetworkTransId = p_originalNetworkTransId; }
getOriginalNetworkTransId() { if('originalNetworkTransId' in this) {return this.originalNetworkTransId;} }
setOriginalAuthAmount(p_originalAuthAmount) { this.originalAuthAmount = p_originalAuthAmount; }
getOriginalAuthAmount() { if('originalAuthAmount' in this) {return this.originalAuthAmount;} }
}

module.exports.CustomerPaymentProfileListItemType = CustomerPaymentProfileListItemType;
Expand Down Expand Up @@ -3114,17 +3137,21 @@ class SubsequentAuthInformation {
logger.debug('Enter SubsequentAuthInformation constructor');
if(arguments.length == 1) {
if(('originalNetworkTransId' in obj) && (obj.originalNetworkTransId != null)) { this.setOriginalNetworkTransId(obj.originalNetworkTransId); }
if(('originalAuthAmount' in obj) && (obj.originalAuthAmount != null)) { this.setOriginalAuthAmount(obj.originalAuthAmount); }
if(('reason' in obj) && (obj.reason != null)) { this.setReason(obj.reason); }
}
else {
this.setOriginalNetworkTransId(null);
this.setOriginalAuthAmount(null);
this.setReason(null);
}
logger.debug('Exit SubsequentAuthInformation constructor');
}

setOriginalNetworkTransId(p_originalNetworkTransId) { this.originalNetworkTransId = p_originalNetworkTransId; }
getOriginalNetworkTransId() { if('originalNetworkTransId' in this) {return this.originalNetworkTransId;} }
setOriginalAuthAmount(p_originalAuthAmount) { this.originalAuthAmount = p_originalAuthAmount; }
getOriginalAuthAmount() { if('originalAuthAmount' in this) {return this.originalAuthAmount;} }
setReason(p_reason) { this.reason = p_reason; }
getReason() { if('reason' in this) {return this.reason;} }
}
Expand Down Expand Up @@ -3243,6 +3270,10 @@ class TransactionDetailsType {
if(('tip' in obj) && (obj.tip != null)) { this.setTip(new ExtendedAmountType(obj.tip)); }
if(('otherTax' in obj) && (obj.otherTax != null)) { this.setOtherTax(new OtherTaxType(obj.otherTax)); }
if(('shipFrom' in obj) && (obj.shipFrom != null)) { this.setShipFrom(new NameAndAddressType(obj.shipFrom)); }
if(('networkTransId' in obj) && (obj.networkTransId != null)) { this.setNetworkTransId(obj.networkTransId); }
if(('originalNetworkTransId' in obj) && (obj.originalNetworkTransId != null)) { this.setOriginalNetworkTransId(obj.originalNetworkTransId); }
if(('originalAuthAmount' in obj) && (obj.originalAuthAmount != null)) { this.setOriginalAuthAmount(obj.originalAuthAmount); }
if(('authorizationIndicator' in obj) && (obj.authorizationIndicator != null)) { this.setAuthorizationIndicator(obj.authorizationIndicator); }
}
else {
this.setTransId(null);
Expand Down Expand Up @@ -3293,6 +3324,10 @@ class TransactionDetailsType {
this.setTip(null);
this.setOtherTax(null);
this.setShipFrom(null);
this.setNetworkTransId(null);
this.setOriginalNetworkTransId(null);
this.setOriginalAuthAmount(null);
this.setAuthorizationIndicator(null);
}
logger.debug('Exit TransactionDetailsType constructor');
}
Expand Down Expand Up @@ -3393,6 +3428,14 @@ class TransactionDetailsType {
getOtherTax() { if('otherTax' in this) {return this.otherTax;} }
setShipFrom(p_shipFrom) { this.shipFrom = p_shipFrom; }
getShipFrom() { if('shipFrom' in this) {return this.shipFrom;} }
setNetworkTransId(p_networkTransId) { this.networkTransId = p_networkTransId; }
getNetworkTransId() { if('networkTransId' in this) {return this.networkTransId;} }
setOriginalNetworkTransId(p_originalNetworkTransId) { this.originalNetworkTransId = p_originalNetworkTransId; }
getOriginalNetworkTransId() { if('originalNetworkTransId' in this) {return this.originalNetworkTransId;} }
setOriginalAuthAmount(p_originalAuthAmount) { this.originalAuthAmount = p_originalAuthAmount; }
getOriginalAuthAmount() { if('originalAuthAmount' in this) {return this.originalAuthAmount;} }
setAuthorizationIndicator(p_authorizationIndicator) { this.authorizationIndicator = p_authorizationIndicator; }
getAuthorizationIndicator() { if('authorizationIndicator' in this) {return this.authorizationIndicator;} }
}

module.exports.TransactionDetailsType = TransactionDetailsType;
Expand Down Expand Up @@ -3458,6 +3501,7 @@ class TransactionRequestType {
if(('subsequentAuthInformation' in obj) && (obj.subsequentAuthInformation != null)) { this.setSubsequentAuthInformation(new SubsequentAuthInformation(obj.subsequentAuthInformation)); }
if(('otherTax' in obj) && (obj.otherTax != null)) { this.setOtherTax(new OtherTaxType(obj.otherTax)); }
if(('shipFrom' in obj) && (obj.shipFrom != null)) { this.setShipFrom(new NameAndAddressType(obj.shipFrom)); }
if(('authorizationIndicatorType' in obj) && (obj.authorizationIndicatorType != null)) { this.setAuthorizationIndicatorType(new AuthorizationIndicatorType(obj.authorizationIndicatorType)); }
}
else {
this.setTransactionType(null);
Expand Down Expand Up @@ -3495,6 +3539,7 @@ class TransactionRequestType {
this.setSubsequentAuthInformation(null);
this.setOtherTax(null);
this.setShipFrom(null);
this.setAuthorizationIndicatorType(null);
}
logger.debug('Exit TransactionRequestType constructor');
}
Expand Down Expand Up @@ -3569,6 +3614,8 @@ class TransactionRequestType {
getOtherTax() { if('otherTax' in this) {return this.otherTax;} }
setShipFrom(p_shipFrom) { this.shipFrom = p_shipFrom; }
getShipFrom() { if('shipFrom' in this) {return this.shipFrom;} }
setAuthorizationIndicatorType(p_authorizationIndicatorType) { this.authorizationIndicatorType = p_authorizationIndicatorType; }
getAuthorizationIndicatorType() { if('authorizationIndicatorType' in this) {return this.authorizationIndicatorType;} }
}

module.exports.TransactionRequestType = TransactionRequestType;
Expand Down Expand Up @@ -5216,6 +5263,8 @@ class CustomerPaymentProfileMaskedType extends CustomerPaymentProfileBaseType {
if(('driversLicense' in obj) && (obj.driversLicense != null)) { this.setDriversLicense(new DriversLicenseMaskedType(obj.driversLicense)); }
if(('taxId' in obj) && (obj.taxId != null)) { this.setTaxId(obj.taxId); }
if(('subscriptionIds' in obj) && (obj.subscriptionIds != null)) { this.setSubscriptionIds(new SubscriptionIdList(obj.subscriptionIds)); }
if(('originalNetworkTransId' in obj) && (obj.originalNetworkTransId != null)) { this.setOriginalNetworkTransId(obj.originalNetworkTransId); }
if(('originalAuthAmount' in obj) && (obj.originalAuthAmount != null)) { this.setOriginalAuthAmount(obj.originalAuthAmount); }
}
else {
super();
Expand All @@ -5226,6 +5275,8 @@ class CustomerPaymentProfileMaskedType extends CustomerPaymentProfileBaseType {
this.setDriversLicense(null);
this.setTaxId(null);
this.setSubscriptionIds(null);
this.setOriginalNetworkTransId(null);
this.setOriginalAuthAmount(null);
}
logger.debug('Exit CustomerPaymentProfileMaskedType constructor');
}
Expand All @@ -5244,6 +5295,10 @@ class CustomerPaymentProfileMaskedType extends CustomerPaymentProfileBaseType {
getTaxId() { if('taxId' in this) {return this.taxId;} }
setSubscriptionIds(p_subscriptionIds) { this.subscriptionIds = p_subscriptionIds; }
getSubscriptionIds() { if('subscriptionIds' in this) {return this.subscriptionIds;} }
setOriginalNetworkTransId(p_originalNetworkTransId) { this.originalNetworkTransId = p_originalNetworkTransId; }
getOriginalNetworkTransId() { if('originalNetworkTransId' in this) {return this.originalNetworkTransId;} }
setOriginalAuthAmount(p_originalAuthAmount) { this.originalAuthAmount = p_originalAuthAmount; }
getOriginalAuthAmount() { if('originalAuthAmount' in this) {return this.originalAuthAmount;} }
}

module.exports.CustomerPaymentProfileMaskedType = CustomerPaymentProfileMaskedType;
Expand All @@ -5257,13 +5312,15 @@ class CustomerPaymentProfileType extends CustomerPaymentProfileBaseType {
if(('driversLicense' in obj) && (obj.driversLicense != null)) { this.setDriversLicense(new DriversLicenseType(obj.driversLicense)); }
if(('taxId' in obj) && (obj.taxId != null)) { this.setTaxId(obj.taxId); }
if(('defaultPaymentProfile' in obj) && (obj.defaultPaymentProfile != null)) { this.setDefaultPaymentProfile(obj.defaultPaymentProfile); }
if(('subsequentAuthInformation' in obj) && (obj.subsequentAuthInformation != null)) { this.setSubsequentAuthInformation(new SubsequentAuthInformation(obj.subsequentAuthInformation)); }
}
else {
super();
this.setPayment(null);
this.setDriversLicense(null);
this.setTaxId(null);
this.setDefaultPaymentProfile(null);
this.setSubsequentAuthInformation(null);
}
logger.debug('Exit CustomerPaymentProfileType constructor');
}
Expand All @@ -5276,6 +5333,8 @@ class CustomerPaymentProfileType extends CustomerPaymentProfileBaseType {
getTaxId() { if('taxId' in this) {return this.taxId;} }
setDefaultPaymentProfile(p_defaultPaymentProfile) { this.defaultPaymentProfile = p_defaultPaymentProfile; }
getDefaultPaymentProfile() { if('defaultPaymentProfile' in this) {return this.defaultPaymentProfile;} }
setSubsequentAuthInformation(p_subsequentAuthInformation) { this.subsequentAuthInformation = p_subsequentAuthInformation; }
getSubsequentAuthInformation() { if('subsequentAuthInformation' in this) {return this.subsequentAuthInformation;} }
}

module.exports.CustomerPaymentProfileType = CustomerPaymentProfileType;
Expand Down Expand Up @@ -6821,6 +6880,7 @@ class ProfileTransOrderType extends ProfileTransAmountType {
if(('splitTenderId' in obj) && (obj.splitTenderId != null)) { this.setSplitTenderId(obj.splitTenderId); }
if(('processingOptions' in obj) && (obj.processingOptions != null)) { this.setProcessingOptions(new ProcessingOptions(obj.processingOptions)); }
if(('subsequentAuthInformation' in obj) && (obj.subsequentAuthInformation != null)) { this.setSubsequentAuthInformation(new SubsequentAuthInformation(obj.subsequentAuthInformation)); }
if(('authorizationIndicatorType' in obj) && (obj.authorizationIndicatorType != null)) { this.setAuthorizationIndicatorType(new AuthorizationIndicatorType(obj.authorizationIndicatorType)); }
}
else {
super();
Expand All @@ -6834,6 +6894,7 @@ class ProfileTransOrderType extends ProfileTransAmountType {
this.setSplitTenderId(null);
this.setProcessingOptions(null);
this.setSubsequentAuthInformation(null);
this.setAuthorizationIndicatorType(null);
}
logger.debug('Exit ProfileTransOrderType constructor');
}
Expand All @@ -6858,6 +6919,8 @@ class ProfileTransOrderType extends ProfileTransAmountType {
getProcessingOptions() { if('processingOptions' in this) {return this.processingOptions;} }
setSubsequentAuthInformation(p_subsequentAuthInformation) { this.subsequentAuthInformation = p_subsequentAuthInformation; }
getSubsequentAuthInformation() { if('subsequentAuthInformation' in this) {return this.subsequentAuthInformation;} }
setAuthorizationIndicatorType(p_authorizationIndicatorType) { this.authorizationIndicatorType = p_authorizationIndicatorType; }
getAuthorizationIndicatorType() { if('authorizationIndicatorType' in this) {return this.authorizationIndicatorType;} }
}

module.exports.ProfileTransOrderType = ProfileTransOrderType;
Expand Down Expand Up @@ -7126,7 +7189,7 @@ class UpdateCustomerProfileRequest extends ANetApiRequest {
logger.debug('Enter UpdateCustomerProfileRequest constructor');
if(arguments.length == 1) {
super(obj);
if(('profile' in obj) && (obj.profile != null)) { this.setProfile(new CustomerProfileInfoExType(obj.profile)); }
if(('profile' in obj) && (obj.profile != null)) { this.setProfile(new CustomerProfileExType(obj.profile)); }
}
else {
super();
Expand Down Expand Up @@ -7639,6 +7702,12 @@ const AfdsTransactionEnum = {
};
module.exports.AfdsTransactionEnum = AfdsTransactionEnum;

const AuthIndicatorEnum = {
PRE : 'pre',
FINAL : 'final'
};
module.exports.AuthIndicatorEnum = AuthIndicatorEnum;

const BankAccountTypeEnum = {
CHECKING : 'checking',
SAVINGS : 'savings',
Expand Down Expand Up @@ -7754,7 +7823,8 @@ const PaymentMethodsTypeEnum = {
PAYPAL : 'Paypal',
VISACHECKOUT : 'VisaCheckout',
APPLEPAY : 'ApplePay',
ANDROIDPAY : 'AndroidPay'
ANDROIDPAY : 'AndroidPay',
GOOGLEPAY : 'GooglePay'
};
module.exports.PaymentMethodsTypeEnum = PaymentMethodsTypeEnum;

Expand Down Expand Up @@ -7798,7 +7868,8 @@ const SettingNameEnum = {
HOSTEDPAYMENTSTYLEOPTIONS : 'hostedPaymentStyleOptions',
TYPEEMAILRECEIPT : 'typeEmailReceipt',
HOSTEDPROFILEPAYMENTOPTIONS : 'hostedProfilePaymentOptions',
HOSTEDPROFILESAVEBUTTONTEXT : 'hostedProfileSaveButtonText'
HOSTEDPROFILESAVEBUTTONTEXT : 'hostedProfileSaveButtonText',
HOSTEDPAYMENTVISACHECKOUTOPTIONS : 'hostedPaymentVisaCheckoutOptions'
};
module.exports.SettingNameEnum = SettingNameEnum;

Expand Down
Loading

0 comments on commit bd15ff9

Please sign in to comment.