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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 239
openapi_spec_hash: 49d468466a752f8ea72af00d00683f50
openapi_spec_hash: 0d9af58b9c33faa782f0c6a43a00b799
config_hash: 1ca082e374ef7000e2a5971e8da740e0
3 changes: 3 additions & 0 deletions carddispute.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ func (r *CardDisputeService) Withdraw(ctx context.Context, cardDisputeID string,
type CardDispute struct {
// The Card Dispute identifier.
ID string `json:"id" api:"required"`
// The Account that the Card Dispute is associated with.
AccountID string `json:"account_id" api:"required"`
// The amount of the dispute.
Amount int64 `json:"amount" api:"required"`
// The Card that the Card Dispute is associated with.
Expand Down Expand Up @@ -157,6 +159,7 @@ type CardDispute struct {
// cardDisputeJSON contains the JSON metadata for the struct [CardDispute]
type cardDisputeJSON struct {
ID apijson.Field
AccountID apijson.Field
Amount apijson.Field
CardID apijson.Field
CreatedAt apijson.Field
Expand Down
3 changes: 3 additions & 0 deletions cardpurchasesupplement.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ func (r *CardPurchaseSupplementService) ListAutoPaging(ctx context.Context, quer
type CardPurchaseSupplement struct {
// The Card Purchase Supplement identifier.
ID string `json:"id" api:"required"`
// The identifier for the Account the Card Purchase Supplement belongs to.
AccountID string `json:"account_id" api:"required"`
// The ID of the Card Payment this transaction belongs to.
CardPaymentID string `json:"card_payment_id" api:"required,nullable"`
// Invoice-level information about the payment.
Expand All @@ -99,6 +101,7 @@ type CardPurchaseSupplement struct {
// [CardPurchaseSupplement]
type cardPurchaseSupplementJSON struct {
ID apijson.Field
AccountID apijson.Field
CardPaymentID apijson.Field
Invoice apijson.Field
LineItems apijson.Field
Expand Down
10 changes: 5 additions & 5 deletions checkdeposit.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ type CheckDeposit struct {
// If your deposit is returned, this will contain details as to why it was
// returned.
DepositReturn CheckDepositDepositReturn `json:"deposit_return" api:"required,nullable"`
// After the check is parsed, it is submitted to the Check21 network for
// After the check is parsed, it is submitted to the Check 21 network for
// processing. This will contain details of the submission.
DepositSubmission CheckDepositDepositSubmission `json:"deposit_submission" api:"required,nullable"`
// The description of the Check Deposit, for display purposes only.
Expand Down Expand Up @@ -470,16 +470,16 @@ func (r CheckDepositDepositReturnReturnReason) IsKnown() bool {
return false
}

// After the check is parsed, it is submitted to the Check21 network for
// After the check is parsed, it is submitted to the Check 21 network for
// processing. This will contain details of the submission.
type CheckDepositDepositSubmission struct {
// The ID for the File containing the check back image that was submitted to the
// Check21 network.
// Check 21 network.
BackFileID string `json:"back_file_id" api:"required"`
// The ID for the File containing the check front image that was submitted to the
// Check21 network.
// Check 21 network.
FrontFileID string `json:"front_file_id" api:"required"`
// When the check deposit was submitted to the Check21 network for processing.
// When the check deposit was submitted to the Check 21 network for processing.
// During business days, this happens within a few hours of the check being
// accepted by Increase.
SubmittedAt time.Time `json:"submitted_at" api:"required" format:"date-time"`
Expand Down
4 changes: 3 additions & 1 deletion checktransfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,9 @@ type CheckTransferNewParamsPhysicalCheck struct {
// `purpose: check_voucher_image`. For details on pricing and restrictions, see
// https://increase.com/documentation/originating-checks#printing-checks .
CheckVoucherImageFileID param.Field[string] `json:"check_voucher_image_file_id"`
// The descriptor that will be printed on the letter included with the check.
// A few paragraphs of text printed on the letter included with the check. It can
// contain at most 22 lines. Paragraphs will wrap at about 120 characters, but
// depending on your exact message, it might be slightly more or slightly less.
Note param.Field[string] `json:"note"`
// The identifier of the Physical Check Batch to mail this check as a part of.
PhysicalCheckBatchID param.Field[string] `json:"physical_check_batch_id"`
Expand Down
3 changes: 2 additions & 1 deletion declinedtransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -1683,11 +1683,12 @@ const (
DeclinedTransactionSourceInboundFednowTransferDeclineReasonGroupLocked DeclinedTransactionSourceInboundFednowTransferDeclineReason = "group_locked"
DeclinedTransactionSourceInboundFednowTransferDeclineReasonEntityNotActive DeclinedTransactionSourceInboundFednowTransferDeclineReason = "entity_not_active"
DeclinedTransactionSourceInboundFednowTransferDeclineReasonFednowNotEnabled DeclinedTransactionSourceInboundFednowTransferDeclineReason = "fednow_not_enabled"
DeclinedTransactionSourceInboundFednowTransferDeclineReasonTransactionNotAllowed DeclinedTransactionSourceInboundFednowTransferDeclineReason = "transaction_not_allowed"
)

func (r DeclinedTransactionSourceInboundFednowTransferDeclineReason) IsKnown() bool {
switch r {
case DeclinedTransactionSourceInboundFednowTransferDeclineReasonAccountNumberCanceled, DeclinedTransactionSourceInboundFednowTransferDeclineReasonAccountNumberDisabled, DeclinedTransactionSourceInboundFednowTransferDeclineReasonAccountRestricted, DeclinedTransactionSourceInboundFednowTransferDeclineReasonGroupLocked, DeclinedTransactionSourceInboundFednowTransferDeclineReasonEntityNotActive, DeclinedTransactionSourceInboundFednowTransferDeclineReasonFednowNotEnabled:
case DeclinedTransactionSourceInboundFednowTransferDeclineReasonAccountNumberCanceled, DeclinedTransactionSourceInboundFednowTransferDeclineReasonAccountNumberDisabled, DeclinedTransactionSourceInboundFednowTransferDeclineReasonAccountRestricted, DeclinedTransactionSourceInboundFednowTransferDeclineReasonGroupLocked, DeclinedTransactionSourceInboundFednowTransferDeclineReasonEntityNotActive, DeclinedTransactionSourceInboundFednowTransferDeclineReasonFednowNotEnabled, DeclinedTransactionSourceInboundFednowTransferDeclineReasonTransactionNotAllowed:
return true
}
return false
Expand Down
3 changes: 3 additions & 0 deletions digitalwallettoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ func (r *DigitalWalletTokenService) ListAutoPaging(ctx context.Context, query Di
type DigitalWalletToken struct {
// The Digital Wallet Token identifier.
ID string `json:"id" api:"required"`
// The identifier for the Account this Digital Wallet Token belongs to.
AccountID string `json:"account_id" api:"required"`
// The identifier for the Card this Digital Wallet Token belongs to.
CardID string `json:"card_id" api:"required"`
// The cardholder information given when the Digital Wallet Token was created.
Expand Down Expand Up @@ -109,6 +111,7 @@ type DigitalWalletToken struct {
// [DigitalWalletToken]
type digitalWalletTokenJSON struct {
ID apijson.Field
AccountID apijson.Field
CardID apijson.Field
Cardholder apijson.Field
CreatedAt apijson.Field
Expand Down
136 changes: 135 additions & 1 deletion entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -1925,6 +1925,9 @@ type EntityNewParams struct {
// An assessment of the entity's potential risk of involvement in financial crimes,
// such as money laundering.
RiskRating param.Field[EntityNewParamsRiskRating] `json:"risk_rating"`
// Details of the sole proprietorship entity to create. Required if `structure` is
// equal to `sole_proprietorship`.
SoleProprietorship param.Field[EntityNewParamsSoleProprietorship] `json:"sole_proprietorship"`
// Additional documentation associated with the entity.
SupplementalDocuments param.Field[[]EntityNewParamsSupplementalDocument] `json:"supplemental_documents"`
// The terms that the Entity agreed to. Not all programs are required to submit
Expand Down Expand Up @@ -1952,11 +1955,12 @@ const (
EntityNewParamsStructureJoint EntityNewParamsStructure = "joint"
EntityNewParamsStructureTrust EntityNewParamsStructure = "trust"
EntityNewParamsStructureGovernmentAuthority EntityNewParamsStructure = "government_authority"
EntityNewParamsStructureSoleProprietorship EntityNewParamsStructure = "sole_proprietorship"
)

func (r EntityNewParamsStructure) IsKnown() bool {
switch r {
case EntityNewParamsStructureCorporation, EntityNewParamsStructureNaturalPerson, EntityNewParamsStructureJoint, EntityNewParamsStructureTrust, EntityNewParamsStructureGovernmentAuthority:
case EntityNewParamsStructureCorporation, EntityNewParamsStructureNaturalPerson, EntityNewParamsStructureJoint, EntityNewParamsStructureTrust, EntityNewParamsStructureGovernmentAuthority, EntityNewParamsStructureSoleProprietorship:
return true
}
return false
Expand Down Expand Up @@ -2672,6 +2676,136 @@ func (r EntityNewParamsRiskRatingRating) IsKnown() bool {
return false
}

// Details of the sole proprietorship entity to create. Required if `structure` is
// equal to `sole_proprietorship`.
type EntityNewParamsSoleProprietorship struct {
// The sole proprietorship's business address. Mail receiving locations like PO
// Boxes and PMB's are disallowed.
Address param.Field[EntityNewParamsSoleProprietorshipAddress] `json:"address" api:"required"`
// The individual who operates the sole proprietorship.
SoleProprietor param.Field[EntityNewParamsSoleProprietorshipSoleProprietor] `json:"sole_proprietor" api:"required"`
// The name under which the sole proprietorship does business, if it is different
// from the name of the sole proprietor.
DoingBusinessAsName param.Field[string] `json:"doing_business_as_name"`
// An email address for the sole proprietorship. Not every program requires an
// email for submitted Entities.
Email param.Field[string] `json:"email" format:"email"`
// The North American Industry Classification System (NAICS) code for the sole
// proprietorship's primary line of business. This is a number, like `5132` for
// `Software Publishers`. A full list of classification codes is available
// [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes).
IndustryCode param.Field[string] `json:"industry_code"`
// The United States Employer Identification Number (EIN) for the sole
// proprietorship, if the sole proprietor has one. Submit nine digits with no
// dashes or other separators.
TaxIdentifier param.Field[string] `json:"tax_identifier"`
// A website for the sole proprietorship. Not every program requires a website for
// submitted Entities.
Website param.Field[string] `json:"website"`
}

func (r EntityNewParamsSoleProprietorship) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

// The sole proprietorship's business address. Mail receiving locations like PO
// Boxes and PMB's are disallowed.
type EntityNewParamsSoleProprietorshipAddress struct {
// The city of the address.
City param.Field[string] `json:"city" api:"required"`
// The first line of the address. This is usually the street number and street.
Line1 param.Field[string] `json:"line1" api:"required"`
// The two-letter United States Postal Service (USPS) abbreviation for the state of
// the address.
State param.Field[string] `json:"state" api:"required"`
// The ZIP code of the address.
Zip param.Field[string] `json:"zip" api:"required"`
// The second line of the address. This might be the floor or room number.
Line2 param.Field[string] `json:"line2"`
}

func (r EntityNewParamsSoleProprietorshipAddress) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

// The individual who operates the sole proprietorship.
type EntityNewParamsSoleProprietorshipSoleProprietor struct {
// The individual's physical address. Mail receiving locations like PO Boxes and
// PMB's are disallowed.
Address param.Field[EntityNewParamsSoleProprietorshipSoleProprietorAddress] `json:"address" api:"required"`
// The person's date of birth in YYYY-MM-DD format.
DateOfBirth param.Field[time.Time] `json:"date_of_birth" api:"required" format:"date"`
// A means of verifying the person's identity. Sole proprietors must be identified
// with a `social_security_number` or an
// `individual_taxpayer_identification_number`.
Identification param.Field[EntityNewParamsSoleProprietorshipSoleProprietorIdentification] `json:"identification" api:"required"`
// The person's legal name.
Name param.Field[string] `json:"name" api:"required"`
}

func (r EntityNewParamsSoleProprietorshipSoleProprietor) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

// The individual's physical address. Mail receiving locations like PO Boxes and
// PMB's are disallowed.
type EntityNewParamsSoleProprietorshipSoleProprietorAddress struct {
// The city, district, town, or village of the address.
City param.Field[string] `json:"city" api:"required"`
// The two-letter ISO 3166-1 alpha-2 code for the country of the address.
//
// Defaults to `US`.
Country param.Field[string] `json:"country" api:"required"`
// The first line of the address. This is usually the street number and street.
Line1 param.Field[string] `json:"line1" api:"required"`
// The second line of the address. This might be the floor or room number.
Line2 param.Field[string] `json:"line2"`
// The two-letter United States Postal Service (USPS) abbreviation for the US
// state, province, or region of the address. Required in certain countries.
State param.Field[string] `json:"state"`
// The ZIP or postal code of the address. Required in certain countries.
Zip param.Field[string] `json:"zip"`
}

func (r EntityNewParamsSoleProprietorshipSoleProprietorAddress) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

// A means of verifying the person's identity. Sole proprietors must be identified
// with a `social_security_number` or an
// `individual_taxpayer_identification_number`.
type EntityNewParamsSoleProprietorshipSoleProprietorIdentification struct {
// A method that can be used to verify the individual's identity.
//
// Defaults to `social_security_number`.
Method param.Field[EntityNewParamsSoleProprietorshipSoleProprietorIdentificationMethod] `json:"method" api:"required"`
// An identification number that can be used to verify the individual's identity,
// such as a social security number. Submit nine digits with no dashes or other
// separators. When testing in sandbox, use one of our
// [sandbox test values](https://increase.com/documentation/sandbox-test-values).
Number param.Field[string] `json:"number" api:"required"`
}

func (r EntityNewParamsSoleProprietorshipSoleProprietorIdentification) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

// A method that can be used to verify the individual's identity.
type EntityNewParamsSoleProprietorshipSoleProprietorIdentificationMethod string

const (
EntityNewParamsSoleProprietorshipSoleProprietorIdentificationMethodSocialSecurityNumber EntityNewParamsSoleProprietorshipSoleProprietorIdentificationMethod = "social_security_number"
EntityNewParamsSoleProprietorshipSoleProprietorIdentificationMethodIndividualTaxpayerIdentificationNumber EntityNewParamsSoleProprietorshipSoleProprietorIdentificationMethod = "individual_taxpayer_identification_number"
)

func (r EntityNewParamsSoleProprietorshipSoleProprietorIdentificationMethod) IsKnown() bool {
switch r {
case EntityNewParamsSoleProprietorshipSoleProprietorIdentificationMethodSocialSecurityNumber, EntityNewParamsSoleProprietorshipSoleProprietorIdentificationMethodIndividualTaxpayerIdentificationNumber:
return true
}
return false
}

type EntityNewParamsSupplementalDocument struct {
// The identifier of the File containing the document.
FileID param.Field[string] `json:"file_id" api:"required"`
Expand Down
30 changes: 30 additions & 0 deletions entity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,36 @@ func TestEntityNewWithOptionalParams(t *testing.T) {
RatedAt: increase.F(time.Now()),
Rating: increase.F(increase.EntityNewParamsRiskRatingRatingLow),
}),
SoleProprietorship: increase.F(increase.EntityNewParamsSoleProprietorship{
Address: increase.F(increase.EntityNewParamsSoleProprietorshipAddress{
City: increase.F("x"),
Line1: increase.F("x"),
State: increase.F("xx"),
Zip: increase.F("x"),
Line2: increase.F("x"),
}),
SoleProprietor: increase.F(increase.EntityNewParamsSoleProprietorshipSoleProprietor{
Address: increase.F(increase.EntityNewParamsSoleProprietorshipSoleProprietorAddress{
City: increase.F("x"),
Country: increase.F("x"),
Line1: increase.F("x"),
Line2: increase.F("x"),
State: increase.F("x"),
Zip: increase.F("x"),
}),
DateOfBirth: increase.F(time.Now()),
Identification: increase.F(increase.EntityNewParamsSoleProprietorshipSoleProprietorIdentification{
Method: increase.F(increase.EntityNewParamsSoleProprietorshipSoleProprietorIdentificationMethodSocialSecurityNumber),
Number: increase.F("xxxx"),
}),
Name: increase.F("x"),
}),
DoingBusinessAsName: increase.F("x"),
Email: increase.F("[email protected]"),
IndustryCode: increase.F("x"),
TaxIdentifier: increase.F("x"),
Website: increase.F("website"),
}),
SupplementalDocuments: increase.F([]increase.EntityNewParamsSupplementalDocument{{
FileID: increase.F("file_id"),
}}),
Expand Down
Loading
Loading