Skip to content

Commit

Permalink
Conslidate BTClient_Metadata.h with BTClient_Internal.h
Browse files Browse the repository at this point in the history
`BTClient_Metadata.h` was intended to be a private header but it has
been in `@Public` incidentally since it was introduced. This commit
corrects that by moving it to the BTClient extension in
`BTClient_Internal.h`.
  • Loading branch information
mickeyreiss committed Feb 9, 2015
1 parent a456ce3 commit 7d274a5
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 29 deletions.
2 changes: 0 additions & 2 deletions Braintree.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,6 @@
A7B7434019A3E4B5000A6A7A /* BTVenmoAppSwitchRequestURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BTVenmoAppSwitchRequestURL.m; sourceTree = "<group>"; };
A7C7F82D19B905C400493311 /* BTPaymentProviderErrors.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BTPaymentProviderErrors.m; sourceTree = "<group>"; };
A7CB617319B7B13000E972A8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
A7E5BEAF19ABDA59006AEB9B /* BTClient_Metadata.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BTClient_Metadata.h; sourceTree = "<group>"; };
A7E5BEB019ABE5D0006AEB9B /* BTAppSwitchSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BTAppSwitchSpec.m; sourceTree = "<group>"; };
A7E5BEB319ABE5F3006AEB9B /* BTAppSwitch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BTAppSwitch.h; sourceTree = "<group>"; };
A7E5BEB419ABE5F3006AEB9B /* BTAppSwitch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BTAppSwitch.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1035,7 +1034,6 @@
A7E5BEB519ABE5F3006AEB9B /* BTAppSwitching.h */,
77037AD319B0112A0097DADE /* BTAppSwitchingDelegate.h */,
16217420192D85EB008DC35D /* BTCardPaymentMethod.h */,
A7E5BEAF19ABDA59006AEB9B /* BTClient_Metadata.h */,
16217423192D85EB008DC35D /* BTClient.h */,
16217421192D85EB008DC35D /* BTClient+Offline.h */,
16217422192D85EB008DC35D /* BTClient+Testing.h */,
Expand Down
15 changes: 0 additions & 15 deletions Braintree/API/@Public/BTClient_Metadata.h

This file was deleted.

2 changes: 0 additions & 2 deletions Braintree/API/Client/BTClient.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@import PassKit;

#import "BTClient.h"
#import "BTClient_Metadata.h"
#import "BTClient_Internal.h"
#import "BTClientToken.h"
#import "BTLogger_Internal.h"
Expand Down
13 changes: 9 additions & 4 deletions Braintree/API/Client/BTClient_Internal.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import "BTClient.h"
#import "BTHTTP.h"
#import "BTClientToken.h"
#import "BTClientMetadata.h"

@interface BTClient ()
@property (nonatomic, strong, readwrite) BTHTTP *clientApiHttp;
Expand All @@ -9,9 +10,13 @@
/// Models the contents of the client token, as it is received from the merchant server
@property (nonatomic, strong) BTClientToken *clientToken;

// Internal helpers
// Declared here to make available for testing
// TODO: Delete me
//+ (BTPayPalPaymentMethod *)payPalPaymentMethodFromAPIResponseDictionary:(NSDictionary *)response;
@property (nonatomic, copy, readonly) BTClientMetadata *metadata;

/// Copy of the instance, but with different metadata
///
/// Useful for temporary metadata overrides.
///
/// @param metadataBlock block for customizing metadata
- (instancetype)copyWithMetadata:(void (^)(BTClientMutableMetadata *metadata))metadataBlock;

@end
2 changes: 1 addition & 1 deletion Braintree/Drop-In/BTDropInViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import "BTDropInErrorAlert.h"
#import "BTDropInLocalizedString.h"
#import "BTPaymentMethodCreationDelegate.h"
#import "BTClient_Metadata.h"
#import "BTClient_Internal.h"
#import "BTLogger_Internal.h"

@interface BTDropInViewController () < BTDropInSelectPaymentMethodViewControllerDelegate, BTUIScrollViewScrollRectToVisibleDelegate, BTUICardFormViewDelegate, BTPaymentMethodCreationDelegate, BTDropInViewControllerDelegate>
Expand Down
2 changes: 1 addition & 1 deletion Braintree/PayPal/BTPayPalAppSwitchHandler.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import "BTPayPalAppSwitchHandler_Internal.h"

#import "BTClient_Metadata.h"
#import "BTClient_Internal.h"
#import "BTClient+BTPayPal.h"
#import "BTMutablePayPalPaymentMethod.h"
#import "BTLogger_Internal.h"
Expand Down
2 changes: 1 addition & 1 deletion Braintree/PayPal/BTPayPalViewController.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import "BTPayPalViewController_Internal.h"

#import "BTClient+BTPayPal.h"
#import "BTClient_Metadata.h"
#import "BTClient_Internal.h"
#import "BTErrors+BTPayPal.h"

#import "BTMutablePayPalPaymentMethod.h"
Expand Down
2 changes: 1 addition & 1 deletion Braintree/Venmo/BTVenmoAppSwitchHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#import "BTVenmoAppSwitchRequestURL.h"
#import "BTVenmoAppSwitchReturnURL.h"
#import "BTClient+BTVenmo.h"
#import "BTClient_Metadata.h"
#import "BTClient_Internal.h"
#import "BTMutableCardPaymentMethod.h"

@implementation BTVenmoAppSwitchHandler
Expand Down
1 change: 0 additions & 1 deletion Specs/Braintree-API-Specs/BTClientSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#import "BTClient+Testing.h"
#import "BTTestClientTokenFactory.h"
#import "BTAnalyticsMetadata.h"
#import "BTClient_Metadata.h"

#import "BTLogger_Internal.h"

Expand Down
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTClient_MetadataSpec.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import "BTClient_Internal.h"
#import "BTClient+Offline.h"
#import "BTClient+Testing.h"
#import "BTClient_Metadata.h"
#import "BTClient_Internal.h"

SpecBegin(BTClient_Metadata)

Expand Down

0 comments on commit 7d274a5

Please sign in to comment.