@@ -722,24 +722,24 @@ public String getSdkVersion() {
722722 return "42.1.0.20241218" ;
723723 }
724724
725- /**
726- * The timeout to use for making HTTP requests.
727- * @deprecated This method will be removed in a future version. Use
728- * {@link #getHttpClientConfig()} instead.
729- *
730- * @return timeout
731- */
732- @ Deprecated
733- public long timeout () {
734- return httpClientConfig .getTimeout ();
735- }
736-
737- /**
738- * Get base URI by current environment.
739- * @param server Server for which to get the base URI
740- * @return Processed base URI
741- */
742- public String getBaseUri (Server server ) {
725+ /**
726+ * The timeout to use for making HTTP requests.
727+ * @deprecated This method will be removed in a future version. Use
728+ * {@link #getHttpClientConfig()} instead.
729+ *
730+ * @return timeout
731+ */
732+ @ Deprecated
733+ public long timeout () {
734+ return httpClientConfig .getTimeout ();
735+ }
736+
737+ /**
738+ * Get base URI by current environment.
739+ * @param server Server for which to get the base URI
740+ * @return Processed base URI
741+ */
742+ public String getBaseUri (Server server ) {
743743 Map <String , SimpleEntry <Object , Boolean >> parameters = new HashMap <>();
744744 parameters .put ("custom_url" ,
745745 new SimpleEntry <Object , Boolean >(this .customUrl , false ));
@@ -753,28 +753,28 @@ public String getBaseUri(Server server) {
753753 * @return Processed base URI
754754 */
755755 public String getBaseUri () {
756- return getBaseUri (Server .ENUM_DEFAULT );
757- }
758-
759-
760- /**
761- * Get base URI by current environment.
762- *
763- * @param server string for which to get the base URI
764- * @return Processed base URI
765- */
766- public String getBaseUri (String server ) {
767- return getBaseUri (Server .fromString (server ));
768- }
769-
770-
771- /**
772- * Base URLs by environment and server aliases.
773- * @param environment Environment for which to get the base URI
774- * @param server Server for which to get the base URI
775- * @return base URL
776- */
777- private static String environmentMapper (Environment environment , Server server ) {
756+ return getBaseUri (Server .ENUM_DEFAULT );
757+ }
758+
759+
760+ /**
761+ * Get base URI by current environment.
762+ *
763+ * @param server string for which to get the base URI
764+ * @return Processed base URI
765+ */
766+ public String getBaseUri (String server ) {
767+ return getBaseUri (Server .fromString (server ));
768+ }
769+
770+
771+ /**
772+ * Base URLs by environment and server aliases.
773+ * @param environment Environment for which to get the base URI
774+ * @param server Server for which to get the base URI
775+ * @return base URL
776+ */
777+ private static String environmentMapper (Environment environment , Server server ) {
778778 if (environment .equals (Environment .PRODUCTION )) {
779779 if (server .equals (Server .ENUM_DEFAULT )) {
780780 return "https://connect.squareup.com" ;
@@ -832,7 +832,7 @@ public static class Builder {
832832
833833 private Environment environment = Environment .PRODUCTION ;
834834 private String customUrl = "https://connect.squareup.com" ;
835- private String squareVersion = "2024-12-18 " ;
835+ private String squareVersion = "2025-01-23 " ;
836836 private HttpClient httpClient ;
837837 private Headers additionalHeaders = new Headers ();
838838 private String userAgentDetail = null ;
@@ -927,54 +927,54 @@ public Builder userAgentDetail(String userAgentDetail) {
927927 return this ;
928928 }
929929
930- /**
931- * The timeout to use for making HTTP requests.
932- * @deprecated This method will be removed in a future version. Use
933- * {@link #httpClientConfig(Consumer) httpClientConfig} instead.
934- * @param timeout must be greater then 0.
935- * @return Builder
936- */
937- @ Deprecated
938- public Builder timeout (long timeout ) {
939- this .httpClientConfigBuilder .timeout (timeout );
940- return this ;
941- }
942-
943- /**
944- * HttpCallback.
945- * @param httpCallback Callback to be called before and after the HTTP call.
946- * @return Builder
947- */
948- public Builder httpCallback (HttpCallback httpCallback ) {
949- this .httpCallback = httpCallback ;
950- return this ;
951- }
952-
953- /**
954- * Setter for the Builder of httpClientConfiguration, takes in an operation to be performed
955- * on the builder instance of HTTP client configuration.
956- *
957- * @param action Consumer for the builder of httpClientConfiguration.
958- * @return Builder
959- */
960- public Builder httpClientConfig (Consumer <HttpClientConfiguration .Builder > action ) {
961- action .accept (httpClientConfigBuilder );
962- return this ;
963- }
964-
965- /**
966- * Private Setter for the Builder of httpClientConfiguration, takes in an operation to be performed
967- * on the builder instance of HTTP client configuration.
968- *
969- * @param supplier Supplier for the builder of httpClientConfiguration.
970- * @return Builder
971- */
972- private Builder httpClientConfig (Supplier <HttpClientConfiguration .Builder > supplier ) {
973- httpClientConfigBuilder = supplier .get ();
974- return this ;
975- }
976-
977- /**
930+ /**
931+ * The timeout to use for making HTTP requests.
932+ * @deprecated This method will be removed in a future version. Use
933+ * {@link #httpClientConfig(Consumer) httpClientConfig} instead.
934+ * @param timeout must be greater then 0.
935+ * @return Builder
936+ */
937+ @ Deprecated
938+ public Builder timeout (long timeout ) {
939+ this .httpClientConfigBuilder .timeout (timeout );
940+ return this ;
941+ }
942+
943+ /**
944+ * HttpCallback.
945+ * @param httpCallback Callback to be called before and after the HTTP call.
946+ * @return Builder
947+ */
948+ public Builder httpCallback (HttpCallback httpCallback ) {
949+ this .httpCallback = httpCallback ;
950+ return this ;
951+ }
952+
953+ /**
954+ * Setter for the Builder of httpClientConfiguration, takes in an operation to be performed
955+ * on the builder instance of HTTP client configuration.
956+ *
957+ * @param action Consumer for the builder of httpClientConfiguration.
958+ * @return Builder
959+ */
960+ public Builder httpClientConfig (Consumer <HttpClientConfiguration .Builder > action ) {
961+ action .accept (httpClientConfigBuilder );
962+ return this ;
963+ }
964+
965+ /**
966+ * Private Setter for the Builder of httpClientConfiguration, takes in an operation to be performed
967+ * on the builder instance of HTTP client configuration.
968+ *
969+ * @param supplier Supplier for the builder of httpClientConfiguration.
970+ * @return Builder
971+ */
972+ private Builder httpClientConfig (Supplier <HttpClientConfiguration .Builder > supplier ) {
973+ httpClientConfigBuilder = supplier .get ();
974+ return this ;
975+ }
976+
977+ /**
978978 * Builds a new SquareClient object using the set fields.
979979 * @return SquareClient
980980 */
0 commit comments