Skip to content

Commit fe3a6fe

Browse files
braintreepsrgurumurthiklaguerrePay
committed
4.35.0
Co-authored-by: Rajaram Gurumurthi <[email protected]> Co-authored-by: Kevin Laguerre <[email protected]>
1 parent 97fa543 commit fe3a6fe

36 files changed

+252
-1096
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Changelog
2+
3+
## 4.35.0
4+
* Add support for capturing payment facilitator and sub-merchant details with transactions
5+
* Remove marketplace features
6+
27
## 4.34.0
38
* Add prepaid_reloadable from bin data in credit card responses
49
* Add support for `PayPalPaymentResource` requests

braintree/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
from braintree.local_payment_reversed import LocalPaymentReversed
4242
from braintree.merchant import Merchant
4343
from braintree.merchant_account import MerchantAccount
44-
from braintree.merchant_account_gateway import MerchantAccountGateway
44+
from braintree.merchant_account_gateway import MerchantAccountGateway
4545
from braintree.oauth_access_revocation import OAuthAccessRevocation
4646
from braintree.partner_merchant import PartnerMerchant
47+
from braintree.payment_facilitator import PaymentFacilitator
4748
from braintree.payment_instrument_type import PaymentInstrumentType
4849
from braintree.payment_method import PaymentMethod
4950
from braintree.payment_method_customer_data_updated_metadata import PaymentMethodCustomerDataUpdatedMetadata
@@ -62,6 +63,7 @@
6263
from braintree.settlement_batch_summary import SettlementBatchSummary
6364
from braintree.signature_service import SignatureService
6465
from braintree.status_event import StatusEvent
66+
from braintree.sub_merchant import SubMerchant
6567
from braintree.subscription import Subscription
6668
from braintree.subscription_gateway import SubscriptionGateway
6769
from braintree.subscription_search import SubscriptionSearch

braintree/braintree_gateway.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, config=None, **kwargs):
5656
self.document_upload = DocumentUploadGateway(self)
5757
self.exchange_rate_quote = ExchangeRateQuoteGateway(self)
5858
self.merchant = MerchantGateway(self)
59-
self.merchant_account = MerchantAccountGateway(self)
59+
self.merchant_account = MerchantAccountGateway(self)
6060
self.oauth = OAuthGateway(self)
6161
self.payment_method = PaymentMethodGateway(self)
6262
self.payment_method_nonce = PaymentMethodNonceGateway(self)

braintree/error_codes.py

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ class Options(object):
153153
VerificationMerchantAccountIdIsInvalid = "91728"
154154
VerificationMerchantAccountIsForbidden = "91743"
155155
VerificationMerchantAccountIsSuspended = "91742"
156-
VerificationMerchantAccountCannotBeSubMerchantAccount = "91755"
157156

158157

159158
class Customer(object):
@@ -240,104 +239,14 @@ class Merchant(object):
240239
MerchantAccountExistsForId = "93620"
241240

242241
class MerchantAccount(object):
243-
IdFormatIsInvalid = "82603"
244-
IdIsInUse = "82604"
245-
IdIsNotAllowed = "82605"
246-
IdIsTooLong = "82602"
247-
MasterMerchantAccountIdIsInvalid = "82607"
248-
MasterMerchantAccountIdIsRequired = "82606"
249-
MasterMerchantAccountMustBeActive = "82608"
250-
TosAcceptedIsRequired = "82610"
251-
CannotBeUpdated = "82674"
252-
IdCannotBeUpdated = "82675"
253-
MasterMerchantAccountIdCannotBeUpdated = "82676"
254-
Declined = "82626"
255-
DeclinedMasterCardMatch = "82622"
256-
DeclinedOFAC = "82621"
257-
DeclinedFailedKYC = "82623"
258-
DeclinedSsnInvalid = "82624"
259-
DeclinedSsnMatchesDeceased = "82625"
260242

