diff --git a/src/backend/Graph/coupon.d.ts b/src/backend/Graph/coupon.d.ts index 7b5a64f..6f0f6e1 100644 --- a/src/backend/Graph/coupon.d.ts +++ b/src/backend/Graph/coupon.d.ts @@ -51,6 +51,12 @@ export interface Coupon extends Graph { exclude_line_item_discounts: boolean; /** Set to true to apply taxes before this coupon's discount is applied. Check with your tax professional if you have questions about how you should calculate taxes. */ is_taxable: boolean; + /** Set to true to enable auto-apply functionality. */ + customer_auto_apply: boolean; + /** Auto-apply coupons only. This coupon will be automatically applied when a customer record matches this query. Example: `attributes:name[auto_apply_coupons]=1`. */ + customer_attribute_restrictions: string; + /** Auto-apply coupons only. This coupon will be automatically applied when a subscription includes a product with one of the codes in the list. Wildcards are allowed just like in product code restrictions. Example: `code_1,code_2,sku_*,abc`. */ + customer_subscription_restrictions: string; /** The date this resource was created. */ date_created: string | null; /** The date this resource was last modified. */ diff --git a/src/backend/Graph/hosted_payment_gateways_helper.d.ts b/src/backend/Graph/hosted_payment_gateways_helper.d.ts index 6dc0504..070da1b 100644 --- a/src/backend/Graph/hosted_payment_gateways_helper.d.ts +++ b/src/backend/Graph/hosted_payment_gateways_helper.d.ts @@ -35,6 +35,8 @@ export interface HostedPaymentGatewaysHelper extends Graph { test_third_party_key: string; /** The description of the third party key field for this hosted gateway. */ third_party_key_description: string; + /** Marks hosted payment gateways that are no longer supported. */ + is_deprecated: boolean; /** If this hosted gateway requires additional information, this will contain details about the data which needs to be collected to configure this hosted gateway. */ additional_fields: null | { blocks: { diff --git a/src/backend/Graph/payment_gateways_helper.d.ts b/src/backend/Graph/payment_gateways_helper.d.ts index df8e179..4075402 100644 --- a/src/backend/Graph/payment_gateways_helper.d.ts +++ b/src/backend/Graph/payment_gateways_helper.d.ts @@ -35,6 +35,8 @@ export interface PaymentGatewaysHelper extends Graph { test_third_party_key: string; /** The description of the third party key field for this gateway. */ third_party_key_description: string; + /** Marks payment gateways that are no longer supported. */ + is_deprecated: boolean; /** If this gateway requires additional information, this will contain details about the data which needs to be collected to configure this gateway. */ additional_fields: null | { blocks: { diff --git a/src/backend/Graph/store.d.ts b/src/backend/Graph/store.d.ts index 6327ab4..9d6d265 100644 --- a/src/backend/Graph/store.d.ts +++ b/src/backend/Graph/store.d.ts @@ -26,6 +26,7 @@ import type { TemplateSets } from './template_sets'; import type { Transactions } from './transactions'; import type { UserAccesses } from './user_accesses'; import type { Users } from './users'; +import type { StoreShippingMethods } from './store_shipping_methods'; export interface Store extends Graph { curie: 'fx:store'; @@ -81,6 +82,8 @@ export interface Store extends Graph { 'fx:subscription_settings': SubscriptionSettings; /** List of cart include templates available in this store. */ 'fx:cart_include_templates': CartIncludeTemplates; + /** List of shipping methods supported by this store. */ + 'fx:store_shipping_methods': StoreShippingMethods; /** List of hosted payment gateways enabled for this store. */ 'fx:hosted_payment_gateways': HostedPaymentGateways; /** Configuration of this store's customer portal. */ diff --git a/src/backend/Graph/store_shipping_methods.d.ts b/src/backend/Graph/store_shipping_methods.d.ts new file mode 100644 index 0000000..61f9a7f --- /dev/null +++ b/src/backend/Graph/store_shipping_methods.d.ts @@ -0,0 +1,10 @@ +import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults'; +import type { StoreShippingMethod } from './store_shipping_method'; +import type { Graph } from '../../core'; + +export interface StoreShippingMethods extends Graph { + curie: 'fx:store_shipping_methods'; + links: CollectionGraphLinks; + props: CollectionGraphProps; + child: StoreShippingMethod; +} diff --git a/src/backend/Graph/transaction.d.ts b/src/backend/Graph/transaction.d.ts index 40f0f6a..dac69d2 100644 --- a/src/backend/Graph/transaction.d.ts +++ b/src/backend/Graph/transaction.d.ts @@ -17,6 +17,12 @@ import type { Shipments } from './shipments'; import type { Store } from './store'; import type { TransactionLogs } from './transaction_logs'; import type { Void } from './void'; +import type { GiftCardCodeLog } from './gift_card_code_log'; +import type { TransactionLog } from './transaction_log'; +import type { TransactionJournalEntry } from './transaction_journal_entry'; +import type { TransactionJournalEntries } from './transaction_journal_entries'; +import type { GiftCardCodeLogs } from './gift_card_code_logs'; +import type { Subscription } from './subscription'; export interface Transaction extends Graph { curie: 'fx:transaction'; @@ -48,6 +54,8 @@ export interface Transaction extends Graph { 'fx:attributes': Attributes; /** POST here to resend emails for this transaction. */ 'fx:send_emails': SendEmails; + /** If this transaction has a subscription, it will be linked here. */ + 'fx:subscription': Subscription; /** List of taxes applied to this transaction. */ 'fx:applied_taxes': AppliedTaxes; /** List of custom fields on this transaction. */ @@ -60,6 +68,10 @@ export interface Transaction extends Graph { 'fx:billing_addresses': BillingAddresses; /** POST here to resend transaction to the webhooks. */ 'fx:native_integrations': NativeIntegrations; + /** List of all gift card codes applied to this transaction. */ + 'fx:applied_gift_card_codes': GiftCardCodeLogs; + /** Journal entries for this transaction. */ + 'fx:transaction_journal_entries': TransactionJournalEntries; }; props: { @@ -98,13 +110,42 @@ export interface Transaction extends Graph { /** Total amount of this transaction including all items, taxes, shipping costs and discounts. */ total_order: number; /** Used for transactions processed with a hosted payment gateway which can change the status of the transaction after it is originally posted. If the status is empty, a normal payment gateway was used and the transaction should be considered completed. */ - status: 'approved' | 'authorized' | 'declined' | 'pending' | 'rejected'; + status: + | '' + | 'capturing' + | 'captured' + | 'approved' + | 'authorized' + | 'pending' + | 'completed' + | 'problem' + | 'pending_fraud_review' + | 'rejected' + | 'declined' + | 'refunding' + | 'refunded' + | 'voided' + | 'verified'; /** The type of transaction that has occurred. */ - type: 'updateinfo' | 'subscription_modification' | 'subscription_renewal' | 'subscription_cancellation'; + type: '' | 'updateinfo' | 'subscription_modification' | 'subscription_renewal' | 'subscription_cancellation'; /** The 3 character ISO code for the currency. */ currency_code: string; /** The currency symbol, such as $, £, €, etc. */ currency_symbol: string; + /** The UA string of a browser that customer used on checkout. May contain a special UA for subscription processing. */ + user_agent: string; + /** If custom transaction IDs, prefixes, or suffixes have been configured, this value will contain the custom ID (which may be a string). Otherwise it will be identical to the id value (an integer). */ + display_id: string | number; + /** The source of transaction that has occurred. CIT/MIT. */ + source: + | 'cit_ecommerce' + | 'mit_uoe' + | 'mit_api' + | 'mit_recurring' + | 'mit_recurring_reattempt_automated' + | 'mit_recurring_reattempt_manual' + | 'cit_recurring_cancellation' + | 'mit_recurring_cancellation'; /** The date this resource was created. */ date_created: string | null; /** The date this resource was last modified. */ @@ -112,7 +153,10 @@ export interface Transaction extends Graph { }; zooms: { + transaction_journal_entries?: TransactionJournalEntry; + applied_gift_card_codes?: GiftCardCodeLog; billing_addresses?: BillingAddresses; + transaction_logs?: TransactionLog; applied_taxes?: AppliedTaxes; custom_fields?: CustomFields; attributes: Attributes; diff --git a/src/backend/Graph/transaction_journal_entries.ts b/src/backend/Graph/transaction_journal_entries.ts new file mode 100644 index 0000000..ff36194 --- /dev/null +++ b/src/backend/Graph/transaction_journal_entries.ts @@ -0,0 +1,10 @@ +import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults'; +import type { TransactionJournalEntry } from './transaction_journal_entry'; +import type { Graph } from '../../core'; + +export interface TransactionJournalEntries extends Graph { + curie: 'fx:transaction_journal_entries'; + links: CollectionGraphLinks; + props: CollectionGraphProps; + child: TransactionJournalEntry; +} diff --git a/src/backend/Graph/transaction_journal_entry.ts b/src/backend/Graph/transaction_journal_entry.ts new file mode 100644 index 0000000..a2bb82e --- /dev/null +++ b/src/backend/Graph/transaction_journal_entry.ts @@ -0,0 +1,32 @@ +import type { TransactionLog } from './transaction_log'; +import type { Transaction } from './transaction'; +import type { Graph } from '../../core'; +import type { Store } from './store'; + +export interface TransactionJournalEntry extends Graph { + curie: 'fx:transaction_journal_entry'; + + links: { + /** This resource. */ + 'self': TransactionJournalEntry; + /** Relared store resource. */ + 'fx:store': Store; + /** Related transaction resource. */ + 'fx:transaction': Transaction; + /** Related transaction log. */ + 'fx:transaction_log': TransactionLog; + }; + + props: { + /** The value of money that should be transferred to or from the merchant's bank account (or comparable). Note that voids or refunds will result in a negative number. */ + amount: number; + /** If custom transaction IDs, prefixes, or suffixes have been configured, this value will contain the custom ID (which may be a string). Otherwise it will be identical to the id value (an integer). */ + display_id: string | number; + /** The date this resource was created. */ + date_created: string | null; + }; + + zooms: { + transaction_logs?: TransactionLog; + }; +} diff --git a/src/backend/Rels.d.ts b/src/backend/Rels.d.ts index 45b5b79..95e74d3 100644 --- a/src/backend/Rels.d.ts +++ b/src/backend/Rels.d.ts @@ -129,6 +129,7 @@ export * from './Graph/shipping_service'; export * from './Graph/shipping_services'; export * from './Graph/store'; export * from './Graph/store_shipping_method'; +export * from './Graph/store_shipping_methods'; export * from './Graph/store_shipping_service'; export * from './Graph/store_shipping_services'; export * from './Graph/store_version'; @@ -146,6 +147,8 @@ export * from './Graph/template_config'; export * from './Graph/template_set'; export * from './Graph/template_sets'; export * from './Graph/timezones'; +export * from './Graph/transaction_journal_entries'; +export * from './Graph/transaction_journal_entry'; export * from './Graph/transaction'; export * from './Graph/transaction_log'; export * from './Graph/transaction_log_detail'; diff --git a/src/customer/Graph/transaction.d.ts b/src/customer/Graph/transaction.d.ts index fa34d45..aab6824 100644 --- a/src/customer/Graph/transaction.d.ts +++ b/src/customer/Graph/transaction.d.ts @@ -10,6 +10,8 @@ export interface Transaction extends Graph { links: { /** This resource. */ 'self': Transaction; + /** List of items in this transaction. */ + 'fx:items': Items; /** Open this link in a browser to see a receipt for this transaction. */ 'fx:receipt': Receipt; /** Related customer resource. */ @@ -18,15 +20,13 @@ export interface Transaction extends Graph { 'fx:attributes': Attributes; /** List of custom fields on this transaction. */ 'fx:custom_fields': CustomFields; - /** List of items for this transaction. */ - 'fx:items': Items; }; props: { /** The order number. */ id: number; - /** The order number for display (usually same as id). */ - display_id: number; + /** If custom transaction IDs, prefixes, or suffixes have been configured, this value will contain the custom ID (which may be a string). Otherwise it will be identical to the id value (an integer). */ + display_id: string | number; /** True if this transaction was a test transaction and not run against a live payment gateway. */ is_test: boolean; /** Set this to true to hide it in the FoxyCart admin. */ @@ -60,9 +60,24 @@ export interface Transaction extends Graph { /** Total amount of this transaction including all items, taxes, shipping costs and discounts. */ total_order: number; /** Used for transactions processed with a hosted payment gateway which can change the status of the transaction after it is originally posted. If the status is empty, a normal payment gateway was used and the transaction should be considered completed. */ - status: 'approved' | 'authorized' | 'declined' | 'pending' | 'rejected'; + status: + | '' + | 'capturing' + | 'captured' + | 'approved' + | 'authorized' + | 'pending' + | 'completed' + | 'problem' + | 'pending_fraud_review' + | 'rejected' + | 'declined' + | 'refunding' + | 'refunded' + | 'voided' + | 'verified'; /** The type of transaction that has occurred. */ - type: 'updateinfo' | 'subscription_modification' | 'subscription_renewal' | 'subscription_cancellation'; + type: '' | 'updateinfo' | 'subscription_modification' | 'subscription_renewal' | 'subscription_cancellation'; /** The 3 character ISO code for the currency. */ currency_code: string; /** The currency symbol, such as $, £, €, etc. */