Skip to content

Commit

Permalink
Adds method property in shipping class
Browse files Browse the repository at this point in the history
  • Loading branch information
armando-rodriguez-cko committed Oct 13, 2023
1 parent dec53b1 commit 5a128fa
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/com/checkout/payments/ShippingDetails.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.checkout.common.Address;
import com.checkout.common.Phone;
import com.checkout.sessions.DeliveryTimeframe;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand All @@ -14,11 +15,26 @@
@AllArgsConstructor
public final class ShippingDetails {

@SerializedName("first_name")
private String firstName;

@SerializedName("last_name")
private String lastName;

@SerializedName("email")
private String email;

private Address address;

private Phone phone;

@SerializedName("from_address_zip")
private String fromAddressZip;

@SerializedName("timeframe")
private ShippingDetailsTimeframe timeFrame;

@SerializedName("method")
private ShippingDetailsMethods method;

}
18 changes: 18 additions & 0 deletions src/main/java/com/checkout/payments/ShippingDetailsMethods.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.checkout.payments;

import com.google.gson.annotations.SerializedName;

public enum ShippingDetailsMethods {

@SerializedName("Digital")
DIGITAL,

@SerializedName("PickUp")
PICK_UP,

@SerializedName("BillingAddress")
BILLING_ADDRESS,

@SerializedName("OtherAddress")
OTHER_ADDRESS,
}
18 changes: 18 additions & 0 deletions src/main/java/com/checkout/payments/ShippingDetailsTimeframe.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.checkout.payments;

import com.google.gson.annotations.SerializedName;

public enum ShippingDetailsTimeframe {

@SerializedName("ElectronicDelivery")
ELECTRONIC_DELIVERY,

@SerializedName("SameDay")
SAME_DAY,

@SerializedName("Overnight")
OVERNIGHT,

@SerializedName("TwoDayOrMore")
TWO_DAY_OR_MORE
}

0 comments on commit 5a128fa

Please sign in to comment.