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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ createConnectAccount config req = do
Stripe.CompanyDetails
{ name = cd.name,
tax_id = cd.taxId,
vat_id = cd.vatId,
address = cd.address
}
else Nothing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,8 @@ data RefundsData = RefundsData

data CompanyConnectDetails = CompanyConnectDetails
{ name :: Text,
taxId :: Maybe Text,
taxId :: Maybe Text, -- business registration number (e.g. Finnish Y-tunnus); Stripe company[tax_id]
vatId :: Maybe Text, -- VAT number (e.g. FI########); Stripe company[vat_id]
address :: Maybe Address
}
deriving stock (Show, Eq, Generic)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ data IndividualDetails = IndividualDetails
data CompanyDetails = CompanyDetails
{ name :: Text,
tax_id :: Maybe Text,
vat_id :: Maybe Text,
address :: Maybe Address
}
deriving stock (Show, Eq, Generic, Read)
Expand Down Expand Up @@ -352,7 +353,9 @@ companyToForm :: CompanyDetails -> [(Text, Text)]
companyToForm CompanyDetails {..} =
[("company[name]", toQueryParam name)]
++ catMaybes
[("company[tax_id]",) <$> toQueryParam <$> tax_id]
[ ("company[tax_id]",) <$> toQueryParam <$> tax_id,
("company[vat_id]",) <$> toQueryParam <$> vat_id
]
++ maybe [] companyAddressToForm address

companyAddressToForm :: Address -> [(Text, Text)]
Expand Down
Loading