261243
class ApplicantDetails(object):
262-
AccountNumberIsRequired = "82614"
263-
CompanyNameIsInvalid = "82631"
264-
CompanyNameIsRequiredWithTaxId = "82633"
265-
DateOfBirthIsRequired = "82612"
266244
Declined = "82626" # Keep for backwards compatibility
267245
DeclinedMasterCardMatch = "82622" # Keep for backwards compatibility
268246
DeclinedOFAC = "82621" # Keep for backwards compatibility
269247
DeclinedFailedKYC = "82623" # Keep for backwards compatibility
270248
DeclinedSsnInvalid = "82624" # Keep for backwards compatibility
271249
DeclinedSsnMatchesDeceased = "82625" # Keep for backwards compatibility
272-
EmailAddressIsInvalid = "82616"
273-
FirstNameIsInvalid = "82627"
274-
FirstNameIsRequired = "82609"
275-
LastNameIsInvalid = "82628"
276-
LastNameIsRequired = "82611"
277-
PhoneIsInvalid = "82636"
278-
RoutingNumberIsInvalid = "82635"
279-
RoutingNumberIsRequired = "82613"
280-
SsnIsInvalid = "82615"
281-
TaxIdIsInvalid = "82632"
282-
TaxIdIsRequiredWithCompanyName = "82634"
283-
DateOfBirthIsInvalid = "82663"
284-
EmailAddressIsRequired = "82665"
285-
AccountNumberIsInvalid = "82670"
286-
TaxIdMustBeBlank = "82673"
287-
288-
class Address(object):
289-
LocalityIsRequired = "82618"
290-
PostalCodeIsInvalid = "82630"
291-
PostalCodeIsRequired = "82619"
292-
RegionIsRequired = "82620"
293-
StreetAddressIsInvalid = "82629"
294-
StreetAddressIsRequired = "82617"
295-
RegionIsInvalid = "82664"
296-
297-
class Individual(object):
298-
FirstNameIsRequired = "82637"
299-
LastNameIsRequired = "82638"
300-
DateOfBirthIsRequired = "82639"
301-
SsnIsInvalid = "82642"
302-
EmailAddressIsInvalid = "82643"
303-
FirstNameIsInvalid = "82644"
304-
LastNameIsInvalid = "82645"
305-
PhoneIsInvalid = "82656"
306-
DateOfBirthIsInvalid = "82666"
307-
EmailAddressIsRequired = "82667"
308-
309-
class Address(object):
310-
StreetAddressIsRequired = "82657"
311-
LocalityIsRequired = "82658"
312-
PostalCodeIsRequired = "82659"
313-
RegionIsRequired = "82660"
314-
StreetAddressIsInvalid = "82661"
315-
PostalCodeIsInvalid = "82662"
316-
RegionIsInvalid = "82668"
317-
318-
class Business(object):
319-
DbaNameIsInvalid = "82646"
320-
LegalNameIsInvalid = "82677"
321-
LegalNameIsRequiredWithTaxId = "82669"
322-
TaxIdIsInvalid = "82647"
323-
TaxIdIsRequiredWithLegalName = "82648"
324-
TaxIdMustBeBlank = "82672"
325-
class Address(object):
326-
StreetAddressIsInvalid = "82685"
327-
PostalCodeIsInvalid = "82686"
328-
RegionIsInvalid = "82684"
329-
330-
class Funding(object):
331-
RoutingNumberIsRequired = "82640"
332-
AccountNumberIsRequired = "82641"
333-
RoutingNumberIsInvalid = "82649"
334-
AccountNumberIsInvalid = "82671"
335-
DestinationIsInvalid = "82679"
336-
DestinationIsRequired = "82678"
337-
EmailAddressIsInvalid = "82681"
338-
EmailAddressIsRequired = "82680"
339-
MobilePhoneIsInvalid = "82683"
340-
MobilePhoneIsRequired = "82682"
341250

