From eb2208cd5de0f0463da3e84f54f6325141096a9e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 18 Nov 2024 10:29:46 +0000
Subject: [PATCH 1/4] chore(tests): limit array example length (#290)
---
accountcollectionflow_test.go | 4 +-
bulkrequest_test.go | 506 +--------------------------
connectionlegalentity_test.go | 202 +----------
counterparty_test.go | 364 +------------------
expectedpayment_test.go | 110 ------
externalaccount_test.go | 22 +-
internalaccountbalancereport_test.go | 10 -
invoice_test.go | 92 +----
ledger_test.go | 2 +-
ledgeraccount_test.go | 6 +-
ledgeraccountbalancemonitor_test.go | 2 +-
ledgeraccountcategory_test.go | 4 +-
ledgeraccountsettlement_test.go | 2 +-
ledgerentry_test.go | 2 +-
ledgereventhandler_test.go | 8 -
ledgertransaction_test.go | 82 +----
legalentity_test.go | 208 +----------
legalentityassociation_test.go | 34 +-
paymentorder_test.go | 210 +----------
paymentorderreversal_test.go | 40 ---
virtualaccount_test.go | 16 +-
21 files changed, 43 insertions(+), 1883 deletions(-)
diff --git a/accountcollectionflow_test.go b/accountcollectionflow_test.go
index 5eb3c1d..28a1d28 100644
--- a/accountcollectionflow_test.go
+++ b/accountcollectionflow_test.go
@@ -28,8 +28,8 @@ func TestAccountCollectionFlowNewWithOptionalParams(t *testing.T) {
)
_, err := client.AccountCollectionFlows.New(context.TODO(), moderntreasury.AccountCollectionFlowNewParams{
CounterpartyID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- PaymentTypes: moderntreasury.F([]string{"string", "string", "string"}),
- ReceivingCountries: moderntreasury.F([]moderntreasury.AccountCollectionFlowNewParamsReceivingCountry{moderntreasury.AccountCollectionFlowNewParamsReceivingCountryUsa, moderntreasury.AccountCollectionFlowNewParamsReceivingCountryAus, moderntreasury.AccountCollectionFlowNewParamsReceivingCountryBel}),
+ PaymentTypes: moderntreasury.F([]string{"string"}),
+ ReceivingCountries: moderntreasury.F([]moderntreasury.AccountCollectionFlowNewParamsReceivingCountry{moderntreasury.AccountCollectionFlowNewParamsReceivingCountryUsa}),
})
if err != nil {
var apierr *moderntreasury.Error
diff --git a/bulkrequest_test.go b/bulkrequest_test.go
index 060991d..e1cadc5 100644
--- a/bulkrequest_test.go
+++ b/bulkrequest_test.go
@@ -72,259 +72,6 @@ func TestBulkRequestNewWithOptionalParams(t *testing.T) {
"foo": int64(0),
}),
ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }}),
- Description: moderntreasury.F("description"),
- EffectiveAt: moderntreasury.F(time.Now()),
- EffectiveDate: moderntreasury.F(time.Now()),
- ExternalID: moderntreasury.F("external_id"),
- LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- LedgerableType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestLedgerTransactionLedgerableTypeExpectedPayment),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- Status: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestLedgerTransactionStatusArchived),
- }),
- LedgerTransactionID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- LineItems: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestLineItem{{
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }}),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- NsfProtected: moderntreasury.F(true),
- OriginatingPartyName: moderntreasury.F("originating_party_name"),
- Priority: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestPriorityHigh),
- ProcessAfter: moderntreasury.F(time.Now()),
- Purpose: moderntreasury.F("purpose"),
- ReceivingAccount: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccount{
- AccountDetails: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetail{{
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }}),
- AccountType: moderntreasury.F(moderntreasury.ExternalAccountTypeCash),
- ContactDetails: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetail{{
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }}),
- LedgerAccount: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountLedgerAccount{
- Currency: moderntreasury.F("currency"),
- LedgerID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- Name: moderntreasury.F("name"),
- NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
- CurrencyExponent: moderntreasury.F(int64(0)),
- Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
- LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- LedgerableType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountLedgerAccountLedgerableTypeCounterparty),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- Name: moderntreasury.F("name"),
- PartyAddress: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountPartyAddress{
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Line2: moderntreasury.F("line2"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- }),
- PartyIdentifier: moderntreasury.F("party_identifier"),
- PartyName: moderntreasury.F("party_name"),
- PartyType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountPartyTypeBusiness),
- PlaidProcessorToken: moderntreasury.F("plaid_processor_token"),
- RoutingDetails: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetail{{
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsPaymentTypeACH),
- }}),
- }),
- ReceivingAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- RemittanceInformation: moderntreasury.F("remittance_information"),
- SendRemittanceAdvice: moderntreasury.F(true),
- StatementDescriptor: moderntreasury.F("statement_descriptor"),
- Subtype: moderntreasury.F(moderntreasury.PaymentOrderSubtypeBacsNewInstruction),
- TransactionMonitoringEnabled: moderntreasury.F(true),
- UltimateOriginatingPartyIdentifier: moderntreasury.F("ultimate_originating_party_identifier"),
- UltimateOriginatingPartyName: moderntreasury.F("ultimate_originating_party_name"),
- UltimateReceivingPartyIdentifier: moderntreasury.F("ultimate_receiving_party_identifier"),
- UltimateReceivingPartyName: moderntreasury.F("ultimate_receiving_party_name"),
- }, moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequest{
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestDirectionCredit),
- OriginatingAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- Type: moderntreasury.F(moderntreasury.PaymentOrderTypeACH),
- Accounting: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestAccounting{
- AccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- ClassID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- }),
- AccountingCategoryID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AccountingLedgerClassID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- ChargeBearer: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestChargeBearerShared),
- Currency: moderntreasury.F(shared.CurrencyAed),
- Description: moderntreasury.F("description"),
- EffectiveDate: moderntreasury.F(time.Now()),
- ExpiresAt: moderntreasury.F(time.Now()),
- FallbackType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestFallbackTypeACH),
- ForeignExchangeContract: moderntreasury.F("foreign_exchange_contract"),
- ForeignExchangeIndicator: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestForeignExchangeIndicatorFixedToVariable),
- LedgerTransaction: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestLedgerTransaction{
- LedgerEntries: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestLedgerTransactionLedgerEntry{{
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
}}),
Description: moderntreasury.F("description"),
EffectiveAt: moderntreasury.F(time.Now()),
@@ -349,24 +96,6 @@ func TestBulkRequestNewWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
}}),
Metadata: moderntreasury.F(map[string]string{
"key": "value",
@@ -382,23 +111,11 @@ func TestBulkRequestNewWithOptionalParams(t *testing.T) {
AccountDetails: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetail{{
AccountNumber: moderntreasury.F("account_number"),
AccountNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
}}),
AccountType: moderntreasury.F(moderntreasury.ExternalAccountTypeCash),
ContactDetails: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetail{{
ContactIdentifier: moderntreasury.F("contact_identifier"),
ContactIdentifierType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetailsContactIdentifierTypeEmail),
}}),
LedgerAccount: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountLedgerAccount{
Currency: moderntreasury.F("currency"),
@@ -407,7 +124,7 @@ func TestBulkRequestNewWithOptionalParams(t *testing.T) {
NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
CurrencyExponent: moderntreasury.F(int64(0)),
Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
+ LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
LedgerableType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountLedgerAccountLedgerableTypeCounterparty),
Metadata: moderntreasury.F(map[string]string{
@@ -438,227 +155,6 @@ func TestBulkRequestNewWithOptionalParams(t *testing.T) {
RoutingNumber: moderntreasury.F("routing_number"),
RoutingNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsRoutingNumberTypeAba),
PaymentType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsPaymentTypeACH),
- }}),
- }),
- ReceivingAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- RemittanceInformation: moderntreasury.F("remittance_information"),
- SendRemittanceAdvice: moderntreasury.F(true),
- StatementDescriptor: moderntreasury.F("statement_descriptor"),
- Subtype: moderntreasury.F(moderntreasury.PaymentOrderSubtypeBacsNewInstruction),
- TransactionMonitoringEnabled: moderntreasury.F(true),
- UltimateOriginatingPartyIdentifier: moderntreasury.F("ultimate_originating_party_identifier"),
- UltimateOriginatingPartyName: moderntreasury.F("ultimate_originating_party_name"),
- UltimateReceivingPartyIdentifier: moderntreasury.F("ultimate_receiving_party_identifier"),
- UltimateReceivingPartyName: moderntreasury.F("ultimate_receiving_party_name"),
- }, moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequest{
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestDirectionCredit),
- OriginatingAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- Type: moderntreasury.F(moderntreasury.PaymentOrderTypeACH),
- Accounting: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestAccounting{
- AccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- ClassID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- }),
- AccountingCategoryID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AccountingLedgerClassID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- ChargeBearer: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestChargeBearerShared),
- Currency: moderntreasury.F(shared.CurrencyAed),
- Description: moderntreasury.F("description"),
- EffectiveDate: moderntreasury.F(time.Now()),
- ExpiresAt: moderntreasury.F(time.Now()),
- FallbackType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestFallbackTypeACH),
- ForeignExchangeContract: moderntreasury.F("foreign_exchange_contract"),
- ForeignExchangeIndicator: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestForeignExchangeIndicatorFixedToVariable),
- LedgerTransaction: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestLedgerTransaction{
- LedgerEntries: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestLedgerTransactionLedgerEntry{{
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }}),
- Description: moderntreasury.F("description"),
- EffectiveAt: moderntreasury.F(time.Now()),
- EffectiveDate: moderntreasury.F(time.Now()),
- ExternalID: moderntreasury.F("external_id"),
- LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- LedgerableType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestLedgerTransactionLedgerableTypeExpectedPayment),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- Status: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestLedgerTransactionStatusArchived),
- }),
- LedgerTransactionID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- LineItems: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestLineItem{{
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }}),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- NsfProtected: moderntreasury.F(true),
- OriginatingPartyName: moderntreasury.F("originating_party_name"),
- Priority: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestPriorityHigh),
- ProcessAfter: moderntreasury.F(time.Now()),
- Purpose: moderntreasury.F("purpose"),
- ReceivingAccount: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccount{
- AccountDetails: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetail{{
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }}),
- AccountType: moderntreasury.F(moderntreasury.ExternalAccountTypeCash),
- ContactDetails: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetail{{
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }}),
- LedgerAccount: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountLedgerAccount{
- Currency: moderntreasury.F("currency"),
- LedgerID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- Name: moderntreasury.F("name"),
- NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
- CurrencyExponent: moderntreasury.F(int64(0)),
- Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
- LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- LedgerableType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountLedgerAccountLedgerableTypeCounterparty),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- Name: moderntreasury.F("name"),
- PartyAddress: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountPartyAddress{
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Line2: moderntreasury.F("line2"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- }),
- PartyIdentifier: moderntreasury.F("party_identifier"),
- PartyName: moderntreasury.F("party_name"),
- PartyType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountPartyTypeBusiness),
- PlaidProcessorToken: moderntreasury.F("plaid_processor_token"),
- RoutingDetails: moderntreasury.F([]moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetail{{
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.BulkRequestNewParamsResourcesPaymentOrderAsyncCreateRequestReceivingAccountRoutingDetailsPaymentTypeACH),
}}),
}),
ReceivingAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
diff --git a/connectionlegalentity_test.go b/connectionlegalentity_test.go
index 2432143..00479ae 100644
--- a/connectionlegalentity_test.go
+++ b/connectionlegalentity_test.go
@@ -36,183 +36,23 @@ func TestConnectionLegalEntityNewWithOptionalParams(t *testing.T) {
Locality: moderntreasury.F("locality"),
PostalCode: moderntreasury.F("postal_code"),
Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeOther}),
+ AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
BusinessName: moderntreasury.F("business_name"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
+ DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
Email: moderntreasury.F("email"),
FirstName: moderntreasury.F("first_name"),
Identifications: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityIdentification{{
IDNumber: moderntreasury.F("id_number"),
IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeArCuil),
IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
}}),
LastName: moderntreasury.F("last_name"),
LegalEntityAssociations: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociation{{
- RelationshipTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeBeneficialOwner, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeControlPerson}),
- ChildLegalEntity: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity{
- Addresses: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress{{
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }}),
- BusinessName: moderntreasury.F("business_name"),
- DateFormed: moderntreasury.F(time.Now()),
- DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
- Email: moderntreasury.F("email"),
- FirstName: moderntreasury.F("first_name"),
- Identifications: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentification{{
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }}),
- LastName: moderntreasury.F("last_name"),
- LegalEntityType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityTypeBusiness),
- LegalStructure: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureCorporation),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PhoneNumbers: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber{{
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }}),
- RiskRating: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
- }),
- ChildLegalEntityID: moderntreasury.F("child_legal_entity_id"),
- OwnershipPercentage: moderntreasury.F(int64(0)),
- Title: moderntreasury.F("title"),
- }, {
- RelationshipTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeBeneficialOwner, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeControlPerson}),
- ChildLegalEntity: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity{
- Addresses: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress{{
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }}),
- BusinessName: moderntreasury.F("business_name"),
- DateFormed: moderntreasury.F(time.Now()),
- DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
- Email: moderntreasury.F("email"),
- FirstName: moderntreasury.F("first_name"),
- Identifications: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentification{{
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }}),
- LastName: moderntreasury.F("last_name"),
- LegalEntityType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityTypeBusiness),
- LegalStructure: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureCorporation),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PhoneNumbers: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber{{
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }}),
- RiskRating: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
- }),
- ChildLegalEntityID: moderntreasury.F("child_legal_entity_id"),
- OwnershipPercentage: moderntreasury.F(int64(0)),
- Title: moderntreasury.F("title"),
- }, {
- RelationshipTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeBeneficialOwner, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeControlPerson}),
+ RelationshipTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeBeneficialOwner}),
ChildLegalEntity: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity{
Addresses: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress{{
Country: moderntreasury.F("country"),
@@ -220,43 +60,19 @@ func TestConnectionLegalEntityNewWithOptionalParams(t *testing.T) {
Locality: moderntreasury.F("locality"),
PostalCode: moderntreasury.F("postal_code"),
Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
+ AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
BusinessName: moderntreasury.F("business_name"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
+ DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
Email: moderntreasury.F("email"),
FirstName: moderntreasury.F("first_name"),
Identifications: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentification{{
IDNumber: moderntreasury.F("id_number"),
IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
}}),
LastName: moderntreasury.F("last_name"),
LegalEntityType: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityTypeBusiness),
@@ -268,10 +84,6 @@ func TestConnectionLegalEntityNewWithOptionalParams(t *testing.T) {
}),
PhoneNumbers: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
}}),
RiskRating: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow),
Website: moderntreasury.F("website"),
@@ -289,10 +101,6 @@ func TestConnectionLegalEntityNewWithOptionalParams(t *testing.T) {
}),
PhoneNumbers: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
}}),
RiskRating: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityRiskRatingLow),
Website: moderntreasury.F("website"),
diff --git a/counterparty_test.go b/counterparty_test.go
index a989a86..413ca00 100644
--- a/counterparty_test.go
+++ b/counterparty_test.go
@@ -37,161 +37,11 @@ func TestCounterpartyNewWithOptionalParams(t *testing.T) {
AccountDetails: moderntreasury.F([]moderntreasury.CounterpartyNewParamsAccountsAccountDetail{{
AccountNumber: moderntreasury.F("account_number"),
AccountNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsAccountDetailsAccountNumberTypeAuNumber),
- }}),
- AccountType: moderntreasury.F(moderntreasury.ExternalAccountTypeCash),
- ContactDetails: moderntreasury.F([]moderntreasury.CounterpartyNewParamsAccountsContactDetail{{
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsContactDetailsContactIdentifierTypeEmail),
- }}),
- LedgerAccount: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsLedgerAccount{
- Currency: moderntreasury.F("currency"),
- LedgerID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- Name: moderntreasury.F("name"),
- NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
- CurrencyExponent: moderntreasury.F(int64(0)),
- Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
- LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- LedgerableType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsLedgerAccountLedgerableTypeCounterparty),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- Name: moderntreasury.F("name"),
- PartyAddress: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsPartyAddress{
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Line2: moderntreasury.F("line2"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- }),
- PartyIdentifier: moderntreasury.F("party_identifier"),
- PartyName: moderntreasury.F("party_name"),
- PartyType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsPartyTypeBusiness),
- PlaidProcessorToken: moderntreasury.F("plaid_processor_token"),
- RoutingDetails: moderntreasury.F([]moderntreasury.CounterpartyNewParamsAccountsRoutingDetail{{
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsPaymentTypeACH),
- }}),
- }, {
- AccountDetails: moderntreasury.F([]moderntreasury.CounterpartyNewParamsAccountsAccountDetail{{
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsAccountDetailsAccountNumberTypeAuNumber),
- }}),
- AccountType: moderntreasury.F(moderntreasury.ExternalAccountTypeCash),
- ContactDetails: moderntreasury.F([]moderntreasury.CounterpartyNewParamsAccountsContactDetail{{
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsContactDetailsContactIdentifierTypeEmail),
- }}),
- LedgerAccount: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsLedgerAccount{
- Currency: moderntreasury.F("currency"),
- LedgerID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- Name: moderntreasury.F("name"),
- NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
- CurrencyExponent: moderntreasury.F(int64(0)),
- Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
- LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- LedgerableType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsLedgerAccountLedgerableTypeCounterparty),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- Name: moderntreasury.F("name"),
- PartyAddress: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsPartyAddress{
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Line2: moderntreasury.F("line2"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- }),
- PartyIdentifier: moderntreasury.F("party_identifier"),
- PartyName: moderntreasury.F("party_name"),
- PartyType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsPartyTypeBusiness),
- PlaidProcessorToken: moderntreasury.F("plaid_processor_token"),
- RoutingDetails: moderntreasury.F([]moderntreasury.CounterpartyNewParamsAccountsRoutingDetail{{
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsPaymentTypeACH),
- }}),
- }, {
- AccountDetails: moderntreasury.F([]moderntreasury.CounterpartyNewParamsAccountsAccountDetail{{
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsAccountDetailsAccountNumberTypeAuNumber),
}}),
AccountType: moderntreasury.F(moderntreasury.ExternalAccountTypeCash),
ContactDetails: moderntreasury.F([]moderntreasury.CounterpartyNewParamsAccountsContactDetail{{
ContactIdentifier: moderntreasury.F("contact_identifier"),
ContactIdentifierType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsContactDetailsContactIdentifierTypeEmail),
}}),
LedgerAccount: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsLedgerAccount{
Currency: moderntreasury.F("currency"),
@@ -200,7 +50,7 @@ func TestCounterpartyNewWithOptionalParams(t *testing.T) {
NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
CurrencyExponent: moderntreasury.F(int64(0)),
Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
+ LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
LedgerableType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsLedgerAccountLedgerableTypeCounterparty),
Metadata: moderntreasury.F(map[string]string{
@@ -231,14 +81,6 @@ func TestCounterpartyNewWithOptionalParams(t *testing.T) {
RoutingNumber: moderntreasury.F("routing_number"),
RoutingNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsRoutingNumberTypeAba),
PaymentType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.CounterpartyNewParamsAccountsRoutingDetailsPaymentTypeACH),
}}),
}}),
Email: moderntreasury.F("dev@stainlessapi.com"),
@@ -251,183 +93,23 @@ func TestCounterpartyNewWithOptionalParams(t *testing.T) {
Locality: moderntreasury.F("locality"),
PostalCode: moderntreasury.F("postal_code"),
Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressTypeOther}),
+ AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
BusinessName: moderntreasury.F("business_name"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
+ DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
Email: moderntreasury.F("email"),
FirstName: moderntreasury.F("first_name"),
Identifications: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityIdentification{{
IDNumber: moderntreasury.F("id_number"),
IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityIdentificationsIDTypeArCuil),
IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
}}),
LastName: moderntreasury.F("last_name"),
LegalEntityAssociations: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociation{{
- RelationshipTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeBeneficialOwner, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeControlPerson}),
- ChildLegalEntity: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity{
- Addresses: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress{{
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }}),
- BusinessName: moderntreasury.F("business_name"),
- DateFormed: moderntreasury.F(time.Now()),
- DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
- Email: moderntreasury.F("email"),
- FirstName: moderntreasury.F("first_name"),
- Identifications: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentification{{
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }}),
- LastName: moderntreasury.F("last_name"),
- LegalEntityType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityTypeBusiness),
- LegalStructure: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureCorporation),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PhoneNumbers: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber{{
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }}),
- RiskRating: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
- }),
- ChildLegalEntityID: moderntreasury.F("child_legal_entity_id"),
- OwnershipPercentage: moderntreasury.F(int64(0)),
- Title: moderntreasury.F("title"),
- }, {
- RelationshipTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeBeneficialOwner, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeControlPerson}),
- ChildLegalEntity: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity{
- Addresses: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress{{
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }}),
- BusinessName: moderntreasury.F("business_name"),
- DateFormed: moderntreasury.F(time.Now()),
- DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
- Email: moderntreasury.F("email"),
- FirstName: moderntreasury.F("first_name"),
- Identifications: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentification{{
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }}),
- LastName: moderntreasury.F("last_name"),
- LegalEntityType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityTypeBusiness),
- LegalStructure: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureCorporation),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PhoneNumbers: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber{{
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }}),
- RiskRating: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
- }),
- ChildLegalEntityID: moderntreasury.F("child_legal_entity_id"),
- OwnershipPercentage: moderntreasury.F(int64(0)),
- Title: moderntreasury.F("title"),
- }, {
- RelationshipTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeBeneficialOwner, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeControlPerson}),
+ RelationshipTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeBeneficialOwner}),
ChildLegalEntity: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity{
Addresses: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress{{
Country: moderntreasury.F("country"),
@@ -435,43 +117,19 @@ func TestCounterpartyNewWithOptionalParams(t *testing.T) {
Locality: moderntreasury.F("locality"),
PostalCode: moderntreasury.F("postal_code"),
Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
+ AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
BusinessName: moderntreasury.F("business_name"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
+ DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
Email: moderntreasury.F("email"),
FirstName: moderntreasury.F("first_name"),
Identifications: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentification{{
IDNumber: moderntreasury.F("id_number"),
IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
}}),
LastName: moderntreasury.F("last_name"),
LegalEntityType: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityTypeBusiness),
@@ -483,10 +141,6 @@ func TestCounterpartyNewWithOptionalParams(t *testing.T) {
}),
PhoneNumbers: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
}}),
RiskRating: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow),
Website: moderntreasury.F("website"),
@@ -503,10 +157,6 @@ func TestCounterpartyNewWithOptionalParams(t *testing.T) {
}),
PhoneNumbers: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
}}),
RiskRating: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityRiskRatingLow),
Website: moderntreasury.F("website"),
@@ -665,7 +315,7 @@ func TestCounterpartyCollectAccountWithOptionalParams(t *testing.T) {
moderntreasury.CounterpartyCollectAccountParams{
Direction: moderntreasury.F(shared.TransactionDirectionCredit),
CustomRedirect: moderntreasury.F("https://example.com"),
- Fields: moderntreasury.F([]moderntreasury.CounterpartyCollectAccountParamsField{moderntreasury.CounterpartyCollectAccountParamsFieldName, moderntreasury.CounterpartyCollectAccountParamsFieldNameOnAccount, moderntreasury.CounterpartyCollectAccountParamsFieldTaxpayerIdentifier}),
+ Fields: moderntreasury.F([]moderntreasury.CounterpartyCollectAccountParamsField{moderntreasury.CounterpartyCollectAccountParamsFieldName}),
SendEmail: moderntreasury.F(true),
},
)
diff --git a/expectedpayment_test.go b/expectedpayment_test.go
index e7b03ec..0c61184 100644
--- a/expectedpayment_test.go
+++ b/expectedpayment_test.go
@@ -59,46 +59,6 @@ func TestExpectedPaymentNewWithOptionalParams(t *testing.T) {
"foo": int64(0),
}),
ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
}}),
Description: moderntreasury.F("description"),
EffectiveAt: moderntreasury.F(time.Now()),
@@ -123,24 +83,6 @@ func TestExpectedPaymentNewWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
}}),
Metadata: moderntreasury.F(map[string]string{
"key": "value",
@@ -162,32 +104,6 @@ func TestExpectedPaymentNewWithOptionalParams(t *testing.T) {
DateLowerBound: moderntreasury.F(time.Now()),
DateUpperBound: moderntreasury.F(time.Now()),
Type: moderntreasury.F(moderntreasury.ReconciliationRuleTypeACH),
- }, {
- AmountLowerBound: moderntreasury.F(int64(0)),
- AmountUpperBound: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(moderntreasury.ReconciliationRuleDirectionCredit),
- InternalAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- CounterpartyID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- Currency: moderntreasury.F(shared.CurrencyAed),
- CustomIdentifiers: moderntreasury.F(map[string]string{
- "foo": "string",
- }),
- DateLowerBound: moderntreasury.F(time.Now()),
- DateUpperBound: moderntreasury.F(time.Now()),
- Type: moderntreasury.F(moderntreasury.ReconciliationRuleTypeACH),
- }, {
- AmountLowerBound: moderntreasury.F(int64(0)),
- AmountUpperBound: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(moderntreasury.ReconciliationRuleDirectionCredit),
- InternalAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- CounterpartyID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- Currency: moderntreasury.F(shared.CurrencyAed),
- CustomIdentifiers: moderntreasury.F(map[string]string{
- "foo": "string",
- }),
- DateLowerBound: moderntreasury.F(time.Now()),
- DateUpperBound: moderntreasury.F(time.Now()),
- Type: moderntreasury.F(moderntreasury.ReconciliationRuleTypeACH),
}}),
RemittanceInformation: moderntreasury.F("remittance_information"),
StatementDescriptor: moderntreasury.F("statement_descriptor"),
@@ -271,32 +187,6 @@ func TestExpectedPaymentUpdateWithOptionalParams(t *testing.T) {
DateLowerBound: moderntreasury.F(time.Now()),
DateUpperBound: moderntreasury.F(time.Now()),
Type: moderntreasury.F(moderntreasury.ReconciliationRuleTypeACH),
- }, {
- AmountLowerBound: moderntreasury.F(int64(0)),
- AmountUpperBound: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(moderntreasury.ReconciliationRuleDirectionCredit),
- InternalAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- CounterpartyID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- Currency: moderntreasury.F(shared.CurrencyAed),
- CustomIdentifiers: moderntreasury.F(map[string]string{
- "foo": "string",
- }),
- DateLowerBound: moderntreasury.F(time.Now()),
- DateUpperBound: moderntreasury.F(time.Now()),
- Type: moderntreasury.F(moderntreasury.ReconciliationRuleTypeACH),
- }, {
- AmountLowerBound: moderntreasury.F(int64(0)),
- AmountUpperBound: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(moderntreasury.ReconciliationRuleDirectionCredit),
- InternalAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- CounterpartyID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- Currency: moderntreasury.F(shared.CurrencyAed),
- CustomIdentifiers: moderntreasury.F(map[string]string{
- "foo": "string",
- }),
- DateLowerBound: moderntreasury.F(time.Now()),
- DateUpperBound: moderntreasury.F(time.Now()),
- Type: moderntreasury.F(moderntreasury.ReconciliationRuleTypeACH),
}}),
RemittanceInformation: moderntreasury.F("remittance_information"),
StatementDescriptor: moderntreasury.F("statement_descriptor"),
diff --git a/externalaccount_test.go b/externalaccount_test.go
index 4bf3115..29269a9 100644
--- a/externalaccount_test.go
+++ b/externalaccount_test.go
@@ -32,23 +32,11 @@ func TestExternalAccountNewWithOptionalParams(t *testing.T) {
AccountDetails: moderntreasury.F([]moderntreasury.ExternalAccountNewParamsAccountDetail{{
AccountNumber: moderntreasury.F("account_number"),
AccountNumberType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsAccountDetailsAccountNumberTypeAuNumber),
}}),
AccountType: moderntreasury.F(moderntreasury.ExternalAccountTypeCash),
ContactDetails: moderntreasury.F([]moderntreasury.ExternalAccountNewParamsContactDetail{{
ContactIdentifier: moderntreasury.F("contact_identifier"),
ContactIdentifierType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsContactDetailsContactIdentifierTypeEmail),
}}),
LedgerAccount: moderntreasury.F(moderntreasury.ExternalAccountNewParamsLedgerAccount{
Currency: moderntreasury.F("currency"),
@@ -57,7 +45,7 @@ func TestExternalAccountNewWithOptionalParams(t *testing.T) {
NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
CurrencyExponent: moderntreasury.F(int64(0)),
Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
+ LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
LedgerableType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsLedgerAccountLedgerableTypeCounterparty),
Metadata: moderntreasury.F(map[string]string{
@@ -88,14 +76,6 @@ func TestExternalAccountNewWithOptionalParams(t *testing.T) {
RoutingNumber: moderntreasury.F("routing_number"),
RoutingNumberType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsRoutingDetailsRoutingNumberTypeAba),
PaymentType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.ExternalAccountNewParamsRoutingDetailsPaymentTypeACH),
}}),
})
if err != nil {
diff --git a/internalaccountbalancereport_test.go b/internalaccountbalancereport_test.go
index 8ccafec..9993904 100644
--- a/internalaccountbalancereport_test.go
+++ b/internalaccountbalancereport_test.go
@@ -39,16 +39,6 @@ func TestInternalAccountBalanceReportNew(t *testing.T) {
BalanceType: moderntreasury.F(moderntreasury.BalanceReportNewParamsBalancesBalanceTypeClosingAvailable),
VendorCode: moderntreasury.F("vendor_code"),
VendorCodeType: moderntreasury.F("vendor_code_type"),
- }, {
- Amount: moderntreasury.F(int64(0)),
- BalanceType: moderntreasury.F(moderntreasury.BalanceReportNewParamsBalancesBalanceTypeClosingAvailable),
- VendorCode: moderntreasury.F("vendor_code"),
- VendorCodeType: moderntreasury.F("vendor_code_type"),
- }, {
- Amount: moderntreasury.F(int64(0)),
- BalanceType: moderntreasury.F(moderntreasury.BalanceReportNewParamsBalancesBalanceTypeClosingAvailable),
- VendorCode: moderntreasury.F("vendor_code"),
- VendorCodeType: moderntreasury.F("vendor_code_type"),
}}),
},
)
diff --git a/invoice_test.go b/invoice_test.go
index 335975e..c506114 100644
--- a/invoice_test.go
+++ b/invoice_test.go
@@ -42,24 +42,6 @@ func TestInvoiceNewWithOptionalParams(t *testing.T) {
LiveMode: moderntreasury.F(true),
Object: moderntreasury.F("object"),
UpdatedAt: moderntreasury.F(time.Now()),
- }, {
- ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.InvoiceNewParamsContactDetailsContactIdentifierTypeEmail),
- CreatedAt: moderntreasury.F(time.Now()),
- DiscardedAt: moderntreasury.F(time.Now()),
- LiveMode: moderntreasury.F(true),
- Object: moderntreasury.F("object"),
- UpdatedAt: moderntreasury.F(time.Now()),
- }, {
- ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.InvoiceNewParamsContactDetailsContactIdentifierTypeEmail),
- CreatedAt: moderntreasury.F(time.Now()),
- DiscardedAt: moderntreasury.F(time.Now()),
- LiveMode: moderntreasury.F(true),
- Object: moderntreasury.F("object"),
- UpdatedAt: moderntreasury.F(time.Now()),
}}),
CounterpartyBillingAddress: moderntreasury.F(moderntreasury.InvoiceNewParamsCounterpartyBillingAddress{
Country: moderntreasury.F("country"),
@@ -93,30 +75,6 @@ func TestInvoiceNewWithOptionalParams(t *testing.T) {
}),
Quantity: moderntreasury.F(int64(0)),
UnitAmountDecimal: moderntreasury.F("unit_amount_decimal"),
- }, {
- Name: moderntreasury.F("name"),
- UnitAmount: moderntreasury.F(int64(0)),
- Description: moderntreasury.F("description"),
- Direction: moderntreasury.F("direction"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- Quantity: moderntreasury.F(int64(0)),
- UnitAmountDecimal: moderntreasury.F("unit_amount_decimal"),
- }, {
- Name: moderntreasury.F("name"),
- UnitAmount: moderntreasury.F(int64(0)),
- Description: moderntreasury.F("description"),
- Direction: moderntreasury.F("direction"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- Quantity: moderntreasury.F(int64(0)),
- UnitAmountDecimal: moderntreasury.F("unit_amount_decimal"),
}}),
InvoicerAddress: moderntreasury.F(moderntreasury.InvoiceNewParamsInvoicerAddress{
Country: moderntreasury.F("country"),
@@ -132,7 +90,7 @@ func TestInvoiceNewWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
- NotificationEmailAddresses: moderntreasury.F([]string{"string", "string", "string"}),
+ NotificationEmailAddresses: moderntreasury.F([]string{"string"}),
NotificationsEnabled: moderntreasury.F(true),
PaymentEffectiveDate: moderntreasury.F(time.Now()),
PaymentMethod: moderntreasury.F(moderntreasury.InvoiceNewParamsPaymentMethodUi),
@@ -140,7 +98,7 @@ func TestInvoiceNewWithOptionalParams(t *testing.T) {
ReceivingAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
RecipientEmail: moderntreasury.F("recipient_email"),
RecipientName: moderntreasury.F("recipient_name"),
- RemindAfterOverdueDays: moderntreasury.F([]int64{int64(0), int64(0), int64(0)}),
+ RemindAfterOverdueDays: moderntreasury.F([]int64{int64(0)}),
VirtualAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
})
if err != nil {
@@ -201,24 +159,6 @@ func TestInvoiceUpdateWithOptionalParams(t *testing.T) {
LiveMode: moderntreasury.F(true),
Object: moderntreasury.F("object"),
UpdatedAt: moderntreasury.F(time.Now()),
- }, {
- ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.InvoiceUpdateParamsContactDetailsContactIdentifierTypeEmail),
- CreatedAt: moderntreasury.F(time.Now()),
- DiscardedAt: moderntreasury.F(time.Now()),
- LiveMode: moderntreasury.F(true),
- Object: moderntreasury.F("object"),
- UpdatedAt: moderntreasury.F(time.Now()),
- }, {
- ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.InvoiceUpdateParamsContactDetailsContactIdentifierTypeEmail),
- CreatedAt: moderntreasury.F(time.Now()),
- DiscardedAt: moderntreasury.F(time.Now()),
- LiveMode: moderntreasury.F(true),
- Object: moderntreasury.F("object"),
- UpdatedAt: moderntreasury.F(time.Now()),
}}),
CounterpartyBillingAddress: moderntreasury.F(moderntreasury.InvoiceUpdateParamsCounterpartyBillingAddress{
Country: moderntreasury.F("country"),
@@ -254,30 +194,6 @@ func TestInvoiceUpdateWithOptionalParams(t *testing.T) {
}),
Quantity: moderntreasury.F(int64(0)),
UnitAmountDecimal: moderntreasury.F("unit_amount_decimal"),
- }, {
- Name: moderntreasury.F("name"),
- UnitAmount: moderntreasury.F(int64(0)),
- Description: moderntreasury.F("description"),
- Direction: moderntreasury.F("direction"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- Quantity: moderntreasury.F(int64(0)),
- UnitAmountDecimal: moderntreasury.F("unit_amount_decimal"),
- }, {
- Name: moderntreasury.F("name"),
- UnitAmount: moderntreasury.F(int64(0)),
- Description: moderntreasury.F("description"),
- Direction: moderntreasury.F("direction"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- Quantity: moderntreasury.F(int64(0)),
- UnitAmountDecimal: moderntreasury.F("unit_amount_decimal"),
}}),
InvoicerAddress: moderntreasury.F(moderntreasury.InvoiceUpdateParamsInvoicerAddress{
Country: moderntreasury.F("country"),
@@ -293,7 +209,7 @@ func TestInvoiceUpdateWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
- NotificationEmailAddresses: moderntreasury.F([]string{"string", "string", "string"}),
+ NotificationEmailAddresses: moderntreasury.F([]string{"string"}),
NotificationsEnabled: moderntreasury.F(true),
OriginatingAccountID: moderntreasury.F("originating_account_id"),
PaymentEffectiveDate: moderntreasury.F(time.Now()),
@@ -302,7 +218,7 @@ func TestInvoiceUpdateWithOptionalParams(t *testing.T) {
ReceivingAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
RecipientEmail: moderntreasury.F("recipient_email"),
RecipientName: moderntreasury.F("recipient_name"),
- RemindAfterOverdueDays: moderntreasury.F([]int64{int64(0), int64(0), int64(0)}),
+ RemindAfterOverdueDays: moderntreasury.F([]int64{int64(0)}),
Status: moderntreasury.F("status"),
VirtualAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
},
diff --git a/ledger_test.go b/ledger_test.go
index b50aa6a..e4df808 100644
--- a/ledger_test.go
+++ b/ledger_test.go
@@ -117,7 +117,7 @@ func TestLedgerListWithOptionalParams(t *testing.T) {
option.WithOrganizationID("my-organization-ID"),
)
_, err := client.Ledgers.List(context.TODO(), moderntreasury.LedgerListParams{
- ID: moderntreasury.F([]string{"string", "string", "string"}),
+ ID: moderntreasury.F([]string{"string"}),
AfterCursor: moderntreasury.F("after_cursor"),
Metadata: moderntreasury.F(map[string]string{
"foo": "string",
diff --git a/ledgeraccount_test.go b/ledgeraccount_test.go
index 53bb76e..fe33c5b 100644
--- a/ledgeraccount_test.go
+++ b/ledgeraccount_test.go
@@ -35,7 +35,7 @@ func TestLedgerAccountNewWithOptionalParams(t *testing.T) {
NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
CurrencyExponent: moderntreasury.F(int64(0)),
Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
+ LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
LedgerableType: moderntreasury.F(moderntreasury.LedgerAccountNewParamsLedgerableTypeCounterparty),
Metadata: moderntreasury.F(map[string]string{
@@ -137,7 +137,7 @@ func TestLedgerAccountListWithOptionalParams(t *testing.T) {
option.WithOrganizationID("my-organization-ID"),
)
_, err := client.LedgerAccounts.List(context.TODO(), moderntreasury.LedgerAccountListParams{
- ID: moderntreasury.F([]string{"string", "string", "string"}),
+ ID: moderntreasury.F([]string{"string"}),
AfterCursor: moderntreasury.F("after_cursor"),
AvailableBalanceAmount: moderntreasury.F(moderntreasury.LedgerAccountListParamsAvailableBalanceAmount{
Eq: moderntreasury.F(int64(0)),
@@ -162,7 +162,7 @@ func TestLedgerAccountListWithOptionalParams(t *testing.T) {
Metadata: moderntreasury.F(map[string]string{
"foo": "string",
}),
- Name: moderntreasury.F([]string{"string", "string", "string"}),
+ Name: moderntreasury.F([]string{"string"}),
PendingBalanceAmount: moderntreasury.F(moderntreasury.LedgerAccountListParamsPendingBalanceAmount{
Eq: moderntreasury.F(int64(0)),
Gt: moderntreasury.F(int64(0)),
diff --git a/ledgeraccountbalancemonitor_test.go b/ledgeraccountbalancemonitor_test.go
index 1a0386d..8246cc4 100644
--- a/ledgeraccountbalancemonitor_test.go
+++ b/ledgeraccountbalancemonitor_test.go
@@ -120,7 +120,7 @@ func TestLedgerAccountBalanceMonitorListWithOptionalParams(t *testing.T) {
option.WithOrganizationID("my-organization-ID"),
)
_, err := client.LedgerAccountBalanceMonitors.List(context.TODO(), moderntreasury.LedgerAccountBalanceMonitorListParams{
- ID: moderntreasury.F([]string{"string", "string", "string"}),
+ ID: moderntreasury.F([]string{"string"}),
AfterCursor: moderntreasury.F("after_cursor"),
LedgerAccountID: moderntreasury.F("ledger_account_id"),
Metadata: moderntreasury.F(map[string]string{
diff --git a/ledgeraccountcategory_test.go b/ledgeraccountcategory_test.go
index 13a7bf8..41108b3 100644
--- a/ledgeraccountcategory_test.go
+++ b/ledgeraccountcategory_test.go
@@ -35,7 +35,7 @@ func TestLedgerAccountCategoryNewWithOptionalParams(t *testing.T) {
NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
CurrencyExponent: moderntreasury.F(int64(0)),
Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
+ LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
Metadata: moderntreasury.F(map[string]string{
"key": "value",
"foo": "bar",
@@ -132,7 +132,7 @@ func TestLedgerAccountCategoryListWithOptionalParams(t *testing.T) {
option.WithOrganizationID("my-organization-ID"),
)
_, err := client.LedgerAccountCategories.List(context.TODO(), moderntreasury.LedgerAccountCategoryListParams{
- ID: moderntreasury.F([]string{"string", "string", "string"}),
+ ID: moderntreasury.F([]string{"string"}),
AfterCursor: moderntreasury.F("after_cursor"),
Balances: moderntreasury.F(moderntreasury.LedgerAccountCategoryListParamsBalances{
EffectiveAt: moderntreasury.F(time.Now()),
diff --git a/ledgeraccountsettlement_test.go b/ledgeraccountsettlement_test.go
index a8d9f66..f5e8dab 100644
--- a/ledgeraccountsettlement_test.go
+++ b/ledgeraccountsettlement_test.go
@@ -122,7 +122,7 @@ func TestLedgerAccountSettlementListWithOptionalParams(t *testing.T) {
option.WithOrganizationID("my-organization-ID"),
)
_, err := client.LedgerAccountSettlements.List(context.TODO(), moderntreasury.LedgerAccountSettlementListParams{
- ID: moderntreasury.F([]string{"string", "string", "string"}),
+ ID: moderntreasury.F([]string{"string"}),
AfterCursor: moderntreasury.F("after_cursor"),
CreatedAt: moderntreasury.F(map[string]time.Time{
"foo": time.Now(),
diff --git a/ledgerentry_test.go b/ledgerentry_test.go
index 67f25a9..8ba4abe 100644
--- a/ledgerentry_test.go
+++ b/ledgerentry_test.go
@@ -91,7 +91,7 @@ func TestLedgerEntryListWithOptionalParams(t *testing.T) {
option.WithOrganizationID("my-organization-ID"),
)
_, err := client.LedgerEntries.List(context.TODO(), moderntreasury.LedgerEntryListParams{
- ID: moderntreasury.F([]string{"string", "string", "string"}),
+ ID: moderntreasury.F([]string{"string"}),
AfterCursor: moderntreasury.F("after_cursor"),
AsOfLockVersion: moderntreasury.F(int64(0)),
Direction: moderntreasury.F(shared.TransactionDirectionCredit),
diff --git a/ledgereventhandler_test.go b/ledgereventhandler_test.go
index f628cea..b53981c 100644
--- a/ledgereventhandler_test.go
+++ b/ledgereventhandler_test.go
@@ -35,14 +35,6 @@ func TestLedgerEventHandlerNewWithOptionalParams(t *testing.T) {
Amount: moderntreasury.F("amount"),
Direction: moderntreasury.F("direction"),
LedgerAccountID: moderntreasury.F("ledger_account_id"),
- }, {
- Amount: moderntreasury.F("amount"),
- Direction: moderntreasury.F("direction"),
- LedgerAccountID: moderntreasury.F("ledger_account_id"),
- }, {
- Amount: moderntreasury.F("amount"),
- Direction: moderntreasury.F("direction"),
- LedgerAccountID: moderntreasury.F("ledger_account_id"),
}}),
Status: moderntreasury.F("posted"),
}),
diff --git a/ledgertransaction_test.go b/ledgertransaction_test.go
index 6d4c9c7..ee0f743 100644
--- a/ledgertransaction_test.go
+++ b/ledgertransaction_test.go
@@ -49,46 +49,6 @@ func TestLedgerTransactionNewWithOptionalParams(t *testing.T) {
"foo": int64(0),
}),
ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
}}),
Description: moderntreasury.F("description"),
EffectiveAt: moderntreasury.F(time.Now()),
@@ -174,46 +134,6 @@ func TestLedgerTransactionUpdateWithOptionalParams(t *testing.T) {
"foo": int64(0),
}),
ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
}}),
LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
LedgerableType: moderntreasury.F(moderntreasury.LedgerTransactionUpdateParamsLedgerableTypeExpectedPayment),
@@ -248,7 +168,7 @@ func TestLedgerTransactionListWithOptionalParams(t *testing.T) {
option.WithOrganizationID("my-organization-ID"),
)
_, err := client.LedgerTransactions.List(context.TODO(), moderntreasury.LedgerTransactionListParams{
- ID: moderntreasury.F([]string{"string", "string", "string"}),
+ ID: moderntreasury.F([]string{"string"}),
AfterCursor: moderntreasury.F("after_cursor"),
EffectiveAt: moderntreasury.F(map[string]time.Time{
"foo": time.Now(),
diff --git a/legalentity_test.go b/legalentity_test.go
index c407c07..439deac 100644
--- a/legalentity_test.go
+++ b/legalentity_test.go
@@ -35,183 +35,23 @@ func TestLegalEntityNewWithOptionalParams(t *testing.T) {
Locality: moderntreasury.F("locality"),
PostalCode: moderntreasury.F("postal_code"),
Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsAddressesAddressType{moderntreasury.LegalEntityNewParamsAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsAddressesAddressType{moderntreasury.LegalEntityNewParamsAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsAddressesAddressType{moderntreasury.LegalEntityNewParamsAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsAddressesAddressTypeOther}),
+ AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsAddressesAddressType{moderntreasury.LegalEntityNewParamsAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
BusinessName: moderntreasury.F("business_name"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
+ DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
Email: moderntreasury.F("email"),
FirstName: moderntreasury.F("first_name"),
Identifications: moderntreasury.F([]moderntreasury.LegalEntityNewParamsIdentification{{
IDNumber: moderntreasury.F("id_number"),
IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsIdentificationsIDTypeArCuil),
IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
}}),
LastName: moderntreasury.F("last_name"),
LegalEntityAssociations: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociation{{
- RelationshipTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsRelationshipType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsRelationshipTypeBeneficialOwner, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsRelationshipTypeControlPerson}),
- ChildLegalEntity: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntity{
- Addresses: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddress{{
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }}),
- BusinessName: moderntreasury.F("business_name"),
- DateFormed: moderntreasury.F(time.Now()),
- DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
- Email: moderntreasury.F("email"),
- FirstName: moderntreasury.F("first_name"),
- Identifications: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentification{{
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }}),
- LastName: moderntreasury.F("last_name"),
- LegalEntityType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityLegalEntityTypeBusiness),
- LegalStructure: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityLegalStructureCorporation),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PhoneNumbers: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityPhoneNumber{{
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }}),
- RiskRating: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
- }),
- ChildLegalEntityID: moderntreasury.F("child_legal_entity_id"),
- OwnershipPercentage: moderntreasury.F(int64(0)),
- Title: moderntreasury.F("title"),
- }, {
- RelationshipTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsRelationshipType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsRelationshipTypeBeneficialOwner, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsRelationshipTypeControlPerson}),
- ChildLegalEntity: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntity{
- Addresses: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddress{{
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }}),
- BusinessName: moderntreasury.F("business_name"),
- DateFormed: moderntreasury.F(time.Now()),
- DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
- Email: moderntreasury.F("email"),
- FirstName: moderntreasury.F("first_name"),
- Identifications: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentification{{
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }}),
- LastName: moderntreasury.F("last_name"),
- LegalEntityType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityLegalEntityTypeBusiness),
- LegalStructure: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityLegalStructureCorporation),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PhoneNumbers: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityPhoneNumber{{
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }}),
- RiskRating: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
- }),
- ChildLegalEntityID: moderntreasury.F("child_legal_entity_id"),
- OwnershipPercentage: moderntreasury.F(int64(0)),
- Title: moderntreasury.F("title"),
- }, {
- RelationshipTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsRelationshipType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsRelationshipTypeBeneficialOwner, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsRelationshipTypeControlPerson}),
+ RelationshipTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsRelationshipType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsRelationshipTypeBeneficialOwner}),
ChildLegalEntity: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntity{
Addresses: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddress{{
Country: moderntreasury.F("country"),
@@ -219,43 +59,19 @@ func TestLegalEntityNewWithOptionalParams(t *testing.T) {
Locality: moderntreasury.F("locality"),
PostalCode: moderntreasury.F("postal_code"),
Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther}),
+ AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
BusinessName: moderntreasury.F("business_name"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
+ DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
Email: moderntreasury.F("email"),
FirstName: moderntreasury.F("first_name"),
Identifications: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentification{{
IDNumber: moderntreasury.F("id_number"),
IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
}}),
LastName: moderntreasury.F("last_name"),
LegalEntityType: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityLegalEntityTypeBusiness),
@@ -267,10 +83,6 @@ func TestLegalEntityNewWithOptionalParams(t *testing.T) {
}),
PhoneNumbers: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
}}),
RiskRating: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityRiskRatingLow),
Website: moderntreasury.F("website"),
@@ -287,10 +99,6 @@ func TestLegalEntityNewWithOptionalParams(t *testing.T) {
}),
PhoneNumbers: moderntreasury.F([]moderntreasury.LegalEntityNewParamsPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
}}),
RiskRating: moderntreasury.F(moderntreasury.LegalEntityNewParamsRiskRatingLow),
Website: moderntreasury.F("website"),
@@ -347,7 +155,7 @@ func TestLegalEntityUpdateWithOptionalParams(t *testing.T) {
BusinessName: moderntreasury.F("business_name"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
+ DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
Email: moderntreasury.F("email"),
FirstName: moderntreasury.F("first_name"),
LastName: moderntreasury.F("last_name"),
@@ -359,10 +167,6 @@ func TestLegalEntityUpdateWithOptionalParams(t *testing.T) {
}),
PhoneNumbers: moderntreasury.F([]moderntreasury.LegalEntityUpdateParamsPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
}}),
RiskRating: moderntreasury.F(moderntreasury.LegalEntityUpdateParamsRiskRatingLow),
Website: moderntreasury.F("website"),
diff --git a/legalentityassociation_test.go b/legalentityassociation_test.go
index e5978ac..453f738 100644
--- a/legalentityassociation_test.go
+++ b/legalentityassociation_test.go
@@ -29,7 +29,7 @@ func TestLegalEntityAssociationNewWithOptionalParams(t *testing.T) {
)
_, err := client.LegalEntityAssociations.New(context.TODO(), moderntreasury.LegalEntityAssociationNewParams{
ParentLegalEntityID: moderntreasury.F("parent_legal_entity_id"),
- RelationshipTypes: moderntreasury.F([]moderntreasury.LegalEntityAssociationNewParamsRelationshipType{moderntreasury.LegalEntityAssociationNewParamsRelationshipTypeBeneficialOwner, moderntreasury.LegalEntityAssociationNewParamsRelationshipTypeControlPerson}),
+ RelationshipTypes: moderntreasury.F([]moderntreasury.LegalEntityAssociationNewParamsRelationshipType{moderntreasury.LegalEntityAssociationNewParamsRelationshipTypeBeneficialOwner}),
ChildLegalEntity: moderntreasury.F(moderntreasury.LegalEntityAssociationNewParamsChildLegalEntity{
Addresses: moderntreasury.F([]moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddress{{
Country: moderntreasury.F("country"),
@@ -37,43 +37,19 @@ func TestLegalEntityAssociationNewWithOptionalParams(t *testing.T) {
Locality: moderntreasury.F("locality"),
PostalCode: moderntreasury.F("postal_code"),
Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressTypeOther}),
- Line2: moderntreasury.F("line2"),
- }, {
- Country: moderntreasury.F("country"),
- Line1: moderntreasury.F("line1"),
- Locality: moderntreasury.F("locality"),
- PostalCode: moderntreasury.F("postal_code"),
- Region: moderntreasury.F("region"),
- AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressTypeBusiness, moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressTypeMailing, moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressTypeOther}),
+ AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
BusinessName: moderntreasury.F("business_name"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
- DoingBusinessAsNames: moderntreasury.F([]string{"string", "string", "string"}),
+ DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
Email: moderntreasury.F("email"),
FirstName: moderntreasury.F("first_name"),
Identifications: moderntreasury.F([]moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityIdentification{{
IDNumber: moderntreasury.F("id_number"),
IDType: moderntreasury.F(moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityIdentificationsIDTypeArCuil),
IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
- }, {
- IDNumber: moderntreasury.F("id_number"),
- IDType: moderntreasury.F(moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityIdentificationsIDTypeArCuil),
- IssuingCountry: moderntreasury.F("issuing_country"),
}}),
LastName: moderntreasury.F("last_name"),
LegalEntityType: moderntreasury.F(moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityLegalEntityTypeBusiness),
@@ -85,10 +61,6 @@ func TestLegalEntityAssociationNewWithOptionalParams(t *testing.T) {
}),
PhoneNumbers: moderntreasury.F([]moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
- }, {
- PhoneNumber: moderntreasury.F("phone_number"),
}}),
RiskRating: moderntreasury.F(moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityRiskRatingLow),
Website: moderntreasury.F("website"),
diff --git a/paymentorder_test.go b/paymentorder_test.go
index a548115..9401352 100644
--- a/paymentorder_test.go
+++ b/paymentorder_test.go
@@ -49,16 +49,6 @@ func TestPaymentOrderNewWithOptionalParams(t *testing.T) {
DocumentableType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsDocumentsDocumentableTypeCases),
File: moderntreasury.F(io.Reader(bytes.NewBuffer([]byte("some file contents")))),
DocumentType: moderntreasury.F("document_type"),
- }, {
- DocumentableID: moderntreasury.F("documentable_id"),
- DocumentableType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsDocumentsDocumentableTypeCases),
- File: moderntreasury.F(io.Reader(bytes.NewBuffer([]byte("some file contents")))),
- DocumentType: moderntreasury.F("document_type"),
- }, {
- DocumentableID: moderntreasury.F("documentable_id"),
- DocumentableType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsDocumentsDocumentableTypeCases),
- File: moderntreasury.F(io.Reader(bytes.NewBuffer([]byte("some file contents")))),
- DocumentType: moderntreasury.F("document_type"),
}}),
EffectiveDate: moderntreasury.F(time.Now()),
ExpiresAt: moderntreasury.F(time.Now()),
@@ -86,46 +76,6 @@ func TestPaymentOrderNewWithOptionalParams(t *testing.T) {
"foo": int64(0),
}),
ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
}}),
Description: moderntreasury.F("description"),
EffectiveAt: moderntreasury.F(time.Now()),
@@ -150,24 +100,6 @@ func TestPaymentOrderNewWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
}}),
Metadata: moderntreasury.F(map[string]string{
"key": "value",
@@ -183,23 +115,11 @@ func TestPaymentOrderNewWithOptionalParams(t *testing.T) {
AccountDetails: moderntreasury.F([]moderntreasury.PaymentOrderNewParamsReceivingAccountAccountDetail{{
AccountNumber: moderntreasury.F("account_number"),
AccountNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
}}),
AccountType: moderntreasury.F(moderntreasury.ExternalAccountTypeCash),
ContactDetails: moderntreasury.F([]moderntreasury.PaymentOrderNewParamsReceivingAccountContactDetail{{
ContactIdentifier: moderntreasury.F("contact_identifier"),
ContactIdentifierType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountContactDetailsContactIdentifierTypeEmail),
}}),
LedgerAccount: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountLedgerAccount{
Currency: moderntreasury.F("currency"),
@@ -208,7 +128,7 @@ func TestPaymentOrderNewWithOptionalParams(t *testing.T) {
NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
CurrencyExponent: moderntreasury.F(int64(0)),
Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
+ LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
LedgerableType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountLedgerAccountLedgerableTypeCounterparty),
Metadata: moderntreasury.F(map[string]string{
@@ -239,14 +159,6 @@ func TestPaymentOrderNewWithOptionalParams(t *testing.T) {
RoutingNumber: moderntreasury.F("routing_number"),
RoutingNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountRoutingDetailsRoutingNumberTypeAba),
PaymentType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.PaymentOrderNewParamsReceivingAccountRoutingDetailsPaymentTypeACH),
}}),
}),
ReceivingAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
@@ -335,24 +247,6 @@ func TestPaymentOrderUpdateWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
}}),
Metadata: moderntreasury.F(map[string]string{
"key": "value",
@@ -369,23 +263,11 @@ func TestPaymentOrderUpdateWithOptionalParams(t *testing.T) {
AccountDetails: moderntreasury.F([]moderntreasury.PaymentOrderUpdateParamsReceivingAccountAccountDetail{{
AccountNumber: moderntreasury.F("account_number"),
AccountNumberType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
}}),
AccountType: moderntreasury.F(moderntreasury.ExternalAccountTypeCash),
ContactDetails: moderntreasury.F([]moderntreasury.PaymentOrderUpdateParamsReceivingAccountContactDetail{{
ContactIdentifier: moderntreasury.F("contact_identifier"),
ContactIdentifierType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountContactDetailsContactIdentifierTypeEmail),
}}),
LedgerAccount: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountLedgerAccount{
Currency: moderntreasury.F("currency"),
@@ -394,7 +276,7 @@ func TestPaymentOrderUpdateWithOptionalParams(t *testing.T) {
NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
CurrencyExponent: moderntreasury.F(int64(0)),
Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
+ LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
LedgerableType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountLedgerAccountLedgerableTypeCounterparty),
Metadata: moderntreasury.F(map[string]string{
@@ -425,14 +307,6 @@ func TestPaymentOrderUpdateWithOptionalParams(t *testing.T) {
RoutingNumber: moderntreasury.F("routing_number"),
RoutingNumberType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountRoutingDetailsRoutingNumberTypeAba),
PaymentType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.PaymentOrderUpdateParamsReceivingAccountRoutingDetailsPaymentTypeACH),
}}),
}),
ReceivingAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
@@ -553,46 +427,6 @@ func TestPaymentOrderNewAsyncWithOptionalParams(t *testing.T) {
"foo": int64(0),
}),
ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
}}),
Description: moderntreasury.F("description"),
EffectiveAt: moderntreasury.F(time.Now()),
@@ -617,24 +451,6 @@ func TestPaymentOrderNewAsyncWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- }, {
- Amount: moderntreasury.F(int64(0)),
- AccountingCategoryID: moderntreasury.F("accounting_category_id"),
- Description: moderntreasury.F("description"),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
}}),
Metadata: moderntreasury.F(map[string]string{
"key": "value",
@@ -650,23 +466,11 @@ func TestPaymentOrderNewAsyncWithOptionalParams(t *testing.T) {
AccountDetails: moderntreasury.F([]moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountAccountDetail{{
AccountNumber: moderntreasury.F("account_number"),
AccountNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountAccountDetailsAccountNumberTypeAuNumber),
}}),
AccountType: moderntreasury.F(moderntreasury.ExternalAccountTypeCash),
ContactDetails: moderntreasury.F([]moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountContactDetail{{
ContactIdentifier: moderntreasury.F("contact_identifier"),
ContactIdentifierType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountContactDetailsContactIdentifierTypeEmail),
- }, {
- ContactIdentifier: moderntreasury.F("contact_identifier"),
- ContactIdentifierType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountContactDetailsContactIdentifierTypeEmail),
}}),
LedgerAccount: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountLedgerAccount{
Currency: moderntreasury.F("currency"),
@@ -675,7 +479,7 @@ func TestPaymentOrderNewAsyncWithOptionalParams(t *testing.T) {
NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
CurrencyExponent: moderntreasury.F(int64(0)),
Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
+ LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
LedgerableType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountLedgerAccountLedgerableTypeCounterparty),
Metadata: moderntreasury.F(map[string]string{
@@ -706,14 +510,6 @@ func TestPaymentOrderNewAsyncWithOptionalParams(t *testing.T) {
RoutingNumber: moderntreasury.F("routing_number"),
RoutingNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountRoutingDetailsRoutingNumberTypeAba),
PaymentType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.PaymentOrderNewAsyncParamsReceivingAccountRoutingDetailsPaymentTypeACH),
}}),
}),
ReceivingAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
diff --git a/paymentorderreversal_test.go b/paymentorderreversal_test.go
index bb2100d..eee8ab2 100644
--- a/paymentorderreversal_test.go
+++ b/paymentorderreversal_test.go
@@ -54,46 +54,6 @@ func TestPaymentOrderReversalNewWithOptionalParams(t *testing.T) {
"foo": int64(0),
}),
ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
- }, {
- Amount: moderntreasury.F(int64(0)),
- Direction: moderntreasury.F(shared.TransactionDirectionCredit),
- LedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
- AvailableBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- LockVersion: moderntreasury.F(int64(0)),
- Metadata: moderntreasury.F(map[string]string{
- "key": "value",
- "foo": "bar",
- "modern": "treasury",
- }),
- PendingBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- PostedBalanceAmount: moderntreasury.F(map[string]int64{
- "foo": int64(0),
- }),
- ShowResultingLedgerAccountBalances: moderntreasury.F(true),
}}),
Description: moderntreasury.F("description"),
EffectiveAt: moderntreasury.F(time.Now()),
diff --git a/virtualaccount_test.go b/virtualaccount_test.go
index 3f3e2ba..e032698 100644
--- a/virtualaccount_test.go
+++ b/virtualaccount_test.go
@@ -33,12 +33,6 @@ func TestVirtualAccountNewWithOptionalParams(t *testing.T) {
AccountDetails: moderntreasury.F([]moderntreasury.VirtualAccountNewParamsAccountDetail{{
AccountNumber: moderntreasury.F("account_number"),
AccountNumberType: moderntreasury.F(moderntreasury.VirtualAccountNewParamsAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.VirtualAccountNewParamsAccountDetailsAccountNumberTypeAuNumber),
- }, {
- AccountNumber: moderntreasury.F("account_number"),
- AccountNumberType: moderntreasury.F(moderntreasury.VirtualAccountNewParamsAccountDetailsAccountNumberTypeAuNumber),
}}),
CounterpartyID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
CreditLedgerAccountID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
@@ -51,7 +45,7 @@ func TestVirtualAccountNewWithOptionalParams(t *testing.T) {
NormalBalance: moderntreasury.F(shared.TransactionDirectionCredit),
CurrencyExponent: moderntreasury.F(int64(0)),
Description: moderntreasury.F("description"),
- LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
+ LedgerAccountCategoryIDs: moderntreasury.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
LedgerableID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
LedgerableType: moderntreasury.F(moderntreasury.VirtualAccountNewParamsLedgerAccountLedgerableTypeCounterparty),
Metadata: moderntreasury.F(map[string]string{
@@ -67,14 +61,6 @@ func TestVirtualAccountNewWithOptionalParams(t *testing.T) {
RoutingNumber: moderntreasury.F("routing_number"),
RoutingNumberType: moderntreasury.F(moderntreasury.VirtualAccountNewParamsRoutingDetailsRoutingNumberTypeAba),
PaymentType: moderntreasury.F(moderntreasury.VirtualAccountNewParamsRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.VirtualAccountNewParamsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.VirtualAccountNewParamsRoutingDetailsPaymentTypeACH),
- }, {
- RoutingNumber: moderntreasury.F("routing_number"),
- RoutingNumberType: moderntreasury.F(moderntreasury.VirtualAccountNewParamsRoutingDetailsRoutingNumberTypeAba),
- PaymentType: moderntreasury.F(moderntreasury.VirtualAccountNewParamsRoutingDetailsPaymentTypeACH),
}}),
})
if err != nil {
From 579f935cba1451233b1112e266e0ce6f47b83e8e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 18 Nov 2024 17:01:47 +0000
Subject: [PATCH 2/4] chore(api): additional fields for requests to get
BalanceReports and create LegalEntities (#292)
- adds additional date filters to Balance Reports: `as_of_date`, `as_of_time`, `value_date`
- adds additional fields when creating a LegalEntity
---
.stats.yml | 2 +-
api.md | 7 +
connectionlegalentity.go | 36 +-
connectionlegalentity_test.go | 84 ++++-
counterparty.go | 36 +-
counterparty_test.go | 84 ++++-
internalaccountbalancereport.go | 9 +
ledgeraccountsettlement.go | 3 +-
legalentity.go | 574 ++++++++++++++++++++++++++++++--
legalentity_test.go | 144 +++++++-
legalentityassociation.go | 96 ++++--
legalentityassociation_test.go | 42 ++-
validation.go | 3 +-
13 files changed, 1026 insertions(+), 94 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index b1d1921..43e1c5a 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
configured_endpoints: 158
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury-5753cf83c1cfd8a49c2fb5445fa9a6970330522400bebaf8a4a9f56aecbcff24.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury-4b51a7bbe353febe7c65957669c6e3b881999250e0b35033a8b39e90e9c9425a.yml
diff --git a/api.md b/api.md
index 8f10ebe..0d9160c 100644
--- a/api.md
+++ b/api.md
@@ -568,9 +568,16 @@ Methods:
# LegalEntities
+Params Types:
+
+- moderntreasury.BankSettingsParam
+- moderntreasury.WealthAndEmploymentDetailsParam
+
Response Types:
+- moderntreasury.BankSettings
- moderntreasury.LegalEntity
+- moderntreasury.WealthAndEmploymentDetails
Methods:
diff --git a/connectionlegalentity.go b/connectionlegalentity.go
index 9553d1b..06e0c89 100644
--- a/connectionlegalentity.go
+++ b/connectionlegalentity.go
@@ -171,9 +171,12 @@ func (r ConnectionLegalEntityNewParams) MarshalJSON() (data []byte, err error) {
// The legal entity.
type ConnectionLegalEntityNewParamsLegalEntity struct {
// A list of addresses for the entity.
- Addresses param.Field[[]ConnectionLegalEntityNewParamsLegalEntityAddress] `json:"addresses"`
+ Addresses param.Field[[]ConnectionLegalEntityNewParamsLegalEntityAddress] `json:"addresses"`
+ BankSettings param.Field[BankSettingsParam] `json:"bank_settings"`
// The business's legal business name.
BusinessName param.Field[string] `json:"business_name"`
+ // The country of citizenship for an individual.
+ CitizenshipCountry param.Field[string] `json:"citizenship_country"`
// A business's formation date (YYYY-MM-DD).
DateFormed param.Field[time.Time] `json:"date_formed" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
@@ -195,10 +198,21 @@ type ConnectionLegalEntityNewParamsLegalEntity struct {
LegalStructure param.Field[ConnectionLegalEntityNewParamsLegalEntityLegalStructure] `json:"legal_structure"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
- Metadata param.Field[map[string]string] `json:"metadata"`
+ Metadata param.Field[map[string]string] `json:"metadata"`
+ // An individual's middle name.
+ MiddleName param.Field[string] `json:"middle_name"`
PhoneNumbers param.Field[[]ConnectionLegalEntityNewParamsLegalEntityPhoneNumber] `json:"phone_numbers"`
+ // Whether the individual is a politically exposed person.
+ PoliticallyExposedPerson param.Field[bool] `json:"politically_exposed_person"`
+ // An individual's preferred name.
+ PreferredName param.Field[string] `json:"preferred_name"`
+ // An individual's prefix.
+ Prefix param.Field[string] `json:"prefix"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating param.Field[ConnectionLegalEntityNewParamsLegalEntityRiskRating] `json:"risk_rating"`
+ // An individual's suffix.
+ Suffix param.Field[string] `json:"suffix"`
+ WealthAndEmploymentDetails param.Field[WealthAndEmploymentDetailsParam] `json:"wealth_and_employment_details"`
// The entity's primary website URL.
Website param.Field[string] `json:"website"`
}
@@ -328,9 +342,12 @@ func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelation
// The child legal entity.
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity struct {
// A list of addresses for the entity.
- Addresses param.Field[[]ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress] `json:"addresses"`
+ Addresses param.Field[[]ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress] `json:"addresses"`
+ BankSettings param.Field[BankSettingsParam] `json:"bank_settings"`
// The business's legal business name.
BusinessName param.Field[string] `json:"business_name"`
+ // The country of citizenship for an individual.
+ CitizenshipCountry param.Field[string] `json:"citizenship_country"`
// A business's formation date (YYYY-MM-DD).
DateFormed param.Field[time.Time] `json:"date_formed" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
@@ -350,10 +367,21 @@ type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalE
LegalStructure param.Field[ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructure] `json:"legal_structure"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
- Metadata param.Field[map[string]string] `json:"metadata"`
+ Metadata param.Field[map[string]string] `json:"metadata"`
+ // An individual's middle name.
+ MiddleName param.Field[string] `json:"middle_name"`
PhoneNumbers param.Field[[]ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber] `json:"phone_numbers"`
+ // Whether the individual is a politically exposed person.
+ PoliticallyExposedPerson param.Field[bool] `json:"politically_exposed_person"`
+ // An individual's preferred name.
+ PreferredName param.Field[string] `json:"preferred_name"`
+ // An individual's prefix.
+ Prefix param.Field[string] `json:"prefix"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating param.Field[ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRating] `json:"risk_rating"`
+ // An individual's suffix.
+ Suffix param.Field[string] `json:"suffix"`
+ WealthAndEmploymentDetails param.Field[WealthAndEmploymentDetailsParam] `json:"wealth_and_employment_details"`
// The entity's primary website URL.
Website param.Field[string] `json:"website"`
}
diff --git a/connectionlegalentity_test.go b/connectionlegalentity_test.go
index 00479ae..b39b550 100644
--- a/connectionlegalentity_test.go
+++ b/connectionlegalentity_test.go
@@ -39,7 +39,20 @@ func TestConnectionLegalEntityNewWithOptionalParams(t *testing.T) {
AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
+ BankSettings: moderntreasury.F(moderntreasury.BankSettingsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ BackupWithholdingPercentage: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EnableBackupWithholding: moderntreasury.F(true),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ PrivacyOptOut: moderntreasury.F(true),
+ RegulationO: moderntreasury.F(true),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ }),
BusinessName: moderntreasury.F("business_name"),
+ CitizenshipCountry: moderntreasury.F("citizenship_country"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
@@ -63,7 +76,20 @@ func TestConnectionLegalEntityNewWithOptionalParams(t *testing.T) {
AddressTypes: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
+ BankSettings: moderntreasury.F(moderntreasury.BankSettingsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ BackupWithholdingPercentage: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EnableBackupWithholding: moderntreasury.F(true),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ PrivacyOptOut: moderntreasury.F(true),
+ RegulationO: moderntreasury.F(true),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ }),
BusinessName: moderntreasury.F("business_name"),
+ CitizenshipCountry: moderntreasury.F("citizenship_country"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
@@ -82,11 +108,36 @@ func TestConnectionLegalEntityNewWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
+ MiddleName: moderntreasury.F("middle_name"),
PhoneNumbers: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
}}),
- RiskRating: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
+ PoliticallyExposedPerson: moderntreasury.F(true),
+ PreferredName: moderntreasury.F("preferred_name"),
+ Prefix: moderntreasury.F("prefix"),
+ RiskRating: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow),
+ Suffix: moderntreasury.F("suffix"),
+ WealthAndEmploymentDetails: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ AnnualIncome: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EmployerCountry: moderntreasury.F("employer_country"),
+ EmployerName: moderntreasury.F("employer_name"),
+ EmployerState: moderntreasury.F("employer_state"),
+ EmploymentStatus: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsEmploymentStatusEmployed),
+ IncomeCountry: moderntreasury.F("income_country"),
+ IncomeSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIncomeSourceFamilySupport),
+ IncomeState: moderntreasury.F("income_state"),
+ Industry: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIndustryAccounting),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ Occupation: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsOccupationConsulting),
+ SourceOfFunds: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsSourceOfFundsAlimony),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ WealthSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsWealthSourceBusinessSale),
+ }),
+ Website: moderntreasury.F("website"),
}),
ChildLegalEntityID: moderntreasury.F("child_legal_entity_id"),
OwnershipPercentage: moderntreasury.F(int64(0)),
@@ -99,11 +150,36 @@ func TestConnectionLegalEntityNewWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
+ MiddleName: moderntreasury.F("middle_name"),
PhoneNumbers: moderntreasury.F([]moderntreasury.ConnectionLegalEntityNewParamsLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
}}),
- RiskRating: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
+ PoliticallyExposedPerson: moderntreasury.F(true),
+ PreferredName: moderntreasury.F("preferred_name"),
+ Prefix: moderntreasury.F("prefix"),
+ RiskRating: moderntreasury.F(moderntreasury.ConnectionLegalEntityNewParamsLegalEntityRiskRatingLow),
+ Suffix: moderntreasury.F("suffix"),
+ WealthAndEmploymentDetails: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ AnnualIncome: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EmployerCountry: moderntreasury.F("employer_country"),
+ EmployerName: moderntreasury.F("employer_name"),
+ EmployerState: moderntreasury.F("employer_state"),
+ EmploymentStatus: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsEmploymentStatusEmployed),
+ IncomeCountry: moderntreasury.F("income_country"),
+ IncomeSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIncomeSourceFamilySupport),
+ IncomeState: moderntreasury.F("income_state"),
+ Industry: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIndustryAccounting),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ Occupation: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsOccupationConsulting),
+ SourceOfFunds: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsSourceOfFundsAlimony),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ WealthSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsWealthSourceBusinessSale),
+ }),
+ Website: moderntreasury.F("website"),
}),
LegalEntityID: moderntreasury.F("legal_entity_id"),
})
diff --git a/counterparty.go b/counterparty.go
index 928914a..32f5f64 100644
--- a/counterparty.go
+++ b/counterparty.go
@@ -785,9 +785,12 @@ type CounterpartyNewParamsLegalEntity struct {
// The type of legal entity.
LegalEntityType param.Field[CounterpartyNewParamsLegalEntityLegalEntityType] `json:"legal_entity_type,required"`
// A list of addresses for the entity.
- Addresses param.Field[[]CounterpartyNewParamsLegalEntityAddress] `json:"addresses"`
+ Addresses param.Field[[]CounterpartyNewParamsLegalEntityAddress] `json:"addresses"`
+ BankSettings param.Field[BankSettingsParam] `json:"bank_settings"`
// The business's legal business name.
BusinessName param.Field[string] `json:"business_name"`
+ // The country of citizenship for an individual.
+ CitizenshipCountry param.Field[string] `json:"citizenship_country"`
// A business's formation date (YYYY-MM-DD).
DateFormed param.Field[time.Time] `json:"date_formed" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
@@ -807,10 +810,21 @@ type CounterpartyNewParamsLegalEntity struct {
LegalStructure param.Field[CounterpartyNewParamsLegalEntityLegalStructure] `json:"legal_structure"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
- Metadata param.Field[map[string]string] `json:"metadata"`
+ Metadata param.Field[map[string]string] `json:"metadata"`
+ // An individual's middle name.
+ MiddleName param.Field[string] `json:"middle_name"`
PhoneNumbers param.Field[[]CounterpartyNewParamsLegalEntityPhoneNumber] `json:"phone_numbers"`
+ // Whether the individual is a politically exposed person.
+ PoliticallyExposedPerson param.Field[bool] `json:"politically_exposed_person"`
+ // An individual's preferred name.
+ PreferredName param.Field[string] `json:"preferred_name"`
+ // An individual's prefix.
+ Prefix param.Field[string] `json:"prefix"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating param.Field[CounterpartyNewParamsLegalEntityRiskRating] `json:"risk_rating"`
+ // An individual's suffix.
+ Suffix param.Field[string] `json:"suffix"`
+ WealthAndEmploymentDetails param.Field[WealthAndEmploymentDetailsParam] `json:"wealth_and_employment_details"`
// The entity's primary website URL.
Website param.Field[string] `json:"website"`
}
@@ -956,9 +970,12 @@ func (r CounterpartyNewParamsLegalEntityLegalEntityAssociationsRelationshipType)
// The child legal entity.
type CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity struct {
// A list of addresses for the entity.
- Addresses param.Field[[]CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress] `json:"addresses"`
+ Addresses param.Field[[]CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress] `json:"addresses"`
+ BankSettings param.Field[BankSettingsParam] `json:"bank_settings"`
// The business's legal business name.
BusinessName param.Field[string] `json:"business_name"`
+ // The country of citizenship for an individual.
+ CitizenshipCountry param.Field[string] `json:"citizenship_country"`
// A business's formation date (YYYY-MM-DD).
DateFormed param.Field[time.Time] `json:"date_formed" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
@@ -978,10 +995,21 @@ type CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity str
LegalStructure param.Field[CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructure] `json:"legal_structure"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
- Metadata param.Field[map[string]string] `json:"metadata"`
+ Metadata param.Field[map[string]string] `json:"metadata"`
+ // An individual's middle name.
+ MiddleName param.Field[string] `json:"middle_name"`
PhoneNumbers param.Field[[]CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber] `json:"phone_numbers"`
+ // Whether the individual is a politically exposed person.
+ PoliticallyExposedPerson param.Field[bool] `json:"politically_exposed_person"`
+ // An individual's preferred name.
+ PreferredName param.Field[string] `json:"preferred_name"`
+ // An individual's prefix.
+ Prefix param.Field[string] `json:"prefix"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating param.Field[CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRating] `json:"risk_rating"`
+ // An individual's suffix.
+ Suffix param.Field[string] `json:"suffix"`
+ WealthAndEmploymentDetails param.Field[WealthAndEmploymentDetailsParam] `json:"wealth_and_employment_details"`
// The entity's primary website URL.
Website param.Field[string] `json:"website"`
}
diff --git a/counterparty_test.go b/counterparty_test.go
index 413ca00..7a99186 100644
--- a/counterparty_test.go
+++ b/counterparty_test.go
@@ -96,7 +96,20 @@ func TestCounterpartyNewWithOptionalParams(t *testing.T) {
AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
+ BankSettings: moderntreasury.F(moderntreasury.BankSettingsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ BackupWithholdingPercentage: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EnableBackupWithholding: moderntreasury.F(true),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ PrivacyOptOut: moderntreasury.F(true),
+ RegulationO: moderntreasury.F(true),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ }),
BusinessName: moderntreasury.F("business_name"),
+ CitizenshipCountry: moderntreasury.F("citizenship_country"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
@@ -120,7 +133,20 @@ func TestCounterpartyNewWithOptionalParams(t *testing.T) {
AddressTypes: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
+ BankSettings: moderntreasury.F(moderntreasury.BankSettingsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ BackupWithholdingPercentage: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EnableBackupWithholding: moderntreasury.F(true),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ PrivacyOptOut: moderntreasury.F(true),
+ RegulationO: moderntreasury.F(true),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ }),
BusinessName: moderntreasury.F("business_name"),
+ CitizenshipCountry: moderntreasury.F("citizenship_country"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
@@ -139,11 +165,36 @@ func TestCounterpartyNewWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
+ MiddleName: moderntreasury.F("middle_name"),
PhoneNumbers: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
}}),
- RiskRating: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
+ PoliticallyExposedPerson: moderntreasury.F(true),
+ PreferredName: moderntreasury.F("preferred_name"),
+ Prefix: moderntreasury.F("prefix"),
+ RiskRating: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow),
+ Suffix: moderntreasury.F("suffix"),
+ WealthAndEmploymentDetails: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ AnnualIncome: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EmployerCountry: moderntreasury.F("employer_country"),
+ EmployerName: moderntreasury.F("employer_name"),
+ EmployerState: moderntreasury.F("employer_state"),
+ EmploymentStatus: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsEmploymentStatusEmployed),
+ IncomeCountry: moderntreasury.F("income_country"),
+ IncomeSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIncomeSourceFamilySupport),
+ IncomeState: moderntreasury.F("income_state"),
+ Industry: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIndustryAccounting),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ Occupation: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsOccupationConsulting),
+ SourceOfFunds: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsSourceOfFundsAlimony),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ WealthSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsWealthSourceBusinessSale),
+ }),
+ Website: moderntreasury.F("website"),
}),
ChildLegalEntityID: moderntreasury.F("child_legal_entity_id"),
OwnershipPercentage: moderntreasury.F(int64(0)),
@@ -155,11 +206,36 @@ func TestCounterpartyNewWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
+ MiddleName: moderntreasury.F("middle_name"),
PhoneNumbers: moderntreasury.F([]moderntreasury.CounterpartyNewParamsLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
}}),
- RiskRating: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
+ PoliticallyExposedPerson: moderntreasury.F(true),
+ PreferredName: moderntreasury.F("preferred_name"),
+ Prefix: moderntreasury.F("prefix"),
+ RiskRating: moderntreasury.F(moderntreasury.CounterpartyNewParamsLegalEntityRiskRatingLow),
+ Suffix: moderntreasury.F("suffix"),
+ WealthAndEmploymentDetails: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ AnnualIncome: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EmployerCountry: moderntreasury.F("employer_country"),
+ EmployerName: moderntreasury.F("employer_name"),
+ EmployerState: moderntreasury.F("employer_state"),
+ EmploymentStatus: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsEmploymentStatusEmployed),
+ IncomeCountry: moderntreasury.F("income_country"),
+ IncomeSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIncomeSourceFamilySupport),
+ IncomeState: moderntreasury.F("income_state"),
+ Industry: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIndustryAccounting),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ Occupation: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsOccupationConsulting),
+ SourceOfFunds: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsSourceOfFundsAlimony),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ WealthSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsWealthSourceBusinessSale),
+ }),
+ Website: moderntreasury.F("website"),
}),
LegalEntityID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
Metadata: moderntreasury.F(map[string]string{
diff --git a/internalaccountbalancereport.go b/internalaccountbalancereport.go
index c987f21..f76587c 100644
--- a/internalaccountbalancereport.go
+++ b/internalaccountbalancereport.go
@@ -179,6 +179,10 @@ type BalanceReportBalance struct {
ID string `json:"id,required" format:"uuid"`
// The balance amount.
Amount int64 `json:"amount,required"`
+ // The date on which the balance became true for the account.
+ AsOfDate time.Time `json:"as_of_date,required,nullable" format:"date"`
+ // The time on which the balance became true for the account.
+ AsOfTime string `json:"as_of_time,required,nullable" format:"time"`
// The specific type of balance reported. One of `opening_ledger`,
// `closing_ledger`, `current_ledger`, `opening_available`,
// `opening_available_next_business_day`, `closing_available`, `current_available`,
@@ -192,6 +196,8 @@ type BalanceReportBalance struct {
LiveMode bool `json:"live_mode,required"`
Object string `json:"object,required"`
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
+ // The date on which the balance becomes available.
+ ValueDate time.Time `json:"value_date,required,nullable" format:"date"`
// The code used by the bank when reporting this specific balance.
VendorCode string `json:"vendor_code,required"`
// The type of `vendor_code` being reported. Can be one of `bai2`, `bankprov`,
@@ -207,12 +213,15 @@ type BalanceReportBalance struct {
type balanceReportBalanceJSON struct {
ID apijson.Field
Amount apijson.Field
+ AsOfDate apijson.Field
+ AsOfTime apijson.Field
BalanceType apijson.Field
CreatedAt apijson.Field
Currency apijson.Field
LiveMode apijson.Field
Object apijson.Field
UpdatedAt apijson.Field
+ ValueDate apijson.Field
VendorCode apijson.Field
VendorCodeType apijson.Field
raw string
diff --git a/ledgeraccountsettlement.go b/ledgeraccountsettlement.go
index 717a931..b3308a0 100644
--- a/ledgeraccountsettlement.go
+++ b/ledgeraccountsettlement.go
@@ -172,6 +172,7 @@ type LedgerAccountSettlementStatus string
const (
LedgerAccountSettlementStatusArchived LedgerAccountSettlementStatus = "archived"
LedgerAccountSettlementStatusArchiving LedgerAccountSettlementStatus = "archiving"
+ LedgerAccountSettlementStatusDrafting LedgerAccountSettlementStatus = "drafting"
LedgerAccountSettlementStatusPending LedgerAccountSettlementStatus = "pending"
LedgerAccountSettlementStatusPosted LedgerAccountSettlementStatus = "posted"
LedgerAccountSettlementStatusProcessing LedgerAccountSettlementStatus = "processing"
@@ -179,7 +180,7 @@ const (
func (r LedgerAccountSettlementStatus) IsKnown() bool {
switch r {
- case LedgerAccountSettlementStatusArchived, LedgerAccountSettlementStatusArchiving, LedgerAccountSettlementStatusPending, LedgerAccountSettlementStatusPosted, LedgerAccountSettlementStatusProcessing:
+ case LedgerAccountSettlementStatusArchived, LedgerAccountSettlementStatusArchiving, LedgerAccountSettlementStatusDrafting, LedgerAccountSettlementStatusPending, LedgerAccountSettlementStatusPosted, LedgerAccountSettlementStatusProcessing:
return true
}
return false
diff --git a/legalentity.go b/legalentity.go
index a75093f..ff25334 100644
--- a/legalentity.go
+++ b/legalentity.go
@@ -92,13 +92,91 @@ func (r *LegalEntityService) ListAutoPaging(ctx context.Context, query LegalEnti
return pagination.NewPageAutoPager(r.List(ctx, query, opts...))
}
+type BankSettings struct {
+ ID string `json:"id,required" format:"uuid"`
+ // The percentage of backup withholding to apply to the legal entity.
+ BackupWithholdingPercentage int64 `json:"backup_withholding_percentage,required,nullable"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ DiscardedAt time.Time `json:"discarded_at,required,nullable" format:"date-time"`
+ // Whether backup withholding is enabled. See more here -
+ // https://www.irs.gov/businesses/small-businesses-self-employed/backup-withholding.
+ EnableBackupWithholding bool `json:"enable_backup_withholding,required,nullable"`
+ // This field will be true if this object exists in the live environment or false
+ // if it exists in the test environment.
+ LiveMode bool `json:"live_mode,required"`
+ Object string `json:"object,required"`
+ // Cross River Bank specific setting to opt out of privacy policy.
+ PrivacyOptOut bool `json:"privacy_opt_out,required,nullable"`
+ // It covers, among other types of insider loans, extensions of credit by a member
+ // bank to an executive officer, director, or principal shareholder of the member
+ // bank; a bank holding company of which the member bank is a subsidiary; and any
+ // other subsidiary of that bank holding company.
+ RegulationO bool `json:"regulation_o,required,nullable"`
+ UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
+ JSON bankSettingsJSON `json:"-"`
+}
+
+// bankSettingsJSON contains the JSON metadata for the struct [BankSettings]
+type bankSettingsJSON struct {
+ ID apijson.Field
+ BackupWithholdingPercentage apijson.Field
+ CreatedAt apijson.Field
+ DiscardedAt apijson.Field
+ EnableBackupWithholding apijson.Field
+ LiveMode apijson.Field
+ Object apijson.Field
+ PrivacyOptOut apijson.Field
+ RegulationO apijson.Field
+ UpdatedAt apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *BankSettings) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r bankSettingsJSON) RawJSON() string {
+ return r.raw
+}
+
+type BankSettingsParam struct {
+ ID param.Field[string] `json:"id,required" format:"uuid"`
+ // The percentage of backup withholding to apply to the legal entity.
+ BackupWithholdingPercentage param.Field[int64] `json:"backup_withholding_percentage,required"`
+ CreatedAt param.Field[time.Time] `json:"created_at,required" format:"date-time"`
+ DiscardedAt param.Field[time.Time] `json:"discarded_at,required" format:"date-time"`
+ // Whether backup withholding is enabled. See more here -
+ // https://www.irs.gov/businesses/small-businesses-self-employed/backup-withholding.
+ EnableBackupWithholding param.Field[bool] `json:"enable_backup_withholding,required"`
+ // This field will be true if this object exists in the live environment or false
+ // if it exists in the test environment.
+ LiveMode param.Field[bool] `json:"live_mode,required"`
+ Object param.Field[string] `json:"object,required"`
+ // Cross River Bank specific setting to opt out of privacy policy.
+ PrivacyOptOut param.Field[bool] `json:"privacy_opt_out,required"`
+ // It covers, among other types of insider loans, extensions of credit by a member
+ // bank to an executive officer, director, or principal shareholder of the member
+ // bank; a bank holding company of which the member bank is a subsidiary; and any
+ // other subsidiary of that bank holding company.
+ RegulationO param.Field[bool] `json:"regulation_o,required"`
+ UpdatedAt param.Field[time.Time] `json:"updated_at,required" format:"date-time"`
+}
+
+func (r BankSettingsParam) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
type LegalEntity struct {
ID string `json:"id,required" format:"uuid"`
// A list of addresses for the entity.
- Addresses []LegalEntityAddress `json:"addresses,required"`
+ Addresses []LegalEntityAddress `json:"addresses,required"`
+ BankSettings BankSettings `json:"bank_settings,required,nullable"`
// The business's legal business name.
- BusinessName string `json:"business_name,required,nullable"`
- CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ BusinessName string `json:"business_name,required,nullable"`
+ // The country of citizenship for an individual.
+ CitizenshipCountry string `json:"citizenship_country,required,nullable"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// A business's formation date (YYYY-MM-DD).
DateFormed time.Time `json:"date_formed,required,nullable" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
@@ -124,12 +202,23 @@ type LegalEntity struct {
LiveMode bool `json:"live_mode,required"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
- Metadata map[string]string `json:"metadata,required"`
+ Metadata map[string]string `json:"metadata,required"`
+ // An individual's middle name.
+ MiddleName string `json:"middle_name,required,nullable"`
Object string `json:"object,required"`
PhoneNumbers []LegalEntityPhoneNumber `json:"phone_numbers,required"`
+ // Whether the individual is a politically exposed person.
+ PoliticallyExposedPerson bool `json:"politically_exposed_person,required,nullable"`
+ // An individual's preferred name.
+ PreferredName string `json:"preferred_name,required,nullable"`
+ // An individual's prefix.
+ Prefix string `json:"prefix,required,nullable"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating LegalEntityRiskRating `json:"risk_rating,required,nullable"`
- UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
+ // An individual's suffix.
+ Suffix string `json:"suffix,required,nullable"`
+ UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
+ WealthAndEmploymentDetails WealthAndEmploymentDetails `json:"wealth_and_employment_details,required,nullable"`
// The entity's primary website URL.
Website string `json:"website,required,nullable"`
JSON legalEntityJSON `json:"-"`
@@ -137,30 +226,38 @@ type LegalEntity struct {
// legalEntityJSON contains the JSON metadata for the struct [LegalEntity]
type legalEntityJSON struct {
- ID apijson.Field
- Addresses apijson.Field
- BusinessName apijson.Field
- CreatedAt apijson.Field
- DateFormed apijson.Field
- DateOfBirth apijson.Field
- DiscardedAt apijson.Field
- DoingBusinessAsNames apijson.Field
- Email apijson.Field
- FirstName apijson.Field
- Identifications apijson.Field
- LastName apijson.Field
- LegalEntityAssociations apijson.Field
- LegalEntityType apijson.Field
- LegalStructure apijson.Field
- LiveMode apijson.Field
- Metadata apijson.Field
- Object apijson.Field
- PhoneNumbers apijson.Field
- RiskRating apijson.Field
- UpdatedAt apijson.Field
- Website apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
+ ID apijson.Field
+ Addresses apijson.Field
+ BankSettings apijson.Field
+ BusinessName apijson.Field
+ CitizenshipCountry apijson.Field
+ CreatedAt apijson.Field
+ DateFormed apijson.Field
+ DateOfBirth apijson.Field
+ DiscardedAt apijson.Field
+ DoingBusinessAsNames apijson.Field
+ Email apijson.Field
+ FirstName apijson.Field
+ Identifications apijson.Field
+ LastName apijson.Field
+ LegalEntityAssociations apijson.Field
+ LegalEntityType apijson.Field
+ LegalStructure apijson.Field
+ LiveMode apijson.Field
+ Metadata apijson.Field
+ MiddleName apijson.Field
+ Object apijson.Field
+ PhoneNumbers apijson.Field
+ PoliticallyExposedPerson apijson.Field
+ PreferredName apijson.Field
+ Prefix apijson.Field
+ RiskRating apijson.Field
+ Suffix apijson.Field
+ UpdatedAt apijson.Field
+ WealthAndEmploymentDetails apijson.Field
+ Website apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
}
func (r *LegalEntity) UnmarshalJSON(data []byte) (err error) {
@@ -392,13 +489,293 @@ func (r LegalEntityRiskRating) IsKnown() bool {
return false
}
+type WealthAndEmploymentDetails struct {
+ ID string `json:"id,required" format:"uuid"`
+ // The annual income of the individual.
+ AnnualIncome int64 `json:"annual_income,required,nullable"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ DiscardedAt time.Time `json:"discarded_at,required,nullable" format:"date-time"`
+ // The country in which the employer is located.
+ EmployerCountry string `json:"employer_country,required,nullable"`
+ // The name of the employer.
+ EmployerName string `json:"employer_name,required,nullable"`
+ // The state in which the employer is located.
+ EmployerState string `json:"employer_state,required,nullable"`
+ // The employment status of the individual.
+ EmploymentStatus WealthAndEmploymentDetailsEmploymentStatus `json:"employment_status,required,nullable"`
+ // The country in which the individual's income is earned.
+ IncomeCountry string `json:"income_country,required,nullable"`
+ // The source of the individual's income.
+ IncomeSource WealthAndEmploymentDetailsIncomeSource `json:"income_source,required,nullable"`
+ // The state in which the individual's income is earned.
+ IncomeState string `json:"income_state,required,nullable"`
+ // The industry of the individual.
+ Industry WealthAndEmploymentDetailsIndustry `json:"industry,required,nullable"`
+ // This field will be true if this object exists in the live environment or false
+ // if it exists in the test environment.
+ LiveMode bool `json:"live_mode,required"`
+ Object string `json:"object,required"`
+ // The occupation of the individual.
+ Occupation WealthAndEmploymentDetailsOccupation `json:"occupation,required,nullable"`
+ // The source of the individual's funds.
+ SourceOfFunds WealthAndEmploymentDetailsSourceOfFunds `json:"source_of_funds,required,nullable"`
+ UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
+ // The source of the individual's wealth.
+ WealthSource WealthAndEmploymentDetailsWealthSource `json:"wealth_source,required,nullable"`
+ JSON wealthAndEmploymentDetailsJSON `json:"-"`
+}
+
+// wealthAndEmploymentDetailsJSON contains the JSON metadata for the struct
+// [WealthAndEmploymentDetails]
+type wealthAndEmploymentDetailsJSON struct {
+ ID apijson.Field
+ AnnualIncome apijson.Field
+ CreatedAt apijson.Field
+ DiscardedAt apijson.Field
+ EmployerCountry apijson.Field
+ EmployerName apijson.Field
+ EmployerState apijson.Field
+ EmploymentStatus apijson.Field
+ IncomeCountry apijson.Field
+ IncomeSource apijson.Field
+ IncomeState apijson.Field
+ Industry apijson.Field
+ LiveMode apijson.Field
+ Object apijson.Field
+ Occupation apijson.Field
+ SourceOfFunds apijson.Field
+ UpdatedAt apijson.Field
+ WealthSource apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *WealthAndEmploymentDetails) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r wealthAndEmploymentDetailsJSON) RawJSON() string {
+ return r.raw
+}
+
+// The employment status of the individual.
+type WealthAndEmploymentDetailsEmploymentStatus string
+
+const (
+ WealthAndEmploymentDetailsEmploymentStatusEmployed WealthAndEmploymentDetailsEmploymentStatus = "employed"
+ WealthAndEmploymentDetailsEmploymentStatusRetired WealthAndEmploymentDetailsEmploymentStatus = "retired"
+ WealthAndEmploymentDetailsEmploymentStatusSelfEmployed WealthAndEmploymentDetailsEmploymentStatus = "self_employed"
+ WealthAndEmploymentDetailsEmploymentStatusStudent WealthAndEmploymentDetailsEmploymentStatus = "student"
+ WealthAndEmploymentDetailsEmploymentStatusUnemployed WealthAndEmploymentDetailsEmploymentStatus = "unemployed"
+)
+
+func (r WealthAndEmploymentDetailsEmploymentStatus) IsKnown() bool {
+ switch r {
+ case WealthAndEmploymentDetailsEmploymentStatusEmployed, WealthAndEmploymentDetailsEmploymentStatusRetired, WealthAndEmploymentDetailsEmploymentStatusSelfEmployed, WealthAndEmploymentDetailsEmploymentStatusStudent, WealthAndEmploymentDetailsEmploymentStatusUnemployed:
+ return true
+ }
+ return false
+}
+
+// The source of the individual's income.
+type WealthAndEmploymentDetailsIncomeSource string
+
+const (
+ WealthAndEmploymentDetailsIncomeSourceFamilySupport WealthAndEmploymentDetailsIncomeSource = "family_support"
+ WealthAndEmploymentDetailsIncomeSourceGovernmentBenefits WealthAndEmploymentDetailsIncomeSource = "government_benefits"
+ WealthAndEmploymentDetailsIncomeSourceInheritance WealthAndEmploymentDetailsIncomeSource = "inheritance"
+ WealthAndEmploymentDetailsIncomeSourceInvestments WealthAndEmploymentDetailsIncomeSource = "investments"
+ WealthAndEmploymentDetailsIncomeSourceRentalIncome WealthAndEmploymentDetailsIncomeSource = "rental_income"
+ WealthAndEmploymentDetailsIncomeSourceRetirement WealthAndEmploymentDetailsIncomeSource = "retirement"
+ WealthAndEmploymentDetailsIncomeSourceSalary WealthAndEmploymentDetailsIncomeSource = "salary"
+ WealthAndEmploymentDetailsIncomeSourceSelfEmployed WealthAndEmploymentDetailsIncomeSource = "self_employed"
+)
+
+func (r WealthAndEmploymentDetailsIncomeSource) IsKnown() bool {
+ switch r {
+ case WealthAndEmploymentDetailsIncomeSourceFamilySupport, WealthAndEmploymentDetailsIncomeSourceGovernmentBenefits, WealthAndEmploymentDetailsIncomeSourceInheritance, WealthAndEmploymentDetailsIncomeSourceInvestments, WealthAndEmploymentDetailsIncomeSourceRentalIncome, WealthAndEmploymentDetailsIncomeSourceRetirement, WealthAndEmploymentDetailsIncomeSourceSalary, WealthAndEmploymentDetailsIncomeSourceSelfEmployed:
+ return true
+ }
+ return false
+}
+
+// The industry of the individual.
+type WealthAndEmploymentDetailsIndustry string
+
+const (
+ WealthAndEmploymentDetailsIndustryAccounting WealthAndEmploymentDetailsIndustry = "accounting"
+ WealthAndEmploymentDetailsIndustryAgriculture WealthAndEmploymentDetailsIndustry = "agriculture"
+ WealthAndEmploymentDetailsIndustryAutomotive WealthAndEmploymentDetailsIndustry = "automotive"
+ WealthAndEmploymentDetailsIndustryChemicalManufacturing WealthAndEmploymentDetailsIndustry = "chemical_manufacturing"
+ WealthAndEmploymentDetailsIndustryConstruction WealthAndEmploymentDetailsIndustry = "construction"
+ WealthAndEmploymentDetailsIndustryEducationalMedical WealthAndEmploymentDetailsIndustry = "educational_medical"
+ WealthAndEmploymentDetailsIndustryFoodService WealthAndEmploymentDetailsIndustry = "food_service"
+ WealthAndEmploymentDetailsIndustryFinance WealthAndEmploymentDetailsIndustry = "finance"
+ WealthAndEmploymentDetailsIndustryGasoline WealthAndEmploymentDetailsIndustry = "gasoline"
+ WealthAndEmploymentDetailsIndustryHealthStores WealthAndEmploymentDetailsIndustry = "health_stores"
+ WealthAndEmploymentDetailsIndustryLaundry WealthAndEmploymentDetailsIndustry = "laundry"
+ WealthAndEmploymentDetailsIndustryMaintenance WealthAndEmploymentDetailsIndustry = "maintenance"
+ WealthAndEmploymentDetailsIndustryManufacturing WealthAndEmploymentDetailsIndustry = "manufacturing"
+ WealthAndEmploymentDetailsIndustryMerchantWholesale WealthAndEmploymentDetailsIndustry = "merchant_wholesale"
+ WealthAndEmploymentDetailsIndustryMining WealthAndEmploymentDetailsIndustry = "mining"
+ WealthAndEmploymentDetailsIndustryPerformingArts WealthAndEmploymentDetailsIndustry = "performing_arts"
+ WealthAndEmploymentDetailsIndustryProfessionalNonLegal WealthAndEmploymentDetailsIndustry = "professional_non_legal"
+ WealthAndEmploymentDetailsIndustryPublicAdministration WealthAndEmploymentDetailsIndustry = "public_administration"
+ WealthAndEmploymentDetailsIndustryPublishing WealthAndEmploymentDetailsIndustry = "publishing"
+ WealthAndEmploymentDetailsIndustryRealEstate WealthAndEmploymentDetailsIndustry = "real_estate"
+ WealthAndEmploymentDetailsIndustryRecreationGambling WealthAndEmploymentDetailsIndustry = "recreation_gambling"
+ WealthAndEmploymentDetailsIndustryReligiousCharity WealthAndEmploymentDetailsIndustry = "religious_charity"
+ WealthAndEmploymentDetailsIndustryRentalServices WealthAndEmploymentDetailsIndustry = "rental_services"
+ WealthAndEmploymentDetailsIndustryRetailClothing WealthAndEmploymentDetailsIndustry = "retail_clothing"
+ WealthAndEmploymentDetailsIndustryRetailElectronics WealthAndEmploymentDetailsIndustry = "retail_electronics"
+ WealthAndEmploymentDetailsIndustryRetailFood WealthAndEmploymentDetailsIndustry = "retail_food"
+ WealthAndEmploymentDetailsIndustryRetailFurnishing WealthAndEmploymentDetailsIndustry = "retail_furnishing"
+ WealthAndEmploymentDetailsIndustryRetailHome WealthAndEmploymentDetailsIndustry = "retail_home"
+ WealthAndEmploymentDetailsIndustryRetailNonStore WealthAndEmploymentDetailsIndustry = "retail_non_store"
+ WealthAndEmploymentDetailsIndustryRetailSporting WealthAndEmploymentDetailsIndustry = "retail_sporting"
+ WealthAndEmploymentDetailsIndustryTransportation WealthAndEmploymentDetailsIndustry = "transportation"
+ WealthAndEmploymentDetailsIndustryTravel WealthAndEmploymentDetailsIndustry = "travel"
+ WealthAndEmploymentDetailsIndustryUtilities WealthAndEmploymentDetailsIndustry = "utilities"
+)
+
+func (r WealthAndEmploymentDetailsIndustry) IsKnown() bool {
+ switch r {
+ case WealthAndEmploymentDetailsIndustryAccounting, WealthAndEmploymentDetailsIndustryAgriculture, WealthAndEmploymentDetailsIndustryAutomotive, WealthAndEmploymentDetailsIndustryChemicalManufacturing, WealthAndEmploymentDetailsIndustryConstruction, WealthAndEmploymentDetailsIndustryEducationalMedical, WealthAndEmploymentDetailsIndustryFoodService, WealthAndEmploymentDetailsIndustryFinance, WealthAndEmploymentDetailsIndustryGasoline, WealthAndEmploymentDetailsIndustryHealthStores, WealthAndEmploymentDetailsIndustryLaundry, WealthAndEmploymentDetailsIndustryMaintenance, WealthAndEmploymentDetailsIndustryManufacturing, WealthAndEmploymentDetailsIndustryMerchantWholesale, WealthAndEmploymentDetailsIndustryMining, WealthAndEmploymentDetailsIndustryPerformingArts, WealthAndEmploymentDetailsIndustryProfessionalNonLegal, WealthAndEmploymentDetailsIndustryPublicAdministration, WealthAndEmploymentDetailsIndustryPublishing, WealthAndEmploymentDetailsIndustryRealEstate, WealthAndEmploymentDetailsIndustryRecreationGambling, WealthAndEmploymentDetailsIndustryReligiousCharity, WealthAndEmploymentDetailsIndustryRentalServices, WealthAndEmploymentDetailsIndustryRetailClothing, WealthAndEmploymentDetailsIndustryRetailElectronics, WealthAndEmploymentDetailsIndustryRetailFood, WealthAndEmploymentDetailsIndustryRetailFurnishing, WealthAndEmploymentDetailsIndustryRetailHome, WealthAndEmploymentDetailsIndustryRetailNonStore, WealthAndEmploymentDetailsIndustryRetailSporting, WealthAndEmploymentDetailsIndustryTransportation, WealthAndEmploymentDetailsIndustryTravel, WealthAndEmploymentDetailsIndustryUtilities:
+ return true
+ }
+ return false
+}
+
+// The occupation of the individual.
+type WealthAndEmploymentDetailsOccupation string
+
+const (
+ WealthAndEmploymentDetailsOccupationConsulting WealthAndEmploymentDetailsOccupation = "consulting"
+ WealthAndEmploymentDetailsOccupationExecutive WealthAndEmploymentDetailsOccupation = "executive"
+ WealthAndEmploymentDetailsOccupationFinanceAccounting WealthAndEmploymentDetailsOccupation = "finance_accounting"
+ WealthAndEmploymentDetailsOccupationFoodServices WealthAndEmploymentDetailsOccupation = "food_services"
+ WealthAndEmploymentDetailsOccupationGovernment WealthAndEmploymentDetailsOccupation = "government"
+ WealthAndEmploymentDetailsOccupationHealthcare WealthAndEmploymentDetailsOccupation = "healthcare"
+ WealthAndEmploymentDetailsOccupationLegalServices WealthAndEmploymentDetailsOccupation = "legal_services"
+ WealthAndEmploymentDetailsOccupationManufacturing WealthAndEmploymentDetailsOccupation = "manufacturing"
+ WealthAndEmploymentDetailsOccupationOther WealthAndEmploymentDetailsOccupation = "other"
+ WealthAndEmploymentDetailsOccupationSales WealthAndEmploymentDetailsOccupation = "sales"
+ WealthAndEmploymentDetailsOccupationScienceEngineering WealthAndEmploymentDetailsOccupation = "science_engineering"
+ WealthAndEmploymentDetailsOccupationTechnology WealthAndEmploymentDetailsOccupation = "technology"
+)
+
+func (r WealthAndEmploymentDetailsOccupation) IsKnown() bool {
+ switch r {
+ case WealthAndEmploymentDetailsOccupationConsulting, WealthAndEmploymentDetailsOccupationExecutive, WealthAndEmploymentDetailsOccupationFinanceAccounting, WealthAndEmploymentDetailsOccupationFoodServices, WealthAndEmploymentDetailsOccupationGovernment, WealthAndEmploymentDetailsOccupationHealthcare, WealthAndEmploymentDetailsOccupationLegalServices, WealthAndEmploymentDetailsOccupationManufacturing, WealthAndEmploymentDetailsOccupationOther, WealthAndEmploymentDetailsOccupationSales, WealthAndEmploymentDetailsOccupationScienceEngineering, WealthAndEmploymentDetailsOccupationTechnology:
+ return true
+ }
+ return false
+}
+
+// The source of the individual's funds.
+type WealthAndEmploymentDetailsSourceOfFunds string
+
+const (
+ WealthAndEmploymentDetailsSourceOfFundsAlimony WealthAndEmploymentDetailsSourceOfFunds = "alimony"
+ WealthAndEmploymentDetailsSourceOfFundsAnnuity WealthAndEmploymentDetailsSourceOfFunds = "annuity"
+ WealthAndEmploymentDetailsSourceOfFundsBusinessOwner WealthAndEmploymentDetailsSourceOfFunds = "business_owner"
+ WealthAndEmploymentDetailsSourceOfFundsGeneralEmployee WealthAndEmploymentDetailsSourceOfFunds = "general_employee"
+ WealthAndEmploymentDetailsSourceOfFundsGovernmentBenefits WealthAndEmploymentDetailsSourceOfFunds = "government_benefits"
+ WealthAndEmploymentDetailsSourceOfFundsHomemaker WealthAndEmploymentDetailsSourceOfFunds = "homemaker"
+ WealthAndEmploymentDetailsSourceOfFundsInheritanceGift WealthAndEmploymentDetailsSourceOfFunds = "inheritance_gift"
+ WealthAndEmploymentDetailsSourceOfFundsInvestment WealthAndEmploymentDetailsSourceOfFunds = "investment"
+ WealthAndEmploymentDetailsSourceOfFundsLegalSettlement WealthAndEmploymentDetailsSourceOfFunds = "legal_settlement"
+ WealthAndEmploymentDetailsSourceOfFundsLottery WealthAndEmploymentDetailsSourceOfFunds = "lottery"
+ WealthAndEmploymentDetailsSourceOfFundsRealEstate WealthAndEmploymentDetailsSourceOfFunds = "real_estate"
+ WealthAndEmploymentDetailsSourceOfFundsRetired WealthAndEmploymentDetailsSourceOfFunds = "retired"
+ WealthAndEmploymentDetailsSourceOfFundsRetirement WealthAndEmploymentDetailsSourceOfFunds = "retirement"
+ WealthAndEmploymentDetailsSourceOfFundsSalary WealthAndEmploymentDetailsSourceOfFunds = "salary"
+ WealthAndEmploymentDetailsSourceOfFundsSelfEmployed WealthAndEmploymentDetailsSourceOfFunds = "self_employed"
+ WealthAndEmploymentDetailsSourceOfFundsSeniorExecutive WealthAndEmploymentDetailsSourceOfFunds = "senior_executive"
+ WealthAndEmploymentDetailsSourceOfFundsTrustIncome WealthAndEmploymentDetailsSourceOfFunds = "trust_income"
+)
+
+func (r WealthAndEmploymentDetailsSourceOfFunds) IsKnown() bool {
+ switch r {
+ case WealthAndEmploymentDetailsSourceOfFundsAlimony, WealthAndEmploymentDetailsSourceOfFundsAnnuity, WealthAndEmploymentDetailsSourceOfFundsBusinessOwner, WealthAndEmploymentDetailsSourceOfFundsGeneralEmployee, WealthAndEmploymentDetailsSourceOfFundsGovernmentBenefits, WealthAndEmploymentDetailsSourceOfFundsHomemaker, WealthAndEmploymentDetailsSourceOfFundsInheritanceGift, WealthAndEmploymentDetailsSourceOfFundsInvestment, WealthAndEmploymentDetailsSourceOfFundsLegalSettlement, WealthAndEmploymentDetailsSourceOfFundsLottery, WealthAndEmploymentDetailsSourceOfFundsRealEstate, WealthAndEmploymentDetailsSourceOfFundsRetired, WealthAndEmploymentDetailsSourceOfFundsRetirement, WealthAndEmploymentDetailsSourceOfFundsSalary, WealthAndEmploymentDetailsSourceOfFundsSelfEmployed, WealthAndEmploymentDetailsSourceOfFundsSeniorExecutive, WealthAndEmploymentDetailsSourceOfFundsTrustIncome:
+ return true
+ }
+ return false
+}
+
+// The source of the individual's wealth.
+type WealthAndEmploymentDetailsWealthSource string
+
+const (
+ WealthAndEmploymentDetailsWealthSourceBusinessSale WealthAndEmploymentDetailsWealthSource = "business_sale"
+ WealthAndEmploymentDetailsWealthSourceFamilySupport WealthAndEmploymentDetailsWealthSource = "family_support"
+ WealthAndEmploymentDetailsWealthSourceGovernmentBenefits WealthAndEmploymentDetailsWealthSource = "government_benefits"
+ WealthAndEmploymentDetailsWealthSourceInheritance WealthAndEmploymentDetailsWealthSource = "inheritance"
+ WealthAndEmploymentDetailsWealthSourceInvestments WealthAndEmploymentDetailsWealthSource = "investments"
+ WealthAndEmploymentDetailsWealthSourceOther WealthAndEmploymentDetailsWealthSource = "other"
+ WealthAndEmploymentDetailsWealthSourceRentalIncome WealthAndEmploymentDetailsWealthSource = "rental_income"
+ WealthAndEmploymentDetailsWealthSourceRetirement WealthAndEmploymentDetailsWealthSource = "retirement"
+ WealthAndEmploymentDetailsWealthSourceSalary WealthAndEmploymentDetailsWealthSource = "salary"
+ WealthAndEmploymentDetailsWealthSourceSelfEmployed WealthAndEmploymentDetailsWealthSource = "self_employed"
+)
+
+func (r WealthAndEmploymentDetailsWealthSource) IsKnown() bool {
+ switch r {
+ case WealthAndEmploymentDetailsWealthSourceBusinessSale, WealthAndEmploymentDetailsWealthSourceFamilySupport, WealthAndEmploymentDetailsWealthSourceGovernmentBenefits, WealthAndEmploymentDetailsWealthSourceInheritance, WealthAndEmploymentDetailsWealthSourceInvestments, WealthAndEmploymentDetailsWealthSourceOther, WealthAndEmploymentDetailsWealthSourceRentalIncome, WealthAndEmploymentDetailsWealthSourceRetirement, WealthAndEmploymentDetailsWealthSourceSalary, WealthAndEmploymentDetailsWealthSourceSelfEmployed:
+ return true
+ }
+ return false
+}
+
+type WealthAndEmploymentDetailsParam struct {
+ ID param.Field[string] `json:"id,required" format:"uuid"`
+ // The annual income of the individual.
+ AnnualIncome param.Field[int64] `json:"annual_income,required"`
+ CreatedAt param.Field[time.Time] `json:"created_at,required" format:"date-time"`
+ DiscardedAt param.Field[time.Time] `json:"discarded_at,required" format:"date-time"`
+ // The country in which the employer is located.
+ EmployerCountry param.Field[string] `json:"employer_country,required"`
+ // The name of the employer.
+ EmployerName param.Field[string] `json:"employer_name,required"`
+ // The state in which the employer is located.
+ EmployerState param.Field[string] `json:"employer_state,required"`
+ // The employment status of the individual.
+ EmploymentStatus param.Field[WealthAndEmploymentDetailsEmploymentStatus] `json:"employment_status,required"`
+ // The country in which the individual's income is earned.
+ IncomeCountry param.Field[string] `json:"income_country,required"`
+ // The source of the individual's income.
+ IncomeSource param.Field[WealthAndEmploymentDetailsIncomeSource] `json:"income_source,required"`
+ // The state in which the individual's income is earned.
+ IncomeState param.Field[string] `json:"income_state,required"`
+ // The industry of the individual.
+ Industry param.Field[WealthAndEmploymentDetailsIndustry] `json:"industry,required"`
+ // This field will be true if this object exists in the live environment or false
+ // if it exists in the test environment.
+ LiveMode param.Field[bool] `json:"live_mode,required"`
+ Object param.Field[string] `json:"object,required"`
+ // The occupation of the individual.
+ Occupation param.Field[WealthAndEmploymentDetailsOccupation] `json:"occupation,required"`
+ // The source of the individual's funds.
+ SourceOfFunds param.Field[WealthAndEmploymentDetailsSourceOfFunds] `json:"source_of_funds,required"`
+ UpdatedAt param.Field[time.Time] `json:"updated_at,required" format:"date-time"`
+ // The source of the individual's wealth.
+ WealthSource param.Field[WealthAndEmploymentDetailsWealthSource] `json:"wealth_source,required"`
+}
+
+func (r WealthAndEmploymentDetailsParam) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
type LegalEntityNewParams struct {
// The type of legal entity.
LegalEntityType param.Field[LegalEntityNewParamsLegalEntityType] `json:"legal_entity_type,required"`
// A list of addresses for the entity.
- Addresses param.Field[[]LegalEntityNewParamsAddress] `json:"addresses"`
+ Addresses param.Field[[]LegalEntityNewParamsAddress] `json:"addresses"`
+ BankSettings param.Field[BankSettingsParam] `json:"bank_settings"`
// The business's legal business name.
BusinessName param.Field[string] `json:"business_name"`
+ // The country of citizenship for an individual.
+ CitizenshipCountry param.Field[string] `json:"citizenship_country"`
// A business's formation date (YYYY-MM-DD).
DateFormed param.Field[time.Time] `json:"date_formed" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
@@ -418,10 +795,21 @@ type LegalEntityNewParams struct {
LegalStructure param.Field[LegalEntityNewParamsLegalStructure] `json:"legal_structure"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
- Metadata param.Field[map[string]string] `json:"metadata"`
+ Metadata param.Field[map[string]string] `json:"metadata"`
+ // An individual's middle name.
+ MiddleName param.Field[string] `json:"middle_name"`
PhoneNumbers param.Field[[]LegalEntityNewParamsPhoneNumber] `json:"phone_numbers"`
+ // Whether the individual is a politically exposed person.
+ PoliticallyExposedPerson param.Field[bool] `json:"politically_exposed_person"`
+ // An individual's preferred name.
+ PreferredName param.Field[string] `json:"preferred_name"`
+ // An individual's prefix.
+ Prefix param.Field[string] `json:"prefix"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating param.Field[LegalEntityNewParamsRiskRating] `json:"risk_rating"`
+ // An individual's suffix.
+ Suffix param.Field[string] `json:"suffix"`
+ WealthAndEmploymentDetails param.Field[WealthAndEmploymentDetailsParam] `json:"wealth_and_employment_details"`
// The entity's primary website URL.
Website param.Field[string] `json:"website"`
}
@@ -567,9 +955,12 @@ func (r LegalEntityNewParamsLegalEntityAssociationsRelationshipType) IsKnown() b
// The child legal entity.
type LegalEntityNewParamsLegalEntityAssociationsChildLegalEntity struct {
// A list of addresses for the entity.
- Addresses param.Field[[]LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddress] `json:"addresses"`
+ Addresses param.Field[[]LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddress] `json:"addresses"`
+ BankSettings param.Field[BankSettingsParam] `json:"bank_settings"`
// The business's legal business name.
BusinessName param.Field[string] `json:"business_name"`
+ // The country of citizenship for an individual.
+ CitizenshipCountry param.Field[string] `json:"citizenship_country"`
// A business's formation date (YYYY-MM-DD).
DateFormed param.Field[time.Time] `json:"date_formed" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
@@ -589,10 +980,21 @@ type LegalEntityNewParamsLegalEntityAssociationsChildLegalEntity struct {
LegalStructure param.Field[LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityLegalStructure] `json:"legal_structure"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
- Metadata param.Field[map[string]string] `json:"metadata"`
+ Metadata param.Field[map[string]string] `json:"metadata"`
+ // An individual's middle name.
+ MiddleName param.Field[string] `json:"middle_name"`
PhoneNumbers param.Field[[]LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityPhoneNumber] `json:"phone_numbers"`
+ // Whether the individual is a politically exposed person.
+ PoliticallyExposedPerson param.Field[bool] `json:"politically_exposed_person"`
+ // An individual's preferred name.
+ PreferredName param.Field[string] `json:"preferred_name"`
+ // An individual's prefix.
+ Prefix param.Field[string] `json:"prefix"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating param.Field[LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityRiskRating] `json:"risk_rating"`
+ // An individual's suffix.
+ Suffix param.Field[string] `json:"suffix"`
+ WealthAndEmploymentDetails param.Field[WealthAndEmploymentDetailsParam] `json:"wealth_and_employment_details"`
// The entity's primary website URL.
Website param.Field[string] `json:"website"`
}
@@ -796,8 +1198,13 @@ func (r LegalEntityNewParamsRiskRating) IsKnown() bool {
}
type LegalEntityUpdateParams struct {
+ // A list of addresses for the entity.
+ Addresses param.Field[[]LegalEntityUpdateParamsAddress] `json:"addresses"`
+ BankSettings param.Field[BankSettingsParam] `json:"bank_settings"`
// The business's legal business name.
BusinessName param.Field[string] `json:"business_name"`
+ // The country of citizenship for an individual.
+ CitizenshipCountry param.Field[string] `json:"citizenship_country"`
// A business's formation date (YYYY-MM-DD).
DateFormed param.Field[time.Time] `json:"date_formed" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
@@ -807,16 +1214,29 @@ type LegalEntityUpdateParams struct {
Email param.Field[string] `json:"email"`
// An individual's first name.
FirstName param.Field[string] `json:"first_name"`
+ // A list of identifications for the legal entity.
+ Identifications param.Field[[]LegalEntityUpdateParamsIdentification] `json:"identifications"`
// An individual's last name.
LastName param.Field[string] `json:"last_name"`
// The business's legal structure.
LegalStructure param.Field[LegalEntityUpdateParamsLegalStructure] `json:"legal_structure"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
- Metadata param.Field[map[string]string] `json:"metadata"`
+ Metadata param.Field[map[string]string] `json:"metadata"`
+ // An individual's middle name.
+ MiddleName param.Field[string] `json:"middle_name"`
PhoneNumbers param.Field[[]LegalEntityUpdateParamsPhoneNumber] `json:"phone_numbers"`
+ // Whether the individual is a politically exposed person.
+ PoliticallyExposedPerson param.Field[bool] `json:"politically_exposed_person"`
+ // An individual's preferred name.
+ PreferredName param.Field[string] `json:"preferred_name"`
+ // An individual's prefix.
+ Prefix param.Field[string] `json:"prefix"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating param.Field[LegalEntityUpdateParamsRiskRating] `json:"risk_rating"`
+ // An individual's suffix.
+ Suffix param.Field[string] `json:"suffix"`
+ WealthAndEmploymentDetails param.Field[WealthAndEmploymentDetailsParam] `json:"wealth_and_employment_details"`
// The entity's primary website URL.
Website param.Field[string] `json:"website"`
}
@@ -825,6 +1245,92 @@ func (r LegalEntityUpdateParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
+type LegalEntityUpdateParamsAddress struct {
+ // Country code conforms to [ISO 3166-1 alpha-2]
+ Country param.Field[string] `json:"country,required"`
+ Line1 param.Field[string] `json:"line1,required"`
+ // Locality or City.
+ Locality param.Field[string] `json:"locality,required"`
+ // The postal code of the address.
+ PostalCode param.Field[string] `json:"postal_code,required"`
+ // Region or State.
+ Region param.Field[string] `json:"region,required"`
+ // The types of this address.
+ AddressTypes param.Field[[]LegalEntityUpdateParamsAddressesAddressType] `json:"address_types"`
+ Line2 param.Field[string] `json:"line2"`
+}
+
+func (r LegalEntityUpdateParamsAddress) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type LegalEntityUpdateParamsAddressesAddressType string
+
+const (
+ LegalEntityUpdateParamsAddressesAddressTypeBusiness LegalEntityUpdateParamsAddressesAddressType = "business"
+ LegalEntityUpdateParamsAddressesAddressTypeMailing LegalEntityUpdateParamsAddressesAddressType = "mailing"
+ LegalEntityUpdateParamsAddressesAddressTypeOther LegalEntityUpdateParamsAddressesAddressType = "other"
+ LegalEntityUpdateParamsAddressesAddressTypePoBox LegalEntityUpdateParamsAddressesAddressType = "po_box"
+ LegalEntityUpdateParamsAddressesAddressTypeResidential LegalEntityUpdateParamsAddressesAddressType = "residential"
+)
+
+func (r LegalEntityUpdateParamsAddressesAddressType) IsKnown() bool {
+ switch r {
+ case LegalEntityUpdateParamsAddressesAddressTypeBusiness, LegalEntityUpdateParamsAddressesAddressTypeMailing, LegalEntityUpdateParamsAddressesAddressTypeOther, LegalEntityUpdateParamsAddressesAddressTypePoBox, LegalEntityUpdateParamsAddressesAddressTypeResidential:
+ return true
+ }
+ return false
+}
+
+type LegalEntityUpdateParamsIdentification struct {
+ // The ID number of identification document.
+ IDNumber param.Field[string] `json:"id_number,required"`
+ // The type of ID number.
+ IDType param.Field[LegalEntityUpdateParamsIdentificationsIDType] `json:"id_type,required"`
+ // The ISO 3166-1 alpha-2 country code of the country that issued the
+ // identification
+ IssuingCountry param.Field[string] `json:"issuing_country"`
+}
+
+func (r LegalEntityUpdateParamsIdentification) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+// The type of ID number.
+type LegalEntityUpdateParamsIdentificationsIDType string
+
+const (
+ LegalEntityUpdateParamsIdentificationsIDTypeArCuil LegalEntityUpdateParamsIdentificationsIDType = "ar_cuil"
+ LegalEntityUpdateParamsIdentificationsIDTypeArCuit LegalEntityUpdateParamsIdentificationsIDType = "ar_cuit"
+ LegalEntityUpdateParamsIdentificationsIDTypeBrCnpj LegalEntityUpdateParamsIdentificationsIDType = "br_cnpj"
+ LegalEntityUpdateParamsIdentificationsIDTypeBrCpf LegalEntityUpdateParamsIdentificationsIDType = "br_cpf"
+ LegalEntityUpdateParamsIdentificationsIDTypeClRun LegalEntityUpdateParamsIdentificationsIDType = "cl_run"
+ LegalEntityUpdateParamsIdentificationsIDTypeClRut LegalEntityUpdateParamsIdentificationsIDType = "cl_rut"
+ LegalEntityUpdateParamsIdentificationsIDTypeCoCedulas LegalEntityUpdateParamsIdentificationsIDType = "co_cedulas"
+ LegalEntityUpdateParamsIdentificationsIDTypeCoNit LegalEntityUpdateParamsIdentificationsIDType = "co_nit"
+ LegalEntityUpdateParamsIdentificationsIDTypeHnID LegalEntityUpdateParamsIdentificationsIDType = "hn_id"
+ LegalEntityUpdateParamsIdentificationsIDTypeHnRtn LegalEntityUpdateParamsIdentificationsIDType = "hn_rtn"
+ LegalEntityUpdateParamsIdentificationsIDTypeInLei LegalEntityUpdateParamsIdentificationsIDType = "in_lei"
+ LegalEntityUpdateParamsIdentificationsIDTypeKrBrn LegalEntityUpdateParamsIdentificationsIDType = "kr_brn"
+ LegalEntityUpdateParamsIdentificationsIDTypeKrCrn LegalEntityUpdateParamsIdentificationsIDType = "kr_crn"
+ LegalEntityUpdateParamsIdentificationsIDTypeKrRrn LegalEntityUpdateParamsIdentificationsIDType = "kr_rrn"
+ LegalEntityUpdateParamsIdentificationsIDTypePassport LegalEntityUpdateParamsIdentificationsIDType = "passport"
+ LegalEntityUpdateParamsIdentificationsIDTypeSaTin LegalEntityUpdateParamsIdentificationsIDType = "sa_tin"
+ LegalEntityUpdateParamsIdentificationsIDTypeSaVat LegalEntityUpdateParamsIdentificationsIDType = "sa_vat"
+ LegalEntityUpdateParamsIdentificationsIDTypeUsEin LegalEntityUpdateParamsIdentificationsIDType = "us_ein"
+ LegalEntityUpdateParamsIdentificationsIDTypeUsItin LegalEntityUpdateParamsIdentificationsIDType = "us_itin"
+ LegalEntityUpdateParamsIdentificationsIDTypeUsSsn LegalEntityUpdateParamsIdentificationsIDType = "us_ssn"
+ LegalEntityUpdateParamsIdentificationsIDTypeVnTin LegalEntityUpdateParamsIdentificationsIDType = "vn_tin"
+)
+
+func (r LegalEntityUpdateParamsIdentificationsIDType) IsKnown() bool {
+ switch r {
+ case LegalEntityUpdateParamsIdentificationsIDTypeArCuil, LegalEntityUpdateParamsIdentificationsIDTypeArCuit, LegalEntityUpdateParamsIdentificationsIDTypeBrCnpj, LegalEntityUpdateParamsIdentificationsIDTypeBrCpf, LegalEntityUpdateParamsIdentificationsIDTypeClRun, LegalEntityUpdateParamsIdentificationsIDTypeClRut, LegalEntityUpdateParamsIdentificationsIDTypeCoCedulas, LegalEntityUpdateParamsIdentificationsIDTypeCoNit, LegalEntityUpdateParamsIdentificationsIDTypeHnID, LegalEntityUpdateParamsIdentificationsIDTypeHnRtn, LegalEntityUpdateParamsIdentificationsIDTypeInLei, LegalEntityUpdateParamsIdentificationsIDTypeKrBrn, LegalEntityUpdateParamsIdentificationsIDTypeKrCrn, LegalEntityUpdateParamsIdentificationsIDTypeKrRrn, LegalEntityUpdateParamsIdentificationsIDTypePassport, LegalEntityUpdateParamsIdentificationsIDTypeSaTin, LegalEntityUpdateParamsIdentificationsIDTypeSaVat, LegalEntityUpdateParamsIdentificationsIDTypeUsEin, LegalEntityUpdateParamsIdentificationsIDTypeUsItin, LegalEntityUpdateParamsIdentificationsIDTypeUsSsn, LegalEntityUpdateParamsIdentificationsIDTypeVnTin:
+ return true
+ }
+ return false
+}
+
// The business's legal structure.
type LegalEntityUpdateParamsLegalStructure string
diff --git a/legalentity_test.go b/legalentity_test.go
index 439deac..14cb09f 100644
--- a/legalentity_test.go
+++ b/legalentity_test.go
@@ -38,7 +38,20 @@ func TestLegalEntityNewWithOptionalParams(t *testing.T) {
AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsAddressesAddressType{moderntreasury.LegalEntityNewParamsAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
+ BankSettings: moderntreasury.F(moderntreasury.BankSettingsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ BackupWithholdingPercentage: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EnableBackupWithholding: moderntreasury.F(true),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ PrivacyOptOut: moderntreasury.F(true),
+ RegulationO: moderntreasury.F(true),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ }),
BusinessName: moderntreasury.F("business_name"),
+ CitizenshipCountry: moderntreasury.F("citizenship_country"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
@@ -62,7 +75,20 @@ func TestLegalEntityNewWithOptionalParams(t *testing.T) {
AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
+ BankSettings: moderntreasury.F(moderntreasury.BankSettingsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ BackupWithholdingPercentage: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EnableBackupWithholding: moderntreasury.F(true),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ PrivacyOptOut: moderntreasury.F(true),
+ RegulationO: moderntreasury.F(true),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ }),
BusinessName: moderntreasury.F("business_name"),
+ CitizenshipCountry: moderntreasury.F("citizenship_country"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
@@ -81,11 +107,36 @@ func TestLegalEntityNewWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
+ MiddleName: moderntreasury.F("middle_name"),
PhoneNumbers: moderntreasury.F([]moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
}}),
- RiskRating: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
+ PoliticallyExposedPerson: moderntreasury.F(true),
+ PreferredName: moderntreasury.F("preferred_name"),
+ Prefix: moderntreasury.F("prefix"),
+ RiskRating: moderntreasury.F(moderntreasury.LegalEntityNewParamsLegalEntityAssociationsChildLegalEntityRiskRatingLow),
+ Suffix: moderntreasury.F("suffix"),
+ WealthAndEmploymentDetails: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ AnnualIncome: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EmployerCountry: moderntreasury.F("employer_country"),
+ EmployerName: moderntreasury.F("employer_name"),
+ EmployerState: moderntreasury.F("employer_state"),
+ EmploymentStatus: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsEmploymentStatusEmployed),
+ IncomeCountry: moderntreasury.F("income_country"),
+ IncomeSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIncomeSourceFamilySupport),
+ IncomeState: moderntreasury.F("income_state"),
+ Industry: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIndustryAccounting),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ Occupation: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsOccupationConsulting),
+ SourceOfFunds: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsSourceOfFundsAlimony),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ WealthSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsWealthSourceBusinessSale),
+ }),
+ Website: moderntreasury.F("website"),
}),
ChildLegalEntityID: moderntreasury.F("child_legal_entity_id"),
OwnershipPercentage: moderntreasury.F(int64(0)),
@@ -97,11 +148,36 @@ func TestLegalEntityNewWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
+ MiddleName: moderntreasury.F("middle_name"),
PhoneNumbers: moderntreasury.F([]moderntreasury.LegalEntityNewParamsPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
}}),
- RiskRating: moderntreasury.F(moderntreasury.LegalEntityNewParamsRiskRatingLow),
- Website: moderntreasury.F("website"),
+ PoliticallyExposedPerson: moderntreasury.F(true),
+ PreferredName: moderntreasury.F("preferred_name"),
+ Prefix: moderntreasury.F("prefix"),
+ RiskRating: moderntreasury.F(moderntreasury.LegalEntityNewParamsRiskRatingLow),
+ Suffix: moderntreasury.F("suffix"),
+ WealthAndEmploymentDetails: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ AnnualIncome: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EmployerCountry: moderntreasury.F("employer_country"),
+ EmployerName: moderntreasury.F("employer_name"),
+ EmployerState: moderntreasury.F("employer_state"),
+ EmploymentStatus: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsEmploymentStatusEmployed),
+ IncomeCountry: moderntreasury.F("income_country"),
+ IncomeSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIncomeSourceFamilySupport),
+ IncomeState: moderntreasury.F("income_state"),
+ Industry: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIndustryAccounting),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ Occupation: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsOccupationConsulting),
+ SourceOfFunds: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsSourceOfFundsAlimony),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ WealthSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsWealthSourceBusinessSale),
+ }),
+ Website: moderntreasury.F("website"),
})
if err != nil {
var apierr *moderntreasury.Error
@@ -152,24 +228,76 @@ func TestLegalEntityUpdateWithOptionalParams(t *testing.T) {
context.TODO(),
"id",
moderntreasury.LegalEntityUpdateParams{
+ Addresses: moderntreasury.F([]moderntreasury.LegalEntityUpdateParamsAddress{{
+ Country: moderntreasury.F("country"),
+ Line1: moderntreasury.F("line1"),
+ Locality: moderntreasury.F("locality"),
+ PostalCode: moderntreasury.F("postal_code"),
+ Region: moderntreasury.F("region"),
+ AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityUpdateParamsAddressesAddressType{moderntreasury.LegalEntityUpdateParamsAddressesAddressTypeBusiness}),
+ Line2: moderntreasury.F("line2"),
+ }}),
+ BankSettings: moderntreasury.F(moderntreasury.BankSettingsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ BackupWithholdingPercentage: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EnableBackupWithholding: moderntreasury.F(true),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ PrivacyOptOut: moderntreasury.F(true),
+ RegulationO: moderntreasury.F(true),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ }),
BusinessName: moderntreasury.F("business_name"),
+ CitizenshipCountry: moderntreasury.F("citizenship_country"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
Email: moderntreasury.F("email"),
FirstName: moderntreasury.F("first_name"),
- LastName: moderntreasury.F("last_name"),
- LegalStructure: moderntreasury.F(moderntreasury.LegalEntityUpdateParamsLegalStructureCorporation),
+ Identifications: moderntreasury.F([]moderntreasury.LegalEntityUpdateParamsIdentification{{
+ IDNumber: moderntreasury.F("id_number"),
+ IDType: moderntreasury.F(moderntreasury.LegalEntityUpdateParamsIdentificationsIDTypeArCuil),
+ IssuingCountry: moderntreasury.F("issuing_country"),
+ }}),
+ LastName: moderntreasury.F("last_name"),
+ LegalStructure: moderntreasury.F(moderntreasury.LegalEntityUpdateParamsLegalStructureCorporation),
Metadata: moderntreasury.F(map[string]string{
"key": "value",
"foo": "bar",
"modern": "treasury",
}),
+ MiddleName: moderntreasury.F("middle_name"),
PhoneNumbers: moderntreasury.F([]moderntreasury.LegalEntityUpdateParamsPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
}}),
- RiskRating: moderntreasury.F(moderntreasury.LegalEntityUpdateParamsRiskRatingLow),
- Website: moderntreasury.F("website"),
+ PoliticallyExposedPerson: moderntreasury.F(true),
+ PreferredName: moderntreasury.F("preferred_name"),
+ Prefix: moderntreasury.F("prefix"),
+ RiskRating: moderntreasury.F(moderntreasury.LegalEntityUpdateParamsRiskRatingLow),
+ Suffix: moderntreasury.F("suffix"),
+ WealthAndEmploymentDetails: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ AnnualIncome: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EmployerCountry: moderntreasury.F("employer_country"),
+ EmployerName: moderntreasury.F("employer_name"),
+ EmployerState: moderntreasury.F("employer_state"),
+ EmploymentStatus: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsEmploymentStatusEmployed),
+ IncomeCountry: moderntreasury.F("income_country"),
+ IncomeSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIncomeSourceFamilySupport),
+ IncomeState: moderntreasury.F("income_state"),
+ Industry: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIndustryAccounting),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ Occupation: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsOccupationConsulting),
+ SourceOfFunds: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsSourceOfFundsAlimony),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ WealthSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsWealthSourceBusinessSale),
+ }),
+ Website: moderntreasury.F("website"),
},
)
if err != nil {
diff --git a/legalentityassociation.go b/legalentityassociation.go
index 61f56de..43d7817 100644
--- a/legalentityassociation.go
+++ b/legalentityassociation.go
@@ -92,10 +92,13 @@ func (r legalEntityAssociationJSON) RawJSON() string {
type LegalEntityAssociationChildLegalEntity struct {
ID string `json:"id,required" format:"uuid"`
// A list of addresses for the entity.
- Addresses []LegalEntityAssociationChildLegalEntityAddress `json:"addresses,required"`
+ Addresses []LegalEntityAssociationChildLegalEntityAddress `json:"addresses,required"`
+ BankSettings BankSettings `json:"bank_settings,required,nullable"`
// The business's legal business name.
- BusinessName string `json:"business_name,required,nullable"`
- CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ BusinessName string `json:"business_name,required,nullable"`
+ // The country of citizenship for an individual.
+ CitizenshipCountry string `json:"citizenship_country,required,nullable"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// A business's formation date (YYYY-MM-DD).
DateFormed time.Time `json:"date_formed,required,nullable" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
@@ -119,12 +122,23 @@ type LegalEntityAssociationChildLegalEntity struct {
LiveMode bool `json:"live_mode,required"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
- Metadata map[string]string `json:"metadata,required"`
+ Metadata map[string]string `json:"metadata,required"`
+ // An individual's middle name.
+ MiddleName string `json:"middle_name,required,nullable"`
Object string `json:"object,required"`
PhoneNumbers []LegalEntityAssociationChildLegalEntityPhoneNumber `json:"phone_numbers,required"`
+ // Whether the individual is a politically exposed person.
+ PoliticallyExposedPerson bool `json:"politically_exposed_person,required,nullable"`
+ // An individual's preferred name.
+ PreferredName string `json:"preferred_name,required,nullable"`
+ // An individual's prefix.
+ Prefix string `json:"prefix,required,nullable"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating LegalEntityAssociationChildLegalEntityRiskRating `json:"risk_rating,required,nullable"`
- UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
+ // An individual's suffix.
+ Suffix string `json:"suffix,required,nullable"`
+ UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
+ WealthAndEmploymentDetails WealthAndEmploymentDetails `json:"wealth_and_employment_details,required,nullable"`
// The entity's primary website URL.
Website string `json:"website,required,nullable"`
JSON legalEntityAssociationChildLegalEntityJSON `json:"-"`
@@ -133,29 +147,37 @@ type LegalEntityAssociationChildLegalEntity struct {
// legalEntityAssociationChildLegalEntityJSON contains the JSON metadata for the
// struct [LegalEntityAssociationChildLegalEntity]
type legalEntityAssociationChildLegalEntityJSON struct {
- ID apijson.Field
- Addresses apijson.Field
- BusinessName apijson.Field
- CreatedAt apijson.Field
- DateFormed apijson.Field
- DateOfBirth apijson.Field
- DiscardedAt apijson.Field
- DoingBusinessAsNames apijson.Field
- Email apijson.Field
- FirstName apijson.Field
- Identifications apijson.Field
- LastName apijson.Field
- LegalEntityType apijson.Field
- LegalStructure apijson.Field
- LiveMode apijson.Field
- Metadata apijson.Field
- Object apijson.Field
- PhoneNumbers apijson.Field
- RiskRating apijson.Field
- UpdatedAt apijson.Field
- Website apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
+ ID apijson.Field
+ Addresses apijson.Field
+ BankSettings apijson.Field
+ BusinessName apijson.Field
+ CitizenshipCountry apijson.Field
+ CreatedAt apijson.Field
+ DateFormed apijson.Field
+ DateOfBirth apijson.Field
+ DiscardedAt apijson.Field
+ DoingBusinessAsNames apijson.Field
+ Email apijson.Field
+ FirstName apijson.Field
+ Identifications apijson.Field
+ LastName apijson.Field
+ LegalEntityType apijson.Field
+ LegalStructure apijson.Field
+ LiveMode apijson.Field
+ Metadata apijson.Field
+ MiddleName apijson.Field
+ Object apijson.Field
+ PhoneNumbers apijson.Field
+ PoliticallyExposedPerson apijson.Field
+ PreferredName apijson.Field
+ Prefix apijson.Field
+ RiskRating apijson.Field
+ Suffix apijson.Field
+ UpdatedAt apijson.Field
+ WealthAndEmploymentDetails apijson.Field
+ Website apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
}
func (r *LegalEntityAssociationChildLegalEntity) UnmarshalJSON(data []byte) (err error) {
@@ -441,9 +463,12 @@ func (r LegalEntityAssociationNewParamsRelationshipType) IsKnown() bool {
// The child legal entity.
type LegalEntityAssociationNewParamsChildLegalEntity struct {
// A list of addresses for the entity.
- Addresses param.Field[[]LegalEntityAssociationNewParamsChildLegalEntityAddress] `json:"addresses"`
+ Addresses param.Field[[]LegalEntityAssociationNewParamsChildLegalEntityAddress] `json:"addresses"`
+ BankSettings param.Field[BankSettingsParam] `json:"bank_settings"`
// The business's legal business name.
BusinessName param.Field[string] `json:"business_name"`
+ // The country of citizenship for an individual.
+ CitizenshipCountry param.Field[string] `json:"citizenship_country"`
// A business's formation date (YYYY-MM-DD).
DateFormed param.Field[time.Time] `json:"date_formed" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
@@ -463,10 +488,21 @@ type LegalEntityAssociationNewParamsChildLegalEntity struct {
LegalStructure param.Field[LegalEntityAssociationNewParamsChildLegalEntityLegalStructure] `json:"legal_structure"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
- Metadata param.Field[map[string]string] `json:"metadata"`
+ Metadata param.Field[map[string]string] `json:"metadata"`
+ // An individual's middle name.
+ MiddleName param.Field[string] `json:"middle_name"`
PhoneNumbers param.Field[[]LegalEntityAssociationNewParamsChildLegalEntityPhoneNumber] `json:"phone_numbers"`
+ // Whether the individual is a politically exposed person.
+ PoliticallyExposedPerson param.Field[bool] `json:"politically_exposed_person"`
+ // An individual's preferred name.
+ PreferredName param.Field[string] `json:"preferred_name"`
+ // An individual's prefix.
+ Prefix param.Field[string] `json:"prefix"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating param.Field[LegalEntityAssociationNewParamsChildLegalEntityRiskRating] `json:"risk_rating"`
+ // An individual's suffix.
+ Suffix param.Field[string] `json:"suffix"`
+ WealthAndEmploymentDetails param.Field[WealthAndEmploymentDetailsParam] `json:"wealth_and_employment_details"`
// The entity's primary website URL.
Website param.Field[string] `json:"website"`
}
diff --git a/legalentityassociation_test.go b/legalentityassociation_test.go
index 453f738..5370b31 100644
--- a/legalentityassociation_test.go
+++ b/legalentityassociation_test.go
@@ -40,7 +40,20 @@ func TestLegalEntityAssociationNewWithOptionalParams(t *testing.T) {
AddressTypes: moderntreasury.F([]moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressType{moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityAddressesAddressTypeBusiness}),
Line2: moderntreasury.F("line2"),
}}),
+ BankSettings: moderntreasury.F(moderntreasury.BankSettingsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ BackupWithholdingPercentage: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EnableBackupWithholding: moderntreasury.F(true),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ PrivacyOptOut: moderntreasury.F(true),
+ RegulationO: moderntreasury.F(true),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ }),
BusinessName: moderntreasury.F("business_name"),
+ CitizenshipCountry: moderntreasury.F("citizenship_country"),
DateFormed: moderntreasury.F(time.Now()),
DateOfBirth: moderntreasury.F(time.Now()),
DoingBusinessAsNames: moderntreasury.F([]string{"string"}),
@@ -59,11 +72,36 @@ func TestLegalEntityAssociationNewWithOptionalParams(t *testing.T) {
"foo": "bar",
"modern": "treasury",
}),
+ MiddleName: moderntreasury.F("middle_name"),
PhoneNumbers: moderntreasury.F([]moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityPhoneNumber{{
PhoneNumber: moderntreasury.F("phone_number"),
}}),
- RiskRating: moderntreasury.F(moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityRiskRatingLow),
- Website: moderntreasury.F("website"),
+ PoliticallyExposedPerson: moderntreasury.F(true),
+ PreferredName: moderntreasury.F("preferred_name"),
+ Prefix: moderntreasury.F("prefix"),
+ RiskRating: moderntreasury.F(moderntreasury.LegalEntityAssociationNewParamsChildLegalEntityRiskRatingLow),
+ Suffix: moderntreasury.F("suffix"),
+ WealthAndEmploymentDetails: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsParam{
+ ID: moderntreasury.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ AnnualIncome: moderntreasury.F(int64(0)),
+ CreatedAt: moderntreasury.F(time.Now()),
+ DiscardedAt: moderntreasury.F(time.Now()),
+ EmployerCountry: moderntreasury.F("employer_country"),
+ EmployerName: moderntreasury.F("employer_name"),
+ EmployerState: moderntreasury.F("employer_state"),
+ EmploymentStatus: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsEmploymentStatusEmployed),
+ IncomeCountry: moderntreasury.F("income_country"),
+ IncomeSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIncomeSourceFamilySupport),
+ IncomeState: moderntreasury.F("income_state"),
+ Industry: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsIndustryAccounting),
+ LiveMode: moderntreasury.F(true),
+ Object: moderntreasury.F("object"),
+ Occupation: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsOccupationConsulting),
+ SourceOfFunds: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsSourceOfFundsAlimony),
+ UpdatedAt: moderntreasury.F(time.Now()),
+ WealthSource: moderntreasury.F(moderntreasury.WealthAndEmploymentDetailsWealthSourceBusinessSale),
+ }),
+ Website: moderntreasury.F("website"),
}),
ChildLegalEntityID: moderntreasury.F("child_legal_entity_id"),
OwnershipPercentage: moderntreasury.F(int64(0)),
diff --git a/validation.go b/validation.go
index bfba70f..1af56b0 100644
--- a/validation.go
+++ b/validation.go
@@ -136,12 +136,11 @@ const (
RoutingNumberLookupRequestRoutingNumberTypeNzNationalClearingCode RoutingNumberLookupRequestRoutingNumberType = "nz_national_clearing_code"
RoutingNumberLookupRequestRoutingNumberTypeSeBankgiroClearingCode RoutingNumberLookupRequestRoutingNumberType = "se_bankgiro_clearing_code"
RoutingNumberLookupRequestRoutingNumberTypeSwift RoutingNumberLookupRequestRoutingNumberType = "swift"
- RoutingNumberLookupRequestRoutingNumberTypeZaNationalClearingCode RoutingNumberLookupRequestRoutingNumberType = "za_national_clearing_code"
)
func (r RoutingNumberLookupRequestRoutingNumberType) IsKnown() bool {
switch r {
- case RoutingNumberLookupRequestRoutingNumberTypeAba, RoutingNumberLookupRequestRoutingNumberTypeAuBsb, RoutingNumberLookupRequestRoutingNumberTypeCaCpa, RoutingNumberLookupRequestRoutingNumberTypeGBSortCode, RoutingNumberLookupRequestRoutingNumberTypeInIfsc, RoutingNumberLookupRequestRoutingNumberTypeNzNationalClearingCode, RoutingNumberLookupRequestRoutingNumberTypeSeBankgiroClearingCode, RoutingNumberLookupRequestRoutingNumberTypeSwift, RoutingNumberLookupRequestRoutingNumberTypeZaNationalClearingCode:
+ case RoutingNumberLookupRequestRoutingNumberTypeAba, RoutingNumberLookupRequestRoutingNumberTypeAuBsb, RoutingNumberLookupRequestRoutingNumberTypeCaCpa, RoutingNumberLookupRequestRoutingNumberTypeGBSortCode, RoutingNumberLookupRequestRoutingNumberTypeInIfsc, RoutingNumberLookupRequestRoutingNumberTypeNzNationalClearingCode, RoutingNumberLookupRequestRoutingNumberTypeSeBankgiroClearingCode, RoutingNumberLookupRequestRoutingNumberTypeSwift:
return true
}
return false
From 7b6557d35f239a3faf18f98d7ecadaef1e489615 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 25 Nov 2024 17:30:28 +0000
Subject: [PATCH 3/4] chore: sync openapi spec (#293)
---
.stats.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.stats.yml b/.stats.yml
index 43e1c5a..7c575dc 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
configured_endpoints: 158
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury-4b51a7bbe353febe7c65957669c6e3b881999250e0b35033a8b39e90e9c9425a.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury-d9dd2a4af66300f520a77524c0062719e35fe8eec09019d45142030cf740846f.yml
From c36836dcab0f0e981b9b93986a54217d24d1c8fc Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 25 Nov 2024 17:30:46 +0000
Subject: [PATCH 4/4] release: 2.20.4
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 10 ++++++++++
README.md | 2 +-
internal/version.go | 2 +-
4 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index e4e7bc0..654add3 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "2.20.3"
+ ".": "2.20.4"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0328f70..8356111 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,15 @@
# Changelog
+## 2.20.4 (2024-11-25)
+
+Full Changelog: [v2.20.3...v2.20.4](https://github.com/Modern-Treasury/modern-treasury-go/compare/v2.20.3...v2.20.4)
+
+### Chores
+
+* **api:** additional fields for requests to get BalanceReports and create LegalEntities ([#292](https://github.com/Modern-Treasury/modern-treasury-go/issues/292)) ([579f935](https://github.com/Modern-Treasury/modern-treasury-go/commit/579f935cba1451233b1112e266e0ce6f47b83e8e))
+* sync openapi spec ([#293](https://github.com/Modern-Treasury/modern-treasury-go/issues/293)) ([7b6557d](https://github.com/Modern-Treasury/modern-treasury-go/commit/7b6557d35f239a3faf18f98d7ecadaef1e489615))
+* **tests:** limit array example length ([#290](https://github.com/Modern-Treasury/modern-treasury-go/issues/290)) ([eb2208c](https://github.com/Modern-Treasury/modern-treasury-go/commit/eb2208cd5de0f0463da3e84f54f6325141096a9e))
+
## 2.20.3 (2024-11-11)
Full Changelog: [v2.20.2...v2.20.3](https://github.com/Modern-Treasury/modern-treasury-go/compare/v2.20.2...v2.20.3)
diff --git a/README.md b/README.md
index 31a435c..86b9ceb 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ Or to pin the version:
```sh
-go get -u 'github.com/Modern-Treasury/modern-treasury-go/v2@v2.20.3'
+go get -u 'github.com/Modern-Treasury/modern-treasury-go/v2@v2.20.4'
```
diff --git a/internal/version.go b/internal/version.go
index e3ef5d1..c89fed7 100644
--- a/internal/version.go
+++ b/internal/version.go
@@ -2,4 +2,4 @@
package internal
-const PackageVersion = "2.20.3" // x-release-please-version
+const PackageVersion = "2.20.4" // x-release-please-version