diff --git a/lib/cardcontact.d.ts b/lib/cardcontact.d.ts new file mode 100644 index 0000000..b123821 --- /dev/null +++ b/lib/cardcontact.d.ts @@ -0,0 +1,132 @@ +import ProcessOut = require('./processout'); +declare class CardContact { + private client; + /** + * Address line of the card holder + * @type {string} + */ + private address1; + /** + * Secondary address line of the card holder + * @type {string} + */ + private address2; + /** + * City of the card holder + * @type {string} + */ + private city; + /** + * State of the card holder + * @type {string} + */ + private state; + /** + * Country code of the card holder (ISO-3166, 2 characters format) + * @type {string} + */ + private countryCode; + /** + * ZIP code of the card holder + * @type {string} + */ + private zip; + /** + * CardContact constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: CardContact); + getProcessOutObjectClass(): string; + /** + * Get Address1 + * Address line of the card holder + * @return {string} + */ + getAddress1(): string; + /** + * Set Address1 + * Address line of the card holder + * @param {string} val + * @return {CardContact} + */ + setAddress1(val: string): CardContact; + /** + * Get Address2 + * Secondary address line of the card holder + * @return {string} + */ + getAddress2(): string; + /** + * Set Address2 + * Secondary address line of the card holder + * @param {string} val + * @return {CardContact} + */ + setAddress2(val: string): CardContact; + /** + * Get City + * City of the card holder + * @return {string} + */ + getCity(): string; + /** + * Set City + * City of the card holder + * @param {string} val + * @return {CardContact} + */ + setCity(val: string): CardContact; + /** + * Get State + * State of the card holder + * @return {string} + */ + getState(): string; + /** + * Set State + * State of the card holder + * @param {string} val + * @return {CardContact} + */ + setState(val: string): CardContact; + /** + * Get CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @return {string} + */ + getCountryCode(): string; + /** + * Set CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @param {string} val + * @return {CardContact} + */ + setCountryCode(val: string): CardContact; + /** + * Get Zip + * ZIP code of the card holder + * @return {string} + */ + getZip(): string; + /** + * Set Zip + * ZIP code of the card holder + * @param {string} val + * @return {CardContact} + */ + setZip(val: string): CardContact; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardContact} + */ + fillWithData(data: any): CardContact; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + toJSON(): any; +} +export = CardContact; +//# sourceMappingURL=cardcontact.d.ts.map \ No newline at end of file diff --git a/lib/cardcontact.d.ts.map b/lib/cardcontact.d.ts.map new file mode 100644 index 0000000..259bf8e --- /dev/null +++ b/lib/cardcontact.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cardcontact.d.ts","sourceRoot":"","sources":["../src/cardcontact.ts"],"names":[],"mappings":"AAIA,OAAO,UAAU,GAAG,QAAQ,cAAc,CAAC,CAAC;AAQ5C,cAAM,WAAW;IACb,OAAO,CAAC,MAAM,CAAoB;IAElC;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAgB;IAEhC;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAgB;IAEhC;;;OAGG;IACH,OAAO,CAAC,IAAI,CAAgB;IAE5B;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAgB;IAE7B;;;OAGG;IACH,OAAO,CAAC,WAAW,CAAgB;IAEnC;;;OAGG;IACH,OAAO,CAAC,GAAG,CAAgB;IAE3B;;;;OAIG;gBACS,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW;IAS7C,wBAAwB,IAAI,MAAM;IAIzC;;;;OAIG;IACI,WAAW,IAAI,MAAM;IAI5B;;;;;OAKG;IACI,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW;IAK5C;;;;OAIG;IACI,WAAW,IAAI,MAAM;IAI5B;;;;;OAKG;IACI,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW;IAK5C;;;;OAIG;IACI,OAAO,IAAI,MAAM;IAIxB;;;;;OAKG;IACI,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW;IAKxC;;;;OAIG;IACI,QAAQ,IAAI,MAAM;IAIzB;;;;;OAKG;IACI,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW;IAKzC;;;;OAIG;IACI,cAAc,IAAI,MAAM;IAI/B;;;;;OAKG;IACI,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW;IAK/C;;;;OAIG;IACI,MAAM,IAAI,MAAM;IAIvB;;;;;OAKG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW;IAKvC;;;;OAIG;IACI,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,WAAW;IAgB3C;;;OAGG;IACI,MAAM,IAAI,GAAG;CAYvB;AACD,SAAS,WAAW,CAAC"} \ No newline at end of file diff --git a/lib/cardcontact.js b/lib/cardcontact.js new file mode 100644 index 0000000..3118d5b --- /dev/null +++ b/lib/cardcontact.js @@ -0,0 +1,195 @@ +"use strict"; +// The content of this file was automatically generated +var CardContact = /** @class */ (function () { + /** + * CardContact constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + function CardContact(client, prefill) { + this.client = null; + /** + * Address line of the card holder + * @type {string} + */ + this.address1 = null; + /** + * Secondary address line of the card holder + * @type {string} + */ + this.address2 = null; + /** + * City of the card holder + * @type {string} + */ + this.city = null; + /** + * State of the card holder + * @type {string} + */ + this.state = null; + /** + * Country code of the card holder (ISO-3166, 2 characters format) + * @type {string} + */ + this.countryCode = null; + /** + * ZIP code of the card holder + * @type {string} + */ + this.zip = null; + if (typeof client === 'undefined') + throw new Error("The CardContact object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newCardContact()"); + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + CardContact.prototype.getProcessOutObjectClass = function () { + return "CardContact"; + }; + /** + * Get Address1 + * Address line of the card holder + * @return {string} + */ + CardContact.prototype.getAddress1 = function () { + return this.address1; + }; + /** + * Set Address1 + * Address line of the card holder + * @param {string} val + * @return {CardContact} + */ + CardContact.prototype.setAddress1 = function (val) { + this.address1 = val; + return this; + }; + /** + * Get Address2 + * Secondary address line of the card holder + * @return {string} + */ + CardContact.prototype.getAddress2 = function () { + return this.address2; + }; + /** + * Set Address2 + * Secondary address line of the card holder + * @param {string} val + * @return {CardContact} + */ + CardContact.prototype.setAddress2 = function (val) { + this.address2 = val; + return this; + }; + /** + * Get City + * City of the card holder + * @return {string} + */ + CardContact.prototype.getCity = function () { + return this.city; + }; + /** + * Set City + * City of the card holder + * @param {string} val + * @return {CardContact} + */ + CardContact.prototype.setCity = function (val) { + this.city = val; + return this; + }; + /** + * Get State + * State of the card holder + * @return {string} + */ + CardContact.prototype.getState = function () { + return this.state; + }; + /** + * Set State + * State of the card holder + * @param {string} val + * @return {CardContact} + */ + CardContact.prototype.setState = function (val) { + this.state = val; + return this; + }; + /** + * Get CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @return {string} + */ + CardContact.prototype.getCountryCode = function () { + return this.countryCode; + }; + /** + * Set CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @param {string} val + * @return {CardContact} + */ + CardContact.prototype.setCountryCode = function (val) { + this.countryCode = val; + return this; + }; + /** + * Get Zip + * ZIP code of the card holder + * @return {string} + */ + CardContact.prototype.getZip = function () { + return this.zip; + }; + /** + * Set Zip + * ZIP code of the card holder + * @param {string} val + * @return {CardContact} + */ + CardContact.prototype.setZip = function (val) { + this.zip = val; + return this; + }; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardContact} + */ + CardContact.prototype.fillWithData = function (data) { + if (data["address1"]) + this.setAddress1(data["address1"]); + if (data["address2"]) + this.setAddress2(data["address2"]); + if (data["city"]) + this.setCity(data["city"]); + if (data["state"]) + this.setState(data["state"]); + if (data["country_code"]) + this.setCountryCode(data["country_code"]); + if (data["zip"]) + this.setZip(data["zip"]); + return this; + }; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + CardContact.prototype.toJSON = function () { + return { + "address1": this.getAddress1(), + "address2": this.getAddress2(), + "city": this.getCity(), + "state": this.getState(), + "country_code": this.getCountryCode(), + "zip": this.getZip(), + }; + }; + return CardContact; +}()); +module.exports = CardContact; +//# sourceMappingURL=cardcontact.js.map \ No newline at end of file diff --git a/lib/cardcontact.js.map b/lib/cardcontact.js.map new file mode 100644 index 0000000..c436c1d --- /dev/null +++ b/lib/cardcontact.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cardcontact.js","sourceRoot":"","sources":["../src/cardcontact.ts"],"names":[],"mappings":";AAAA,uDAAuD;AAYvD;IAuCI;;;;OAIG;IACH,qBAAY,MAAkB,EAAE,OAAoB;QA3C5C,WAAM,GAAe,IAAI,CAAC;QAElC;;;WAGG;QACK,aAAQ,GAAW,IAAI,CAAC;QAEhC;;;WAGG;QACK,aAAQ,GAAW,IAAI,CAAC;QAEhC;;;WAGG;QACK,SAAI,GAAW,IAAI,CAAC;QAE5B;;;WAGG;QACK,UAAK,GAAW,IAAI,CAAC;QAE7B;;;WAGG;QACK,gBAAW,GAAW,IAAI,CAAC;QAEnC;;;WAGG;QACK,QAAG,GAAW,IAAI,CAAC;QAQvB,IAAI,OAAO,MAAM,KAAK,WAAW;YAC7B,MAAM,IAAI,KAAK,CAAC,kKAAkK,CAAC,CAAC;QAExL,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,OAAO,OAAO,KAAK,WAAW;YAC9B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAEM,8CAAwB,GAA/B;QACI,OAAO,aAAa,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACI,iCAAW,GAAlB;QACI,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACI,iCAAW,GAAlB,UAAmB,GAAW;QAC1B,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACI,iCAAW,GAAlB;QACI,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACI,iCAAW,GAAlB,UAAmB,GAAW;QAC1B,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,O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,CAAC;YACb,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACjC,IAAI,IAAI,CAAC,cAAc,CAAC;YACpB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;QAC9C,IAAI,IAAI,CAAC,KAAK,CAAC;YACX,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,4BAAM,GAAb;QACI,OAAO;YACH,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;YAC9B,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;YAC9B,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE;YACxB,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE;YACrC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;SACvB,CAAC;IACN,CAAC;IAGL,kBAAC;AAAD,CAAC,AAtND,IAsNC;AACD,iBAAS,WAAW,CAAC"} \ No newline at end of file diff --git a/lib/cardcreaterequest.d.ts b/lib/cardcreaterequest.d.ts new file mode 100644 index 0000000..34057a5 --- /dev/null +++ b/lib/cardcreaterequest.d.ts @@ -0,0 +1,338 @@ +import ProcessOut = require('./processout'); +import * as p from '.'; +declare class CardCreateRequest { + private client; + /** + * Device used to create the card + * @type {p.Device} + */ + private device; + /** + * Cardholder name + * @type {string} + */ + private name; + /** + * Card PAN (raw) + * @type {string} + */ + private number; + /** + * Card expiration day. Used for Apple Pay + * @type {string} + */ + private expDay; + /** + * Card expiration month + * @type {string} + */ + private expMonth; + /** + * Card expiration year + * @type {string} + */ + private expYear; + /** + * CVC2 + * @type {string} + */ + private cvc2; + /** + * Preferred card scheme + * @type {string} + */ + private preferredScheme; + /** + * Metadata related to the card, in the form of a dictionary (key-value pair) + * @type {any} + */ + private metadata; + /** + * This field defines if the card was tokenized with a 3rd party tokenization method: applepay, googlepay + * @type {string} + */ + private tokenType; + /** + * ECI indicator. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + private eci; + /** + * Cryptogram (Base64-encoded). Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + private cryptogram; + /** + * Raw ApplePay card tokenization response. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + private applepayResponse; + /** + * ApplePay MID. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + private applepayMid; + /** + * Google payment token. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + private paymentToken; + /** + * Cardholder contact information + * @type {p.CardContact} + */ + private contact; + /** + * Cardholder shipping information + * @type {p.CardShipping} + */ + private shipping; + /** + * CardCreateRequest constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: CardCreateRequest); + getProcessOutObjectClass(): string; + /** + * Get Device + * Device used to create the card + * @return {p.Device} + */ + getDevice(): p.Device; + /** + * Set Device + * Device used to create the card + * @param {p.Device} val + * @return {CardCreateRequest} + */ + setDevice(val: p.Device): CardCreateRequest; + /** + * Get Name + * Cardholder name + * @return {string} + */ + getName(): string; + /** + * Set Name + * Cardholder name + * @param {string} val + * @return {CardCreateRequest} + */ + setName(val: string): CardCreateRequest; + /** + * Get Number + * Card PAN (raw) + * @return {string} + */ + getNumber(): string; + /** + * Set Number + * Card PAN (raw) + * @param {string} val + * @return {CardCreateRequest} + */ + setNumber(val: string): CardCreateRequest; + /** + * Get ExpDay + * Card expiration day. Used for Apple Pay + * @return {string} + */ + getExpDay(): string; + /** + * Set ExpDay + * Card expiration day. Used for Apple Pay + * @param {string} val + * @return {CardCreateRequest} + */ + setExpDay(val: string): CardCreateRequest; + /** + * Get ExpMonth + * Card expiration month + * @return {string} + */ + getExpMonth(): string; + /** + * Set ExpMonth + * Card expiration month + * @param {string} val + * @return {CardCreateRequest} + */ + setExpMonth(val: string): CardCreateRequest; + /** + * Get ExpYear + * Card expiration year + * @return {string} + */ + getExpYear(): string; + /** + * Set ExpYear + * Card expiration year + * @param {string} val + * @return {CardCreateRequest} + */ + setExpYear(val: string): CardCreateRequest; + /** + * Get Cvc2 + * CVC2 + * @return {string} + */ + getCvc2(): string; + /** + * Set Cvc2 + * CVC2 + * @param {string} val + * @return {CardCreateRequest} + */ + setCvc2(val: string): CardCreateRequest; + /** + * Get PreferredScheme + * Preferred card scheme + * @return {string} + */ + getPreferredScheme(): string; + /** + * Set PreferredScheme + * Preferred card scheme + * @param {string} val + * @return {CardCreateRequest} + */ + setPreferredScheme(val: string): CardCreateRequest; + /** + * Get Metadata + * Metadata related to the card, in the form of a dictionary (key-value pair) + * @return {any} + */ + getMetadata(): any; + /** + * Set Metadata + * Metadata related to the card, in the form of a dictionary (key-value pair) + * @param {any} val + * @return {CardCreateRequest} + */ + setMetadata(val: any): CardCreateRequest; + /** + * Get TokenType + * This field defines if the card was tokenized with a 3rd party tokenization method: applepay, googlepay + * @return {string} + */ + getTokenType(): string; + /** + * Set TokenType + * This field defines if the card was tokenized with a 3rd party tokenization method: applepay, googlepay + * @param {string} val + * @return {CardCreateRequest} + */ + setTokenType(val: string): CardCreateRequest; + /** + * Get Eci + * ECI indicator. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + getEci(): string; + /** + * Set Eci + * ECI indicator. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + setEci(val: string): CardCreateRequest; + /** + * Get Cryptogram + * Cryptogram (Base64-encoded). Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + getCryptogram(): string; + /** + * Set Cryptogram + * Cryptogram (Base64-encoded). Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + setCryptogram(val: string): CardCreateRequest; + /** + * Get ApplepayResponse + * Raw ApplePay card tokenization response. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + getApplepayResponse(): string; + /** + * Set ApplepayResponse + * Raw ApplePay card tokenization response. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + setApplepayResponse(val: string): CardCreateRequest; + /** + * Get ApplepayMid + * ApplePay MID. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + getApplepayMid(): string; + /** + * Set ApplepayMid + * ApplePay MID. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + setApplepayMid(val: string): CardCreateRequest; + /** + * Get PaymentToken + * Google payment token. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + getPaymentToken(): string; + /** + * Set PaymentToken + * Google payment token. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + setPaymentToken(val: string): CardCreateRequest; + /** + * Get Contact + * Cardholder contact information + * @return {p.CardContact} + */ + getContact(): p.CardContact; + /** + * Set Contact + * Cardholder contact information + * @param {p.CardContact} val + * @return {CardCreateRequest} + */ + setContact(val: p.CardContact): CardCreateRequest; + /** + * Get Shipping + * Cardholder shipping information + * @return {p.CardShipping} + */ + getShipping(): p.CardShipping; + /** + * Set Shipping + * Cardholder shipping information + * @param {p.CardShipping} val + * @return {CardCreateRequest} + */ + setShipping(val: p.CardShipping): CardCreateRequest; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardCreateRequest} + */ + fillWithData(data: any): CardCreateRequest; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + toJSON(): any; + /** + * Create a new card. + * + * @param {any} options + * @return {Promise} + */ + create(options: any): Promise; +} +export = CardCreateRequest; +//# sourceMappingURL=cardcreaterequest.d.ts.map \ No newline at end of file diff --git a/lib/cardcreaterequest.d.ts.map b/lib/cardcreaterequest.d.ts.map new file mode 100644 index 0000000..2306b84 --- /dev/null +++ b/lib/cardcreaterequest.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cardcreaterequest.d.ts","sourceRoot":"","sources":["../src/cardcreaterequest.ts"],"names":[],"m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ACI,cAAc,IAAI,MAAM;IAI/B;;;;;OAKG;IACI,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB;IAKrD;;;;OAIG;IACI,eAAe,IAAI,MAAM;IAIhC;;;;;OAKG;IACI,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB;IAKtD;;;;OAIG;IACI,UAAU,IAAI,CAAC,CAAC,WAAW;IAIlC;;;;;OAKG;IACI,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW,GAAG,iBAAiB;IAYxD;;;;OAIG;IACI,WAAW,IAAI,CAAC,CAAC,YAAY;IAIpC;;;;;OAKG;IACI,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,YAAY,GAAG,iBAAiB;IAY1D;;;;OAIG;IACI,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,iBAAiB;IAsCjD;;;OAGG;IACI,MAAM,IAAI,GAAG;IAsBpB;;;;;OAKG;IACI,MAAM,CAAC,OAAO,KAAA,GAAG,OAAO,CAAC,GAAG,CAAC;CA0CvC;AACD,SAAS,iBAAiB,CAAC"} \ No newline at end of file diff --git a/lib/cardcreaterequest.js b/lib/cardcreaterequest.js new file mode 100644 index 0000000..6a581fe --- /dev/null +++ b/lib/cardcreaterequest.js @@ -0,0 +1,593 @@ +"use strict"; +// The content of this file was automatically generated +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var Response = require("./networking/response"); +var Request = require("./networking/request"); +var ProcessOutNetworkError = require("./errors/processoutnetworkerror"); +var CardCreateRequest = /** @class */ (function () { + /** + * CardCreateRequest constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + function CardCreateRequest(client, prefill) { + this.client = null; + /** + * Device used to create the card + * @type {p.Device} + */ + this.device = null; + /** + * Cardholder name + * @type {string} + */ + this.name = null; + /** + * Card PAN (raw) + * @type {string} + */ + this.number = null; + /** + * Card expiration day. Used for Apple Pay + * @type {string} + */ + this.expDay = null; + /** + * Card expiration month + * @type {string} + */ + this.expMonth = null; + /** + * Card expiration year + * @type {string} + */ + this.expYear = null; + /** + * CVC2 + * @type {string} + */ + this.cvc2 = null; + /** + * Preferred card scheme + * @type {string} + */ + this.preferredScheme = null; + /** + * Metadata related to the card, in the form of a dictionary (key-value pair) + * @type {any} + */ + this.metadata = null; + /** + * This field defines if the card was tokenized with a 3rd party tokenization method: applepay, googlepay + * @type {string} + */ + this.tokenType = null; + /** + * ECI indicator. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + this.eci = null; + /** + * Cryptogram (Base64-encoded). Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + this.cryptogram = null; + /** + * Raw ApplePay card tokenization response. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + this.applepayResponse = null; + /** + * ApplePay MID. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + this.applepayMid = null; + /** + * Google payment token. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + this.paymentToken = null; + /** + * Cardholder contact information + * @type {p.CardContact} + */ + this.contact = null; + /** + * Cardholder shipping information + * @type {p.CardShipping} + */ + this.shipping = null; + if (typeof client === 'undefined') + throw new Error("The CardCreateRequest object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newCardCreateRequest()"); + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + CardCreateRequest.prototype.getProcessOutObjectClass = function () { + return "CardCreateRequest"; + }; + /** + * Get Device + * Device used to create the card + * @return {p.Device} + */ + CardCreateRequest.prototype.getDevice = function () { + return this.device; + }; + /** + * Set Device + * Device used to create the card + * @param {p.Device} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setDevice = function (val) { + if (val.getProcessOutObjectClass && + val.getProcessOutObjectClass() == this.client.newDevice().getProcessOutObjectClass()) + this.device = val; + else { + var obj = this.client.newDevice(); + obj.fillWithData(val); + this.device = obj; + } + return this; + }; + /** + * Get Name + * Cardholder name + * @return {string} + */ + CardCreateRequest.prototype.getName = function () { + return this.name; + }; + /** + * Set Name + * Cardholder name + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setName = function (val) { + this.name = val; + return this; + }; + /** + * Get Number + * Card PAN (raw) + * @return {string} + */ + CardCreateRequest.prototype.getNumber = function () { + return this.number; + }; + /** + * Set Number + * Card PAN (raw) + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setNumber = function (val) { + this.number = val; + return this; + }; + /** + * Get ExpDay + * Card expiration day. Used for Apple Pay + * @return {string} + */ + CardCreateRequest.prototype.getExpDay = function () { + return this.expDay; + }; + /** + * Set ExpDay + * Card expiration day. Used for Apple Pay + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setExpDay = function (val) { + this.expDay = val; + return this; + }; + /** + * Get ExpMonth + * Card expiration month + * @return {string} + */ + CardCreateRequest.prototype.getExpMonth = function () { + return this.expMonth; + }; + /** + * Set ExpMonth + * Card expiration month + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setExpMonth = function (val) { + this.expMonth = val; + return this; + }; + /** + * Get ExpYear + * Card expiration year + * @return {string} + */ + CardCreateRequest.prototype.getExpYear = function () { + return this.expYear; + }; + /** + * Set ExpYear + * Card expiration year + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setExpYear = function (val) { + this.expYear = val; + return this; + }; + /** + * Get Cvc2 + * CVC2 + * @return {string} + */ + CardCreateRequest.prototype.getCvc2 = function () { + return this.cvc2; + }; + /** + * Set Cvc2 + * CVC2 + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setCvc2 = function (val) { + this.cvc2 = val; + return this; + }; + /** + * Get PreferredScheme + * Preferred card scheme + * @return {string} + */ + CardCreateRequest.prototype.getPreferredScheme = function () { + return this.preferredScheme; + }; + /** + * Set PreferredScheme + * Preferred card scheme + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setPreferredScheme = function (val) { + this.preferredScheme = val; + return this; + }; + /** + * Get Metadata + * Metadata related to the card, in the form of a dictionary (key-value pair) + * @return {any} + */ + CardCreateRequest.prototype.getMetadata = function () { + return this.metadata; + }; + /** + * Set Metadata + * Metadata related to the card, in the form of a dictionary (key-value pair) + * @param {any} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setMetadata = function (val) { + this.metadata = val; + return this; + }; + /** + * Get TokenType + * This field defines if the card was tokenized with a 3rd party tokenization method: applepay, googlepay + * @return {string} + */ + CardCreateRequest.prototype.getTokenType = function () { + return this.tokenType; + }; + /** + * Set TokenType + * This field defines if the card was tokenized with a 3rd party tokenization method: applepay, googlepay + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setTokenType = function (val) { + this.tokenType = val; + return this; + }; + /** + * Get Eci + * ECI indicator. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + CardCreateRequest.prototype.getEci = function () { + return this.eci; + }; + /** + * Set Eci + * ECI indicator. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setEci = function (val) { + this.eci = val; + return this; + }; + /** + * Get Cryptogram + * Cryptogram (Base64-encoded). Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + CardCreateRequest.prototype.getCryptogram = function () { + return this.cryptogram; + }; + /** + * Set Cryptogram + * Cryptogram (Base64-encoded). Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setCryptogram = function (val) { + this.cryptogram = val; + return this; + }; + /** + * Get ApplepayResponse + * Raw ApplePay card tokenization response. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + CardCreateRequest.prototype.getApplepayResponse = function () { + return this.applepayResponse; + }; + /** + * Set ApplepayResponse + * Raw ApplePay card tokenization response. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setApplepayResponse = function (val) { + this.applepayResponse = val; + return this; + }; + /** + * Get ApplepayMid + * ApplePay MID. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + CardCreateRequest.prototype.getApplepayMid = function () { + return this.applepayMid; + }; + /** + * Set ApplepayMid + * ApplePay MID. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setApplepayMid = function (val) { + this.applepayMid = val; + return this; + }; + /** + * Get PaymentToken + * Google payment token. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + CardCreateRequest.prototype.getPaymentToken = function () { + return this.paymentToken; + }; + /** + * Set PaymentToken + * Google payment token. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setPaymentToken = function (val) { + this.paymentToken = val; + return this; + }; + /** + * Get Contact + * Cardholder contact information + * @return {p.CardContact} + */ + CardCreateRequest.prototype.getContact = function () { + return this.contact; + }; + /** + * Set Contact + * Cardholder contact information + * @param {p.CardContact} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setContact = function (val) { + if (val.getProcessOutObjectClass && + val.getProcessOutObjectClass() == this.client.newCardContact().getProcessOutObjectClass()) + this.contact = val; + else { + var obj = this.client.newCardContact(); + obj.fillWithData(val); + this.contact = obj; + } + return this; + }; + /** + * Get Shipping + * Cardholder shipping information + * @return {p.CardShipping} + */ + CardCreateRequest.prototype.getShipping = function () { + return this.shipping; + }; + /** + * Set Shipping + * Cardholder shipping information + * @param {p.CardShipping} val + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.setShipping = function (val) { + if (val.getProcessOutObjectClass && + val.getProcessOutObjectClass() == this.client.newCardShipping().getProcessOutObjectClass()) + this.shipping = val; + else { + var obj = this.client.newCardShipping(); + obj.fillWithData(val); + this.shipping = obj; + } + return this; + }; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardCreateRequest} + */ + CardCreateRequest.prototype.fillWithData = function (data) { + if (data["device"]) + this.setDevice(data["device"]); + if (data["name"]) + this.setName(data["name"]); + if (data["number"]) + this.setNumber(data["number"]); + if (data["exp_day"]) + this.setExpDay(data["exp_day"]); + if (data["exp_month"]) + this.setExpMonth(data["exp_month"]); + if (data["exp_year"]) + this.setExpYear(data["exp_year"]); + if (data["cvc2"]) + this.setCvc2(data["cvc2"]); + if (data["preferred_scheme"]) + this.setPreferredScheme(data["preferred_scheme"]); + if (data["metadata"]) + this.setMetadata(data["metadata"]); + if (data["token_type"]) + this.setTokenType(data["token_type"]); + if (data["eci"]) + this.setEci(data["eci"]); + if (data["cryptogram"]) + this.setCryptogram(data["cryptogram"]); + if (data["applepay_response"]) + this.setApplepayResponse(data["applepay_response"]); + if (data["applepay_mid"]) + this.setApplepayMid(data["applepay_mid"]); + if (data["payment_token"]) + this.setPaymentToken(data["payment_token"]); + if (data["contact"]) + this.setContact(data["contact"]); + if (data["shipping"]) + this.setShipping(data["shipping"]); + return this; + }; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + CardCreateRequest.prototype.toJSON = function () { + return { + "device": this.getDevice(), + "name": this.getName(), + "number": this.getNumber(), + "exp_day": this.getExpDay(), + "exp_month": this.getExpMonth(), + "exp_year": this.getExpYear(), + "cvc2": this.getCvc2(), + "preferred_scheme": this.getPreferredScheme(), + "metadata": this.getMetadata(), + "token_type": this.getTokenType(), + "eci": this.getEci(), + "cryptogram": this.getCryptogram(), + "applepay_response": this.getApplepayResponse(), + "applepay_mid": this.getApplepayMid(), + "payment_token": this.getPaymentToken(), + "contact": this.getContact(), + "shipping": this.getShipping(), + }; + }; + /** + * Create a new card. + * + * @param {any} options + * @return {Promise} + */ + CardCreateRequest.prototype.create = function (options) { + if (!options) + options = {}; + this.fillWithData(options); + var request = new Request(this.client); + var path = "/cards"; + var data = {}; + var cur = this; + return new Promise(function (resolve, reject) { + var callback = function (resp) { + return __awaiter(this, void 0, void 0, function () { + var respBody, err_1, response, err, returnValues, body; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + respBody = {}; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, resp.json()]; + case 2: + respBody = _a.sent(); + return [3 /*break*/, 4]; + case 3: + err_1 = _a.sent(); + return [3 /*break*/, 4]; + case 4: + response = new Response(resp, respBody); + err = response.check(); + if (err != null) + return [2 /*return*/, reject(err)]; + returnValues = []; + body = respBody; + body = body['card']; + returnValues.push(cur.fillWithData(body)); + return [2 /*return*/, resolve.apply(this, returnValues)]; + } + }); + }); + }; + var callbackError = function (err) { + return reject(new ProcessOutNetworkError('processout-sdk.network-issue', err.message)); + }; + request.post(path, data, options).then(callback, callbackError); + }); + }; + return CardCreateRequest; +}()); +module.exports = CardCreateRequest; +//# sourceMappingURL=cardcreaterequest.js.map \ No newline at end of file diff --git a/lib/cardcreaterequest.js.map b/lib/cardcreaterequest.js.map new file mode 100644 index 0000000..d4cb013 --- /dev/null +++ b/lib/cardcreaterequest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cardcreaterequest.js","sourceRoot":"","sources":["../src/cardcreaterequest.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKvD,gDAAqD;AACrD,8CAAoD;AAEpD,wEAA2E;AAI3E;IAyGI;;;;OAIG;IACH,2BAAY,MAAkB,EAAE,OAA0B;QA7GlD,WAAM,GAAe,IAAI,CAAC;QAElC;;;WAGG;QACK,WAAM,GAAa,IAAI,CAAC;QAEhC;;;WAGG;QACK,SAAI,GAAW,IAAI,CAAC;QAE5B;;;WAGG;QACK,WAAM,GAAW,IAAI,CAAC;QAE9B;;;WAGG;QACK,WAAM,GAAW,IAAI,CAAC;QAE9B;;;WAGG;QACK,aAAQ,GAAW,IAAI,CAAC;QAEhC;;;WAGG;QACK,YAAO,GAAW,IAAI,CAAC;QAE/B;;;WAGG;QACK,SAAI,GAAW,IAAI,CAAC;QAE5B;;;WAGG;QACK,oBAAe,GAAW,IAAI,CAAC;QAEvC;;;WAGG;QACK,aAAQ,GAAQ,IAAI,CAAC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;gCAEpB,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;gCAE1C,sBAAO,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,YAAY,CAAC,EAAC;;;;aAC5C,CAAC;YACF,IAAI,aAAa,GAAG,UAAS,GAAG;gBAC5B,OAAO,MAAM,CAAC,IAAI,sBAAsB,CAAC,8BAA8B,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3F,CAAC,CAAC;YAEF,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC;IACX,CAAC;IAEL,wBAAC;AAAD,CAAC,AAzlBD,IAylBC;AACD,iBAAS,iBAAiB,CAAC"} \ No newline at end of file diff --git a/lib/cardshipping.d.ts b/lib/cardshipping.d.ts new file mode 100644 index 0000000..25b88bc --- /dev/null +++ b/lib/cardshipping.d.ts @@ -0,0 +1,151 @@ +import ProcessOut = require('./processout'); +import * as p from '.'; +declare class CardShipping { + private client; + /** + * Address line of the card holder + * @type {string} + */ + private address1; + /** + * Secondary address line of the card holder + * @type {string} + */ + private address2; + /** + * City of the card holder + * @type {string} + */ + private city; + /** + * State of the card holder + * @type {string} + */ + private state; + /** + * Country code of the card holder (ISO-3166, 2 characters format) + * @type {string} + */ + private countryCode; + /** + * ZIP code of the card holder + * @type {string} + */ + private zip; + /** + * Shipping phone number + * @type {p.Phone} + */ + private phone; + /** + * CardShipping constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: CardShipping); + getProcessOutObjectClass(): string; + /** + * Get Address1 + * Address line of the card holder + * @return {string} + */ + getAddress1(): string; + /** + * Set Address1 + * Address line of the card holder + * @param {string} val + * @return {CardShipping} + */ + setAddress1(val: string): CardShipping; + /** + * Get Address2 + * Secondary address line of the card holder + * @return {string} + */ + getAddress2(): string; + /** + * Set Address2 + * Secondary address line of the card holder + * @param {string} val + * @return {CardShipping} + */ + setAddress2(val: string): CardShipping; + /** + * Get City + * City of the card holder + * @return {string} + */ + getCity(): string; + /** + * Set City + * City of the card holder + * @param {string} val + * @return {CardShipping} + */ + setCity(val: string): CardShipping; + /** + * Get State + * State of the card holder + * @return {string} + */ + getState(): string; + /** + * Set State + * State of the card holder + * @param {string} val + * @return {CardShipping} + */ + setState(val: string): CardShipping; + /** + * Get CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @return {string} + */ + getCountryCode(): string; + /** + * Set CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @param {string} val + * @return {CardShipping} + */ + setCountryCode(val: string): CardShipping; + /** + * Get Zip + * ZIP code of the card holder + * @return {string} + */ + getZip(): string; + /** + * Set Zip + * ZIP code of the card holder + * @param {string} val + * @return {CardShipping} + */ + setZip(val: string): CardShipping; + /** + * Get Phone + * Shipping phone number + * @return {p.Phone} + */ + getPhone(): p.Phone; + /** + * Set Phone + * Shipping phone number + * @param {p.Phone} val + * @return {CardShipping} + */ + setPhone(val: p.Phone): CardShipping; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardShipping} + */ + fillWithData(data: any): CardShipping; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + toJSON(): any; +} +export = CardShipping; +//# sourceMappingURL=cardshipping.d.ts.map \ No newline at end of file diff --git a/lib/cardshipping.d.ts.map b/lib/cardshipping.d.ts.map new file mode 100644 index 0000000..88d70c2 --- /dev/null +++ b/lib/cardshipping.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cardshipping.d.ts","sourceRoot":"","sources":["../src/cardshipping.ts"],"names":[],"mappings":"AAIA,OAAO,UAAU,GAAG,QAAQ,cAAc,CAAC,CAAC;AAM5C,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;AAEvB,cAAM,YAAY;IACd,OAAO,CAAC,MAAM,CAAoB;IAElC;;;OAGG;IACH,O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GG;IACI,MAAM,IAAI,GAAG;CAavB;AACD,SAAS,YAAY,CAAC"} \ No newline at end of file diff --git a/lib/cardshipping.js b/lib/cardshipping.js new file mode 100644 index 0000000..39280de --- /dev/null +++ b/lib/cardshipping.js @@ -0,0 +1,228 @@ +"use strict"; +// The content of this file was automatically generated +var CardShipping = /** @class */ (function () { + /** + * CardShipping constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + function CardShipping(client, prefill) { + this.client = null; + /** + * Address line of the card holder + * @type {string} + */ + this.address1 = null; + /** + * Secondary address line of the card holder + * @type {string} + */ + this.address2 = null; + /** + * City of the card holder + * @type {string} + */ + this.city = null; + /** + * State of the card holder + * @type {string} + */ + this.state = null; + /** + * Country code of the card holder (ISO-3166, 2 characters format) + * @type {string} + */ + this.countryCode = null; + /** + * ZIP code of the card holder + * @type {string} + */ + this.zip = null; + /** + * Shipping phone number + * @type {p.Phone} + */ + this.phone = null; + if (typeof client === 'undefined') + throw new Error("The CardShipping object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newCardShipping()"); + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + CardShipping.prototype.getProcessOutObjectClass = function () { + return "CardShipping"; + }; + /** + * Get Address1 + * Address line of the card holder + * @return {string} + */ + CardShipping.prototype.getAddress1 = function () { + return this.address1; + }; + /** + * Set Address1 + * Address line of the card holder + * @param {string} val + * @return {CardShipping} + */ + CardShipping.prototype.setAddress1 = function (val) { + this.address1 = val; + return this; + }; + /** + * Get Address2 + * Secondary address line of the card holder + * @return {string} + */ + CardShipping.prototype.getAddress2 = function () { + return this.address2; + }; + /** + * Set Address2 + * Secondary address line of the card holder + * @param {string} val + * @return {CardShipping} + */ + CardShipping.prototype.setAddress2 = function (val) { + this.address2 = val; + return this; + }; + /** + * Get City + * City of the card holder + * @return {string} + */ + CardShipping.prototype.getCity = function () { + return this.city; + }; + /** + * Set City + * City of the card holder + * @param {string} val + * @return {CardShipping} + */ + CardShipping.prototype.setCity = function (val) { + this.city = val; + return this; + }; + /** + * Get State + * State of the card holder + * @return {string} + */ + CardShipping.prototype.getState = function () { + return this.state; + }; + /** + * Set State + * State of the card holder + * @param {string} val + * @return {CardShipping} + */ + CardShipping.prototype.setState = function (val) { + this.state = val; + return this; + }; + /** + * Get CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @return {string} + */ + CardShipping.prototype.getCountryCode = function () { + return this.countryCode; + }; + /** + * Set CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @param {string} val + * @return {CardShipping} + */ + CardShipping.prototype.setCountryCode = function (val) { + this.countryCode = val; + return this; + }; + /** + * Get Zip + * ZIP code of the card holder + * @return {string} + */ + CardShipping.prototype.getZip = function () { + return this.zip; + }; + /** + * Set Zip + * ZIP code of the card holder + * @param {string} val + * @return {CardShipping} + */ + CardShipping.prototype.setZip = function (val) { + this.zip = val; + return this; + }; + /** + * Get Phone + * Shipping phone number + * @return {p.Phone} + */ + CardShipping.prototype.getPhone = function () { + return this.phone; + }; + /** + * Set Phone + * Shipping phone number + * @param {p.Phone} val + * @return {CardShipping} + */ + CardShipping.prototype.setPhone = function (val) { + if (val.getProcessOutObjectClass && + val.getProcessOutObjectClass() == this.client.newPhone().getProcessOutObjectClass()) + this.phone = val; + else { + var obj = this.client.newPhone(); + obj.fillWithData(val); + this.phone = obj; + } + return this; + }; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardShipping} + */ + CardShipping.prototype.fillWithData = function (data) { + if (data["address1"]) + this.setAddress1(data["address1"]); + if (data["address2"]) + this.setAddress2(data["address2"]); + if (data["city"]) + this.setCity(data["city"]); + if (data["state"]) + this.setState(data["state"]); + if (data["country_code"]) + this.setCountryCode(data["country_code"]); + if (data["zip"]) + this.setZip(data["zip"]); + if (data["phone"]) + this.setPhone(data["phone"]); + return this; + }; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + CardShipping.prototype.toJSON = function () { + return { + "address1": this.getAddress1(), + "address2": this.getAddress2(), + "city": this.getCity(), + "state": this.getState(), + "country_code": this.getCountryCode(), + "zip": this.getZip(), + "phone": this.getPhone(), + }; + }; + return CardShipping; +}()); +module.exports = CardShipping; +//# sourceMappingURL=cardshipping.js.map \ No newline at end of file diff --git a/lib/cardshipping.js.map b/lib/cardshipping.js.map new file mode 100644 index 0000000..31947a2 --- /dev/null +++ b/lib/cardshipping.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cardshipping.js","sourceRoot":"","sources":["../src/cardshipping.ts"],"names":[],"mappings":";AAAA,uDAAuD;AAYvD;IA6CI;;;;OAIG;IACH,sBAAY,MAAkB,EAAE,OAAqB;QAjD7C,WAAM,GAAe,IAAI,CAAC;QAElC;;;WAGG;QACK,aAAQ,GAAW,IAAI,CAAC;QAEhC;;;WAGG;QACK,aAAQ,GAAW,IAAI,CAAC;QAEhC;;;WAGG;QACK,SAAI,GAAW,IAAI,CAAC;QAE5B;;;WAGG;QACK,UAAK,GAAW,IAAI,CAAC;QAE7B;;;WAGG;QACK,gBAAW,GAAW,IAAI,CAAC;QAEnC;;;WAGG;QACK,QAAG,GAAW,IAAI,CAAC;QAE3B;;;WAGG;QACK,UAAK,GAAY,IAAI,CAAC;QAQ1B,IAAI,OAAO,MAAM,KAAK,WAAW;YAC7B,MAAM,IAAI,KAAK,CAAC,oKAAoK,CAAC,CAAC;QAE1L,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,OAAO,OAAO,KAAK,WAAW;YAC9B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAEM,+CAAwB,GAA/B;QACI,OAAO,cAAc,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACI,kCAAW,GAAlB;QACI,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACI,kCAAW,GAAlB,UAAmB,GAAW;QAC1B,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,OAAO,IAAI,C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E,IAAI,CAAC,WAAW,EAAE;YAC9B,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE;YACxB,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE;YACrC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;YACpB,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE;SAC3B,CAAC;IACN,CAAC;IAGL,mBAAC;AAAD,CAAC,AA1PD,IA0PC;AACD,iBAAS,YAAY,CAAC"} \ No newline at end of file diff --git a/lib/cardupdaterequest.d.ts b/lib/cardupdaterequest.d.ts new file mode 100644 index 0000000..04fc681 --- /dev/null +++ b/lib/cardupdaterequest.d.ts @@ -0,0 +1,85 @@ +import ProcessOut = require('./processout'); +declare class CardUpdateRequest { + private client; + /** + * Card update type. Possible values: "new-cvc2" or "other" + * @type {string} + */ + private updateType; + /** + * Card update reason. + * @type {string} + */ + private updateReason; + /** + * Customer preferred scheme, such as carte bancaire vs visa + * @type {string} + */ + private preferredScheme; + /** + * CardUpdateRequest constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: CardUpdateRequest); + getProcessOutObjectClass(): string; + /** + * Get UpdateType + * Card update type. Possible values: "new-cvc2" or "other" + * @return {string} + */ + getUpdateType(): string; + /** + * Set UpdateType + * Card update type. Possible values: "new-cvc2" or "other" + * @param {string} val + * @return {CardUpdateRequest} + */ + setUpdateType(val: string): CardUpdateRequest; + /** + * Get UpdateReason + * Card update reason. + * @return {string} + */ + getUpdateReason(): string; + /** + * Set UpdateReason + * Card update reason. + * @param {string} val + * @return {CardUpdateRequest} + */ + setUpdateReason(val: string): CardUpdateRequest; + /** + * Get PreferredScheme + * Customer preferred scheme, such as carte bancaire vs visa + * @return {string} + */ + getPreferredScheme(): string; + /** + * Set PreferredScheme + * Customer preferred scheme, such as carte bancaire vs visa + * @param {string} val + * @return {CardUpdateRequest} + */ + setPreferredScheme(val: string): CardUpdateRequest; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardUpdateRequest} + */ + fillWithData(data: any): CardUpdateRequest; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + toJSON(): any; + /** + * Update a card by its ID. + * @param string cardId + * @param {any} options + * @return {Promise} + */ + update(cardId: string, options: any): Promise; +} +export = CardUpdateRequest; +//# sourceMappingURL=cardupdaterequest.d.ts.map \ No newline at end of file diff --git a/lib/cardupdaterequest.d.ts.map b/lib/cardupdaterequest.d.ts.map new file mode 100644 index 0000000..eba7da1 --- /dev/null +++ b/lib/cardupdaterequest.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cardupdaterequest.d.ts","sourceRoot":"","sources":["../src/cardupdaterequest.ts"],"names":[],"mappings":"AAIA,OAAO,UAAU,GAAG,QAAQ,cAAc,CAAC,CAAC;AAQ5C,cAAM,iBAAiB;IACnB,OAAO,CAAC,MAAM,CAAoB;IAElC;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAgB;IAElC;;;OAGG;IACH,OAAO,CAAC,YAAY,CAAgB;IAEpC;;;OAGG;IACH,OAAO,CAAC,eAAe,CAAgB;IAEvC;;;;OAIG;gBACS,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB;IASnD,wBAAwB,IAAI,MAAM;IAIzC;;;;OAIG;IACI,aAAa,IAAI,MAAM;IAI9B;;;;;OAKG;IACI,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB;IAKpD;;;;OAIG;IACI,eAAe,IAAI,MAAM;IAIhC;;;;;OAKG;IACI,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB;IAKtD;;;;OAIG;IACI,kBAAkB,IAAI,MAAM;IAInC;;;;;OAKG;IACI,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB;IAKzD;;;;OAIG;IACI,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,iBAAiB;IAUjD;;;OAGG;IACI,MAAM,IAAI,GAAG;IAQpB;;;;;OAKG;IACI,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,KAAA,GAAG,OAAO,CAAC,GAAG,CAAC;CA0CvD;AACD,SAAS,iBAAiB,CAAC"} \ No newline at end of file diff --git a/lib/cardupdaterequest.js b/lib/cardupdaterequest.js new file mode 100644 index 0000000..390faef --- /dev/null +++ b/lib/cardupdaterequest.js @@ -0,0 +1,208 @@ +"use strict"; +// The content of this file was automatically generated +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var Response = require("./networking/response"); +var Request = require("./networking/request"); +var ProcessOutNetworkError = require("./errors/processoutnetworkerror"); +var CardUpdateRequest = /** @class */ (function () { + /** + * CardUpdateRequest constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + function CardUpdateRequest(client, prefill) { + this.client = null; + /** + * Card update type. Possible values: "new-cvc2" or "other" + * @type {string} + */ + this.updateType = null; + /** + * Card update reason. + * @type {string} + */ + this.updateReason = null; + /** + * Customer preferred scheme, such as carte bancaire vs visa + * @type {string} + */ + this.preferredScheme = null; + if (typeof client === 'undefined') + throw new Error("The CardUpdateRequest object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newCardUpdateRequest()"); + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + CardUpdateRequest.prototype.getProcessOutObjectClass = function () { + return "CardUpdateRequest"; + }; + /** + * Get UpdateType + * Card update type. Possible values: "new-cvc2" or "other" + * @return {string} + */ + CardUpdateRequest.prototype.getUpdateType = function () { + return this.updateType; + }; + /** + * Set UpdateType + * Card update type. Possible values: "new-cvc2" or "other" + * @param {string} val + * @return {CardUpdateRequest} + */ + CardUpdateRequest.prototype.setUpdateType = function (val) { + this.updateType = val; + return this; + }; + /** + * Get UpdateReason + * Card update reason. + * @return {string} + */ + CardUpdateRequest.prototype.getUpdateReason = function () { + return this.updateReason; + }; + /** + * Set UpdateReason + * Card update reason. + * @param {string} val + * @return {CardUpdateRequest} + */ + CardUpdateRequest.prototype.setUpdateReason = function (val) { + this.updateReason = val; + return this; + }; + /** + * Get PreferredScheme + * Customer preferred scheme, such as carte bancaire vs visa + * @return {string} + */ + CardUpdateRequest.prototype.getPreferredScheme = function () { + return this.preferredScheme; + }; + /** + * Set PreferredScheme + * Customer preferred scheme, such as carte bancaire vs visa + * @param {string} val + * @return {CardUpdateRequest} + */ + CardUpdateRequest.prototype.setPreferredScheme = function (val) { + this.preferredScheme = val; + return this; + }; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardUpdateRequest} + */ + CardUpdateRequest.prototype.fillWithData = function (data) { + if (data["update_type"]) + this.setUpdateType(data["update_type"]); + if (data["update_reason"]) + this.setUpdateReason(data["update_reason"]); + if (data["preferred_scheme"]) + this.setPreferredScheme(data["preferred_scheme"]); + return this; + }; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + CardUpdateRequest.prototype.toJSON = function () { + return { + "update_type": this.getUpdateType(), + "update_reason": this.getUpdateReason(), + "preferred_scheme": this.getPreferredScheme(), + }; + }; + /** + * Update a card by its ID. + * @param string cardId + * @param {any} options + * @return {Promise} + */ + CardUpdateRequest.prototype.update = function (cardId, options) { + if (!options) + options = {}; + this.fillWithData(options); + var request = new Request(this.client); + var path = "/cards/" + encodeURI(cardId) + ""; + var data = {}; + var cur = this; + return new Promise(function (resolve, reject) { + var callback = function (resp) { + return __awaiter(this, void 0, void 0, function () { + var respBody, err_1, response, err, returnValues, body; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + respBody = {}; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, resp.json()]; + case 2: + respBody = _a.sent(); + return [3 /*break*/, 4]; + case 3: + err_1 = _a.sent(); + return [3 /*break*/, 4]; + case 4: + response = new Response(resp, respBody); + err = response.check(); + if (err != null) + return [2 /*return*/, reject(err)]; + returnValues = []; + body = respBody; + body = body['card']; + returnValues.push(cur.fillWithData(body)); + return [2 /*return*/, resolve.apply(this, returnValues)]; + } + }); + }); + }; + var callbackError = function (err) { + return reject(new ProcessOutNetworkError('processout-sdk.network-issue', err.message)); + }; + request.put(path, data, options).then(callback, callbackError); + }); + }; + return CardUpdateRequest; +}()); +module.exports = CardUpdateRequest; +//# sourceMappingURL=cardupdaterequest.js.map \ No newline at end of file diff --git a/lib/cardupdaterequest.js.map b/lib/cardupdaterequest.js.map new file mode 100644 index 0000000..5c45daa --- /dev/null +++ b/lib/cardupdaterequest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cardupdaterequest.js","sourceRoot":"","sources":["../src/cardupdaterequest.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKvD,gDAAqD;AACrD,8CAAoD;AAEpD,wEAA2E;AAI3E;IAqBI;;;;OAIG;IACH,2BAAY,MAAkB,EAAE,OAA0B;QAzBlD,WAAM,GAAe,IAAI,CAAC;QAElC;;;WAGG;QACK,eAAU,GAAW,IAAI,CAAC;QAElC;;;WAGG;QACK,iBAAY,GAAW,IAAI,CAAC;QAEpC;;;WAGG;QACK,oBAAe,GAAW,IAAI,CAAC;QAQnC,IAAI,OAAO,MAAM,KAAK,WAAW;YAC7B,MAAM,IAAI,KAAK,CAAC,8KAA8K,CAAC,CAAC;QAEpM,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,OAAO,OAAO,KAAK,WAAW;YAC9B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAEM,oDAAwB,GAA/B;QACI,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACI,yCAAa,GAApB;QACI,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED;;;;;OAKG;IACI,yCAAa,GAApB,UAAqB,GAAW;QAC5B,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACI,2CAAe,GAAtB;QACI,OAAO,IAAI,CAAC,YAAY,CAAC;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ecefa --- /dev/null +++ b/lib/device.d.ts @@ -0,0 +1,258 @@ +import ProcessOut = require('./processout'); +declare class Device { + private client; + /** + * Request origin. Use "backend" if the request is not coming directly from the frontend + * @type {string} + */ + private requestOrigin; + /** + * Device identifier + * @type {string} + */ + private id; + /** + * Device channel. Possible values: "web", "ios", "android", "other" + * @type {string} + */ + private channel; + /** + * Device IP address. Use if request origin is "backend" + * @type {string} + */ + private ipAddress; + /** + * Device user agent. Use if request origin is "backend" + * @type {string} + */ + private userAgent; + /** + * Device accept header. Use if request origin is "backend" + * @type {string} + */ + private headerAccept; + /** + * Device referer header. Use if request origin is "backend" + * @type {string} + */ + private headerReferer; + /** + * Device color depth. Use if request origin is "backend" + * @type {number} + */ + private appColorDepth; + /** + * Device Java enabled. Use if request origin is "backend" + * @type {boolean} + */ + private appJavaEnabled; + /** + * Device language. Use if request origin is "backend" + * @type {string} + */ + private appLanguage; + /** + * Device screen height. Use if request origin is "backend" + * @type {number} + */ + private appScreenHeight; + /** + * Device screen width. Use if request origin is "backend" + * @type {number} + */ + private appScreenWidth; + /** + * Device timezone offset. Use if request origin is "backend" + * @type {number} + */ + private appTimezoneOffset; + /** + * Device constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: Device); + getProcessOutObjectClass(): string; + /** + * Get RequestOrigin + * Request origin. Use "backend" if the request is not coming directly from the frontend + * @return {string} + */ + getRequestOrigin(): string; + /** + * Set RequestOrigin + * Request origin. Use "backend" if the request is not coming directly from the frontend + * @param {string} val + * @return {Device} + */ + setRequestOrigin(val: string): Device; + /** + * Get Id + * Device identifier + * @return {string} + */ + getId(): string; + /** + * Set Id + * Device identifier + * @param {string} val + * @return {Device} + */ + setId(val: string): Device; + /** + * Get Channel + * Device channel. Possible values: "web", "ios", "android", "other" + * @return {string} + */ + getChannel(): string; + /** + * Set Channel + * Device channel. Possible values: "web", "ios", "android", "other" + * @param {string} val + * @return {Device} + */ + setChannel(val: string): Device; + /** + * Get IpAddress + * Device IP address. Use if request origin is "backend" + * @return {string} + */ + getIpAddress(): string; + /** + * Set IpAddress + * Device IP address. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + setIpAddress(val: string): Device; + /** + * Get UserAgent + * Device user agent. Use if request origin is "backend" + * @return {string} + */ + getUserAgent(): string; + /** + * Set UserAgent + * Device user agent. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + setUserAgent(val: string): Device; + /** + * Get HeaderAccept + * Device accept header. Use if request origin is "backend" + * @return {string} + */ + getHeaderAccept(): string; + /** + * Set HeaderAccept + * Device accept header. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + setHeaderAccept(val: string): Device; + /** + * Get HeaderReferer + * Device referer header. Use if request origin is "backend" + * @return {string} + */ + getHeaderReferer(): string; + /** + * Set HeaderReferer + * Device referer header. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + setHeaderReferer(val: string): Device; + /** + * Get AppColorDepth + * Device color depth. Use if request origin is "backend" + * @return {number} + */ + getAppColorDepth(): number; + /** + * Set AppColorDepth + * Device color depth. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + setAppColorDepth(val: number): Device; + /** + * Get AppJavaEnabled + * Device Java enabled. Use if request origin is "backend" + * @return {boolean} + */ + getAppJavaEnabled(): boolean; + /** + * Set AppJavaEnabled + * Device Java enabled. Use if request origin is "backend" + * @param {boolean} val + * @return {Device} + */ + setAppJavaEnabled(val: boolean): Device; + /** + * Get AppLanguage + * Device language. Use if request origin is "backend" + * @return {string} + */ + getAppLanguage(): string; + /** + * Set AppLanguage + * Device language. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + setAppLanguage(val: string): Device; + /** + * Get AppScreenHeight + * Device screen height. Use if request origin is "backend" + * @return {number} + */ + getAppScreenHeight(): number; + /** + * Set AppScreenHeight + * Device screen height. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + setAppScreenHeight(val: number): Device; + /** + * Get AppScreenWidth + * Device screen width. Use if request origin is "backend" + * @return {number} + */ + getAppScreenWidth(): number; + /** + * Set AppScreenWidth + * Device screen width. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + setAppScreenWidth(val: number): Device; + /** + * Get AppTimezoneOffset + * Device timezone offset. Use if request origin is "backend" + * @return {number} + */ + getAppTimezoneOffset(): number; + /** + * Set AppTimezoneOffset + * Device timezone offset. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + setAppTimezoneOffset(val: number): Device; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {Device} + */ + fillWithData(data: any): Device; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + toJSON(): any; +} +export = Device; +//# sourceMappingURL=device.d.ts.map \ No newline at end of file diff --git a/lib/device.d.ts.map b/lib/device.d.ts.map new file mode 100644 index 0000000..f2c8ab3 --- /dev/null +++ b/lib/device.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAIA,OAAO,UAAU,GAAG,QAAQ,cAAc,CAAC,CAAC;AAQ5C,cAAM,MAAM;IACR,OAAO,CAAC,MAAM,CAAoB;IAElC;;;OAGG;IACH,OAAO,CAAC,aAAa,CAAgB;IAErC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAgB;IAE1B;;;OAGG;IACH,OAAO,CAAC,OAAO,CAAgB;IAE/B;;;OAGG;IACH,OAAO,CAAC,SAAS,CAAgB;IAEjC;;;OAGG;IACH,OAAO,CAAC,SAAS,CAAgB;IAEjC;;;OAGG;IACH,OAAO,CAAC,YAAY,CAAgB;IAEpC;;;OAGG;IACH,OAAO,CAAC,aAAa,CAAgB;IAErC;;;OAGG;IACH,OAAO,CAAC,aAAa,CAAgB;IAErC;;;OAGG;IACH,OAAO,CAAC,cAAc,CAAiB;IAEvC;;;OAGG;IACH,OAAO,CAAC,WAAW,CAAgB;IAEnC;;;OAGG;IACH,OAAO,CAAC,eAAe,CAAgB;IAEvC;;;OAGG;IACH,OAAO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;;OAIG;IACI,kBAAkB,IAAI,MAAM;IAInC;;;;;OAKG;IACI,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAK9C;;;;OAIG;IACI,iBAAiB,IAAI,MAAM;IAIlC;;;;;OAKG;IACI,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAK7C;;;;OAIG;IACI,oBAAoB,IAAI,MAAM;IAIrC;;;;;OAKG;IACI,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAKhD;;;;OAIG;IACI,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IA8BtC;;;OAGG;IACI,MAAM,IAAI,GAAG;CAmBvB;AACD,SAAS,MAAM,CAAC"} \ No newline at end of file diff --git a/lib/device.js b/lib/device.js new file mode 100644 index 0000000..bd8a2cd --- /dev/null +++ b/lib/device.js @@ -0,0 +1,377 @@ +"use strict"; +// The content of this file was automatically generated +var Device = /** @class */ (function () { + /** + * Device constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + function Device(client, prefill) { + this.client = null; + /** + * Request origin. Use "backend" if the request is not coming directly from the frontend + * @type {string} + */ + this.requestOrigin = null; + /** + * Device identifier + * @type {string} + */ + this.id = null; + /** + * Device channel. Possible values: "web", "ios", "android", "other" + * @type {string} + */ + this.channel = null; + /** + * Device IP address. Use if request origin is "backend" + * @type {string} + */ + this.ipAddress = null; + /** + * Device user agent. Use if request origin is "backend" + * @type {string} + */ + this.userAgent = null; + /** + * Device accept header. Use if request origin is "backend" + * @type {string} + */ + this.headerAccept = null; + /** + * Device referer header. Use if request origin is "backend" + * @type {string} + */ + this.headerReferer = null; + /** + * Device color depth. Use if request origin is "backend" + * @type {number} + */ + this.appColorDepth = null; + /** + * Device Java enabled. Use if request origin is "backend" + * @type {boolean} + */ + this.appJavaEnabled = null; + /** + * Device language. Use if request origin is "backend" + * @type {string} + */ + this.appLanguage = null; + /** + * Device screen height. Use if request origin is "backend" + * @type {number} + */ + this.appScreenHeight = null; + /** + * Device screen width. Use if request origin is "backend" + * @type {number} + */ + this.appScreenWidth = null; + /** + * Device timezone offset. Use if request origin is "backend" + * @type {number} + */ + this.appTimezoneOffset = null; + if (typeof client === 'undefined') + throw new Error("The Device object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newDevice()"); + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + Device.prototype.getProcessOutObjectClass = function () { + return "Device"; + }; + /** + * Get RequestOrigin + * Request origin. Use "backend" if the request is not coming directly from the frontend + * @return {string} + */ + Device.prototype.getRequestOrigin = function () { + return this.requestOrigin; + }; + /** + * Set RequestOrigin + * Request origin. Use "backend" if the request is not coming directly from the frontend + * @param {string} val + * @return {Device} + */ + Device.prototype.setRequestOrigin = function (val) { + this.requestOrigin = val; + return this; + }; + /** + * Get Id + * Device identifier + * @return {string} + */ + Device.prototype.getId = function () { + return this.id; + }; + /** + * Set Id + * Device identifier + * @param {string} val + * @return {Device} + */ + Device.prototype.setId = function (val) { + this.id = val; + return this; + }; + /** + * Get Channel + * Device channel. Possible values: "web", "ios", "android", "other" + * @return {string} + */ + Device.prototype.getChannel = function () { + return this.channel; + }; + /** + * Set Channel + * Device channel. Possible values: "web", "ios", "android", "other" + * @param {string} val + * @return {Device} + */ + Device.prototype.setChannel = function (val) { + this.channel = val; + return this; + }; + /** + * Get IpAddress + * Device IP address. Use if request origin is "backend" + * @return {string} + */ + Device.prototype.getIpAddress = function () { + return this.ipAddress; + }; + /** + * Set IpAddress + * Device IP address. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + Device.prototype.setIpAddress = function (val) { + this.ipAddress = val; + return this; + }; + /** + * Get UserAgent + * Device user agent. Use if request origin is "backend" + * @return {string} + */ + Device.prototype.getUserAgent = function () { + return this.userAgent; + }; + /** + * Set UserAgent + * Device user agent. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + Device.prototype.setUserAgent = function (val) { + this.userAgent = val; + return this; + }; + /** + * Get HeaderAccept + * Device accept header. Use if request origin is "backend" + * @return {string} + */ + Device.prototype.getHeaderAccept = function () { + return this.headerAccept; + }; + /** + * Set HeaderAccept + * Device accept header. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + Device.prototype.setHeaderAccept = function (val) { + this.headerAccept = val; + return this; + }; + /** + * Get HeaderReferer + * Device referer header. Use if request origin is "backend" + * @return {string} + */ + Device.prototype.getHeaderReferer = function () { + return this.headerReferer; + }; + /** + * Set HeaderReferer + * Device referer header. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + Device.prototype.setHeaderReferer = function (val) { + this.headerReferer = val; + return this; + }; + /** + * Get AppColorDepth + * Device color depth. Use if request origin is "backend" + * @return {number} + */ + Device.prototype.getAppColorDepth = function () { + return this.appColorDepth; + }; + /** + * Set AppColorDepth + * Device color depth. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + Device.prototype.setAppColorDepth = function (val) { + this.appColorDepth = val; + return this; + }; + /** + * Get AppJavaEnabled + * Device Java enabled. Use if request origin is "backend" + * @return {boolean} + */ + Device.prototype.getAppJavaEnabled = function () { + return this.appJavaEnabled; + }; + /** + * Set AppJavaEnabled + * Device Java enabled. Use if request origin is "backend" + * @param {boolean} val + * @return {Device} + */ + Device.prototype.setAppJavaEnabled = function (val) { + this.appJavaEnabled = val; + return this; + }; + /** + * Get AppLanguage + * Device language. Use if request origin is "backend" + * @return {string} + */ + Device.prototype.getAppLanguage = function () { + return this.appLanguage; + }; + /** + * Set AppLanguage + * Device language. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + Device.prototype.setAppLanguage = function (val) { + this.appLanguage = val; + return this; + }; + /** + * Get AppScreenHeight + * Device screen height. Use if request origin is "backend" + * @return {number} + */ + Device.prototype.getAppScreenHeight = function () { + return this.appScreenHeight; + }; + /** + * Set AppScreenHeight + * Device screen height. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + Device.prototype.setAppScreenHeight = function (val) { + this.appScreenHeight = val; + return this; + }; + /** + * Get AppScreenWidth + * Device screen width. Use if request origin is "backend" + * @return {number} + */ + Device.prototype.getAppScreenWidth = function () { + return this.appScreenWidth; + }; + /** + * Set AppScreenWidth + * Device screen width. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + Device.prototype.setAppScreenWidth = function (val) { + this.appScreenWidth = val; + return this; + }; + /** + * Get AppTimezoneOffset + * Device timezone offset. Use if request origin is "backend" + * @return {number} + */ + Device.prototype.getAppTimezoneOffset = function () { + return this.appTimezoneOffset; + }; + /** + * Set AppTimezoneOffset + * Device timezone offset. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + Device.prototype.setAppTimezoneOffset = function (val) { + this.appTimezoneOffset = val; + return this; + }; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {Device} + */ + Device.prototype.fillWithData = function (data) { + if (data["request_origin"]) + this.setRequestOrigin(data["request_origin"]); + if (data["id"]) + this.setId(data["id"]); + if (data["channel"]) + this.setChannel(data["channel"]); + if (data["ip_address"]) + this.setIpAddress(data["ip_address"]); + if (data["user_agent"]) + this.setUserAgent(data["user_agent"]); + if (data["header_accept"]) + this.setHeaderAccept(data["header_accept"]); + if (data["header_referer"]) + this.setHeaderReferer(data["header_referer"]); + if (data["app_color_depth"]) + this.setAppColorDepth(data["app_color_depth"]); + if (data["app_java_enabled"]) + this.setAppJavaEnabled(data["app_java_enabled"]); + if (data["app_language"]) + this.setAppLanguage(data["app_language"]); + if (data["app_screen_height"]) + this.setAppScreenHeight(data["app_screen_height"]); + if (data["app_screen_width"]) + this.setAppScreenWidth(data["app_screen_width"]); + if (data["app_timezone_offset"]) + this.setAppTimezoneOffset(data["app_timezone_offset"]); + return this; + }; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + Device.prototype.toJSON = function () { + return { + "request_origin": this.getRequestOrigin(), + "id": this.getId(), + "channel": this.getChannel(), + "ip_address": this.getIpAddress(), + "user_agent": this.getUserAgent(), + "header_accept": this.getHeaderAccept(), + "header_referer": this.getHeaderReferer(), + "app_color_depth": this.getAppColorDepth(), + "app_java_enabled": this.getAppJavaEnabled(), + "app_language": this.getAppLanguage(), + "app_screen_height": this.getAppScreenHeight(), + "app_screen_width": this.getAppScreenWidth(), + "app_timezone_offset": this.getAppTimezoneOffset(), + }; + }; + return Device; +}()); +module.exports = Device; +//# sourceMappingURL=device.js.map \ No newline at end of file diff --git a/lib/device.js.map b/lib/device.js.map new file mode 100644 index 0000000..9866a58 --- /dev/null +++ b/lib/device.js.map @@ -0,0 +1 @@ +{"version":3,"file":"device.js","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":";AAAA,uDAAuD;AAYvD;IAiFI;;;;OAIG;IACH,gBAAY,MAAkB,EAAE,OAAe;QArFvC,WAAM,GAAe,IAAI,CAAC;QAElC;;;WAGG;QACK,kBAAa,GAAW,IAAI,CAAC;QAErC;;;WAGG;QACK,OAAE,GAAW,IAAI,CAAC;QAE1B;;;WAGG;QACK,YAAO,GAAW,IAAI,CAAC;QAE/B;;;WAGG;QACK,cAAS,GAAW,IAAI,CAAC;QAEjC;;;WAGG;QACK,cAAS,GAAW,IAAI,CAAC;QAEjC;;;WAGG;QACK,iBAAY,GAAW,IAAI,CAAC;QAEpC;;;WAGG;QACK,kBAAa,GAAW,IAAI,CAAC;QAErC;;;WAGG;QACK,kBAAa,GAAW,IAAI,CAAC;QAErC;;;WAGG;QACK,mBAAc,GAAY,IAAI,CAAC;QAEvC;;;WAGG;QACK,gBAAW,GAAW,IAAI,CAAC;QAEnC;;;WAGG;QACK,oBAAe,GAAW,IAAI,CAAC;QAEvC;;;WAGG;QACK,mBAAc,GAAW,IAAI,CAAC;QAEtC;;;WAGG;QACK,sBAAiB,GAAW,IAAI,CAAC;QAQrC,IAAI,OAAO,MAAM,KAAK,WAAW;YAC7B,MAAM,IAAI,KAAK,CAAC,wJAAwJ,CAAC,CAAC;QAE9K,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,OAAO,OAAO,KAA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IAAI,CAAC,oBAAoB,EAAE;SACrD,CAAC;IACN,CAAC;IAGL,aAAC;AAAD,CAAC,AAjaD,IAiaC;AACD,iBAAS,MAAM,CAAC"} \ No newline at end of file diff --git a/lib/index.d.ts b/lib/index.d.ts index ca9a51c..64505e2 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -8,6 +8,7 @@ import Balances = require('./balances'); import Balance = require('./balance'); import Card = require('./card'); import CardInformation = require('./cardinformation'); +import Phone = require('./phone'); import Coupon = require('./coupon'); import Customer = require('./customer'); import CustomerPhone = require('./customerphone'); @@ -32,6 +33,7 @@ import CustomerAction = require('./customeraction'); import DunningAction = require('./dunningaction'); import Payout = require('./payout'); import PayoutItem = require('./payoutitem'); +import PayoutItemAmountBreakdowns = require('./payoutitemamountbreakdowns'); import Plan = require('./plan'); import Product = require('./product'); import Project = require('./project'); @@ -49,6 +51,11 @@ import PaymentDataThreeDSAuthentication = require('./paymentdatathreedsauthentic import TransactionOperation = require('./transactionoperation'); import Webhook = require('./webhook'); import WebhookEndpoint = require('./webhookendpoint'); +import CardCreateRequest = require('./cardcreaterequest'); +import Device = require('./device'); +import CardContact = require('./cardcontact'); +import CardShipping = require('./cardshipping'); +import CardUpdateRequest = require('./cardupdaterequest'); import ErrorCodes = require('./errorcodes'); import CategoryErrorCodes = require('./categoryerrorcodes'); import NativeAPMTransactionDetailsGateway = require('./nativeapmtransactiondetailsgateway'); @@ -72,6 +79,7 @@ export { Balances }; export { Balance }; export { Card }; export { CardInformation }; +export { Phone }; export { Coupon }; export { Customer }; export { CustomerPhone }; @@ -96,6 +104,7 @@ export { CustomerAction }; export { DunningAction }; export { Payout }; export { PayoutItem }; +export { PayoutItemAmountBreakdowns }; export { Plan }; export { Product }; export { Project }; @@ -113,6 +122,11 @@ export { PaymentDataThreeDSAuthentication }; export { TransactionOperation }; export { Webhook }; export { WebhookEndpoint }; +export { CardCreateRequest }; +export { Device }; +export { CardContact }; +export { CardShipping }; +export { CardUpdateRequest }; export { ErrorCodes }; export { CategoryErrorCodes }; export { NativeAPMTransactionDetailsGateway }; diff --git a/lib/index.d.ts.map b/lib/index.d.ts.map index 909fc27..75f8eb9 100644 --- a/lib/index.d.ts.map +++ b/lib/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,GAAG,QAAQ,cAAc,CAAC,CAAC;AAE5C,OAAO,QAAQ,GAAG,QAAQ,YAAY,CAAC,CAAC;AACxC,OAAO,KAAK,GAAG,QAAQ,SAAS,CAAC,CAAC;AAClC,OAAO,UAAU,GAAG,QAAQ,cAAc,CAAC,CAAC;AAC5C,OAAO,uCAAuC,GAAG,QAAQ,2CAA2C,CAAC,CAAC;AACtG,OAAO,8BAA8B,GAAG,QAAQ,kCAAkC,CAAC,CAAC;AACpF,OAAO,QAAQ,GAAG,QAAQ,YAAY,CAAC,CAAC;AACxC,OAAO,OAAO,GAAG,QAAQ,WAAW,CAAC,CAAC;AACtC,OAAO,IAAI,GAAG,QAAQ,QAAQ,CAAC,CAAC;AAChC,OAAO,eAAe,GAAG,QAAQ,mBAAmB,CAAC,CAAC;AACtD,OAAO,MAAM,GAAG,QAAQ,UAAU,CAAC,CAAC;AACpC,OAAO,QAAQ,GAAG,QAAQ,YAAY,CAAC,CAAC;AACxC,OAAO,aAAa,GAAG,QAAQ,iBAAiB,CAAC,CAAC;AAClD,OAAO,KAAK,GAAG,QAAQ,SAAS,CAAC,CAAC;AAClC,OAAO,QAAQ,GAAG,QAAQ,YAAY,CAAC,CAAC;AACxC,OAAO,KAAK,GAAG,QAAQ,SAAS,CAAC,CAAC;AAClC,OAAO,OAAO,GAAG,QAAQ,WAAW,CAAC,CAAC;AACtC,OAAO,oBAAoB,GAAG,QAAQ,wBAAwB,CAAC,CAAC;AAChE,OAAO,OAAO,GAAG,QAAQ,WAAW,CAAC,CAAC;AACtC,OAAO,gBAAgB,GAAG,QAAQ,oBAAoB,CA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O,EAAC,uBAAuB,EAAC,CAAC;AACjC,OAAO,EAAC,yBAAyB,EAAC,CAAC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js index 4d502d2..3536cdb 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,8 +1,8 @@ "use strict"; // The content of this file was automatically generated Object.defineProperty(exports, "__esModule", { value: true }); -exports.Webhook = exports.TransactionOperation = exports.PaymentDataThreeDSAuthentication = exports.PaymentDataNetworkAuthentication = exports.PaymentDataThreeDSRequest = exports.ThreeDS = exports.NativeAPMParameterValueDefinition = exports.NativeAPMParameterDefinition = exports.NativeAPMResponse = exports.Transaction = exports.Subscription = exports.Refund = exports.ProjectSFTPSettings = exports.Project = exports.Product = exports.Plan = exports.PayoutItem = exports.Payout = exports.DunningAction = exports.CustomerAction = exports.InvoiceDetail = exports.UnsupportedFeatureBypass = exports.InvoiceBilling = exports.InvoiceShippingPhone = exports.InvoiceShipping = exports.InvoiceDevice = exports.InvoiceRisk = exports.InvoiceExternalFraudTools = exports.InvoiceTax = exports.NativeAPMParameterValue = exports.NativeAPMRequest = exports.Invoice = exports.GatewayConfiguration = exports.Gateway = exports.Event = exports.Discount = exports.Token = exports.CustomerPhone = exports.Customer = exports.Coupon = exports.CardInformation = exports.Card = exports.Balance = exports.Balances = exports.AlternativeMerchantCertificate = exports.ApplePayAlternativeMerchantCertificates = exports.APIVersion = exports.Addon = exports.Activity = exports.ProcessOut = void 0; -exports.ProcessOutValidationError = exports.ProcessOutNotFoundError = exports.ProcessOutAuthenticationError = exports.ProcessOutInternalError = exports.ProcessOutNetworkError = exports.ProcessOutError = exports.GatewayRequest = exports.InvoicesProcessNativePaymentResponse = exports.NativeAPMTransactionDetails = exports.NativeAPMTransactionDetailsInvoice = exports.NativeAPMTransactionDetailsGateway = exports.CategoryErrorCodes = exports.ErrorCodes = exports.WebhookEndpoint = void 0; +exports.PaymentDataThreeDSAuthentication = exports.PaymentDataNetworkAuthentication = exports.PaymentDataThreeDSRequest = exports.ThreeDS = exports.NativeAPMParameterValueDefinition = exports.NativeAPMParameterDefinition = exports.NativeAPMResponse = exports.Transaction = exports.Subscription = exports.Refund = exports.ProjectSFTPSettings = exports.Project = exports.Product = exports.Plan = exports.PayoutItemAmountBreakdowns = exports.PayoutItem = exports.Payout = exports.DunningAction = exports.CustomerAction = exports.InvoiceDetail = exports.UnsupportedFeatureBypass = exports.InvoiceBilling = exports.InvoiceShippingPhone = exports.InvoiceShipping = exports.InvoiceDevice = exports.InvoiceRisk = exports.InvoiceExternalFraudTools = exports.InvoiceTax = exports.NativeAPMParameterValue = exports.NativeAPMRequest = exports.Invoice = exports.GatewayConfiguration = exports.Gateway = exports.Event = exports.Discount = exports.Token = exports.CustomerPhone = exports.Customer = exports.Coupon = exports.Phone = exports.CardInformation = exports.Card = exports.Balance = exports.Balances = exports.AlternativeMerchantCertificate = exports.ApplePayAlternativeMerchantCertificates = exports.APIVersion = exports.Addon = exports.Activity = exports.ProcessOut = void 0; +exports.ProcessOutValidationError = exports.ProcessOutNotFoundError = exports.ProcessOutAuthenticationError = exports.ProcessOutInternalError = exports.ProcessOutNetworkError = exports.ProcessOutError = exports.GatewayRequest = exports.InvoicesProcessNativePaymentResponse = exports.NativeAPMTransactionDetails = exports.NativeAPMTransactionDetailsInvoice = exports.NativeAPMTransactionDetailsGateway = exports.CategoryErrorCodes = exports.ErrorCodes = exports.CardUpdateRequest = exports.CardShipping = exports.CardContact = exports.Device = exports.CardCreateRequest = exports.WebhookEndpoint = exports.Webhook = exports.TransactionOperation = void 0; var ProcessOut = require("./processout"); exports.ProcessOut = ProcessOut; var Activity = require("./activity"); @@ -23,6 +23,8 @@ var Card = require("./card"); exports.Card = Card; var CardInformation = require("./cardinformation"); exports.CardInformation = CardInformation; +var Phone = require("./phone"); +exports.Phone = Phone; var Coupon = require("./coupon"); exports.Coupon = Coupon; var Customer = require("./customer"); @@ -71,6 +73,8 @@ var Payout = require("./payout"); exports.Payout = Payout; var PayoutItem = require("./payoutitem"); exports.PayoutItem = PayoutItem; +var PayoutItemAmountBreakdowns = require("./payoutitemamountbreakdowns"); +exports.PayoutItemAmountBreakdowns = PayoutItemAmountBreakdowns; var Plan = require("./plan"); exports.Plan = Plan; var Product = require("./product"); @@ -105,6 +109,16 @@ var Webhook = require("./webhook"); exports.Webhook = Webhook; var WebhookEndpoint = require("./webhookendpoint"); exports.WebhookEndpoint = WebhookEndpoint; +var CardCreateRequest = require("./cardcreaterequest"); +exports.CardCreateRequest = CardCreateRequest; +var Device = require("./device"); +exports.Device = Device; +var CardContact = require("./cardcontact"); +exports.CardContact = CardContact; +var CardShipping = require("./cardshipping"); +exports.CardShipping = CardShipping; +var CardUpdateRequest = require("./cardupdaterequest"); +exports.CardUpdateRequest = CardUpdateRequest; var ErrorCodes = require("./errorcodes"); exports.ErrorCodes = ErrorCodes; var CategoryErrorCodes = require("./categoryerrorcodes"); diff --git a/lib/index.js.map b/lib/index.js.map index 62850ca..ca990ae 100644 --- a/lib/index.js.map +++ b/lib/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;AAEvD,yCAA4C;AAmEpC,gCAAU;AAjElB,qCAAwC;AAkEhC,4BAAQ;AAjEhB,+BAAkC;AAkE1B,sBAAK;AAjEb,yCAA4C;AAkEpC,gCAAU;AAjElB,mGAAsG;AAkE9F,0FAAuC;AAjE/C,iFAAoF;AAkE5E,wEAA8B;AAjEtC,qCAAwC;AAkEhC,4BAAQ;AAjEhB,mCAAsC;AAkE9B,0BAAO;AAjEf,6BAAgC;AAkExB,oBAAI;AAjEZ,mDAAsD;AAkE9C,0CAAe;AAjEvB,iCAAoC;AAkE5B,wBAAM;AAjEd,qCAAwC;AAkEhC,4BAAQ;AAjEhB,+CAAkD;AAkE1C,sCAAa;AAjErB,+BAAkC;AAkE1B,sBAAK;AAjEb,qCAAwC;AAkEhC,4BAAQ;AAjEhB,+BAAkC;AAkE1B,sBAAK;AAj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E5C,iDAAoD;AAyE5C,wCAAc;AAxEtB,0DAA6D;AAyErD,0CAAe;AAxEvB,wEAA2E;AAyEnE,wDAAsB;AAxE9B,0EAA6E;AAyErE,0DAAuB;AAxE/B,sFAAyF;AAyEjF,sEAA6B;AAxErC,0EAA6E;AAyErE,0DAAuB;AAxE/B,8EAAiF;AAyEzE,8DAAyB"} \ No newline at end of file diff --git a/lib/payoutitem.d.ts b/lib/payoutitem.d.ts index b2fe1f7..265a28d 100644 --- a/lib/payoutitem.d.ts +++ b/lib/payoutitem.d.ts @@ -67,6 +67,11 @@ declare class PayoutItem { * @type {string} */ private createdAt; + /** + * breakdown of amount for the item + * @type {p.PayoutItemAmountBreakdowns} + */ + private breakdown; /** * PayoutItem constructor * @param {ProcessOut} client @@ -243,6 +248,19 @@ declare class PayoutItem { * @return {PayoutItem} */ setCreatedAt(val: string): PayoutItem; + /** + * Get Breakdown + * breakdown of amount for the item + * @return {p.PayoutItemAmountBreakdowns} + */ + getBreakdown(): p.PayoutItemAmountBreakdowns; + /** + * Set Breakdown + * breakdown of amount for the item + * @param {p.PayoutItemAmountBreakdowns} val + * @return {PayoutItem} + */ + setBreakdown(val: p.PayoutItemAmountBreakdowns): PayoutItem; /** * Fills the current object with the new values pulled from the data * @param {array} data diff --git a/lib/payoutitem.d.ts.map b/lib/payoutitem.d.ts.map index 18de7f6..cfe9010 100644 --- a/lib/payoutitem.d.ts.map +++ b/lib/payoutitem.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"payoutitem.d.ts","sourceRoot":"","sources":["../src/payoutitem.ts"],"names":[],"mappings":"AAIA,OAAO,UAAU,GAAG,QAAQ,cAAc,CAAC,CAAC;AAM5C,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;AAEvB,cAAM,UAAU;IACZ,OAAO,CAAC,MAAM,CAAoB;IAElC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAgB;IAE1B;;;OAGG;IACH,OAAO,CAAC,OAAO,CAAmB;IAElC;;;OAGG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,6 +73,11 @@ var PayoutItem = /** @class */ (function () { * @type {string} */ this.createdAt = null; + /** + * breakdown of amount for the item + * @type {p.PayoutItemAmountBreakdowns} + */ + this.breakdown = null; if (typeof client === 'undefined') throw new Error("The PayoutItem object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newPayoutItem()"); this.client = client; @@ -337,6 +342,31 @@ var PayoutItem = /** @class */ (function () { this.createdAt = val; return this; }; + /** + * Get Breakdown + * breakdown of amount for the item + * @return {p.PayoutItemAmountBreakdowns} + */ + PayoutItem.prototype.getBreakdown = function () { + return this.breakdown; + }; + /** + * Set Breakdown + * breakdown of amount for the item + * @param {p.PayoutItemAmountBreakdowns} val + * @return {PayoutItem} + */ + PayoutItem.prototype.setBreakdown = function (val) { + if (val.getProcessOutObjectClass && + val.getProcessOutObjectClass() == this.client.newPayoutItemAmountBreakdowns().getProcessOutObjectClass()) + this.breakdown = val; + else { + var obj = this.client.newPayoutItemAmountBreakdowns(); + obj.fillWithData(val); + this.breakdown = obj; + } + return this; + }; /** * Fills the current object with the new values pulled from the data * @param {array} data @@ -369,6 +399,8 @@ var PayoutItem = /** @class */ (function () { this.setMetadata(data["metadata"]); if (data["created_at"]) this.setCreatedAt(data["created_at"]); + if (data["breakdown"]) + this.setBreakdown(data["breakdown"]); return this; }; /** @@ -390,6 +422,7 @@ var PayoutItem = /** @class */ (function () { "fees": this.getFees(), "metadata": this.getMetadata(), "created_at": this.getCreatedAt(), + "breakdown": this.getBreakdown(), }; }; return PayoutItem; diff --git a/lib/payoutitem.js.map b/lib/payoutitem.js.map index 0a02347..2ea0752 100644 --- a/lib/payoutitem.js.map +++ b/lib/payoutitem.js.map @@ -1 +1 @@ -{"version":3,"file":"payoutitem.js","sourceRoot":"","sources":["../src/payoutitem.ts"],"names":[],"mappings":";AAAA,uDAAuD;AAYvD;IAiFI;;;;OAIG;IACH,oBAAY,MAAkB,EAAE,OAAmB;QArF3C,WAAM,GAAe,IAAI,CAAC;QAElC;;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EAAE,IAAI,CAAC,YAAY,EAAE;YACjC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE;YAC1B,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;YAC/B,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE;YACpC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE;YACzC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,qBAAqB,EAAE,IAAI,CAAC,oBAAoB,EAAE;YAClD,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE;YAC1B,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;YAC9B,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE;YACjC,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE;SACnC,CAAC;IACN,CAAC;IAGL,iBAAC;AAAD,CAAC,AA1dD,IA0dC;AACD,iBAAS,UAAU,CAAC"} \ No newline at end of file diff --git a/lib/payoutitemamountbreakdowns.d.ts b/lib/payoutitemamountbreakdowns.d.ts new file mode 100644 index 0000000..3276654 --- /dev/null +++ b/lib/payoutitemamountbreakdowns.d.ts @@ -0,0 +1,132 @@ +import ProcessOut = require('./processout'); +declare class PayoutItemAmountBreakdowns { + private client; + /** + * Amount relating to scheme fee + * @type {string} + */ + private schemeFee; + /** + * Amount relating to interchange fee + * @type {string} + */ + private interchangeFee; + /** + * Amount relating to gateway fee + * @type {string} + */ + private gatewayFee; + /** + * Amount relating to markup fee + * @type {string} + */ + private markupFee; + /** + * Amount relating to acquirer fee + * @type {string} + */ + private acquirerFee; + /** + * Amount relating to other fee + * @type {string} + */ + private otherFee; + /** + * PayoutItemAmountBreakdowns constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: PayoutItemAmountBreakdowns); + getProcessOutObjectClass(): string; + /** + * Get SchemeFee + * Amount relating to scheme fee + * @return {string} + */ + getSchemeFee(): string; + /** + * Set SchemeFee + * Amount relating to scheme fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + setSchemeFee(val: string): PayoutItemAmountBreakdowns; + /** + * Get InterchangeFee + * Amount relating to interchange fee + * @return {string} + */ + getInterchangeFee(): string; + /** + * Set InterchangeFee + * Amount relating to interchange fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + setInterchangeFee(val: string): PayoutItemAmountBreakdowns; + /** + * Get GatewayFee + * Amount relating to gateway fee + * @return {string} + */ + getGatewayFee(): string; + /** + * Set GatewayFee + * Amount relating to gateway fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + setGatewayFee(val: string): PayoutItemAmountBreakdowns; + /** + * Get MarkupFee + * Amount relating to markup fee + * @return {string} + */ + getMarkupFee(): string; + /** + * Set MarkupFee + * Amount relating to markup fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + setMarkupFee(val: string): PayoutItemAmountBreakdowns; + /** + * Get AcquirerFee + * Amount relating to acquirer fee + * @return {string} + */ + getAcquirerFee(): string; + /** + * Set AcquirerFee + * Amount relating to acquirer fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + setAcquirerFee(val: string): PayoutItemAmountBreakdowns; + /** + * Get OtherFee + * Amount relating to other fee + * @return {string} + */ + getOtherFee(): string; + /** + * Set OtherFee + * Amount relating to other fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + setOtherFee(val: string): PayoutItemAmountBreakdowns; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {PayoutItemAmountBreakdowns} + */ + fillWithData(data: any): PayoutItemAmountBreakdowns; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + toJSON(): any; +} +export = PayoutItemAmountBreakdowns; +//# sourceMappingURL=payoutitemamountbreakdowns.d.ts.map \ No newline at end of file diff --git a/lib/payoutitemamountbreakdowns.d.ts.map b/lib/payoutitemamountbreakdowns.d.ts.map new file mode 100644 index 0000000..ca106b7 --- /dev/null +++ b/lib/pay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AM,GAAG,0BAA0B;IAK3D;;;;OAIG;IACI,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,0BAA0B;IAgB1D;;;OAGG;IACI,MAAM,IAAI,GAAG;CAYvB;AACD,SAAS,0BAA0B,CAAC"} \ No newline at end of file diff --git a/lib/payoutitemamountbreakdowns.js b/lib/payoutitemamountbreakdowns.js new file mode 100644 index 0000000..51240b1 --- /dev/null +++ b/lib/payoutitemamountbreakdowns.js @@ -0,0 +1,195 @@ +"use strict"; +// The content of this file was automatically generated +var PayoutItemAmountBreakdowns = /** @class */ (function () { + /** + * PayoutItemAmountBreakdowns constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + function PayoutItemAmountBreakdowns(client, prefill) { + this.client = null; + /** + * Amount relating to scheme fee + * @type {string} + */ + this.schemeFee = null; + /** + * Amount relating to interchange fee + * @type {string} + */ + this.interchangeFee = null; + /** + * Amount relating to gateway fee + * @type {string} + */ + this.gatewayFee = null; + /** + * Amount relating to markup fee + * @type {string} + */ + this.markupFee = null; + /** + * Amount relating to acquirer fee + * @type {string} + */ + this.acquirerFee = null; + /** + * Amount relating to other fee + * @type {string} + */ + this.otherFee = null; + if (typeof client === 'undefined') + throw new Error("The PayoutItemAmountBreakdowns object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newPayoutItemAmountBreakdowns()"); + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + PayoutItemAmountBreakdowns.prototype.getProcessOutObjectClass = function () { + return "PayoutItemAmountBreakdowns"; + }; + /** + * Get SchemeFee + * Amount relating to scheme fee + * @return {string} + */ + PayoutItemAmountBreakdowns.prototype.getSchemeFee = function () { + return this.schemeFee; + }; + /** + * Set SchemeFee + * Amount relating to scheme fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + PayoutItemAmountBreakdowns.prototype.setSchemeFee = function (val) { + this.schemeFee = val; + return this; + }; + /** + * Get InterchangeFee + * Amount relating to interchange fee + * @return {string} + */ + PayoutItemAmountBreakdowns.prototype.getInterchangeFee = function () { + return this.interchangeFee; + }; + /** + * Set InterchangeFee + * Amount relating to interchange fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + PayoutItemAmountBreakdowns.prototype.setInterchangeFee = function (val) { + this.interchangeFee = val; + return this; + }; + /** + * Get GatewayFee + * Amount relating to gateway fee + * @return {string} + */ + PayoutItemAmountBreakdowns.prototype.getGatewayFee = function () { + return this.gatewayFee; + }; + /** + * Set GatewayFee + * Amount relating to gateway fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + PayoutItemAmountBreakdowns.prototype.setGatewayFee = function (val) { + this.gatewayFee = val; + return this; + }; + /** + * Get MarkupFee + * Amount relating to markup fee + * @return {string} + */ + PayoutItemAmountBreakdowns.prototype.getMarkupFee = function () { + return this.markupFee; + }; + /** + * Set MarkupFee + * Amount relating to markup fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + PayoutItemAmountBreakdowns.prototype.setMarkupFee = function (val) { + this.markupFee = val; + return this; + }; + /** + * Get AcquirerFee + * Amount relating to acquirer fee + * @return {string} + */ + PayoutItemAmountBreakdowns.prototype.getAcquirerFee = function () { + return this.acquirerFee; + }; + /** + * Set AcquirerFee + * Amount relating to acquirer fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + PayoutItemAmountBreakdowns.prototype.setAcquirerFee = function (val) { + this.acquirerFee = val; + return this; + }; + /** + * Get OtherFee + * Amount relating to other fee + * @return {string} + */ + PayoutItemAmountBreakdowns.prototype.getOtherFee = function () { + return this.otherFee; + }; + /** + * Set OtherFee + * Amount relating to other fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + PayoutItemAmountBreakdowns.prototype.setOtherFee = function (val) { + this.otherFee = val; + return this; + }; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {PayoutItemAmountBreakdowns} + */ + PayoutItemAmountBreakdowns.prototype.fillWithData = function (data) { + if (data["scheme_fee"]) + this.setSchemeFee(data["scheme_fee"]); + if (data["interchange_fee"]) + this.setInterchangeFee(data["interchange_fee"]); + if (data["gateway_fee"]) + this.setGatewayFee(data["gateway_fee"]); + if (data["markup_fee"]) + this.setMarkupFee(data["markup_fee"]); + if (data["acquirer_fee"]) + this.setAcquirerFee(data["acquirer_fee"]); + if (data["other_fee"]) + this.setOtherFee(data["other_fee"]); + return this; + }; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + PayoutItemAmountBreakdowns.prototype.toJSON = function () { + return { + "scheme_fee": this.getSchemeFee(), + "interchange_fee": this.getInterchangeFee(), + "gateway_fee": this.getGatewayFee(), + "markup_fee": this.getMarkupFee(), + "acquirer_fee": this.getAcquirerFee(), + "other_fee": this.getOtherFee(), + }; + }; + return PayoutItemAmountBreakdowns; +}()); +module.exports = PayoutItemAmountBreakdowns; +//# sourceMappingURL=payoutitemamountbreakdowns.js.map \ No newline at end of file diff --git a/lib/payoutitemamountbreakdowns.js.map b/lib/payoutitemamountbreakdowns.js.map new file mode 100644 index 0000000..0328b7b --- /dev/null +++ b/lib/payoutitemamountbreakdowns.js.map @@ -0,0 +1 @@ +{"version":3,"file":"payoutitemamountbreakdowns.js","sourceRoot":"","sources":["../src/payoutitemamountbreakdowns.ts"],"names":[],"mappings":";AAAA,uDAAuD;AAYvD;IAuCI;;;;OAIG;IACH,oCAAY,MAAkB,EAAE,OAAmC;QA3C3D,WAAM,GAAe,IAAI,CAAC;QAElC;;;WAGG;QACK,cAAS,GAAW,IAAI,CAAC;QAEjC;;;WAGG;QACK,mBAAc,GAAW,IAAI,CAAC;QAEtC;;;WAGG;QACK,eAAU,GAAW,IAAI,CAAC;QAElC;;;WAGG;QACK,cAAS,GAAW,IAAI,CAAC;QAEjC;;;WAGG;QACK,gBAAW,GAAW,IAAI,CAAC;QAEnC;;;WAGG;QACK,aAAQ,GAAW,IAAI,CAAC;QAQ5B,IAAI,OAAO,MAAM,KAAK,WAAW;YAC7B,MAAM,IAAI,KAAK,CAAC,gM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AAC,WAAW,EAAE;SAClC,CAAC;IACN,CAAC;IAGL,iCAAC;AAAD,CAAC,AAtND,IAsNC;AACD,iBAAS,0BAA0B,CAAC"} \ No newline at end of file diff --git a/lib/phone.d.ts b/lib/phone.d.ts new file mode 100644 index 0000000..1d10cb7 --- /dev/null +++ b/lib/phone.d.ts @@ -0,0 +1,60 @@ +import ProcessOut = require('./processout'); +declare class Phone { + private client; + /** + * Phone number (without dialing code) + * @type {string} + */ + private number; + /** + * Phone number dialing code + * @type {string} + */ + private dialingCode; + /** + * Phone constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: Phone); + getProcessOutObjectClass(): string; + /** + * Get Number + * Phone number (without dialing code) + * @return {string} + */ + getNumber(): string; + /** + * Set Number + * Phone number (without dialing code) + * @param {string} val + * @return {Phone} + */ + setNumber(val: string): Phone; + /** + * Get DialingCode + * Phone number dialing code + * @return {string} + */ + getDialingCode(): string; + /** + * Set DialingCode + * Phone number dialing code + * @param {string} val + * @return {Phone} + */ + setDialingCode(val: string): Phone; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {Phone} + */ + fillWithData(data: any): Phone; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + toJSON(): any; +} +export = Phone; +//# sourceMappingURL=phone.d.ts.map \ No newline at end of file diff --git a/lib/phone.d.ts.map b/lib/phone.d.ts.map new file mode 100644 index 0000000..25547b6 --- /dev/null +++ b/lib/phone.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"phone.d.ts","sourceRoot":"","sources":["../src/phone.ts"],"names":[],"mappings":"AAIA,OAAO,UAAU,GAAG,QAAQ,cAAc,CAAC,CAAC;AAQ5C,cAAM,KAAK;IACP,OAAO,CAAC,MAAM,CAAoB;IAElC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAgB;IAE9B;;;OAGG;IACH,OAAO,CAAC,WAAW,CAAgB;IAEnC;;;;OAIG;gBACS,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK;IASvC,wBAAwB,IAAI,MAAM;IAIzC;;;;OAIG;IACI,SAAS,IAAI,MAAM;IAI1B;;;;;OAKG;IACI,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK;IAKpC;;;;OAIG;IACI,cAAc,IAAI,MAAM;IAI/B;;;;;OAKG;IACI,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK;IAKzC;;;;OAIG;IACI,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,KAAK;IAQrC;;;OAGG;IACI,MAAM,IAAI,GAAG;CAQvB;AACD,SAAS,KAAK,CAAC"} \ No newline at end of file diff --git a/lib/phone.js b/lib/phone.js new file mode 100644 index 0000000..8d71c7a --- /dev/null +++ b/lib/phone.js @@ -0,0 +1,91 @@ +"use strict"; +// The content of this file was automatically generated +var Phone = /** @class */ (function () { + /** + * Phone constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + function Phone(client, prefill) { + this.client = null; + /** + * Phone number (without dialing code) + * @type {string} + */ + this.number = null; + /** + * Phone number dialing code + * @type {string} + */ + this.dialingCode = null; + if (typeof client === 'undefined') + throw new Error("The Phone object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newPhone()"); + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + Phone.prototype.getProcessOutObjectClass = function () { + return "Phone"; + }; + /** + * Get Number + * Phone number (without dialing code) + * @return {string} + */ + Phone.prototype.getNumber = function () { + return this.number; + }; + /** + * Set Number + * Phone number (without dialing code) + * @param {string} val + * @return {Phone} + */ + Phone.prototype.setNumber = function (val) { + this.number = val; + return this; + }; + /** + * Get DialingCode + * Phone number dialing code + * @return {string} + */ + Phone.prototype.getDialingCode = function () { + return this.dialingCode; + }; + /** + * Set DialingCode + * Phone number dialing code + * @param {string} val + * @return {Phone} + */ + Phone.prototype.setDialingCode = function (val) { + this.dialingCode = val; + return this; + }; + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {Phone} + */ + Phone.prototype.fillWithData = function (data) { + if (data["number"]) + this.setNumber(data["number"]); + if (data["dialing_code"]) + this.setDialingCode(data["dialing_code"]); + return this; + }; + /** + * Implements a JSON custom marshaller + * @return {any} + */ + Phone.prototype.toJSON = function () { + return { + "number": this.getNumber(), + "dialing_code": this.getDialingCode(), + }; + }; + return Phone; +}()); +module.exports = Phone; +//# sourceMappingURL=phone.js.map \ No newline at end of file diff --git a/lib/phone.js.map b/lib/phone.js.map new file mode 100644 index 0000000..6e245e0 --- /dev/null +++ b/lib/phone.js.map @@ -0,0 +1 @@ +{"version":3,"file":"phone.js","sourceRoot":"","sources":["../src/phone.ts"],"names":[],"mappings":";AAAA,uDAAuD;AAYvD;IAeI;;;;OAIG;IACH,eAAY,MAAkB,EAAE,OAAc;QAnBtC,WAAM,GAAe,IAAI,CAAC;QAElC;;;WAGG;QACK,WAAM,GAAW,IAAI,CAAC;QAE9B;;;WAGG;QACK,gBAAW,GAAW,IAAI,CAAC;QAQ/B,IAAI,OAAO,MAAM,KAAK,WAAW;YAC7B,MAAM,IAAI,KAAK,CAAC,sJAAsJ,CAAC,CAAC;QAE5K,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,OAAO,OAAO,KAAK,WAAW;YAC9B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAEM,wCAAwB,GAA/B;QACI,OAAO,OAAO,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACI,yBAAS,GAAhB;QACI,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,yBAAS,GAAhB,UAAiB,GAAW;QACxB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;QAClB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACI,8BAAc,GAArB;QACI,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACI,8BAAc,GAArB,UAAsB,GAAW;QAC7B,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACI,4BAAY,GAAnB,UAAoB,IAAS;QACzB,IAAI,IAAI,CAAC,QAAQ,CAAC;YACd,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnC,IAAI,IAAI,CAAC,cAAc,CAAC;YACpB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,sBAAM,GAAb;QACI,OAAO;YACH,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE;YAC1B,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE;SACxC,CAAC;IACN,CAAC;IAGL,YAAC;AAAD,CAAC,AAlGD,IAkGC;AACD,iBAAS,KAAK,CAAC"} \ No newline at end of file diff --git a/lib/processout.d.ts b/lib/processout.d.ts index 9e2f339..3c25100 100644 --- a/lib/processout.d.ts +++ b/lib/processout.d.ts @@ -108,6 +108,12 @@ declare class ProcessOut { * @return {CardInformation} */ newCardInformation(prefill?: p.CardInformation): p.CardInformation; + /** + * Create a new Phone instance + * @param {array} prefill + * @return {Phone} + */ + newPhone(prefill?: p.Phone): p.Phone; /** * Create a new Coupon instance * @param {array} prefill @@ -252,6 +258,12 @@ declare class ProcessOut { * @return {PayoutItem} */ newPayoutItem(prefill?: p.PayoutItem): p.PayoutItem; + /** + * Create a new PayoutItemAmountBreakdowns instance + * @param {array} prefill + * @return {PayoutItemAmountBreakdowns} + */ + newPayoutItemAmountBreakdowns(prefill?: p.PayoutItemAmountBreakdowns): p.PayoutItemAmountBreakdowns; /** * Create a new Plan instance * @param {array} prefill @@ -354,6 +366,36 @@ declare class ProcessOut { * @return {WebhookEndpoint} */ newWebhookEndpoint(prefill?: p.WebhookEndpoint): p.WebhookEndpoint; + /** + * Create a new CardCreateRequest instance + * @param {array} prefill + * @return {CardCreateRequest} + */ + newCardCreateRequest(prefill?: p.CardCreateRequest): p.CardCreateRequest; + /** + * Create a new Device instance + * @param {array} prefill + * @return {Device} + */ + newDevice(prefill?: p.Device): p.Device; + /** + * Create a new CardContact instance + * @param {array} prefill + * @return {CardContact} + */ + newCardContact(prefill?: p.CardContact): p.CardContact; + /** + * Create a new CardShipping instance + * @param {array} prefill + * @return {CardShipping} + */ + newCardShipping(prefill?: p.CardShipping): p.CardShipping; + /** + * Create a new CardUpdateRequest instance + * @param {array} prefill + * @return {CardUpdateRequest} + */ + newCardUpdateRequest(prefill?: p.CardUpdateRequest): p.CardUpdateRequest; /** * Create a new ErrorCodes instance * @param {array} prefill diff --git a/lib/processout.d.ts.map b/lib/processout.d.ts.map index 89ed4d5..ed99b76 100644 --- a/lib/processout.d.ts.map +++ b/lib/processout.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"processout.d.ts","sourceRoot":"","sources":["../src/processout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;AAEvB,cAAM,UAAU;IACZ;;;OAGG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,CAAgC;IAEtD;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,CAAM;IAEjC;;;OAGG;IACH,SAAS,CAAC,aAAa,EAAE,MAAM,CAAM;IAErC;;;OAGG;IACK,KAAK,EAAE,KAAK,CAAQ;IAE5B;;;;;;;;OAQG;gBACS,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE;IAMjF;;;OAGG;IACI,OAAO,IAAI,MAAM;IAIxB;;;;OAIG;IACI,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAI/B;;;OAGG;IACI,YAAY,IAAI,MAAM;IAI7B;;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C;CAKxI;AACD,SAAS,UAAU,CAAC"} \ No newline at end of file diff --git a/lib/processout.js b/lib/processout.js index 17dbca9..1016a37 100644 --- a/lib/processout.js +++ b/lib/processout.js @@ -137,6 +137,14 @@ var ProcessOut = /** @class */ (function () { ProcessOut.prototype.newCardInformation = function (prefill) { return new p.CardInformation(this, prefill); }; + /** + * Create a new Phone instance + * @param {array} prefill + * @return {Phone} + */ + ProcessOut.prototype.newPhone = function (prefill) { + return new p.Phone(this, prefill); + }; /** * Create a new Coupon instance * @param {array} prefill @@ -329,6 +337,14 @@ var ProcessOut = /** @class */ (function () { ProcessOut.prototype.newPayoutItem = function (prefill) { return new p.PayoutItem(this, prefill); }; + /** + * Create a new PayoutItemAmountBreakdowns instance + * @param {array} prefill + * @return {PayoutItemAmountBreakdowns} + */ + ProcessOut.prototype.newPayoutItemAmountBreakdowns = function (prefill) { + return new p.PayoutItemAmountBreakdowns(this, prefill); + }; /** * Create a new Plan instance * @param {array} prefill @@ -465,6 +481,46 @@ var ProcessOut = /** @class */ (function () { ProcessOut.prototype.newWebhookEndpoint = function (prefill) { return new p.WebhookEndpoint(this, prefill); }; + /** + * Create a new CardCreateRequest instance + * @param {array} prefill + * @return {CardCreateRequest} + */ + ProcessOut.prototype.newCardCreateRequest = function (prefill) { + return new p.CardCreateRequest(this, prefill); + }; + /** + * Create a new Device instance + * @param {array} prefill + * @return {Device} + */ + ProcessOut.prototype.newDevice = function (prefill) { + return new p.Device(this, prefill); + }; + /** + * Create a new CardContact instance + * @param {array} prefill + * @return {CardContact} + */ + ProcessOut.prototype.newCardContact = function (prefill) { + return new p.CardContact(this, prefill); + }; + /** + * Create a new CardShipping instance + * @param {array} prefill + * @return {CardShipping} + */ + ProcessOut.prototype.newCardShipping = function (prefill) { + return new p.CardShipping(this, prefill); + }; + /** + * Create a new CardUpdateRequest instance + * @param {array} prefill + * @return {CardUpdateRequest} + */ + ProcessOut.prototype.newCardUpdateRequest = function (prefill) { + return new p.CardUpdateRequest(this, prefill); + }; /** * Create a new ErrorCodes instance * @param {array} prefill diff --git a/lib/processout.js.map b/lib/processout.js.map index 5f9eea5..2875b26 100644 --- a/lib/processout.js.map +++ b/lib/processout.js.map @@ -1 +1 @@ -{"version":3,"file":"processout.js","sourceRoot":"","sources":["../src/processout.ts"],"names":[],"mappings":";AAAA,uDAAuD;AAGvD,qBAAuB;AAEvB;IAyBI;;;;;;;;OAQG;IACH,oBAAY,SAAiB,EAAE,aAAqB,EAAE,OAA2B;QAjCjF;;;WAGG;QACO,SAAI,GAAW,4BAA4B,CAAC;QAEtD;;;WAGG;QACO,cAAS,GAAW,EAAE,CAAC;QAEjC;;;WAGG;QACO,kBAAa,GAAW,EAAE,CAAC;QAErC;;;WAGG;QACK,UAAK,GAAU,IAAI,CAAC;QAYxB,IAAI,CAAC,SAAS,GAAO,SAAS,CAAC;QAC/B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,KAAK,GAAW,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC;IAClD,CAAC;IAED;;;OAGG;IACI,4BAAO,GAAd;QACI,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACI,4BAAO,GAAd,UAAe,CAAS;QACpB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAClB,CAAC;IAED;;;OAGG;IACI,iCAAY,GAAnB;QACI,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,qCAAgB,GAAvB;QACI,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAGD;;;;OAIG;IACC,gCAAW,GAAlB,UAAmB,OAAoB;QAChC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACC,6BAAQ,GAAf,UAAgB,OAAiB;QAC1B,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CA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AC3C,CAAC;IAED;;;;OAIG;IACC,0CAAqB,GAA5B,UAA6B,OAA8B;QACpD,OAAO,IAAI,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACC,0DAAqC,GAA5C,UAA6C,OAA8C;QACpF,OAAO,IAAI,CAAC,CAAC,kCAAkC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAED;;;;OAIG;IACC,0DAAqC,GAA5C,UAA6C,OAA8C;QACpF,OAAO,IAAI,CAAC,CAAC,kCAAkC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAED;;;;OAIG;IACC,mDAA8B,GAArC,UAAsC,OAAuC;QACtE,OAAO,IAAI,CAAC,CAAC,2BAA2B,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACC,4DAAuC,GAA9C,UAA+C,OAAgD;QACxF,OAAO,IAAI,CAAC,CAAC,oCAAoC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAGL,iBAAC;AAAD,CAAC,AAloBD,IAkoBC;AACD,iBAAS,UAAU,CAAC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6e2ddb0..f0e52bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "processout", - "version": "8.16.0", + "version": "8.17.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "processout", - "version": "8.16.0", + "version": "8.17.0", "license": "MIT", "dependencies": { "@types/node": "^13.7.4", @@ -132,10 +132,13 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.6.tgz", - "integrity": "sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -401,18 +404,18 @@ "dev": true }, "node_modules/es-abstract": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.4.tgz", - "integrity": "sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==", + "version": "1.22.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.5.tgz", + "integrity": "sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.6", + "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", "es-define-property": "^1.0.0", "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.2", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", "get-intrinsic": "^1.2.4", @@ -420,15 +423,15 @@ "globalthis": "^1.0.3", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.1", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", "hasown": "^2.0.1", "internal-slot": "^1.0.7", "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", @@ -441,10 +444,10 @@ "string.prototype.trim": "^1.2.8", "string.prototype.trimend": "^1.0.7", "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.1", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.5", "unbox-primitive": "^1.0.2", "which-typed-array": "^1.1.14" }, @@ -501,14 +504,14 @@ } }, "node_modules/es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -757,9 +760,9 @@ } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, "engines": { "node": ">= 0.4" @@ -796,9 +799,9 @@ } }, "node_modules/hasown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", - "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "dependencies": { "function-bind": "^1.1.2" @@ -950,9 +953,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, "engines": { "node": ">= 0.4" @@ -993,12 +996,15 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1339,6 +1345,15 @@ "node": ">=0.10.0" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", @@ -1373,13 +1388,13 @@ "dev": true }, "node_modules/safe-array-concat": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", - "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", - "get-intrinsic": "^1.2.2", + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -1423,43 +1438,44 @@ "dev": true }, "node_modules/set-function-length": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", - "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, "dependencies": { - "define-data-property": "^1.1.2", + "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "dependencies": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/side-channel": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.5.tgz", - "integrity": "sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, "dependencies": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.7", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.4", "object-inspect": "^1.13.1" @@ -1583,12 +1599,12 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.1.tgz", - "integrity": "sha512-RSqu1UEuSlrBhHTWC8O9FnPjOduNs4M7rJ4pRKoEjtx1zUNOPN2sSXHLDX+Y2WPbHIxbvg4JFo2DNAEfPIKWoQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.7", "es-errors": "^1.3.0", "is-typed-array": "^1.1.13" }, @@ -1597,15 +1613,16 @@ } }, "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -1615,16 +1632,17 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -1634,14 +1652,20 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.5.tgz", + "integrity": "sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1711,16 +1735,16 @@ "dev": true }, "node_modules/which-typed-array": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz", - "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.6", - "call-bind": "^1.0.5", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.1" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" diff --git a/package.json b/package.json index 86d3730..06b61ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "processout", - "version": "8.16.0", + "version": "8.17.0", "description": "ProcessOut API bindings.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/cardcontact.ts b/src/cardcontact.ts new file mode 100755 index 0000000..39d4d3c --- /dev/null +++ b/src/cardcontact.ts @@ -0,0 +1,228 @@ +// The content of this file was automatically generated + +import fetch = require('node-fetch'); + +import ProcessOut = require('./processout'); +import Response = require('./networking/response'); +import Request = require('./networking/request'); + +import ProcessOutNetworkError = require('./errors/processoutnetworkerror'); + +import * as p from '.'; + +class CardContact { + private client: ProcessOut = null; + + /** + * Address line of the card holder + * @type {string} + */ + private address1: string = null; + + /** + * Secondary address line of the card holder + * @type {string} + */ + private address2: string = null; + + /** + * City of the card holder + * @type {string} + */ + private city: string = null; + + /** + * State of the card holder + * @type {string} + */ + private state: string = null; + + /** + * Country code of the card holder (ISO-3166, 2 characters format) + * @type {string} + */ + private countryCode: string = null; + + /** + * ZIP code of the card holder + * @type {string} + */ + private zip: string = null; + + /** + * CardContact constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: CardContact) { + if (typeof client === 'undefined') + throw new Error("The CardContact object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newCardContact()"); + + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + + public getProcessOutObjectClass(): string { + return "CardContact"; + } + + /** + * Get Address1 + * Address line of the card holder + * @return {string} + */ + public getAddress1(): string { + return this.address1; + } + + /** + * Set Address1 + * Address line of the card holder + * @param {string} val + * @return {CardContact} + */ + public setAddress1(val: string): CardContact { + this.address1 = val; + return this; + } + + /** + * Get Address2 + * Secondary address line of the card holder + * @return {string} + */ + public getAddress2(): string { + return this.address2; + } + + /** + * Set Address2 + * Secondary address line of the card holder + * @param {string} val + * @return {CardContact} + */ + public setAddress2(val: string): CardContact { + this.address2 = val; + return this; + } + + /** + * Get City + * City of the card holder + * @return {string} + */ + public getCity(): string { + return this.city; + } + + /** + * Set City + * City of the card holder + * @param {string} val + * @return {CardContact} + */ + public setCity(val: string): CardContact { + this.city = val; + return this; + } + + /** + * Get State + * State of the card holder + * @return {string} + */ + public getState(): string { + return this.state; + } + + /** + * Set State + * State of the card holder + * @param {string} val + * @return {CardContact} + */ + public setState(val: string): CardContact { + this.state = val; + return this; + } + + /** + * Get CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @return {string} + */ + public getCountryCode(): string { + return this.countryCode; + } + + /** + * Set CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @param {string} val + * @return {CardContact} + */ + public setCountryCode(val: string): CardContact { + this.countryCode = val; + return this; + } + + /** + * Get Zip + * ZIP code of the card holder + * @return {string} + */ + public getZip(): string { + return this.zip; + } + + /** + * Set Zip + * ZIP code of the card holder + * @param {string} val + * @return {CardContact} + */ + public setZip(val: string): CardContact { + this.zip = val; + return this; + } + + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardContact} + */ + public fillWithData(data: any): CardContact { + if (data["address1"]) + this.setAddress1(data["address1"]); + if (data["address2"]) + this.setAddress2(data["address2"]); + if (data["city"]) + this.setCity(data["city"]); + if (data["state"]) + this.setState(data["state"]); + if (data["country_code"]) + this.setCountryCode(data["country_code"]); + if (data["zip"]) + this.setZip(data["zip"]); + return this; + } + + /** + * Implements a JSON custom marshaller + * @return {any} + */ + public toJSON(): any { + return { + "address1": this.getAddress1(), + "address2": this.getAddress2(), + "city": this.getCity(), + "state": this.getState(), + "country_code": this.getCountryCode(), + "zip": this.getZip(), + }; + } + + +} +export = CardContact; diff --git a/src/cardcreaterequest.ts b/src/cardcreaterequest.ts new file mode 100755 index 0000000..6a614fe --- /dev/null +++ b/src/cardcreaterequest.ts @@ -0,0 +1,615 @@ +// The content of this file was automatically generated + +import fetch = require('node-fetch'); + +import ProcessOut = require('./processout'); +import Response = require('./networking/response'); +import Request = require('./networking/request'); + +import ProcessOutNetworkError = require('./errors/processoutnetworkerror'); + +import * as p from '.'; + +class CardCreateRequest { + private client: ProcessOut = null; + + /** + * Device used to create the card + * @type {p.Device} + */ + private device: p.Device = null; + + /** + * Cardholder name + * @type {string} + */ + private name: string = null; + + /** + * Card PAN (raw) + * @type {string} + */ + private number: string = null; + + /** + * Card expiration day. Used for Apple Pay + * @type {string} + */ + private expDay: string = null; + + /** + * Card expiration month + * @type {string} + */ + private expMonth: string = null; + + /** + * Card expiration year + * @type {string} + */ + private expYear: string = null; + + /** + * CVC2 + * @type {string} + */ + private cvc2: string = null; + + /** + * Preferred card scheme + * @type {string} + */ + private preferredScheme: string = null; + + /** + * Metadata related to the card, in the form of a dictionary (key-value pair) + * @type {any} + */ + private metadata: any = null; + + /** + * This field defines if the card was tokenized with a 3rd party tokenization method: applepay, googlepay + * @type {string} + */ + private tokenType: string = null; + + /** + * ECI indicator. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + private eci: string = null; + + /** + * Cryptogram (Base64-encoded). Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + private cryptogram: string = null; + + /** + * Raw ApplePay card tokenization response. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + private applepayResponse: string = null; + + /** + * ApplePay MID. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + private applepayMid: string = null; + + /** + * Google payment token. Used if the card was tokenized with a 3rd party tokenization method + * @type {string} + */ + private paymentToken: string = null; + + /** + * Cardholder contact information + * @type {p.CardContact} + */ + private contact: p.CardContact = null; + + /** + * Cardholder shipping information + * @type {p.CardShipping} + */ + private shipping: p.CardShipping = null; + + /** + * CardCreateRequest constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: CardCreateRequest) { + if (typeof client === 'undefined') + throw new Error("The CardCreateRequest object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newCardCreateRequest()"); + + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + + public getProcessOutObjectClass(): string { + return "CardCreateRequest"; + } + + /** + * Get Device + * Device used to create the card + * @return {p.Device} + */ + public getDevice(): p.Device { + return this.device; + } + + /** + * Set Device + * Device used to create the card + * @param {p.Device} val + * @return {CardCreateRequest} + */ + public setDevice(val: p.Device): CardCreateRequest { + if (val.getProcessOutObjectClass && + val.getProcessOutObjectClass() == this.client.newDevice().getProcessOutObjectClass()) + this.device = val; + else { + var obj = this.client.newDevice(); + obj.fillWithData(val); + this.device = obj; + } + return this; + } + + /** + * Get Name + * Cardholder name + * @return {string} + */ + public getName(): string { + return this.name; + } + + /** + * Set Name + * Cardholder name + * @param {string} val + * @return {CardCreateRequest} + */ + public setName(val: string): CardCreateRequest { + this.name = val; + return this; + } + + /** + * Get Number + * Card PAN (raw) + * @return {string} + */ + public getNumber(): string { + return this.number; + } + + /** + * Set Number + * Card PAN (raw) + * @param {string} val + * @return {CardCreateRequest} + */ + public setNumber(val: string): CardCreateRequest { + this.number = val; + return this; + } + + /** + * Get ExpDay + * Card expiration day. Used for Apple Pay + * @return {string} + */ + public getExpDay(): string { + return this.expDay; + } + + /** + * Set ExpDay + * Card expiration day. Used for Apple Pay + * @param {string} val + * @return {CardCreateRequest} + */ + public setExpDay(val: string): CardCreateRequest { + this.expDay = val; + return this; + } + + /** + * Get ExpMonth + * Card expiration month + * @return {string} + */ + public getExpMonth(): string { + return this.expMonth; + } + + /** + * Set ExpMonth + * Card expiration month + * @param {string} val + * @return {CardCreateRequest} + */ + public setExpMonth(val: string): CardCreateRequest { + this.expMonth = val; + return this; + } + + /** + * Get ExpYear + * Card expiration year + * @return {string} + */ + public getExpYear(): string { + return this.expYear; + } + + /** + * Set ExpYear + * Card expiration year + * @param {string} val + * @return {CardCreateRequest} + */ + public setExpYear(val: string): CardCreateRequest { + this.expYear = val; + return this; + } + + /** + * Get Cvc2 + * CVC2 + * @return {string} + */ + public getCvc2(): string { + return this.cvc2; + } + + /** + * Set Cvc2 + * CVC2 + * @param {string} val + * @return {CardCreateRequest} + */ + public setCvc2(val: string): CardCreateRequest { + this.cvc2 = val; + return this; + } + + /** + * Get PreferredScheme + * Preferred card scheme + * @return {string} + */ + public getPreferredScheme(): string { + return this.preferredScheme; + } + + /** + * Set PreferredScheme + * Preferred card scheme + * @param {string} val + * @return {CardCreateRequest} + */ + public setPreferredScheme(val: string): CardCreateRequest { + this.preferredScheme = val; + return this; + } + + /** + * Get Metadata + * Metadata related to the card, in the form of a dictionary (key-value pair) + * @return {any} + */ + public getMetadata(): any { + return this.metadata; + } + + /** + * Set Metadata + * Metadata related to the card, in the form of a dictionary (key-value pair) + * @param {any} val + * @return {CardCreateRequest} + */ + public setMetadata(val: any): CardCreateRequest { + this.metadata = val; + return this; + } + + /** + * Get TokenType + * This field defines if the card was tokenized with a 3rd party tokenization method: applepay, googlepay + * @return {string} + */ + public getTokenType(): string { + return this.tokenType; + } + + /** + * Set TokenType + * This field defines if the card was tokenized with a 3rd party tokenization method: applepay, googlepay + * @param {string} val + * @return {CardCreateRequest} + */ + public setTokenType(val: string): CardCreateRequest { + this.tokenType = val; + return this; + } + + /** + * Get Eci + * ECI indicator. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + public getEci(): string { + return this.eci; + } + + /** + * Set Eci + * ECI indicator. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + public setEci(val: string): CardCreateRequest { + this.eci = val; + return this; + } + + /** + * Get Cryptogram + * Cryptogram (Base64-encoded). Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + public getCryptogram(): string { + return this.cryptogram; + } + + /** + * Set Cryptogram + * Cryptogram (Base64-encoded). Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + public setCryptogram(val: string): CardCreateRequest { + this.cryptogram = val; + return this; + } + + /** + * Get ApplepayResponse + * Raw ApplePay card tokenization response. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + public getApplepayResponse(): string { + return this.applepayResponse; + } + + /** + * Set ApplepayResponse + * Raw ApplePay card tokenization response. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + public setApplepayResponse(val: string): CardCreateRequest { + this.applepayResponse = val; + return this; + } + + /** + * Get ApplepayMid + * ApplePay MID. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + public getApplepayMid(): string { + return this.applepayMid; + } + + /** + * Set ApplepayMid + * ApplePay MID. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + public setApplepayMid(val: string): CardCreateRequest { + this.applepayMid = val; + return this; + } + + /** + * Get PaymentToken + * Google payment token. Used if the card was tokenized with a 3rd party tokenization method + * @return {string} + */ + public getPaymentToken(): string { + return this.paymentToken; + } + + /** + * Set PaymentToken + * Google payment token. Used if the card was tokenized with a 3rd party tokenization method + * @param {string} val + * @return {CardCreateRequest} + */ + public setPaymentToken(val: string): CardCreateRequest { + this.paymentToken = val; + return this; + } + + /** + * Get Contact + * Cardholder contact information + * @return {p.CardContact} + */ + public getContact(): p.CardContact { + return this.contact; + } + + /** + * Set Contact + * Cardholder contact information + * @param {p.CardContact} val + * @return {CardCreateRequest} + */ + public setContact(val: p.CardContact): CardCreateRequest { + if (val.getProcessOutObjectClass && + val.getProcessOutObjectClass() == this.client.newCardContact().getProcessOutObjectClass()) + this.contact = val; + else { + var obj = this.client.newCardContact(); + obj.fillWithData(val); + this.contact = obj; + } + return this; + } + + /** + * Get Shipping + * Cardholder shipping information + * @return {p.CardShipping} + */ + public getShipping(): p.CardShipping { + return this.shipping; + } + + /** + * Set Shipping + * Cardholder shipping information + * @param {p.CardShipping} val + * @return {CardCreateRequest} + */ + public setShipping(val: p.CardShipping): CardCreateRequest { + if (val.getProcessOutObjectClass && + val.getProcessOutObjectClass() == this.client.newCardShipping().getProcessOutObjectClass()) + this.shipping = val; + else { + var obj = this.client.newCardShipping(); + obj.fillWithData(val); + this.shipping = obj; + } + return this; + } + + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardCreateRequest} + */ + public fillWithData(data: any): CardCreateRequest { + if (data["device"]) + this.setDevice(data["device"]); + if (data["name"]) + this.setName(data["name"]); + if (data["number"]) + this.setNumber(data["number"]); + if (data["exp_day"]) + this.setExpDay(data["exp_day"]); + if (data["exp_month"]) + this.setExpMonth(data["exp_month"]); + if (data["exp_year"]) + this.setExpYear(data["exp_year"]); + if (data["cvc2"]) + this.setCvc2(data["cvc2"]); + if (data["preferred_scheme"]) + this.setPreferredScheme(data["preferred_scheme"]); + if (data["metadata"]) + this.setMetadata(data["metadata"]); + if (data["token_type"]) + this.setTokenType(data["token_type"]); + if (data["eci"]) + this.setEci(data["eci"]); + if (data["cryptogram"]) + this.setCryptogram(data["cryptogram"]); + if (data["applepay_response"]) + this.setApplepayResponse(data["applepay_response"]); + if (data["applepay_mid"]) + this.setApplepayMid(data["applepay_mid"]); + if (data["payment_token"]) + this.setPaymentToken(data["payment_token"]); + if (data["contact"]) + this.setContact(data["contact"]); + if (data["shipping"]) + this.setShipping(data["shipping"]); + return this; + } + + /** + * Implements a JSON custom marshaller + * @return {any} + */ + public toJSON(): any { + return { + "device": this.getDevice(), + "name": this.getName(), + "number": this.getNumber(), + "exp_day": this.getExpDay(), + "exp_month": this.getExpMonth(), + "exp_year": this.getExpYear(), + "cvc2": this.getCvc2(), + "preferred_scheme": this.getPreferredScheme(), + "metadata": this.getMetadata(), + "token_type": this.getTokenType(), + "eci": this.getEci(), + "cryptogram": this.getCryptogram(), + "applepay_response": this.getApplepayResponse(), + "applepay_mid": this.getApplepayMid(), + "payment_token": this.getPaymentToken(), + "contact": this.getContact(), + "shipping": this.getShipping(), + }; + } + + /** + * Create a new card. + * + * @param {any} options + * @return {Promise} + */ + public create(options): Promise { + if (!options) options = {}; + this.fillWithData(options); + + var request = new Request(this.client); + var path = "/cards"; + + var data = { + + }; + + var cur = this; + return new Promise(function(resolve, reject) { + var callback = async function(resp: fetch.Response) { + var respBody = {}; + try { + respBody = await resp.json(); + } catch(err) {} + + var response = new Response(resp, respBody); + var err = response.check(); + if (err != null) + return reject(err); + + var returnValues = []; + + + var body = respBody; + body = body['card']; + + returnValues.push(cur.fillWithData(body)); + + return resolve.apply(this, returnValues); + }; + var callbackError = function(err) { + return reject(new ProcessOutNetworkError('processout-sdk.network-issue', err.message)); + }; + + request.post(path, data, options).then(callback, callbackError); + }); + } + +} +export = CardCreateRequest; diff --git a/src/cardshipping.ts b/src/cardshipping.ts new file mode 100755 index 0000000..5e9e08e --- /dev/null +++ b/src/cardshipping.ts @@ -0,0 +1,264 @@ +// The content of this file was automatically generated + +import fetch = require('node-fetch'); + +import ProcessOut = require('./processout'); +import Response = require('./networking/response'); +import Request = require('./networking/request'); + +import ProcessOutNetworkError = require('./errors/processoutnetworkerror'); + +import * as p from '.'; + +class CardShipping { + private client: ProcessOut = null; + + /** + * Address line of the card holder + * @type {string} + */ + private address1: string = null; + + /** + * Secondary address line of the card holder + * @type {string} + */ + private address2: string = null; + + /** + * City of the card holder + * @type {string} + */ + private city: string = null; + + /** + * State of the card holder + * @type {string} + */ + private state: string = null; + + /** + * Country code of the card holder (ISO-3166, 2 characters format) + * @type {string} + */ + private countryCode: string = null; + + /** + * ZIP code of the card holder + * @type {string} + */ + private zip: string = null; + + /** + * Shipping phone number + * @type {p.Phone} + */ + private phone: p.Phone = null; + + /** + * CardShipping constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: CardShipping) { + if (typeof client === 'undefined') + throw new Error("The CardShipping object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newCardShipping()"); + + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + + public getProcessOutObjectClass(): string { + return "CardShipping"; + } + + /** + * Get Address1 + * Address line of the card holder + * @return {string} + */ + public getAddress1(): string { + return this.address1; + } + + /** + * Set Address1 + * Address line of the card holder + * @param {string} val + * @return {CardShipping} + */ + public setAddress1(val: string): CardShipping { + this.address1 = val; + return this; + } + + /** + * Get Address2 + * Secondary address line of the card holder + * @return {string} + */ + public getAddress2(): string { + return this.address2; + } + + /** + * Set Address2 + * Secondary address line of the card holder + * @param {string} val + * @return {CardShipping} + */ + public setAddress2(val: string): CardShipping { + this.address2 = val; + return this; + } + + /** + * Get City + * City of the card holder + * @return {string} + */ + public getCity(): string { + return this.city; + } + + /** + * Set City + * City of the card holder + * @param {string} val + * @return {CardShipping} + */ + public setCity(val: string): CardShipping { + this.city = val; + return this; + } + + /** + * Get State + * State of the card holder + * @return {string} + */ + public getState(): string { + return this.state; + } + + /** + * Set State + * State of the card holder + * @param {string} val + * @return {CardShipping} + */ + public setState(val: string): CardShipping { + this.state = val; + return this; + } + + /** + * Get CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @return {string} + */ + public getCountryCode(): string { + return this.countryCode; + } + + /** + * Set CountryCode + * Country code of the card holder (ISO-3166, 2 characters format) + * @param {string} val + * @return {CardShipping} + */ + public setCountryCode(val: string): CardShipping { + this.countryCode = val; + return this; + } + + /** + * Get Zip + * ZIP code of the card holder + * @return {string} + */ + public getZip(): string { + return this.zip; + } + + /** + * Set Zip + * ZIP code of the card holder + * @param {string} val + * @return {CardShipping} + */ + public setZip(val: string): CardShipping { + this.zip = val; + return this; + } + + /** + * Get Phone + * Shipping phone number + * @return {p.Phone} + */ + public getPhone(): p.Phone { + return this.phone; + } + + /** + * Set Phone + * Shipping phone number + * @param {p.Phone} val + * @return {CardShipping} + */ + public setPhone(val: p.Phone): CardShipping { + if (val.getProcessOutObjectClass && + val.getProcessOutObjectClass() == this.client.newPhone().getProcessOutObjectClass()) + this.phone = val; + else { + var obj = this.client.newPhone(); + obj.fillWithData(val); + this.phone = obj; + } + return this; + } + + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardShipping} + */ + public fillWithData(data: any): CardShipping { + if (data["address1"]) + this.setAddress1(data["address1"]); + if (data["address2"]) + this.setAddress2(data["address2"]); + if (data["city"]) + this.setCity(data["city"]); + if (data["state"]) + this.setState(data["state"]); + if (data["country_code"]) + this.setCountryCode(data["country_code"]); + if (data["zip"]) + this.setZip(data["zip"]); + if (data["phone"]) + this.setPhone(data["phone"]); + return this; + } + + /** + * Implements a JSON custom marshaller + * @return {any} + */ + public toJSON(): any { + return { + "address1": this.getAddress1(), + "address2": this.getAddress2(), + "city": this.getCity(), + "state": this.getState(), + "country_code": this.getCountryCode(), + "zip": this.getZip(), + "phone": this.getPhone(), + }; + } + + +} +export = CardShipping; diff --git a/src/cardupdaterequest.ts b/src/cardupdaterequest.ts new file mode 100755 index 0000000..2882c97 --- /dev/null +++ b/src/cardupdaterequest.ts @@ -0,0 +1,188 @@ +// The content of this file was automatically generated + +import fetch = require('node-fetch'); + +import ProcessOut = require('./processout'); +import Response = require('./networking/response'); +import Request = require('./networking/request'); + +import ProcessOutNetworkError = require('./errors/processoutnetworkerror'); + +import * as p from '.'; + +class CardUpdateRequest { + private client: ProcessOut = null; + + /** + * Card update type. Possible values: "new-cvc2" or "other" + * @type {string} + */ + private updateType: string = null; + + /** + * Card update reason. + * @type {string} + */ + private updateReason: string = null; + + /** + * Customer preferred scheme, such as carte bancaire vs visa + * @type {string} + */ + private preferredScheme: string = null; + + /** + * CardUpdateRequest constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: CardUpdateRequest) { + if (typeof client === 'undefined') + throw new Error("The CardUpdateRequest object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newCardUpdateRequest()"); + + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + + public getProcessOutObjectClass(): string { + return "CardUpdateRequest"; + } + + /** + * Get UpdateType + * Card update type. Possible values: "new-cvc2" or "other" + * @return {string} + */ + public getUpdateType(): string { + return this.updateType; + } + + /** + * Set UpdateType + * Card update type. Possible values: "new-cvc2" or "other" + * @param {string} val + * @return {CardUpdateRequest} + */ + public setUpdateType(val: string): CardUpdateRequest { + this.updateType = val; + return this; + } + + /** + * Get UpdateReason + * Card update reason. + * @return {string} + */ + public getUpdateReason(): string { + return this.updateReason; + } + + /** + * Set UpdateReason + * Card update reason. + * @param {string} val + * @return {CardUpdateRequest} + */ + public setUpdateReason(val: string): CardUpdateRequest { + this.updateReason = val; + return this; + } + + /** + * Get PreferredScheme + * Customer preferred scheme, such as carte bancaire vs visa + * @return {string} + */ + public getPreferredScheme(): string { + return this.preferredScheme; + } + + /** + * Set PreferredScheme + * Customer preferred scheme, such as carte bancaire vs visa + * @param {string} val + * @return {CardUpdateRequest} + */ + public setPreferredScheme(val: string): CardUpdateRequest { + this.preferredScheme = val; + return this; + } + + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {CardUpdateRequest} + */ + public fillWithData(data: any): CardUpdateRequest { + if (data["update_type"]) + this.setUpdateType(data["update_type"]); + if (data["update_reason"]) + this.setUpdateReason(data["update_reason"]); + if (data["preferred_scheme"]) + this.setPreferredScheme(data["preferred_scheme"]); + return this; + } + + /** + * Implements a JSON custom marshaller + * @return {any} + */ + public toJSON(): any { + return { + "update_type": this.getUpdateType(), + "update_reason": this.getUpdateReason(), + "preferred_scheme": this.getPreferredScheme(), + }; + } + + /** + * Update a card by its ID. + * @param string cardId + * @param {any} options + * @return {Promise} + */ + public update(cardId: string, options): Promise { + if (!options) options = {}; + this.fillWithData(options); + + var request = new Request(this.client); + var path = "/cards/" + encodeURI(cardId) + ""; + + var data = { + + }; + + var cur = this; + return new Promise(function(resolve, reject) { + var callback = async function(resp: fetch.Response) { + var respBody = {}; + try { + respBody = await resp.json(); + } catch(err) {} + + var response = new Response(resp, respBody); + var err = response.check(); + if (err != null) + return reject(err); + + var returnValues = []; + + + var body = respBody; + body = body['card']; + + returnValues.push(cur.fillWithData(body)); + + return resolve.apply(this, returnValues); + }; + var callbackError = function(err) { + return reject(new ProcessOutNetworkError('processout-sdk.network-issue', err.message)); + }; + + request.put(path, data, options).then(callback, callbackError); + }); + } + +} +export = CardUpdateRequest; diff --git a/src/device.ts b/src/device.ts new file mode 100755 index 0000000..57780ad --- /dev/null +++ b/src/device.ts @@ -0,0 +1,431 @@ +// The content of this file was automatically generated + +import fetch = require('node-fetch'); + +import ProcessOut = require('./processout'); +import Response = require('./networking/response'); +import Request = require('./networking/request'); + +import ProcessOutNetworkError = require('./errors/processoutnetworkerror'); + +import * as p from '.'; + +class Device { + private client: ProcessOut = null; + + /** + * Request origin. Use "backend" if the request is not coming directly from the frontend + * @type {string} + */ + private requestOrigin: string = null; + + /** + * Device identifier + * @type {string} + */ + private id: string = null; + + /** + * Device channel. Possible values: "web", "ios", "android", "other" + * @type {string} + */ + private channel: string = null; + + /** + * Device IP address. Use if request origin is "backend" + * @type {string} + */ + private ipAddress: string = null; + + /** + * Device user agent. Use if request origin is "backend" + * @type {string} + */ + private userAgent: string = null; + + /** + * Device accept header. Use if request origin is "backend" + * @type {string} + */ + private headerAccept: string = null; + + /** + * Device referer header. Use if request origin is "backend" + * @type {string} + */ + private headerReferer: string = null; + + /** + * Device color depth. Use if request origin is "backend" + * @type {number} + */ + private appColorDepth: number = null; + + /** + * Device Java enabled. Use if request origin is "backend" + * @type {boolean} + */ + private appJavaEnabled: boolean = null; + + /** + * Device language. Use if request origin is "backend" + * @type {string} + */ + private appLanguage: string = null; + + /** + * Device screen height. Use if request origin is "backend" + * @type {number} + */ + private appScreenHeight: number = null; + + /** + * Device screen width. Use if request origin is "backend" + * @type {number} + */ + private appScreenWidth: number = null; + + /** + * Device timezone offset. Use if request origin is "backend" + * @type {number} + */ + private appTimezoneOffset: number = null; + + /** + * Device constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: Device) { + if (typeof client === 'undefined') + throw new Error("The Device object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newDevice()"); + + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + + public getProcessOutObjectClass(): string { + return "Device"; + } + + /** + * Get RequestOrigin + * Request origin. Use "backend" if the request is not coming directly from the frontend + * @return {string} + */ + public getRequestOrigin(): string { + return this.requestOrigin; + } + + /** + * Set RequestOrigin + * Request origin. Use "backend" if the request is not coming directly from the frontend + * @param {string} val + * @return {Device} + */ + public setRequestOrigin(val: string): Device { + this.requestOrigin = val; + return this; + } + + /** + * Get Id + * Device identifier + * @return {string} + */ + public getId(): string { + return this.id; + } + + /** + * Set Id + * Device identifier + * @param {string} val + * @return {Device} + */ + public setId(val: string): Device { + this.id = val; + return this; + } + + /** + * Get Channel + * Device channel. Possible values: "web", "ios", "android", "other" + * @return {string} + */ + public getChannel(): string { + return this.channel; + } + + /** + * Set Channel + * Device channel. Possible values: "web", "ios", "android", "other" + * @param {string} val + * @return {Device} + */ + public setChannel(val: string): Device { + this.channel = val; + return this; + } + + /** + * Get IpAddress + * Device IP address. Use if request origin is "backend" + * @return {string} + */ + public getIpAddress(): string { + return this.ipAddress; + } + + /** + * Set IpAddress + * Device IP address. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + public setIpAddress(val: string): Device { + this.ipAddress = val; + return this; + } + + /** + * Get UserAgent + * Device user agent. Use if request origin is "backend" + * @return {string} + */ + public getUserAgent(): string { + return this.userAgent; + } + + /** + * Set UserAgent + * Device user agent. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + public setUserAgent(val: string): Device { + this.userAgent = val; + return this; + } + + /** + * Get HeaderAccept + * Device accept header. Use if request origin is "backend" + * @return {string} + */ + public getHeaderAccept(): string { + return this.headerAccept; + } + + /** + * Set HeaderAccept + * Device accept header. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + public setHeaderAccept(val: string): Device { + this.headerAccept = val; + return this; + } + + /** + * Get HeaderReferer + * Device referer header. Use if request origin is "backend" + * @return {string} + */ + public getHeaderReferer(): string { + return this.headerReferer; + } + + /** + * Set HeaderReferer + * Device referer header. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + public setHeaderReferer(val: string): Device { + this.headerReferer = val; + return this; + } + + /** + * Get AppColorDepth + * Device color depth. Use if request origin is "backend" + * @return {number} + */ + public getAppColorDepth(): number { + return this.appColorDepth; + } + + /** + * Set AppColorDepth + * Device color depth. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + public setAppColorDepth(val: number): Device { + this.appColorDepth = val; + return this; + } + + /** + * Get AppJavaEnabled + * Device Java enabled. Use if request origin is "backend" + * @return {boolean} + */ + public getAppJavaEnabled(): boolean { + return this.appJavaEnabled; + } + + /** + * Set AppJavaEnabled + * Device Java enabled. Use if request origin is "backend" + * @param {boolean} val + * @return {Device} + */ + public setAppJavaEnabled(val: boolean): Device { + this.appJavaEnabled = val; + return this; + } + + /** + * Get AppLanguage + * Device language. Use if request origin is "backend" + * @return {string} + */ + public getAppLanguage(): string { + return this.appLanguage; + } + + /** + * Set AppLanguage + * Device language. Use if request origin is "backend" + * @param {string} val + * @return {Device} + */ + public setAppLanguage(val: string): Device { + this.appLanguage = val; + return this; + } + + /** + * Get AppScreenHeight + * Device screen height. Use if request origin is "backend" + * @return {number} + */ + public getAppScreenHeight(): number { + return this.appScreenHeight; + } + + /** + * Set AppScreenHeight + * Device screen height. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + public setAppScreenHeight(val: number): Device { + this.appScreenHeight = val; + return this; + } + + /** + * Get AppScreenWidth + * Device screen width. Use if request origin is "backend" + * @return {number} + */ + public getAppScreenWidth(): number { + return this.appScreenWidth; + } + + /** + * Set AppScreenWidth + * Device screen width. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + public setAppScreenWidth(val: number): Device { + this.appScreenWidth = val; + return this; + } + + /** + * Get AppTimezoneOffset + * Device timezone offset. Use if request origin is "backend" + * @return {number} + */ + public getAppTimezoneOffset(): number { + return this.appTimezoneOffset; + } + + /** + * Set AppTimezoneOffset + * Device timezone offset. Use if request origin is "backend" + * @param {number} val + * @return {Device} + */ + public setAppTimezoneOffset(val: number): Device { + this.appTimezoneOffset = val; + return this; + } + + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {Device} + */ + public fillWithData(data: any): Device { + if (data["request_origin"]) + this.setRequestOrigin(data["request_origin"]); + if (data["id"]) + this.setId(data["id"]); + if (data["channel"]) + this.setChannel(data["channel"]); + if (data["ip_address"]) + this.setIpAddress(data["ip_address"]); + if (data["user_agent"]) + this.setUserAgent(data["user_agent"]); + if (data["header_accept"]) + this.setHeaderAccept(data["header_accept"]); + if (data["header_referer"]) + this.setHeaderReferer(data["header_referer"]); + if (data["app_color_depth"]) + this.setAppColorDepth(data["app_color_depth"]); + if (data["app_java_enabled"]) + this.setAppJavaEnabled(data["app_java_enabled"]); + if (data["app_language"]) + this.setAppLanguage(data["app_language"]); + if (data["app_screen_height"]) + this.setAppScreenHeight(data["app_screen_height"]); + if (data["app_screen_width"]) + this.setAppScreenWidth(data["app_screen_width"]); + if (data["app_timezone_offset"]) + this.setAppTimezoneOffset(data["app_timezone_offset"]); + return this; + } + + /** + * Implements a JSON custom marshaller + * @return {any} + */ + public toJSON(): any { + return { + "request_origin": this.getRequestOrigin(), + "id": this.getId(), + "channel": this.getChannel(), + "ip_address": this.getIpAddress(), + "user_agent": this.getUserAgent(), + "header_accept": this.getHeaderAccept(), + "header_referer": this.getHeaderReferer(), + "app_color_depth": this.getAppColorDepth(), + "app_java_enabled": this.getAppJavaEnabled(), + "app_language": this.getAppLanguage(), + "app_screen_height": this.getAppScreenHeight(), + "app_screen_width": this.getAppScreenWidth(), + "app_timezone_offset": this.getAppTimezoneOffset(), + }; + } + + +} +export = Device; diff --git a/src/index.ts b/src/index.ts index f555942..a8ddd2d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,6 +11,7 @@ import Balances = require('./balances'); import Balance = require('./balance'); import Card = require('./card'); import CardInformation = require('./cardinformation'); +import Phone = require('./phone'); import Coupon = require('./coupon'); import Customer = require('./customer'); import CustomerPhone = require('./customerphone'); @@ -35,6 +36,7 @@ import CustomerAction = require('./customeraction'); import DunningAction = require('./dunningaction'); import Payout = require('./payout'); import PayoutItem = require('./payoutitem'); +import PayoutItemAmountBreakdowns = require('./payoutitemamountbreakdowns'); import Plan = require('./plan'); import Product = require('./product'); import Project = require('./project'); @@ -52,6 +54,11 @@ import PaymentDataThreeDSAuthentication = require('./paymentdatathreedsauthentic import TransactionOperation = require('./transactionoperation'); import Webhook = require('./webhook'); import WebhookEndpoint = require('./webhookendpoint'); +import CardCreateRequest = require('./cardcreaterequest'); +import Device = require('./device'); +import CardContact = require('./cardcontact'); +import CardShipping = require('./cardshipping'); +import CardUpdateRequest = require('./cardupdaterequest'); import ErrorCodes = require('./errorcodes'); import CategoryErrorCodes = require('./categoryerrorcodes'); import NativeAPMTransactionDetailsGateway = require('./nativeapmtransactiondetailsgateway'); @@ -77,6 +84,7 @@ export {Balances}; export {Balance}; export {Card}; export {CardInformation}; +export {Phone}; export {Coupon}; export {Customer}; export {CustomerPhone}; @@ -101,6 +109,7 @@ export {CustomerAction}; export {DunningAction}; export {Payout}; export {PayoutItem}; +export {PayoutItemAmountBreakdowns}; export {Plan}; export {Product}; export {Project}; @@ -118,6 +127,11 @@ export {PaymentDataThreeDSAuthentication}; export {TransactionOperation}; export {Webhook}; export {WebhookEndpoint}; +export {CardCreateRequest}; +export {Device}; +export {CardContact}; +export {CardShipping}; +export {CardUpdateRequest}; export {ErrorCodes}; export {CategoryErrorCodes}; export {NativeAPMTransactionDetailsGateway}; diff --git a/src/payoutitem.ts b/src/payoutitem.ts index e7b6a51..73532e2 100755 --- a/src/payoutitem.ts +++ b/src/payoutitem.ts @@ -91,6 +91,12 @@ class PayoutItem { */ private createdAt: string = null; + /** + * breakdown of amount for the item + * @type {p.PayoutItemAmountBreakdowns} + */ + private breakdown: p.PayoutItemAmountBreakdowns = null; + /** * PayoutItem constructor * @param {ProcessOut} client @@ -390,6 +396,33 @@ class PayoutItem { return this; } + /** + * Get Breakdown + * breakdown of amount for the item + * @return {p.PayoutItemAmountBreakdowns} + */ + public getBreakdown(): p.PayoutItemAmountBreakdowns { + return this.breakdown; + } + + /** + * Set Breakdown + * breakdown of amount for the item + * @param {p.PayoutItemAmountBreakdowns} val + * @return {PayoutItem} + */ + public setBreakdown(val: p.PayoutItemAmountBreakdowns): PayoutItem { + if (val.getProcessOutObjectClass && + val.getProcessOutObjectClass() == this.client.newPayoutItemAmountBreakdowns().getProcessOutObjectClass()) + this.breakdown = val; + else { + var obj = this.client.newPayoutItemAmountBreakdowns(); + obj.fillWithData(val); + this.breakdown = obj; + } + return this; + } + /** * Fills the current object with the new values pulled from the data * @param {array} data @@ -422,6 +455,8 @@ class PayoutItem { this.setMetadata(data["metadata"]); if (data["created_at"]) this.setCreatedAt(data["created_at"]); + if (data["breakdown"]) + this.setBreakdown(data["breakdown"]); return this; } @@ -444,6 +479,7 @@ class PayoutItem { "fees": this.getFees(), "metadata": this.getMetadata(), "created_at": this.getCreatedAt(), + "breakdown": this.getBreakdown(), }; } diff --git a/src/payoutitemamountbreakdowns.ts b/src/payoutitemamountbreakdowns.ts new file mode 100755 index 0000000..60635c2 --- /dev/null +++ b/src/payoutitemamountbreakdowns.ts @@ -0,0 +1,228 @@ +// The content of this file was automatically generated + +import fetch = require('node-fetch'); + +import ProcessOut = require('./processout'); +import Response = require('./networking/response'); +import Request = require('./networking/request'); + +import ProcessOutNetworkError = require('./errors/processoutnetworkerror'); + +import * as p from '.'; + +class PayoutItemAmountBreakdowns { + private client: ProcessOut = null; + + /** + * Amount relating to scheme fee + * @type {string} + */ + private schemeFee: string = null; + + /** + * Amount relating to interchange fee + * @type {string} + */ + private interchangeFee: string = null; + + /** + * Amount relating to gateway fee + * @type {string} + */ + private gatewayFee: string = null; + + /** + * Amount relating to markup fee + * @type {string} + */ + private markupFee: string = null; + + /** + * Amount relating to acquirer fee + * @type {string} + */ + private acquirerFee: string = null; + + /** + * Amount relating to other fee + * @type {string} + */ + private otherFee: string = null; + + /** + * PayoutItemAmountBreakdowns constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: PayoutItemAmountBreakdowns) { + if (typeof client === 'undefined') + throw new Error("The PayoutItemAmountBreakdowns object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newPayoutItemAmountBreakdowns()"); + + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + + public getProcessOutObjectClass(): string { + return "PayoutItemAmountBreakdowns"; + } + + /** + * Get SchemeFee + * Amount relating to scheme fee + * @return {string} + */ + public getSchemeFee(): string { + return this.schemeFee; + } + + /** + * Set SchemeFee + * Amount relating to scheme fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + public setSchemeFee(val: string): PayoutItemAmountBreakdowns { + this.schemeFee = val; + return this; + } + + /** + * Get InterchangeFee + * Amount relating to interchange fee + * @return {string} + */ + public getInterchangeFee(): string { + return this.interchangeFee; + } + + /** + * Set InterchangeFee + * Amount relating to interchange fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + public setInterchangeFee(val: string): PayoutItemAmountBreakdowns { + this.interchangeFee = val; + return this; + } + + /** + * Get GatewayFee + * Amount relating to gateway fee + * @return {string} + */ + public getGatewayFee(): string { + return this.gatewayFee; + } + + /** + * Set GatewayFee + * Amount relating to gateway fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + public setGatewayFee(val: string): PayoutItemAmountBreakdowns { + this.gatewayFee = val; + return this; + } + + /** + * Get MarkupFee + * Amount relating to markup fee + * @return {string} + */ + public getMarkupFee(): string { + return this.markupFee; + } + + /** + * Set MarkupFee + * Amount relating to markup fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + public setMarkupFee(val: string): PayoutItemAmountBreakdowns { + this.markupFee = val; + return this; + } + + /** + * Get AcquirerFee + * Amount relating to acquirer fee + * @return {string} + */ + public getAcquirerFee(): string { + return this.acquirerFee; + } + + /** + * Set AcquirerFee + * Amount relating to acquirer fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + public setAcquirerFee(val: string): PayoutItemAmountBreakdowns { + this.acquirerFee = val; + return this; + } + + /** + * Get OtherFee + * Amount relating to other fee + * @return {string} + */ + public getOtherFee(): string { + return this.otherFee; + } + + /** + * Set OtherFee + * Amount relating to other fee + * @param {string} val + * @return {PayoutItemAmountBreakdowns} + */ + public setOtherFee(val: string): PayoutItemAmountBreakdowns { + this.otherFee = val; + return this; + } + + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {PayoutItemAmountBreakdowns} + */ + public fillWithData(data: any): PayoutItemAmountBreakdowns { + if (data["scheme_fee"]) + this.setSchemeFee(data["scheme_fee"]); + if (data["interchange_fee"]) + this.setInterchangeFee(data["interchange_fee"]); + if (data["gateway_fee"]) + this.setGatewayFee(data["gateway_fee"]); + if (data["markup_fee"]) + this.setMarkupFee(data["markup_fee"]); + if (data["acquirer_fee"]) + this.setAcquirerFee(data["acquirer_fee"]); + if (data["other_fee"]) + this.setOtherFee(data["other_fee"]); + return this; + } + + /** + * Implements a JSON custom marshaller + * @return {any} + */ + public toJSON(): any { + return { + "scheme_fee": this.getSchemeFee(), + "interchange_fee": this.getInterchangeFee(), + "gateway_fee": this.getGatewayFee(), + "markup_fee": this.getMarkupFee(), + "acquirer_fee": this.getAcquirerFee(), + "other_fee": this.getOtherFee(), + }; + } + + +} +export = PayoutItemAmountBreakdowns; diff --git a/src/phone.ts b/src/phone.ts new file mode 100755 index 0000000..5eb35ad --- /dev/null +++ b/src/phone.ts @@ -0,0 +1,112 @@ +// The content of this file was automatically generated + +import fetch = require('node-fetch'); + +import ProcessOut = require('./processout'); +import Response = require('./networking/response'); +import Request = require('./networking/request'); + +import ProcessOutNetworkError = require('./errors/processoutnetworkerror'); + +import * as p from '.'; + +class Phone { + private client: ProcessOut = null; + + /** + * Phone number (without dialing code) + * @type {string} + */ + private number: string = null; + + /** + * Phone number dialing code + * @type {string} + */ + private dialingCode: string = null; + + /** + * Phone constructor + * @param {ProcessOut} client + * @param {array} prefill (optional) + */ + constructor(client: ProcessOut, prefill: Phone) { + if (typeof client === 'undefined') + throw new Error("The Phone object must be instanciated with the ProcessOut client. You can create one using new ProcessOut('project-id', 'project-secret').newPhone()"); + + this.client = client; + if (typeof prefill !== 'undefined') + this.fillWithData(prefill); + } + + public getProcessOutObjectClass(): string { + return "Phone"; + } + + /** + * Get Number + * Phone number (without dialing code) + * @return {string} + */ + public getNumber(): string { + return this.number; + } + + /** + * Set Number + * Phone number (without dialing code) + * @param {string} val + * @return {Phone} + */ + public setNumber(val: string): Phone { + this.number = val; + return this; + } + + /** + * Get DialingCode + * Phone number dialing code + * @return {string} + */ + public getDialingCode(): string { + return this.dialingCode; + } + + /** + * Set DialingCode + * Phone number dialing code + * @param {string} val + * @return {Phone} + */ + public setDialingCode(val: string): Phone { + this.dialingCode = val; + return this; + } + + /** + * Fills the current object with the new values pulled from the data + * @param {array} data + * @return {Phone} + */ + public fillWithData(data: any): Phone { + if (data["number"]) + this.setNumber(data["number"]); + if (data["dialing_code"]) + this.setDialingCode(data["dialing_code"]); + return this; + } + + /** + * Implements a JSON custom marshaller + * @return {any} + */ + public toJSON(): any { + return { + "number": this.getNumber(), + "dialing_code": this.getDialingCode(), + }; + } + + +} +export = Phone; diff --git a/src/processout.ts b/src/processout.ts index b0f1b36..f0be670 100644 --- a/src/processout.ts +++ b/src/processout.ts @@ -158,6 +158,15 @@ class ProcessOut { return new p.CardInformation(this, prefill); } + /** + * Create a new Phone instance + * @param {array} prefill + * @return {Phone} + */ + public newPhone(prefill?: p.Phone): p.Phone { + return new p.Phone(this, prefill); + } + /** * Create a new Coupon instance * @param {array} prefill @@ -374,6 +383,15 @@ class ProcessOut { return new p.PayoutItem(this, prefill); } + /** + * Create a new PayoutItemAmountBreakdowns instance + * @param {array} prefill + * @return {PayoutItemAmountBreakdowns} + */ + public newPayoutItemAmountBreakdowns(prefill?: p.PayoutItemAmountBreakdowns): p.PayoutItemAmountBreakdowns { + return new p.PayoutItemAmountBreakdowns(this, prefill); + } + /** * Create a new Plan instance * @param {array} prefill @@ -527,6 +545,51 @@ class ProcessOut { return new p.WebhookEndpoint(this, prefill); } + /** + * Create a new CardCreateRequest instance + * @param {array} prefill + * @return {CardCreateRequest} + */ + public newCardCreateRequest(prefill?: p.CardCreateRequest): p.CardCreateRequest { + return new p.CardCreateRequest(this, prefill); + } + + /** + * Create a new Device instance + * @param {array} prefill + * @return {Device} + */ + public newDevice(prefill?: p.Device): p.Device { + return new p.Device(this, prefill); + } + + /** + * Create a new CardContact instance + * @param {array} prefill + * @return {CardContact} + */ + public newCardContact(prefill?: p.CardContact): p.CardContact { + return new p.CardContact(this, prefill); + } + + /** + * Create a new CardShipping instance + * @param {array} prefill + * @return {CardShipping} + */ + public newCardShipping(prefill?: p.CardShipping): p.CardShipping { + return new p.CardShipping(this, prefill); + } + + /** + * Create a new CardUpdateRequest instance + * @param {array} prefill + * @return {CardUpdateRequest} + */ + public newCardUpdateRequest(prefill?: p.CardUpdateRequest): p.CardUpdateRequest { + return new p.CardUpdateRequest(this, prefill); + } + /** * Create a new ErrorCodes instance * @param {array} prefill