Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 86 additions & 6 deletions lib/recurly.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@ export declare class PaymentMethod {
*/
cardType?: string | null;
/**
* Credit card number's first six digits.
* Credit card number's first six digits. For a tokenized wallet payment (`apple_pay`, `google_pay`, or `google_pay_device_pan`), this is the DPAN's (the wallet/device token's own number) first six digits, not the underlying card's (FPAN).
*/
firstSix?: string | null;
/**
* Credit card number's last four digits. Will refer to bank account if payment method is ACH.
* Credit card number's last four digits. Will refer to bank account if payment method is ACH. For a tokenized wallet payment (`apple_pay`, `google_pay`, or `google_pay_device_pan`), this is the DPAN's last four digits, not the underlying card's (FPAN).
*/
lastFour?: string | null;
/**
Expand Down Expand Up @@ -799,6 +799,10 @@ export declare class Transaction {
*/
collectionMethod?: string | null;
paymentMethod?: PaymentMethod | null;
/**
* Array of Payment Gateway References captured at transaction time, each a reference to a third-party gateway object of varying types.
*/
paymentGatewayReferences?: PaymentGatewayReferences[] | null;
/**
* IP address provided when the billing information was collected: - When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address. - When the merchant enters billing information using the API, the merchant may provide an IP address. - When the merchant enters billing information using the UI, no IP address is recorded.
*/
Expand Down Expand Up @@ -1138,9 +1142,17 @@ export declare class Coupon {
*/
invoiceDescription?: string | null;
/**
* The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.
* The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. Null for bulk coupons configured with a relative redeem-by interval (see redeem_by_interval_unit and redeem_by_interval_amount).
*/
redeemBy?: Date | null;
/**
* For a bulk coupon with a relative redeem-by, the unit of the interval after which each generated unique code expires. Null unless the coupon uses a relative redeem-by.
*/
redeemByIntervalUnit?: string | null;
/**
* For a bulk coupon with a relative redeem-by, the number of redeem_by_interval_unit intervals after a code's generation that it remains redeemable. Null unless the coupon uses a relative redeem-by.
*/
redeemByIntervalAmount?: number | null;
/**
* Created at
*/
Expand Down Expand Up @@ -2927,6 +2939,10 @@ export declare class UniqueCouponCode {
* The date and time the coupon was expired early or reached its `max_redemptions`.
*/
expiredAt?: Date | null;
/**
* Absolute expiry computed and stored at code-generation time. Set only for Window (relative redeem-by) coupons. Null for Anytime coupons and Specific Date coupons — those resolve expiry from the parent coupon's redeem_by at redemption time, not at code-generation time.
*/
redeemByDate?: Date | null;

}

Expand Down Expand Up @@ -4849,6 +4865,10 @@ export interface InvoiceCreate {
* Used by Vertex for tax calculations. Possible values are sale, rental, lease.
*/
vertexTransactionType?: string | null;
/**
* Optionally overrides the suffix component of the composed transaction descriptor. If omitted, the suffix is derived from the subscription's plan name or the invoice description, with a Trial prefix on Visa trial conversions. Subject to gateway availability and payment method support.
*/
transactionDescriptorSuffix?: string | null;

}

Expand Down Expand Up @@ -5040,9 +5060,17 @@ export interface CouponCreate {
*/
invoiceDescription?: string | null;
/**
* The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.
* The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. Mutually exclusive with redeem_by_interval_unit/redeem_by_interval_amount.
*/
redeemByDate?: string | null;
/**
* Unit of the relative redemption window. Must be paired with redeem_by_interval_amount. Mutually exclusive with redeem_by_date. Bulk coupons only.
*/
redeemByIntervalUnit?: string | null;
/**
* Quantity of redeem_by_interval_unit. Must be paired with redeem_by_interval_unit.
*/
redeemByIntervalAmount?: number | null;
/**
* The code the customer enters to redeem the coupon.
*/
Expand Down Expand Up @@ -5148,9 +5176,17 @@ export interface CouponUpdate {
*/
invoiceDescription?: string | null;
/**
* The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.
* The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. Mutually exclusive with redeem_by_interval_unit/redeem_by_interval_amount.
*/
redeemByDate?: string | null;
/**
* Unit of the relative redemption window. Must be paired with redeem_by_interval_amount. Mutually exclusive with redeem_by_date. Bulk coupons only.
*/
redeemByIntervalUnit?: string | null;
/**
* Quantity of redeem_by_interval_unit. Must be paired with redeem_by_interval_unit.
*/
redeemByIntervalAmount?: number | null;

}

Expand Down Expand Up @@ -5838,6 +5874,10 @@ export interface RecoveryInvoiceCreate {
* Line items to include on the invoice. Currency is specified at the root level and must not be included in individual line items.
*/
lineItems?: RecoveryLineItemCreate[] | null;
/**
* Optionally overrides the suffix component of the composed transaction descriptor. If omitted, the suffix is derived from the subscription's plan name or the invoice description, with a Trial prefix on Visa trial conversions. Subject to gateway availability and payment method support.
*/
transactionDescriptorSuffix?: string | null;

}

Expand Down Expand Up @@ -5932,17 +5972,49 @@ export interface RecoveryBillingInfoCreate {
* Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.
*/
paymentGatewayReferences?: PaymentGatewayReferences[] | null;
/**
* Merchant-supplied fallback payment method metadata. Recurly's own gateway-token lookup is authoritative and will override any of these fields it can determine itself; these fields are only used to fill gaps when that lookup is unavailable.
*/
paymentMethod?: RecoveryPaymentMethodCreate | null;
/**
* Network transaction ID from the previous customer-in-session subscription signup or billing info storage. - 10-15 alphanumeric characters for Mastercard - 14-15 alphanumeric for Visa - 15 digits for all other brands - 16 alphanumeric characters for Cartes Bancaires, which are processed as Visa or Mastercard
*/
networkTransactionId?: string | null;
/**
* Transactions from previous collection attempts for this payment method.
* Transactions from previous collection attempts for this payment method. Optional, unless this billing_info is the primary payment method and the account's dunning campaign skips Recurly's own retry attempts entirely -- in that case at least one entry is required.
*/
transactions?: RecoveryTransactionCreate[] | null;

}

export interface RecoveryPaymentMethodCreate {
/**
* The payment method type.
*/
object?: string | null;
/**
* The card brand (e.g. `Visa`, `MasterCard`). Present for `credit_card`, `apple_pay`, and `google_pay`/`google_pay_device_pan`; omitted for `paypal_billing_agreement`.
*/
cardType?: string | null;
/**
* For a plain card, the card's own first six digits (BIN). For a tokenized wallet payment (`apple_pay`, `google_pay`, or `google_pay_device_pan`), this is the DPAN's (the wallet/device token's own number) first six digits — **not** the underlying card's (FPAN). The FPAN is never accepted or represented; no separate wallet-specific field is provided.
*/
firstSix?: string | null;
/**
* The card's (or, for a tokenized wallet payment, the DPAN's) last four digits. See `first_six` for the DPAN-vs-FPAN distinction on wallets.
*/
lastFour?: string | null;
/**
* Expiration month.
*/
expMonth?: number | null;
/**
* Expiration year.
*/
expYear?: number | null;

}

export interface RecoveryTransactionCreate {
/**
* The error code returned by the payment gateway for the original payment collection attempt.
Expand Down Expand Up @@ -6841,6 +6913,10 @@ export interface SubscriptionCreate {
* Allows you to control how any resulting charges will be calculated and prorated.
*/
prorationSettings?: SubscriptionCreateProrationSettings | null;
/**
* Optionally overrides the suffix component of the composed transaction descriptor. If omitted, the suffix is derived from the subscription's plan name or the invoice description, with a Trial prefix on Visa trial conversions. Subject to gateway availability and payment method support.
*/
transactionDescriptorSuffix?: string | null;

}

Expand Down Expand Up @@ -7034,6 +7110,10 @@ export interface SubscriptionUpdate {
* The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
*/
billingInfoId?: string | null;
/**
* Optionally overrides the suffix component of the composed transaction descriptor. If omitted, the suffix is derived from the subscription's plan name or the invoice description, with a Trial prefix on Visa trial conversions. Subject to gateway availability and payment method support.
*/
transactionDescriptorSuffix?: string | null;

}

Expand Down
6 changes: 5 additions & 1 deletion lib/recurly/resources/Coupon.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ const Resource = require('../Resource')
* @prop {string} name - The internal name for the coupon.
* @prop {string} object - Object type
* @prop {Array.<PlanMini>} plans - A list of plans for which this coupon applies. This will be `null` if `applies_to_all_plans=true`.
* @prop {Date} redeemBy - The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.
* @prop {Date} redeemBy - The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. Null for bulk coupons configured with a relative redeem-by interval (see redeem_by_interval_unit and redeem_by_interval_amount).
* @prop {number} redeemByIntervalAmount - For a bulk coupon with a relative redeem-by, the number of redeem_by_interval_unit intervals after a code's generation that it remains redeemable. Null unless the coupon uses a relative redeem-by.
* @prop {string} redeemByIntervalUnit - For a bulk coupon with a relative redeem-by, the unit of the interval after which each generated unique code expires. Null unless the coupon uses a relative redeem-by.
* @prop {string} redemptionResource - Whether the discount is for all eligible charges on the account, or only a specific subscription.
* @prop {string} state - Indicates if the coupon is redeemable, and if it is not, why.
* @prop {number} temporalAmount - If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. When `temporal_unit` is "billing_period", this is the number of complete billing cycles.
Expand Down Expand Up @@ -66,6 +68,8 @@ class Coupon extends Resource {
object: String,
plans: ['PlanMini'],
redeemBy: Date,
redeemByIntervalAmount: Number,
redeemByIntervalUnit: String,
redemptionResource: String,
state: String,
temporalAmount: Number,
Expand Down
4 changes: 2 additions & 2 deletions lib/recurly/resources/PaymentMethod.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ const Resource = require('../Resource')
* @prop {string} ccBinCountry - The 2-letter ISO 3166-1 alpha-2 country code associated with the card's issuer, if known.
* @prop {number} expMonth - Expiration month.
* @prop {number} expYear - Expiration year.
* @prop {string} firstSix - Credit card number's first six digits.
* @prop {string} firstSix - Credit card number's first six digits. For a tokenized wallet payment (`apple_pay`, `google_pay`, or `google_pay_device_pan`), this is the DPAN's (the wallet/device token's own number) first six digits, not the underlying card's (FPAN).
* @prop {string} fundingSource - The funding source of the card, if known.
* @prop {GatewayAttributes} gatewayAttributes - Gateway specific attributes associated with this PaymentMethod
* @prop {string} gatewayCode - An identifier for a specific payment gateway.
* @prop {string} gatewayToken - A token used in place of a credit card in order to perform transactions.
* @prop {string} lastFour - Credit card number's last four digits. Will refer to bank account if payment method is ACH.
* @prop {string} lastFour - Credit card number's last four digits. Will refer to bank account if payment method is ACH. For a tokenized wallet payment (`apple_pay`, `google_pay`, or `google_pay_device_pan`), this is the DPAN's last four digits, not the underlying card's (FPAN).
* @prop {string} lastTwo - The IBAN bank account's last two digits.
* @prop {string} nameOnAccount - The name associated with the bank account.
* @prop {string} object
Expand Down
2 changes: 2 additions & 0 deletions lib/recurly/resources/Transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const Resource = require('../Resource')
* @prop {string} origin - Describes how the transaction was triggered.
* @prop {string} originalTransactionId - If this transaction is a refund (`type=refund`), this will be the ID of the original transaction on the invoice being refunded.
* @prop {TransactionPaymentGateway} paymentGateway
* @prop {Array.<PaymentGatewayReferences>} paymentGatewayReferences - Array of Payment Gateway References captured at transaction time, each a reference to a third-party gateway object of varying types.
* @prop {PaymentMethod} paymentMethod
* @prop {boolean} refunded - Indicates if part or all of this transaction was refunded.
* @prop {string} status - The current transaction status. Note that the status may change, e.g. a `pending` transaction may become `declined` or `success` may later become `void`.
Expand Down Expand Up @@ -93,6 +94,7 @@ class Transaction extends Resource {
origin: String,
originalTransactionId: String,
paymentGateway: 'TransactionPaymentGateway',
paymentGatewayReferences: ['PaymentGatewayReferences'],
paymentMethod: 'PaymentMethod',
refunded: Boolean,
status: String,
Expand Down
2 changes: 2 additions & 0 deletions lib/recurly/resources/UniqueCouponCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const Resource = require('../Resource')
* @prop {Date} expiredAt - The date and time the coupon was expired early or reached its `max_redemptions`.
* @prop {string} id - Unique Coupon Code ID
* @prop {string} object - Object type
* @prop {Date} redeemByDate - Absolute expiry computed and stored at code-generation time. Set only for Window (relative redeem-by) coupons. Null for Anytime coupons and Specific Date coupons — those resolve expiry from the parent coupon's redeem_by at redemption time, not at code-generation time.
* @prop {Date} redeemedAt - The date and time the unique coupon code was redeemed.
* @prop {string} state - Indicates if the unique coupon code is redeemable or why not.
* @prop {Date} updatedAt - Updated at
Expand All @@ -33,6 +34,7 @@ class UniqueCouponCode extends Resource {
expiredAt: Date,
id: String,
object: String,
redeemByDate: Date,
redeemedAt: Date,
state: String,
updatedAt: Date
Expand Down
Loading
Loading