diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 7e6e244735c..2c2c716cf65 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -16e50491e9d896cb53da4a46080b4333741b76cb \ No newline at end of file +4dc7f7397bbc766a67a417a5f9797ace835b95e1 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7073706edf3..0ad3982f29f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2217 \ No newline at end of file +v2222 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/ApplicationFee.java b/src/main/java/com/stripe/model/ApplicationFee.java index 78f77cc748f..e06b478ca7e 100644 --- a/src/main/java/com/stripe/model/ApplicationFee.java +++ b/src/main/java/com/stripe/model/ApplicationFee.java @@ -328,6 +328,10 @@ public static class FeeSource extends StripeObject { @SerializedName("charge") String charge; + /** PaymentRecord ID that created this application fee. */ + @SerializedName("payment_record") + String paymentRecord; + /** Payout ID that created this application fee. */ @SerializedName("payout") String payout; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index f4740007709..605c4b209f0 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -3293,6 +3293,10 @@ public static class PaymentDetails extends StripeObject { @SerializedName("event_details") EventDetails eventDetails; + /** Fleet data for this PaymentIntent. */ + @SerializedName("fleet_data") + List fleetData; + @SerializedName("flight_data") List flightData; @@ -4014,6 +4018,82 @@ public static class Recipient extends StripeObject { } } + /** + * For more details about FleetDatum, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FleetDatum extends StripeObject { + @SerializedName("primary_fuel_fields") + PrimaryFuelFields primaryFuelFields; + + @SerializedName("station") + Station station; + + @SerializedName("vat") + Vat vat; + + /** + * For more details about PrimaryFuelFields, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryFuelFields extends StripeObject { + /** The fuel brand. */ + @SerializedName("brand") + String brand; + } + + /** + * For more details about Station, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Station extends StripeObject { + /** Additional contact information for the station. */ + @SerializedName("additional_contact_info") + String additionalContactInfo; + + /** The customer service phone number of the station. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** The partner ID code of the station. */ + @SerializedName("partner_id_code") + String partnerIdCode; + + /** The phone number of the station. */ + @SerializedName("phone_number") + String phoneNumber; + + @SerializedName("service_location") + com.stripe.model.Address serviceLocation; + + /** The URL of the station. */ + @SerializedName("url") + String url; + } + + /** + * For more details about Vat, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Vat extends StripeObject { + /** Indicates the merchant's agreement for Invoice on Behalf (IOB) VAT processing. */ + @SerializedName("iob_indicator") + String iobIndicator; + } + } + /** * For more details about FlightDatum, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java index 28aac26eba8..3ee1637b76f 100644 --- a/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java +++ b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java @@ -158,6 +158,26 @@ public static class PaymentMethodOptions extends StripeObject { public static class Card extends StripeObject { @SerializedName("commodity_code") String commodityCode; + + @SerializedName("fleet_data") + FleetData fleetData; + + /** + * For more details about FleetData, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FleetData extends StripeObject { + /** The type of product being purchased at this line item. */ + @SerializedName("product_type") + String productType; + + /** The type of service received at the acceptor location. */ + @SerializedName("service_type") + String serviceType; + } } /** diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 5f29c70747b..81a47966329 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -262,6 +262,10 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

One of {@code completed}, {@code expired}, or {@code open}. + *

One of {@code completed}, {@code expired}, {@code open}, or {@code requires_action}. */ @SerializedName("status") String status; diff --git a/src/main/java/com/stripe/model/radar/CustomerEvaluation.java b/src/main/java/com/stripe/model/radar/CustomerEvaluation.java index 27c22cadc9a..c36eb80648c 100644 --- a/src/main/java/com/stripe/model/radar/CustomerEvaluation.java +++ b/src/main/java/com/stripe/model/radar/CustomerEvaluation.java @@ -29,11 +29,15 @@ public class CustomerEvaluation extends ApiResource implements HasId { @SerializedName("created_at") Long createdAt; - /** The ID of the Stripe customer the customer evaluation is associated with. */ + /** The ID of the Customer to associate with this CustomerEvaluation. */ @SerializedName("customer") String customer; - /** The type of evaluation event. */ + /** + * The type of evaluation event. + * + *

One of {@code login}, or {@code registration}. + */ @SerializedName("event_type") String eventType; @@ -61,7 +65,7 @@ public class CustomerEvaluation extends ApiResource implements HasId { @SerializedName("object") String object; - /** A hash of signal objects providing Radar's evaluation for the lifecycle event. */ + /** A hash of signal objects providing Radar's evaluation of the customer. */ @SerializedName("signals") Signals signals; @@ -203,11 +207,16 @@ public static class AccountSharing extends StripeObject { @SerializedName("evaluated_at") Long evaluatedAt; - /** The risk level for this signal. */ + /** + * The risk level for this signal. + * + *

One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code + * not_assessed}, or {@code unknown}. + */ @SerializedName("risk_level") String riskLevel; - /** Score for this signal (float between 0.0-100.0). */ + /** Score for this signal (between 0.0 and 100.0). */ @SerializedName("score") BigDecimal score; } @@ -224,11 +233,16 @@ public static class MultiAccounting extends StripeObject { @SerializedName("evaluated_at") Long evaluatedAt; - /** The risk level for this signal. */ + /** + * The risk level for this signal. + * + *

One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code + * not_assessed}, or {@code unknown}. + */ @SerializedName("risk_level") String riskLevel; - /** Score for this signal (float between 0.0-100.0). */ + /** Score for this signal (between 0.0 and 100.0). */ @SerializedName("score") BigDecimal score; } diff --git a/src/main/java/com/stripe/model/radar/PaymentEvaluation.java b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java index bc881239003..fa67e199d3e 100644 --- a/src/main/java/com/stripe/model/radar/PaymentEvaluation.java +++ b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java @@ -151,6 +151,13 @@ public static PaymentEvaluation create( @Setter @EqualsAndHashCode(callSuper = false) public static class ClientDeviceMetadataDetails extends StripeObject { + /** + * Direct client device attributes such as IP address and user agent. Use this as an alternative + * to radar_session when a Radar Session isn't available. + */ + @SerializedName("data") + Data data; + /** * ID for the Radar Session associated with the payment evaluation. A Radar Session is a snapshot of the @@ -159,6 +166,35 @@ public static class ClientDeviceMetadataDetails extends StripeObject { */ @SerializedName("radar_session") String radarSession; + + /** + * Direct client device attributes such as IP address and user agent. Use this as an alternative + * to radar_session when a Radar Session isn't available. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Data extends StripeObject { + /** The IP address of the client device. */ + @SerializedName("ip") + String ip; + + /** Pasted fields from the checkout flow. */ + @SerializedName("pasted_fields") + List pastedFields; + + /** The referrer of the client device. */ + @SerializedName("referrer") + String referrer; + + /** The time on page in milliseconds. */ + @SerializedName("time_on_page_ms") + Long timeOnPageMs; + + /** The user agent of the client device. */ + @SerializedName("user_agent") + String userAgent; + } } /** Customer details attached to this payment evaluation. */ diff --git a/src/main/java/com/stripe/param/ChargeCaptureParams.java b/src/main/java/com/stripe/param/ChargeCaptureParams.java index 4a495e62578..bd8d13e892c 100644 --- a/src/main/java/com/stripe/param/ChargeCaptureParams.java +++ b/src/main/java/com/stripe/param/ChargeCaptureParams.java @@ -332,6 +332,10 @@ public static class PaymentDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Fleet data for this PaymentIntent. */ + @SerializedName("fleet_data") + Object fleetData; + /** Flight reservation details for this PaymentIntent. */ @SerializedName("flight") Flight flight; @@ -373,6 +377,7 @@ private PaymentDetails( Object customerReference, EventDetails eventDetails, Map extraParams, + Object fleetData, Flight flight, Object flightData, Lodging lodging, @@ -385,6 +390,7 @@ private PaymentDetails( this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; + this.fleetData = fleetData; this.flight = flight; this.flightData = flightData; this.lodging = lodging; @@ -409,6 +415,8 @@ public static class Builder { private Map extraParams; + private Object fleetData; + private Flight flight; private Object flightData; @@ -431,6 +439,7 @@ public ChargeCaptureParams.PaymentDetails build() { this.customerReference, this.eventDetails, this.extraParams, + this.fleetData, this.flight, this.flightData, this.lodging, @@ -543,6 +552,46 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Add an element to `fleetData` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFleetData(ChargeCaptureParams.PaymentDetails.FleetData element) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData).add(element); + return this; + } + + /** + * Add all elements to `fleetData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeCaptureParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFleetData(List elements) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData).addAll(elements); + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData(EmptyParam fleetData) { + this.fleetData = fleetData; + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData(List fleetData) { + this.fleetData = fleetData; + return this; + } + /** Flight reservation details for this PaymentIntent. */ public Builder setFlight(ChargeCaptureParams.PaymentDetails.Flight flight) { this.flight = flight; @@ -5047,6 +5096,1012 @@ public enum Mode implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Primary fuel fields for the transaction. */ + @SerializedName("primary_fuel_fields") + PrimaryFuelFields primaryFuelFields; + + /** Station and acceptor location details. */ + @SerializedName("station") + Station station; + + /** VAT and Invoice on Behalf (IOB) details. */ + @SerializedName("vat") + Vat vat; + + private FleetData( + Map extraParams, + PrimaryFuelFields primaryFuelFields, + Station station, + Vat vat) { + this.extraParams = extraParams; + this.primaryFuelFields = primaryFuelFields; + this.station = station; + this.vat = vat; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PrimaryFuelFields primaryFuelFields; + + private Station station; + + private Vat vat; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FleetData build() { + return new ChargeCaptureParams.PaymentDetails.FleetData( + this.extraParams, this.primaryFuelFields, this.station, this.vat); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.FleetData#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.FleetData#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Primary fuel fields for the transaction. */ + public Builder setPrimaryFuelFields( + ChargeCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields primaryFuelFields) { + this.primaryFuelFields = primaryFuelFields; + return this; + } + + /** Station and acceptor location details. */ + public Builder setStation(ChargeCaptureParams.PaymentDetails.FleetData.Station station) { + this.station = station; + return this; + } + + /** VAT and Invoice on Behalf (IOB) details. */ + public Builder setVat(ChargeCaptureParams.PaymentDetails.FleetData.Vat vat) { + this.vat = vat; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryFuelFields { + /** The fuel brand. */ + @SerializedName("brand") + Brand brand; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PrimaryFuelFields(Brand brand, Map extraParams) { + this.brand = brand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Brand brand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields build() { + return new ChargeCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields( + this.brand, this.extraParams); + } + + /** The fuel brand. */ + public Builder setBrand( + ChargeCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields.Brand brand) { + this.brand = brand; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * ChargeCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * ChargeCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Brand implements ApiRequestParams.EnumParam { + @SerializedName("aafes") + AAFES("aafes"), + + @SerializedName("amerada_hess") + AMERADA_HESS("amerada_hess"), + + @SerializedName("amoco_canada") + AMOCO_CANADA("amoco_canada"), + + @SerializedName("amoco_petroleum_products") + AMOCO_PETROLEUM_PRODUCTS("amoco_petroleum_products"), + + @SerializedName("arco_products") + ARCO_PRODUCTS("arco_products"), + + @SerializedName("asda") + ASDA("asda"), + + @SerializedName("ashland_oil") + ASHLAND_OIL("ashland_oil"), + + @SerializedName("bfl") + BFL("bfl"), + + @SerializedName("bp_mobil") + BP_MOBIL("bp_mobil"), + + @SerializedName("bp_oil") + BP_OIL("bp_oil"), + + @SerializedName("burrnah_major") + BURRNAH_MAJOR("burrnah_major"), + + @SerializedName("butler_arndale") + BUTLER_ARNDALE("butler_arndale"), + + @SerializedName("canadian_tire") + CANADIAN_TIRE("canadian_tire"), + + @SerializedName("canadian_turbo") + CANADIAN_TURBO("canadian_turbo"), + + @SerializedName("caseys_general_store") + CASEYS_GENERAL_STORE("caseys_general_store"), + + @SerializedName("cenex") + CENEX("cenex"), + + @SerializedName("chevron_canada") + CHEVRON_CANADA("chevron_canada"), + + @SerializedName("chevron_usa") + CHEVRON_USA("chevron_usa"), + + @SerializedName("circle_k_stores") + CIRCLE_K_STORES("circle_k_stores"), + + @SerializedName("citgo_petroleum") + CITGO_PETROLEUM("citgo_petroleum"), + + @SerializedName("clark_brands") + CLARK_BRANDS("clark_brands"), + + @SerializedName("conoco_canada") + CONOCO_CANADA("conoco_canada"), + + @SerializedName("conoco_inc") + CONOCO_INC("conoco_inc"), + + @SerializedName("crown_central_petroleum") + CROWN_CENTRAL_PETROLEUM("crown_central_petroleum"), + + @SerializedName("diamond_shamrock_inc") + DIAMOND_SHAMROCK_INC("diamond_shamrock_inc"), + + @SerializedName("discount_tire") + DISCOUNT_TIRE("discount_tire"), + + @SerializedName("domo_gas") + DOMO_GAS("domo_gas"), + + @SerializedName("elf") + ELF("elf"), + + @SerializedName("erickson_oil") + ERICKSON_OIL("erickson_oil"), + + @SerializedName("esso") + ESSO("esso"), + + @SerializedName("esso_canada") + ESSO_CANADA("esso_canada"), + + @SerializedName("exxon") + EXXON("exxon"), + + @SerializedName("exxonmobil") + EXXONMOBIL("exxonmobil"), + + @SerializedName("family_express") + FAMILY_EXPRESS("family_express"), + + @SerializedName("fas_gas_oil") + FAS_GAS_OIL("fas_gas_oil"), + + @SerializedName("federated_coop_sonic") + FEDERATED_COOP_SONIC("federated_coop_sonic"), + + @SerializedName("fina") + FINA("fina"), + + @SerializedName("fina_inc") + FINA_INC("fina_inc"), + + @SerializedName("fkg_oil") + FKG_OIL("fkg_oil"), + + @SerializedName("flare") + FLARE("flare"), + + @SerializedName("flying_j_inc") + FLYING_J_INC("flying_j_inc"), + + @SerializedName("gas_america") + GAS_AMERICA("gas_america"), + + @SerializedName("gate_petroleum") + GATE_PETROLEUM("gate_petroleum"), + + @SerializedName("getty_petroleum") + GETTY_PETROLEUM("getty_petroleum"), + + @SerializedName("giant_eagle") + GIANT_EAGLE("giant_eagle"), + + @SerializedName("grow_mark_inc") + GROW_MARK_INC("grow_mark_inc"), + + @SerializedName("gulf") + GULF("gulf"), + + @SerializedName("gulf_canada") + GULF_CANADA("gulf_canada"), + + @SerializedName("gulf_chevron") + GULF_CHEVRON("gulf_chevron"), + + @SerializedName("handy_way_food") + HANDY_WAY_FOOD("handy_way_food"), + + @SerializedName("heron") + HERON("heron"), + + @SerializedName("holiday_stores") + HOLIDAY_STORES("holiday_stores"), + + @SerializedName("home_depot") + HOME_DEPOT("home_depot"), + + @SerializedName("husky") + HUSKY("husky"), + + @SerializedName("hyvees") + HYVEES("hyvees"), + + @SerializedName("irving") + IRVING("irving"), + + @SerializedName("irving_oil") + IRVING_OIL("irving_oil"), + + @SerializedName("j_sainsbury") + J_SAINSBURY("j_sainsbury"), + + @SerializedName("jet_conoco") + JET_CONOCO("jet_conoco"), + + @SerializedName("krogers") + KROGERS("krogers"), + + @SerializedName("kuwait") + KUWAIT("kuwait"), + + @SerializedName("kwik_trip_inc") + KWIK_TRIP_INC("kwik_trip_inc"), + + @SerializedName("lassus") + LASSUS("lassus"), + + @SerializedName("loves_country_stores") + LOVES_COUNTRY_STORES("loves_country_stores"), + + @SerializedName("mapco_express_inc") + MAPCO_EXPRESS_INC("mapco_express_inc"), + + @SerializedName("marathon_oil") + MARATHON_OIL("marathon_oil"), + + @SerializedName("martin_bailey_inc_dba_hucks") + MARTIN_BAILEY_INC_DBA_HUCKS("martin_bailey_inc_dba_hucks"), + + @SerializedName("maxol") + MAXOL("maxol"), + + @SerializedName("meineke") + MEINEKE("meineke"), + + @SerializedName("mfa") + MFA("mfa"), + + @SerializedName("mohawk") + MOHAWK("mohawk"), + + @SerializedName("mr_gas") + MR_GAS("mr_gas"), + + @SerializedName("murco") + MURCO("murco"), + + @SerializedName("murphy_oil_canada") + MURPHY_OIL_CANADA("murphy_oil_canada"), + + @SerializedName("murphy_oil_usa_inc") + MURPHY_OIL_USA_INC("murphy_oil_usa_inc"), + + @SerializedName("nexcom") + NEXCOM("nexcom"), + + @SerializedName("nordstrom_oil") + NORDSTROM_OIL("nordstrom_oil"), + + @SerializedName("olco") + OLCO("olco"), + + @SerializedName("pdq_store") + PDQ_STORE("pdq_store"), + + @SerializedName("pennzoil_products_inc") + PENNZOIL_PRODUCTS_INC("pennzoil_products_inc"), + + @SerializedName("petro") + PETRO("petro"), + + @SerializedName("petro_canada") + PETRO_CANADA("petro_canada"), + + @SerializedName("petro_t") + PETRO_T("petro_t"), + + @SerializedName("phillips") + PHILLIPS("phillips"), + + @SerializedName("pilot") + PILOT("pilot"), + + @SerializedName("pioneer") + PIONEER("pioneer"), + + @SerializedName("pure_oil") + PURE_OIL("pure_oil"), + + @SerializedName("quaker_state") + QUAKER_STATE("quaker_state"), + + @SerializedName("quarles_oil") + QUARLES_OIL("quarles_oil"), + + @SerializedName("quiktrip") + QUIKTRIP("quiktrip"), + + @SerializedName("racetrac_petroleum_inc") + RACETRAC_PETROLEUM_INC("racetrac_petroleum_inc"), + + @SerializedName("raceway_petroleum") + RACEWAY_PETROLEUM("raceway_petroleum"), + + @SerializedName("repsol") + REPSOL("repsol"), + + @SerializedName("rudy") + RUDY("rudy"), + + @SerializedName("safeway") + SAFEWAY("safeway"), + + @SerializedName("seven_eleven") + SEVEN_ELEVEN("seven_eleven"), + + @SerializedName("sheetz") + SHEETZ("sheetz"), + + @SerializedName("shell") + SHELL("shell"), + + @SerializedName("shell_canada") + SHELL_CANADA("shell_canada"), + + @SerializedName("shell_oil") + SHELL_OIL("shell_oil"), + + @SerializedName("sinclair_oil") + SINCLAIR_OIL("sinclair_oil"), + + @SerializedName("southland_oil") + SOUTHLAND_OIL("southland_oil"), + + @SerializedName("spar") + SPAR("spar"), + + @SerializedName("speedway") + SPEEDWAY("speedway"), + + @SerializedName("sun_company_inc") + SUN_COMPANY_INC("sun_company_inc"), + + @SerializedName("suncor_sunoco_canada") + SUNCOR_SUNOCO_CANADA("suncor_sunoco_canada"), + + @SerializedName("tempo") + TEMPO("tempo"), + + @SerializedName("tesco") + TESCO("tesco"), + + @SerializedName("tesoro_alaska") + TESORO_ALASKA("tesoro_alaska"), + + @SerializedName("texaco") + TEXACO("texaco"), + + @SerializedName("the_pantry_inc") + THE_PANTRY_INC("the_pantry_inc"), + + @SerializedName("thornton_oil") + THORNTON_OIL("thornton_oil"), + + @SerializedName("tosco") + TOSCO("tosco"), + + @SerializedName("total") + TOTAL("total"), + + @SerializedName("travel_centers_of_america") + TRAVEL_CENTERS_OF_AMERICA("travel_centers_of_america"), + + @SerializedName("uk") + UK("uk"), + + @SerializedName("ultramar_canada") + ULTRAMAR_CANADA("ultramar_canada"), + + @SerializedName("unbranded_or_unassigned") + UNBRANDED_OR_UNASSIGNED("unbranded_or_unassigned"), + + @SerializedName("unbranded_unassigned") + UNBRANDED_UNASSIGNED("unbranded_unassigned"), + + @SerializedName("union_76") + UNION_76("union_76"), + + @SerializedName("united_dairy_farmer") + UNITED_DAIRY_FARMER("united_dairy_farmer"), + + @SerializedName("united_refining_kwikfill") + UNITED_REFINING_KWIKFILL("united_refining_kwikfill"), + + @SerializedName("us_oil") + US_OIL("us_oil"), + + @SerializedName("usa_petroleum") + USA_PETROLEUM("usa_petroleum"), + + @SerializedName("valvoline") + VALVOLINE("valvoline"), + + @SerializedName("vg") + VG("vg"), + + @SerializedName("w_morrison") + W_MORRISON("w_morrison"), + + @SerializedName("warren_equities") + WARREN_EQUITIES("warren_equities"), + + @SerializedName("wawa") + WAWA("wawa"), + + @SerializedName("western_energetix") + WESTERN_ENERGETIX("western_energetix"), + + @SerializedName("wilco") + WILCO("wilco"), + + @SerializedName("zions") + ZIONS("zions"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Brand(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Station { + /** Additional contact information for the station. */ + @SerializedName("additional_contact_info") + String additionalContactInfo; + + /** The customer service phone number of the station. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The partner ID code of the station. */ + @SerializedName("partner_id_code") + String partnerIdCode; + + /** The phone number of the station. */ + @SerializedName("phone_number") + String phoneNumber; + + /** The physical location of the station. */ + @SerializedName("service_location") + ServiceLocation serviceLocation; + + /** The URL of the station. */ + @SerializedName("url") + String url; + + private Station( + String additionalContactInfo, + String customerServicePhoneNumber, + Map extraParams, + String partnerIdCode, + String phoneNumber, + ServiceLocation serviceLocation, + String url) { + this.additionalContactInfo = additionalContactInfo; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.extraParams = extraParams; + this.partnerIdCode = partnerIdCode; + this.phoneNumber = phoneNumber; + this.serviceLocation = serviceLocation; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String additionalContactInfo; + + private String customerServicePhoneNumber; + + private Map extraParams; + + private String partnerIdCode; + + private String phoneNumber; + + private ServiceLocation serviceLocation; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FleetData.Station build() { + return new ChargeCaptureParams.PaymentDetails.FleetData.Station( + this.additionalContactInfo, + this.customerServicePhoneNumber, + this.extraParams, + this.partnerIdCode, + this.phoneNumber, + this.serviceLocation, + this.url); + } + + /** Additional contact information for the station. */ + public Builder setAdditionalContactInfo(String additionalContactInfo) { + this.additionalContactInfo = additionalContactInfo; + return this; + } + + /** The customer service phone number of the station. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.FleetData.Station#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.FleetData.Station#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The partner ID code of the station. */ + public Builder setPartnerIdCode(String partnerIdCode) { + this.partnerIdCode = partnerIdCode; + return this; + } + + /** The phone number of the station. */ + public Builder setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** The physical location of the station. */ + public Builder setServiceLocation( + ChargeCaptureParams.PaymentDetails.FleetData.Station.ServiceLocation + serviceLocation) { + this.serviceLocation = serviceLocation; + return this; + } + + /** The URL of the station. */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ServiceLocation { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + + private ServiceLocation( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FleetData.Station.ServiceLocation build() { + return new ChargeCaptureParams.PaymentDetails.FleetData.Station.ServiceLocation( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeCaptureParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vat { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf (IOB) + * VAT processing. + */ + @SerializedName("iob_indicator") + IobIndicator iobIndicator; + + private Vat(Map extraParams, IobIndicator iobIndicator) { + this.extraParams = extraParams; + this.iobIndicator = iobIndicator; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private IobIndicator iobIndicator; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeCaptureParams.PaymentDetails.FleetData.Vat build() { + return new ChargeCaptureParams.PaymentDetails.FleetData.Vat( + this.extraParams, this.iobIndicator); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.FleetData.Vat#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeCaptureParams.PaymentDetails.FleetData.Vat#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf + * (IOB) VAT processing. + */ + public Builder setIobIndicator( + ChargeCaptureParams.PaymentDetails.FleetData.Vat.IobIndicator iobIndicator) { + this.iobIndicator = iobIndicator; + return this; + } + } + + public enum IobIndicator implements ApiRequestParams.EnumParam { + @SerializedName("issuer_to_iob") + ISSUER_TO_IOB("issuer_to_iob"), + + @SerializedName("issuer_to_iob_and_incremental_certification") + ISSUER_TO_IOB_AND_INCREMENTAL_CERTIFICATION( + "issuer_to_iob_and_incremental_certification"), + + @SerializedName("merchant_does_not_agree_to_iob") + MERCHANT_DOES_NOT_AGREE_TO_IOB("merchant_does_not_agree_to_iob"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + IobIndicator(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Flight { diff --git a/src/main/java/com/stripe/param/ChargeUpdateParams.java b/src/main/java/com/stripe/param/ChargeUpdateParams.java index 311c33a51d2..e95dc2add7e 100644 --- a/src/main/java/com/stripe/param/ChargeUpdateParams.java +++ b/src/main/java/com/stripe/param/ChargeUpdateParams.java @@ -479,6 +479,10 @@ public static class PaymentDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Fleet data for this PaymentIntent. */ + @SerializedName("fleet_data") + Object fleetData; + /** Flight reservation details for this PaymentIntent. */ @SerializedName("flight") Flight flight; @@ -520,6 +524,7 @@ private PaymentDetails( Object customerReference, EventDetails eventDetails, Map extraParams, + Object fleetData, Flight flight, Object flightData, Lodging lodging, @@ -532,6 +537,7 @@ private PaymentDetails( this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; + this.fleetData = fleetData; this.flight = flight; this.flightData = flightData; this.lodging = lodging; @@ -556,6 +562,8 @@ public static class Builder { private Map extraParams; + private Object fleetData; + private Flight flight; private Object flightData; @@ -578,6 +586,7 @@ public ChargeUpdateParams.PaymentDetails build() { this.customerReference, this.eventDetails, this.extraParams, + this.fleetData, this.flight, this.flightData, this.lodging, @@ -690,6 +699,46 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Add an element to `fleetData` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFleetData(ChargeUpdateParams.PaymentDetails.FleetData element) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData).add(element); + return this; + } + + /** + * Add all elements to `fleetData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ChargeUpdateParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFleetData(List elements) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData).addAll(elements); + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData(EmptyParam fleetData) { + this.fleetData = fleetData; + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData(List fleetData) { + this.fleetData = fleetData; + return this; + } + /** Flight reservation details for this PaymentIntent. */ public Builder setFlight(ChargeUpdateParams.PaymentDetails.Flight flight) { this.flight = flight; @@ -5672,6 +5721,1086 @@ public enum Mode implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Primary fuel fields for the transaction. */ + @SerializedName("primary_fuel_fields") + PrimaryFuelFields primaryFuelFields; + + /** Station and acceptor location details. */ + @SerializedName("station") + Station station; + + /** VAT and Invoice on Behalf (IOB) details. */ + @SerializedName("vat") + Vat vat; + + private FleetData( + Map extraParams, + PrimaryFuelFields primaryFuelFields, + Station station, + Vat vat) { + this.extraParams = extraParams; + this.primaryFuelFields = primaryFuelFields; + this.station = station; + this.vat = vat; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PrimaryFuelFields primaryFuelFields; + + private Station station; + + private Vat vat; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FleetData build() { + return new ChargeUpdateParams.PaymentDetails.FleetData( + this.extraParams, this.primaryFuelFields, this.station, this.vat); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.FleetData#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.FleetData#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Primary fuel fields for the transaction. */ + public Builder setPrimaryFuelFields( + ChargeUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields primaryFuelFields) { + this.primaryFuelFields = primaryFuelFields; + return this; + } + + /** Station and acceptor location details. */ + public Builder setStation(ChargeUpdateParams.PaymentDetails.FleetData.Station station) { + this.station = station; + return this; + } + + /** VAT and Invoice on Behalf (IOB) details. */ + public Builder setVat(ChargeUpdateParams.PaymentDetails.FleetData.Vat vat) { + this.vat = vat; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryFuelFields { + /** The fuel brand. */ + @SerializedName("brand") + Brand brand; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PrimaryFuelFields(Brand brand, Map extraParams) { + this.brand = brand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Brand brand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields build() { + return new ChargeUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields( + this.brand, this.extraParams); + } + + /** The fuel brand. */ + public Builder setBrand( + ChargeUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields.Brand brand) { + this.brand = brand; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * ChargeUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * ChargeUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Brand implements ApiRequestParams.EnumParam { + @SerializedName("aafes") + AAFES("aafes"), + + @SerializedName("amerada_hess") + AMERADA_HESS("amerada_hess"), + + @SerializedName("amoco_canada") + AMOCO_CANADA("amoco_canada"), + + @SerializedName("amoco_petroleum_products") + AMOCO_PETROLEUM_PRODUCTS("amoco_petroleum_products"), + + @SerializedName("arco_products") + ARCO_PRODUCTS("arco_products"), + + @SerializedName("asda") + ASDA("asda"), + + @SerializedName("ashland_oil") + ASHLAND_OIL("ashland_oil"), + + @SerializedName("bfl") + BFL("bfl"), + + @SerializedName("bp_mobil") + BP_MOBIL("bp_mobil"), + + @SerializedName("bp_oil") + BP_OIL("bp_oil"), + + @SerializedName("burrnah_major") + BURRNAH_MAJOR("burrnah_major"), + + @SerializedName("butler_arndale") + BUTLER_ARNDALE("butler_arndale"), + + @SerializedName("canadian_tire") + CANADIAN_TIRE("canadian_tire"), + + @SerializedName("canadian_turbo") + CANADIAN_TURBO("canadian_turbo"), + + @SerializedName("caseys_general_store") + CASEYS_GENERAL_STORE("caseys_general_store"), + + @SerializedName("cenex") + CENEX("cenex"), + + @SerializedName("chevron_canada") + CHEVRON_CANADA("chevron_canada"), + + @SerializedName("chevron_usa") + CHEVRON_USA("chevron_usa"), + + @SerializedName("circle_k_stores") + CIRCLE_K_STORES("circle_k_stores"), + + @SerializedName("citgo_petroleum") + CITGO_PETROLEUM("citgo_petroleum"), + + @SerializedName("clark_brands") + CLARK_BRANDS("clark_brands"), + + @SerializedName("conoco_canada") + CONOCO_CANADA("conoco_canada"), + + @SerializedName("conoco_inc") + CONOCO_INC("conoco_inc"), + + @SerializedName("crown_central_petroleum") + CROWN_CENTRAL_PETROLEUM("crown_central_petroleum"), + + @SerializedName("diamond_shamrock_inc") + DIAMOND_SHAMROCK_INC("diamond_shamrock_inc"), + + @SerializedName("discount_tire") + DISCOUNT_TIRE("discount_tire"), + + @SerializedName("domo_gas") + DOMO_GAS("domo_gas"), + + @SerializedName("elf") + ELF("elf"), + + @SerializedName("erickson_oil") + ERICKSON_OIL("erickson_oil"), + + @SerializedName("esso") + ESSO("esso"), + + @SerializedName("esso_canada") + ESSO_CANADA("esso_canada"), + + @SerializedName("exxon") + EXXON("exxon"), + + @SerializedName("exxonmobil") + EXXONMOBIL("exxonmobil"), + + @SerializedName("family_express") + FAMILY_EXPRESS("family_express"), + + @SerializedName("fas_gas_oil") + FAS_GAS_OIL("fas_gas_oil"), + + @SerializedName("federated_coop_sonic") + FEDERATED_COOP_SONIC("federated_coop_sonic"), + + @SerializedName("fina") + FINA("fina"), + + @SerializedName("fina_inc") + FINA_INC("fina_inc"), + + @SerializedName("fkg_oil") + FKG_OIL("fkg_oil"), + + @SerializedName("flare") + FLARE("flare"), + + @SerializedName("flying_j_inc") + FLYING_J_INC("flying_j_inc"), + + @SerializedName("gas_america") + GAS_AMERICA("gas_america"), + + @SerializedName("gate_petroleum") + GATE_PETROLEUM("gate_petroleum"), + + @SerializedName("getty_petroleum") + GETTY_PETROLEUM("getty_petroleum"), + + @SerializedName("giant_eagle") + GIANT_EAGLE("giant_eagle"), + + @SerializedName("grow_mark_inc") + GROW_MARK_INC("grow_mark_inc"), + + @SerializedName("gulf") + GULF("gulf"), + + @SerializedName("gulf_canada") + GULF_CANADA("gulf_canada"), + + @SerializedName("gulf_chevron") + GULF_CHEVRON("gulf_chevron"), + + @SerializedName("handy_way_food") + HANDY_WAY_FOOD("handy_way_food"), + + @SerializedName("heron") + HERON("heron"), + + @SerializedName("holiday_stores") + HOLIDAY_STORES("holiday_stores"), + + @SerializedName("home_depot") + HOME_DEPOT("home_depot"), + + @SerializedName("husky") + HUSKY("husky"), + + @SerializedName("hyvees") + HYVEES("hyvees"), + + @SerializedName("irving") + IRVING("irving"), + + @SerializedName("irving_oil") + IRVING_OIL("irving_oil"), + + @SerializedName("j_sainsbury") + J_SAINSBURY("j_sainsbury"), + + @SerializedName("jet_conoco") + JET_CONOCO("jet_conoco"), + + @SerializedName("krogers") + KROGERS("krogers"), + + @SerializedName("kuwait") + KUWAIT("kuwait"), + + @SerializedName("kwik_trip_inc") + KWIK_TRIP_INC("kwik_trip_inc"), + + @SerializedName("lassus") + LASSUS("lassus"), + + @SerializedName("loves_country_stores") + LOVES_COUNTRY_STORES("loves_country_stores"), + + @SerializedName("mapco_express_inc") + MAPCO_EXPRESS_INC("mapco_express_inc"), + + @SerializedName("marathon_oil") + MARATHON_OIL("marathon_oil"), + + @SerializedName("martin_bailey_inc_dba_hucks") + MARTIN_BAILEY_INC_DBA_HUCKS("martin_bailey_inc_dba_hucks"), + + @SerializedName("maxol") + MAXOL("maxol"), + + @SerializedName("meineke") + MEINEKE("meineke"), + + @SerializedName("mfa") + MFA("mfa"), + + @SerializedName("mohawk") + MOHAWK("mohawk"), + + @SerializedName("mr_gas") + MR_GAS("mr_gas"), + + @SerializedName("murco") + MURCO("murco"), + + @SerializedName("murphy_oil_canada") + MURPHY_OIL_CANADA("murphy_oil_canada"), + + @SerializedName("murphy_oil_usa_inc") + MURPHY_OIL_USA_INC("murphy_oil_usa_inc"), + + @SerializedName("nexcom") + NEXCOM("nexcom"), + + @SerializedName("nordstrom_oil") + NORDSTROM_OIL("nordstrom_oil"), + + @SerializedName("olco") + OLCO("olco"), + + @SerializedName("pdq_store") + PDQ_STORE("pdq_store"), + + @SerializedName("pennzoil_products_inc") + PENNZOIL_PRODUCTS_INC("pennzoil_products_inc"), + + @SerializedName("petro") + PETRO("petro"), + + @SerializedName("petro_canada") + PETRO_CANADA("petro_canada"), + + @SerializedName("petro_t") + PETRO_T("petro_t"), + + @SerializedName("phillips") + PHILLIPS("phillips"), + + @SerializedName("pilot") + PILOT("pilot"), + + @SerializedName("pioneer") + PIONEER("pioneer"), + + @SerializedName("pure_oil") + PURE_OIL("pure_oil"), + + @SerializedName("quaker_state") + QUAKER_STATE("quaker_state"), + + @SerializedName("quarles_oil") + QUARLES_OIL("quarles_oil"), + + @SerializedName("quiktrip") + QUIKTRIP("quiktrip"), + + @SerializedName("racetrac_petroleum_inc") + RACETRAC_PETROLEUM_INC("racetrac_petroleum_inc"), + + @SerializedName("raceway_petroleum") + RACEWAY_PETROLEUM("raceway_petroleum"), + + @SerializedName("repsol") + REPSOL("repsol"), + + @SerializedName("rudy") + RUDY("rudy"), + + @SerializedName("safeway") + SAFEWAY("safeway"), + + @SerializedName("seven_eleven") + SEVEN_ELEVEN("seven_eleven"), + + @SerializedName("sheetz") + SHEETZ("sheetz"), + + @SerializedName("shell") + SHELL("shell"), + + @SerializedName("shell_canada") + SHELL_CANADA("shell_canada"), + + @SerializedName("shell_oil") + SHELL_OIL("shell_oil"), + + @SerializedName("sinclair_oil") + SINCLAIR_OIL("sinclair_oil"), + + @SerializedName("southland_oil") + SOUTHLAND_OIL("southland_oil"), + + @SerializedName("spar") + SPAR("spar"), + + @SerializedName("speedway") + SPEEDWAY("speedway"), + + @SerializedName("sun_company_inc") + SUN_COMPANY_INC("sun_company_inc"), + + @SerializedName("suncor_sunoco_canada") + SUNCOR_SUNOCO_CANADA("suncor_sunoco_canada"), + + @SerializedName("tempo") + TEMPO("tempo"), + + @SerializedName("tesco") + TESCO("tesco"), + + @SerializedName("tesoro_alaska") + TESORO_ALASKA("tesoro_alaska"), + + @SerializedName("texaco") + TEXACO("texaco"), + + @SerializedName("the_pantry_inc") + THE_PANTRY_INC("the_pantry_inc"), + + @SerializedName("thornton_oil") + THORNTON_OIL("thornton_oil"), + + @SerializedName("tosco") + TOSCO("tosco"), + + @SerializedName("total") + TOTAL("total"), + + @SerializedName("travel_centers_of_america") + TRAVEL_CENTERS_OF_AMERICA("travel_centers_of_america"), + + @SerializedName("uk") + UK("uk"), + + @SerializedName("ultramar_canada") + ULTRAMAR_CANADA("ultramar_canada"), + + @SerializedName("unbranded_or_unassigned") + UNBRANDED_OR_UNASSIGNED("unbranded_or_unassigned"), + + @SerializedName("unbranded_unassigned") + UNBRANDED_UNASSIGNED("unbranded_unassigned"), + + @SerializedName("union_76") + UNION_76("union_76"), + + @SerializedName("united_dairy_farmer") + UNITED_DAIRY_FARMER("united_dairy_farmer"), + + @SerializedName("united_refining_kwikfill") + UNITED_REFINING_KWIKFILL("united_refining_kwikfill"), + + @SerializedName("us_oil") + US_OIL("us_oil"), + + @SerializedName("usa_petroleum") + USA_PETROLEUM("usa_petroleum"), + + @SerializedName("valvoline") + VALVOLINE("valvoline"), + + @SerializedName("vg") + VG("vg"), + + @SerializedName("w_morrison") + W_MORRISON("w_morrison"), + + @SerializedName("warren_equities") + WARREN_EQUITIES("warren_equities"), + + @SerializedName("wawa") + WAWA("wawa"), + + @SerializedName("western_energetix") + WESTERN_ENERGETIX("western_energetix"), + + @SerializedName("wilco") + WILCO("wilco"), + + @SerializedName("zions") + ZIONS("zions"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Brand(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Station { + /** Additional contact information for the station. */ + @SerializedName("additional_contact_info") + Object additionalContactInfo; + + /** The customer service phone number of the station. */ + @SerializedName("customer_service_phone_number") + Object customerServicePhoneNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The partner ID code of the station. */ + @SerializedName("partner_id_code") + Object partnerIdCode; + + /** The phone number of the station. */ + @SerializedName("phone_number") + Object phoneNumber; + + /** The physical location of the station. */ + @SerializedName("service_location") + ServiceLocation serviceLocation; + + /** The URL of the station. */ + @SerializedName("url") + Object url; + + private Station( + Object additionalContactInfo, + Object customerServicePhoneNumber, + Map extraParams, + Object partnerIdCode, + Object phoneNumber, + ServiceLocation serviceLocation, + Object url) { + this.additionalContactInfo = additionalContactInfo; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.extraParams = extraParams; + this.partnerIdCode = partnerIdCode; + this.phoneNumber = phoneNumber; + this.serviceLocation = serviceLocation; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object additionalContactInfo; + + private Object customerServicePhoneNumber; + + private Map extraParams; + + private Object partnerIdCode; + + private Object phoneNumber; + + private ServiceLocation serviceLocation; + + private Object url; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FleetData.Station build() { + return new ChargeUpdateParams.PaymentDetails.FleetData.Station( + this.additionalContactInfo, + this.customerServicePhoneNumber, + this.extraParams, + this.partnerIdCode, + this.phoneNumber, + this.serviceLocation, + this.url); + } + + /** Additional contact information for the station. */ + public Builder setAdditionalContactInfo(String additionalContactInfo) { + this.additionalContactInfo = additionalContactInfo; + return this; + } + + /** Additional contact information for the station. */ + public Builder setAdditionalContactInfo(EmptyParam additionalContactInfo) { + this.additionalContactInfo = additionalContactInfo; + return this; + } + + /** The customer service phone number of the station. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** The customer service phone number of the station. */ + public Builder setCustomerServicePhoneNumber(EmptyParam customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.FleetData.Station#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.FleetData.Station#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The partner ID code of the station. */ + public Builder setPartnerIdCode(String partnerIdCode) { + this.partnerIdCode = partnerIdCode; + return this; + } + + /** The partner ID code of the station. */ + public Builder setPartnerIdCode(EmptyParam partnerIdCode) { + this.partnerIdCode = partnerIdCode; + return this; + } + + /** The phone number of the station. */ + public Builder setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** The phone number of the station. */ + public Builder setPhoneNumber(EmptyParam phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** The physical location of the station. */ + public Builder setServiceLocation( + ChargeUpdateParams.PaymentDetails.FleetData.Station.ServiceLocation serviceLocation) { + this.serviceLocation = serviceLocation; + return this; + } + + /** The URL of the station. */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + + /** The URL of the station. */ + public Builder setUrl(EmptyParam url) { + this.url = url; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ServiceLocation { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + Object state; + + private ServiceLocation( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FleetData.Station.ServiceLocation build() { + return new ChargeUpdateParams.PaymentDetails.FleetData.Station.ServiceLocation( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * ChargeUpdateParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vat { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf (IOB) + * VAT processing. + */ + @SerializedName("iob_indicator") + IobIndicator iobIndicator; + + private Vat(Map extraParams, IobIndicator iobIndicator) { + this.extraParams = extraParams; + this.iobIndicator = iobIndicator; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private IobIndicator iobIndicator; + + /** Finalize and obtain parameter instance from this builder. */ + public ChargeUpdateParams.PaymentDetails.FleetData.Vat build() { + return new ChargeUpdateParams.PaymentDetails.FleetData.Vat( + this.extraParams, this.iobIndicator); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.FleetData.Vat#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ChargeUpdateParams.PaymentDetails.FleetData.Vat#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf + * (IOB) VAT processing. + */ + public Builder setIobIndicator( + ChargeUpdateParams.PaymentDetails.FleetData.Vat.IobIndicator iobIndicator) { + this.iobIndicator = iobIndicator; + return this; + } + } + + public enum IobIndicator implements ApiRequestParams.EnumParam { + @SerializedName("issuer_to_iob") + ISSUER_TO_IOB("issuer_to_iob"), + + @SerializedName("issuer_to_iob_and_incremental_certification") + ISSUER_TO_IOB_AND_INCREMENTAL_CERTIFICATION( + "issuer_to_iob_and_incremental_certification"), + + @SerializedName("merchant_does_not_agree_to_iob") + MERCHANT_DOES_NOT_AGREE_TO_IOB("merchant_does_not_agree_to_iob"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + IobIndicator(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Flight { diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 15d3a6a8239..efa477d90b8 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -1032,9 +1032,14 @@ public static class Card { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Card(String commodityCode, Map extraParams) { + /** Fleet data for this line item. */ + @SerializedName("fleet_data") + FleetData fleetData; + + private Card(String commodityCode, Map extraParams, FleetData fleetData) { this.commodityCode = commodityCode; this.extraParams = extraParams; + this.fleetData = fleetData; } public static Builder builder() { @@ -1046,11 +1051,13 @@ public static class Builder { private Map extraParams; + private FleetData fleetData; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Card build() { return new PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions - .Card(this.commodityCode, this.extraParams); + .Card(this.commodityCode, this.extraParams, this.fleetData); } /** @@ -1091,6 +1098,267 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** Fleet data for this line item. */ + public Builder setFleetData( + PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData + fleetData) { + this.fleetData = fleetData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The type of product being purchased at this line item. */ + @SerializedName("product_type") + ProductType productType; + + /** The type of service received at the acceptor location. */ + @SerializedName("service_type") + ServiceType serviceType; + + private FleetData( + Map extraParams, ProductType productType, ServiceType serviceType) { + this.extraParams = extraParams; + this.productType = productType; + this.serviceType = serviceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProductType productType; + + private ServiceType serviceType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData + build() { + return new PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions + .Card.FleetData(this.extraParams, this.productType, this.serviceType); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The type of product being purchased at this line item. + */ + public Builder setProductType( + PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData.ProductType + productType) { + this.productType = productType; + return this; + } + + /** The type of service received at the acceptor location. */ + public Builder setServiceType( + PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData.ServiceType + serviceType) { + this.serviceType = serviceType; + return this; + } + } + + public enum ProductType implements ApiRequestParams.EnumParam { + @SerializedName("air_conditioning_service") + AIR_CONDITIONING_SERVICE("air_conditioning_service"), + + @SerializedName("alcohol") + ALCOHOL("alcohol"), + + @SerializedName("aviation_fuel_premium") + AVIATION_FUEL_PREMIUM("aviation_fuel_premium"), + + @SerializedName("aviation_fuel_regular") + AVIATION_FUEL_REGULAR("aviation_fuel_regular"), + + @SerializedName("car_care_detailing") + CAR_CARE_DETAILING("car_care_detailing"), + + @SerializedName("compressed_natural_gas") + COMPRESSED_NATURAL_GAS("compressed_natural_gas"), + + @SerializedName("deli") + DELI("deli"), + + @SerializedName("food_service") + FOOD_SERVICE("food_service"), + + @SerializedName("green_gasoline_mid_plus") + GREEN_GASOLINE_MID_PLUS("green_gasoline_mid_plus"), + + @SerializedName("green_gasoline_premium_super") + GREEN_GASOLINE_PREMIUM_SUPER("green_gasoline_premium_super"), + + @SerializedName("green_gasoline_regular") + GREEN_GASOLINE_REGULAR("green_gasoline_regular"), + + @SerializedName("grocery") + GROCERY("grocery"), + + @SerializedName("liquid_natural_gas") + LIQUID_NATURAL_GAS("liquid_natural_gas"), + + @SerializedName("liquid_propane_gas") + LIQUID_PROPANE_GAS("liquid_propane_gas"), + + @SerializedName("lodging") + LODGING("lodging"), + + @SerializedName("marine_diesel") + MARINE_DIESEL("marine_diesel"), + + @SerializedName("marine_fuel") + MARINE_FUEL("marine_fuel"), + + @SerializedName("merchandise") + MERCHANDISE("merchandise"), + + @SerializedName("mid_plus") + MID_PLUS("mid_plus"), + + @SerializedName("mid_plus_ethanol") + MID_PLUS_ETHANOL("mid_plus_ethanol"), + + @SerializedName("miscellaneous_aviation_products_services") + MISCELLANEOUS_AVIATION_PRODUCTS_SERVICES("miscellaneous_aviation_products_services"), + + @SerializedName("miscellaneous_fuel") + MISCELLANEOUS_FUEL("miscellaneous_fuel"), + + @SerializedName("miscellaneous_marine_products_services") + MISCELLANEOUS_MARINE_PRODUCTS_SERVICES("miscellaneous_marine_products_services"), + + @SerializedName("miscellaneous_vehicle_products_services") + MISCELLANEOUS_VEHICLE_PRODUCTS_SERVICES("miscellaneous_vehicle_products_services"), + + @SerializedName("packaged_beverage") + PACKAGED_BEVERAGE("packaged_beverage"), + + @SerializedName("premium_diesel") + PREMIUM_DIESEL("premium_diesel"), + + @SerializedName("premium_super") + PREMIUM_SUPER("premium_super"), + + @SerializedName("premium_super_ethanol") + PREMIUM_SUPER_ETHANOL("premium_super_ethanol"), + + @SerializedName("preventative_maintenance") + PREVENTATIVE_MAINTENANCE("preventative_maintenance"), + + @SerializedName("regular") + REGULAR("regular"), + + @SerializedName("regular_diesel") + REGULAR_DIESEL("regular_diesel"), + + @SerializedName("regular_ethanol") + REGULAR_ETHANOL("regular_ethanol"), + + @SerializedName("repairs") + REPAIRS("repairs"), + + @SerializedName("self_service_car_wash") + SELF_SERVICE_CAR_WASH("self_service_car_wash"), + + @SerializedName("shower") + SHOWER("shower"), + + @SerializedName("store_service") + STORE_SERVICE("store_service"), + + @SerializedName("tobacco") + TOBACCO("tobacco"), + + @SerializedName("vehicle_accessories") + VEHICLE_ACCESSORIES("vehicle_accessories"), + + @SerializedName("vehicle_parking") + VEHICLE_PARKING("vehicle_parking"), + + @SerializedName("vehicle_parts") + VEHICLE_PARTS("vehicle_parts"), + + @SerializedName("wash_out") + WASH_OUT("wash_out"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProductType(String value) { + this.value = value; + } + } + + public enum ServiceType implements ApiRequestParams.EnumParam { + @SerializedName("full_service") + FULL_SERVICE("full_service"), + + @SerializedName("high_speed_diesel") + HIGH_SPEED_DIESEL("high_speed_diesel"), + + @SerializedName("non_fuel_only") + NON_FUEL_ONLY("non_fuel_only"), + + @SerializedName("self_service") + SELF_SERVICE("self_service"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceType(String value) { + this.value = value; + } + } } } @@ -2142,6 +2410,10 @@ public static class PaymentDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Fleet data for this PaymentIntent. */ + @SerializedName("fleet_data") + Object fleetData; + /** Flight reservation details for this PaymentIntent. */ @SerializedName("flight") Flight flight; @@ -2183,6 +2455,7 @@ private PaymentDetails( Object customerReference, EventDetails eventDetails, Map extraParams, + Object fleetData, Flight flight, Object flightData, Lodging lodging, @@ -2195,6 +2468,7 @@ private PaymentDetails( this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; + this.fleetData = fleetData; this.flight = flight; this.flightData = flightData; this.lodging = lodging; @@ -2219,6 +2493,8 @@ public static class Builder { private Map extraParams; + private Object fleetData; + private Flight flight; private Object flightData; @@ -2241,6 +2517,7 @@ public PaymentIntentCaptureParams.PaymentDetails build() { this.customerReference, this.eventDetails, this.extraParams, + this.fleetData, this.flight, this.flightData, this.lodging, @@ -2359,6 +2636,49 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Add an element to `fleetData` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFleetData(PaymentIntentCaptureParams.PaymentDetails.FleetData element) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData).add(element); + return this; + } + + /** + * Add all elements to `fleetData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFleetData( + List elements) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData) + .addAll(elements); + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData(EmptyParam fleetData) { + this.fleetData = fleetData; + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData( + List fleetData) { + this.fleetData = fleetData; + return this; + } + /** Flight reservation details for this PaymentIntent. */ public Builder setFlight(PaymentIntentCaptureParams.PaymentDetails.Flight flight) { this.flight = flight; @@ -6929,6 +7249,1018 @@ public enum Mode implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Primary fuel fields for the transaction. */ + @SerializedName("primary_fuel_fields") + PrimaryFuelFields primaryFuelFields; + + /** Station and acceptor location details. */ + @SerializedName("station") + Station station; + + /** VAT and Invoice on Behalf (IOB) details. */ + @SerializedName("vat") + Vat vat; + + private FleetData( + Map extraParams, + PrimaryFuelFields primaryFuelFields, + Station station, + Vat vat) { + this.extraParams = extraParams; + this.primaryFuelFields = primaryFuelFields; + this.station = station; + this.vat = vat; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PrimaryFuelFields primaryFuelFields; + + private Station station; + + private Vat vat; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FleetData build() { + return new PaymentIntentCaptureParams.PaymentDetails.FleetData( + this.extraParams, this.primaryFuelFields, this.station, this.vat); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.PaymentDetails.FleetData#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.PaymentDetails.FleetData#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Primary fuel fields for the transaction. */ + public Builder setPrimaryFuelFields( + PaymentIntentCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields + primaryFuelFields) { + this.primaryFuelFields = primaryFuelFields; + return this; + } + + /** Station and acceptor location details. */ + public Builder setStation( + PaymentIntentCaptureParams.PaymentDetails.FleetData.Station station) { + this.station = station; + return this; + } + + /** VAT and Invoice on Behalf (IOB) details. */ + public Builder setVat(PaymentIntentCaptureParams.PaymentDetails.FleetData.Vat vat) { + this.vat = vat; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryFuelFields { + /** The fuel brand. */ + @SerializedName("brand") + Brand brand; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PrimaryFuelFields(Brand brand, Map extraParams) { + this.brand = brand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Brand brand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields build() { + return new PaymentIntentCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields( + this.brand, this.extraParams); + } + + /** The fuel brand. */ + public Builder setBrand( + PaymentIntentCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields.Brand brand) { + this.brand = brand; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Brand implements ApiRequestParams.EnumParam { + @SerializedName("aafes") + AAFES("aafes"), + + @SerializedName("amerada_hess") + AMERADA_HESS("amerada_hess"), + + @SerializedName("amoco_canada") + AMOCO_CANADA("amoco_canada"), + + @SerializedName("amoco_petroleum_products") + AMOCO_PETROLEUM_PRODUCTS("amoco_petroleum_products"), + + @SerializedName("arco_products") + ARCO_PRODUCTS("arco_products"), + + @SerializedName("asda") + ASDA("asda"), + + @SerializedName("ashland_oil") + ASHLAND_OIL("ashland_oil"), + + @SerializedName("bfl") + BFL("bfl"), + + @SerializedName("bp_mobil") + BP_MOBIL("bp_mobil"), + + @SerializedName("bp_oil") + BP_OIL("bp_oil"), + + @SerializedName("burrnah_major") + BURRNAH_MAJOR("burrnah_major"), + + @SerializedName("butler_arndale") + BUTLER_ARNDALE("butler_arndale"), + + @SerializedName("canadian_tire") + CANADIAN_TIRE("canadian_tire"), + + @SerializedName("canadian_turbo") + CANADIAN_TURBO("canadian_turbo"), + + @SerializedName("caseys_general_store") + CASEYS_GENERAL_STORE("caseys_general_store"), + + @SerializedName("cenex") + CENEX("cenex"), + + @SerializedName("chevron_canada") + CHEVRON_CANADA("chevron_canada"), + + @SerializedName("chevron_usa") + CHEVRON_USA("chevron_usa"), + + @SerializedName("circle_k_stores") + CIRCLE_K_STORES("circle_k_stores"), + + @SerializedName("citgo_petroleum") + CITGO_PETROLEUM("citgo_petroleum"), + + @SerializedName("clark_brands") + CLARK_BRANDS("clark_brands"), + + @SerializedName("conoco_canada") + CONOCO_CANADA("conoco_canada"), + + @SerializedName("conoco_inc") + CONOCO_INC("conoco_inc"), + + @SerializedName("crown_central_petroleum") + CROWN_CENTRAL_PETROLEUM("crown_central_petroleum"), + + @SerializedName("diamond_shamrock_inc") + DIAMOND_SHAMROCK_INC("diamond_shamrock_inc"), + + @SerializedName("discount_tire") + DISCOUNT_TIRE("discount_tire"), + + @SerializedName("domo_gas") + DOMO_GAS("domo_gas"), + + @SerializedName("elf") + ELF("elf"), + + @SerializedName("erickson_oil") + ERICKSON_OIL("erickson_oil"), + + @SerializedName("esso") + ESSO("esso"), + + @SerializedName("esso_canada") + ESSO_CANADA("esso_canada"), + + @SerializedName("exxon") + EXXON("exxon"), + + @SerializedName("exxonmobil") + EXXONMOBIL("exxonmobil"), + + @SerializedName("family_express") + FAMILY_EXPRESS("family_express"), + + @SerializedName("fas_gas_oil") + FAS_GAS_OIL("fas_gas_oil"), + + @SerializedName("federated_coop_sonic") + FEDERATED_COOP_SONIC("federated_coop_sonic"), + + @SerializedName("fina") + FINA("fina"), + + @SerializedName("fina_inc") + FINA_INC("fina_inc"), + + @SerializedName("fkg_oil") + FKG_OIL("fkg_oil"), + + @SerializedName("flare") + FLARE("flare"), + + @SerializedName("flying_j_inc") + FLYING_J_INC("flying_j_inc"), + + @SerializedName("gas_america") + GAS_AMERICA("gas_america"), + + @SerializedName("gate_petroleum") + GATE_PETROLEUM("gate_petroleum"), + + @SerializedName("getty_petroleum") + GETTY_PETROLEUM("getty_petroleum"), + + @SerializedName("giant_eagle") + GIANT_EAGLE("giant_eagle"), + + @SerializedName("grow_mark_inc") + GROW_MARK_INC("grow_mark_inc"), + + @SerializedName("gulf") + GULF("gulf"), + + @SerializedName("gulf_canada") + GULF_CANADA("gulf_canada"), + + @SerializedName("gulf_chevron") + GULF_CHEVRON("gulf_chevron"), + + @SerializedName("handy_way_food") + HANDY_WAY_FOOD("handy_way_food"), + + @SerializedName("heron") + HERON("heron"), + + @SerializedName("holiday_stores") + HOLIDAY_STORES("holiday_stores"), + + @SerializedName("home_depot") + HOME_DEPOT("home_depot"), + + @SerializedName("husky") + HUSKY("husky"), + + @SerializedName("hyvees") + HYVEES("hyvees"), + + @SerializedName("irving") + IRVING("irving"), + + @SerializedName("irving_oil") + IRVING_OIL("irving_oil"), + + @SerializedName("j_sainsbury") + J_SAINSBURY("j_sainsbury"), + + @SerializedName("jet_conoco") + JET_CONOCO("jet_conoco"), + + @SerializedName("krogers") + KROGERS("krogers"), + + @SerializedName("kuwait") + KUWAIT("kuwait"), + + @SerializedName("kwik_trip_inc") + KWIK_TRIP_INC("kwik_trip_inc"), + + @SerializedName("lassus") + LASSUS("lassus"), + + @SerializedName("loves_country_stores") + LOVES_COUNTRY_STORES("loves_country_stores"), + + @SerializedName("mapco_express_inc") + MAPCO_EXPRESS_INC("mapco_express_inc"), + + @SerializedName("marathon_oil") + MARATHON_OIL("marathon_oil"), + + @SerializedName("martin_bailey_inc_dba_hucks") + MARTIN_BAILEY_INC_DBA_HUCKS("martin_bailey_inc_dba_hucks"), + + @SerializedName("maxol") + MAXOL("maxol"), + + @SerializedName("meineke") + MEINEKE("meineke"), + + @SerializedName("mfa") + MFA("mfa"), + + @SerializedName("mohawk") + MOHAWK("mohawk"), + + @SerializedName("mr_gas") + MR_GAS("mr_gas"), + + @SerializedName("murco") + MURCO("murco"), + + @SerializedName("murphy_oil_canada") + MURPHY_OIL_CANADA("murphy_oil_canada"), + + @SerializedName("murphy_oil_usa_inc") + MURPHY_OIL_USA_INC("murphy_oil_usa_inc"), + + @SerializedName("nexcom") + NEXCOM("nexcom"), + + @SerializedName("nordstrom_oil") + NORDSTROM_OIL("nordstrom_oil"), + + @SerializedName("olco") + OLCO("olco"), + + @SerializedName("pdq_store") + PDQ_STORE("pdq_store"), + + @SerializedName("pennzoil_products_inc") + PENNZOIL_PRODUCTS_INC("pennzoil_products_inc"), + + @SerializedName("petro") + PETRO("petro"), + + @SerializedName("petro_canada") + PETRO_CANADA("petro_canada"), + + @SerializedName("petro_t") + PETRO_T("petro_t"), + + @SerializedName("phillips") + PHILLIPS("phillips"), + + @SerializedName("pilot") + PILOT("pilot"), + + @SerializedName("pioneer") + PIONEER("pioneer"), + + @SerializedName("pure_oil") + PURE_OIL("pure_oil"), + + @SerializedName("quaker_state") + QUAKER_STATE("quaker_state"), + + @SerializedName("quarles_oil") + QUARLES_OIL("quarles_oil"), + + @SerializedName("quiktrip") + QUIKTRIP("quiktrip"), + + @SerializedName("racetrac_petroleum_inc") + RACETRAC_PETROLEUM_INC("racetrac_petroleum_inc"), + + @SerializedName("raceway_petroleum") + RACEWAY_PETROLEUM("raceway_petroleum"), + + @SerializedName("repsol") + REPSOL("repsol"), + + @SerializedName("rudy") + RUDY("rudy"), + + @SerializedName("safeway") + SAFEWAY("safeway"), + + @SerializedName("seven_eleven") + SEVEN_ELEVEN("seven_eleven"), + + @SerializedName("sheetz") + SHEETZ("sheetz"), + + @SerializedName("shell") + SHELL("shell"), + + @SerializedName("shell_canada") + SHELL_CANADA("shell_canada"), + + @SerializedName("shell_oil") + SHELL_OIL("shell_oil"), + + @SerializedName("sinclair_oil") + SINCLAIR_OIL("sinclair_oil"), + + @SerializedName("southland_oil") + SOUTHLAND_OIL("southland_oil"), + + @SerializedName("spar") + SPAR("spar"), + + @SerializedName("speedway") + SPEEDWAY("speedway"), + + @SerializedName("sun_company_inc") + SUN_COMPANY_INC("sun_company_inc"), + + @SerializedName("suncor_sunoco_canada") + SUNCOR_SUNOCO_CANADA("suncor_sunoco_canada"), + + @SerializedName("tempo") + TEMPO("tempo"), + + @SerializedName("tesco") + TESCO("tesco"), + + @SerializedName("tesoro_alaska") + TESORO_ALASKA("tesoro_alaska"), + + @SerializedName("texaco") + TEXACO("texaco"), + + @SerializedName("the_pantry_inc") + THE_PANTRY_INC("the_pantry_inc"), + + @SerializedName("thornton_oil") + THORNTON_OIL("thornton_oil"), + + @SerializedName("tosco") + TOSCO("tosco"), + + @SerializedName("total") + TOTAL("total"), + + @SerializedName("travel_centers_of_america") + TRAVEL_CENTERS_OF_AMERICA("travel_centers_of_america"), + + @SerializedName("uk") + UK("uk"), + + @SerializedName("ultramar_canada") + ULTRAMAR_CANADA("ultramar_canada"), + + @SerializedName("unbranded_or_unassigned") + UNBRANDED_OR_UNASSIGNED("unbranded_or_unassigned"), + + @SerializedName("unbranded_unassigned") + UNBRANDED_UNASSIGNED("unbranded_unassigned"), + + @SerializedName("union_76") + UNION_76("union_76"), + + @SerializedName("united_dairy_farmer") + UNITED_DAIRY_FARMER("united_dairy_farmer"), + + @SerializedName("united_refining_kwikfill") + UNITED_REFINING_KWIKFILL("united_refining_kwikfill"), + + @SerializedName("us_oil") + US_OIL("us_oil"), + + @SerializedName("usa_petroleum") + USA_PETROLEUM("usa_petroleum"), + + @SerializedName("valvoline") + VALVOLINE("valvoline"), + + @SerializedName("vg") + VG("vg"), + + @SerializedName("w_morrison") + W_MORRISON("w_morrison"), + + @SerializedName("warren_equities") + WARREN_EQUITIES("warren_equities"), + + @SerializedName("wawa") + WAWA("wawa"), + + @SerializedName("western_energetix") + WESTERN_ENERGETIX("western_energetix"), + + @SerializedName("wilco") + WILCO("wilco"), + + @SerializedName("zions") + ZIONS("zions"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Brand(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Station { + /** Additional contact information for the station. */ + @SerializedName("additional_contact_info") + String additionalContactInfo; + + /** The customer service phone number of the station. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The partner ID code of the station. */ + @SerializedName("partner_id_code") + String partnerIdCode; + + /** The phone number of the station. */ + @SerializedName("phone_number") + String phoneNumber; + + /** The physical location of the station. */ + @SerializedName("service_location") + ServiceLocation serviceLocation; + + /** The URL of the station. */ + @SerializedName("url") + String url; + + private Station( + String additionalContactInfo, + String customerServicePhoneNumber, + Map extraParams, + String partnerIdCode, + String phoneNumber, + ServiceLocation serviceLocation, + String url) { + this.additionalContactInfo = additionalContactInfo; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.extraParams = extraParams; + this.partnerIdCode = partnerIdCode; + this.phoneNumber = phoneNumber; + this.serviceLocation = serviceLocation; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String additionalContactInfo; + + private String customerServicePhoneNumber; + + private Map extraParams; + + private String partnerIdCode; + + private String phoneNumber; + + private ServiceLocation serviceLocation; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FleetData.Station build() { + return new PaymentIntentCaptureParams.PaymentDetails.FleetData.Station( + this.additionalContactInfo, + this.customerServicePhoneNumber, + this.extraParams, + this.partnerIdCode, + this.phoneNumber, + this.serviceLocation, + this.url); + } + + /** Additional contact information for the station. */ + public Builder setAdditionalContactInfo(String additionalContactInfo) { + this.additionalContactInfo = additionalContactInfo; + return this; + } + + /** The customer service phone number of the station. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FleetData.Station#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FleetData.Station#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The partner ID code of the station. */ + public Builder setPartnerIdCode(String partnerIdCode) { + this.partnerIdCode = partnerIdCode; + return this; + } + + /** The phone number of the station. */ + public Builder setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** The physical location of the station. */ + public Builder setServiceLocation( + PaymentIntentCaptureParams.PaymentDetails.FleetData.Station.ServiceLocation + serviceLocation) { + this.serviceLocation = serviceLocation; + return this; + } + + /** The URL of the station. */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ServiceLocation { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + + private ServiceLocation( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FleetData.Station.ServiceLocation + build() { + return new PaymentIntentCaptureParams.PaymentDetails.FleetData.Station + .ServiceLocation( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vat { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf (IOB) + * VAT processing. + */ + @SerializedName("iob_indicator") + IobIndicator iobIndicator; + + private Vat(Map extraParams, IobIndicator iobIndicator) { + this.extraParams = extraParams; + this.iobIndicator = iobIndicator; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private IobIndicator iobIndicator; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails.FleetData.Vat build() { + return new PaymentIntentCaptureParams.PaymentDetails.FleetData.Vat( + this.extraParams, this.iobIndicator); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.PaymentDetails.FleetData.Vat#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.PaymentDetails.FleetData.Vat#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf + * (IOB) VAT processing. + */ + public Builder setIobIndicator( + PaymentIntentCaptureParams.PaymentDetails.FleetData.Vat.IobIndicator iobIndicator) { + this.iobIndicator = iobIndicator; + return this; + } + } + + public enum IobIndicator implements ApiRequestParams.EnumParam { + @SerializedName("issuer_to_iob") + ISSUER_TO_IOB("issuer_to_iob"), + + @SerializedName("issuer_to_iob_and_incremental_certification") + ISSUER_TO_IOB_AND_INCREMENTAL_CERTIFICATION( + "issuer_to_iob_and_incremental_certification"), + + @SerializedName("merchant_does_not_agree_to_iob") + MERCHANT_DOES_NOT_AGREE_TO_IOB("merchant_does_not_agree_to_iob"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + IobIndicator(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Flight { diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index b131b51f2ca..a46ab6f49a5 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -1490,9 +1490,14 @@ public static class Card { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Card(String commodityCode, Map extraParams) { + /** Fleet data for this line item. */ + @SerializedName("fleet_data") + FleetData fleetData; + + private Card(String commodityCode, Map extraParams, FleetData fleetData) { this.commodityCode = commodityCode; this.extraParams = extraParams; + this.fleetData = fleetData; } public static Builder builder() { @@ -1504,11 +1509,13 @@ public static class Builder { private Map extraParams; + private FleetData fleetData; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Card build() { return new PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions - .Card(this.commodityCode, this.extraParams); + .Card(this.commodityCode, this.extraParams, this.fleetData); } /** @@ -1549,6 +1556,267 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** Fleet data for this line item. */ + public Builder setFleetData( + PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData + fleetData) { + this.fleetData = fleetData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The type of product being purchased at this line item. */ + @SerializedName("product_type") + ProductType productType; + + /** The type of service received at the acceptor location. */ + @SerializedName("service_type") + ServiceType serviceType; + + private FleetData( + Map extraParams, ProductType productType, ServiceType serviceType) { + this.extraParams = extraParams; + this.productType = productType; + this.serviceType = serviceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProductType productType; + + private ServiceType serviceType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData + build() { + return new PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions + .Card.FleetData(this.extraParams, this.productType, this.serviceType); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The type of product being purchased at this line item. + */ + public Builder setProductType( + PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData.ProductType + productType) { + this.productType = productType; + return this; + } + + /** The type of service received at the acceptor location. */ + public Builder setServiceType( + PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData.ServiceType + serviceType) { + this.serviceType = serviceType; + return this; + } + } + + public enum ProductType implements ApiRequestParams.EnumParam { + @SerializedName("air_conditioning_service") + AIR_CONDITIONING_SERVICE("air_conditioning_service"), + + @SerializedName("alcohol") + ALCOHOL("alcohol"), + + @SerializedName("aviation_fuel_premium") + AVIATION_FUEL_PREMIUM("aviation_fuel_premium"), + + @SerializedName("aviation_fuel_regular") + AVIATION_FUEL_REGULAR("aviation_fuel_regular"), + + @SerializedName("car_care_detailing") + CAR_CARE_DETAILING("car_care_detailing"), + + @SerializedName("compressed_natural_gas") + COMPRESSED_NATURAL_GAS("compressed_natural_gas"), + + @SerializedName("deli") + DELI("deli"), + + @SerializedName("food_service") + FOOD_SERVICE("food_service"), + + @SerializedName("green_gasoline_mid_plus") + GREEN_GASOLINE_MID_PLUS("green_gasoline_mid_plus"), + + @SerializedName("green_gasoline_premium_super") + GREEN_GASOLINE_PREMIUM_SUPER("green_gasoline_premium_super"), + + @SerializedName("green_gasoline_regular") + GREEN_GASOLINE_REGULAR("green_gasoline_regular"), + + @SerializedName("grocery") + GROCERY("grocery"), + + @SerializedName("liquid_natural_gas") + LIQUID_NATURAL_GAS("liquid_natural_gas"), + + @SerializedName("liquid_propane_gas") + LIQUID_PROPANE_GAS("liquid_propane_gas"), + + @SerializedName("lodging") + LODGING("lodging"), + + @SerializedName("marine_diesel") + MARINE_DIESEL("marine_diesel"), + + @SerializedName("marine_fuel") + MARINE_FUEL("marine_fuel"), + + @SerializedName("merchandise") + MERCHANDISE("merchandise"), + + @SerializedName("mid_plus") + MID_PLUS("mid_plus"), + + @SerializedName("mid_plus_ethanol") + MID_PLUS_ETHANOL("mid_plus_ethanol"), + + @SerializedName("miscellaneous_aviation_products_services") + MISCELLANEOUS_AVIATION_PRODUCTS_SERVICES("miscellaneous_aviation_products_services"), + + @SerializedName("miscellaneous_fuel") + MISCELLANEOUS_FUEL("miscellaneous_fuel"), + + @SerializedName("miscellaneous_marine_products_services") + MISCELLANEOUS_MARINE_PRODUCTS_SERVICES("miscellaneous_marine_products_services"), + + @SerializedName("miscellaneous_vehicle_products_services") + MISCELLANEOUS_VEHICLE_PRODUCTS_SERVICES("miscellaneous_vehicle_products_services"), + + @SerializedName("packaged_beverage") + PACKAGED_BEVERAGE("packaged_beverage"), + + @SerializedName("premium_diesel") + PREMIUM_DIESEL("premium_diesel"), + + @SerializedName("premium_super") + PREMIUM_SUPER("premium_super"), + + @SerializedName("premium_super_ethanol") + PREMIUM_SUPER_ETHANOL("premium_super_ethanol"), + + @SerializedName("preventative_maintenance") + PREVENTATIVE_MAINTENANCE("preventative_maintenance"), + + @SerializedName("regular") + REGULAR("regular"), + + @SerializedName("regular_diesel") + REGULAR_DIESEL("regular_diesel"), + + @SerializedName("regular_ethanol") + REGULAR_ETHANOL("regular_ethanol"), + + @SerializedName("repairs") + REPAIRS("repairs"), + + @SerializedName("self_service_car_wash") + SELF_SERVICE_CAR_WASH("self_service_car_wash"), + + @SerializedName("shower") + SHOWER("shower"), + + @SerializedName("store_service") + STORE_SERVICE("store_service"), + + @SerializedName("tobacco") + TOBACCO("tobacco"), + + @SerializedName("vehicle_accessories") + VEHICLE_ACCESSORIES("vehicle_accessories"), + + @SerializedName("vehicle_parking") + VEHICLE_PARKING("vehicle_parking"), + + @SerializedName("vehicle_parts") + VEHICLE_PARTS("vehicle_parts"), + + @SerializedName("wash_out") + WASH_OUT("wash_out"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProductType(String value) { + this.value = value; + } + } + + public enum ServiceType implements ApiRequestParams.EnumParam { + @SerializedName("full_service") + FULL_SERVICE("full_service"), + + @SerializedName("high_speed_diesel") + HIGH_SPEED_DIESEL("high_speed_diesel"), + + @SerializedName("non_fuel_only") + NON_FUEL_ONLY("non_fuel_only"), + + @SerializedName("self_service") + SELF_SERVICE("self_service"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceType(String value) { + this.value = value; + } + } } } @@ -2977,6 +3245,10 @@ public static class PaymentDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Fleet data for this PaymentIntent. */ + @SerializedName("fleet_data") + Object fleetData; + /** Flight reservation details for this PaymentIntent. */ @SerializedName("flight") Flight flight; @@ -3019,6 +3291,7 @@ private PaymentDetails( Object customerReference, EventDetails eventDetails, Map extraParams, + Object fleetData, Flight flight, Object flightData, Lodging lodging, @@ -3032,6 +3305,7 @@ private PaymentDetails( this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; + this.fleetData = fleetData; this.flight = flight; this.flightData = flightData; this.lodging = lodging; @@ -3058,6 +3332,8 @@ public static class Builder { private Map extraParams; + private Object fleetData; + private Flight flight; private Object flightData; @@ -3081,6 +3357,7 @@ public PaymentIntentConfirmParams.PaymentDetails build() { this.customerReference, this.eventDetails, this.extraParams, + this.fleetData, this.flight, this.flightData, this.lodging, @@ -3205,6 +3482,49 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Add an element to `fleetData` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFleetData(PaymentIntentConfirmParams.PaymentDetails.FleetData element) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData).add(element); + return this; + } + + /** + * Add all elements to `fleetData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFleetData( + List elements) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData) + .addAll(elements); + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData(EmptyParam fleetData) { + this.fleetData = fleetData; + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData( + List fleetData) { + this.fleetData = fleetData; + return this; + } + /** Flight reservation details for this PaymentIntent. */ public Builder setFlight(PaymentIntentConfirmParams.PaymentDetails.Flight flight) { this.flight = flight; @@ -7929,6 +8249,1018 @@ public enum Mode implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Primary fuel fields for the transaction. */ + @SerializedName("primary_fuel_fields") + PrimaryFuelFields primaryFuelFields; + + /** Station and acceptor location details. */ + @SerializedName("station") + Station station; + + /** VAT and Invoice on Behalf (IOB) details. */ + @SerializedName("vat") + Vat vat; + + private FleetData( + Map extraParams, + PrimaryFuelFields primaryFuelFields, + Station station, + Vat vat) { + this.extraParams = extraParams; + this.primaryFuelFields = primaryFuelFields; + this.station = station; + this.vat = vat; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PrimaryFuelFields primaryFuelFields; + + private Station station; + + private Vat vat; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FleetData build() { + return new PaymentIntentConfirmParams.PaymentDetails.FleetData( + this.extraParams, this.primaryFuelFields, this.station, this.vat); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.FleetData#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.FleetData#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Primary fuel fields for the transaction. */ + public Builder setPrimaryFuelFields( + PaymentIntentConfirmParams.PaymentDetails.FleetData.PrimaryFuelFields + primaryFuelFields) { + this.primaryFuelFields = primaryFuelFields; + return this; + } + + /** Station and acceptor location details. */ + public Builder setStation( + PaymentIntentConfirmParams.PaymentDetails.FleetData.Station station) { + this.station = station; + return this; + } + + /** VAT and Invoice on Behalf (IOB) details. */ + public Builder setVat(PaymentIntentConfirmParams.PaymentDetails.FleetData.Vat vat) { + this.vat = vat; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryFuelFields { + /** The fuel brand. */ + @SerializedName("brand") + Brand brand; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PrimaryFuelFields(Brand brand, Map extraParams) { + this.brand = brand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Brand brand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FleetData.PrimaryFuelFields build() { + return new PaymentIntentConfirmParams.PaymentDetails.FleetData.PrimaryFuelFields( + this.brand, this.extraParams); + } + + /** The fuel brand. */ + public Builder setBrand( + PaymentIntentConfirmParams.PaymentDetails.FleetData.PrimaryFuelFields.Brand brand) { + this.brand = brand; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Brand implements ApiRequestParams.EnumParam { + @SerializedName("aafes") + AAFES("aafes"), + + @SerializedName("amerada_hess") + AMERADA_HESS("amerada_hess"), + + @SerializedName("amoco_canada") + AMOCO_CANADA("amoco_canada"), + + @SerializedName("amoco_petroleum_products") + AMOCO_PETROLEUM_PRODUCTS("amoco_petroleum_products"), + + @SerializedName("arco_products") + ARCO_PRODUCTS("arco_products"), + + @SerializedName("asda") + ASDA("asda"), + + @SerializedName("ashland_oil") + ASHLAND_OIL("ashland_oil"), + + @SerializedName("bfl") + BFL("bfl"), + + @SerializedName("bp_mobil") + BP_MOBIL("bp_mobil"), + + @SerializedName("bp_oil") + BP_OIL("bp_oil"), + + @SerializedName("burrnah_major") + BURRNAH_MAJOR("burrnah_major"), + + @SerializedName("butler_arndale") + BUTLER_ARNDALE("butler_arndale"), + + @SerializedName("canadian_tire") + CANADIAN_TIRE("canadian_tire"), + + @SerializedName("canadian_turbo") + CANADIAN_TURBO("canadian_turbo"), + + @SerializedName("caseys_general_store") + CASEYS_GENERAL_STORE("caseys_general_store"), + + @SerializedName("cenex") + CENEX("cenex"), + + @SerializedName("chevron_canada") + CHEVRON_CANADA("chevron_canada"), + + @SerializedName("chevron_usa") + CHEVRON_USA("chevron_usa"), + + @SerializedName("circle_k_stores") + CIRCLE_K_STORES("circle_k_stores"), + + @SerializedName("citgo_petroleum") + CITGO_PETROLEUM("citgo_petroleum"), + + @SerializedName("clark_brands") + CLARK_BRANDS("clark_brands"), + + @SerializedName("conoco_canada") + CONOCO_CANADA("conoco_canada"), + + @SerializedName("conoco_inc") + CONOCO_INC("conoco_inc"), + + @SerializedName("crown_central_petroleum") + CROWN_CENTRAL_PETROLEUM("crown_central_petroleum"), + + @SerializedName("diamond_shamrock_inc") + DIAMOND_SHAMROCK_INC("diamond_shamrock_inc"), + + @SerializedName("discount_tire") + DISCOUNT_TIRE("discount_tire"), + + @SerializedName("domo_gas") + DOMO_GAS("domo_gas"), + + @SerializedName("elf") + ELF("elf"), + + @SerializedName("erickson_oil") + ERICKSON_OIL("erickson_oil"), + + @SerializedName("esso") + ESSO("esso"), + + @SerializedName("esso_canada") + ESSO_CANADA("esso_canada"), + + @SerializedName("exxon") + EXXON("exxon"), + + @SerializedName("exxonmobil") + EXXONMOBIL("exxonmobil"), + + @SerializedName("family_express") + FAMILY_EXPRESS("family_express"), + + @SerializedName("fas_gas_oil") + FAS_GAS_OIL("fas_gas_oil"), + + @SerializedName("federated_coop_sonic") + FEDERATED_COOP_SONIC("federated_coop_sonic"), + + @SerializedName("fina") + FINA("fina"), + + @SerializedName("fina_inc") + FINA_INC("fina_inc"), + + @SerializedName("fkg_oil") + FKG_OIL("fkg_oil"), + + @SerializedName("flare") + FLARE("flare"), + + @SerializedName("flying_j_inc") + FLYING_J_INC("flying_j_inc"), + + @SerializedName("gas_america") + GAS_AMERICA("gas_america"), + + @SerializedName("gate_petroleum") + GATE_PETROLEUM("gate_petroleum"), + + @SerializedName("getty_petroleum") + GETTY_PETROLEUM("getty_petroleum"), + + @SerializedName("giant_eagle") + GIANT_EAGLE("giant_eagle"), + + @SerializedName("grow_mark_inc") + GROW_MARK_INC("grow_mark_inc"), + + @SerializedName("gulf") + GULF("gulf"), + + @SerializedName("gulf_canada") + GULF_CANADA("gulf_canada"), + + @SerializedName("gulf_chevron") + GULF_CHEVRON("gulf_chevron"), + + @SerializedName("handy_way_food") + HANDY_WAY_FOOD("handy_way_food"), + + @SerializedName("heron") + HERON("heron"), + + @SerializedName("holiday_stores") + HOLIDAY_STORES("holiday_stores"), + + @SerializedName("home_depot") + HOME_DEPOT("home_depot"), + + @SerializedName("husky") + HUSKY("husky"), + + @SerializedName("hyvees") + HYVEES("hyvees"), + + @SerializedName("irving") + IRVING("irving"), + + @SerializedName("irving_oil") + IRVING_OIL("irving_oil"), + + @SerializedName("j_sainsbury") + J_SAINSBURY("j_sainsbury"), + + @SerializedName("jet_conoco") + JET_CONOCO("jet_conoco"), + + @SerializedName("krogers") + KROGERS("krogers"), + + @SerializedName("kuwait") + KUWAIT("kuwait"), + + @SerializedName("kwik_trip_inc") + KWIK_TRIP_INC("kwik_trip_inc"), + + @SerializedName("lassus") + LASSUS("lassus"), + + @SerializedName("loves_country_stores") + LOVES_COUNTRY_STORES("loves_country_stores"), + + @SerializedName("mapco_express_inc") + MAPCO_EXPRESS_INC("mapco_express_inc"), + + @SerializedName("marathon_oil") + MARATHON_OIL("marathon_oil"), + + @SerializedName("martin_bailey_inc_dba_hucks") + MARTIN_BAILEY_INC_DBA_HUCKS("martin_bailey_inc_dba_hucks"), + + @SerializedName("maxol") + MAXOL("maxol"), + + @SerializedName("meineke") + MEINEKE("meineke"), + + @SerializedName("mfa") + MFA("mfa"), + + @SerializedName("mohawk") + MOHAWK("mohawk"), + + @SerializedName("mr_gas") + MR_GAS("mr_gas"), + + @SerializedName("murco") + MURCO("murco"), + + @SerializedName("murphy_oil_canada") + MURPHY_OIL_CANADA("murphy_oil_canada"), + + @SerializedName("murphy_oil_usa_inc") + MURPHY_OIL_USA_INC("murphy_oil_usa_inc"), + + @SerializedName("nexcom") + NEXCOM("nexcom"), + + @SerializedName("nordstrom_oil") + NORDSTROM_OIL("nordstrom_oil"), + + @SerializedName("olco") + OLCO("olco"), + + @SerializedName("pdq_store") + PDQ_STORE("pdq_store"), + + @SerializedName("pennzoil_products_inc") + PENNZOIL_PRODUCTS_INC("pennzoil_products_inc"), + + @SerializedName("petro") + PETRO("petro"), + + @SerializedName("petro_canada") + PETRO_CANADA("petro_canada"), + + @SerializedName("petro_t") + PETRO_T("petro_t"), + + @SerializedName("phillips") + PHILLIPS("phillips"), + + @SerializedName("pilot") + PILOT("pilot"), + + @SerializedName("pioneer") + PIONEER("pioneer"), + + @SerializedName("pure_oil") + PURE_OIL("pure_oil"), + + @SerializedName("quaker_state") + QUAKER_STATE("quaker_state"), + + @SerializedName("quarles_oil") + QUARLES_OIL("quarles_oil"), + + @SerializedName("quiktrip") + QUIKTRIP("quiktrip"), + + @SerializedName("racetrac_petroleum_inc") + RACETRAC_PETROLEUM_INC("racetrac_petroleum_inc"), + + @SerializedName("raceway_petroleum") + RACEWAY_PETROLEUM("raceway_petroleum"), + + @SerializedName("repsol") + REPSOL("repsol"), + + @SerializedName("rudy") + RUDY("rudy"), + + @SerializedName("safeway") + SAFEWAY("safeway"), + + @SerializedName("seven_eleven") + SEVEN_ELEVEN("seven_eleven"), + + @SerializedName("sheetz") + SHEETZ("sheetz"), + + @SerializedName("shell") + SHELL("shell"), + + @SerializedName("shell_canada") + SHELL_CANADA("shell_canada"), + + @SerializedName("shell_oil") + SHELL_OIL("shell_oil"), + + @SerializedName("sinclair_oil") + SINCLAIR_OIL("sinclair_oil"), + + @SerializedName("southland_oil") + SOUTHLAND_OIL("southland_oil"), + + @SerializedName("spar") + SPAR("spar"), + + @SerializedName("speedway") + SPEEDWAY("speedway"), + + @SerializedName("sun_company_inc") + SUN_COMPANY_INC("sun_company_inc"), + + @SerializedName("suncor_sunoco_canada") + SUNCOR_SUNOCO_CANADA("suncor_sunoco_canada"), + + @SerializedName("tempo") + TEMPO("tempo"), + + @SerializedName("tesco") + TESCO("tesco"), + + @SerializedName("tesoro_alaska") + TESORO_ALASKA("tesoro_alaska"), + + @SerializedName("texaco") + TEXACO("texaco"), + + @SerializedName("the_pantry_inc") + THE_PANTRY_INC("the_pantry_inc"), + + @SerializedName("thornton_oil") + THORNTON_OIL("thornton_oil"), + + @SerializedName("tosco") + TOSCO("tosco"), + + @SerializedName("total") + TOTAL("total"), + + @SerializedName("travel_centers_of_america") + TRAVEL_CENTERS_OF_AMERICA("travel_centers_of_america"), + + @SerializedName("uk") + UK("uk"), + + @SerializedName("ultramar_canada") + ULTRAMAR_CANADA("ultramar_canada"), + + @SerializedName("unbranded_or_unassigned") + UNBRANDED_OR_UNASSIGNED("unbranded_or_unassigned"), + + @SerializedName("unbranded_unassigned") + UNBRANDED_UNASSIGNED("unbranded_unassigned"), + + @SerializedName("union_76") + UNION_76("union_76"), + + @SerializedName("united_dairy_farmer") + UNITED_DAIRY_FARMER("united_dairy_farmer"), + + @SerializedName("united_refining_kwikfill") + UNITED_REFINING_KWIKFILL("united_refining_kwikfill"), + + @SerializedName("us_oil") + US_OIL("us_oil"), + + @SerializedName("usa_petroleum") + USA_PETROLEUM("usa_petroleum"), + + @SerializedName("valvoline") + VALVOLINE("valvoline"), + + @SerializedName("vg") + VG("vg"), + + @SerializedName("w_morrison") + W_MORRISON("w_morrison"), + + @SerializedName("warren_equities") + WARREN_EQUITIES("warren_equities"), + + @SerializedName("wawa") + WAWA("wawa"), + + @SerializedName("western_energetix") + WESTERN_ENERGETIX("western_energetix"), + + @SerializedName("wilco") + WILCO("wilco"), + + @SerializedName("zions") + ZIONS("zions"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Brand(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Station { + /** Additional contact information for the station. */ + @SerializedName("additional_contact_info") + String additionalContactInfo; + + /** The customer service phone number of the station. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The partner ID code of the station. */ + @SerializedName("partner_id_code") + String partnerIdCode; + + /** The phone number of the station. */ + @SerializedName("phone_number") + String phoneNumber; + + /** The physical location of the station. */ + @SerializedName("service_location") + ServiceLocation serviceLocation; + + /** The URL of the station. */ + @SerializedName("url") + String url; + + private Station( + String additionalContactInfo, + String customerServicePhoneNumber, + Map extraParams, + String partnerIdCode, + String phoneNumber, + ServiceLocation serviceLocation, + String url) { + this.additionalContactInfo = additionalContactInfo; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.extraParams = extraParams; + this.partnerIdCode = partnerIdCode; + this.phoneNumber = phoneNumber; + this.serviceLocation = serviceLocation; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String additionalContactInfo; + + private String customerServicePhoneNumber; + + private Map extraParams; + + private String partnerIdCode; + + private String phoneNumber; + + private ServiceLocation serviceLocation; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FleetData.Station build() { + return new PaymentIntentConfirmParams.PaymentDetails.FleetData.Station( + this.additionalContactInfo, + this.customerServicePhoneNumber, + this.extraParams, + this.partnerIdCode, + this.phoneNumber, + this.serviceLocation, + this.url); + } + + /** Additional contact information for the station. */ + public Builder setAdditionalContactInfo(String additionalContactInfo) { + this.additionalContactInfo = additionalContactInfo; + return this; + } + + /** The customer service phone number of the station. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.FleetData.Station#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.FleetData.Station#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The partner ID code of the station. */ + public Builder setPartnerIdCode(String partnerIdCode) { + this.partnerIdCode = partnerIdCode; + return this; + } + + /** The phone number of the station. */ + public Builder setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** The physical location of the station. */ + public Builder setServiceLocation( + PaymentIntentConfirmParams.PaymentDetails.FleetData.Station.ServiceLocation + serviceLocation) { + this.serviceLocation = serviceLocation; + return this; + } + + /** The URL of the station. */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ServiceLocation { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + + private ServiceLocation( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FleetData.Station.ServiceLocation + build() { + return new PaymentIntentConfirmParams.PaymentDetails.FleetData.Station + .ServiceLocation( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vat { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf (IOB) + * VAT processing. + */ + @SerializedName("iob_indicator") + IobIndicator iobIndicator; + + private Vat(Map extraParams, IobIndicator iobIndicator) { + this.extraParams = extraParams; + this.iobIndicator = iobIndicator; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private IobIndicator iobIndicator; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails.FleetData.Vat build() { + return new PaymentIntentConfirmParams.PaymentDetails.FleetData.Vat( + this.extraParams, this.iobIndicator); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.FleetData.Vat#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentDetails.FleetData.Vat#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf + * (IOB) VAT processing. + */ + public Builder setIobIndicator( + PaymentIntentConfirmParams.PaymentDetails.FleetData.Vat.IobIndicator iobIndicator) { + this.iobIndicator = iobIndicator; + return this; + } + } + + public enum IobIndicator implements ApiRequestParams.EnumParam { + @SerializedName("issuer_to_iob") + ISSUER_TO_IOB("issuer_to_iob"), + + @SerializedName("issuer_to_iob_and_incremental_certification") + ISSUER_TO_IOB_AND_INCREMENTAL_CERTIFICATION( + "issuer_to_iob_and_incremental_certification"), + + @SerializedName("merchant_does_not_agree_to_iob") + MERCHANT_DOES_NOT_AGREE_TO_IOB("merchant_does_not_agree_to_iob"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + IobIndicator(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Flight { diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 917d1345c3a..59f8fa61f58 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -1896,9 +1896,14 @@ public static class Card { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Card(String commodityCode, Map extraParams) { + /** Fleet data for this line item. */ + @SerializedName("fleet_data") + FleetData fleetData; + + private Card(String commodityCode, Map extraParams, FleetData fleetData) { this.commodityCode = commodityCode; this.extraParams = extraParams; + this.fleetData = fleetData; } public static Builder builder() { @@ -1910,11 +1915,13 @@ public static class Builder { private Map extraParams; + private FleetData fleetData; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Card build() { return new PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Card( - this.commodityCode, this.extraParams); + this.commodityCode, this.extraParams, this.fleetData); } /** @@ -1955,6 +1962,266 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** Fleet data for this line item. */ + public Builder setFleetData( + PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData + fleetData) { + this.fleetData = fleetData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The type of product being purchased at this line item. */ + @SerializedName("product_type") + ProductType productType; + + /** The type of service received at the acceptor location. */ + @SerializedName("service_type") + ServiceType serviceType; + + private FleetData( + Map extraParams, ProductType productType, ServiceType serviceType) { + this.extraParams = extraParams; + this.productType = productType; + this.serviceType = serviceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProductType productType; + + private ServiceType serviceType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData + build() { + return new PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions + .Card.FleetData(this.extraParams, this.productType, this.serviceType); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The type of product being purchased at this line item. + */ + public Builder setProductType( + PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData.ProductType + productType) { + this.productType = productType; + return this; + } + + /** The type of service received at the acceptor location. */ + public Builder setServiceType( + PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData.ServiceType + serviceType) { + this.serviceType = serviceType; + return this; + } + } + + public enum ProductType implements ApiRequestParams.EnumParam { + @SerializedName("air_conditioning_service") + AIR_CONDITIONING_SERVICE("air_conditioning_service"), + + @SerializedName("alcohol") + ALCOHOL("alcohol"), + + @SerializedName("aviation_fuel_premium") + AVIATION_FUEL_PREMIUM("aviation_fuel_premium"), + + @SerializedName("aviation_fuel_regular") + AVIATION_FUEL_REGULAR("aviation_fuel_regular"), + + @SerializedName("car_care_detailing") + CAR_CARE_DETAILING("car_care_detailing"), + + @SerializedName("compressed_natural_gas") + COMPRESSED_NATURAL_GAS("compressed_natural_gas"), + + @SerializedName("deli") + DELI("deli"), + + @SerializedName("food_service") + FOOD_SERVICE("food_service"), + + @SerializedName("green_gasoline_mid_plus") + GREEN_GASOLINE_MID_PLUS("green_gasoline_mid_plus"), + + @SerializedName("green_gasoline_premium_super") + GREEN_GASOLINE_PREMIUM_SUPER("green_gasoline_premium_super"), + + @SerializedName("green_gasoline_regular") + GREEN_GASOLINE_REGULAR("green_gasoline_regular"), + + @SerializedName("grocery") + GROCERY("grocery"), + + @SerializedName("liquid_natural_gas") + LIQUID_NATURAL_GAS("liquid_natural_gas"), + + @SerializedName("liquid_propane_gas") + LIQUID_PROPANE_GAS("liquid_propane_gas"), + + @SerializedName("lodging") + LODGING("lodging"), + + @SerializedName("marine_diesel") + MARINE_DIESEL("marine_diesel"), + + @SerializedName("marine_fuel") + MARINE_FUEL("marine_fuel"), + + @SerializedName("merchandise") + MERCHANDISE("merchandise"), + + @SerializedName("mid_plus") + MID_PLUS("mid_plus"), + + @SerializedName("mid_plus_ethanol") + MID_PLUS_ETHANOL("mid_plus_ethanol"), + + @SerializedName("miscellaneous_aviation_products_services") + MISCELLANEOUS_AVIATION_PRODUCTS_SERVICES("miscellaneous_aviation_products_services"), + + @SerializedName("miscellaneous_fuel") + MISCELLANEOUS_FUEL("miscellaneous_fuel"), + + @SerializedName("miscellaneous_marine_products_services") + MISCELLANEOUS_MARINE_PRODUCTS_SERVICES("miscellaneous_marine_products_services"), + + @SerializedName("miscellaneous_vehicle_products_services") + MISCELLANEOUS_VEHICLE_PRODUCTS_SERVICES("miscellaneous_vehicle_products_services"), + + @SerializedName("packaged_beverage") + PACKAGED_BEVERAGE("packaged_beverage"), + + @SerializedName("premium_diesel") + PREMIUM_DIESEL("premium_diesel"), + + @SerializedName("premium_super") + PREMIUM_SUPER("premium_super"), + + @SerializedName("premium_super_ethanol") + PREMIUM_SUPER_ETHANOL("premium_super_ethanol"), + + @SerializedName("preventative_maintenance") + PREVENTATIVE_MAINTENANCE("preventative_maintenance"), + + @SerializedName("regular") + REGULAR("regular"), + + @SerializedName("regular_diesel") + REGULAR_DIESEL("regular_diesel"), + + @SerializedName("regular_ethanol") + REGULAR_ETHANOL("regular_ethanol"), + + @SerializedName("repairs") + REPAIRS("repairs"), + + @SerializedName("self_service_car_wash") + SELF_SERVICE_CAR_WASH("self_service_car_wash"), + + @SerializedName("shower") + SHOWER("shower"), + + @SerializedName("store_service") + STORE_SERVICE("store_service"), + + @SerializedName("tobacco") + TOBACCO("tobacco"), + + @SerializedName("vehicle_accessories") + VEHICLE_ACCESSORIES("vehicle_accessories"), + + @SerializedName("vehicle_parking") + VEHICLE_PARKING("vehicle_parking"), + + @SerializedName("vehicle_parts") + VEHICLE_PARTS("vehicle_parts"), + + @SerializedName("wash_out") + WASH_OUT("wash_out"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProductType(String value) { + this.value = value; + } + } + + public enum ServiceType implements ApiRequestParams.EnumParam { + @SerializedName("full_service") + FULL_SERVICE("full_service"), + + @SerializedName("high_speed_diesel") + HIGH_SPEED_DIESEL("high_speed_diesel"), + + @SerializedName("non_fuel_only") + NON_FUEL_ONLY("non_fuel_only"), + + @SerializedName("self_service") + SELF_SERVICE("self_service"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceType(String value) { + this.value = value; + } + } } } @@ -3514,6 +3781,10 @@ public static class PaymentDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Fleet data for this PaymentIntent. */ + @SerializedName("fleet_data") + Object fleetData; + /** Flight reservation details for this PaymentIntent. */ @SerializedName("flight") Flight flight; @@ -3556,6 +3827,7 @@ private PaymentDetails( Object customerReference, EventDetails eventDetails, Map extraParams, + Object fleetData, Flight flight, Object flightData, Lodging lodging, @@ -3569,6 +3841,7 @@ private PaymentDetails( this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; + this.fleetData = fleetData; this.flight = flight; this.flightData = flightData; this.lodging = lodging; @@ -3595,6 +3868,8 @@ public static class Builder { private Map extraParams; + private Object fleetData; + private Flight flight; private Object flightData; @@ -3618,6 +3893,7 @@ public PaymentIntentCreateParams.PaymentDetails build() { this.customerReference, this.eventDetails, this.extraParams, + this.fleetData, this.flight, this.flightData, this.lodging, @@ -3742,6 +4018,49 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Add an element to `fleetData` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFleetData(PaymentIntentCreateParams.PaymentDetails.FleetData element) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData).add(element); + return this; + } + + /** + * Add all elements to `fleetData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFleetData( + List elements) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData) + .addAll(elements); + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData(EmptyParam fleetData) { + this.fleetData = fleetData; + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData( + List fleetData) { + this.fleetData = fleetData; + return this; + } + /** Flight reservation details for this PaymentIntent. */ public Builder setFlight(PaymentIntentCreateParams.PaymentDetails.Flight flight) { this.flight = flight; @@ -8464,6 +8783,1015 @@ public enum Mode implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Primary fuel fields for the transaction. */ + @SerializedName("primary_fuel_fields") + PrimaryFuelFields primaryFuelFields; + + /** Station and acceptor location details. */ + @SerializedName("station") + Station station; + + /** VAT and Invoice on Behalf (IOB) details. */ + @SerializedName("vat") + Vat vat; + + private FleetData( + Map extraParams, + PrimaryFuelFields primaryFuelFields, + Station station, + Vat vat) { + this.extraParams = extraParams; + this.primaryFuelFields = primaryFuelFields; + this.station = station; + this.vat = vat; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PrimaryFuelFields primaryFuelFields; + + private Station station; + + private Vat vat; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FleetData build() { + return new PaymentIntentCreateParams.PaymentDetails.FleetData( + this.extraParams, this.primaryFuelFields, this.station, this.vat); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.FleetData#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.FleetData#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Primary fuel fields for the transaction. */ + public Builder setPrimaryFuelFields( + PaymentIntentCreateParams.PaymentDetails.FleetData.PrimaryFuelFields + primaryFuelFields) { + this.primaryFuelFields = primaryFuelFields; + return this; + } + + /** Station and acceptor location details. */ + public Builder setStation( + PaymentIntentCreateParams.PaymentDetails.FleetData.Station station) { + this.station = station; + return this; + } + + /** VAT and Invoice on Behalf (IOB) details. */ + public Builder setVat(PaymentIntentCreateParams.PaymentDetails.FleetData.Vat vat) { + this.vat = vat; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryFuelFields { + /** The fuel brand. */ + @SerializedName("brand") + Brand brand; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PrimaryFuelFields(Brand brand, Map extraParams) { + this.brand = brand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Brand brand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FleetData.PrimaryFuelFields build() { + return new PaymentIntentCreateParams.PaymentDetails.FleetData.PrimaryFuelFields( + this.brand, this.extraParams); + } + + /** The fuel brand. */ + public Builder setBrand( + PaymentIntentCreateParams.PaymentDetails.FleetData.PrimaryFuelFields.Brand brand) { + this.brand = brand; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Brand implements ApiRequestParams.EnumParam { + @SerializedName("aafes") + AAFES("aafes"), + + @SerializedName("amerada_hess") + AMERADA_HESS("amerada_hess"), + + @SerializedName("amoco_canada") + AMOCO_CANADA("amoco_canada"), + + @SerializedName("amoco_petroleum_products") + AMOCO_PETROLEUM_PRODUCTS("amoco_petroleum_products"), + + @SerializedName("arco_products") + ARCO_PRODUCTS("arco_products"), + + @SerializedName("asda") + ASDA("asda"), + + @SerializedName("ashland_oil") + ASHLAND_OIL("ashland_oil"), + + @SerializedName("bfl") + BFL("bfl"), + + @SerializedName("bp_mobil") + BP_MOBIL("bp_mobil"), + + @SerializedName("bp_oil") + BP_OIL("bp_oil"), + + @SerializedName("burrnah_major") + BURRNAH_MAJOR("burrnah_major"), + + @SerializedName("butler_arndale") + BUTLER_ARNDALE("butler_arndale"), + + @SerializedName("canadian_tire") + CANADIAN_TIRE("canadian_tire"), + + @SerializedName("canadian_turbo") + CANADIAN_TURBO("canadian_turbo"), + + @SerializedName("caseys_general_store") + CASEYS_GENERAL_STORE("caseys_general_store"), + + @SerializedName("cenex") + CENEX("cenex"), + + @SerializedName("chevron_canada") + CHEVRON_CANADA("chevron_canada"), + + @SerializedName("chevron_usa") + CHEVRON_USA("chevron_usa"), + + @SerializedName("circle_k_stores") + CIRCLE_K_STORES("circle_k_stores"), + + @SerializedName("citgo_petroleum") + CITGO_PETROLEUM("citgo_petroleum"), + + @SerializedName("clark_brands") + CLARK_BRANDS("clark_brands"), + + @SerializedName("conoco_canada") + CONOCO_CANADA("conoco_canada"), + + @SerializedName("conoco_inc") + CONOCO_INC("conoco_inc"), + + @SerializedName("crown_central_petroleum") + CROWN_CENTRAL_PETROLEUM("crown_central_petroleum"), + + @SerializedName("diamond_shamrock_inc") + DIAMOND_SHAMROCK_INC("diamond_shamrock_inc"), + + @SerializedName("discount_tire") + DISCOUNT_TIRE("discount_tire"), + + @SerializedName("domo_gas") + DOMO_GAS("domo_gas"), + + @SerializedName("elf") + ELF("elf"), + + @SerializedName("erickson_oil") + ERICKSON_OIL("erickson_oil"), + + @SerializedName("esso") + ESSO("esso"), + + @SerializedName("esso_canada") + ESSO_CANADA("esso_canada"), + + @SerializedName("exxon") + EXXON("exxon"), + + @SerializedName("exxonmobil") + EXXONMOBIL("exxonmobil"), + + @SerializedName("family_express") + FAMILY_EXPRESS("family_express"), + + @SerializedName("fas_gas_oil") + FAS_GAS_OIL("fas_gas_oil"), + + @SerializedName("federated_coop_sonic") + FEDERATED_COOP_SONIC("federated_coop_sonic"), + + @SerializedName("fina") + FINA("fina"), + + @SerializedName("fina_inc") + FINA_INC("fina_inc"), + + @SerializedName("fkg_oil") + FKG_OIL("fkg_oil"), + + @SerializedName("flare") + FLARE("flare"), + + @SerializedName("flying_j_inc") + FLYING_J_INC("flying_j_inc"), + + @SerializedName("gas_america") + GAS_AMERICA("gas_america"), + + @SerializedName("gate_petroleum") + GATE_PETROLEUM("gate_petroleum"), + + @SerializedName("getty_petroleum") + GETTY_PETROLEUM("getty_petroleum"), + + @SerializedName("giant_eagle") + GIANT_EAGLE("giant_eagle"), + + @SerializedName("grow_mark_inc") + GROW_MARK_INC("grow_mark_inc"), + + @SerializedName("gulf") + GULF("gulf"), + + @SerializedName("gulf_canada") + GULF_CANADA("gulf_canada"), + + @SerializedName("gulf_chevron") + GULF_CHEVRON("gulf_chevron"), + + @SerializedName("handy_way_food") + HANDY_WAY_FOOD("handy_way_food"), + + @SerializedName("heron") + HERON("heron"), + + @SerializedName("holiday_stores") + HOLIDAY_STORES("holiday_stores"), + + @SerializedName("home_depot") + HOME_DEPOT("home_depot"), + + @SerializedName("husky") + HUSKY("husky"), + + @SerializedName("hyvees") + HYVEES("hyvees"), + + @SerializedName("irving") + IRVING("irving"), + + @SerializedName("irving_oil") + IRVING_OIL("irving_oil"), + + @SerializedName("j_sainsbury") + J_SAINSBURY("j_sainsbury"), + + @SerializedName("jet_conoco") + JET_CONOCO("jet_conoco"), + + @SerializedName("krogers") + KROGERS("krogers"), + + @SerializedName("kuwait") + KUWAIT("kuwait"), + + @SerializedName("kwik_trip_inc") + KWIK_TRIP_INC("kwik_trip_inc"), + + @SerializedName("lassus") + LASSUS("lassus"), + + @SerializedName("loves_country_stores") + LOVES_COUNTRY_STORES("loves_country_stores"), + + @SerializedName("mapco_express_inc") + MAPCO_EXPRESS_INC("mapco_express_inc"), + + @SerializedName("marathon_oil") + MARATHON_OIL("marathon_oil"), + + @SerializedName("martin_bailey_inc_dba_hucks") + MARTIN_BAILEY_INC_DBA_HUCKS("martin_bailey_inc_dba_hucks"), + + @SerializedName("maxol") + MAXOL("maxol"), + + @SerializedName("meineke") + MEINEKE("meineke"), + + @SerializedName("mfa") + MFA("mfa"), + + @SerializedName("mohawk") + MOHAWK("mohawk"), + + @SerializedName("mr_gas") + MR_GAS("mr_gas"), + + @SerializedName("murco") + MURCO("murco"), + + @SerializedName("murphy_oil_canada") + MURPHY_OIL_CANADA("murphy_oil_canada"), + + @SerializedName("murphy_oil_usa_inc") + MURPHY_OIL_USA_INC("murphy_oil_usa_inc"), + + @SerializedName("nexcom") + NEXCOM("nexcom"), + + @SerializedName("nordstrom_oil") + NORDSTROM_OIL("nordstrom_oil"), + + @SerializedName("olco") + OLCO("olco"), + + @SerializedName("pdq_store") + PDQ_STORE("pdq_store"), + + @SerializedName("pennzoil_products_inc") + PENNZOIL_PRODUCTS_INC("pennzoil_products_inc"), + + @SerializedName("petro") + PETRO("petro"), + + @SerializedName("petro_canada") + PETRO_CANADA("petro_canada"), + + @SerializedName("petro_t") + PETRO_T("petro_t"), + + @SerializedName("phillips") + PHILLIPS("phillips"), + + @SerializedName("pilot") + PILOT("pilot"), + + @SerializedName("pioneer") + PIONEER("pioneer"), + + @SerializedName("pure_oil") + PURE_OIL("pure_oil"), + + @SerializedName("quaker_state") + QUAKER_STATE("quaker_state"), + + @SerializedName("quarles_oil") + QUARLES_OIL("quarles_oil"), + + @SerializedName("quiktrip") + QUIKTRIP("quiktrip"), + + @SerializedName("racetrac_petroleum_inc") + RACETRAC_PETROLEUM_INC("racetrac_petroleum_inc"), + + @SerializedName("raceway_petroleum") + RACEWAY_PETROLEUM("raceway_petroleum"), + + @SerializedName("repsol") + REPSOL("repsol"), + + @SerializedName("rudy") + RUDY("rudy"), + + @SerializedName("safeway") + SAFEWAY("safeway"), + + @SerializedName("seven_eleven") + SEVEN_ELEVEN("seven_eleven"), + + @SerializedName("sheetz") + SHEETZ("sheetz"), + + @SerializedName("shell") + SHELL("shell"), + + @SerializedName("shell_canada") + SHELL_CANADA("shell_canada"), + + @SerializedName("shell_oil") + SHELL_OIL("shell_oil"), + + @SerializedName("sinclair_oil") + SINCLAIR_OIL("sinclair_oil"), + + @SerializedName("southland_oil") + SOUTHLAND_OIL("southland_oil"), + + @SerializedName("spar") + SPAR("spar"), + + @SerializedName("speedway") + SPEEDWAY("speedway"), + + @SerializedName("sun_company_inc") + SUN_COMPANY_INC("sun_company_inc"), + + @SerializedName("suncor_sunoco_canada") + SUNCOR_SUNOCO_CANADA("suncor_sunoco_canada"), + + @SerializedName("tempo") + TEMPO("tempo"), + + @SerializedName("tesco") + TESCO("tesco"), + + @SerializedName("tesoro_alaska") + TESORO_ALASKA("tesoro_alaska"), + + @SerializedName("texaco") + TEXACO("texaco"), + + @SerializedName("the_pantry_inc") + THE_PANTRY_INC("the_pantry_inc"), + + @SerializedName("thornton_oil") + THORNTON_OIL("thornton_oil"), + + @SerializedName("tosco") + TOSCO("tosco"), + + @SerializedName("total") + TOTAL("total"), + + @SerializedName("travel_centers_of_america") + TRAVEL_CENTERS_OF_AMERICA("travel_centers_of_america"), + + @SerializedName("uk") + UK("uk"), + + @SerializedName("ultramar_canada") + ULTRAMAR_CANADA("ultramar_canada"), + + @SerializedName("unbranded_or_unassigned") + UNBRANDED_OR_UNASSIGNED("unbranded_or_unassigned"), + + @SerializedName("unbranded_unassigned") + UNBRANDED_UNASSIGNED("unbranded_unassigned"), + + @SerializedName("union_76") + UNION_76("union_76"), + + @SerializedName("united_dairy_farmer") + UNITED_DAIRY_FARMER("united_dairy_farmer"), + + @SerializedName("united_refining_kwikfill") + UNITED_REFINING_KWIKFILL("united_refining_kwikfill"), + + @SerializedName("us_oil") + US_OIL("us_oil"), + + @SerializedName("usa_petroleum") + USA_PETROLEUM("usa_petroleum"), + + @SerializedName("valvoline") + VALVOLINE("valvoline"), + + @SerializedName("vg") + VG("vg"), + + @SerializedName("w_morrison") + W_MORRISON("w_morrison"), + + @SerializedName("warren_equities") + WARREN_EQUITIES("warren_equities"), + + @SerializedName("wawa") + WAWA("wawa"), + + @SerializedName("western_energetix") + WESTERN_ENERGETIX("western_energetix"), + + @SerializedName("wilco") + WILCO("wilco"), + + @SerializedName("zions") + ZIONS("zions"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Brand(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Station { + /** Additional contact information for the station. */ + @SerializedName("additional_contact_info") + String additionalContactInfo; + + /** The customer service phone number of the station. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The partner ID code of the station. */ + @SerializedName("partner_id_code") + String partnerIdCode; + + /** The phone number of the station. */ + @SerializedName("phone_number") + String phoneNumber; + + /** The physical location of the station. */ + @SerializedName("service_location") + ServiceLocation serviceLocation; + + /** The URL of the station. */ + @SerializedName("url") + String url; + + private Station( + String additionalContactInfo, + String customerServicePhoneNumber, + Map extraParams, + String partnerIdCode, + String phoneNumber, + ServiceLocation serviceLocation, + String url) { + this.additionalContactInfo = additionalContactInfo; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.extraParams = extraParams; + this.partnerIdCode = partnerIdCode; + this.phoneNumber = phoneNumber; + this.serviceLocation = serviceLocation; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String additionalContactInfo; + + private String customerServicePhoneNumber; + + private Map extraParams; + + private String partnerIdCode; + + private String phoneNumber; + + private ServiceLocation serviceLocation; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FleetData.Station build() { + return new PaymentIntentCreateParams.PaymentDetails.FleetData.Station( + this.additionalContactInfo, + this.customerServicePhoneNumber, + this.extraParams, + this.partnerIdCode, + this.phoneNumber, + this.serviceLocation, + this.url); + } + + /** Additional contact information for the station. */ + public Builder setAdditionalContactInfo(String additionalContactInfo) { + this.additionalContactInfo = additionalContactInfo; + return this; + } + + /** The customer service phone number of the station. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.FleetData.Station#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.FleetData.Station#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The partner ID code of the station. */ + public Builder setPartnerIdCode(String partnerIdCode) { + this.partnerIdCode = partnerIdCode; + return this; + } + + /** The phone number of the station. */ + public Builder setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** The physical location of the station. */ + public Builder setServiceLocation( + PaymentIntentCreateParams.PaymentDetails.FleetData.Station.ServiceLocation + serviceLocation) { + this.serviceLocation = serviceLocation; + return this; + } + + /** The URL of the station. */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ServiceLocation { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + + private ServiceLocation( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FleetData.Station.ServiceLocation + build() { + return new PaymentIntentCreateParams.PaymentDetails.FleetData.Station.ServiceLocation( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vat { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf (IOB) + * VAT processing. + */ + @SerializedName("iob_indicator") + IobIndicator iobIndicator; + + private Vat(Map extraParams, IobIndicator iobIndicator) { + this.extraParams = extraParams; + this.iobIndicator = iobIndicator; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private IobIndicator iobIndicator; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails.FleetData.Vat build() { + return new PaymentIntentCreateParams.PaymentDetails.FleetData.Vat( + this.extraParams, this.iobIndicator); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.FleetData.Vat#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentDetails.FleetData.Vat#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf + * (IOB) VAT processing. + */ + public Builder setIobIndicator( + PaymentIntentCreateParams.PaymentDetails.FleetData.Vat.IobIndicator iobIndicator) { + this.iobIndicator = iobIndicator; + return this; + } + } + + public enum IobIndicator implements ApiRequestParams.EnumParam { + @SerializedName("issuer_to_iob") + ISSUER_TO_IOB("issuer_to_iob"), + + @SerializedName("issuer_to_iob_and_incremental_certification") + ISSUER_TO_IOB_AND_INCREMENTAL_CERTIFICATION( + "issuer_to_iob_and_incremental_certification"), + + @SerializedName("merchant_does_not_agree_to_iob") + MERCHANT_DOES_NOT_AGREE_TO_IOB("merchant_does_not_agree_to_iob"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + IobIndicator(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Flight { diff --git a/src/main/java/com/stripe/param/PaymentIntentDecrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentDecrementAuthorizationParams.java index 5338c99cebe..59e6fca6b19 100644 --- a/src/main/java/com/stripe/param/PaymentIntentDecrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentDecrementAuthorizationParams.java @@ -956,9 +956,14 @@ public static class Card { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Card(String commodityCode, Map extraParams) { + /** Fleet data for this line item. */ + @SerializedName("fleet_data") + FleetData fleetData; + + private Card(String commodityCode, Map extraParams, FleetData fleetData) { this.commodityCode = commodityCode; this.extraParams = extraParams; + this.fleetData = fleetData; } public static Builder builder() { @@ -970,12 +975,14 @@ public static class Builder { private Map extraParams; + private FleetData fleetData; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentDecrementAuthorizationParams.AmountDetails.LineItem .PaymentMethodOptions.Card build() { return new PaymentIntentDecrementAuthorizationParams.AmountDetails.LineItem - .PaymentMethodOptions.Card(this.commodityCode, this.extraParams); + .PaymentMethodOptions.Card(this.commodityCode, this.extraParams, this.fleetData); } /** @@ -1016,6 +1023,268 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** Fleet data for this line item. */ + public Builder setFleetData( + PaymentIntentDecrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card.FleetData + fleetData) { + this.fleetData = fleetData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The type of product being purchased at this line item. */ + @SerializedName("product_type") + ProductType productType; + + /** The type of service received at the acceptor location. */ + @SerializedName("service_type") + ServiceType serviceType; + + private FleetData( + Map extraParams, ProductType productType, ServiceType serviceType) { + this.extraParams = extraParams; + this.productType = productType; + this.serviceType = serviceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProductType productType; + + private ServiceType serviceType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentDecrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card.FleetData + build() { + return new PaymentIntentDecrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card.FleetData( + this.extraParams, this.productType, this.serviceType); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentDecrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentDecrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The type of product being purchased at this line item. + */ + public Builder setProductType( + PaymentIntentDecrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card.FleetData.ProductType + productType) { + this.productType = productType; + return this; + } + + /** The type of service received at the acceptor location. */ + public Builder setServiceType( + PaymentIntentDecrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card.FleetData.ServiceType + serviceType) { + this.serviceType = serviceType; + return this; + } + } + + public enum ProductType implements ApiRequestParams.EnumParam { + @SerializedName("air_conditioning_service") + AIR_CONDITIONING_SERVICE("air_conditioning_service"), + + @SerializedName("alcohol") + ALCOHOL("alcohol"), + + @SerializedName("aviation_fuel_premium") + AVIATION_FUEL_PREMIUM("aviation_fuel_premium"), + + @SerializedName("aviation_fuel_regular") + AVIATION_FUEL_REGULAR("aviation_fuel_regular"), + + @SerializedName("car_care_detailing") + CAR_CARE_DETAILING("car_care_detailing"), + + @SerializedName("compressed_natural_gas") + COMPRESSED_NATURAL_GAS("compressed_natural_gas"), + + @SerializedName("deli") + DELI("deli"), + + @SerializedName("food_service") + FOOD_SERVICE("food_service"), + + @SerializedName("green_gasoline_mid_plus") + GREEN_GASOLINE_MID_PLUS("green_gasoline_mid_plus"), + + @SerializedName("green_gasoline_premium_super") + GREEN_GASOLINE_PREMIUM_SUPER("green_gasoline_premium_super"), + + @SerializedName("green_gasoline_regular") + GREEN_GASOLINE_REGULAR("green_gasoline_regular"), + + @SerializedName("grocery") + GROCERY("grocery"), + + @SerializedName("liquid_natural_gas") + LIQUID_NATURAL_GAS("liquid_natural_gas"), + + @SerializedName("liquid_propane_gas") + LIQUID_PROPANE_GAS("liquid_propane_gas"), + + @SerializedName("lodging") + LODGING("lodging"), + + @SerializedName("marine_diesel") + MARINE_DIESEL("marine_diesel"), + + @SerializedName("marine_fuel") + MARINE_FUEL("marine_fuel"), + + @SerializedName("merchandise") + MERCHANDISE("merchandise"), + + @SerializedName("mid_plus") + MID_PLUS("mid_plus"), + + @SerializedName("mid_plus_ethanol") + MID_PLUS_ETHANOL("mid_plus_ethanol"), + + @SerializedName("miscellaneous_aviation_products_services") + MISCELLANEOUS_AVIATION_PRODUCTS_SERVICES("miscellaneous_aviation_products_services"), + + @SerializedName("miscellaneous_fuel") + MISCELLANEOUS_FUEL("miscellaneous_fuel"), + + @SerializedName("miscellaneous_marine_products_services") + MISCELLANEOUS_MARINE_PRODUCTS_SERVICES("miscellaneous_marine_products_services"), + + @SerializedName("miscellaneous_vehicle_products_services") + MISCELLANEOUS_VEHICLE_PRODUCTS_SERVICES("miscellaneous_vehicle_products_services"), + + @SerializedName("packaged_beverage") + PACKAGED_BEVERAGE("packaged_beverage"), + + @SerializedName("premium_diesel") + PREMIUM_DIESEL("premium_diesel"), + + @SerializedName("premium_super") + PREMIUM_SUPER("premium_super"), + + @SerializedName("premium_super_ethanol") + PREMIUM_SUPER_ETHANOL("premium_super_ethanol"), + + @SerializedName("preventative_maintenance") + PREVENTATIVE_MAINTENANCE("preventative_maintenance"), + + @SerializedName("regular") + REGULAR("regular"), + + @SerializedName("regular_diesel") + REGULAR_DIESEL("regular_diesel"), + + @SerializedName("regular_ethanol") + REGULAR_ETHANOL("regular_ethanol"), + + @SerializedName("repairs") + REPAIRS("repairs"), + + @SerializedName("self_service_car_wash") + SELF_SERVICE_CAR_WASH("self_service_car_wash"), + + @SerializedName("shower") + SHOWER("shower"), + + @SerializedName("store_service") + STORE_SERVICE("store_service"), + + @SerializedName("tobacco") + TOBACCO("tobacco"), + + @SerializedName("vehicle_accessories") + VEHICLE_ACCESSORIES("vehicle_accessories"), + + @SerializedName("vehicle_parking") + VEHICLE_PARKING("vehicle_parking"), + + @SerializedName("vehicle_parts") + VEHICLE_PARTS("vehicle_parts"), + + @SerializedName("wash_out") + WASH_OUT("wash_out"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProductType(String value) { + this.value = value; + } + } + + public enum ServiceType implements ApiRequestParams.EnumParam { + @SerializedName("full_service") + FULL_SERVICE("full_service"), + + @SerializedName("high_speed_diesel") + HIGH_SPEED_DIESEL("high_speed_diesel"), + + @SerializedName("non_fuel_only") + NON_FUEL_ONLY("non_fuel_only"), + + @SerializedName("self_service") + SELF_SERVICE("self_service"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceType(String value) { + this.value = value; + } + } } } diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index a6f744593cb..24d4a5a132b 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -997,9 +997,14 @@ public static class Card { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Card(String commodityCode, Map extraParams) { + /** Fleet data for this line item. */ + @SerializedName("fleet_data") + FleetData fleetData; + + private Card(String commodityCode, Map extraParams, FleetData fleetData) { this.commodityCode = commodityCode; this.extraParams = extraParams; + this.fleetData = fleetData; } public static Builder builder() { @@ -1011,12 +1016,14 @@ public static class Builder { private Map extraParams; + private FleetData fleetData; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem .PaymentMethodOptions.Card build() { return new PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem - .PaymentMethodOptions.Card(this.commodityCode, this.extraParams); + .PaymentMethodOptions.Card(this.commodityCode, this.extraParams, this.fleetData); } /** @@ -1057,6 +1064,268 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** Fleet data for this line item. */ + public Builder setFleetData( + PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card.FleetData + fleetData) { + this.fleetData = fleetData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The type of product being purchased at this line item. */ + @SerializedName("product_type") + ProductType productType; + + /** The type of service received at the acceptor location. */ + @SerializedName("service_type") + ServiceType serviceType; + + private FleetData( + Map extraParams, ProductType productType, ServiceType serviceType) { + this.extraParams = extraParams; + this.productType = productType; + this.serviceType = serviceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProductType productType; + + private ServiceType serviceType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card.FleetData + build() { + return new PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card.FleetData( + this.extraParams, this.productType, this.serviceType); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The type of product being purchased at this line item. + */ + public Builder setProductType( + PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card.FleetData.ProductType + productType) { + this.productType = productType; + return this; + } + + /** The type of service received at the acceptor location. */ + public Builder setServiceType( + PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card.FleetData.ServiceType + serviceType) { + this.serviceType = serviceType; + return this; + } + } + + public enum ProductType implements ApiRequestParams.EnumParam { + @SerializedName("air_conditioning_service") + AIR_CONDITIONING_SERVICE("air_conditioning_service"), + + @SerializedName("alcohol") + ALCOHOL("alcohol"), + + @SerializedName("aviation_fuel_premium") + AVIATION_FUEL_PREMIUM("aviation_fuel_premium"), + + @SerializedName("aviation_fuel_regular") + AVIATION_FUEL_REGULAR("aviation_fuel_regular"), + + @SerializedName("car_care_detailing") + CAR_CARE_DETAILING("car_care_detailing"), + + @SerializedName("compressed_natural_gas") + COMPRESSED_NATURAL_GAS("compressed_natural_gas"), + + @SerializedName("deli") + DELI("deli"), + + @SerializedName("food_service") + FOOD_SERVICE("food_service"), + + @SerializedName("green_gasoline_mid_plus") + GREEN_GASOLINE_MID_PLUS("green_gasoline_mid_plus"), + + @SerializedName("green_gasoline_premium_super") + GREEN_GASOLINE_PREMIUM_SUPER("green_gasoline_premium_super"), + + @SerializedName("green_gasoline_regular") + GREEN_GASOLINE_REGULAR("green_gasoline_regular"), + + @SerializedName("grocery") + GROCERY("grocery"), + + @SerializedName("liquid_natural_gas") + LIQUID_NATURAL_GAS("liquid_natural_gas"), + + @SerializedName("liquid_propane_gas") + LIQUID_PROPANE_GAS("liquid_propane_gas"), + + @SerializedName("lodging") + LODGING("lodging"), + + @SerializedName("marine_diesel") + MARINE_DIESEL("marine_diesel"), + + @SerializedName("marine_fuel") + MARINE_FUEL("marine_fuel"), + + @SerializedName("merchandise") + MERCHANDISE("merchandise"), + + @SerializedName("mid_plus") + MID_PLUS("mid_plus"), + + @SerializedName("mid_plus_ethanol") + MID_PLUS_ETHANOL("mid_plus_ethanol"), + + @SerializedName("miscellaneous_aviation_products_services") + MISCELLANEOUS_AVIATION_PRODUCTS_SERVICES("miscellaneous_aviation_products_services"), + + @SerializedName("miscellaneous_fuel") + MISCELLANEOUS_FUEL("miscellaneous_fuel"), + + @SerializedName("miscellaneous_marine_products_services") + MISCELLANEOUS_MARINE_PRODUCTS_SERVICES("miscellaneous_marine_products_services"), + + @SerializedName("miscellaneous_vehicle_products_services") + MISCELLANEOUS_VEHICLE_PRODUCTS_SERVICES("miscellaneous_vehicle_products_services"), + + @SerializedName("packaged_beverage") + PACKAGED_BEVERAGE("packaged_beverage"), + + @SerializedName("premium_diesel") + PREMIUM_DIESEL("premium_diesel"), + + @SerializedName("premium_super") + PREMIUM_SUPER("premium_super"), + + @SerializedName("premium_super_ethanol") + PREMIUM_SUPER_ETHANOL("premium_super_ethanol"), + + @SerializedName("preventative_maintenance") + PREVENTATIVE_MAINTENANCE("preventative_maintenance"), + + @SerializedName("regular") + REGULAR("regular"), + + @SerializedName("regular_diesel") + REGULAR_DIESEL("regular_diesel"), + + @SerializedName("regular_ethanol") + REGULAR_ETHANOL("regular_ethanol"), + + @SerializedName("repairs") + REPAIRS("repairs"), + + @SerializedName("self_service_car_wash") + SELF_SERVICE_CAR_WASH("self_service_car_wash"), + + @SerializedName("shower") + SHOWER("shower"), + + @SerializedName("store_service") + STORE_SERVICE("store_service"), + + @SerializedName("tobacco") + TOBACCO("tobacco"), + + @SerializedName("vehicle_accessories") + VEHICLE_ACCESSORIES("vehicle_accessories"), + + @SerializedName("vehicle_parking") + VEHICLE_PARKING("vehicle_parking"), + + @SerializedName("vehicle_parts") + VEHICLE_PARTS("vehicle_parts"), + + @SerializedName("wash_out") + WASH_OUT("wash_out"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProductType(String value) { + this.value = value; + } + } + + public enum ServiceType implements ApiRequestParams.EnumParam { + @SerializedName("full_service") + FULL_SERVICE("full_service"), + + @SerializedName("high_speed_diesel") + HIGH_SPEED_DIESEL("high_speed_diesel"), + + @SerializedName("non_fuel_only") + NON_FUEL_ONLY("non_fuel_only"), + + @SerializedName("self_service") + SELF_SERVICE("self_service"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceType(String value) { + this.value = value; + } + } } } diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 01150119f23..648b169fff5 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -1769,9 +1769,14 @@ public static class Card { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Card(Object commodityCode, Map extraParams) { + /** Fleet data for this line item. */ + @SerializedName("fleet_data") + FleetData fleetData; + + private Card(Object commodityCode, Map extraParams, FleetData fleetData) { this.commodityCode = commodityCode; this.extraParams = extraParams; + this.fleetData = fleetData; } public static Builder builder() { @@ -1783,11 +1788,13 @@ public static class Builder { private Map extraParams; + private FleetData fleetData; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Card build() { return new PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Card( - this.commodityCode, this.extraParams); + this.commodityCode, this.extraParams, this.fleetData); } /** @@ -1837,6 +1844,266 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** Fleet data for this line item. */ + public Builder setFleetData( + PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData + fleetData) { + this.fleetData = fleetData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The type of product being purchased at this line item. */ + @SerializedName("product_type") + ProductType productType; + + /** The type of service received at the acceptor location. */ + @SerializedName("service_type") + ServiceType serviceType; + + private FleetData( + Map extraParams, ProductType productType, ServiceType serviceType) { + this.extraParams = extraParams; + this.productType = productType; + this.serviceType = serviceType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProductType productType; + + private ServiceType serviceType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData + build() { + return new PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions + .Card.FleetData(this.extraParams, this.productType, this.serviceType); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Card.FleetData#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The type of product being purchased at this line item. + */ + public Builder setProductType( + PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData.ProductType + productType) { + this.productType = productType; + return this; + } + + /** The type of service received at the acceptor location. */ + public Builder setServiceType( + PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Card + .FleetData.ServiceType + serviceType) { + this.serviceType = serviceType; + return this; + } + } + + public enum ProductType implements ApiRequestParams.EnumParam { + @SerializedName("air_conditioning_service") + AIR_CONDITIONING_SERVICE("air_conditioning_service"), + + @SerializedName("alcohol") + ALCOHOL("alcohol"), + + @SerializedName("aviation_fuel_premium") + AVIATION_FUEL_PREMIUM("aviation_fuel_premium"), + + @SerializedName("aviation_fuel_regular") + AVIATION_FUEL_REGULAR("aviation_fuel_regular"), + + @SerializedName("car_care_detailing") + CAR_CARE_DETAILING("car_care_detailing"), + + @SerializedName("compressed_natural_gas") + COMPRESSED_NATURAL_GAS("compressed_natural_gas"), + + @SerializedName("deli") + DELI("deli"), + + @SerializedName("food_service") + FOOD_SERVICE("food_service"), + + @SerializedName("green_gasoline_mid_plus") + GREEN_GASOLINE_MID_PLUS("green_gasoline_mid_plus"), + + @SerializedName("green_gasoline_premium_super") + GREEN_GASOLINE_PREMIUM_SUPER("green_gasoline_premium_super"), + + @SerializedName("green_gasoline_regular") + GREEN_GASOLINE_REGULAR("green_gasoline_regular"), + + @SerializedName("grocery") + GROCERY("grocery"), + + @SerializedName("liquid_natural_gas") + LIQUID_NATURAL_GAS("liquid_natural_gas"), + + @SerializedName("liquid_propane_gas") + LIQUID_PROPANE_GAS("liquid_propane_gas"), + + @SerializedName("lodging") + LODGING("lodging"), + + @SerializedName("marine_diesel") + MARINE_DIESEL("marine_diesel"), + + @SerializedName("marine_fuel") + MARINE_FUEL("marine_fuel"), + + @SerializedName("merchandise") + MERCHANDISE("merchandise"), + + @SerializedName("mid_plus") + MID_PLUS("mid_plus"), + + @SerializedName("mid_plus_ethanol") + MID_PLUS_ETHANOL("mid_plus_ethanol"), + + @SerializedName("miscellaneous_aviation_products_services") + MISCELLANEOUS_AVIATION_PRODUCTS_SERVICES("miscellaneous_aviation_products_services"), + + @SerializedName("miscellaneous_fuel") + MISCELLANEOUS_FUEL("miscellaneous_fuel"), + + @SerializedName("miscellaneous_marine_products_services") + MISCELLANEOUS_MARINE_PRODUCTS_SERVICES("miscellaneous_marine_products_services"), + + @SerializedName("miscellaneous_vehicle_products_services") + MISCELLANEOUS_VEHICLE_PRODUCTS_SERVICES("miscellaneous_vehicle_products_services"), + + @SerializedName("packaged_beverage") + PACKAGED_BEVERAGE("packaged_beverage"), + + @SerializedName("premium_diesel") + PREMIUM_DIESEL("premium_diesel"), + + @SerializedName("premium_super") + PREMIUM_SUPER("premium_super"), + + @SerializedName("premium_super_ethanol") + PREMIUM_SUPER_ETHANOL("premium_super_ethanol"), + + @SerializedName("preventative_maintenance") + PREVENTATIVE_MAINTENANCE("preventative_maintenance"), + + @SerializedName("regular") + REGULAR("regular"), + + @SerializedName("regular_diesel") + REGULAR_DIESEL("regular_diesel"), + + @SerializedName("regular_ethanol") + REGULAR_ETHANOL("regular_ethanol"), + + @SerializedName("repairs") + REPAIRS("repairs"), + + @SerializedName("self_service_car_wash") + SELF_SERVICE_CAR_WASH("self_service_car_wash"), + + @SerializedName("shower") + SHOWER("shower"), + + @SerializedName("store_service") + STORE_SERVICE("store_service"), + + @SerializedName("tobacco") + TOBACCO("tobacco"), + + @SerializedName("vehicle_accessories") + VEHICLE_ACCESSORIES("vehicle_accessories"), + + @SerializedName("vehicle_parking") + VEHICLE_PARKING("vehicle_parking"), + + @SerializedName("vehicle_parts") + VEHICLE_PARTS("vehicle_parts"), + + @SerializedName("wash_out") + WASH_OUT("wash_out"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProductType(String value) { + this.value = value; + } + } + + public enum ServiceType implements ApiRequestParams.EnumParam { + @SerializedName("full_service") + FULL_SERVICE("full_service"), + + @SerializedName("high_speed_diesel") + HIGH_SPEED_DIESEL("high_speed_diesel"), + + @SerializedName("non_fuel_only") + NON_FUEL_ONLY("non_fuel_only"), + + @SerializedName("self_service") + SELF_SERVICE("self_service"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ServiceType(String value) { + this.value = value; + } + } } } @@ -3224,6 +3491,10 @@ public static class PaymentDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Fleet data for this PaymentIntent. */ + @SerializedName("fleet_data") + Object fleetData; + /** Flight reservation details for this PaymentIntent. */ @SerializedName("flight") Flight flight; @@ -3266,6 +3537,7 @@ private PaymentDetails( Object customerReference, EventDetails eventDetails, Map extraParams, + Object fleetData, Flight flight, Object flightData, Lodging lodging, @@ -3279,6 +3551,7 @@ private PaymentDetails( this.customerReference = customerReference; this.eventDetails = eventDetails; this.extraParams = extraParams; + this.fleetData = fleetData; this.flight = flight; this.flightData = flightData; this.lodging = lodging; @@ -3305,6 +3578,8 @@ public static class Builder { private Map extraParams; + private Object fleetData; + private Flight flight; private Object flightData; @@ -3328,6 +3603,7 @@ public PaymentIntentUpdateParams.PaymentDetails build() { this.customerReference, this.eventDetails, this.extraParams, + this.fleetData, this.flight, this.flightData, this.lodging, @@ -3452,6 +3728,49 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Add an element to `fleetData` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addFleetData(PaymentIntentUpdateParams.PaymentDetails.FleetData element) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData).add(element); + return this; + } + + /** + * Add all elements to `fleetData` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentDetails#fleetData} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllFleetData( + List elements) { + if (this.fleetData == null || this.fleetData instanceof EmptyParam) { + this.fleetData = new ArrayList(); + } + ((List) this.fleetData) + .addAll(elements); + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData(EmptyParam fleetData) { + this.fleetData = fleetData; + return this; + } + + /** Fleet data for this PaymentIntent. */ + public Builder setFleetData( + List fleetData) { + this.fleetData = fleetData; + return this; + } + /** Flight reservation details for this PaymentIntent. */ public Builder setFlight(PaymentIntentUpdateParams.PaymentDetails.Flight flight) { this.flight = flight; @@ -8662,6 +8981,1090 @@ public enum Mode implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FleetData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Primary fuel fields for the transaction. */ + @SerializedName("primary_fuel_fields") + PrimaryFuelFields primaryFuelFields; + + /** Station and acceptor location details. */ + @SerializedName("station") + Station station; + + /** VAT and Invoice on Behalf (IOB) details. */ + @SerializedName("vat") + Vat vat; + + private FleetData( + Map extraParams, + PrimaryFuelFields primaryFuelFields, + Station station, + Vat vat) { + this.extraParams = extraParams; + this.primaryFuelFields = primaryFuelFields; + this.station = station; + this.vat = vat; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PrimaryFuelFields primaryFuelFields; + + private Station station; + + private Vat vat; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FleetData build() { + return new PaymentIntentUpdateParams.PaymentDetails.FleetData( + this.extraParams, this.primaryFuelFields, this.station, this.vat); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.FleetData#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.FleetData#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Primary fuel fields for the transaction. */ + public Builder setPrimaryFuelFields( + PaymentIntentUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields + primaryFuelFields) { + this.primaryFuelFields = primaryFuelFields; + return this; + } + + /** Station and acceptor location details. */ + public Builder setStation( + PaymentIntentUpdateParams.PaymentDetails.FleetData.Station station) { + this.station = station; + return this; + } + + /** VAT and Invoice on Behalf (IOB) details. */ + public Builder setVat(PaymentIntentUpdateParams.PaymentDetails.FleetData.Vat vat) { + this.vat = vat; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryFuelFields { + /** The fuel brand. */ + @SerializedName("brand") + Brand brand; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PrimaryFuelFields(Brand brand, Map extraParams) { + this.brand = brand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Brand brand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields build() { + return new PaymentIntentUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields( + this.brand, this.extraParams); + } + + /** The fuel brand. */ + public Builder setBrand( + PaymentIntentUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields.Brand brand) { + this.brand = brand; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FleetData.PrimaryFuelFields#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum Brand implements ApiRequestParams.EnumParam { + @SerializedName("aafes") + AAFES("aafes"), + + @SerializedName("amerada_hess") + AMERADA_HESS("amerada_hess"), + + @SerializedName("amoco_canada") + AMOCO_CANADA("amoco_canada"), + + @SerializedName("amoco_petroleum_products") + AMOCO_PETROLEUM_PRODUCTS("amoco_petroleum_products"), + + @SerializedName("arco_products") + ARCO_PRODUCTS("arco_products"), + + @SerializedName("asda") + ASDA("asda"), + + @SerializedName("ashland_oil") + ASHLAND_OIL("ashland_oil"), + + @SerializedName("bfl") + BFL("bfl"), + + @SerializedName("bp_mobil") + BP_MOBIL("bp_mobil"), + + @SerializedName("bp_oil") + BP_OIL("bp_oil"), + + @SerializedName("burrnah_major") + BURRNAH_MAJOR("burrnah_major"), + + @SerializedName("butler_arndale") + BUTLER_ARNDALE("butler_arndale"), + + @SerializedName("canadian_tire") + CANADIAN_TIRE("canadian_tire"), + + @SerializedName("canadian_turbo") + CANADIAN_TURBO("canadian_turbo"), + + @SerializedName("caseys_general_store") + CASEYS_GENERAL_STORE("caseys_general_store"), + + @SerializedName("cenex") + CENEX("cenex"), + + @SerializedName("chevron_canada") + CHEVRON_CANADA("chevron_canada"), + + @SerializedName("chevron_usa") + CHEVRON_USA("chevron_usa"), + + @SerializedName("circle_k_stores") + CIRCLE_K_STORES("circle_k_stores"), + + @SerializedName("citgo_petroleum") + CITGO_PETROLEUM("citgo_petroleum"), + + @SerializedName("clark_brands") + CLARK_BRANDS("clark_brands"), + + @SerializedName("conoco_canada") + CONOCO_CANADA("conoco_canada"), + + @SerializedName("conoco_inc") + CONOCO_INC("conoco_inc"), + + @SerializedName("crown_central_petroleum") + CROWN_CENTRAL_PETROLEUM("crown_central_petroleum"), + + @SerializedName("diamond_shamrock_inc") + DIAMOND_SHAMROCK_INC("diamond_shamrock_inc"), + + @SerializedName("discount_tire") + DISCOUNT_TIRE("discount_tire"), + + @SerializedName("domo_gas") + DOMO_GAS("domo_gas"), + + @SerializedName("elf") + ELF("elf"), + + @SerializedName("erickson_oil") + ERICKSON_OIL("erickson_oil"), + + @SerializedName("esso") + ESSO("esso"), + + @SerializedName("esso_canada") + ESSO_CANADA("esso_canada"), + + @SerializedName("exxon") + EXXON("exxon"), + + @SerializedName("exxonmobil") + EXXONMOBIL("exxonmobil"), + + @SerializedName("family_express") + FAMILY_EXPRESS("family_express"), + + @SerializedName("fas_gas_oil") + FAS_GAS_OIL("fas_gas_oil"), + + @SerializedName("federated_coop_sonic") + FEDERATED_COOP_SONIC("federated_coop_sonic"), + + @SerializedName("fina") + FINA("fina"), + + @SerializedName("fina_inc") + FINA_INC("fina_inc"), + + @SerializedName("fkg_oil") + FKG_OIL("fkg_oil"), + + @SerializedName("flare") + FLARE("flare"), + + @SerializedName("flying_j_inc") + FLYING_J_INC("flying_j_inc"), + + @SerializedName("gas_america") + GAS_AMERICA("gas_america"), + + @SerializedName("gate_petroleum") + GATE_PETROLEUM("gate_petroleum"), + + @SerializedName("getty_petroleum") + GETTY_PETROLEUM("getty_petroleum"), + + @SerializedName("giant_eagle") + GIANT_EAGLE("giant_eagle"), + + @SerializedName("grow_mark_inc") + GROW_MARK_INC("grow_mark_inc"), + + @SerializedName("gulf") + GULF("gulf"), + + @SerializedName("gulf_canada") + GULF_CANADA("gulf_canada"), + + @SerializedName("gulf_chevron") + GULF_CHEVRON("gulf_chevron"), + + @SerializedName("handy_way_food") + HANDY_WAY_FOOD("handy_way_food"), + + @SerializedName("heron") + HERON("heron"), + + @SerializedName("holiday_stores") + HOLIDAY_STORES("holiday_stores"), + + @SerializedName("home_depot") + HOME_DEPOT("home_depot"), + + @SerializedName("husky") + HUSKY("husky"), + + @SerializedName("hyvees") + HYVEES("hyvees"), + + @SerializedName("irving") + IRVING("irving"), + + @SerializedName("irving_oil") + IRVING_OIL("irving_oil"), + + @SerializedName("j_sainsbury") + J_SAINSBURY("j_sainsbury"), + + @SerializedName("jet_conoco") + JET_CONOCO("jet_conoco"), + + @SerializedName("krogers") + KROGERS("krogers"), + + @SerializedName("kuwait") + KUWAIT("kuwait"), + + @SerializedName("kwik_trip_inc") + KWIK_TRIP_INC("kwik_trip_inc"), + + @SerializedName("lassus") + LASSUS("lassus"), + + @SerializedName("loves_country_stores") + LOVES_COUNTRY_STORES("loves_country_stores"), + + @SerializedName("mapco_express_inc") + MAPCO_EXPRESS_INC("mapco_express_inc"), + + @SerializedName("marathon_oil") + MARATHON_OIL("marathon_oil"), + + @SerializedName("martin_bailey_inc_dba_hucks") + MARTIN_BAILEY_INC_DBA_HUCKS("martin_bailey_inc_dba_hucks"), + + @SerializedName("maxol") + MAXOL("maxol"), + + @SerializedName("meineke") + MEINEKE("meineke"), + + @SerializedName("mfa") + MFA("mfa"), + + @SerializedName("mohawk") + MOHAWK("mohawk"), + + @SerializedName("mr_gas") + MR_GAS("mr_gas"), + + @SerializedName("murco") + MURCO("murco"), + + @SerializedName("murphy_oil_canada") + MURPHY_OIL_CANADA("murphy_oil_canada"), + + @SerializedName("murphy_oil_usa_inc") + MURPHY_OIL_USA_INC("murphy_oil_usa_inc"), + + @SerializedName("nexcom") + NEXCOM("nexcom"), + + @SerializedName("nordstrom_oil") + NORDSTROM_OIL("nordstrom_oil"), + + @SerializedName("olco") + OLCO("olco"), + + @SerializedName("pdq_store") + PDQ_STORE("pdq_store"), + + @SerializedName("pennzoil_products_inc") + PENNZOIL_PRODUCTS_INC("pennzoil_products_inc"), + + @SerializedName("petro") + PETRO("petro"), + + @SerializedName("petro_canada") + PETRO_CANADA("petro_canada"), + + @SerializedName("petro_t") + PETRO_T("petro_t"), + + @SerializedName("phillips") + PHILLIPS("phillips"), + + @SerializedName("pilot") + PILOT("pilot"), + + @SerializedName("pioneer") + PIONEER("pioneer"), + + @SerializedName("pure_oil") + PURE_OIL("pure_oil"), + + @SerializedName("quaker_state") + QUAKER_STATE("quaker_state"), + + @SerializedName("quarles_oil") + QUARLES_OIL("quarles_oil"), + + @SerializedName("quiktrip") + QUIKTRIP("quiktrip"), + + @SerializedName("racetrac_petroleum_inc") + RACETRAC_PETROLEUM_INC("racetrac_petroleum_inc"), + + @SerializedName("raceway_petroleum") + RACEWAY_PETROLEUM("raceway_petroleum"), + + @SerializedName("repsol") + REPSOL("repsol"), + + @SerializedName("rudy") + RUDY("rudy"), + + @SerializedName("safeway") + SAFEWAY("safeway"), + + @SerializedName("seven_eleven") + SEVEN_ELEVEN("seven_eleven"), + + @SerializedName("sheetz") + SHEETZ("sheetz"), + + @SerializedName("shell") + SHELL("shell"), + + @SerializedName("shell_canada") + SHELL_CANADA("shell_canada"), + + @SerializedName("shell_oil") + SHELL_OIL("shell_oil"), + + @SerializedName("sinclair_oil") + SINCLAIR_OIL("sinclair_oil"), + + @SerializedName("southland_oil") + SOUTHLAND_OIL("southland_oil"), + + @SerializedName("spar") + SPAR("spar"), + + @SerializedName("speedway") + SPEEDWAY("speedway"), + + @SerializedName("sun_company_inc") + SUN_COMPANY_INC("sun_company_inc"), + + @SerializedName("suncor_sunoco_canada") + SUNCOR_SUNOCO_CANADA("suncor_sunoco_canada"), + + @SerializedName("tempo") + TEMPO("tempo"), + + @SerializedName("tesco") + TESCO("tesco"), + + @SerializedName("tesoro_alaska") + TESORO_ALASKA("tesoro_alaska"), + + @SerializedName("texaco") + TEXACO("texaco"), + + @SerializedName("the_pantry_inc") + THE_PANTRY_INC("the_pantry_inc"), + + @SerializedName("thornton_oil") + THORNTON_OIL("thornton_oil"), + + @SerializedName("tosco") + TOSCO("tosco"), + + @SerializedName("total") + TOTAL("total"), + + @SerializedName("travel_centers_of_america") + TRAVEL_CENTERS_OF_AMERICA("travel_centers_of_america"), + + @SerializedName("uk") + UK("uk"), + + @SerializedName("ultramar_canada") + ULTRAMAR_CANADA("ultramar_canada"), + + @SerializedName("unbranded_or_unassigned") + UNBRANDED_OR_UNASSIGNED("unbranded_or_unassigned"), + + @SerializedName("unbranded_unassigned") + UNBRANDED_UNASSIGNED("unbranded_unassigned"), + + @SerializedName("union_76") + UNION_76("union_76"), + + @SerializedName("united_dairy_farmer") + UNITED_DAIRY_FARMER("united_dairy_farmer"), + + @SerializedName("united_refining_kwikfill") + UNITED_REFINING_KWIKFILL("united_refining_kwikfill"), + + @SerializedName("us_oil") + US_OIL("us_oil"), + + @SerializedName("usa_petroleum") + USA_PETROLEUM("usa_petroleum"), + + @SerializedName("valvoline") + VALVOLINE("valvoline"), + + @SerializedName("vg") + VG("vg"), + + @SerializedName("w_morrison") + W_MORRISON("w_morrison"), + + @SerializedName("warren_equities") + WARREN_EQUITIES("warren_equities"), + + @SerializedName("wawa") + WAWA("wawa"), + + @SerializedName("western_energetix") + WESTERN_ENERGETIX("western_energetix"), + + @SerializedName("wilco") + WILCO("wilco"), + + @SerializedName("zions") + ZIONS("zions"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Brand(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Station { + /** Additional contact information for the station. */ + @SerializedName("additional_contact_info") + Object additionalContactInfo; + + /** The customer service phone number of the station. */ + @SerializedName("customer_service_phone_number") + Object customerServicePhoneNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The partner ID code of the station. */ + @SerializedName("partner_id_code") + Object partnerIdCode; + + /** The phone number of the station. */ + @SerializedName("phone_number") + Object phoneNumber; + + /** The physical location of the station. */ + @SerializedName("service_location") + ServiceLocation serviceLocation; + + /** The URL of the station. */ + @SerializedName("url") + Object url; + + private Station( + Object additionalContactInfo, + Object customerServicePhoneNumber, + Map extraParams, + Object partnerIdCode, + Object phoneNumber, + ServiceLocation serviceLocation, + Object url) { + this.additionalContactInfo = additionalContactInfo; + this.customerServicePhoneNumber = customerServicePhoneNumber; + this.extraParams = extraParams; + this.partnerIdCode = partnerIdCode; + this.phoneNumber = phoneNumber; + this.serviceLocation = serviceLocation; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object additionalContactInfo; + + private Object customerServicePhoneNumber; + + private Map extraParams; + + private Object partnerIdCode; + + private Object phoneNumber; + + private ServiceLocation serviceLocation; + + private Object url; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FleetData.Station build() { + return new PaymentIntentUpdateParams.PaymentDetails.FleetData.Station( + this.additionalContactInfo, + this.customerServicePhoneNumber, + this.extraParams, + this.partnerIdCode, + this.phoneNumber, + this.serviceLocation, + this.url); + } + + /** Additional contact information for the station. */ + public Builder setAdditionalContactInfo(String additionalContactInfo) { + this.additionalContactInfo = additionalContactInfo; + return this; + } + + /** Additional contact information for the station. */ + public Builder setAdditionalContactInfo(EmptyParam additionalContactInfo) { + this.additionalContactInfo = additionalContactInfo; + return this; + } + + /** The customer service phone number of the station. */ + public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** The customer service phone number of the station. */ + public Builder setCustomerServicePhoneNumber(EmptyParam customerServicePhoneNumber) { + this.customerServicePhoneNumber = customerServicePhoneNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.FleetData.Station#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.FleetData.Station#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The partner ID code of the station. */ + public Builder setPartnerIdCode(String partnerIdCode) { + this.partnerIdCode = partnerIdCode; + return this; + } + + /** The partner ID code of the station. */ + public Builder setPartnerIdCode(EmptyParam partnerIdCode) { + this.partnerIdCode = partnerIdCode; + return this; + } + + /** The phone number of the station. */ + public Builder setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** The phone number of the station. */ + public Builder setPhoneNumber(EmptyParam phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** The physical location of the station. */ + public Builder setServiceLocation( + PaymentIntentUpdateParams.PaymentDetails.FleetData.Station.ServiceLocation + serviceLocation) { + this.serviceLocation = serviceLocation; + return this; + } + + /** The URL of the station. */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + + /** The URL of the station. */ + public Builder setUrl(EmptyParam url) { + this.url = url; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ServiceLocation { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + Object state; + + private ServiceLocation( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FleetData.Station.ServiceLocation + build() { + return new PaymentIntentUpdateParams.PaymentDetails.FleetData.Station.ServiceLocation( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentDetails.FleetData.Station.ServiceLocation#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** + * Required. Address line 1, such as the street, PO Box, or company + * name. + */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Vat { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf (IOB) + * VAT processing. + */ + @SerializedName("iob_indicator") + IobIndicator iobIndicator; + + private Vat(Map extraParams, IobIndicator iobIndicator) { + this.extraParams = extraParams; + this.iobIndicator = iobIndicator; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private IobIndicator iobIndicator; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails.FleetData.Vat build() { + return new PaymentIntentUpdateParams.PaymentDetails.FleetData.Vat( + this.extraParams, this.iobIndicator); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.FleetData.Vat#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentDetails.FleetData.Vat#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Indicates the merchant's agreement for Invoice on Behalf + * (IOB) VAT processing. + */ + public Builder setIobIndicator( + PaymentIntentUpdateParams.PaymentDetails.FleetData.Vat.IobIndicator iobIndicator) { + this.iobIndicator = iobIndicator; + return this; + } + } + + public enum IobIndicator implements ApiRequestParams.EnumParam { + @SerializedName("issuer_to_iob") + ISSUER_TO_IOB("issuer_to_iob"), + + @SerializedName("issuer_to_iob_and_incremental_certification") + ISSUER_TO_IOB_AND_INCREMENTAL_CERTIFICATION( + "issuer_to_iob_and_incremental_certification"), + + @SerializedName("merchant_does_not_agree_to_iob") + MERCHANT_DOES_NOT_AGREE_TO_IOB("merchant_does_not_agree_to_iob"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + IobIndicator(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Flight { diff --git a/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java index a1cec0742c5..9be070024de 100644 --- a/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java +++ b/src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java @@ -335,7 +335,7 @@ public Builder setRadarSession(String radarSession) { @Getter @EqualsAndHashCode(callSuper = false) public static class CustomerDetails { - /** Stripe customer ID. */ + /** The ID of an existing Customer. */ @SerializedName("customer") String customer; @@ -376,7 +376,7 @@ public CustomerEvaluationCreateParams.EvaluationContext.CustomerDetails build() this.customer, this.customerData, this.extraParams); } - /** Stripe customer ID. */ + /** The ID of an existing Customer. */ public Builder setCustomer(String customer) { this.customer = customer; return this; diff --git a/src/main/java/com/stripe/param/radar/CustomerEvaluationUpdateParams.java b/src/main/java/com/stripe/param/radar/CustomerEvaluationUpdateParams.java index ed05bcc6ccf..764789891e3 100644 --- a/src/main/java/com/stripe/param/radar/CustomerEvaluationUpdateParams.java +++ b/src/main/java/com/stripe/param/radar/CustomerEvaluationUpdateParams.java @@ -338,7 +338,7 @@ public enum Reason implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class RegistrationSuccess { - /** Stripe customer ID to attach to an entity-less registration evaluation. */ + /** The ID of a Customer to attach to an entity-less registration evaluation. */ @SerializedName("customer") Object customer; @@ -371,13 +371,13 @@ public CustomerEvaluationUpdateParams.RegistrationSuccess build() { this.customer, this.extraParams); } - /** Stripe customer ID to attach to an entity-less registration evaluation. */ + /** The ID of a Customer to attach to an entity-less registration evaluation. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } - /** Stripe customer ID to attach to an entity-less registration evaluation. */ + /** The ID of a Customer to attach to an entity-less registration evaluation. */ public Builder setCustomer(EmptyParam customer) { this.customer = customer; return this; diff --git a/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java index d9072f65bdf..521bb850225 100644 --- a/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java +++ b/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java @@ -196,6 +196,13 @@ public Builder setPaymentDetails(PaymentEvaluationCreateParams.PaymentDetails pa @Getter @EqualsAndHashCode(callSuper = false) public static class ClientDeviceMetadataDetails { + /** + * Direct client device attributes such as IP address and user agent. Use this as an alternative + * to radar_session when a Radar Session isn't available. + */ + @SerializedName("data") + Data data; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -214,7 +221,9 @@ public static class ClientDeviceMetadataDetails { @SerializedName("radar_session") String radarSession; - private ClientDeviceMetadataDetails(Map extraParams, String radarSession) { + private ClientDeviceMetadataDetails( + Data data, Map extraParams, String radarSession) { + this.data = data; this.extraParams = extraParams; this.radarSession = radarSession; } @@ -224,6 +233,8 @@ public static Builder builder() { } public static class Builder { + private Data data; + private Map extraParams; private String radarSession; @@ -231,7 +242,16 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentEvaluationCreateParams.ClientDeviceMetadataDetails build() { return new PaymentEvaluationCreateParams.ClientDeviceMetadataDetails( - this.extraParams, this.radarSession); + this.data, this.extraParams, this.radarSession); + } + + /** + * Direct client device attributes such as IP address and user agent. Use this as an + * alternative to radar_session when a Radar Session isn't available. + */ + public Builder setData(PaymentEvaluationCreateParams.ClientDeviceMetadataDetails.Data data) { + this.data = data; + return this; } /** @@ -273,6 +293,191 @@ public Builder setRadarSession(String radarSession) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Data { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The IP address of the client device. */ + @SerializedName("ip") + String ip; + + /** Pasted fields from the checkout flow. */ + @SerializedName("pasted_fields") + List pastedFields; + + /** The referrer of the client device. */ + @SerializedName("referrer") + String referrer; + + /** The time on page in milliseconds. */ + @SerializedName("time_on_page_ms") + Long timeOnPageMs; + + /** Required. The user agent of the client device. */ + @SerializedName("user_agent") + String userAgent; + + private Data( + Map extraParams, + String ip, + List + pastedFields, + String referrer, + Long timeOnPageMs, + String userAgent) { + this.extraParams = extraParams; + this.ip = ip; + this.pastedFields = pastedFields; + this.referrer = referrer; + this.timeOnPageMs = timeOnPageMs; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String ip; + + private List + pastedFields; + + private String referrer; + + private Long timeOnPageMs; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.ClientDeviceMetadataDetails.Data build() { + return new PaymentEvaluationCreateParams.ClientDeviceMetadataDetails.Data( + this.extraParams, + this.ip, + this.pastedFields, + this.referrer, + this.timeOnPageMs, + this.userAgent); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.ClientDeviceMetadataDetails.Data#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.ClientDeviceMetadataDetails.Data#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The IP address of the client device. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * Add an element to `pastedFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentEvaluationCreateParams.ClientDeviceMetadataDetails.Data#pastedFields} for the + * field documentation. + */ + public Builder addPastedField( + PaymentEvaluationCreateParams.ClientDeviceMetadataDetails.Data.PastedField element) { + if (this.pastedFields == null) { + this.pastedFields = new ArrayList<>(); + } + this.pastedFields.add(element); + return this; + } + + /** + * Add all elements to `pastedFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentEvaluationCreateParams.ClientDeviceMetadataDetails.Data#pastedFields} for the + * field documentation. + */ + public Builder addAllPastedField( + List + elements) { + if (this.pastedFields == null) { + this.pastedFields = new ArrayList<>(); + } + this.pastedFields.addAll(elements); + return this; + } + + /** The referrer of the client device. */ + public Builder setReferrer(String referrer) { + this.referrer = referrer; + return this; + } + + /** The time on page in milliseconds. */ + public Builder setTimeOnPageMs(Long timeOnPageMs) { + this.timeOnPageMs = timeOnPageMs; + return this; + } + + /** Required. The user agent of the client device. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + + public enum PastedField implements ApiRequestParams.EnumParam { + @SerializedName("cvc") + CVC("cvc"), + + @SerializedName("exp") + EXP("exp"), + + @SerializedName("number") + NUMBER("number"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PastedField(String value) { + this.value = value; + } + } + } } @Getter