Skip to content

Commit

Permalink
Fixes PAPI request attribute name initialRecurringPayment (#217)
Browse files Browse the repository at this point in the history
* Fixes PAPI request attribute name `initialRecurringPayment`
---------

Co-authored-by: Stefan Popa <[email protected]>
  • Loading branch information
stefan-tudor and stefanpopa authored Nov 13, 2023
1 parent 8d61e1e commit e39ef4d
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ class JPRegisterCardRequestTest: XCTestCase {
XCTAssertEqual(cardRequest.yourConsumerReference, configuration.reference.consumerReference)
XCTAssertEqual(cardRequest.yourPaymentReference, configuration.reference.paymentReference)
XCTAssertEqual(cardRequest.yourPaymentMetaData, configuration.reference.metaData)
XCTAssertTrue(cardRequest.isInitialRecurringPayment)
XCTAssertTrue(cardRequest.initialRecurringPayment)
}

/*
* GIVEN: A [JPRegisterCardRequest] is being initialized
*
* WHEN: A valid parameters are being passed to the initializer
*
* AND: The "isInitialRecurringPayment" should be set.
* AND: The "initialRecurringPayment" should be set.
*/
func test_onCardDetailsInitialization_SetValidProperties() {

Expand All @@ -81,7 +81,7 @@ class JPRegisterCardRequestTest: XCTestCase {
XCTAssertEqual(cardRequest.yourConsumerReference, configuration.reference.consumerReference)
XCTAssertEqual(cardRequest.yourPaymentReference, configuration.reference.paymentReference)
XCTAssertEqual(cardRequest.yourPaymentMetaData, configuration.reference.metaData)
XCTAssertTrue(cardRequest.isInitialRecurringPayment)
XCTAssertTrue(cardRequest.initialRecurringPayment)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class JPCheckCardRequestTests: XCTestCase {
*
* WHEN: A valid [JPConfiguration] instance is passed as a parameter
*
* THEN: The "isInitialRecurringPayment" should be set.
* THEN: The "initialRecurringPayment" should be set.
*/
func test_onInitialization_SetValidProperties() {
let checkCardRequest = JPCheckCardRequest(configuration: configuration)
Expand All @@ -55,15 +55,15 @@ class JPCheckCardRequestTests: XCTestCase {
XCTAssertEqual(checkCardRequest.yourConsumerReference, configuration.reference.consumerReference)
XCTAssertEqual(checkCardRequest.yourPaymentReference, configuration.reference.paymentReference)
XCTAssertEqual(checkCardRequest.yourPaymentMetaData, configuration.reference.metaData)
XCTAssertTrue(checkCardRequest.isInitialRecurringPayment)
XCTAssertTrue(checkCardRequest.initialRecurringPayment)
}

/*
* GIVEN: A [JPCheckCardRequest] is being initialized
*
* WHEN: A valid parameters are being passed to the initializer
*
* THEN: The "isInitialRecurringPayment" should be set.
* THEN: The "initialRecurringPayment" should be set.
*/
func test_onCardDetailsInitialization_SetValidProperties() {

Expand All @@ -83,6 +83,6 @@ class JPCheckCardRequestTests: XCTestCase {
XCTAssertEqual(checkCardRequest.yourConsumerReference, configuration.reference.consumerReference)
XCTAssertEqual(checkCardRequest.yourPaymentReference, configuration.reference.paymentReference)
XCTAssertEqual(checkCardRequest.yourPaymentMetaData, configuration.reference.metaData)
XCTAssertTrue(checkCardRequest.isInitialRecurringPayment)
XCTAssertTrue(checkCardRequest.initialRecurringPayment)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ - (void)populateWithCardTokenDetailsRequest:(JPTokenRequest *)request
request.cardLastFour = self.cardLastFour;
request.cardToken = self.cardToken;
request.cardType = @(self.cardType);
request.isInitialRecurringPayment = configuration.isInitialRecurringPayment;
request.initialRecurringPayment = configuration.isInitialRecurringPayment;
request.cv2 = self.securityCode;
request.cardHolderName = self.cardholderName;
request.phoneCountryCode = self.phoneCountryCode;
Expand Down
2 changes: 1 addition & 1 deletion Source/Models/Request/JPCheckCardRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
/**
* A flag to sign up for a subscription-based service
*/
@property (nonatomic, assign) BOOL isInitialRecurringPayment;
@property (nonatomic, assign) BOOL initialRecurringPayment;

@end
4 changes: 2 additions & 2 deletions Source/Models/Request/JPCheckCardRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ - (NSString *)amount {

- (nonnull instancetype)initWithConfiguration:(nonnull JPConfiguration *)configuration {
if (self = [super initWithConfiguration:configuration]) {
_isInitialRecurringPayment = configuration.isInitialRecurringPayment;
_initialRecurringPayment = configuration.isInitialRecurringPayment;
}
return self;
}

- (instancetype)initWithConfiguration:(JPConfiguration *)configuration
andCardDetails:(JPCard *)card {
if (self = [super initWithConfiguration:configuration andCardDetails:card]) {
_isInitialRecurringPayment = configuration.isInitialRecurringPayment;
_initialRecurringPayment = configuration.isInitialRecurringPayment;
}
return self;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Models/Request/JPPaymentRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
/**
* A flag to sign up for a subscription-based service
*/
@property (nonatomic, assign) BOOL isInitialRecurringPayment;
@property (nonatomic, assign) BOOL initialRecurringPayment;

@end
4 changes: 2 additions & 2 deletions Source/Models/Request/JPPaymentRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ @implementation JPPaymentRequest

- (nonnull instancetype)initWithConfiguration:(nonnull JPConfiguration *)configuration {
if (self = [super initWithConfiguration:configuration]) {
_isInitialRecurringPayment = configuration.isInitialRecurringPayment;
_initialRecurringPayment = configuration.isInitialRecurringPayment;
}
return self;
}

- (instancetype)initWithConfiguration:(JPConfiguration *)configuration
andCardDetails:(JPCard *)card {
if (self = [super initWithConfiguration:configuration andCardDetails:card]) {
_isInitialRecurringPayment = configuration.isInitialRecurringPayment;
_initialRecurringPayment = configuration.isInitialRecurringPayment;
}
return self;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Models/Request/JPRegisterCardRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
/**
* A flag to sign up for a subscription-based service
*/
@property (nonatomic, assign) BOOL isInitialRecurringPayment;
@property (nonatomic, assign) BOOL initialRecurringPayment;

@end
4 changes: 2 additions & 2 deletions Source/Models/Request/JPRegisterCardRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ - (NSString *)currency {

- (nonnull instancetype)initWithConfiguration:(nonnull JPConfiguration *)configuration {
if (self = [super initWithConfiguration:configuration]) {
_isInitialRecurringPayment = configuration.isInitialRecurringPayment;
_initialRecurringPayment = configuration.isInitialRecurringPayment;
}
return self;
}

- (instancetype)initWithConfiguration:(JPConfiguration *)configuration
andCardDetails:(JPCard *)card {
if (self = [super initWithConfiguration:configuration andCardDetails:card]) {
_isInitialRecurringPayment = configuration.isInitialRecurringPayment;
_initialRecurringPayment = configuration.isInitialRecurringPayment;
}
return self;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Models/Request/JPTokenRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/**
* A flag to sign up for a subscription-based service
*/
@property (nonatomic, assign) BOOL isInitialRecurringPayment;
@property (nonatomic, assign) BOOL initialRecurringPayment;

/**
* Designated initializer based on the provided configuration and card token
Expand Down
2 changes: 1 addition & 1 deletion Source/Models/Request/JPTokenRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ - (nonnull instancetype)initWithConfiguration:(nonnull JPConfiguration *)configu
andCardToken:(nonnull NSString *)cardToken {
if (self = [super initWithConfiguration:configuration]) {
_cardToken = cardToken;
_isInitialRecurringPayment = configuration.isInitialRecurringPayment;
_initialRecurringPayment = configuration.isInitialRecurringPayment;
}
return self;
}
Expand Down

0 comments on commit e39ef4d

Please sign in to comment.