342251
class OAuth(object):
343252
InvalidGrant = "93801"
@@ -376,7 +285,6 @@ class Options(object):
376285
MerchantAccountIdIsInvalid = "94204"
377286
MerchantAccountIsSuspended = "94205"
378287
MerchantAccountIsForbidden = "94206"
379-
MerchantAccountCannotBeSubMerchantAccount = "94208"
380288
AccountTypeIsInvalid = "942184"
381289
AccountTypeNotSupported = "942185"
382290

@@ -563,14 +471,11 @@ class Transaction(object):
563471
CannotCloneTransactionWithVaultCreditCard = "91540"
564472
CannotCloneUnsuccessfulTransaction = "91542"
565473
CannotCloneVoiceAuthorizations = "91541"
566-
CannotHoldInEscrow = "91560"
567-
CannotPartiallyRefundEscrowedTransaction = "91563"
568474
CannotRefundCredit = "91505"
569475
CannotRefundSettlingTransaction = "91574"
570476
CannotRefundUnlessSettled = "91506"
571477
CannotRefundWithPendingMerchantAccount = "91559"
572478
CannotRefundWithSuspendedMerchantAccount = "91538"
573-
CannotReleaseFromEscrow = "91561"
574479
CannotSimulateTransactionSettlement = "91575"
575480
CannotSubmitForPartialSettlement = "915103"
576481
CannotSubmitForSettlement = "91507"
@@ -654,7 +559,6 @@ class Transaction(object):
654559
ShipsFromPostalCodeInvalidCharacters = "915167"
655560
ShipsFromPostalCodeIsInvalid = "915166"
656561
ShipsFromPostalCodeIsTooLong = "915165"
657-
SubMerchantAccountRequiresServiceFeeAmount = "91553"
658562
SubscriptionDoesNotBelongToCustomer = "91529"
659563
SubscriptionIdIsInvalid = "91528"
660564
SubscriptionStatusMustBePastDue = "91531"
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
from braintree.merchant_account.business_details import BusinessDetails
2-
from braintree.merchant_account.funding_details import FundingDetails
3-
from braintree.merchant_account.individual_details import IndividualDetails
4-
from braintree.merchant_account.merchant_account import MerchantAccount
1+
from braintree.merchant_account.merchant_account import MerchantAccount

braintree/merchant_account/business_details.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

braintree/merchant_account/funding_details.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

braintree/merchant_account/individual_details.py

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,26 @@
11
from braintree.configuration import Configuration
22
from braintree.resource import Resource
3-
from braintree.merchant_account import BusinessDetails, FundingDetails, IndividualDetails
4-
53

64
class MerchantAccount(Resource):
75
class Status(object):
86
Active = "active"
97
Pending = "pending"
108
Suspended = "suspended"
11-
9+
1210
class FundingDestination(object):
1311
Bank = "bank"
1412
Email = "email"
1513
MobilePhone = "mobile_phone"
16-
1714
FundingDestinations = FundingDestination
1815

1916
def __init__(self, gateway, attributes):
2017
Resource.__init__(self, gateway, attributes)
21-
self.individual_details = IndividualDetails(attributes.get("individual", {}))
22-
self.business_details = BusinessDetails(attributes.get("business", {}))
23-
self.funding_details = FundingDetails(attributes.get("funding", {}))
24-
if "master_merchant_account" in attributes:
25-
self.master_merchant_account = MerchantAccount(gateway, attributes.pop("master_merchant_account"))
2618

2719
def __repr__(self):
2820
detail_list = [
2921
"id",
30-
"business_details",
3122
"currency_iso_code",
3223
"default",
33-
"funding_details",
34-
"individual_details",
35-
"master_merchant_account",
3624
"status",
3725
]
3826
return super(MerchantAccount, self).__repr__(detail_list)
@@ -49,4 +37,4 @@ def update(id, attributes):
4937

5038
@staticmethod
5139
def find(id):
52-
return Configuration.gateway().merchant_account.find(id)
40+
return Configuration.gateway().merchant_account.find(id)

0 commit comments

Comments
 (0)