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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea
bin
obj
*DotSettings.user
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Global fallback
* @quadpay/tech-lead-em
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# QuadPay Software Engineer Interview
# Zip Software Engineer Interview

## Overview

QuadPay is a payment gateway that lets consumers split purchases into 4 interest free installments, every two weeks. The first 25% is taken when the purchase is made, and the remaining 3 installments of 25% are automatically taken every 14 days. We help customers manage their cash-flow while helping merchants increase conversion rates and average order values.
Zip is a payment gateway that lets consumers split purchases into 4 interest free installments, every two weeks. The first 25% is taken when the purchase is made, and the remaining 3 installments of 25% are automatically taken every 14 days. We help customers manage their cash-flow while helping merchants increase conversion rates and average order values.

It may help to see our [product in action online](https://www.ugg.com/women-boots-classic-boots/classic-short-ii-boot/1016223.html?dwvar_1016223_color=CHE#start=2&cgid=women-boots), checkout our app on [ios](https://apps.apple.com/us/app/quadpay-buy-now-pay-later/id1425045070) or [android](https://play.google.com/store/apps/details?id=com.quadpay.quadpay&hl=en_US), and to read our documentation (https://docs.quadpay.com).
It may help to see our [product in action online](https://www.fanatics.com/mlb/new-york-yankees/new-york-yankees-nike-home-replica-custom-jersey-white/o-8976+t-36446587+p-2520909211+z-8-3193055640?_ref=p-CLP:m-GRID:i-r0c1:po-1), checkout our app on [ios](https://apps.apple.com/us/app/quadpay-buy-now-pay-later/id1425045070) or [android](https://play.google.com/store/apps/details?id=com.quadpay.quadpay&hl=en_US), and to read our documentation (https://docs.us.zip.co).

## Background

One of the cornerstones of QuadPay's culture is openness and transparency. When reviewing our existing interview structure, we found that pair-programming challenges rarely replicated what our employees actually do in their day-to-day work. For example, when was the last time you coded without google, or when the requirements weren't clearly defined? To tackle that, we've decided to publish our pair programming interview and share it directly with candidates beforehand.
One of the cornerstones of Zip's culture is openness and transparency. When reviewing our existing interview structure, we found that pair-programming challenges rarely replicated what our employees actually do in their day-to-day work. For example, when was the last time you coded without google, or when the requirements weren't clearly defined? To tackle that, we've decided to publish our pair programming interview and share it directly with candidates beforehand.

As an Engineer at QuadPay you’ll help solve interesting problems on a daily basis. Some areas that you'll work on include fraud prevention, building real-time credit-decisioning models and, most importantly, shipping products that are secure, frictionless, and deliver a high-quality consumer experience.
As an Engineer at Zip you’ll help solve interesting problems on a daily basis. Some areas that you'll work on include fraud prevention, building real-time credit-decisioning models and, most importantly, shipping products that are secure, frictionless, and deliver a high-quality consumer experience.

The pair programming challenge will take an hour, and will more closely replicate a day-in-the-life at QuadPay. You’re free to use whichever resources help you to get the job done. When we evaluate your code at the end of the session, we will be looking for:
The pair programming challenge will take an hour, and will more closely replicate a day-in-the-life at Zip. You’re free to use whichever resources help you to get the job done. When we evaluate your code at the end of the session, we will be looking for:
- A high code health
- Simplicity
- Readability
Expand All @@ -30,7 +30,7 @@ During the interview, you will build a core service for our business, an Install
#### Installment Calculator
##### User Story

As a QuadPay Customer, I would like to establish a payment plan spread over 6 weeks that splits the original charge evenly over 4 installments.
As a Zip Customer, I would like to establish a payment plan spread over 6 weeks that splits the original charge evenly over 4 installments.

##### Acceptance Criteria
- Given it is the 1st of January, 2020
Expand Down Expand Up @@ -64,4 +64,4 @@ While we won't give you the exact prompt ahead of time, our general recommendati

## Closing Thoughts

We very much look forwrard to meeting you. Our goal is to make interviewers feel comfortable and prepared, so always feel free to reach out to your recruiter if you have any questions. Afterward, we welcome any and all feedback. We're constantly iterating and improving this process, and anything you share will help us make our interviews better for future candidates.
We very much look forward to meeting you. Our goal is to make interviewers feel comfortable and prepared, so always feel free to reach out to your recruiter if you have any questions. Afterward, we welcome any and all feedback. We're constantly iterating and improving this process, and anything you share will help us make our interviews better for future candidates.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
22 changes: 16 additions & 6 deletions SoftwareEngineerInterview/CSharp/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# CSharp Project

## Requirements
> Visual Studio Code
> Dotnet SDK 3.1
```
Visual Studio Code
Dotnet SDK 6.0
```

## Install
> TODO
```
cd Zip.InstallmentsService
dotnet restore
```

## Quick Start
> TODO
```
cd Zip.InstallmentsService
dotnet run
```

## Run Tests
> cd QuadPay.InstallmentsService
> dotnet test QuadPay.InstallmentsService.sln
```
cd Zip.InstallmentsService
dotnet test Zip.InstallmentsService.sln
```
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Shouldly;
using Xunit;

namespace QuadPay.InstallmentsService.Test
namespace Zip.InstallmentsService.Test
{
public class PaymentPlanFactoryTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>

<LangVersion>8</LangVersion>
<LangVersion>latestmajor</LangVersion>

<RootNamespace>Zip.InstallmentsService.Test</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,7 +19,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\QuadPay.InstallmentsService\QuadPay.InstallmentsService.csproj" />
<ProjectReference Include="..\Zip.InstallmentsService\Zip.InstallmentsService.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuadPay.InstallmentsService", "QuadPay.InstallmentsService\QuadPay.InstallmentsService.csproj", "{E7F1FB5D-5D7B-49D1-8F44-C31B60A7E1DC}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zip.InstallmentsService", "Zip.InstallmentsService\Zip.InstallmentsService.csproj", "{E7F1FB5D-5D7B-49D1-8F44-C31B60A7E1DC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuadPay.InstallmentsService.Test", "QuadPay.InstallmentsService.Test\QuadPay.InstallmentsService.Test.csproj", "{DF298FE5-362D-44BD-AD57-7DFC04CEB8B7}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zip.InstallmentsService.Test", "Zip.InstallmentsService.Test\Zip.InstallmentsService.Test.csproj", "{DF298FE5-362D-44BD-AD57-7DFC04CEB8B7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace QuadPay.InstallmentsService
namespace Zip.InstallmentsService
{
/// <summary>
/// Data structure which defines all the properties for an installment.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace QuadPay.InstallmentsService
namespace Zip.InstallmentsService
{
/// <summary>
/// Data structure which defines all the properties for a purchase installment plan.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Collections.Generic;
using Microsoft.VisualBasic;

namespace Zip.InstallmentsService
{
/// <summary>
/// This class is responsible for building the PaymentPlan according to the Zip product definition.
/// </summary>
public class PaymentPlanFactory
{
/// <summary>
/// Builds the PaymentPlan instance.
/// </summary>
/// <param name="purchaseAmount">The total amount for the purchase that the customer is making.</param>
/// <returns>The PaymentPlan created with all properties set.</returns>
public PaymentPlan CreatePaymentPlan(decimal purchaseAmount)
{
Installment insObj = new Installment();
var inscount = 4;
insObj.Amount = purchaseAmount / inscount;
insObj.DueDate = System.DateTime.Now;
List<Installment> insList = new List<Installment>();

PaymentPlan pp = new PaymentPlan();

for (int i = 0; i < inscount; i++)
{
insObj.DueDate.AddDays(i*14);

}


return pp;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latestmajor</LangVersion>
<RootNamespace>Zip.InstallmentsService</RootNamespace>
</PropertyGroup>

</Project>
10 changes: 10 additions & 0 deletions SoftwareEngineerInterview/Go/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Golang Project

## Requirements
> Go 1.16

## Install
> go get ./...

## Run Tests
> go test ./payment_plan
5 changes: 5 additions & 0 deletions SoftwareEngineerInterview/Go/installments/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/quadpay/software-engineer-interview/SoftwareEngineerInterview/Go/installments

go 1.17

require github.com/google/uuid v1.3.0
2 changes: 2 additions & 0 deletions SoftwareEngineerInterview/Go/installments/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package installment

import (
"time"

"github.com/google/uuid"
)

// Installment is a structure that defines all the properties for an installment.
type Installment struct {
id uuid.UUID
dueDate time.Time
amount float64
}

// Id gets the unique identifier for each installment.
func (i Installment) Id() uuid.UUID {
return i.id
}

// SetId sets the unique identifier for each installment.
func (i Installment) SetId(id uuid.UUID) {
i.id = id
}

// DueDate gets the due date for each installment.
func (i Installment) DueDate() time.Time {
return i.dueDate
}

// SetDueDate sets the due date for each installment.
func (i Installment) SetDueDate(dueDate time.Time) {
i.dueDate = dueDate
}

// Amount gets the installment amount.
func (i Installment) Amount() float64 {
return i.amount
}

// SetAmount sets the installment amount.
func (i Installment) SetAmount(amount float64) {
i.amount = amount
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package paymentplan

import (
"github.com/google/uuid"
"github.com/quadpay/software-engineer-interview/SoftwareEngineerInterview/Go/installments/installment"
)

// PaymentPlan is a structure that defines all the properties for a payment plan.
type PaymentPlan struct {
id uuid.UUID
purchaseAmount float64
installments []installment.Installment
}

// Id gets the unique identifier for each payment plan.
func (p PaymentPlan) Id() uuid.UUID {
return p.id
}

// SetId sets the unique identifier for each payment plan.
func (p PaymentPlan) SetId(id uuid.UUID) {
p.id = id
}

// PurchaseAmount gets the purchase amount for each payment plan.
func (p PaymentPlan) PurchaseAmount() float64 {
return p.purchaseAmount
}

// SetPurchaseAmount sets the purchase amount for each payment plan.
func (p PaymentPlan) SetPurchaseAmount(purchaseAmount float64) {
p.purchaseAmount = purchaseAmount
}

// Installments gets the installments for each payment plan.
func (p PaymentPlan) Installments() []installment.Installment {
return p.installments
}

// SetInstallments sets the installments for each payment plan.
func (p PaymentPlan) SetInstallments(installments []installment.Installment) {
p.installments = installments
}

// New creates a new payment plan according to purchase amount.
func New(purchaseAmount float64) (PaymentPlan, error) {
// TODO
return PaymentPlan{}, nil
}
Loading