Skip to content

Commit 59af7f4

Browse files
Adds method property in shipping class
1 parent dec53b1 commit 59af7f4

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

src/main/java/com/checkout/payments/ShippingDetails.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.checkout.common.Address;
44
import com.checkout.common.Phone;
5+
import com.checkout.sessions.DeliveryTimeframe;
56
import com.google.gson.annotations.SerializedName;
67
import lombok.AllArgsConstructor;
78
import lombok.Builder;
@@ -14,11 +15,26 @@
1415
@AllArgsConstructor
1516
public final class ShippingDetails {
1617

18+
@SerializedName("first_name")
19+
private String firstName;
20+
21+
@SerializedName("last_name")
22+
private String lastName;
23+
24+
@SerializedName("email")
25+
private String email;
26+
1727
private Address address;
1828

1929
private Phone phone;
2030

2131
@SerializedName("from_address_zip")
2232
private String fromAddressZip;
33+
34+
@SerializedName("timeframe")
35+
private ShippingDetailsTimeframe timeFrame;
36+
37+
@SerializedName("method")
38+
private ShippingDetailsMethods method;
2339

2440
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.checkout.payments;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
public enum ShippingDetailsMethods {
6+
7+
@SerializedName("Digital")
8+
DIGITAL,
9+
10+
@SerializedName("PickUp")
11+
PICK_UP,
12+
13+
@SerializedName("BillingAddress")
14+
BILLING_ADDRESS,
15+
16+
@SerializedName("OtherAddress")
17+
OTHER_ADDRESS,
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.checkout.payments;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
public enum ShippingDetailsTimeframe {
6+
7+
@SerializedName("ElectronicDelivery")
8+
ELECTRONIC_DELIVERY,
9+
10+
@SerializedName("SameDay")
11+
SAME_DAY,
12+
13+
@SerializedName("Overnight")
14+
OVERNIGHT,
15+
16+
@SerializedName("TwoDayOrMore")
17+
TWO_DAY_OR_MORE
18+
}

0 commit comments

Comments
 (0)